@qaecy/cue-ui 0.0.26 → 0.0.28

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/964.js ADDED
@@ -0,0 +1 @@
1
+ (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[964],{1294(wt){function Ve(oe){return Promise.resolve().then(()=>{var O=new Error("Cannot find module '"+oe+"'");throw O.code="MODULE_NOT_FOUND",O})}Ve.keys=()=>[],Ve.resolve=Ve,Ve.id=1294,wt.exports=Ve},8380(wt){function Ve(oe){return Promise.resolve().then(()=>{var O=new Error("Cannot find module '"+oe+"'");throw O.code="MODULE_NOT_FOUND",O})}Ve.keys=()=>[],Ve.resolve=Ve,Ve.id=8380,wt.exports=Ve},7814(wt,Ve,oe){"use strict";oe.d(Ve,{cY:()=>he,FA:()=>dr,g:()=>Pt,u:()=>J,Uj:()=>N,Fy:()=>Ce,tD:()=>jr,bD:()=>Xt,T9:()=>V,yU:()=>D,XA:()=>te,mS:()=>L,Ku:()=>qn,ZQ:()=>ye,sr:()=>vt,zJ:()=>ge,c1:()=>ft,zW:()=>ht,jZ:()=>Ke,lV:()=>It,nr:()=>pt,Ov:()=>Rt,gE:()=>se,Am:()=>si,P1:()=>fe,eX:()=>Dt});var O=oe(467);const T=function(Te){const ve=[];let Se=0;for(let gt=0;gt<Te.length;gt++){let qe=Te.charCodeAt(gt);qe<128?ve[Se++]=qe:qe<2048?(ve[Se++]=qe>>6|192,ve[Se++]=63&qe|128):55296==(64512&qe)&&gt+1<Te.length&&56320==(64512&Te.charCodeAt(gt+1))?(qe=65536+((1023&qe)<<10)+(1023&Te.charCodeAt(++gt)),ve[Se++]=qe>>18|240,ve[Se++]=qe>>12&63|128,ve[Se++]=qe>>6&63|128,ve[Se++]=63&qe|128):(ve[Se++]=qe>>12|224,ve[Se++]=qe>>6&63|128,ve[Se++]=63&qe|128)}return ve},x={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(Te,ve){if(!Array.isArray(Te))throw Error("encodeByteArray takes an array as a parameter");this.init_();const Se=ve?this.byteToCharMapWebSafe_:this.byteToCharMap_,gt=[];for(let qe=0;qe<Te.length;qe+=3){const qt=Te[qe],yr=qe+1<Te.length,it=yr?Te[qe+1]:0,Er=qe+2<Te.length,Br=Er?Te[qe+2]:0;let cr=(15&it)<<2|Br>>6,Mt=63&Br;Er||(Mt=64,yr||(cr=64)),gt.push(Se[qt>>2],Se[(3&qt)<<4|it>>4],Se[cr],Se[Mt])}return gt.join("")},encodeString(Te,ve){return this.HAS_NATIVE_SUPPORT&&!ve?btoa(Te):this.encodeByteArray(T(Te),ve)},decodeString(Te,ve){return this.HAS_NATIVE_SUPPORT&&!ve?atob(Te):function(Te){const ve=[];let Se=0,gt=0;for(;Se<Te.length;){const qe=Te[Se++];if(qe<128)ve[gt++]=String.fromCharCode(qe);else if(qe>191&&qe<224){const qt=Te[Se++];ve[gt++]=String.fromCharCode((31&qe)<<6|63&qt)}else if(qe>239&&qe<365){const Er=((7&qe)<<18|(63&Te[Se++])<<12|(63&Te[Se++])<<6|63&Te[Se++])-65536;ve[gt++]=String.fromCharCode(55296+(Er>>10)),ve[gt++]=String.fromCharCode(56320+(1023&Er))}else{const qt=Te[Se++],yr=Te[Se++];ve[gt++]=String.fromCharCode((15&qe)<<12|(63&qt)<<6|63&yr)}}return ve.join("")}(this.decodeStringToByteArray(Te,ve))},decodeStringToByteArray(Te,ve){this.init_();const Se=ve?this.charToByteMapWebSafe_:this.charToByteMap_,gt=[];for(let qe=0;qe<Te.length;){const qt=Se[Te.charAt(qe++)],it=qe<Te.length?Se[Te.charAt(qe)]:0;++qe;const Br=qe<Te.length?Se[Te.charAt(qe)]:64;++qe;const Tt=qe<Te.length?Se[Te.charAt(qe)]:64;if(++qe,null==qt||null==it||null==Br||null==Tt)throw new G;gt.push(qt<<2|it>>4),64!==Br&&(gt.push(it<<4&240|Br>>2),64!==Tt&&gt.push(Br<<6&192|Tt))}return gt},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let Te=0;Te<this.ENCODED_VALS.length;Te++)this.byteToCharMap_[Te]=this.ENCODED_VALS.charAt(Te),this.charToByteMap_[this.byteToCharMap_[Te]]=Te,this.byteToCharMapWebSafe_[Te]=this.ENCODED_VALS_WEBSAFE.charAt(Te),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[Te]]=Te,Te>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(Te)]=Te,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(Te)]=Te)}}};class G extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const N=function(Te){return function(Te){const ve=T(Te);return x.encodeByteArray(ve,!0)}(Te).replace(/\./g,"")},J=function(Te){try{return x.decodeString(Te,!0)}catch(ve){console.error("base64Decode failed: ",ve)}return null};function L(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}const Q=()=>{try{return L().__FIREBASE_DEFAULTS__||(()=>{if(typeof process>"u"||typeof process.env>"u")return;const Te=process.env.__FIREBASE_DEFAULTS__;return Te?JSON.parse(Te):void 0})()||(()=>{if(typeof document>"u")return;let Te;try{Te=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const ve=Te&&J(Te[1]);return ve&&JSON.parse(ve)})()}catch(Te){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${Te}`)}},D=Te=>{const ve=(Te=>Q()?.emulatorHosts?.[Te])(Te);if(!ve)return;const Se=ve.lastIndexOf(":");if(Se<=0||Se+1===ve.length)throw new Error(`Invalid host ${ve} with no separate hostname and port!`);const gt=parseInt(ve.substring(Se+1),10);return"["===ve[0]?[ve.substring(1,Se-1),gt]:[ve.substring(0,Se),gt]},V=()=>Q()?.config,te=Te=>Q()?.[`_${Te}`];class he{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((ve,Se)=>{this.resolve=ve,this.reject=Se})}wrapCallback(ve){return(Se,gt)=>{Se?this.reject(Se):this.resolve(gt),"function"==typeof ve&&(this.promise.catch(()=>{}),1===ve.length?ve(Se):ve(Se,gt))}}}function ge(Te){try{return(Te.startsWith("http://")||Te.startsWith("https://")?new URL(Te).hostname:Te).endsWith(".cloudworkstations.dev")}catch{return!1}}function se(Te){return de.apply(this,arguments)}function de(){return(de=(0,O.A)(function*(Te){return(yield fetch(Te,{credentials:"include"})).ok})).apply(this,arguments)}function Ce(Te,ve){if(Te.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const gt=ve||"demo-project",qe=Te.iat||0,qt=Te.sub||Te.user_id;if(!qt)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const yr={iss:`https://securetoken.google.com/${gt}`,aud:gt,iat:qe,exp:qe+3600,auth_time:qe,sub:qt,user_id:qt,firebase:{sign_in_provider:"custom",identities:{}},...Te};return[N(JSON.stringify({alg:"none",type:"JWT"})),N(JSON.stringify(yr)),""].join(".")}const Ie={};let Ee=!1;function fe(Te,ve){if(typeof window>"u"||typeof document>"u"||!ge(window.location.host)||Ie[Te]===ve||Ie[Te]||Ee)return;function Se(cr){return`__firebase__banner__${cr}`}Ie[Te]=ve;const gt="__firebase__banner",qt=function Ne(){const Te={prod:[],emulator:[]};for(const ve of Object.keys(Ie))Ie[ve]?Te.emulator.push(ve):Te.prod.push(ve);return Te}().prod.length>0;function Tt(){const cr=function tt(Te){let ve=document.getElementById(Te),Se=!1;return ve||(ve=document.createElement("div"),ve.setAttribute("id",Te),Se=!0),{created:Se,element:ve}}(gt),Mt=Se("text"),No=document.getElementById(Mt)||document.createElement("span"),St=Se("learnmore"),Be=document.getElementById(St)||document.createElement("a"),yt=Se("preprendIcon"),Yr=document.getElementById(yt)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(cr.created){const Hi=cr.element;(function it(cr){cr.style.display="flex",cr.style.background="#7faaf0",cr.style.position="fixed",cr.style.bottom="5px",cr.style.left="5px",cr.style.padding=".5em",cr.style.borderRadius="5px",cr.style.alignItems="center"})(Hi),function Rn(cr,Mt){cr.setAttribute("id",Mt),cr.innerText="Learn more",cr.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",cr.setAttribute("target","__blank"),cr.style.paddingLeft="5px",cr.style.textDecoration="underline"}(Be,St);const Ba=function Br(){const cr=document.createElement("span");return cr.style.cursor="pointer",cr.style.marginLeft="16px",cr.style.fontSize="24px",cr.innerHTML=" &times;",cr.onclick=()=>{Ee=!0,function yr(){const cr=document.getElementById(gt);cr&&cr.remove()}()},cr}();(function Er(cr,Mt){cr.setAttribute("width","24"),cr.setAttribute("id",Mt),cr.setAttribute("height","24"),cr.setAttribute("viewBox","0 0 24 24"),cr.setAttribute("fill","none"),cr.style.marginLeft="-6px"})(Yr,yt),Hi.append(Yr,No,Be,Ba),document.body.appendChild(Hi)}qt?(No.innerText="Preview backend disconnected.",Yr.innerHTML='<g clip-path="url(#clip0_6013_33858)">\n<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6013_33858">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>'):(Yr.innerHTML='<g clip-path="url(#clip0_6083_34804)">\n<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6083_34804">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>',No.innerText="Preview backend running in this workspace."),No.setAttribute("id",Mt)}"loading"===document.readyState?window.addEventListener("DOMContentLoaded",Tt):Tt()}function ye(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function Ke(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ye())}function Oe(){const Te=Q()?.forceEnvironment;if("node"===Te)return!0;if("browser"===Te)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch{return!1}}function ft(){return typeof navigator<"u"&&"Cloudflare-Workers"===navigator.userAgent}function vt(){const Te="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof Te&&void 0!==Te.id}function It(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function pt(){return!Oe()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function Rt(){return!Oe()&&!!navigator.userAgent&&(navigator.userAgent.includes("Safari")||navigator.userAgent.includes("WebKit"))&&!navigator.userAgent.includes("Chrome")}function ht(){try{return"object"==typeof indexedDB}catch{return!1}}function Dt(){return new Promise((Te,ve)=>{try{let Se=!0;const gt="validate-browser-context-for-indexeddb-analytics-module",qe=self.indexedDB.open(gt);qe.onsuccess=()=>{qe.result.close(),Se||self.indexedDB.deleteDatabase(gt),Te(!0)},qe.onupgradeneeded=()=>{Se=!1},qe.onerror=()=>{ve(qe.error?.message||"")}}catch(Se){ve(Se)}})}class Pt extends Error{constructor(ve,Se,gt){super(Se),this.code=ve,this.customData=gt,this.name="FirebaseError",Object.setPrototypeOf(this,Pt.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,dr.prototype.create)}}class dr{constructor(ve,Se,gt){this.service=ve,this.serviceName=Se,this.errors=gt}create(ve,...Se){const gt=Se[0]||{},qe=`${this.service}/${ve}`,qt=this.errors[ve],yr=qt?function Ar(Te,ve){return Te.replace(nn,(Se,gt)=>{const qe=ve[gt];return null!=qe?String(qe):`<${gt}?>`})}(qt,gt):"Error";return new Pt(qe,`${this.serviceName}: ${yr} (${qe}).`,gt)}}const nn=/\{\$([^}]+)}/g;function Xt(Te,ve){if(Te===ve)return!0;const Se=Object.keys(Te),gt=Object.keys(ve);for(const qe of Se){if(!gt.includes(qe))return!1;const qt=Te[qe],yr=ve[qe];if(ai(qt)&&ai(yr)){if(!Xt(qt,yr))return!1}else if(qt!==yr)return!1}for(const qe of gt)if(!Se.includes(qe))return!1;return!0}function ai(Te){return null!==Te&&"object"==typeof Te}function si(Te){const ve=[];for(const[Se,gt]of Object.entries(Te))Array.isArray(gt)?gt.forEach(qe=>{ve.push(encodeURIComponent(Se)+"="+encodeURIComponent(qe))}):ve.push(encodeURIComponent(Se)+"="+encodeURIComponent(gt));return ve.length?"&"+ve.join("&"):""}function jr(Te,ve){const Se=new wo(Te,ve);return Se.subscribe.bind(Se)}class wo{constructor(ve,Se){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=Se,this.task.then(()=>{ve(this)}).catch(gt=>{this.error(gt)})}next(ve){this.forEachObserver(Se=>{Se.next(ve)})}error(ve){this.forEachObserver(Se=>{Se.error(ve)}),this.close(ve)}complete(){this.forEachObserver(ve=>{ve.complete()}),this.close()}subscribe(ve,Se,gt){let qe;if(void 0===ve&&void 0===Se&&void 0===gt)throw new Error("Missing Observer.");qe=function Ci(Te,ve){if("object"!=typeof Te||null===Te)return!1;for(const Se of ve)if(Se in Te&&"function"==typeof Te[Se])return!0;return!1}(ve,["next","error","complete"])?ve:{next:ve,error:Se,complete:gt},void 0===qe.next&&(qe.next=Ho),void 0===qe.error&&(qe.error=Ho),void 0===qe.complete&&(qe.complete=Ho);const qt=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?qe.error(this.finalError):qe.complete()}catch{}}),this.observers.push(qe),qt}unsubscribeOne(ve){void 0===this.observers||void 0===this.observers[ve]||(delete this.observers[ve],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(ve){if(!this.finalized)for(let Se=0;Se<this.observers.length;Se++)this.sendOne(Se,ve)}sendOne(ve,Se){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[ve])try{Se(this.observers[ve])}catch(gt){typeof console<"u"&&console.error&&console.error(gt)}})}close(ve){this.finalized||(this.finalized=!0,void 0!==ve&&(this.finalError=ve),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function Ho(){}function qn(Te){return Te&&Te._delegate?Te._delegate:Te}},4556(wt){wt.exports=function(){"use strict";var O=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function k(L,Z){var P=L[0],ie=L[1],Q=L[2],w=L[3];ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie&Q|~ie&w)+Z[0]-680876936|0)<<7|P>>>25)+ie|0)&ie|~P&Q)+Z[1]-389564586|0)<<12|w>>>20)+P|0)&P|~w&ie)+Z[2]+606105819|0)<<17|Q>>>15)+w|0)&w|~Q&P)+Z[3]-1044525330|0)<<22|ie>>>10)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie&Q|~ie&w)+Z[4]-176418897|0)<<7|P>>>25)+ie|0)&ie|~P&Q)+Z[5]+1200080426|0)<<12|w>>>20)+P|0)&P|~w&ie)+Z[6]-1473231341|0)<<17|Q>>>15)+w|0)&w|~Q&P)+Z[7]-45705983|0)<<22|ie>>>10)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie&Q|~ie&w)+Z[8]+1770035416|0)<<7|P>>>25)+ie|0)&ie|~P&Q)+Z[9]-1958414417|0)<<12|w>>>20)+P|0)&P|~w&ie)+Z[10]-42063|0)<<17|Q>>>15)+w|0)&w|~Q&P)+Z[11]-1990404162|0)<<22|ie>>>10)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie&Q|~ie&w)+Z[12]+1804603682|0)<<7|P>>>25)+ie|0)&ie|~P&Q)+Z[13]-40341101|0)<<12|w>>>20)+P|0)&P|~w&ie)+Z[14]-1502002290|0)<<17|Q>>>15)+w|0)&w|~Q&P)+Z[15]+1236535329|0)<<22|ie>>>10)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie&w|Q&~w)+Z[1]-165796510|0)<<5|P>>>27)+ie|0)&Q|ie&~Q)+Z[6]-1069501632|0)<<9|w>>>23)+P|0)&ie|P&~ie)+Z[11]+643717713|0)<<14|Q>>>18)+w|0)&P|w&~P)+Z[0]-373897302|0)<<20|ie>>>12)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie&w|Q&~w)+Z[5]-701558691|0)<<5|P>>>27)+ie|0)&Q|ie&~Q)+Z[10]+38016083|0)<<9|w>>>23)+P|0)&ie|P&~ie)+Z[15]-660478335|0)<<14|Q>>>18)+w|0)&P|w&~P)+Z[4]-405537848|0)<<20|ie>>>12)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie&w|Q&~w)+Z[9]+568446438|0)<<5|P>>>27)+ie|0)&Q|ie&~Q)+Z[14]-1019803690|0)<<9|w>>>23)+P|0)&ie|P&~ie)+Z[3]-187363961|0)<<14|Q>>>18)+w|0)&P|w&~P)+Z[8]+1163531501|0)<<20|ie>>>12)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie&w|Q&~w)+Z[13]-1444681467|0)<<5|P>>>27)+ie|0)&Q|ie&~Q)+Z[2]-51403784|0)<<9|w>>>23)+P|0)&ie|P&~ie)+Z[7]+1735328473|0)<<14|Q>>>18)+w|0)&P|w&~P)+Z[12]-1926607734|0)<<20|ie>>>12)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie^Q^w)+Z[5]-378558|0)<<4|P>>>28)+ie|0)^ie^Q)+Z[8]-2022574463|0)<<11|w>>>21)+P|0)^P^ie)+Z[11]+1839030562|0)<<16|Q>>>16)+w|0)^w^P)+Z[14]-35309556|0)<<23|ie>>>9)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie^Q^w)+Z[1]-1530992060|0)<<4|P>>>28)+ie|0)^ie^Q)+Z[4]+1272893353|0)<<11|w>>>21)+P|0)^P^ie)+Z[7]-155497632|0)<<16|Q>>>16)+w|0)^w^P)+Z[10]-1094730640|0)<<23|ie>>>9)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie^Q^w)+Z[13]+681279174|0)<<4|P>>>28)+ie|0)^ie^Q)+Z[0]-358537222|0)<<11|w>>>21)+P|0)^P^ie)+Z[3]-722521979|0)<<16|Q>>>16)+w|0)^w^P)+Z[6]+76029189|0)<<23|ie>>>9)+Q|0,ie=((ie+=((Q=((Q+=((w=((w+=((P=((P+=(ie^Q^w)+Z[9]-640364487|0)<<4|P>>>28)+ie|0)^ie^Q)+Z[12]-421815835|0)<<11|w>>>21)+P|0)^P^ie)+Z[15]+530742520|0)<<16|Q>>>16)+w|0)^w^P)+Z[2]-995338651|0)<<23|ie>>>9)+Q|0,ie=((ie+=((w=((w+=(ie^((P=((P+=(Q^(ie|~w))+Z[0]-198630844|0)<<6|P>>>26)+ie|0)|~Q))+Z[7]+1126891415|0)<<10|w>>>22)+P|0)^((Q=((Q+=(P^(w|~ie))+Z[14]-1416354905|0)<<15|Q>>>17)+w|0)|~P))+Z[5]-57434055|0)<<21|ie>>>11)+Q|0,ie=((ie+=((w=((w+=(ie^((P=((P+=(Q^(ie|~w))+Z[12]+1700485571|0)<<6|P>>>26)+ie|0)|~Q))+Z[3]-1894986606|0)<<10|w>>>22)+P|0)^((Q=((Q+=(P^(w|~ie))+Z[10]-1051523|0)<<15|Q>>>17)+w|0)|~P))+Z[1]-2054922799|0)<<21|ie>>>11)+Q|0,ie=((ie+=((w=((w+=(ie^((P=((P+=(Q^(ie|~w))+Z[8]+1873313359|0)<<6|P>>>26)+ie|0)|~Q))+Z[15]-30611744|0)<<10|w>>>22)+P|0)^((Q=((Q+=(P^(w|~ie))+Z[6]-1560198380|0)<<15|Q>>>17)+w|0)|~P))+Z[13]+1309151649|0)<<21|ie>>>11)+Q|0,ie=((ie+=((w=((w+=(ie^((P=((P+=(Q^(ie|~w))+Z[4]-145523070|0)<<6|P>>>26)+ie|0)|~Q))+Z[11]-1120210379|0)<<10|w>>>22)+P|0)^((Q=((Q+=(P^(w|~ie))+Z[2]+718787259|0)<<15|Q>>>17)+w|0)|~P))+Z[9]-343485551|0)<<21|ie>>>11)+Q|0,L[0]=P+L[0]|0,L[1]=ie+L[1]|0,L[2]=Q+L[2]|0,L[3]=w+L[3]|0}function b(L){var P,Z=[];for(P=0;P<64;P+=4)Z[P>>2]=L.charCodeAt(P)+(L.charCodeAt(P+1)<<8)+(L.charCodeAt(P+2)<<16)+(L.charCodeAt(P+3)<<24);return Z}function j(L){var P,Z=[];for(P=0;P<64;P+=4)Z[P>>2]=L[P]+(L[P+1]<<8)+(L[P+2]<<16)+(L[P+3]<<24);return Z}function T(L){var ie,Q,w,D,V,te,Z=L.length,P=[1732584193,-271733879,-1732584194,271733878];for(ie=64;ie<=Z;ie+=64)k(P,b(L.substring(ie-64,ie)));for(Q=(L=L.substring(ie-64)).length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ie=0;ie<Q;ie+=1)w[ie>>2]|=L.charCodeAt(ie)<<(ie%4<<3);if(w[ie>>2]|=128<<(ie%4<<3),ie>55)for(k(P,w),ie=0;ie<16;ie+=1)w[ie]=0;return D=(D=8*Z).toString(16).match(/(.*?)(.{0,8})$/),V=parseInt(D[2],16),te=parseInt(D[1],16)||0,w[14]=V,w[15]=te,k(P,w),P}function x(L){var P,Z="";for(P=0;P<4;P+=1)Z+=O[L>>8*P+4&15]+O[L>>8*P&15];return Z}function G(L){var Z;for(Z=0;Z<L.length;Z+=1)L[Z]=x(L[Z]);return L.join("")}function E(L){return/[\u0080-\uFFFF]/.test(L)&&(L=unescape(encodeURIComponent(L))),L}function W(L){var ie,Z=[],P=L.length;for(ie=0;ie<P-1;ie+=2)Z.push(parseInt(L.substr(ie,2),16));return String.fromCharCode.apply(String,Z)}function ae(){this.reset()}return G(T("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function L(Z,P){return(Z=0|Z||0)<0?Math.max(Z+P,0):Math.min(Z,P)}ArrayBuffer.prototype.slice=function(Z,P){var D,V,te,he,ie=this.byteLength,Q=L(Z,ie),w=ie;return void 0!==P&&(w=L(P,ie)),Q>w?new ArrayBuffer(0):(D=w-Q,V=new ArrayBuffer(D),te=new Uint8Array(V),he=new Uint8Array(this,Q,D),te.set(he),V)}}(),ae.prototype.append=function(L){return this.appendBinary(E(L)),this},ae.prototype.appendBinary=function(L){this._buff+=L,this._length+=L.length;var P,Z=this._buff.length;for(P=64;P<=Z;P+=64)k(this._hash,b(this._buff.substring(P-64,P)));return this._buff=this._buff.substring(P-64),this},ae.prototype.end=function(L){var ie,w,Z=this._buff,P=Z.length,Q=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(ie=0;ie<P;ie+=1)Q[ie>>2]|=Z.charCodeAt(ie)<<(ie%4<<3);return this._finish(Q,P),w=G(this._hash),L&&(w=W(w)),this.reset(),w},ae.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},ae.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},ae.prototype.setState=function(L){return this._buff=L.buff,this._length=L.length,this._hash=L.hash,this},ae.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},ae.prototype._finish=function(L,Z){var ie,Q,w,P=Z;if(L[P>>2]|=128<<(P%4<<3),P>55)for(k(this._hash,L),P=0;P<16;P+=1)L[P]=0;ie=(ie=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),Q=parseInt(ie[2],16),w=parseInt(ie[1],16)||0,L[14]=Q,L[15]=w,k(this._hash,L)},ae.hash=function(L,Z){return ae.hashBinary(E(L),Z)},ae.hashBinary=function(L,Z){var ie=G(T(L));return Z?W(ie):ie},(ae.ArrayBuffer=function(){this.reset()}).prototype.append=function(L){var ie,Z=function H(L,Z,P){var ie=new Uint8Array(L.byteLength+Z.byteLength);return ie.set(new Uint8Array(L)),ie.set(new Uint8Array(Z),L.byteLength),P?ie:ie.buffer}(this._buff.buffer,L,!0),P=Z.length;for(this._length+=L.byteLength,ie=64;ie<=P;ie+=64)k(this._hash,j(Z.subarray(ie-64,ie)));return this._buff=ie-64<P?new Uint8Array(Z.buffer.slice(ie-64)):new Uint8Array(0),this},ae.ArrayBuffer.prototype.end=function(L){var Q,w,Z=this._buff,P=Z.length,ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(Q=0;Q<P;Q+=1)ie[Q>>2]|=Z[Q]<<(Q%4<<3);return this._finish(ie,P),w=G(this._hash),L&&(w=W(w)),this.reset(),w},ae.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},ae.ArrayBuffer.prototype.getState=function(){var L=ae.prototype.getState.call(this);return L.buff=function J(L){return String.fromCharCode.apply(null,new Uint8Array(L))}(L.buff),L},ae.ArrayBuffer.prototype.setState=function(L){return L.buff=function N(L,Z){var w,P=L.length,ie=new ArrayBuffer(P),Q=new Uint8Array(ie);for(w=0;w<P;w+=1)Q[w]=L.charCodeAt(w);return Z?Q:ie}(L.buff,!0),ae.prototype.setState.call(this,L)},ae.ArrayBuffer.prototype.destroy=ae.prototype.destroy,ae.ArrayBuffer.prototype._finish=ae.prototype._finish,ae.ArrayBuffer.hash=function(L,Z){var ie=G(function S(L){var ie,Q,w,D,V,te,Z=L.length,P=[1732584193,-271733879,-1732584194,271733878];for(ie=64;ie<=Z;ie+=64)k(P,j(L.subarray(ie-64,ie)));for(Q=(L=ie-64<Z?L.subarray(ie-64):new Uint8Array(0)).length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ie=0;ie<Q;ie+=1)w[ie>>2]|=L[ie]<<(ie%4<<3);if(w[ie>>2]|=128<<(ie%4<<3),ie>55)for(k(P,w),ie=0;ie<16;ie+=1)w[ie]=0;return D=(D=8*Z).toString(16).match(/(.*?)(.{0,8})$/),V=parseInt(D[2],16),te=parseInt(D[1],16)||0,w[14]=V,w[15]=te,k(P,w),P}(new Uint8Array(L)));return Z?W(ie):ie},ae}()},6964(wt,Ve,oe){"use strict";oe.d(Ve,{CueEntityViewer:()=>SH});var O=oe(467),F=oe(7705),k=oe(2271),b=oe(5802),T=(oe(600),oe(3659));(0,T.KO)("firebase","12.8.0","app"),oe(6702);const E="http://www.w3.org/1999/02/22-rdf-syntax-ns#",N="http://www.w3.org/2001/XMLSchema#",J="http://www.w3.org/2000/10/swap/",H={xsd:{decimal:`${N}decimal`,boolean:`${N}boolean`,double:`${N}double`,integer:`${N}integer`,string:`${N}string`},rdf:{type:`${E}type`,nil:`${E}nil`,first:`${E}first`,rest:`${E}rest`,langString:`${E}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${J}reify#forSome`,forAll:`${J}reify#forAll`},log:{implies:`${J}log#implies`,isImpliedBy:`${J}log#isImpliedBy`}},{rdf:W,xsd:ae}=H;let L,Z=0;const Q={namedNode:tt,blankNode:Ee,variable:ye,literal:fe,defaultGraph:function Ke(){return L},quad:Oe,triple:Oe,fromTerm:pe,fromQuad:Ze};class w{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof w?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class D extends w{get termType(){return"NamedNode"}}class V extends w{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return t<e.length&&"@"===e[t++]?e.substr(t).toLowerCase():""}get datatype(){return new D(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,n=t<e.length?e[t]:"";return"^"===n?e.substr(t+2):"@"!==n?ae.string:W.langString}equals(e){return e instanceof V?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class te extends w{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class he extends w{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}L=new class ge extends w{constructor(){return super(""),L||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}};class Ce extends w{constructor(e,t,n,i){super(""),this._subject=e,this._predicate=t,this._object=n,this._graph=i||L}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function tt(r){return new D(r)}function Ee(r){return new te(r||"n3-"+Z++)}function fe(r,e){if("string"==typeof e)return new V(`"${r}"@${e.toLowerCase()}`);let t=e?e.value:"";return""===t&&("boolean"==typeof r?t=ae.boolean:"number"==typeof r&&(Number.isFinite(r)?t=Number.isInteger(r)?ae.integer:ae.double:(t=ae.double,Number.isNaN(r)||(r=r>0?"INF":"-INF")))),new V(""===t||t===ae.string?`"${r}"`:`"${r}"^^${t}`)}function ye(r){return new he(r)}function Oe(r,e,t,n){return new Ce(r,e,t,n)}function pe(r){if(r instanceof w)return r;switch(r.termType){case"NamedNode":return tt(r.value);case"BlankNode":return Ee(r.value);case"Variable":return ye(r.value);case"DefaultGraph":return L;case"Literal":return fe(r.value,r.language||r.datatype);case"Quad":return Ze(r);default:throw new Error(`Unexpected termType: ${r.termType}`)}}function Ze(r){if(r instanceof Ce)return r;if("Quad"!==r.termType)throw new Error(`Unexpected termType: ${r.termType}`);return Oe(pe(r.subject),pe(r.predicate),pe(r.object),pe(r.graph))}Q.defaultGraph();var si,ua=oe(2040),Xt=oe(7814),ai=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ji={};(function(){var r;function n(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.C=Array(this.blockSize),this.o=this.h=0,this.u()}function i(A,C,M){M||(M=0);const q=Array(16);if("string"==typeof C)for(var z=0;z<16;++z)q[z]=C.charCodeAt(M++)|C.charCodeAt(M++)<<8|C.charCodeAt(M++)<<16|C.charCodeAt(M++)<<24;else for(z=0;z<16;++z)q[z]=C[M++]|C[M++]<<8|C[M++]<<16|C[M++]<<24;let B,K=A.g[3];B=(C=A.g[0])+(K^(M=A.g[1])&((z=A.g[2])^K))+q[0]+3614090360&4294967295,B=K+(z^(C=M+(B<<7&4294967295|B>>>25))&(M^z))+q[1]+3905402710&4294967295,K=C+(B<<12&4294967295|B>>>20),B=z+(M^K&(C^M))+q[2]+606105819&4294967295,B=M+(C^(z=K+(B<<17&4294967295|B>>>15))&(K^C))+q[3]+3250441966&4294967295,B=C+(K^(M=z+(B<<22&4294967295|B>>>10))&(z^K))+q[4]+4118548399&4294967295,B=K+(z^(C=M+(B<<7&4294967295|B>>>25))&(M^z))+q[5]+1200080426&4294967295,K=C+(B<<12&4294967295|B>>>20),B=z+(M^K&(C^M))+q[6]+2821735955&4294967295,B=M+(C^(z=K+(B<<17&4294967295|B>>>15))&(K^C))+q[7]+4249261313&4294967295,B=C+(K^(M=z+(B<<22&4294967295|B>>>10))&(z^K))+q[8]+1770035416&4294967295,B=K+(z^(C=M+(B<<7&4294967295|B>>>25))&(M^z))+q[9]+2336552879&4294967295,K=C+(B<<12&4294967295|B>>>20),B=z+(M^K&(C^M))+q[10]+4294925233&4294967295,B=M+(C^(z=K+(B<<17&4294967295|B>>>15))&(K^C))+q[11]+2304563134&4294967295,B=C+(K^(M=z+(B<<22&4294967295|B>>>10))&(z^K))+q[12]+1804603682&4294967295,B=K+(z^(C=M+(B<<7&4294967295|B>>>25))&(M^z))+q[13]+4254626195&4294967295,K=C+(B<<12&4294967295|B>>>20),B=z+(M^K&(C^M))+q[14]+2792965006&4294967295,B=M+(C^(z=K+(B<<17&4294967295|B>>>15))&(K^C))+q[15]+1236535329&4294967295,B=C+(z^K&((M=z+(B<<22&4294967295|B>>>10))^z))+q[1]+4129170786&4294967295,B=K+(M^z&((C=M+(B<<5&4294967295|B>>>27))^M))+q[6]+3225465664&4294967295,K=C+(B<<9&4294967295|B>>>23),B=z+(C^M&(K^C))+q[11]+643717713&4294967295,B=M+(K^C&((z=K+(B<<14&4294967295|B>>>18))^K))+q[0]+3921069994&4294967295,B=C+(z^K&((M=z+(B<<20&4294967295|B>>>12))^z))+q[5]+3593408605&4294967295,B=K+(M^z&((C=M+(B<<5&4294967295|B>>>27))^M))+q[10]+38016083&4294967295,K=C+(B<<9&4294967295|B>>>23),B=z+(C^M&(K^C))+q[15]+3634488961&4294967295,B=M+(K^C&((z=K+(B<<14&4294967295|B>>>18))^K))+q[4]+3889429448&4294967295,B=C+(z^K&((M=z+(B<<20&4294967295|B>>>12))^z))+q[9]+568446438&4294967295,B=K+(M^z&((C=M+(B<<5&4294967295|B>>>27))^M))+q[14]+3275163606&4294967295,K=C+(B<<9&4294967295|B>>>23),B=z+(C^M&(K^C))+q[3]+4107603335&4294967295,B=M+(K^C&((z=K+(B<<14&4294967295|B>>>18))^K))+q[8]+1163531501&4294967295,B=C+(z^K&((M=z+(B<<20&4294967295|B>>>12))^z))+q[13]+2850285829&4294967295,B=K+(M^z&((C=M+(B<<5&4294967295|B>>>27))^M))+q[2]+4243563512&4294967295,K=C+(B<<9&4294967295|B>>>23),B=z+(C^M&(K^C))+q[7]+1735328473&4294967295,B=M+(K^C&((z=K+(B<<14&4294967295|B>>>18))^K))+q[12]+2368359562&4294967295,B=C+((M=z+(B<<20&4294967295|B>>>12))^z^K)+q[5]+4294588738&4294967295,B=K+((C=M+(B<<4&4294967295|B>>>28))^M^z)+q[8]+2272392833&4294967295,K=C+(B<<11&4294967295|B>>>21),B=z+(K^C^M)+q[11]+1839030562&4294967295,B=M+((z=K+(B<<16&4294967295|B>>>16))^K^C)+q[14]+4259657740&4294967295,B=C+((M=z+(B<<23&4294967295|B>>>9))^z^K)+q[1]+2763975236&4294967295,B=K+((C=M+(B<<4&4294967295|B>>>28))^M^z)+q[4]+1272893353&4294967295,K=C+(B<<11&4294967295|B>>>21),B=z+(K^C^M)+q[7]+4139469664&4294967295,B=M+((z=K+(B<<16&4294967295|B>>>16))^K^C)+q[10]+3200236656&4294967295,B=C+((M=z+(B<<23&4294967295|B>>>9))^z^K)+q[13]+681279174&4294967295,B=K+((C=M+(B<<4&4294967295|B>>>28))^M^z)+q[0]+3936430074&4294967295,K=C+(B<<11&4294967295|B>>>21),B=z+(K^C^M)+q[3]+3572445317&4294967295,B=M+((z=K+(B<<16&4294967295|B>>>16))^K^C)+q[6]+76029189&4294967295,B=C+((M=z+(B<<23&4294967295|B>>>9))^z^K)+q[9]+3654602809&4294967295,B=K+((C=M+(B<<4&4294967295|B>>>28))^M^z)+q[12]+3873151461&4294967295,K=C+(B<<11&4294967295|B>>>21),B=z+(K^C^M)+q[15]+530742520&4294967295,B=M+((z=K+(B<<16&4294967295|B>>>16))^K^C)+q[2]+3299628645&4294967295,B=C+(z^((M=z+(B<<23&4294967295|B>>>9))|~K))+q[0]+4096336452&4294967295,B=K+(M^((C=M+(B<<6&4294967295|B>>>26))|~z))+q[7]+1126891415&4294967295,K=C+(B<<10&4294967295|B>>>22),B=z+(C^(K|~M))+q[14]+2878612391&4294967295,B=M+(K^((z=K+(B<<15&4294967295|B>>>17))|~C))+q[5]+4237533241&4294967295,B=C+(z^((M=z+(B<<21&4294967295|B>>>11))|~K))+q[12]+1700485571&4294967295,B=K+(M^((C=M+(B<<6&4294967295|B>>>26))|~z))+q[3]+2399980690&4294967295,K=C+(B<<10&4294967295|B>>>22),B=z+(C^(K|~M))+q[10]+4293915773&4294967295,B=M+(K^((z=K+(B<<15&4294967295|B>>>17))|~C))+q[1]+2240044497&4294967295,B=C+(z^((M=z+(B<<21&4294967295|B>>>11))|~K))+q[8]+1873313359&4294967295,B=K+(M^((C=M+(B<<6&4294967295|B>>>26))|~z))+q[15]+4264355552&4294967295,K=C+(B<<10&4294967295|B>>>22),B=z+(C^(K|~M))+q[6]+2734768916&4294967295,B=M+(K^((z=K+(B<<15&4294967295|B>>>17))|~C))+q[13]+1309151649&4294967295,B=C+(z^((M=z+(B<<21&4294967295|B>>>11))|~K))+q[4]+4149444226&4294967295,B=K+(M^((C=M+(B<<6&4294967295|B>>>26))|~z))+q[11]+3174756917&4294967295,K=C+(B<<10&4294967295|B>>>22),B=z+(C^(K|~M))+q[2]+718787259&4294967295,B=M+(K^((z=K+(B<<15&4294967295|B>>>17))|~C))+q[9]+3951481745&4294967295,A.g[0]=A.g[0]+C&4294967295,A.g[1]=A.g[1]+(z+(B<<21&4294967295|B>>>11))&4294967295,A.g[2]=A.g[2]+z&4294967295,A.g[3]=A.g[3]+K&4294967295}function a(A,C){this.h=C;const M=[];let q=!0;for(let z=A.length-1;z>=0;z--){const K=0|A[z];q&&K==C||(M[z]=K,q=!1)}this.g=M}(function e(A,C){function M(){}M.prototype=C.prototype,A.F=C.prototype,A.prototype=new M,A.prototype.constructor=A,A.D=function(q,z,K){for(var B=Array(arguments.length-2),me=2;me<arguments.length;me++)B[me-2]=arguments[me];return C.prototype[z].apply(q,B)}})(n,function t(){this.blockSize=-1}),n.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0},n.prototype.v=function(A,C){void 0===C&&(C=A.length);const M=C-this.blockSize,q=this.C;let z=this.h,K=0;for(;K<C;){if(0==z)for(;K<=M;)i(this,A,K),K+=this.blockSize;if("string"==typeof A){for(;K<C;)if(q[z++]=A.charCodeAt(K++),z==this.blockSize){i(this,q),z=0;break}}else for(;K<C;)if(q[z++]=A[K++],z==this.blockSize){i(this,q),z=0;break}}this.h=z,this.o+=C},n.prototype.A=function(){var A=Array((this.h<56?this.blockSize:2*this.blockSize)-this.h);A[0]=128;for(var C=1;C<A.length-8;++C)A[C]=0;C=8*this.o;for(var M=A.length-8;M<A.length;++M)A[M]=255&C,C/=256;for(this.v(A),A=Array(16),C=0,M=0;M<4;++M)for(let q=0;q<32;q+=8)A[C++]=this.g[M]>>>q&255;return A};var s={};function l(A){return-128<=A&&A<128?function o(A,C){var M=s;return Object.prototype.hasOwnProperty.call(M,A)?M[A]:M[A]=C(A)}(A,function(C){return new a([0|C],C<0?-1:0)}):new a([0|A],A<0?-1:0)}function u(A){if(isNaN(A)||!isFinite(A))return h;if(A<0)return v(u(-A));const C=[];let M=1;for(let q=0;A>=M;q++)C[q]=A/M|0,M*=4294967296;return new a(C,0)}var h=l(0),d=l(1),p=l(16777216);function g(A){if(0!=A.h)return!1;for(let C=0;C<A.g.length;C++)if(0!=A.g[C])return!1;return!0}function y(A){return-1==A.h}function v(A){const C=A.g.length,M=[];for(let q=0;q<C;q++)M[q]=~A.g[q];return new a(M,~A.h).add(d)}function m(A,C){return A.add(v(C))}function _(A,C){for(;(65535&A[C])!=A[C];)A[C+1]+=A[C]>>>16,A[C]&=65535,C++}function I(A,C){this.g=A,this.h=C}function U(A,C){if(g(C))throw Error("division by zero");if(g(A))return new I(h,h);if(y(A))return C=U(v(A),C),new I(v(C.g),v(C.h));if(y(C))return C=U(A,v(C)),new I(v(C.g),C.h);if(A.g.length>30){if(y(A)||y(C))throw Error("slowDivide_ only works with positive integers.");for(var M=d,q=C;q.l(A)<=0;)M=ne(M),q=ne(q);var z=re(M,1),K=re(q,1);for(q=re(q,2),M=re(M,2);!g(q);){var B=K.add(q);B.l(A)<=0&&(z=z.add(M),K=B),q=re(q,1),M=re(M,1)}return C=m(A,z.j(C)),new I(z,C)}for(z=h;A.l(C)>=0;){for(M=Math.max(1,Math.floor(A.m()/C.m())),q=(q=Math.ceil(Math.log(M)/Math.LN2))<=48?1:Math.pow(2,q-48),B=(K=u(M)).j(C);y(B)||B.l(A)>0;)B=(K=u(M-=q)).j(C);g(K)&&(K=d),z=z.add(K),A=m(A,B)}return new I(z,A)}function ne(A){const C=A.g.length+1,M=[];for(let q=0;q<C;q++)M[q]=A.i(q)<<1|A.i(q-1)>>>31;return new a(M,A.h)}function re(A,C){const M=C>>5;C%=32;const q=A.g.length-M,z=[];for(let K=0;K<q;K++)z[K]=C>0?A.i(K+M)>>>C|A.i(K+M+1)<<32-C:A.i(K+M);return new a(z,A.h)}(r=a.prototype).m=function(){if(y(this))return-v(this).m();let A=0,C=1;for(let M=0;M<this.g.length;M++){const q=this.i(M);A+=(q>=0?q:4294967296+q)*C,C*=4294967296}return A},r.toString=function(A){if((A=A||10)<2||36<A)throw Error("radix out of range: "+A);if(g(this))return"0";if(y(this))return"-"+v(this).toString(A);const C=u(Math.pow(A,6));var M=this;let q="";for(;;){const z=U(M,C).g;let K=(((M=m(M,z.j(C))).g.length>0?M.g[0]:M.h)>>>0).toString(A);if(g(M=z))return K+q;for(;K.length<6;)K="0"+K;q=K+q}},r.i=function(A){return A<0?0:A<this.g.length?this.g[A]:this.h},r.l=function(A){return y(A=m(this,A))?-1:g(A)?0:1},r.abs=function(){return y(this)?v(this):this},r.add=function(A){const C=Math.max(this.g.length,A.g.length),M=[];let q=0;for(let z=0;z<=C;z++){let K=q+(65535&this.i(z))+(65535&A.i(z)),B=(K>>>16)+(this.i(z)>>>16)+(A.i(z)>>>16);q=B>>>16,K&=65535,B&=65535,M[z]=B<<16|K}return new a(M,-2147483648&M[M.length-1]?-1:0)},r.j=function(A){if(g(this)||g(A))return h;if(y(this))return y(A)?v(this).j(v(A)):v(v(this).j(A));if(y(A))return v(this.j(v(A)));if(this.l(p)<0&&A.l(p)<0)return u(this.m()*A.m());const C=this.g.length+A.g.length,M=[];for(var q=0;q<2*C;q++)M[q]=0;for(q=0;q<this.g.length;q++)for(let z=0;z<A.g.length;z++){const K=this.i(q)>>>16,B=65535&this.i(q),me=A.i(z)>>>16,be=65535&A.i(z);M[2*q+2*z]+=B*be,_(M,2*q+2*z),M[2*q+2*z+1]+=K*be,_(M,2*q+2*z+1),M[2*q+2*z+1]+=B*me,_(M,2*q+2*z+1),M[2*q+2*z+2]+=K*me,_(M,2*q+2*z+2)}for(A=0;A<C;A++)M[A]=M[2*A+1]<<16|M[2*A];for(A=C;A<2*C;A++)M[A]=0;return new a(M,0)},r.B=function(A){return U(this,A).h},r.and=function(A){const C=Math.max(this.g.length,A.g.length),M=[];for(let q=0;q<C;q++)M[q]=this.i(q)&A.i(q);return new a(M,this.h&A.h)},r.or=function(A){const C=Math.max(this.g.length,A.g.length),M=[];for(let q=0;q<C;q++)M[q]=this.i(q)|A.i(q);return new a(M,this.h|A.h)},r.xor=function(A){const C=Math.max(this.g.length,A.g.length),M=[];for(let q=0;q<C;q++)M[q]=this.i(q)^A.i(q);return new a(M,this.h^A.h)},n.prototype.digest=n.prototype.A,n.prototype.reset=n.prototype.u,n.prototype.update=n.prototype.v,ji.Md5=n,a.prototype.add=a.prototype.add,a.prototype.multiply=a.prototype.j,a.prototype.modulo=a.prototype.B,a.prototype.compare=a.prototype.l,a.prototype.toNumber=a.prototype.m,a.prototype.toString=a.prototype.toString,a.prototype.getBits=a.prototype.i,a.fromNumber=u,a.fromString=function c(A,C){if(0==A.length)throw Error("number format error: empty string");if((C=C||10)<2||36<C)throw Error("radix out of range: "+C);if("-"==A.charAt(0))return v(c(A.substring(1),C));if(A.indexOf("-")>=0)throw Error('number format error: interior "-" character');const M=u(Math.pow(C,8));let q=h;for(let K=0;K<A.length;K+=8){var z=Math.min(8,A.length-K);const B=parseInt(A.substring(K,K+z),C);z<8?(z=u(Math.pow(C,z)),q=q.j(z).add(u(B))):(q=q.j(M),q=q.add(u(B)))}return q},si=ji.Integer=a}).apply(typeof ai<"u"?ai:typeof self<"u"?self:typeof window<"u"?window:{});var wo,Ci,Ho,ca,ko,Fs,Fn,ha,Gn=oe(1919),Va=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},jr={};(function(){var r,e=Object.defineProperty,n=function t(f){f=["object"==typeof globalThis&&globalThis,f,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof Va&&Va];for(var R=0;R<f.length;++R){var $=f[R];if($&&$.Math==Math)return $}throw Error("Cannot find global object")}(this);function i(f,R){if(R)e:{var $=n;f=f.split(".");for(var ce=0;ce<f.length-1;ce++){var Ge=f[ce];if(!(Ge in $))break e;$=$[Ge]}(R=R(ce=$[f=f[f.length-1]]))!=ce&&null!=R&&e($,f,{configurable:!0,writable:!0,value:R})}}i("Symbol.dispose",function(f){return f||Symbol("Symbol.dispose")}),i("Array.prototype.values",function(f){return f||function(){return this[Symbol.iterator]()}}),i("Object.entries",function(f){return f||function(R){var ce,$=[];for(ce in R)Object.prototype.hasOwnProperty.call(R,ce)&&$.push([ce,R[ce]]);return $}});var o=o||{},a=this||self;function s(f){var R=typeof f;return"object"==R&&null!=f||"function"==R}function l(f,R,$){return f.call.apply(f.bind,arguments)}function u(f,R,$){return(u=l).apply(null,arguments)}function c(f,R){var $=Array.prototype.slice.call(arguments,1);return function(){var ce=$.slice();return ce.push.apply(ce,arguments),f.apply(this,ce)}}function h(f,R){function $(){}$.prototype=R.prototype,f.Z=R.prototype,f.prototype=new $,f.prototype.constructor=f,f.Ob=function(ce,Ge,Qe){for(var Ft=Array(arguments.length-2),kr=2;kr<arguments.length;kr++)Ft[kr-2]=arguments[kr];return R.prototype[Ge].apply(ce,Ft)}}var d=typeof AsyncContext<"u"&&"function"==typeof AsyncContext.Snapshot?f=>f&&AsyncContext.Snapshot.wrap(f):f=>f;function p(f){const R=f.length;if(R>0){const $=Array(R);for(let ce=0;ce<R;ce++)$[ce]=f[ce];return $}return[]}function g(f,R){for(let ce=1;ce<arguments.length;ce++){const Ge=arguments[ce];var $=typeof Ge;if("array"==($="object"!=$?$:Ge?Array.isArray(Ge)?"array":$:"null")||"object"==$&&"number"==typeof Ge.length){const Qe=Ge.length||0;f.length=($=f.length||0)+Qe;for(let Ft=0;Ft<Qe;Ft++)f[$+Ft]=Ge[Ft]}else f.push(Ge)}}function v(f){a.setTimeout(()=>{throw f},0)}function m(){var f=A;let R=null;return f.g&&(R=f.g,f.g=f.g.next,f.g||(f.h=null),R.next=null),R}var I=new class y{constructor(R,$){this.i=R,this.j=$,this.h=0,this.g=null}get(){let R;return this.h>0?(this.h--,R=this.g,this.g=R.next,R.next=null):R=this.i(),R}}(()=>new U,f=>f.reset());class U{constructor(){this.next=this.g=this.h=null}set(R,$){this.h=R,this.g=$,this.next=null}reset(){this.next=this.g=this.h=null}}let ne,re=!1,A=new class _{constructor(){this.h=this.g=null}add(R,$){const ce=I.get();ce.set(R,$),this.h?this.h.next=ce:this.g=ce,this.h=ce}},C=()=>{const f=Promise.resolve(void 0);ne=()=>{f.then(M)}};function M(){for(var f;f=m();){try{f.h.call(f.g)}catch($){v($)}var R=I;R.j(f),R.h<100&&(R.h++,f.next=R.g,R.g=f)}re=!1}function q(){this.u=this.u,this.C=this.C}function z(f,R){this.type=f,this.g=this.target=R,this.defaultPrevented=!1}q.prototype.u=!1,q.prototype.dispose=function(){this.u||(this.u=!0,this.N())},q.prototype[Symbol.dispose]=function(){this.dispose()},q.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},z.prototype.h=function(){this.defaultPrevented=!0};var K=function(){if(!a.addEventListener||!Object.defineProperty)return!1;var f=!1,R=Object.defineProperty({},"passive",{get:function(){f=!0}});try{const $=()=>{};a.addEventListener("test",$,R),a.removeEventListener("test",$,R)}catch{}return f}();function B(f){return/^[\s\xa0]*$/.test(f)}function me(f,R){z.call(this,f?f.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,f&&this.init(f,R)}h(me,z),me.prototype.init=function(f,R){const $=this.type=f.type,ce=f.changedTouches&&f.changedTouches.length?f.changedTouches[0]:null;this.target=f.target||f.srcElement,this.g=R,(R=f.relatedTarget)||("mouseover"==$?R=f.fromElement:"mouseout"==$&&(R=f.toElement)),this.relatedTarget=R,ce?(this.clientX=void 0!==ce.clientX?ce.clientX:ce.pageX,this.clientY=void 0!==ce.clientY?ce.clientY:ce.pageY,this.screenX=ce.screenX||0,this.screenY=ce.screenY||0):(this.clientX=void 0!==f.clientX?f.clientX:f.pageX,this.clientY=void 0!==f.clientY?f.clientY:f.pageY,this.screenX=f.screenX||0,this.screenY=f.screenY||0),this.button=f.button,this.key=f.key||"",this.ctrlKey=f.ctrlKey,this.altKey=f.altKey,this.shiftKey=f.shiftKey,this.metaKey=f.metaKey,this.pointerId=f.pointerId||0,this.pointerType=f.pointerType,this.state=f.state,this.i=f,f.defaultPrevented&&me.Z.h.call(this)},me.prototype.h=function(){me.Z.h.call(this);const f=this.i;f.preventDefault?f.preventDefault():f.returnValue=!1};var be="closure_listenable_"+(1e6*Math.random()|0),xe=0;function we(f,R,$,ce,Ge){this.listener=f,this.proxy=null,this.src=R,this.type=$,this.capture=!!ce,this.ha=Ge,this.key=++xe,this.da=this.fa=!1}function Re(f){f.da=!0,f.listener=null,f.proxy=null,f.src=null,f.ha=null}function je(f,R,$){for(const ce in f)R.call($,f[ce],ce,f)}function Pe(f){const R={};for(const $ in f)R[$]=f[$];return R}const Fe="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function lt(f,R){let $,ce;for(let Ge=1;Ge<arguments.length;Ge++){for($ in ce=arguments[Ge],ce)f[$]=ce[$];for(let Qe=0;Qe<Fe.length;Qe++)$=Fe[Qe],Object.prototype.hasOwnProperty.call(ce,$)&&(f[$]=ce[$])}}function mt(f){this.src=f,this.g={},this.h=0}function at(f,R){const $=R.type;if($ in f.g){var Qe,ce=f.g[$],Ge=Array.prototype.indexOf.call(ce,R,void 0);(Qe=Ge>=0)&&Array.prototype.splice.call(ce,Ge,1),Qe&&(Re(R),0==f.g[$].length&&(delete f.g[$],f.h--))}}function bt(f,R,$,ce){for(let Ge=0;Ge<f.length;++Ge){const Qe=f[Ge];if(!Qe.da&&Qe.listener==R&&Qe.capture==!!$&&Qe.ha==ce)return Ge}return-1}mt.prototype.add=function(f,R,$,ce,Ge){const Qe=f.toString();(f=this.g[Qe])||(f=this.g[Qe]=[],this.h++);const Ft=bt(f,R,ce,Ge);return Ft>-1?(R=f[Ft],$||(R.fa=!1)):((R=new we(R,this.src,Qe,!!ce,Ge)).fa=$,f.push(R)),R};var xt="closure_lm_"+(1e6*Math.random()|0),Ut={};function _t(f,R,$,ce,Ge){if(ce&&ce.once)return Xe(f,R,$,ce,Ge);if(Array.isArray(R)){for(let Qe=0;Qe<R.length;Qe++)_t(f,R[Qe],$,ce,Ge);return null}return $=ar($),f&&f[be]?f.J(R,$,s(ce)?!!ce.capture:!!ce,Ge):Me(f,R,$,!1,ce,Ge)}function Me(f,R,$,ce,Ge,Qe){if(!R)throw Error("Invalid event type");const Ft=s(Ge)?!!Ge.capture:!!Ge;let kr=gr(f);if(kr||(f[xt]=kr=new mt(f)),($=kr.add(R,$,ce,Ft,Qe)).proxy)return $;if(ce=function $e(){const R=Mr;return function f($){return R.call(f.src,f.listener,$)}}(),$.proxy=ce,ce.src=f,ce.listener=$,f.addEventListener)K||(Ge=Ft),void 0===Ge&&(Ge=!1),f.addEventListener(R.toString(),ce,Ge);else if(f.attachEvent)f.attachEvent(er(R.toString()),ce);else{if(!f.addListener||!f.removeListener)throw Error("addEventListener and attachEvent are unavailable.");f.addListener(ce)}return $}function Xe(f,R,$,ce,Ge){if(Array.isArray(R)){for(let Qe=0;Qe<R.length;Qe++)Xe(f,R[Qe],$,ce,Ge);return null}return $=ar($),f&&f[be]?f.K(R,$,s(ce)?!!ce.capture:!!ce,Ge):Me(f,R,$,!0,ce,Ge)}function dt(f,R,$,ce,Ge){if(Array.isArray(R))for(var Qe=0;Qe<R.length;Qe++)dt(f,R[Qe],$,ce,Ge);else ce=s(ce)?!!ce.capture:!!ce,$=ar($),f&&f[be]?(f=f.i,(Qe=String(R).toString())in f.g&&($=bt(R=f.g[Qe],$,ce,Ge))>-1&&(Re(R[$]),Array.prototype.splice.call(R,$,1),0==R.length&&(delete f.g[Qe],f.h--))):f&&(f=gr(f))&&(R=f.g[R.toString()],f=-1,R&&(f=bt(R,$,ce,Ge)),($=f>-1?R[f]:null)&&Lt($))}function Lt(f){if("number"!=typeof f&&f&&!f.da){var R=f.src;if(R&&R[be])at(R.i,f);else{var $=f.type,ce=f.proxy;R.removeEventListener?R.removeEventListener($,ce,f.capture):R.detachEvent?R.detachEvent(er($),ce):R.addListener&&R.removeListener&&R.removeListener(ce),($=gr(R))?(at($,f),0==$.h&&($.src=null,R[xt]=null)):Re(f)}}}function er(f){return f in Ut?Ut[f]:Ut[f]="on"+f}function Mr(f,R){if(f.da)f=!0;else{R=new me(R,this);const $=f.listener,ce=f.ha||f.src;f.fa&&Lt(f),f=$.call(ce,R)}return f}function gr(f){return(f=f[xt])instanceof mt?f:null}var lr="__closure_events_fn_"+(1e9*Math.random()>>>0);function ar(f){return"function"==typeof f?f:(f[lr]||(f[lr]=function(R){return f.handleEvent(R)}),f[lr])}function Ct(){q.call(this),this.i=new mt(this),this.M=this,this.G=null}function Gt(f,R){var $,ce=f.G;if(ce)for($=[];ce;ce=ce.G)$.push(ce);if(f=f.M,ce=R.type||R,"string"==typeof R)R=new z(R,f);else if(R instanceof z)R.target=R.target||f;else{var Ge=R;lt(R=new z(ce,f),Ge)}let Qe,Ft;if(Ge=!0,$)for(Ft=$.length-1;Ft>=0;Ft--)Qe=R.g=$[Ft],Ge=tr(Qe,ce,!0,R)&&Ge;if(Qe=R.g=f,Ge=tr(Qe,ce,!0,R)&&Ge,Ge=tr(Qe,ce,!1,R)&&Ge,$)for(Ft=0;Ft<$.length;Ft++)Qe=R.g=$[Ft],Ge=tr(Qe,ce,!1,R)&&Ge}function tr(f,R,$,ce){if(!(R=f.i.g[String(R)]))return!0;R=R.concat();let Ge=!0;for(let Qe=0;Qe<R.length;++Qe){const Ft=R[Qe];if(Ft&&!Ft.da&&Ft.capture==$){const kr=Ft.listener,oi=Ft.ha||Ft.src;Ft.fa&&at(f.i,Ft),Ge=!1!==kr.call(oi,ce)&&Ge}}return Ge&&!ce.defaultPrevented}function ir(f){f.g=function vr(f,R){if("function"!=typeof f){if(!f||"function"!=typeof f.handleEvent)throw Error("Invalid listener argument");f=u(f.handleEvent,f)}return Number(R)>2147483647?-1:a.setTimeout(f,R||0)}(()=>{f.g=null,f.i&&(f.i=!1,ir(f))},f.l);const R=f.h;f.h=null,f.m.apply(null,R)}h(Ct,q),Ct.prototype[be]=!0,Ct.prototype.removeEventListener=function(f,R,$,ce){dt(this,f,R,$,ce)},Ct.prototype.N=function(){if(Ct.Z.N.call(this),this.i){var f=this.i;for(const R in f.g){const $=f.g[R];for(let ce=0;ce<$.length;ce++)Re($[ce]);delete f.g[R],f.h--}}this.G=null},Ct.prototype.J=function(f,R,$,ce){return this.i.add(String(f),R,!1,$,ce)},Ct.prototype.K=function(f,R,$,ce){return this.i.add(String(f),R,!0,$,ce)};class xr extends q{constructor(R,$){super(),this.m=R,this.l=$,this.h=null,this.i=!1,this.g=null}j(R){this.h=arguments,this.g?this.i=!0:ir(this)}N(){super.N(),this.g&&(a.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Cr(f){q.call(this),this.h=f,this.g={}}h(Cr,q);var Gr=[];function qr(f){je(f.g,function(R,$){this.g.hasOwnProperty($)&&Lt(R)},f),f.g={}}Cr.prototype.N=function(){Cr.Z.N.call(this),qr(this)},Cr.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Vr=a.JSON.stringify,mr=a.JSON.parse,Kt=class{stringify(f){return a.JSON.stringify(f,void 0)}parse(f){return a.JSON.parse(f,void 0)}};function ut(){}function ue(){}var He={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function rt(){z.call(this,"d")}function nt(){z.call(this,"c")}h(rt,z),h(nt,z);var ot={},Ht=null;function Et(){return Ht=Ht||new Ct}function Qt(f){z.call(this,ot.Ia,f)}function jt(f){const R=Et();Gt(R,new Qt(R))}function ur(f,R){z.call(this,ot.STAT_EVENT,f),this.stat=R}function hr(f){const R=Et();Gt(R,new ur(R,f))}function _r(f,R){z.call(this,ot.Ja,f),this.size=R}function Yt(f,R){if("function"!=typeof f)throw Error("Fn must not be null and must be a function");return a.setTimeout(function(){f()},R)}function br(){this.g=!0}function Zr(f,R,$,ce){f.info(function(){return"XMLHTTP TEXT ("+R+"): "+function On(f,R){if(!f.g)return R;if(!R)return null;try{const Qe=JSON.parse(R);if(Qe)for(f=0;f<Qe.length;f++)if(Array.isArray(Qe[f])){var $=Qe[f];if(!($.length<2)){var ce=$[1];if(Array.isArray(ce)&&!(ce.length<1)){var Ge=ce[0];if("noop"!=Ge&&"stop"!=Ge&&"close"!=Ge)for(let Ft=1;Ft<ce.length;Ft++)ce[Ft]=""}}}return Vr(Qe)}catch{return R}}(f,$)+(ce?" "+ce:"")})}ot.Ia="serverreachability",h(Qt,z),ot.STAT_EVENT="statevent",h(ur,z),ot.Ja="timingevent",h(_r,z),br.prototype.ua=function(){this.g=!1},br.prototype.info=function(){};var Xn,An={NO_ERROR:0,cb:1,qb:2,pb:3,kb:4,ob:5,rb:6,Ga:7,TIMEOUT:8,ub:9},Ln={ib:"complete",Fb:"success",ERROR:"error",Ga:"abort",xb:"ready",yb:"readystatechange",TIMEOUT:"timeout",sb:"incrementaldata",wb:"progress",lb:"downloadprogress",Nb:"uploadprogress"};function So(){}function dn(f){return encodeURIComponent(String(f))}function Go(f){var R=1;f=f.split(":");const $=[];for(;R>0&&f.length;)$.push(f.shift()),R--;return f.length&&$.push(f.join(":")),$}function gi(f,R,$,ce){this.j=f,this.i=R,this.l=$,this.S=ce||1,this.V=new Cr(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new La}function La(){this.i=null,this.g="",this.h=!1}h(So,ut),So.prototype.g=function(){return new XMLHttpRequest},Xn=new So;var Rl={},qo={};function mi(f,R,$){f.M=1,f.A=mg(Gi(R)),f.u=$,f.R=!0,ii(f,null)}function ii(f,R){f.F=Date.now(),Sl(f),f.B=Gi(f.A);var $=f.B,ce=f.S;Array.isArray(ce)||(ce=[String(ce)]),zD($.i,"t",ce),f.C=0,$=f.j.L,f.h=new La,f.g=o2(f.j,$?R:null,!f.u),f.P>0&&(f.O=new xr(u(f.Y,f,f.g),f.P)),R=f.V,$=f.g,ce=f.ba;var Ge="readystatechange";Array.isArray(Ge)||(Ge&&(Gr[0]=Ge.toString()),Ge=Gr);for(let Qe=0;Qe<Ge.length;Qe++){const Ft=_t($,Ge[Qe],ce||R.handleEvent,!1,R.h||R);if(!Ft)break;R.g[Ft.key]=Ft}R=f.J?Pe(f.J):{},f.u?(f.v||(f.v="POST"),R["Content-Type"]="application/x-www-form-urlencoded",f.g.ea(f.B,f.v,f.u,R)):(f.v="GET",f.g.ea(f.B,f.v,null,R)),jt(),function Pr(f,R,$,ce,Ge,Qe){f.info(function(){if(f.g)if(Qe){var Ft="",kr=Qe.split("&");for(let ln=0;ln<kr.length;ln++){var oi=kr[ln].split("=");if(oi.length>1){const vi=oi[0];oi=oi[1];const la=vi.split("_");Ft=la.length>=2&&"type"==la[1]?Ft+(vi+"=")+oi+"&":Ft+(vi+"=redacted&")}}}else Ft=null;else Ft=Qe;return"XMLHTTP REQ ("+ce+") [attempt "+Ge+"]: "+R+"\n"+$+"\n"+Ft})}(f.i,f.v,f.B,f.l,f.S,f.u)}function Ss(f){return!!f.g&&"GET"==f.v&&2!=f.M&&f.j.Aa}function ao(f,R){var $=f.C,ce=R.indexOf("\n",$);return-1==ce?qo:($=Number(R.substring($,ce)),isNaN($)?Rl:(ce+=1)+$>R.length?qo:(R=R.slice(ce,ce+$),f.C=ce+$,R))}function Sl(f){f.T=Date.now()+f.H,dg(f,f.H)}function dg(f,R){if(null!=f.D)throw Error("WatchDog timer not null");f.D=Yt(u(f.aa,f),R)}function dd(f){f.D&&(a.clearTimeout(f.D),f.D=null)}function Cl(f){0==f.j.I||f.K||t2(f.j,f)}function Ma(f){dd(f);var R=f.O;R&&"function"==typeof R.dispose&&R.dispose(),f.O=null,qr(f.V),f.g&&(R=f.g,f.g=null,R.abort(),R.dispose())}function fd(f,R){try{var $=f.j;if(0!=$.I&&($.g==f||Ps($.h,f)))if(!f.L&&Ps($.h,f)&&3==$.I){try{var ce=$.Ba.g.parse(R)}catch{ce=null}if(Array.isArray(ce)&&3==ce.length){var Ge=ce;if(0==Ge[0]){e:if(!$.v){if($.g){if(!($.g.F+3e3<f.F))break e;Eg($),_g($)}DE($),hr(18)}}else $.xa=Ge[1],0<$.xa-$.K&&Ge[2]<37500&&$.F&&0==$.A&&!$.C&&($.C=Yt(u($.Va,$),6e3));tc($.h)<=1&&$.ta&&($.ta=void 0)}else Dl($,11)}else if((f.L||$.g==f)&&Eg($),!B(R))for(Ge=$.Ba.g.parse(R),R=0;R<Ge.length;R++){let ln=Ge[R];const vi=ln[0];if(!(vi<=$.K))if($.K=vi,ln=ln[1],2==$.I)if("c"==ln[0]){$.M=ln[1],$.ba=ln[2];const la=ln[3];null!=la&&($.ka=la,$.j.info("VER="+$.ka));const Nl=ln[4];null!=Nl&&($.za=Nl,$.j.info("SVER="+$.za));const Ns=ln[5];null!=Ns&&"number"==typeof Ns&&Ns>0&&($.O=ce=1.5*Ns,$.j.info("backChannelRequestTimeoutMs_="+ce)),ce=$;const Os=f.g;if(Os){const Ig=Os.g?Os.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(Ig){var Qe=ce.h;Qe.g||-1==Ig.indexOf("spdy")&&-1==Ig.indexOf("quic")&&-1==Ig.indexOf("h2")||(Qe.j=Qe.l,Qe.g=new Set,Qe.h&&(rc(Qe,Qe.h),Qe.h=null))}if(ce.G){const OE=Os.g?Os.g.getResponseHeader("X-HTTP-Session-Id"):null;OE&&(ce.wa=OE,sn(ce.J,ce.G,OE))}}$.I=3,$.l&&$.l.ra(),$.aa&&($.T=Date.now()-f.F,$.j.info("Handshake RTT: "+$.T+"ms"));var Ft=f;if((ce=$).na=i2(ce,ce.L?ce.ba:null,ce.W),Ft.L){pd(ce.h,Ft);var kr=Ft,oi=ce.O;oi&&(kr.H=oi),kr.D&&(dd(kr),Sl(kr)),ce.g=Ft}else ZD(ce);$.i.length>0&&bg($)}else"stop"!=ln[0]&&"close"!=ln[0]||Dl($,7);else 3==$.I&&("stop"==ln[0]||"close"==ln[0]?"stop"==ln[0]?Dl($,7):kE($):"noop"!=ln[0]&&$.l&&$.l.qa(ln),$.A=0)}jt()}catch{}}gi.prototype.ba=function(f){f=f.target;const R=this.O;R&&3==Ds(f)?R.j():this.Y(f)},gi.prototype.Y=function(f){try{if(f==this.g)e:{const kr=Ds(this.g),oi=this.g.ya();if(this.g.ca(),!(kr<3)&&(3!=kr||this.g&&(this.h.h||this.g.la()||KD(this.g)))){this.K||4!=kr||7==oi||jt(),dd(this);var R=this.g.ca();this.X=R;var $=function zi(f){if(!Ss(f))return f.g.la();const R=KD(f.g);if(""===R)return"";let $="";const ce=R.length,Ge=4==Ds(f.g);if(!f.h.i){if(typeof TextDecoder>"u")return Ma(f),Cl(f),"";f.h.i=new a.TextDecoder}for(let Qe=0;Qe<ce;Qe++)f.h.h=!0,$+=f.h.i.decode(R[Qe],{stream:!(Ge&&Qe==ce-1)});return R.length=0,f.h.g+=$,f.C=0,f.h.g}(this);if(this.o=200==R,function zn(f,R,$,ce,Ge,Qe,Ft){f.info(function(){return"XMLHTTP RESP ("+ce+") [ attempt "+Ge+"]: "+R+"\n"+$+"\n"+Qe+" "+Ft})}(this.i,this.v,this.B,this.l,this.S,kr,R),this.o){if(this.U&&!this.L){t:{if(this.g){var ce,Ge=this.g;if((ce=Ge.g?Ge.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!B(ce)){var Qe=ce;break t}}Qe=null}if(!(f=Qe)){this.o=!1,this.m=3,hr(12),Ma(this),Cl(this);break e}Zr(this.i,this.l,f,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,fd(this,f)}if(this.R){let vi;for(f=!0;!this.K&&this.C<$.length;){if(vi=ao(this,$),vi==qo){4==kr&&(this.m=4,hr(14),f=!1),Zr(this.i,this.l,null,"[Incomplete Response]");break}if(vi==Rl){this.m=4,hr(15),Zr(this.i,this.l,$,"[Invalid Chunk]"),f=!1;break}Zr(this.i,this.l,vi,null),fd(this,vi)}if(Ss(this)&&0!=this.C&&(this.h.g=this.h.g.slice(this.C),this.C=0),4!=kr||0!=$.length||this.h.h||(this.m=1,hr(16),f=!1),this.o=this.o&&f,f){if($.length>0&&!this.W){this.W=!0;var Ft=this.j;Ft.g==this&&Ft.aa&&!Ft.P&&(Ft.j.info("Great, no buffering proxy detected. Bytes received: "+$.length),NE(Ft),Ft.P=!0,hr(11))}}else Zr(this.i,this.l,$,"[Invalid Chunked Response]"),Ma(this),Cl(this)}else Zr(this.i,this.l,$,null),fd(this,$);4==kr&&Ma(this),this.o&&!this.K&&(4==kr?t2(this.j,this):(this.o=!1,Sl(this)))}else(function UH(f){const R={};f=(f.g&&Ds(f)>=2&&f.g.getAllResponseHeaders()||"").split("\r\n");for(let ce=0;ce<f.length;ce++){if(B(f[ce]))continue;var $=Go(f[ce]);const Ge=$[0];if("string"!=typeof($=$[1]))continue;$=$.trim();const Qe=R[Ge]||[];R[Ge]=Qe,Qe.push($)}!function We(f,R){for(const $ in f)R.call(void 0,f[$],$,f)}(R,function(ce){return ce.join(", ")})})(this.g),400==R&&$.indexOf("Unknown SID")>0?(this.m=3,hr(12)):(this.m=0,hr(13)),Ma(this),Cl(this)}}}catch{}},gi.prototype.cancel=function(){this.K=!0,Ma(this)},gi.prototype.aa=function(){this.D=null;const f=Date.now();f-this.T>=0?(function Ai(f,R){f.info(function(){return"TIMEOUT: "+R})}(this.i,this.B),2!=this.M&&(jt(),hr(17)),Ma(this),this.m=2,Cl(this)):dg(this,this.T-f)};var CE=class{constructor(f,R){this.g=f,this.map=R}};function fg(f){this.l=f||10,f=a.PerformanceNavigationTiming?(f=a.performance.getEntriesByType("navigation")).length>0&&("hq"==f[0].nextHopProtocol||"h2"==f[0].nextHopProtocol):!!(a.chrome&&a.chrome.loadTimes&&a.chrome.loadTimes()&&a.chrome.loadTimes().wasFetchedViaSpdy),this.j=f?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function Cs(f){return!!f.h||!!f.g&&f.g.size>=f.j}function tc(f){return f.h?1:f.g?f.g.size:0}function Ps(f,R){return f.h?f.h==R:!!f.g&&f.g.has(R)}function rc(f,R){f.g?f.g.add(R):f.h=R}function pd(f,R){f.h&&f.h==R?f.h=null:f.g&&f.g.has(R)&&f.g.delete(R)}function pg(f){if(null!=f.h)return f.i.concat(f.h.G);if(null!=f.g&&0!==f.g.size){let R=f.i;for(const $ of f.g.values())R=R.concat($.G);return R}return p(f.i)}fg.prototype.cancel=function(){if(this.i=pg(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const f of this.g.values())f.cancel();this.g.clear()}};var so=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function jo(f){let R;this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1,f instanceof jo?(this.l=f.l,Ri(this,f.j),this.o=f.o,this.g=f.g,Pl(this,f.u),this.h=f.h,gg(this,GD(f.i)),this.m=f.m):f&&(R=String(f).match(so))?(this.l=!1,Ri(this,R[1]||"",!0),this.o=md(R[2]||""),this.g=md(R[3]||"",!0),Pl(this,R[4]),this.h=md(R[5]||"",!0),gg(this,R[6]||"",!0),this.m=md(R[7]||"")):(this.l=!1,this.i=new yd(null,this.l))}function Gi(f){return new jo(f)}function Ri(f,R,$){f.j=$?md(R,!0):R,f.j&&(f.j=f.j.replace(/:$/,""))}function Pl(f,R){if(R){if(R=Number(R),isNaN(R)||R<0)throw Error("Bad port number "+R);f.u=R}else f.u=null}function gg(f,R,$){R instanceof yd?(f.i=R,function OH(f,R){R&&!f.j&&(kl(f),f.i=null,f.g.forEach(function($,ce){const Ge=ce.toLowerCase();ce!=Ge&&(VD(this,ce),zD(this,Ge,$))},f)),f.j=R}(f.i,f.l)):($||(R=vd(R,DH)),f.i=new yd(R,f.l))}function sn(f,R,$){f.i.set(R,$)}function mg(f){return sn(f,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),f}function md(f,R){return f?R?decodeURI(f.replace(/%25/g,"%2525")):decodeURIComponent(f):""}function vd(f,R,$){return"string"==typeof f?(f=encodeURI(f).replace(R,CH),$&&(f=f.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),f):null}function CH(f){return"%"+((f=f.charCodeAt(0))>>4&15).toString(16)+(15&f).toString(16)}jo.prototype.toString=function(){const f=[];var R=this.j;R&&f.push(vd(R,FD,!0),":");var $=this.g;return($||"file"==R)&&(f.push("//"),(R=this.o)&&f.push(vd(R,FD,!0),"@"),f.push(dn($).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=($=this.u)&&f.push(":",String($))),($=this.h)&&(this.g&&"/"!=$.charAt(0)&&f.push("/"),f.push(vd($,"/"==$.charAt(0)?kH:PH,!0))),($=this.i.toString())&&f.push("?",$),($=this.m)&&f.push("#",vd($,NH)),f.join("")},jo.prototype.resolve=function(f){const R=Gi(this);let $=!!f.j;$?Ri(R,f.j):$=!!f.o,$?R.o=f.o:$=!!f.g,$?R.g=f.g:$=null!=f.u;var ce=f.h;if($)Pl(R,f.u);else if($=!!f.h){if("/"!=ce.charAt(0))if(this.g&&!this.h)ce="/"+ce;else{var Ge=R.h.lastIndexOf("/");-1!=Ge&&(ce=R.h.slice(0,Ge+1)+ce)}if(".."==(Ge=ce)||"."==Ge)ce="";else if(-1!=Ge.indexOf("./")||-1!=Ge.indexOf("/.")){ce=0==Ge.lastIndexOf("/",0),Ge=Ge.split("/");const Qe=[];for(let Ft=0;Ft<Ge.length;){const kr=Ge[Ft++];"."==kr?ce&&Ft==Ge.length&&Qe.push(""):".."==kr?((Qe.length>1||1==Qe.length&&""!=Qe[0])&&Qe.pop(),ce&&Ft==Ge.length&&Qe.push("")):(Qe.push(kr),ce=!0)}ce=Qe.join("/")}else ce=Ge}return $?R.h=ce:$=""!==f.i.toString(),$?gg(R,GD(f.i)):$=!!f.m,$&&(R.m=f.m),R};var FD=/[#\/\?@]/g,PH=/[#\?:]/g,kH=/[#\?]/g,DH=/[#\?@]/g,NH=/#/g;function yd(f,R){this.h=this.g=null,this.i=f||null,this.j=!!R}function kl(f){f.g||(f.g=new Map,f.h=0,f.i&&function gd(f,R){if(f){f=f.split("&");for(let $=0;$<f.length;$++){const ce=f[$].indexOf("=");let Ge,Qe=null;ce>=0?(Ge=f[$].substring(0,ce),Qe=f[$].substring(ce+1)):Ge=f[$],R(Ge,Qe?decodeURIComponent(Qe.replace(/\+/g," ")):"")}}}(f.i,function(R,$){f.add(decodeURIComponent(R.replace(/\+/g," ")),$)}))}function VD(f,R){kl(f),R=nc(f,R),f.g.has(R)&&(f.i=null,f.h-=f.g.get(R).length,f.g.delete(R))}function BD(f,R){return kl(f),R=nc(f,R),f.g.has(R)}function UD(f,R){kl(f);let $=[];if("string"==typeof R)BD(f,R)&&($=$.concat(f.g.get(nc(f,R))));else for(f=Array.from(f.g.values()),R=0;R<f.length;R++)$=$.concat(f[R]);return $}function zD(f,R,$){VD(f,R),$.length>0&&(f.i=null,f.g.set(nc(f,R),p($)),f.h+=$.length)}function GD(f){const R=new yd;return R.i=f.i,f.g&&(R.g=new Map(f.g),R.h=f.h),R}function nc(f,R){return R=String(R),f.j&&(R=R.toLowerCase()),R}function ks(f,R,$,ce,Ge){try{Ge&&(Ge.onload=null,Ge.onerror=null,Ge.onabort=null,Ge.ontimeout=null),ce($)}catch{}}function FH(){this.g=new Kt}function vg(f){this.i=f.Sb||null,this.h=f.ab||!1}function yg(f,R){Ct.call(this),this.H=f,this.o=R,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}function qD(f){f.j.read().then(f.Ma.bind(f)).catch(f.ga.bind(f))}function wd(f){f.readyState=4,f.l=null,f.j=null,f.B=null,_d(f)}function _d(f){f.onreadystatechange&&f.onreadystatechange.call(f)}function jD(f){let R="";return je(f,function($,ce){R+=ce,R+=":",R+=$,R+="\r\n"}),R}function PE(f,R,$){e:{for(ce in $){var ce=!1;break e}ce=!0}ce||($=jD($),"string"==typeof f?null!=$&&dn($):sn(f,R,$))}function Mn(f){Ct.call(this),this.headers=new Map,this.L=f||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}(r=yd.prototype).add=function(f,R){kl(this),this.i=null,f=nc(this,f);let $=this.g.get(f);return $||this.g.set(f,$=[]),$.push(R),this.h+=1,this},r.forEach=function(f,R){kl(this),this.g.forEach(function($,ce){$.forEach(function(Ge){f.call(R,Ge,ce,this)},this)},this)},r.set=function(f,R){return kl(this),this.i=null,BD(this,f=nc(this,f))&&(this.h-=this.g.get(f).length),this.g.set(f,[R]),this.h+=1,this},r.get=function(f,R){return f&&(f=UD(this,f)).length>0?String(f[0]):R},r.toString=function(){if(this.i)return this.i;if(!this.g)return"";const f=[],R=Array.from(this.g.keys());for(let ce=0;ce<R.length;ce++){var $=R[ce];const Ge=dn($);$=UD(this,$);for(let Qe=0;Qe<$.length;Qe++){let Ft=Ge;""!==$[Qe]&&(Ft+="="+dn($[Qe])),f.push(Ft)}}return this.i=f.join("&")},h(vg,ut),vg.prototype.g=function(){return new yg(this.i,this.h)},h(yg,Ct),(r=yg.prototype).open=function(f,R){if(0!=this.readyState)throw this.abort(),Error("Error reopening a connection");this.F=f,this.D=R,this.readyState=1,_d(this)},r.send=function(f){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;const R={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};f&&(R.body=f),(this.H||a).fetch(new Request(this.D,R)).then(this.Pa.bind(this),this.ga.bind(this))},r.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&4!=this.readyState&&(this.g=!1,wd(this)),this.readyState=0},r.Pa=function(f){if(this.g&&(this.l=f,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=f.headers,this.readyState=2,_d(this)),this.g&&(this.readyState=3,_d(this),this.g)))if("arraybuffer"===this.responseType)f.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(typeof a.ReadableStream<"u"&&"body"in f){if(this.j=f.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.B=new TextDecoder;qD(this)}else f.text().then(this.Oa.bind(this),this.ga.bind(this))},r.Ma=function(f){if(this.g){if(this.o&&f.value)this.response.push(f.value);else if(!this.o){var R=f.value?f.value:new Uint8Array(0);(R=this.B.decode(R,{stream:!f.done}))&&(this.response=this.responseText+=R)}f.done?wd(this):_d(this),3==this.readyState&&qD(this)}},r.Oa=function(f){this.g&&(this.response=this.responseText=f,wd(this))},r.Na=function(f){this.g&&(this.response=f,wd(this))},r.ga=function(){this.g&&wd(this)},r.setRequestHeader=function(f,R){this.A.append(f,R)},r.getResponseHeader=function(f){return this.h&&this.h.get(f.toLowerCase())||""},r.getAllResponseHeaders=function(){if(!this.h)return"";const f=[],R=this.h.entries();for(var $=R.next();!$.done;)f.push(($=$.value)[0]+": "+$[1]),$=R.next();return f.join("\r\n")},Object.defineProperty(yg.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(f){this.m=f?"include":"same-origin"}}),h(Mn,Ct);var VH=/^https?$/i,BH=["POST","PUT"];function HD(f,R){f.h=!1,f.g&&(f.j=!0,f.g.abort(),f.j=!1),f.l=R,f.o=5,$D(f),wg(f)}function $D(f){f.A||(f.A=!0,Gt(f,"complete"),Gt(f,"error"))}function WD(f){if(f.h&&typeof o<"u")if(f.v&&4==Ds(f))setTimeout(f.Ca.bind(f),0);else if(Gt(f,"readystatechange"),4==Ds(f)){f.h=!1;try{const Qe=f.ca();e:switch(Qe){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var R=!0;break e;default:R=!1}var $;if(!($=R)){var ce;if(ce=0===Qe){let Ft=String(f.D).match(so)[1]||null;!Ft&&a.self&&a.self.location&&(Ft=a.self.location.protocol.slice(0,-1)),ce=!VH.test(Ft?Ft.toLowerCase():"")}$=ce}if($)Gt(f,"complete"),Gt(f,"success");else{f.o=6;try{var Ge=Ds(f)>2?f.g.statusText:""}catch{Ge=""}f.l=Ge+" ["+f.ca()+"]",$D(f)}}finally{wg(f)}}}function wg(f,R){if(f.g){f.m&&(clearTimeout(f.m),f.m=null);const $=f.g;f.g=null,R||Gt(f,"ready");try{$.onreadystatechange=null}catch{}}}function Ds(f){return f.g?f.g.readyState:0}function KD(f){try{if(!f.g)return null;if("response"in f.g)return f.g.response;switch(f.F){case"":case"text":return f.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in f.g)return f.g.mozResponseArrayBuffer}return null}catch{return null}}function bd(f,R,$){return $&&$.internalChannelParams&&$.internalChannelParams[f]||R}function XD(f){this.za=0,this.i=[],this.j=new br,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=bd("failFast",!1,f),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=bd("baseRetryDelayMs",5e3,f),this.Za=bd("retryDelaySeedMs",1e4,f),this.Ta=bd("forwardChannelMaxRetries",2,f),this.va=bd("forwardChannelRequestTimeoutMs",2e4,f),this.ma=f&&f.xmlHttpFactory||void 0,this.Ua=f&&f.Rb||void 0,this.Aa=f&&f.useFetchStreams||!1,this.O=void 0,this.L=f&&f.supportsCrossDomainXhr||!1,this.M="",this.h=new fg(f&&f.concurrentRequestLimit),this.Ba=new FH,this.S=f&&f.fastHandshake||!1,this.R=f&&f.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=f&&f.Pb||!1,f&&f.ua&&this.j.ua(),f&&f.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&f&&f.detectBufferingProxy||!1,this.ia=void 0,f&&f.longPollingTimeout&&f.longPollingTimeout>0&&(this.ia=f.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}function kE(f){if(YD(f),3==f.I){var R=f.V++,$=Gi(f.J);if(sn($,"SID",f.M),sn($,"RID",R),sn($,"TYPE","terminate"),Ed(f,$),(R=new gi(f,f.j,R)).M=2,R.A=mg(Gi($)),$=!1,a.navigator&&a.navigator.sendBeacon)try{$=a.navigator.sendBeacon(R.A.toString(),"")}catch{}!$&&a.Image&&((new Image).src=R.A,$=!0),$||(R.g=o2(R.j,null),R.g.ea(R.A)),R.F=Date.now(),Sl(R)}n2(f)}function _g(f){f.g&&(NE(f),f.g.cancel(),f.g=null)}function YD(f){_g(f),f.v&&(a.clearTimeout(f.v),f.v=null),Eg(f),f.h.cancel(),f.m&&("number"==typeof f.m&&a.clearTimeout(f.m),f.m=null)}function bg(f){if(!Cs(f.h)&&!f.m){f.m=!0;var R=f.Ea;ne||C(),re||(ne(),re=!0),A.add(R,f),f.D=0}}function QD(f,R){var $;$=R?R.l:f.V++;const ce=Gi(f.J);sn(ce,"SID",f.M),sn(ce,"RID",$),sn(ce,"AID",f.K),Ed(f,ce),f.u&&f.o&&PE(ce,f.u,f.o),$=new gi(f,f.j,$,f.D+1),null===f.u&&($.J=f.o),R&&(f.i=R.G.concat(f.i)),R=JD(f,$,1e3),$.H=Math.round(.5*f.va)+Math.round(.5*f.va*Math.random()),rc(f.h,$),mi($,ce,R)}function Ed(f,R){f.H&&je(f.H,function($,ce){sn(R,ce,$)}),f.l&&je({},function($,ce){sn(R,ce,$)})}function JD(f,R,$){$=Math.min(f.i.length,$);const ce=f.l?u(f.l.Ka,f.l,f):null;e:{var Ge=f.i;let kr=-1;for(;;){const oi=["count="+$];-1==kr?$>0?(kr=Ge[0].g,oi.push("ofs="+kr)):kr=0:oi.push("ofs="+kr);let ln=!0;for(let vi=0;vi<$;vi++){var Qe=Ge[vi].g;const la=Ge[vi].map;if((Qe-=kr)<0)kr=Math.max(0,Ge[vi].g-100),ln=!1;else try{Qe="req"+Qe+"_"||0;try{var Ft=la instanceof Map?la:Object.entries(la);for(const[Nl,Ns]of Ft){let Os=Ns;s(Ns)&&(Os=Vr(Ns)),oi.push(Qe+Nl+"="+encodeURIComponent(Os))}}catch(Nl){throw oi.push(Qe+"type="+encodeURIComponent("_badmap")),Nl}}catch{ce&&ce(la)}}if(ln){Ft=oi.join("&");break e}}Ft=void 0}return f=f.i.splice(0,$),R.G=f,Ft}function ZD(f){if(!f.g&&!f.v){f.Y=1;var R=f.Da;ne||C(),re||(ne(),re=!0),A.add(R,f),f.A=0}}function DE(f){return!(f.g||f.v||f.A>=3||(f.Y++,f.v=Yt(u(f.Da,f),r2(f,f.A)),f.A++,0))}function NE(f){null!=f.B&&(a.clearTimeout(f.B),f.B=null)}function e2(f){f.g=new gi(f,f.j,"rpc",f.Y),null===f.u&&(f.g.J=f.o),f.g.P=0;var R=Gi(f.na);sn(R,"RID","rpc"),sn(R,"SID",f.M),sn(R,"AID",f.K),sn(R,"CI",f.F?"0":"1"),!f.F&&f.ia&&sn(R,"TO",f.ia),sn(R,"TYPE","xmlhttp"),Ed(f,R),f.u&&f.o&&PE(R,f.u,f.o),f.O&&(f.g.H=f.O);var $=f.g;f=f.ba,$.M=1,$.A=mg(Gi(R)),$.u=null,$.R=!0,ii($,f)}function Eg(f){null!=f.C&&(a.clearTimeout(f.C),f.C=null)}function t2(f,R){var $=null;if(f.g==R){Eg(f),NE(f),f.g=null;var ce=2}else{if(!Ps(f.h,R))return;$=R.G,pd(f.h,R),ce=1}if(0!=f.I)if(R.o)if(1==ce){$=R.u?R.u.length:0,R=Date.now()-R.F;var Ge=f.D;Gt(ce=Et(),new _r(ce,$)),bg(f)}else ZD(f);else if(3==(Ge=R.m)||0==Ge&&R.X>0||!(1==ce&&function zH(f,R){return!(tc(f.h)>=f.h.j-(f.m?1:0)||(f.m?(f.i=R.G.concat(f.i),0):1==f.I||2==f.I||f.D>=(f.Sa?0:f.Ta)||(f.m=Yt(u(f.Ea,f,R),r2(f,f.D)),f.D++,0)))}(f,R)||2==ce&&DE(f)))switch($&&$.length>0&&(R=f.h,R.i=R.i.concat($)),Ge){case 1:Dl(f,5);break;case 4:Dl(f,10);break;case 3:Dl(f,6);break;default:Dl(f,2)}}function r2(f,R){let $=f.Qa+Math.floor(Math.random()*f.Za);return f.isActive()||($*=2),$*R}function Dl(f,R){if(f.j.info("Error code "+R),2==R){var $=u(f.bb,f),ce=f.Ua;const Ge=!ce;ce=new jo(ce||"//www.google.com/images/cleardot.gif"),a.location&&"http"==a.location.protocol||Ri(ce,"https"),mg(ce),Ge?function LH(f,R){const $=new br;if(a.Image){const ce=new Image;ce.onload=c(ks,$,"TestLoadImage: loaded",!0,R,ce),ce.onerror=c(ks,$,"TestLoadImage: error",!1,R,ce),ce.onabort=c(ks,$,"TestLoadImage: abort",!1,R,ce),ce.ontimeout=c(ks,$,"TestLoadImage: timeout",!1,R,ce),a.setTimeout(function(){ce.ontimeout&&ce.ontimeout()},1e4),ce.src=f}else R(!1)}(ce.toString(),$):function MH(f,R){new br;const ce=new AbortController,Ge=setTimeout(()=>{ce.abort(),ks(0,0,!1,R)},1e4);fetch(f,{signal:ce.signal}).then(Qe=>{clearTimeout(Ge),ks(0,0,!!Qe.ok,R)}).catch(()=>{clearTimeout(Ge),ks(0,0,!1,R)})}(ce.toString(),$)}else hr(2);f.I=0,f.l&&f.l.pa(R),n2(f),YD(f)}function n2(f){if(f.I=0,f.ja=[],f.l){const R=pg(f.h);(0!=R.length||0!=f.i.length)&&(g(f.ja,R),g(f.ja,f.i),f.h.i.length=0,p(f.i),f.i.length=0),f.l.oa()}}function i2(f,R,$){var ce=$ instanceof jo?Gi($):new jo($);if(""!=ce.g)R&&(ce.g=R+"."+ce.g),Pl(ce,ce.u);else{var Ge=a.location;ce=Ge.protocol,R=R?R+"."+Ge.hostname:Ge.hostname,Ge=+Ge.port;const Qe=new jo(null);ce&&Ri(Qe,ce),R&&(Qe.g=R),Ge&&Pl(Qe,Ge),$&&(Qe.h=$),ce=Qe}return R=f.wa,($=f.G)&&R&&sn(ce,$,R),sn(ce,"VER",f.ka),Ed(f,ce),ce}function o2(f,R,$){if(R&&!f.L)throw Error("Can't create secondary domain capable XhrIo object.");return(R=new Mn(f.Aa&&!f.ma?new vg({ab:$}):f.ma)).Fa(f.L),R}function a2(){}function Tg(){}function yo(f,R){Ct.call(this),this.g=new XD(R),this.l=f,this.h=R&&R.messageUrlParams||null,f=R&&R.messageHeaders||null,R&&R.clientProtocolHeaderRequired&&(f?f["X-Client-Protocol"]="webchannel":f={"X-Client-Protocol":"webchannel"}),this.g.o=f,f=R&&R.initMessageHeaders||null,R&&R.messageContentType&&(f?f["X-WebChannel-Content-Type"]=R.messageContentType:f={"X-WebChannel-Content-Type":R.messageContentType}),R&&R.sa&&(f?f["X-WebChannel-Client-Profile"]=R.sa:f={"X-WebChannel-Client-Profile":R.sa}),this.g.U=f,(f=R&&R.Qb)&&!B(f)&&(this.g.u=f),this.A=R&&R.supportsCrossDomainXhr||!1,this.v=R&&R.sendRawJson||!1,(R=R&&R.httpSessionIdParam)&&!B(R)&&(this.g.G=R,null!==(f=this.h)&&R in f&&R in(f=this.h)&&delete f[R]),this.j=new ic(this)}function s2(f){rt.call(this),f.__headers__&&(this.headers=f.__headers__,this.statusCode=f.__status__,delete f.__headers__,delete f.__status__);var R=f.__sm__;if(R){e:{for(const $ in R){f=$;break e}f=void 0}(this.i=f)&&(f=this.i,R=null!==R&&f in R?R[f]:void 0),this.data=R}else this.data=f}function l2(){nt.call(this),this.status=1}function ic(f){this.g=f}(r=Mn.prototype).Fa=function(f){this.H=f},r.ea=function(f,R,$,ce){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+f);R=R?R.toUpperCase():"GET",this.D=f,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():Xn.g(),this.g.onreadystatechange=d(u(this.Ca,this));try{this.B=!0,this.g.open(R,String(f),!0),this.B=!1}catch(Qe){return void HD(this,Qe)}if(f=$||"",$=new Map(this.headers),ce)if(Object.getPrototypeOf(ce)===Object.prototype)for(var Ge in ce)$.set(Ge,ce[Ge]);else{if("function"!=typeof ce.keys||"function"!=typeof ce.get)throw Error("Unknown input type for opt_headers: "+String(ce));for(const Qe of ce.keys())$.set(Qe,ce.get(Qe))}ce=Array.from($.keys()).find(Qe=>"content-type"==Qe.toLowerCase()),Ge=a.FormData&&f instanceof a.FormData,!(Array.prototype.indexOf.call(BH,R,void 0)>=0)||ce||Ge||$.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[Qe,Ft]of $)this.g.setRequestHeader(Qe,Ft);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(f),this.v=!1}catch(Qe){HD(this,Qe)}},r.abort=function(f){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=f||7,Gt(this,"complete"),Gt(this,"abort"),wg(this))},r.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),wg(this,!0)),Mn.Z.N.call(this)},r.Ca=function(){this.u||(this.B||this.v||this.j?WD(this):this.Xa())},r.Xa=function(){WD(this)},r.isActive=function(){return!!this.g},r.ca=function(){try{return Ds(this)>2?this.g.status:-1}catch{return-1}},r.la=function(){try{return this.g?this.g.responseText:""}catch{return""}},r.La=function(f){if(this.g){var R=this.g.responseText;return f&&0==R.indexOf(f)&&(R=R.substring(f.length)),mr(R)}},r.ya=function(){return this.o},r.Ha=function(){return"string"==typeof this.l?this.l:String(this.l)},(r=XD.prototype).ka=8,r.I=1,r.connect=function(f,R,$,ce){hr(0),this.W=f,this.H=R||{},$&&void 0!==ce&&(this.H.OSID=$,this.H.OAID=ce),this.F=this.X,this.J=i2(this,null,this.W),bg(this)},r.Ea=function(f){if(this.m)if(this.m=null,1==this.I){if(!f){this.V=Math.floor(1e5*Math.random()),f=this.V++;const Ge=new gi(this,this.j,f);let Qe=this.o;if(this.U&&(Qe?(Qe=Pe(Qe),lt(Qe,this.U)):Qe=this.U),null!==this.u||this.R||(Ge.J=Qe,Qe=null),this.S)e:{for(var R=0,$=0;$<this.i.length;$++){var ce=this.i[$];if(void 0===(ce="__data__"in ce.map&&"string"==typeof(ce=ce.map.__data__)?ce.length:void 0))break;if((R+=ce)>4096){R=$;break e}if(4096===R||$===this.i.length-1){R=$+1;break e}}R=1e3}else R=1e3;R=JD(this,Ge,R),sn($=Gi(this.J),"RID",f),sn($,"CVER",22),this.G&&sn($,"X-HTTP-Session-Id",this.G),Ed(this,$),Qe&&(this.R?R="headers="+dn(jD(Qe))+"&"+R:this.u&&PE($,this.u,Qe)),rc(this.h,Ge),this.Ra&&sn($,"TYPE","init"),this.S?(sn($,"$req",R),sn($,"SID","null"),Ge.U=!0,mi(Ge,$,null)):mi(Ge,$,R),this.I=2}}else 3==this.I&&(f?QD(this,f):0==this.i.length||Cs(this.h)||QD(this))},r.Da=function(){if(this.v=null,e2(this),this.aa&&!(this.P||null==this.g||this.T<=0)){var f=4*this.T;this.j.info("BP detection timer enabled: "+f),this.B=Yt(u(this.Wa,this),f)}},r.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,hr(10),_g(this),e2(this))},r.Va=function(){null!=this.C&&(this.C=null,_g(this),DE(this),hr(19))},r.bb=function(f){f?(this.j.info("Successfully pinged google.com"),hr(2)):(this.j.info("Failed to ping google.com"),hr(1))},r.isActive=function(){return!!this.l&&this.l.isActive(this)},(r=a2.prototype).ra=function(){},r.qa=function(){},r.pa=function(){},r.oa=function(){},r.isActive=function(){return!0},r.Ka=function(){},Tg.prototype.g=function(f,R){return new yo(f,R)},h(yo,Ct),yo.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},yo.prototype.close=function(){kE(this.g)},yo.prototype.o=function(f){var R=this.g;if("string"==typeof f){var $={};$.__data__=f,f=$}else this.v&&(($={}).__data__=Vr(f),f=$);R.i.push(new CE(R.Ya++,f)),3==R.I&&bg(R)},yo.prototype.N=function(){this.g.l=null,delete this.j,kE(this.g),delete this.g,yo.Z.N.call(this)},h(s2,rt),h(l2,nt),h(ic,a2),ic.prototype.ra=function(){Gt(this.g,"a")},ic.prototype.qa=function(f){Gt(this.g,new s2(f))},ic.prototype.pa=function(f){Gt(this.g,new l2)},ic.prototype.oa=function(){Gt(this.g,"b")},Tg.prototype.createWebChannel=Tg.prototype.g,yo.prototype.send=yo.prototype.o,yo.prototype.open=yo.prototype.m,yo.prototype.close=yo.prototype.close,ha=jr.createWebChannelTransport=function(){return new Tg},Fn=jr.getStatEventTarget=function(){return Et()},Fs=jr.Event=ot,ko=jr.Stat={jb:0,mb:1,nb:2,Hb:3,Mb:4,Jb:5,Kb:6,Ib:7,Gb:8,Lb:9,PROXY:10,NOPROXY:11,Eb:12,Ab:13,Bb:14,zb:15,Cb:16,Db:17,fb:18,eb:19,gb:20},An.NO_ERROR=0,An.TIMEOUT=8,An.HTTP_ERROR=6,ca=jr.ErrorCode=An,Ln.COMPLETE="complete",Ho=jr.EventType=Ln,ue.EventType=He,He.OPEN="a",He.CLOSE="b",He.ERROR="c",He.MESSAGE="d",Ct.prototype.listen=Ct.prototype.J,Ci=jr.WebChannel=ue,jr.FetchXmlHttpFactory=vg,Mn.prototype.listenOnce=Mn.prototype.K,Mn.prototype.getLastError=Mn.prototype.Ha,Mn.prototype.getLastErrorCode=Mn.prototype.ya,Mn.prototype.getStatus=Mn.prototype.ca,Mn.prototype.getResponseJson=Mn.prototype.La,Mn.prototype.getResponseText=Mn.prototype.la,Mn.prototype.send=Mn.prototype.ea,Mn.prototype.setWithCredentials=Mn.prototype.Fa,wo=jr.XhrIo=Mn}).apply(typeof Va<"u"?Va:typeof self<"u"?self:typeof window<"u"?window:{});class ve{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}ve.UNAUTHENTICATED=new ve(null),ve.GOOGLE_CREDENTIALS=new ve("google-credentials-uid"),ve.FIRST_PARTY=new ve("first-party-uid"),ve.MOCK_USER=new ve("mock-user");let Se="12.8.0";const qe=new Gn.Vy("@firebase/firestore");function it(r,...e){if(qe.logLevel<=Gn.$b.DEBUG){const t=e.map(Rn);qe.debug(`Firestore (${Se}): ${r}`,...t)}}function Er(r,...e){if(qe.logLevel<=Gn.$b.ERROR){const t=e.map(Rn);qe.error(`Firestore (${Se}): ${r}`,...t)}}function Br(r,...e){if(qe.logLevel<=Gn.$b.WARN){const t=e.map(Rn);qe.warn(`Firestore (${Se}): ${r}`,...t)}}function Rn(r){if("string"==typeof r)return r;try{return JSON.stringify(r)}catch{return r}}function Tt(r,e,t){let n="Unexpected state";"string"==typeof e?n=e:t=e,cr(r,n,t)}function cr(r,e,t){let n=`FIRESTORE (${Se}) INTERNAL ASSERTION FAILED: ${e} (ID: ${r.toString(16)})`;if(void 0!==t)try{n+=" CONTEXT: "+JSON.stringify(t)}catch{n+=" CONTEXT: "+t}throw Er(n),new Error(n)}function Mt(r,e,t,n){let i="Unexpected state";"string"==typeof t?i=t:n=t,r||cr(e,i,n)}const Be={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class yt extends Xt.g{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class Yr{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class Hi{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class Ba{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(ve.UNAUTHENTICATED))}shutdown(){}}class Le{constructor(e){this.t=e,this.currentUser=ve.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){var n=this;Mt(void 0===this.o,42304);let i=this.i;const o=u=>this.i!==i?(i=this.i,t(u)):Promise.resolve();let a=new Yr;this.o=()=>{this.i++,this.currentUser=this.u(),a.resolve(),a=new Yr,e.enqueueRetryable(()=>o(this.currentUser))};const s=()=>{const u=a;e.enqueueRetryable((0,O.A)(function*(){yield u.promise,yield o(n.currentUser)}))},l=u=>{it("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=u,this.o&&(this.auth.addAuthTokenListener(this.o),s())};this.t.onInit(u=>l(u)),setTimeout(()=>{if(!this.auth){const u=this.t.getImmediate({optional:!0});u?l(u):(it("FirebaseAuthCredentialsProvider","Auth not yet detected"),a.resolve(),a=new Yr)}},0),s()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(n=>this.i!==e?(it("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):n?(Mt("string"==typeof n.accessToken,31837,{l:n}),new Hi(n.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return Mt(null===e||"string"==typeof e,2055,{h:e}),new ve(e)}}class et{constructor(e,t,n){this.P=e,this.T=t,this.I=n,this.type="FirstParty",this.user=ve.FIRST_PARTY,this.R=new Map}A(){return this.I?this.I():null}get headers(){this.R.set("X-Goog-AuthUser",this.P);const e=this.A();return e&&this.R.set("Authorization",e),this.T&&this.R.set("X-Goog-Iam-Authorization-Token",this.T),this.R}}class Vt{constructor(e,t,n){this.P=e,this.T=t,this.I=n}getToken(){return Promise.resolve(new et(this.P,this.T,this.I))}start(e,t){e.enqueueRetryable(()=>t(ve.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class or{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Ir{constructor(e,t){this.V=t,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,(0,T.xZ)(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,t){Mt(void 0===this.o,3512);const n=o=>{null!=o.error&&it("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${o.error.message}`);const a=o.token!==this.m;return this.m=o.token,it("FirebaseAppCheckTokenProvider",`Received ${a?"new":"existing"} token.`),a?t(o.token):Promise.resolve()};this.o=o=>{e.enqueueRetryable(()=>n(o))};const i=o=>{it("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=o,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit(o=>i(o)),setTimeout(()=>{if(!this.appCheck){const o=this.V.getImmediate({optional:!0});o?i(o):it("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){if(this.p)return Promise.resolve(new or(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(t=>t?(Mt("string"==typeof t.token,44558,{tokenResult:t}),this.m=t.token,new or(t.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}function Qn(r){const e=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(r);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(t);else for(let n=0;n<r;n++)t[n]=Math.floor(256*Math.random());return t}class Hr{static newId(){const t=62*Math.floor(4.129032258064516);let n="";for(;n.length<20;){const i=Qn(40);for(let o=0;o<i.length;++o)n.length<20&&i[o]<t&&(n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(i[o]%62))}return n}}function Jt(r,e){return r<e?-1:r>e?1:0}function lc(r){const e=r.charCodeAt(0);return e>=55296&&e<=57343}const Fl="__name__";class _o{constructor(e,t,n){void 0===t?t=0:t>e.length&&Tt(637,{offset:t,range:e.length}),void 0===n?n=e.length-t:n>e.length-t&&Tt(1746,{length:n,range:e.length-t}),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===_o.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof _o?e.forEach(n=>{t.push(n)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return this.construct(this.segments,this.offset+(e=void 0===e?1:e),this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++){const o=_o.compareSegments(e.get(i),t.get(i));if(0!==o)return o}return Jt(e.length,t.length)}static compareSegments(e,t){const n=_o.isNumericId(e),i=_o.isNumericId(t);return n&&!i?-1:!n&&i?1:n&&i?_o.extractNumericId(e).compare(_o.extractNumericId(t)):function uo(r,e){const t=Math.min(r.length,e.length);for(let n=0;n<t;n++){const i=r.charAt(n),o=e.charAt(n);if(i!==o)return lc(i)===lc(o)?Jt(i,o):lc(i)?1:-1}return Jt(r.length,e.length)}(e,t)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return si.fromString(e.substring(4,e.length-2))}}class Rr extends _o{construct(e,t,n){return new Rr(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const t=[];for(const n of e){if(n.indexOf("//")>=0)throw new yt(Be.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter(i=>i.length>0))}return new Rr(t)}static emptyPath(){return new Rr([])}}const Rg=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class en extends _o{construct(e,t,n){return new en(e,t,n)}static isValidIdentifier(e){return Rg.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),en.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&this.get(0)===Fl}static keyField(){return new en([Fl])}static fromServerFormat(e){const t=[];let n="",i=0;const o=()=>{if(0===n.length)throw new yt(Be.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let a=!1;for(;i<e.length;){const s=e[i];if("\\"===s){if(i+1===e.length)throw new yt(Be.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const l=e[i+1];if("\\"!==l&&"."!==l&&"`"!==l)throw new yt(Be.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=l,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(n+=s,i++):(o(),i++)}if(o(),a)throw new yt(Be.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new en(t)}static emptyPath(){return new en([])}}class Ot{constructor(e){this.path=e}static fromPath(e){return new Ot(Rr.fromString(e))}static fromName(e){return new Ot(Rr.fromString(e).popFirst(5))}static empty(){return new Ot(Rr.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===Rr.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return Rr.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Ot(new Rr(e.slice()))}}function En(r,e){const t={typeString:r};return e&&(t.value=e),t}function za(r,e){if(!function Vl(r){return"object"==typeof r&&null!==r&&(Object.getPrototypeOf(r)===Object.prototype||null===Object.getPrototypeOf(r))}(r))throw new yt(Be.INVALID_ARGUMENT,"JSON must be an object");let t;for(const n in e)if(e[n]){const i=e[n].typeString,o="value"in e[n]?{value:e[n].value}:void 0;if(!(n in r)){t=`JSON missing required field: '${n}'`;break}const a=r[n];if(i&&typeof a!==i){t=`JSON field '${n}' must be a ${i}.`;break}if(void 0!==o&&a!==o.value){t=`Expected '${n}' field to equal '${o.value}'`;break}}if(t)throw new yt(Be.INVALID_ARGUMENT,t);return!0}const Id=-62135596800;class Wr{static now(){return Wr.fromMillis(Date.now())}static fromDate(e){return Wr.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),n=Math.floor(1e6*(e-1e3*t));return new Wr(t,n)}constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new yt(Be.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new yt(Be.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<Id)throw new yt(Be.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new yt(Be.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Jt(this.nanoseconds,e.nanoseconds):Jt(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:Wr._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(za(e,Wr._jsonSchema))return new Wr(e.seconds,e.nanoseconds)}valueOf(){return String(this.seconds-Id).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}Wr._jsonSchemaVersion="firestore/timestamp/1.0",Wr._jsonSchema={type:En("string",Wr._jsonSchemaVersion),seconds:En("number"),nanoseconds:En("number")};const gc="mutationQueues",Oo="mutations",ql="documentMutations",mc="remoteDocumentGlobal",jl="targets",Hl="targetDocuments",Hs="targetGlobal",vc="collectionParents",$l="clientMetadata",Od="bundles",Ld="namedQueries";class un{constructor(e,t){this.comparator=e,this.root=t||yi.EMPTY}insert(e,t){return new un(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,yi.BLACK,null,null))}remove(e){return new un(this.comparator,this.root.remove(e,this.comparator).copy(null,null,yi.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){const i=this.comparator(e,n.key);if(0===i)return t+n.left.size;i<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,n)=>(e(t,n),!1))}toString(){const e=[];return this.inorderTraversal((t,n)=>(e.push(`${t}:${n}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Fd(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Fd(this.root,e,this.comparator,!1)}getReverseIterator(){return new Fd(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Fd(this.root,e,this.comparator,!0)}}class Fd{constructor(e,t,n,i){this.isReverse=i,this.nodeStack=[];let o=1;for(;!e.isEmpty();)if(o=t?n(e.key,t):1,t&&i&&(o*=-1),o<0)e=this.isReverse?e.left:e.right;else{if(0===o){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class yi{constructor(e,t,n,i,o){this.key=e,this.value=t,this.color=n??yi.RED,this.left=i??yi.EMPTY,this.right=o??yi.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,i,o){return new yi(e??this.key,t??this.value,n??this.color,i??this.left,o??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let i=this;const o=n(e,i.key);return i=o<0?i.copy(null,null,null,i.left.insert(e,t,n),null):0===o?i.copy(null,t,null,null,null):i.copy(null,null,null,null,i.right.insert(e,t,n)),i.fixUp()}removeMin(){if(this.left.isEmpty())return yi.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,t){let n,i=this;if(t(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,t),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===t(e,i.key)){if(i.right.isEmpty())return yi.EMPTY;n=i.right.min(),i=i.copy(n.key,n.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,t))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,yi.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,yi.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw Tt(43730,{key:this.key,value:this.value});if(this.right.isRed())throw Tt(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw Tt(27949);return e+(this.isRed()?0:1)}}yi.EMPTY=null,yi.RED=!0,yi.BLACK=!1,yi.EMPTY=new class{constructor(){this.size=0}get key(){throw Tt(57766)}get value(){throw Tt(16141)}get color(){throw Tt(16727)}get left(){throw Tt(29726)}get right(){throw Tt(36894)}copy(e,t,n,i,o){return this}insert(e,t,n){return new yi(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class Qr{constructor(e){this.comparator=e,this.data=new un(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,n)=>(e(t),!1))}forEachInRange(e,t){const n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){const i=n.getNext();if(this.comparator(i.key,e[1])>=0)return;t(i.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new QE(this.data.getIterator())}getIteratorFrom(e){return new QE(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach(n=>{t=t.add(n)}),t}isEqual(e){if(!(e instanceof Qr)||this.size!==e.size)return!1;const t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){const i=t.getNext().key,o=n.getNext().key;if(0!==this.comparator(i,o))return!1}return!0}toArray(){const e=[];return this.forEach(t=>{e.push(t)}),e}toString(){const e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){const t=new Qr(this.comparator);return t.data=e,t}}class QE{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class JE extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class Dn{constructor(e){this.binaryString=e}static fromBase64String(e){const t=function(i){try{return atob(i)}catch(o){throw typeof DOMException<"u"&&o instanceof DOMException?new JE("Invalid base64 string: "+o):o}}(e);return new Dn(t)}static fromUint8Array(e){const t=function(i){let o="";for(let a=0;a<i.length;++a)o+=String.fromCharCode(i[a]);return o}(e);return new Dn(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return btoa(this.binaryString)}toUint8Array(){return function(t){const n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Jt(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Dn.EMPTY_BYTE_STRING=new Dn("");const M2=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function wn(r){return"number"==typeof r?r:"string"==typeof r?Number(r):0}const bc="(default)";class $s{constructor(e,t){this.projectId=e,this.database=t||bc}static empty(){return new $s("","")}get isDefaultDatabase(){return this.database===bc}isEqual(e){return e instanceof $s&&e.projectId===this.projectId&&e.database===this.database}}class ma{constructor(e,t=null,n=[],i=[],o=null,a="F",s=null,l=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=i,this.limit=o,this.limitType=a,this.startAt=s,this.endAt=l,this.Ie=null,this.Ee=null,this.Re=null}}var Hn,Fr;new un(Ot.comparator),new un(Ot.comparator),new un(Ot.comparator),new Qr(Ot.comparator),new Qr(Jt),(Fr=Hn||(Hn={}))[Fr.OK=0]="OK",Fr[Fr.CANCELLED=1]="CANCELLED",Fr[Fr.UNKNOWN=2]="UNKNOWN",Fr[Fr.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Fr[Fr.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Fr[Fr.NOT_FOUND=5]="NOT_FOUND",Fr[Fr.ALREADY_EXISTS=6]="ALREADY_EXISTS",Fr[Fr.PERMISSION_DENIED=7]="PERMISSION_DENIED",Fr[Fr.UNAUTHENTICATED=16]="UNAUTHENTICATED",Fr[Fr.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Fr[Fr.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Fr[Fr.ABORTED=10]="ABORTED",Fr[Fr.OUT_OF_RANGE=11]="OUT_OF_RANGE",Fr[Fr.UNIMPLEMENTED=12]="UNIMPLEMENTED",Fr[Fr.INTERNAL=13]="INTERNAL",Fr[Fr.UNAVAILABLE=14]="UNAVAILABLE",Fr[Fr.DATA_LOSS=15]="DATA_LOSS",new si([4294967295,4294967295],0),Error;class el{constructor(){}Dt(e,t){this.Ct(e,t),t.vt()}Ct(e,t){if("nullValue"in e)this.Ft(t,5);else if("booleanValue"in e)this.Ft(t,10),t.Mt(e.booleanValue?1:0);else if("integerValue"in e)this.Ft(t,15),t.Mt(wn(e.integerValue));else if("doubleValue"in e){const n=wn(e.doubleValue);isNaN(n)?this.Ft(t,13):(this.Ft(t,15),function In(r){return 0===r&&1/r==-1/0}(n)?t.Mt(0):t.Mt(n))}else if("timestampValue"in e){let n=e.timestampValue;this.Ft(t,20),"string"==typeof n&&(n=function pa(r){if(Mt(!!r,39018),"string"==typeof r){let e=0;const t=M2.exec(r);if(Mt(!!t,46558,{timestamp:r}),t[1]){let i=t[1];i=(i+"000000000").substr(0,9),e=Number(i)}const n=new Date(r);return{seconds:Math.floor(n.getTime()/1e3),nanos:e}}return{seconds:wn(r.seconds),nanos:wn(r.nanos)}}(n)),t.xt(`${n.seconds||""}`),t.Mt(n.nanos||0)}else if("stringValue"in e)this.Ot(e.stringValue,t),this.Nt(t);else if("bytesValue"in e)this.Ft(t,30),t.Bt(function ga(r){return"string"==typeof r?Dn.fromBase64String(r):Dn.fromUint8Array(r)}(e.bytesValue)),this.Nt(t);else if("referenceValue"in e)this.Lt(e.referenceValue,t);else if("geoPointValue"in e){const n=e.geoPointValue;this.Ft(t,45),t.Mt(n.latitude||0),t.Mt(n.longitude||0)}else"mapValue"in e?function lT(r){return"__max__"===(((r.mapValue||{}).fields||{}).__type__||{}).stringValue}(e)?this.Ft(t,Number.MAX_SAFE_INTEGER):function qd(r){return"__vector__"===(r?.mapValue?.fields||{}).__type__?.stringValue}(e)?this.kt(e.mapValue,t):(this.Kt(e.mapValue,t),this.Nt(t)):"arrayValue"in e?(this.qt(e.arrayValue,t),this.Nt(t)):Tt(19022,{Ut:e})}Ot(e,t){this.Ft(t,25),this.$t(e,t)}$t(e,t){t.xt(e)}Kt(e,t){const n=e.fields||{};this.Ft(t,55);for(const i of Object.keys(n))this.Ot(i,t),this.Ct(n[i],t)}kt(e,t){const n=e.fields||{};this.Ft(t,53);const i="value",o=n[i].arrayValue?.values?.length||0;this.Ft(t,15),t.Mt(wn(o)),this.Ot(i,t),this.Ct(n[i],t)}qt(e,t){const n=e.values||[];this.Ft(t,50);for(const i of n)this.Ct(i,t)}Lt(e,t){this.Ft(t,37),Ot.fromName(e).path.forEach(n=>{this.Ft(t,60),this.$t(n,t)})}Ft(e,t){e.Mt(t)}Nt(e){e.Mt(2)}}el.Wt=new el,new Uint8Array(0);class Oi{static withCacheSize(e){return new Oi(e,Oi.DEFAULT_COLLECTION_PERCENTILE,Oi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}}Oi.DEFAULT_COLLECTION_PERCENTILE=10,Oi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Oi.DEFAULT=new Oi(41943040,Oi.DEFAULT_COLLECTION_PERCENTILE,Oi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Oi.DISABLED=new Oi(-1,0,0);let gf=null;function Dm(){return null===gf?gf=268435456+Math.round(2147483648*Math.random()):gf++,"0x"+gf.toString(16)}const Nm="RestConnection",sO={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery",ExecutePipeline:"executePipeline"};class lO{get Ko(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http",n=encodeURIComponent(this.databaseId.projectId),i=encodeURIComponent(this.databaseId.database);this.qo=t+"://"+e.host,this.Uo=`projects/${n}/databases/${i}`,this.$o=this.databaseId.database===bc?`project_id=${n}`:`project_id=${n}&database_id=${i}`}Wo(e,t,n,i,o){const a=Dm(),s=this.Qo(e,t.toUriEncodedString());it(Nm,`Sending RPC '${e}' ${a}:`,s,n);const l={"google-cloud-resource-prefix":this.Uo,"x-goog-request-params":this.$o};this.Go(l,i,o);const{host:u}=new URL(s),c=(0,Xt.zJ)(u);return this.zo(e,s,l,n,c).then(h=>(it(Nm,`Received RPC '${e}' ${a}: `,h),h),h=>{throw Br(Nm,`RPC '${e}' ${a} failed with error: `,h,"url: ",s,"request:",n),h})}jo(e,t,n,i,o,a){return this.Wo(e,t,n,i,o)}Go(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+Se,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((i,o)=>e[o]=i),n&&n.headers.forEach((i,o)=>e[o]=i)}Qo(e,t){let i=`${this.qo}/v1/${t}:${sO[e]}`;return this.databaseInfo.apiKey&&(i=`${i}?key=${encodeURIComponent(this.databaseInfo.apiKey)}`),i}terminate(){}}class uO{constructor(e){this.Ho=e.Ho,this.Jo=e.Jo}Zo(e){this.Xo=e}Yo(e){this.e_=e}t_(e){this.n_=e}onMessage(e){this.r_=e}close(){this.Jo()}send(e){this.Ho(e)}i_(){this.Xo()}s_(){this.e_()}o_(e){this.n_(e)}__(e){this.r_(e)}}const Li="WebChannelConnection",Wc=(r,e,t)=>{r.listen(e,n=>{try{t(n)}catch(i){setTimeout(()=>{throw i},0)}})};class hu extends lO{constructor(e){super(e),this.a_=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}static u_(){if(!hu.c_){const e=Fn();Wc(e,Fs.STAT_EVENT,t=>{t.stat===ko.PROXY?it(Li,"STAT_EVENT: detected buffering proxy"):t.stat===ko.NOPROXY&&it(Li,"STAT_EVENT: detected no buffering proxy")}),hu.c_=!0}}zo(e,t,n,i,o){const a=Dm();return new Promise((s,l)=>{const u=new wo;u.setWithCredentials(!0),u.listenOnce(Ho.COMPLETE,()=>{try{switch(u.getLastErrorCode()){case ca.NO_ERROR:const h=u.getResponseJson();it(Li,`XHR for RPC '${e}' ${a} received:`,JSON.stringify(h)),s(h);break;case ca.TIMEOUT:it(Li,`RPC '${e}' ${a} timed out`),l(new yt(Be.DEADLINE_EXCEEDED,"Request time out"));break;case ca.HTTP_ERROR:const d=u.getStatus();if(it(Li,`RPC '${e}' ${a} failed with status:`,d,"response text:",u.getResponseText()),d>0){let p=u.getResponseJson();Array.isArray(p)&&(p=p[0]);const g=p?.error;if(g&&g.status&&g.message){const y=function(m){const _=m.toLowerCase().replace(/_/g,"-");return Object.values(Be).indexOf(_)>=0?_:Be.UNKNOWN}(g.status);l(new yt(y,g.message))}else l(new yt(Be.UNKNOWN,"Server responded with status "+u.getStatus()))}else l(new yt(Be.UNAVAILABLE,"Connection failed."));break;default:Tt(9055,{l_:e,streamId:a,h_:u.getLastErrorCode(),P_:u.getLastError()})}}finally{it(Li,`RPC '${e}' ${a} completed.`)}});const c=JSON.stringify(i);it(Li,`RPC '${e}' ${a} sending request:`,i),u.send(t,"POST",c,n,15)})}T_(e,t,n){const i=Dm(),o=[this.qo,"/","google.firestore.v1.Firestore","/",e,"/channel"],a=this.createWebChannelTransport(),s={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;void 0!==l&&(s.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(s.useFetchStreams=!0),this.Go(s.initMessageHeaders,t,n),s.encodeInitMessageHeaders=!0;const u=o.join("");it(Li,`Creating RPC '${e}' stream ${i}: ${u}`,s);const c=a.createWebChannel(u,s);this.I_(c);let h=!1,d=!1;const p=new uO({Ho:g=>{d?it(Li,`Not sending because RPC '${e}' stream ${i} is closed:`,g):(h||(it(Li,`Opening RPC '${e}' stream ${i} transport.`),c.open(),h=!0),it(Li,`RPC '${e}' stream ${i} sending:`,g),c.send(g))},Jo:()=>c.close()});return Wc(c,Ci.EventType.OPEN,()=>{d||(it(Li,`RPC '${e}' stream ${i} transport opened.`),p.i_())}),Wc(c,Ci.EventType.CLOSE,()=>{d||(d=!0,it(Li,`RPC '${e}' stream ${i} transport closed`),p.o_(),this.E_(c))}),Wc(c,Ci.EventType.ERROR,g=>{d||(d=!0,Br(Li,`RPC '${e}' stream ${i} transport errored. Name:`,g.name,"Message:",g.message),p.o_(new yt(Be.UNAVAILABLE,"The operation could not be completed")))}),Wc(c,Ci.EventType.MESSAGE,g=>{if(!d){const y=g.data[0];Mt(!!y,16349);const v=y,m=v?.error||v[0]?.error;if(m){it(Li,`RPC '${e}' stream ${i} received error:`,m);const _=m.status;let I=function(re){const A=Hn[re];if(void 0!==A)return function WT(r){if(void 0===r)return Er("GRPC error has no .code"),Be.UNKNOWN;switch(r){case Hn.OK:return Be.OK;case Hn.CANCELLED:return Be.CANCELLED;case Hn.UNKNOWN:return Be.UNKNOWN;case Hn.DEADLINE_EXCEEDED:return Be.DEADLINE_EXCEEDED;case Hn.RESOURCE_EXHAUSTED:return Be.RESOURCE_EXHAUSTED;case Hn.INTERNAL:return Be.INTERNAL;case Hn.UNAVAILABLE:return Be.UNAVAILABLE;case Hn.UNAUTHENTICATED:return Be.UNAUTHENTICATED;case Hn.INVALID_ARGUMENT:return Be.INVALID_ARGUMENT;case Hn.NOT_FOUND:return Be.NOT_FOUND;case Hn.ALREADY_EXISTS:return Be.ALREADY_EXISTS;case Hn.PERMISSION_DENIED:return Be.PERMISSION_DENIED;case Hn.FAILED_PRECONDITION:return Be.FAILED_PRECONDITION;case Hn.ABORTED:return Be.ABORTED;case Hn.OUT_OF_RANGE:return Be.OUT_OF_RANGE;case Hn.UNIMPLEMENTED:return Be.UNIMPLEMENTED;case Hn.DATA_LOSS:return Be.DATA_LOSS;default:return Tt(39323,{code:r})}}(A)}(_),U=m.message;void 0===I&&(I=Be.INTERNAL,U="Unknown error status: "+_+" with message "+m.message),d=!0,p.o_(new yt(I,U)),c.close()}else it(Li,`RPC '${e}' stream ${i} received:`,y),p.__(y)}}),hu.u_(),setTimeout(()=>{p.s_()},0),p}terminate(){this.a_.forEach(e=>e.close()),this.a_=[]}I_(e){this.a_.push(e)}E_(e){this.a_=this.a_.filter(t=>t===e)}Go(e,t,n){super.Go(e,t,n),this.databaseInfo.apiKey&&(e["x-goog-api-key"]=this.databaseInfo.apiKey)}createWebChannelTransport(){return ha()}}function mf(){return typeof document<"u"?document:null}hu.c_=!1;class Om{constructor(e,t,n=1e3,i=1.5,o=6e4){this.Ci=e,this.timerId=t,this.R_=n,this.A_=i,this.V_=o,this.d_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.d_=0}g_(){this.d_=this.V_}p_(e){this.cancel();const t=Math.floor(this.d_+this.y_()),n=Math.max(0,Date.now()-this.f_),i=Math.max(0,t-n);i>0&&it("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.d_} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.m_=this.Ci.enqueueAfterDelay(this.timerId,i,()=>(this.f_=Date.now(),e())),this.d_*=this.A_,this.d_<this.R_&&(this.d_=this.R_),this.d_>this.V_&&(this.d_=this.V_)}w_(){null!==this.m_&&(this.m_.skipDelay(),this.m_=null)}cancel(){null!==this.m_&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.d_}}class Jm{constructor(e,t,n,i,o){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=i,this.removalCallback=o,this.deferred=new Yr,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(a=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,t,n,i,o){const a=Date.now()+n,s=new Jm(e,t,a,i,o);return s.start(n),s}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new yt(Be.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}var iv,xx;(xx=iv||(iv={})).Ma="default",xx.Cache="cache";const Qc=new Map;class Wx{constructor(e){if(void 0===e.host){if(void 0!==e.ssl)throw new yt(Be.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=e.ssl??!0;if(this.isUsingEmulator=void 0!==e.emulatorOptions,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new yt(Be.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function Sg(r,e,t,n){if(!0===e&&!0===n)throw new yt(Be.INVALID_ARGUMENT,`${r} and ${t} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!(this.experimentalForceLongPolling||void 0!==e.experimentalAutoDetectLongPolling&&!e.experimentalAutoDetectLongPolling),this.experimentalLongPollingOptions=function Gx(r){const e={};return void 0!==r.timeoutSeconds&&(e.timeoutSeconds=r.timeoutSeconds),e}(e.experimentalLongPollingOptions??{}),function(n){if(void 0!==n.timeoutSeconds){if(isNaN(n.timeoutSeconds))throw new yt(Be.INVALID_ARGUMENT,`invalid long polling timeout: ${n.timeoutSeconds} (must not be NaN)`);if(n.timeoutSeconds<5)throw new yt(Be.INVALID_ARGUMENT,`invalid long polling timeout: ${n.timeoutSeconds} (minimum allowed value is 5)`);if(n.timeoutSeconds>30)throw new yt(Be.INVALID_ARGUMENT,`invalid long polling timeout: ${n.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.experimentalLongPollingOptions.timeoutSeconds===e.experimentalLongPollingOptions.timeoutSeconds&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class Jc{constructor(e,t,n,i){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Wx({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new yt(Be.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return"notTerminated"!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new yt(Be.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Wx(e),this._emulatorOptions=e.emulatorOptions||{},void 0!==e.credentials&&(this._authCredentials=function(n){if(!n)return new Ba;switch(n.type){case"firstParty":return new Vt(n.sessionIndex||"0",n.iamToken||null,n.authTokenFactory||null);case"provider":return n.client;default:throw new yt(Be.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return"notTerminated"===this._terminateTask&&(this._terminateTask=this._terminate()),this._terminateTask}_restart(){var e=this;return(0,O.A)(function*(){"notTerminated"===e._terminateTask?yield e._terminate():e._terminateTask="notTerminated"})()}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(t){const n=Qc.get(t);n&&(it("ComponentProvider","Removing Datastore"),Qc.delete(t),n.terminate())}(this),Promise.resolve()}}class co{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new co(this.firestore,e,this._query)}}class Vn{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Mo(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Vn(this.firestore,e,this._key)}toJSON(){return{type:Vn._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,t,n){if(za(t,Vn._jsonSchema))return new Vn(e,n||null,new Ot(Rr.fromString(t.referencePath)))}}Vn._jsonSchemaVersion="firestore/documentReference/1.0",Vn._jsonSchema={type:En("string",Vn._jsonSchemaVersion),referencePath:En("string")};class Mo extends co{constructor(e,t,n){super(e,t,function Rc(r){return new ma(r)}(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new Vn(this.firestore,null,new Ot(e))}withConverter(e){return new Mo(this.firestore,e,this._path)}}const Kx="AsyncQueue";class Xx{constructor(e=Promise.resolve()){this.Yu=[],this.ec=!1,this.tc=[],this.nc=null,this.rc=!1,this.sc=!1,this.oc=[],this.M_=new Om(this,"async_queue_retry"),this._c=()=>{const n=mf();n&&it(Kx,"Visibility state changed to "+n.visibilityState),this.M_.w_()},this.ac=e;const t=mf();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this._c)}get isShuttingDown(){return this.ec}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.uc(),this.cc(e)}enterRestrictedMode(e){if(!this.ec){this.ec=!0,this.sc=e||!1;const t=mf();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this._c)}}enqueue(e){if(this.uc(),this.ec)return new Promise(()=>{});const t=new Yr;return this.cc(()=>this.ec&&this.sc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Yu.push(e),this.lc()))}lc(){var e=this;return(0,O.A)(function*(){if(0!==e.Yu.length){try{yield e.Yu[0](),e.Yu.shift(),e.M_.reset()}catch(t){if(!function wr(r){return"IndexedDbTransactionError"===r.name}(t))throw t;it(Kx,"Operation failed with retryable error: "+t)}e.Yu.length>0&&e.M_.p_(()=>e.lc())}})()}cc(e){const t=this.ac.then(()=>(this.rc=!0,e().catch(n=>{throw this.nc=n,this.rc=!1,Er("INTERNAL UNHANDLED ERROR: ",Yx(n)),n}).then(n=>(this.rc=!1,n))));return this.ac=t,t}enqueueAfterDelay(e,t,n){this.uc(),this.oc.indexOf(e)>-1&&(t=0);const i=Jm.createAndSchedule(this,e,t,n,o=>this.hc(o));return this.tc.push(i),i}uc(){this.nc&&Tt(47125,{Pc:Yx(this.nc)})}verifyOperationInProgress(){}Tc(){var e=this;return(0,O.A)(function*(){let t;do{t=e.ac,yield t}while(t!==e.ac)})()}Ic(e){for(const t of this.tc)if(t.timerId===e)return!0;return!1}Ec(e){return this.Tc().then(()=>{this.tc.sort((t,n)=>t.targetTimeMs-n.targetTimeMs);for(const t of this.tc)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.Tc()})}Rc(e){this.oc.push(e)}hc(e){const t=this.tc.indexOf(e);this.tc.splice(t,1)}}function Yx(r){let e=r.message||"";return r.stack&&(e=r.stack.includes(r.message)?r.stack:r.message+"\n"+r.stack),e}class Qo extends Jc{constructor(e,t,n,i){super(e,t,n,i),this.type="firestore",this._queue=new Xx,this._persistenceKey=i?.name||"[DEFAULT]"}_terminate(){var e=this;return(0,O.A)(function*(){if(e._firestoreClient){const t=e._firestoreClient.terminate();e._queue=new Xx(t),e._firestoreClient=void 0,yield t}})()}}class ho{constructor(e){this._byteString=e}static fromBase64String(e){try{return new ho(Dn.fromBase64String(e))}catch(t){throw new yt(Be.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(e){return new ho(Dn.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:ho._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(za(e,ho._jsonSchema))return ho.fromBase64String(e.bytes)}}ho._jsonSchemaVersion="firestore/bytes/1.0",ho._jsonSchema={type:En("string",ho._jsonSchemaVersion),bytes:En("string")};class Ef{constructor(...e){for(let t=0;t<e.length;++t)if(0===e[t].length)throw new yt(Be.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new en(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class Jo{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new yt(Be.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new yt(Be.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}_compareTo(e){return Jt(this._lat,e._lat)||Jt(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:Jo._jsonSchemaVersion}}static fromJSON(e){if(za(e,Jo._jsonSchema))return new Jo(e.latitude,e.longitude)}}Jo._jsonSchemaVersion="firestore/geoPoint/1.0",Jo._jsonSchema={type:En("string",Jo._jsonSchemaVersion),latitude:En("number"),longitude:En("number")};class bo{constructor(e){this._values=(e||[]).map(t=>t)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(n,i){if(n.length!==i.length)return!1;for(let o=0;o<n.length;++o)if(n[o]!==i[o])return!1;return!0}(this._values,e._values)}toJSON(){return{type:bo._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(e){if(za(e,bo._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every(t=>"number"==typeof t))return new bo(e.vectorValues);throw new yt(Be.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}function eh(r,e,t){if((e=(0,Xt.Ku)(e))instanceof Ef)return e._internalPath;if("string"==typeof e)return function o1(r,e,t){if(e.search(vL)>=0)throw If(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,r,!1,void 0,t);try{return new Ef(...e.split("."))._internalPath}catch{throw If(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,r,!1,void 0,t)}}(r,e);throw If("Field path arguments must be of type string or ",r,!1,void 0,t)}bo._jsonSchemaVersion="firestore/vectorValue/1.0",bo._jsonSchema={type:En("string",bo._jsonSchemaVersion),vectorValues:En("object")};const vL=new RegExp("[~\\*/\\[\\]]");function If(r,e,t,n,i){const o=n&&!n.isEmpty(),a=void 0!==i;let s=`Function ${e}() called with invalid data`;t&&(s+=" (via `toFirestore()`)"),s+=". ";let l="";return(o||a)&&(l+=" (found",o&&(l+=` in field ${n}`),a&&(l+=` in document ${i}`),l+=")"),new yt(Be.INVALID_ARGUMENT,s+r+l)}const A1="@firebase/firestore";class nh{constructor(e,t,n,i,o){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=i,this._converter=o}get id(){return this._key.path.lastSegment()}get ref(){return new Vn(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new YL(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}_fieldsProto(){return this._document?.data.clone().value.mapValue.fields??void 0}get(e){if(this._document){const t=this._document.data.field(eh("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class YL extends nh{data(){return super.data()}}class ns{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class go extends nh{constructor(e,t,n,i,o,a){super(e,t,n,i,a),this._firestore=e,this._firestoreImpl=e,this.metadata=o}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new Df(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){const n=this._document.data.field(eh("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new yt(Be.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,t={};return t.type=go._jsonSchemaVersion,t.bundle="",t.bundleSource="DocumentSnapshot",t.bundleName=this._key.toString(),e&&e.isValidDocument()&&e.isFoundDocument()?(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),t.bundle="NOT SUPPORTED",t):t}}go._jsonSchemaVersion="firestore/documentSnapshot/1.0",go._jsonSchema={type:En("string",go._jsonSchemaVersion),bundleSource:En("string","DocumentSnapshot"),bundleName:En("string"),bundle:En("string")};class Df extends go{data(e={}){return super.data(e)}}class mo{constructor(e,t,n,i){this._firestore=e,this._userDataWriter=t,this._snapshot=i,this.metadata=new ns(i.hasPendingWrites,i.fromCache),this.query=n}get docs(){const e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(n=>{e.call(t,new Df(this._firestore,this._userDataWriter,n.key,n,new ns(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new yt(Be.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(i,o){if(i._snapshot.oldDocs.isEmpty()){let a=0;return i._snapshot.docChanges.map(s=>({type:"added",doc:new Df(i._firestore,i._userDataWriter,s.doc.key,s.doc,new ns(i._snapshot.mutatedKeys.has(s.doc.key),i._snapshot.fromCache),i.query.converter),oldIndex:-1,newIndex:a++}))}{let a=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(s=>o||3!==s.type).map(s=>{const l=new Df(i._firestore,i._userDataWriter,s.doc.key,s.doc,new ns(i._snapshot.mutatedKeys.has(s.doc.key),i._snapshot.fromCache),i.query.converter);let u=-1,c=-1;return 0!==s.type&&(u=a.indexOf(s.doc.key),a=a.delete(s.doc.key)),1!==s.type&&(a=a.add(s.doc),c=a.indexOf(s.doc.key)),{type:aM(s.type),doc:l,oldIndex:u,newIndex:c}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new yt(Be.FAILED_PRECONDITION,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=mo._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=Hr.newId();const t=[],n=[],i=[];return this.docs.forEach(o=>{null!==o._document&&(t.push(o._document),n.push(this._userDataWriter.convertObjectMap(o._document.data.value.mapValue.fields,"previous")),i.push(o.ref.path))}),e.bundle="NOT SUPPORTED",e}}function aM(r){switch(r){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Tt(61501,{type:r})}}mo._jsonSchemaVersion="firestore/querySnapshot/1.0",mo._jsonSchema={type:En("string",mo._jsonSchemaVersion),bundleSource:En("string","QuerySnapshot"),bundleName:En("string"),bundle:En("string")},function(e,t=!0){(function gt(r){Se=r})(T.MF),(0,T.om)(new ua.uA("firestore",(n,{instanceIdentifier:i,options:o})=>{const a=n.getProvider("app").getImmediate(),s=new Qo(new Le(n.getProvider("auth-internal")),new Ir(a,n.getProvider("app-check-internal")),function V2(r,e){if(!Object.prototype.hasOwnProperty.apply(r.options,["projectId"]))throw new yt(Be.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new $s(r.options.projectId,e)}(a,i),a);return o={useFetchStreams:t,...o},s._setSettings(o),s},"PUBLIC").setMultipleInstances(!0)),(0,T.KO)(A1,"4.10.0",e),(0,T.KO)(A1,"4.10.0","esm2020")}();const _M=function z1(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}},G1=new Xt.FA("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),Of=new Gn.Vy("@firebase/auth");function Lf(r,...e){Of.logLevel<=Gn.$b.ERROR&&Of.error(`Auth (${T.MF}): ${r}`,...e)}function to(r,...e){throw cy(r,...e)}function Eo(r,...e){return cy(r,...e)}function uy(r,e,t){const n={..._M(),[e]:t};return new Xt.FA("auth","Firebase",n).create(e,{appName:r.name})}function hi(r){return uy(r,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function cy(r,...e){if("string"!=typeof r){const t=e[0],n=[...e.slice(1)];return n[0]&&(n[0].appName=r.name),r._errorFactory.create(t,...n)}return G1.create(r,...e)}function kt(r,e,...t){if(!r)throw cy(e,...t)}function Zo(r){const e="INTERNAL ASSERTION FAILED: "+r;throw Lf(e),new Error(e)}function os(r,e){r||Zo(e)}function q1(){return typeof self<"u"&&self.location?.protocol||null}class hh{constructor(e,t){this.shortDelay=e,this.longDelay=t,os(t>e,"Short delay should be less than long delay!"),this.isMobile=(0,Xt.jZ)()||(0,Xt.lV)()}get(){return function EM(){return!(typeof navigator<"u"&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(function hy(){return"http:"===q1()||"https:"===q1()}()||(0,Xt.sr)()||"connection"in navigator))||navigator.onLine}()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}class j1{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:typeof self<"u"&&"fetch"in self?self.fetch:typeof globalThis<"u"&&globalThis.fetch?globalThis.fetch:typeof fetch<"u"?fetch:void Zo("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:typeof self<"u"&&"Headers"in self?self.Headers:typeof globalThis<"u"&&globalThis.Headers?globalThis.Headers:typeof Headers<"u"?Headers:void Zo("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:typeof self<"u"&&"Response"in self?self.Response:typeof globalThis<"u"&&globalThis.Response?globalThis.Response:typeof Response<"u"?Response:void Zo("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const IM={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},xM=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],AM=new hh(3e4,6e4);function gn(r,e){return r.tenantId&&!e.tenantId?{...e,tenantId:r.tenantId}:e}function mn(r,e,t,n){return fy.apply(this,arguments)}function fy(){return(fy=(0,O.A)(function*(r,e,t,n,i={}){return H1(r,i,(0,O.A)(function*(){let o={},a={};n&&("GET"===e?a=n:o={body:JSON.stringify(n)});const s=(0,Xt.Am)({key:r.config.apiKey,...a}).slice(1),l=yield r._getAdditionalHeaders();l["Content-Type"]="application/json",r.languageCode&&(l["X-Firebase-Locale"]=r.languageCode);const u={method:e,headers:l,...o};return(0,Xt.c1)()||(u.referrerPolicy="no-referrer"),r.emulatorConfig&&(0,Xt.zJ)(r.emulatorConfig.host)&&(u.credentials="include"),j1.fetch()(yield $1(r,r.config.apiHost,t,s),u)}))})).apply(this,arguments)}function H1(r,e,t){return py.apply(this,arguments)}function py(){return(py=(0,O.A)(function*(r,e,t){r._canInitEmulator=!1;const n={...IM,...e};try{const i=new SM(r),o=yield Promise.race([t(),i.promise]);i.clearNetworkTimeout();const a=yield o.json();if("needConfirmation"in a)throw dh(r,"account-exists-with-different-credential",a);if(o.ok&&!("errorMessage"in a))return a;{const s=o.ok?a.errorMessage:a.error.message,[l,u]=s.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===l)throw dh(r,"credential-already-in-use",a);if("EMAIL_EXISTS"===l)throw dh(r,"email-already-in-use",a);if("USER_DISABLED"===l)throw dh(r,"user-disabled",a);const c=n[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw uy(r,c,u);to(r,c)}}catch(i){if(i instanceof Xt.g)throw i;to(r,"network-request-failed",{message:String(i)})}})).apply(this,arguments)}function $1(r,e,t,n){return my.apply(this,arguments)}function my(){return(my=(0,O.A)(function*(r,e,t,n){const i=`${e}${t}?${n}`,o=r,a=o.config.emulator?function dy(r,e){os(r.emulator,"Emulator should always be set here");const{url:t}=r.emulator;return e?`${t}${e.startsWith("/")?e.slice(1):e}`:t}(r.config,i):`${r.config.apiScheme}://${i}`;return xM.includes(t)&&(yield o._persistenceManagerAvailable,"COOKIE"===o._getPersistenceType())?o._getPersistence()._getFinalTarget(a).toString():a})).apply(this,arguments)}class SM{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((t,n)=>{this.timer=setTimeout(()=>n(Eo(this.auth,"network-request-failed")),AM.get())})}}function dh(r,e,t){const n={appName:r.name};t.email&&(n.email=t.email),t.phoneNumber&&(n.phoneNumber=t.phoneNumber);const i=Eo(r,e,n);return i.customData._tokenResponse=t,i}function wy(){return(wy=(0,O.A)(function*(r,e){return mn(r,"POST","/v1/accounts:delete",e)})).apply(this,arguments)}function Mf(r,e){return by.apply(this,arguments)}function by(){return(by=(0,O.A)(function*(r,e){return mn(r,"POST","/v1/accounts:lookup",e)})).apply(this,arguments)}function fh(r){if(r)try{const e=new Date(Number(r));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}function Ey(){return(Ey=(0,O.A)(function*(r,e=!1){const t=(0,Xt.Ku)(r),n=yield t.getIdToken(e),i=Ff(n);kt(i&&i.exp&&i.auth_time&&i.iat,t.auth,"internal-error");const o="object"==typeof i.firebase?i.firebase:void 0,a=o?.sign_in_provider;return{claims:i,token:n,authTime:fh(Ty(i.auth_time)),issuedAtTime:fh(Ty(i.iat)),expirationTime:fh(Ty(i.exp)),signInProvider:a||null,signInSecondFactor:o?.sign_in_second_factor||null}})).apply(this,arguments)}function Ty(r){return 1e3*Number(r)}function Ff(r){const[e,t,n]=r.split(".");if(void 0===e||void 0===t||void 0===n)return Lf("JWT malformed, contained fewer than 3 sections"),null;try{const i=(0,Xt.u)(t);return i?JSON.parse(i):(Lf("Failed to decode base64 JWT payload"),null)}catch(i){return Lf("Caught error parsing JWT payload as JSON",i?.toString()),null}}function Q1(r){const e=Ff(r);return kt(e,"internal-error"),kt(typeof e.exp<"u","internal-error"),kt(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}function Ta(r,e){return Iy.apply(this,arguments)}function Iy(){return(Iy=(0,O.A)(function*(r,e,t=!1){if(t)return e;try{return yield e}catch(n){throw n instanceof Xt.g&&function NM({code:r}){return"auth/user-disabled"===r||"auth/user-token-expired"===r}(n)&&r.auth.currentUser===r&&(yield r.auth.signOut()),n}})).apply(this,arguments)}class OM{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){if(e){const t=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),t}{this.errorBackoff=3e4;const n=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,n)}}schedule(e=!1){var t=this;if(!this.isRunning)return;const n=this.getInterval(e);this.timerId=setTimeout((0,O.A)(function*(){yield t.iteration()}),n)}iteration(){var e=this;return(0,O.A)(function*(){try{yield e.user.getIdToken(!0)}catch(t){return void("auth/network-request-failed"===t?.code&&e.schedule(!0))}e.schedule()})()}}class xy{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=fh(this.lastLoginAt),this.creationTime=fh(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}function ph(r){return Ay.apply(this,arguments)}function Ay(){return(Ay=(0,O.A)(function*(r){const e=r.auth,t=yield r.getIdToken(),n=yield Ta(r,Mf(e,{idToken:t}));kt(n?.users.length,e,"internal-error");const i=n.users[0];r._notifyReloadListener(i);const o=i.providerUserInfo?.length?J1(i.providerUserInfo):[],a=function MM(r,e){return[...r.filter(n=>!e.some(i=>i.providerId===n.providerId)),...e]}(r.providerData,o),u=!!r.isAnonymous&&!(r.email&&i.passwordHash||a?.length),c={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:a,metadata:new xy(i.createdAt,i.lastLoginAt),isAnonymous:u};Object.assign(r,c)})).apply(this,arguments)}function Ry(){return(Ry=(0,O.A)(function*(r){const e=(0,Xt.Ku)(r);yield ph(e),yield e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)})).apply(this,arguments)}function J1(r){return r.map(({providerId:e,...t})=>({providerId:e,uid:t.rawId||"",displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}function Sy(){return(Sy=(0,O.A)(function*(r,e){const t=yield H1(r,{},(0,O.A)(function*(){const n=(0,Xt.Am)({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:o}=r.config,a=yield $1(r,i,"/v1/token",`key=${o}`),s=yield r._getAdditionalHeaders();s["Content-Type"]="application/x-www-form-urlencoded";const l={method:"POST",headers:s,body:n};return r.emulatorConfig&&(0,Xt.zJ)(r.emulatorConfig.host)&&(l.credentials="include"),j1.fetch()(a,l)}));return{accessToken:t.access_token,expiresIn:t.expires_in,refreshToken:t.refresh_token}})).apply(this,arguments)}function Cy(){return(Cy=(0,O.A)(function*(r,e){return mn(r,"POST","/v2/accounts:revokeToken",gn(r,e))})).apply(this,arguments)}class Au{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){kt(e.idToken,"internal-error"),kt(typeof e.idToken<"u","internal-error"),kt(typeof e.refreshToken<"u","internal-error");const t="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):Q1(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){kt(0!==e.length,"internal-error");const t=Q1(e);this.updateTokensAndExpiration(e,null,t)}getToken(e){var t=this;return(0,O.A)(function*(n,i=!1){return i||!t.accessToken||t.isExpired?(kt(t.refreshToken,n,"user-token-expired"),t.refreshToken?(yield t.refresh(n,t.refreshToken),t.accessToken):null):t.accessToken}).apply(this,arguments)}clearRefreshToken(){this.refreshToken=null}refresh(e,t){var n=this;return(0,O.A)(function*(){const{accessToken:i,refreshToken:o,expiresIn:a}=yield function FM(r,e){return Sy.apply(this,arguments)}(e,t);n.updateTokensAndExpiration(i,o,Number(a))})()}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:i,expirationTime:o}=t,a=new Au;return n&&(kt("string"==typeof n,"internal-error",{appName:e}),a.refreshToken=n),i&&(kt("string"==typeof i,"internal-error",{appName:e}),a.accessToken=i),o&&(kt("number"==typeof o,"internal-error",{appName:e}),a.expirationTime=o),a}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Au,this.toJSON())}_performRefresh(){return Zo("not implemented")}}function as(r,e){kt("string"==typeof r||typeof r>"u","internal-error",{appName:e})}class Fo{constructor({uid:e,auth:t,stsTokenManager:n,...i}){this.providerId="firebase",this.proactiveRefresh=new OM(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,this.stsTokenManager=n,this.accessToken=n.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new xy(i.createdAt||void 0,i.lastLoginAt||void 0)}getIdToken(e){var t=this;return(0,O.A)(function*(){const n=yield Ta(t,t.stsTokenManager.getToken(t.auth,e));return kt(n,t.auth,"internal-error"),t.accessToken!==n&&(t.accessToken=n,yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)),n})()}getIdTokenResult(e){return function DM(r){return Ey.apply(this,arguments)}(this,e)}reload(){return function LM(r){return Ry.apply(this,arguments)}(this)}_assign(e){this!==e&&(kt(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(t=>({...t})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new Fo({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return t.metadata._copy(this.metadata),t}_onReload(e){kt(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(e){var t=this;return(0,O.A)(function*(n,i=!1){let o=!1;n.idToken&&n.idToken!==t.stsTokenManager.accessToken&&(t.stsTokenManager.updateFromServerResponse(n),o=!0),i&&(yield ph(t)),yield t.auth._persistUserIfCurrent(t),o&&t.auth._notifyListenersIfCurrent(t)}).apply(this,arguments)}delete(){var e=this;return(0,O.A)(function*(){if((0,T.xZ)(e.auth.app))return Promise.reject(hi(e.auth));const t=yield e.getIdToken();return yield Ta(e,function PM(r,e){return wy.apply(this,arguments)}(e.auth,{idToken:t})),e.stsTokenManager.clearRefreshToken(),e.auth.signOut()})()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...e})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){const n=t.displayName??void 0,i=t.email??void 0,o=t.phoneNumber??void 0,a=t.photoURL??void 0,s=t.tenantId??void 0,l=t._redirectEventId??void 0,u=t.createdAt??void 0,c=t.lastLoginAt??void 0,{uid:h,emailVerified:d,isAnonymous:p,providerData:g,stsTokenManager:y}=t;kt(h&&y,e,"internal-error");const v=Au.fromJSON(this.name,y);kt("string"==typeof h,e,"internal-error"),as(n,e.name),as(i,e.name),kt("boolean"==typeof d,e,"internal-error"),kt("boolean"==typeof p,e,"internal-error"),as(o,e.name),as(a,e.name),as(s,e.name),as(l,e.name),as(u,e.name),as(c,e.name);const m=new Fo({uid:h,auth:e,email:i,emailVerified:d,displayName:n,isAnonymous:p,photoURL:a,phoneNumber:o,tenantId:s,stsTokenManager:v,createdAt:u,lastLoginAt:c});return g&&Array.isArray(g)&&(m.providerData=g.map(_=>({..._}))),l&&(m._redirectEventId=l),m}static _fromIdTokenResponse(e,t){return(0,O.A)(function*(n,i,o=!1){const a=new Au;a.updateFromServerResponse(i);const s=new Fo({uid:i.localId,auth:n,stsTokenManager:a,isAnonymous:o});return yield ph(s),s}).apply(this,arguments)}static _fromGetAccountInfoResponse(e,t,n){return(0,O.A)(function*(){const i=t.users[0];kt(void 0!==i.localId,"internal-error");const o=void 0!==i.providerUserInfo?J1(i.providerUserInfo):[],a=!(i.email&&i.passwordHash||o?.length),s=new Au;s.updateFromIdToken(n);const l=new Fo({uid:i.localId,auth:e,stsTokenManager:s,isAnonymous:a}),u={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:o,metadata:new xy(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash||o?.length)};return Object.assign(l,u),l})()}}const Z1=new Map;function Ia(r){os(r instanceof Function,"Expected a class definition");let e=Z1.get(r);return e?(os(e instanceof r,"Instance stored in cache mismatched with class"),e):(e=new r,Z1.set(r,e),e)}const eA=(()=>{class r{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return(0,O.A)(function*(){return!0})()}_set(t,n){var i=this;return(0,O.A)(function*(){i.storage[t]=n})()}_get(t){var n=this;return(0,O.A)(function*(){const i=n.storage[t];return void 0===i?null:i})()}_remove(t){var n=this;return(0,O.A)(function*(){delete n.storage[t]})()}_addListener(t,n){}_removeListener(t,n){}}return r.type="NONE",r})();function Vf(r,e,t){return`firebase:${r}:${e}:${t}`}class Ru{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:i,name:o}=this.auth;this.fullUserKey=Vf(this.userKey,i.apiKey,o),this.fullPersistenceKey=Vf("persistence",i.apiKey,o),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}getCurrentUser(){var e=this;return(0,O.A)(function*(){const t=yield e.persistence._get(e.fullUserKey);if(!t)return null;if("string"==typeof t){const n=yield Mf(e.auth,{idToken:t}).catch(()=>{});return n?Fo._fromGetAccountInfoResponse(e.auth,n,t):null}return Fo._fromJSON(e.auth,t)})()}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(e){var t=this;return(0,O.A)(function*(){if(t.persistence===e)return;const n=yield t.getCurrentUser();return yield t.removeCurrentUser(),t.persistence=e,n?t.setCurrentUser(n):void 0})()}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(e,t){return(0,O.A)(function*(n,i,o="authUser"){if(!i.length)return new Ru(Ia(eA),n,o);const a=(yield Promise.all(i.map(function(){var h=(0,O.A)(function*(d){if(yield d._isAvailable())return d});return function(d){return h.apply(this,arguments)}}()))).filter(h=>h);let s=a[0]||Ia(eA);const l=Vf(o,n.config.apiKey,n.name);let u=null;for(const h of i)try{const d=yield h._get(l);if(d){let p;if("string"==typeof d){const g=yield Mf(n,{idToken:d}).catch(()=>{});if(!g)break;p=yield Fo._fromGetAccountInfoResponse(n,g,d)}else p=Fo._fromJSON(n,d);h!==s&&(u=p),s=h;break}}catch{}const c=a.filter(h=>h._shouldAllowMigration);return s._shouldAllowMigration&&c.length?(s=c[0],u&&(yield s._set(l,u.toJSON())),yield Promise.all(i.map(function(){var h=(0,O.A)(function*(d){if(d!==s)try{yield d._remove(l)}catch{}});return function(d){return h.apply(this,arguments)}}())),new Ru(s,n,o)):new Ru(s,n,o)}).apply(this,arguments)}}function tA(r){const e=r.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(function oA(r=(0,Xt.ZQ)()){return/iemobile/i.test(r)}(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(function rA(r=(0,Xt.ZQ)()){return/firefox\//i.test(r)}(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(function sA(r=(0,Xt.ZQ)()){return/blackberry/i.test(r)}(e))return"Blackberry";if(function lA(r=(0,Xt.ZQ)()){return/webos/i.test(r)}(e))return"Webos";if(function nA(r=(0,Xt.ZQ)()){const e=r.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}(e))return"Safari";if((e.includes("chrome/")||function iA(r=(0,Xt.ZQ)()){return/crios\//i.test(r)}(e))&&!e.includes("edge/"))return"Chrome";if(function aA(r=(0,Xt.ZQ)()){return/android/i.test(r)}(e))return"Android";{const n=r.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(2===n?.length)return n[1]}return"Other"}function uA(r,e=[]){let t;switch(r){case"Browser":t=tA((0,Xt.ZQ)());break;case"Worker":t=`${tA((0,Xt.ZQ)())}-${r}`;break;default:t=r}const n=e.length?e.join(","):"FirebaseCore-web";return`${t}/JsCore/${T.MF}/${n}`}class zM{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=o=>new Promise((a,s)=>{try{a(e(o))}catch(l){s(l)}});n.onAbort=t,this.queue.push(n);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}runMiddleware(e){var t=this;return(0,O.A)(function*(){if(t.auth.currentUser===e)return;const n=[];try{for(const i of t.queue)yield i(e),i.onAbort&&n.push(i.onAbort)}catch(i){n.reverse();for(const o of n)try{o()}catch{}throw t.auth._errorFactory.create("login-blocked",{originalMessage:i?.message})}})()}}function ky(){return(ky=(0,O.A)(function*(r,e={}){return mn(r,"GET","/v2/passwordPolicy",gn(r,e))})).apply(this,arguments)}class jM{constructor(e){const t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??6,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),void 0!==t.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),void 0!==t.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),void 0!==t.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),void 0!==t.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){const t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&(t.isValid=t.meetsMinPasswordLength??!0),t.isValid&&(t.isValid=t.meetsMaxPasswordLength??!0),t.isValid&&(t.isValid=t.containsLowercaseLetter??!0),t.isValid&&(t.isValid=t.containsUppercaseLetter??!0),t.isValid&&(t.isValid=t.containsNumericCharacter??!0),t.isValid&&(t.isValid=t.containsNonAlphanumericCharacter??!0),t}validatePasswordLengthOptions(e,t){const n=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),i&&(t.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,t){let n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let i=0;i<e.length;i++)n=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(t,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,i,o){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=o))}}class HM{constructor(e,t,n,i){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new cA(this),this.idTokenSubscription=new cA(this),this.beforeStateQueue=new zM(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=G1,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(o=>this._resolvePersistenceManagerAvailable=o)}_initializeWithPersistence(e,t){var n=this;return t&&(this._popupRedirectResolver=Ia(t)),this._initializationPromise=this.queue((0,O.A)(function*(){if(!n._deleted&&(n.persistenceManager=yield Ru.create(n,e),n._resolvePersistenceManagerAvailable?.(),!n._deleted)){if(n._popupRedirectResolver?._shouldInitProactively)try{yield n._popupRedirectResolver._initialize(n)}catch{}yield n.initializeCurrentUser(t),n.lastNotifiedUid=n.currentUser?.uid||null,!n._deleted&&(n._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){var e=this;return(0,O.A)(function*(){if(e._deleted)return;const t=yield e.assertedPersistence.getCurrentUser();if(e.currentUser||t){if(e.currentUser&&t&&e.currentUser.uid===t.uid)return e._currentUser._assign(t),void(yield e.currentUser.getIdToken());yield e._updateCurrentUser(t,!0)}})()}initializeCurrentUserFromIdToken(e){var t=this;return(0,O.A)(function*(){try{const n=yield Mf(t,{idToken:e}),i=yield Fo._fromGetAccountInfoResponse(t,n,e);yield t.directlySetCurrentUser(i)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield t.directlySetCurrentUser(null)}})()}initializeCurrentUser(e){var t=this;return(0,O.A)(function*(){if((0,T.xZ)(t.app)){const a=t.app.settings.authIdToken;return a?new Promise(s=>{setTimeout(()=>t.initializeCurrentUserFromIdToken(a).then(s,s))}):t.directlySetCurrentUser(null)}const n=yield t.assertedPersistence.getCurrentUser();let i=n,o=!1;if(e&&t.config.authDomain){yield t.getOrInitRedirectPersistenceManager();const a=t.redirectUser?._redirectEventId,s=i?._redirectEventId,l=yield t.tryRedirectSignIn(e);(!a||a===s)&&l?.user&&(i=l.user,o=!0)}if(!i)return t.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{yield t.beforeStateQueue.runMiddleware(i)}catch(a){i=n,t._popupRedirectResolver._overrideRedirectResult(t,()=>Promise.reject(a))}return i?t.reloadAndSetCurrentUserOrClear(i):t.directlySetCurrentUser(null)}return kt(t._popupRedirectResolver,t,"argument-error"),yield t.getOrInitRedirectPersistenceManager(),t.redirectUser&&t.redirectUser._redirectEventId===i._redirectEventId?t.directlySetCurrentUser(i):t.reloadAndSetCurrentUserOrClear(i)})()}tryRedirectSignIn(e){var t=this;return(0,O.A)(function*(){let n=null;try{n=yield t._popupRedirectResolver._completeRedirectFn(t,e,!0)}catch{yield t._setRedirectUser(null)}return n})()}reloadAndSetCurrentUserOrClear(e){var t=this;return(0,O.A)(function*(){try{yield ph(e)}catch(n){if("auth/network-request-failed"!==n?.code)return t.directlySetCurrentUser(null)}return t.directlySetCurrentUser(e)})()}useDeviceLanguage(){this.languageCode=function TM(){if(typeof navigator>"u")return null;const r=navigator;return r.languages&&r.languages[0]||r.language||null}()}_delete(){var e=this;return(0,O.A)(function*(){e._deleted=!0})()}updateCurrentUser(e){var t=this;return(0,O.A)(function*(){if((0,T.xZ)(t.app))return Promise.reject(hi(t));const n=e?(0,Xt.Ku)(e):null;return n&&kt(n.auth.config.apiKey===t.config.apiKey,t,"invalid-user-token"),t._updateCurrentUser(n&&n._clone(t))})()}_updateCurrentUser(e){var t=this;return(0,O.A)(function*(n,i=!1){if(!t._deleted)return n&&kt(t.tenantId===n.tenantId,t,"tenant-id-mismatch"),i||(yield t.beforeStateQueue.runMiddleware(n)),t.queue((0,O.A)(function*(){yield t.directlySetCurrentUser(n),t.notifyAuthListeners()}))}).apply(this,arguments)}signOut(){var e=this;return(0,O.A)(function*(){return(0,T.xZ)(e.app)?Promise.reject(hi(e)):(yield e.beforeStateQueue.runMiddleware(null),(e.redirectPersistenceManager||e._popupRedirectResolver)&&(yield e._setRedirectUser(null)),e._updateCurrentUser(null,!0))})()}setPersistence(e){var t=this;return(0,T.xZ)(this.app)?Promise.reject(hi(this)):this.queue((0,O.A)(function*(){yield t.assertedPersistence.setPersistence(Ia(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(e){var t=this;return(0,O.A)(function*(){t._getPasswordPolicyInternal()||(yield t._updatePasswordPolicy());const n=t._getPasswordPolicyInternal();return n.schemaVersion!==t.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(t._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)})()}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){var e=this;return(0,O.A)(function*(){const t=yield function GM(r){return ky.apply(this,arguments)}(e),n=new jM(t);null===e.tenantId?e._projectPasswordPolicy=n:e._tenantPasswordPolicies[e.tenantId]=n})()}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new Xt.FA("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{const n=this.onAuthStateChanged(()=>{n(),e()},t)}})}revokeAccessToken(e){var t=this;return(0,O.A)(function*(){if(t.currentUser){const n=yield t.currentUser.getIdToken(),i={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};null!=t.tenantId&&(i.tenantId=t.tenantId),yield function VM(r,e){return Cy.apply(this,arguments)}(t,i)}})()}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}_setRedirectUser(e,t){var n=this;return(0,O.A)(function*(){const i=yield n.getOrInitRedirectPersistenceManager(t);return null===e?i.removeCurrentUser():i.setCurrentUser(e)})()}getOrInitRedirectPersistenceManager(e){var t=this;return(0,O.A)(function*(){if(!t.redirectPersistenceManager){const n=e&&Ia(e)||t._popupRedirectResolver;kt(n,t,"argument-error"),t.redirectPersistenceManager=yield Ru.create(t,[Ia(n._redirectPersistence)],"redirectUser"),t.redirectUser=yield t.redirectPersistenceManager.getCurrentUser()}return t.redirectPersistenceManager})()}_redirectUserForId(e){var t=this;return(0,O.A)(function*(){return t._isInitialized&&(yield t.queue((0,O.A)(function*(){}))),t._currentUser?._redirectEventId===e?t._currentUser:t.redirectUser?._redirectEventId===e?t.redirectUser:null})()}_persistUserIfCurrent(e){var t=this;return(0,O.A)(function*(){if(e===t.currentUser)return t.queue((0,O.A)(function*(){return t.directlySetCurrentUser(e)}))})()}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,i){if(this._deleted)return()=>{};const o="function"==typeof t?t:t.next.bind(t);let a=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(kt(s,this,"internal-error"),s.then(()=>{a||o(this.currentUser)}),"function"==typeof t){const l=e.addObserver(t,n,i);return()=>{a=!0,l()}}{const l=e.addObserver(t);return()=>{a=!0,l()}}}directlySetCurrentUser(e){var t=this;return(0,O.A)(function*(){t.currentUser&&t.currentUser!==e&&t._currentUser._stopProactiveRefresh(),e&&t.isProactiveRefreshEnabled&&e._startProactiveRefresh(),t.currentUser=e,e?yield t.assertedPersistence.setCurrentUser(e):yield t.assertedPersistence.removeCurrentUser()})()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return kt(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=uA(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){var e=this;return(0,O.A)(function*(){const t={"X-Client-Version":e.clientVersion};e.app.options.appId&&(t["X-Firebase-gmpid"]=e.app.options.appId);const n=yield e.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();n&&(t["X-Firebase-Client"]=n);const i=yield e._getAppCheckToken();return i&&(t["X-Firebase-AppCheck"]=i),t})()}_getAppCheckToken(){var e=this;return(0,O.A)(function*(){if((0,T.xZ)(e.app)&&e.app.settings.appCheckToken)return e.app.settings.appCheckToken;const t=yield e.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return t?.error&&function bM(r,...e){Of.logLevel<=Gn.$b.WARN&&Of.warn(`Auth (${T.MF}): ${r}`,...e)}(`Error while retrieving App Check token: ${t.error}`),t?.token})()}}class cA{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,Xt.tD)(t=>this.observer=t)}get next(){return kt(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let gh={loadJS:()=>(0,O.A)(function*(){throw new Error("Unable to load external scripts")})(),recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};(function hA(r){return`__${r}${Math.floor(1e6*Math.random())}`})("rcb"),new hh(3e4,6e4),new hh(2e3,1e4),new hh(3e4,6e4),new hh(5e3,15e3),encodeURIComponent("fac");var $A="@firebase/auth";class $V{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}getToken(e){var t=this;return(0,O.A)(function*(){return t.assertAuthConfigured(),yield t.auth._initializationPromise,t.auth.currentUser?{accessToken:yield t.auth.currentUser.getIdToken(e)}:null})()}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged(n=>{e(n?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){kt(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}(0,Xt.XA)("authIdTokenMaxAge"),function $M(r){gh=r}({loadJS:r=>new Promise((e,t)=>{const n=document.createElement("script");n.setAttribute("src",r),n.onload=e,n.onerror=i=>{const o=Eo("internal-error");o.customData=i,t(o)},n.type="text/javascript",n.charset="UTF-8",function QV(){return document.getElementsByTagName("head")?.[0]??document}().appendChild(n)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="}),function KV(r){(0,T.om)(new ua.uA("auth",(e,{options:t})=>{const n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:a,authDomain:s}=n.options;kt(a&&!a.includes(":"),"invalid-api-key",{appName:n.name});const l={apiKey:a,authDomain:s,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:uA(r)},u=new HM(n,i,o,l);return function oF(r,e){const t=e?.persistence||[],n=(Array.isArray(t)?t:[t]).map(Ia);e?.errorMap&&r._updateErrorMap(e.errorMap),r._initializeWithPersistence(n,e?.popupRedirectResolver)}(u,t),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),(0,T.om)(new ua.uA("auth-internal",e=>{const t=function Bn(r){return(0,Xt.Ku)(r)}(e.getProvider("auth").getImmediate());return new $V(t)},"PRIVATE").setInstantiationMode("EXPLICIT")),(0,T.KO)($A,"1.12.0",function WV(r){switch(r){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(r)),(0,T.KO)($A,"1.12.0","esm2020")}("Browser");const _i=[];for(let r=0;r<256;++r)_i.push((r+256).toString(16).slice(1));const ZV=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,nB=function rB(r){if(!function eB(r){return"string"==typeof r&&ZV.test(r)}(r))throw TypeError("Invalid UUID");let e;const t=new Uint8Array(16);return t[0]=(e=parseInt(r.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[4]=(e=parseInt(r.slice(9,13),16))>>>8,t[5]=255&e,t[6]=(e=parseInt(r.slice(14,18),16))>>>8,t[7]=255&e,t[8]=(e=parseInt(r.slice(19,23),16))>>>8,t[9]=255&e,t[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=255&e,t};function lB(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:case 3:return e^t^n;case 2:return e&t^e&n^t&n}}function b_(r,e){return r<<e|r>>>32-e}const cB=function sB(r,e,t){function n(i,o,a,s){var l;if("string"==typeof i&&(i=function iB(r){r=unescape(encodeURIComponent(r));const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}(i)),"string"==typeof o&&(o=nB(o)),16!==(null===(l=o)||void 0===l?void 0:l.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+i.length);if(u.set(o),u.set(i,o.length),u=t(u),u[6]=15&u[6]|e,u[8]=63&u[8]|128,a){s=s||0;for(let c=0;c<16;++c)a[s+c]=u[c];return a}return function XA(r,e=0){return(_i[r[e+0]]+_i[r[e+1]]+_i[r[e+2]]+_i[r[e+3]]+"-"+_i[r[e+4]]+_i[r[e+5]]+"-"+_i[r[e+6]]+_i[r[e+7]]+"-"+_i[r[e+8]]+_i[r[e+9]]+"-"+_i[r[e+10]]+_i[r[e+11]]+_i[r[e+12]]+_i[r[e+13]]+_i[r[e+14]]+_i[r[e+15]]).toLowerCase()}(u)}try{n.name=r}catch{}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}("v5",80,function uB(r){const e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){const a=unescape(encodeURIComponent(r));r=[];for(let s=0;s<a.length;++s)r.push(a.charCodeAt(s))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);const i=Math.ceil((r.length/4+2)/16),o=new Array(i);for(let a=0;a<i;++a){const s=new Uint32Array(16);for(let l=0;l<16;++l)s[l]=r[64*a+4*l]<<24|r[64*a+4*l+1]<<16|r[64*a+4*l+2]<<8|r[64*a+4*l+3];o[a]=s}o[i-1][14]=8*(r.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(r.length-1)&4294967295;for(let a=0;a<i;++a){const s=new Uint32Array(80);for(let p=0;p<16;++p)s[p]=o[a][p];for(let p=16;p<80;++p)s[p]=b_(s[p-3]^s[p-8]^s[p-14]^s[p-16],1);let l=t[0],u=t[1],c=t[2],h=t[3],d=t[4];for(let p=0;p<80;++p){const g=Math.floor(p/20),y=b_(l,5)+lB(g,u,c,h)+d+e[g]+s[p]>>>0;d=h,h=c,c=b_(u,30)>>>0,u=l,l=y}t[0]=t[0]+l>>>0,t[1]=t[1]+u>>>0,t[2]=t[2]+c>>>0,t[3]=t[3]+h>>>0,t[4]=t[4]+d>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]});oe(4556);class wB{constructor(e,t,n,i){this.app=e,this.auth=null,this.messaging=null,this.appCheck=null,this.serverAppAppCheckToken=null,(0,T.xZ)(e)&&e.settings.appCheckToken&&(this.serverAppAppCheckToken=e.settings.appCheckToken),this.auth=t.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||t.get().then(o=>this.auth=o,()=>{}),this.messaging||n.get().then(o=>this.messaging=o,()=>{}),this.appCheck||i?.get().then(o=>this.appCheck=o,()=>{})}getAuthToken(){var e=this;return(0,O.A)(function*(){if(e.auth)try{return(yield e.auth.getToken())?.accessToken}catch{return}})()}getMessagingToken(){var e=this;return(0,O.A)(function*(){if(e.messaging&&"Notification"in self&&"granted"===Notification.permission)try{return yield e.messaging.getToken()}catch{return}})()}getAppCheckToken(e){var t=this;return(0,O.A)(function*(){if(t.serverAppAppCheckToken)return t.serverAppAppCheckToken;if(t.appCheck){const n=e?yield t.appCheck.getLimitedUseToken():yield t.appCheck.getToken();return n.error?null:n.token}return null})()}getContext(e){var t=this;return(0,O.A)(function*(){return{authToken:yield t.getAuthToken(),messagingToken:yield t.getMessagingToken(),appCheckToken:yield t.getAppCheckToken(e)}})()}}const T_="us-central1";class EB{constructor(e,t,n,i,o=T_,a=(...s)=>fetch(...s)){this.app=e,this.fetchImpl=a,this.emulatorOrigin=null,this.contextProvider=new wB(e,t,n,i),this.cancelAllRequests=new Promise(s=>{this.deleteService=()=>Promise.resolve(s())});try{const s=new URL(o);this.customDomain=s.origin+("/"===s.pathname?"":s.pathname),this.region=T_}catch{this.customDomain=null,this.region=o}}_delete(){return this.deleteService()}_url(e){const t=this.app.options.projectId;return null!==this.emulatorOrigin?`${this.emulatorOrigin}/${t}/${this.region}/${e}`:null!==this.customDomain?`${this.customDomain}/${e}`:`https://${this.region}-${t}.cloudfunctions.net/${e}`}}const nR="@firebase/functions";!function NB(r){(0,T.om)(new ua.uA("functions",(t,{instanceIdentifier:n})=>{const i=t.getProvider("app").getImmediate(),o=t.getProvider("auth-internal"),a=t.getProvider("messaging-internal"),s=t.getProvider("app-check-internal");return new EB(i,o,a,s,n)},"PUBLIC").setMultipleInstances(!0)),(0,T.KO)(nR,"0.13.1",r),(0,T.KO)(nR,"0.13.1","esm2020")}(),Error,parseInt((typeof process<"u"?process.env.QLEVER_LOCKED_MAX_RETRIES:void 0)??"10",10),parseInt((typeof process<"u"?process.env.QLEVER_LOCKED_BASE_DELAY_MS:void 0)??"2000",10);const fR={\u00e4:"ae",a\u0308:"ae",\u00c4:"AE",\u00f6:"oe",\u00d6:"OE",\u00fc:"ue",u\u0308:"ue",\u00dc:"UE",U\u0308:"UE",\u00df:"ss",\u00e6:"ae",\u00c6:"AE",\u00f8:"oe",\u00d8:"OE",\u00e5:"aa",\u00c5:"AA",\u00e1:"a",\u00c1:"A",\u00f0:"d",\u00d0:"D",\u00e9:"e",\u00c9:"E",\u00ed:"i",\u00cd:"I",\u00f3:"o",\u00d3:"O",\u00fa:"u",\u00da:"U",\u00fd:"y",\u00dd:"Y",\u00fe:"th",\u00de:"Th"};function xh(r,e=!1){return r=function y3(r,e=!1){let t=r;for(const n in fR)t=t.replace(new RegExp(n,"g"),fR[n]);return e&&t!==r&&console.info(`${r} -> ${t}`),t}(r,e),cB(r,"daca0510-72b5-48ba-9091-b918ca18136b")}class Fi{_value;_listeners=new Set;constructor(e){this._value=e}get(){return this._value}set(e){this._value=e;for(const t of this._listeners)t()}subscribe(e){return this._listeners.add(e),()=>this._listeners.delete(e)}asReadonly(){return this}}function V_(r,e,t,n){return B_.apply(this,arguments)}function B_(){return(B_=(0,O.A)(function*(r,e,t,n){const i=xh(r);let o;if(n){const s=yield n.get(i);void 0!==s&&(t(s,!0),o=xh(JSON.stringify(s)))}const a=yield e();return t(a,!1),n&&xh(JSON.stringify(a))!==o&&n.set(i,a).catch(s=>console.error("[staleWhileRevalidate] Cache write failed:",s)),a})).apply(this,arguments)}const z_="https://cue.qaecy.com/r/",O3={address:{category:"address",label:"Address",description:"Official addresses, streets, and addressable access points.",preferredColor:"#1d4ed8"},poi:{category:"poi",label:"Points of interest",description:"Places and amenities relevant to everyday operations and access.",preferredColor:"#059669"},railway:{category:"railway",label:"Railway",description:"Rail infrastructure, stations, and rail-adjacent transport context.",preferredColor:"#dc2626"},natural:{category:"natural",label:"Natural features",description:"Natural and hydrological features such as watercourses, forests, and land cover.",preferredColor:"#0ea5e9"},manmade:{category:"manmade",label:"Built features",description:"Structures and man-made elements not covered by more specific categories.",preferredColor:"#ca8a04"},cadastre:{category:"cadastre",label:"Cadastre",description:"Land parcels, legal boundaries, official surveying, and public-law land restrictions.",preferredColor:"#7c3aed"},building:{category:"building",label:"Buildings",description:"Building footprints and structures from official registry or cadastral data.",preferredColor:"#f97316"},greenspace:{category:"greenspace",label:"Green spaces",description:"Parks, gardens, playgrounds, sports facilities, and other vegetated open areas.",preferredColor:"#16a34a"},paved:{category:"paved",label:"Paved surfaces",description:"Courtyards, sidewalks, parking areas, and other sealed ground surfaces.",preferredColor:"#78716c"},zone:{category:"zone",label:"Planning zones",description:"Land-use zones, local plans, and public-law planning constraints (Nutzungsplanung / Lokalplan).",preferredColor:"#db2777"}};function Ra(r){return O3[r]}const OR={110:"residential",120:"residential",121:"residential",122:"residential",130:"residential",131:"residential",132:"residential",140:"residential",150:"residential",160:"residential",190:"residential",210:"recreational",212:"recreational",220:"recreational",221:"recreational",230:"recreational",290:"residential",310:"agricultural",311:"agricultural",312:"agricultural",320:"agricultural",321:"agricultural",322:"agricultural",330:"agricultural",390:"agricultural",410:"commercial",411:"commercial",420:"commercial",421:"commercial",422:"commercial",430:"commercial",431:"commercial",432:"commercial",440:"commercial",490:"commercial",510:"industrial",511:"industrial",519:"industrial",520:"infrastructure",521:"infrastructure",522:"infrastructure",529:"infrastructure",530:"infrastructure",531:"infrastructure",532:"infrastructure",533:"infrastructure",534:"infrastructure",535:"infrastructure",540:"infrastructure",585:"infrastructure",590:"industrial",610:"public",620:"public",621:"public",622:"public",630:"public",640:"public",650:"recreational",660:"public",670:"public",680:"public",690:"public",910:"other",920:"other",930:"other",940:"other",950:"infrastructure",960:"agricultural",970:"agricultural",990:"other"},LR={1010:"residential",1020:"mixed",1030:"residential",1040:"other",1060:"recreational",1080:"residential",1110:"commercial",1120:"commercial",1130:"commercial",1140:"industrial",1150:"infrastructure",1160:"infrastructure",1210:"public",1220:"public",1230:"public",1240:"recreational",1241:"public",1242:"recreational",1251:"public",1261:"agricultural",1262:"agricultural",1263:"agricultural",1275:"other",1276:"other",1277:"infrastructure",1278:"infrastructure",1281:"infrastructure",1282:"infrastructure",9999:"other"},z3={1110:"residential",1121:"recreational",1122:"residential",1130:"mixed",1140:"mixed",1211:"commercial",1212:"commercial",1213:"mixed",1220:"commercial",1230:"commercial",1231:"commercial",1241:"infrastructure",1242:"recreational",1264:"recreational",1251:"industrial",1252:"industrial",1261:"public",1262:"public",1263:"public",1265:"public",1272:"public",1273:"public",1271:"agricultural",1274:"other",1281:"infrastructure",1282:"infrastructure"},G3=[[/^geb[\xe4a]ude$/i,"other"],[/wohn|resident|housing|bolig|enfamil|etagebolig|r\xe6kkehus|lejlighed/i,"residential"],[/b\xfcro|office|handel|commercial|butik|forretning|kontor|supermarked|lager|hotel|restaurant/i,"commercial"],[/industri|fabrik|industrial|gewerbe|produktion|fabrik|fremstill/i,"industrial"],[/landwirtschaft|agrar|agricultural|landbrug|skov|dyrk|stald|lade|drivhus/i,"agricultural"],[/schule|school|hospital|gesundheit|sundhed|kirche|church|offentlig|uddannelse|kultur|social|plejehjem/i,"public"],[/freizeit|recreation|sport|sommerhus|ferienhaus|fritid|kolonihave/i,"recreational"],[/infrastruktur|verkehr|transport|energy|energie|forsyning|teknik|teknisk/i,"infrastructure"],[/gemischt|mixed|blandet/i,"mixed"]];function Rh(r){for(const[e,t]of G3)if(e.test(r))return t}function q3(r,e){if(null==r)return;const t=String(r).trim();return"swiss-gwr"===e?z3[t]??Rh(t):"danish-matrikel"===e?OR[t]??Rh(t):"zurich-wfs"===e||"swiss-av-wfs"===e?LR[t]??Rh(t):LR[t]??OR[t]??Rh(t)}function j3(r,e){if(null!=r)return Rh(String(r).trim())}function MR(r){return r.trim().toLowerCase().replace(/[\s_\-]/g,"")}const H3={inkraft:"in-force",laufendeanderung:"amendment-pending",laufende\u00e4nderung:"amendment-pending",aenderungohnevorvirkung:"amendment-pending",aenderungohnevorwirkung:"amendment-pending",\u00e4nderungohnevorwirkung:"amendment-pending",aenderungmitvorwirkung:"amendment-in-effect",\u00e4nderungmitvorwirkung:"amendment-in-effect",\u00f6ffentlicheauflage:"proposed",offentlicheauflage:"proposed",aufgehoben:"repealed",vedtaget:"in-force",forslag:"proposed",aflyst:"repealed"};const VR={grundnutzungszonenplan:"land-use-plan",nutzungszonenplan:"land-use-plan",zonenplan:"land-use-plan",gestaltungsplan:"design-plan",bebauungsplan:"development-plan",sondernutzungsplan:"special-use-plan",quartiererhaltungszonenplan:"neighbourhood-conservation-plan",l\u00e4rmempfindlichkeitsstufenplan:"noise-sensitivity-plan",laermempfindlichkeitsstufenplan:"noise-sensitivity-plan",gew\u00e4sserschutzzonenplan:"water-protection-plan",gewasserschutzzonenplan:"water-protection-plan",grundwasserschutzzonenplan:"water-protection-plan",gew\u00e4sserschutzplan:"water-protection-plan",naturundlandschaftsschutzzonenplan:"nature-landscape-plan","natur-undlandschaftsschutzzonenplan":"nature-landscape-plan",landschaftsschutzzonenplan:"nature-landscape-plan",freihaltezone:"open-space-zone",kernzone:"land-use-plan",wald:"land-use-plan",gew\u00e4sser:"land-use-plan",gewasser:"land-use-plan",reservezone:"land-use-plan",bahnareal:"land-use-plan",erholungszone:"land-use-plan","strassen(weitere)":"land-use-plan",strassen:"land-use-plan",nichtzoniertfl\u00e4che:"unzoned",nichtzoniertefl\u00e4che:"unzoned",nichtzoniertflache:"unzoned",nichtzonierteflache:"unzoned",nichtzoniertgem\u00e4ssbzo2016:"unzoned",nichtzoniertgemassbzo2016:"unzoned",hochh\u00e4user:"overlay-regulation",hochhauser:"overlay-regulation",areal\u00fcberbauungenzul\u00e4ssig:"overlay-regulation",arealuberbauungenzulassig:"overlay-regulation",erh\u00f6hteausnutzung:"overlay-regulation",erhohteausnutzung:"overlay-regulation",erdgeschossnutzung:"overlay-regulation",freifl\u00e4chenzifferverlegungsgebiet:"overlay-regulation",freiflachenzifferverlegungsgebiet:"overlay-regulation",baumschutz:"overlay-regulation",sonderbauvorschriften:"overlay-regulation",lokalplan:"local-plan",kommuneplanramme:"municipal-plan-framework"},$3=[[/quartiererhalt/i,"neighbourhood-conservation-plan"],[/l\xe4rmempfindlich|laermempfindlich/i,"noise-sensitivity-plan"],[/gew\xe4sserschutz|grundwasserschutz/i,"water-protection-plan"],[/natur.*landschaft|landschaft.*schutz/i,"nature-landscape-plan"],[/gestaltungsplan/i,"design-plan"],[/bebauungsplan/i,"development-plan"],[/sondernutzung/i,"special-use-plan"],[/freihalt/i,"open-space-zone"],[/\xf6ffentliche.*bauten|zone.*\xf6ffentlich/i,"land-use-plan"],[/hochhaus/i,"overlay-regulation"],[/areal\xfcberbauung|arealuberbauung/i,"overlay-regulation"],[/erh\xf6hte.*ausnutzung|ausnutzung/i,"overlay-regulation"],[/erdgeschossnutzung/i,"overlay-regulation"],[/freifl\xe4chenzifferverlegung|freiflachenzifferverlegung/i,"overlay-regulation"],[/erhaltenswert/i,"overlay-regulation"],[/m[\u00e4a]ssig.*st[\u00f6o]rend|st[\u00f6o]rendes.*gewerbe/i,"overlay-regulation"],[/wohnzone/i,"land-use-plan"],[/kernzone|zentrumszone/i,"land-use-plan"],[/erholungszone|erholungs/i,"land-use-plan"],[/stra[s\xdf]en/i,"land-use-plan"],[/landwirtschaft/i,"land-use-plan"],[/\bwald\b/i,"land-use-plan"],[/\bgew[\u00e4a]sser\b/i,"land-use-plan"],[/nicht\s*zoniert/i,"unzoned"],[/baumschutz/i,"overlay-regulation"],[/sonderbauvorschrift/i,"overlay-regulation"],[/kommuneplan/i,"municipal-plan-framework"],[/lokalplan/i,"local-plan"],[/zonenplan|nutzungsplan|nutzungszone/i,"land-use-plan"],[/zone$|areal$/i,"land-use-plan"]];function q_(r){return"string"==typeof r?r:r.typeName}function j_(r){return"string"==typeof r?void 0:r.cqlFilter}function Z3(r,e,t){return t?`${r}:${e}[${t}]`:`${r}:${e}`}const eU=new Set(["building","cadastre","greenspace","paved","zone"]);function H_(r,e,t,n){const i=t.replace(/^ms:/,""),o=Ra(e),a=eU.has(e)?"priority":"raw";return{id:Z3(r,t,n),sourceId:r,sourceLayerId:t,category:e,preferredColor:o.preferredColor,tier:a,label:i,description:`Z\xfcrich WFS layer ${i}`,labelKey:`gis.layer.${r}.${i}.label`,descriptionKey:`gis.layer.${r}.${i}.description`}}class $_{categoryMap;baseUrl;sourceId;outputFormat;constructor(e){this.categoryMap=e.categoryMap,this.baseUrl=e.baseUrl??"https://maps.zh.ch/wfs/OGDZHWFS",this.sourceId=e.sourceId??"zurich-wfs",this.outputFormat=e.outputFormat??"application/json; subtype=geojson"}listFeatureCategoryDescriptors(e){var t=this;return(0,O.A)(function*(){const n=yield t.listAvailableLayers(e);return[...new Map(n.map(i=>[i.category,Ra(i.category)])).values()]})()}listAvailableLayers(e){var t=this;return(0,O.A)(function*(){const n=Object.entries(t.categoryMap);return(yield Promise.allSettled(n.flatMap(([i,o])=>o.map(function(){var a=(0,O.A)(function*(s){const l=q_(s),u=j_(s),c=yield t._fetchFeatures(e,l,1,u);return{category:i,typeName:l,cqlFilter:u,hasResults:c.features.length>0}});return function(s){return a.apply(this,arguments)}}())))).filter(i=>"fulfilled"===i.status&&i.value.hasResults).map(i=>H_(t.sourceId,i.value.category,i.value.typeName,i.value.cqlFilter))})()}getFeaturesForLayer(e,t){var n=this;return(0,O.A)(function*(){const i=n._findLayerById(t);return i?n._fetchAndConvert(e,i.descriptor,i.cqlFilter):[]})()}_fetchAndConvert(e,t,n){var i=this;return(0,O.A)(function*(){const o=yield i._fetchFeatures(e,t.sourceLayerId,void 0,n),a=n?function aU(r){const e=r.match(/^(\w+)\s*=\s*'([^']+)'$/);if(e){const[,n,i]=e;return o=>String(o?.[n]??"")===i}const t=r.match(/^(\w+)\s+IN\s*\(([^)]+)\)$/i);if(t){const[,n,i]=t,o=new Set(i.split(",").map(a=>a.trim().replace(/^'|'$/g,"")));return a=>o.has(String(a?.[n]??""))}return()=>!0}(n):void 0;return(a?o.features.filter(s=>a(s.properties)):o.features).map((s,l)=>i.toGisFeature(s,t,l))})()}listFeatureCategories(e){var t=this;return(0,O.A)(function*(){const n=yield t.listAvailableLayers(e);return[...new Set(n.map(i=>i.category))]})()}getFeaturesOfCategory(e,t){var n=this;return(0,O.A)(function*(){const i=n.categoryMap[t]??[];return(yield Promise.all(i.map(o=>{const a=q_(o),s=j_(o),l=H_(n.sourceId,t,a);return n._fetchAndConvert(e,l,s)}))).flat()})()}_findLayerById(e){const t=Object.entries(this.categoryMap);for(const[n,i]of t)for(const o of i){const a=q_(o),s=j_(o),l=H_(this.sourceId,n,a,s);if(l.id===e)return{descriptor:l,cqlFilter:s}}}_fetchFeatures(e,t,n,i){var o=this;return(0,O.A)(function*(){const[a,s,l,u]=e,h=new URLSearchParams({service:"WFS",version:"2.0.0",request:"GetFeature",typename:t,bbox:`${s},${a},${u},${l},urn:ogc:def:crs:EPSG::4326`,srsName:"EPSG:4326",outputFormat:o.outputFormat});void 0!==n&&h.set("count",String(n)),void 0!==i&&h.set("CQL_FILTER",i),h.set("outputFormat",o.outputFormat);const d=`${o.baseUrl}?${h.toString()}`,p=yield fetch(d);if(!p.ok)throw new Error(`WFS request failed for ${t} (${o.sourceId}): ${p.status} ${p.statusText}`);return p.json()})()}toGisFeature(e,t,n){const[i,o]=function Q3(r){if(!r)return[0,0];const e=r.coordinates;switch(r.type){case"Point":return e;case"MultiPoint":case"LineString":return e[0];case"MultiLineString":case"Polygon":return e[0][0];case"MultiPolygon":return e[0][0][0];default:return[0,0]}}(e.geometry),a=function J3(r,e){if(!r)return e;for(const t of["plannavn","bezeichnung","name","strassenname","objektname","title","label"])if("string"==typeof r[t]&&r[t])return r[t];return e}(e.properties,`${t.sourceLayerId}[${n}]`),s=e.bbox?[e.bbox[0],e.bbox[1],e.bbox[2],e.bbox[3]]:void 0,l=t.tier,u="priority"===l?this._extractNormalisedProperties(e,t):void 0;return{id:e.id??`${t.sourceLayerId}/${n}`,preferredColor:t.preferredColor,sourceId:this.sourceId,sourceFeatureId:e.id??`${t.sourceLayerId}/${n}`,layerId:t.id,name:a,category:t.category,type:t.sourceLayerId.replace(/^ms:/,""),lat:o,lon:i,displayName:a,bbox:s,geometry:e.geometry??void 0,tier:l,properties:u,originalData:e.properties??{}}}_extractNormalisedProperties(e,t){return"building"===t.category?function tU(r,e){if(!r)return{featureType:"building"};const t=r.grundflaeche??r.gbf??r.gebaeudegrundrissflaeche??r.flaeche??void 0,n=r.vollgeschosse??r.geschossanzahl??r.anzahl_geschosse??void 0,i=r.gebaeudefunktion??r.gfkode??r.art??r.objektart??void 0,o=r.baujahr??r.bauperiode??void 0,a=String(r.egid??r.gwr_egid??r.egris_egid??"").trim()||void 0;return{featureType:"building",areaM2:"number"==typeof t?t:void 0,buildingUse:i?String(i):void 0,buildingUseGeneric:q3(i,e),floors:"number"==typeof n?n:void 0,yearBuilt:"number"==typeof o?o:void 0,registryId:a}}(e.properties,this.sourceId):"greenspace"===t.category?function nU(r){if(!r)return{featureType:"greenspace"};const e=r.flaeche??void 0,t=r.art??void 0;return{featureType:"greenspace",areaM2:"number"==typeof e?e:void 0,surfaceType:t?String(t):void 0}}(e.properties):"paved"===t.category?function iU(r){if(!r)return{featureType:"paved"};const e=r.flaeche??void 0,t=r.art??void 0;return{featureType:"paved",areaM2:"number"==typeof e?e:void 0,surfaceType:t?String(t):void 0}}(e.properties):"zone"===t.category?function oU(r){if(!r)return{featureType:"zone"};const e=r.plannavn??r.bezeichnung??r.typ_bezeichnung??r.art??void 0,t=r.planid??r.plannummer??void 0,n=r.artcode??r.typ_code??r.abkuerzung??t??void 0,o=function FR(r){if(r)return H3[MR(r)]}(r.rechtsstatus??r.status??void 0),s=function BR(r){if(!r)return;const e=MR(r);if(e in VR)return VR[e];for(const[t,n]of $3)if(t.test(r))return n;console.warn(`[cue-gis] Unknown zone plan type \u2014 add "${r}" to classifyZonePlanType: no ZonePlanType mapping found.`)}(r.typ_gde_bezeichnung??void 0),l=r.dagsordenpunkt_url??r.dokument_url??r.link??void 0,u=r.auflagedatum??void 0,c=r.festsetzungsdatum??void 0,h=r.genehmigungsdatum??void 0,d=r.inkraftsetzungsdatum??void 0,p=r.flaeche??r.flaeche_m2??void 0;return{featureType:"zone",zoneType:e?String(e):void 0,zoneCode:n?String(n):void 0,legalStatus:o,planType:s,planId:t?String(t):void 0,planDocumentLink:l?String(l):void 0,publicationDate:u??void 0,fixingDate:c??void 0,approvalDate:h??void 0,effectiveFrom:d??void 0,areaM2:"number"==typeof p?p:void 0}}(e.properties):function rU(r){if(!r)return{featureType:"plot"};const t=r.egris_egrid??r.egrid??void 0,n=r.nummer??void 0,i=r.nbident??void 0,o=n&&i?`${n}, ${i}`:n??void 0,a=r.flaechenmass??r.flaeche??void 0,s=r.art??r.nutzungsart??void 0;return{featureType:"plot",areaM2:"number"==typeof a?a:void 0,plotUse:s?String(s):void 0,plotUseGeneric:j3(s),plotId:o,registryId:t}}(e.properties)}}new $_({categoryMap:{address:["ms:ogd-0406_arv_basis_avzh_hausnummer_pos_p","ms:ogd-0571_afv_gv_strat_strassennetz_l"],poi:["ms:ogd-0053_giszhpub_ogd_veloparkieranlagen_p","ms:ogd-0406_arv_basis_avzh_gebaeudeeingang_p"],railway:["ms:ogd-0529_afv_gv_seilbahn_skilift_l","ms:ogd-0529_afv_gv_seilbahn_skilift_p"],natural:["ms:ogd-0045_giszhpub_wb_fliessgewaesser_l","ms:ogd-0045_giszhpub_wb_stehgewaesser_f","ms:ogd-0111_giszhpub_wald_waldareal_f"],manmade:["ms:ogd-0248_giszhpub_en_gebaeude_volumen_ha_f",{typeName:"ms:ogd-0401_arv_basis_avzh_bodenbedeckung_f",cqlFilter:"art IN ('Bahngebiet', 'Strasse_Weg', 'Flugplatz', 'Bruecke')"}],building:[{typeName:"ms:ogd-0401_arv_basis_avzh_bodenbedeckung_f",cqlFilter:"art = 'Geb\xe4ude'"}],greenspace:[{typeName:"ms:ogd-0401_arv_basis_avzh_bodenbedeckung_f",cqlFilter:"art IN ('Gartenanlage', 'Parkanlage', 'Spielplatz', 'Sportanlage', 'Friedhof', 'Gehoelz', 'Feuchtgebiet')"}],paved:[{typeName:"ms:ogd-0401_arv_basis_avzh_bodenbedeckung_f",cqlFilter:"art IN ('befBoden', 'befestigte Fl\xe4che', 'Hof', 'Trottoir', 'Parkplatz')"}],cadastre:["ms:ogd-0404_arv_basis_avzh_liegenschaften_f","ms:ogd-0404_arv_basis_avzh_selbstrecht_f"],zone:["ms:ogd-0156_arv_basis_np_gn_zonenflaeche_f","ms:ogd-0155_arv_basis_np_ul_flaeche_f"]}}),new $_({sourceId:"swiss-av-wfs",baseUrl:"https://wfs.geodienste.ch/av_0/deu",categoryMap:{cadastre:["ms:RESF","ms:DPRSF"]}}),new $_({sourceId:"danish-plandata",baseUrl:"https://wfs.plandata.dk/geoserver/pdk/wfs",outputFormat:"application/json",categoryMap:{zone:["pdk:lokalplan_vedtaget","pdk:kommuneplanramme_vedtaget"]}});const Un={qcy:"https://dev.qaecy.com/ont#","qcy-e":"https://dev.qaecy.com/enum#","qcy-l":"https://dev.qaecy.com/logs#","qcy-f":"https://dev.qaecy.com/functions#",obc:"https://w3id.org/obc#",dicc:"https://w3id.org/digitalconstruction/0.5/Contexts#",dicv:"https://w3id.org/digitalconstruction/0.5/Variables#",dice:"https://w3id.org/digitalconstruction/0.5/Entities#",dicp:"https://w3id.org/digitalconstruction/0.5/Processes#",dica:"https://w3id.org/digitalconstruction/0.5/Agents#",dici:"https://w3id.org/digitalconstruction/0.5/Information#",dicbm:"https://w3id.org/digitalconstruction/0.5/Materials#",dicob:"https://w3id.org/digitalconstruction/0.5/Occupancy#",dicl:"https://w3id.org/digitalconstruction/0.5/Lifecycle#",dices:"https://w3id.org/digitalconstruction/0.5/Energy#",dicu:"https://w3id.org/digitalconstruction/0.5/Units#",diclvl:"https://w3id.org/digitalconstruction/0.5/Levels#",dicstg:"https://w3id.org/digitalconstruction/0.5/Stages#"},dl={madsrdf:"http://www.loc.gov/mads/rdf/v1#",bflc:"http://id.loc.gov/ontologies/bflc/",foaf:"http://xmlns.com/foaf/0.1/",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",dbo:"http://dbpedia.org/ontology/",rdfs:"http://www.w3.org/2000/01/rdf-schema#",yago:"http://yago-knowledge.org/resource/",dc:"http://purl.org/dc/elements/1.1/",dbp:"http://dbpedia.org/property/",owl:"http://www.w3.org/2002/07/owl#",ex:"http://example.org/",gr:"http://purl.org/goodrelations/v1#",skos:"http://www.w3.org/2004/02/skos/core#",spacerel:"http://data.ordnancesurvey.co.uk/ontology/spatialrelations/",geo:"http://www.opengis.net/ont/geosparql#",xsd:"http://www.w3.org/2001/XMLSchema#",dcat:"http://www.w3.org/ns/dcat#",org:"http://www.w3.org/ns/org#",dct:"http://purl.org/dc/terms/",qb:"http://purl.org/linked-data/cube#",dcterms:"http://purl.org/dc/terms/",prov:"http://www.w3.org/ns/prov#",sioc:"http://rdfs.org/sioc/ns#",xtypes:"http://purl.org/xtypes/",dbpedia:"http://dbpedia.org/resource/",schema:"http://schema.org/",ont:"http://purl.org/net/ns/ontology-annot#",void:"http://rdfs.org/ns/void#",onto:"http://www.ontotext.com/",sio:"http://semanticscience.org/resource/",bf:"http://id.loc.gov/ontologies/bibframe/",search:"http://sindice.com/vocab/search#",obo:"http://purl.obolibrary.org/obo/",sd:"http://www.w3.org/ns/sparql-service-description#",dcterm:"http://purl.org/dc/terms/",frbr:"http://purl.org/vocab/frbr/core#",stat:"http://www.w3.org/ns/posix/stat#",vcard:"http://www.w3.org/2006/vcard/ns#",commerce:"http://search.yahoo.com/searchmonkey/commerce/",bibo:"http://purl.org/ontology/bibo/",rss:"http://purl.org/rss/1.0/",dbr:"http://dbpedia.org/resource/",gldp:"http://www.w3.org/ns/people#",pto:"http://www.productontology.org/id/",geonames:"http://www.geonames.org/ontology#",fb:"http://rdf.freebase.com/ns/",event:"http://purl.org/NET/c4dm/event.owl#",oo:"http://purl.org/openorg/",wd:"http://www.wikidata.org/entity/",dcmit:"http://purl.org/dc/dcmitype/",content:"http://purl.org/rss/1.0/modules/content/",cc:"http://creativecommons.org/ns#",gen:"http://purl.org/gen/0.1#",doap:"http://usefulinc.com/ns/doap#",http:"http://www.w3.org/2011/http#",dbpprop:"http://dbpedia.org/property/",vann:"http://purl.org/vocab/vann/",rr:"http://www.w3.org/ns/r2rml#",swrc:"http://swrc.ontoware.org/ontology#",drugbank:"http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/",md:"http://www.w3.org/ns/md#",sc:"http://purl.org/science/owl/sciencecommons/",nie:"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#",prog:"http://purl.org/prog/",wot:"http://xmlns.com/wot/0.1/",ma:"http://www.w3.org/ns/ma-ont#",akt:"http://www.aktors.org/ontology/portal#",fn:"http://www.w3.org/2005/xpath-functions#",cv:"http://rdfs.org/resume-rdf/",aiiso:"http://purl.org/vocab/aiiso/schema#",tl:"http://purl.org/NET/c4dm/timeline.owl#",swc:"http://data.semanticweb.org/ns/swc/ontology#",ov:"http://open.vocab.org/terms/",as:"https://www.w3.org/ns/activitystreams#",crm:"http://www.cidoc-crm.org/cidoc-crm/",ical:"http://www.w3.org/2002/12/cal/ical#",daia:"http://purl.org/ontology/daia/",vs:"http://www.w3.org/2003/06/sw-vocab-status/ns#",xhtml:"http://www.w3.org/1999/xhtml#",earl:"http://www.w3.org/ns/earl#",rel:"http://purl.org/vocab/relationship/",bio:"http://purl.org/vocab/bio/0.1/",rdfg:"http://www.w3.org/2004/03/trix/rdfg-1/",marcrel:"http://id.loc.gov/vocabulary/relators/",mo:"http://purl.org/ontology/mo/",leaks:"https://cuzin.com/",dv:"http://rdf.data-vocabulary.org/#",cs:"http://purl.org/vocab/changeset/schema#",ad:"http://schemas.talis.com/2005/address/schema#",xhv:"http://www.w3.org/1999/xhtml/vocab#",co:"http://purl.org/ontology/co/core#",dc11:"http://purl.org/dc/elements/1.1/",prop:"http://dbpedia.org/property/",bill:"http://www.rdfabout.com/rdf/schema/usbill/",og:"http://opengraphprotocol.org/schema/",afn:"http://jena.apache.org/ARQ/function#",factbook:"http://wifo5-04.informatik.uni-mannheim.de/factbook/ns#",dbowl:"http://ontology.cybershare.utep.edu/dbowl/relational-to-ontology-mapping-primitive.owl#",air:"http://dig.csail.mit.edu/TAMI/2007/amord/air#",test2:"http://this.invalid/test2#",musim:"http://purl.org/ontology/similarity/",unit:"http://qudt.org/vocab/unit/",log:"http://www.w3.org/2000/10/swap/log#",book:"http://purl.org/NET/book/vocab#",xs:"http://www.w3.org/2001/XMLSchema#",mu:"http://mu.semte.ch/vocabularies/core/",ir:"http://www.ontologydesignpatterns.org/cp/owl/informationrealization.owl#",media:"http://search.yahoo.com/searchmonkey/media/",d2rq:"http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#",dcq:"http://purl.org/dc/qualifiers/1.0/",xfn:"http://gmpg.org/xfn/11#",biblio:"http://purl.org/net/biblio#",reco:"http://purl.org/reco#",xf:"http://www.w3.org/2002/xforms/",tag:"http://www.holygoat.co.uk/owl/redwood/0.1/tags/",cld:"http://purl.org/cld/terms/",cal:"http://www.w3.org/2002/12/cal/ical#",ome:"http://purl.org/ontomedia/core/expression#",ctag:"http://commontag.org/ns#",botany:"http://purl.org/NET/biol/botany#",dir:"http://schemas.talis.com/2005/dir/schema#",sism:"http://purl.oclc.org/NET/sism/0.1/",admin:"http://webns.net/mvcb/",days:"http://ontologi.es/days#",xmp:"http://ns.adobe.com/xap/1.0/",rif:"http://www.w3.org/2007/rif#",dcam:"http://purl.org/dc/dcam/",tzont:"http://www.w3.org/2006/timezone#",af:"http://purl.org/ontology/af/",osag:"http://www.ordnancesurvey.co.uk/ontology/AdministrativeGeography/v2.0/AdministrativeGeography.rdf#",rev:"http://purl.org/stuff/rev#",qudt:"http://qudt.org/schema/qudt/",sr:"http://www.openrdf.org/config/repository/sail#",time:"http://www.w3.org/2006/time#",pc:"http://purl.org/procurement/public-contracts#",myspace:"http://purl.org/ontology/myspace#",math:"http://www.w3.org/2000/10/swap/math#",cmp:"http://www.ontologydesignpatterns.org/cp/owl/componency.owl#",memo:"http://ontologies.smile.deri.ie/2009/02/27/memo#",ok:"http://okkam.org/terms#",lomvoc:"http://ltsc.ieee.org/rdf/lomv1p0/vocabulary#",giving:"http://ontologi.es/giving#",jdbc:"http://d2rq.org/terms/jdbc/",swanq:"http://purl.org/swan/1.2/qualifiers/",dcn:"http://www.w3.org/2007/uwa/context/deliverycontext.owl#",sdmx:"http://purl.org/linked-data/sdmx#",cfp:"http://sw.deri.org/2005/08/conf/cfp.owl#",swande:"http://purl.org/swan/1.2/discourse-elements/",omn:"http://open-multinet.info/ontology/omn#",owlim:"http://www.ontotext.com/trree/owlim#",cyc:"http://sw.opencyc.org/concept/",gn:"http://www.geonames.org/ontology#",con:"http://www.w3.org/2000/10/swap/pim/contact#",lyou:"http://purl.org/linkingyou/",skosxl:"http://www.w3.org/2008/05/skos-xl#",oa:"http://www.w3.org/ns/oa#",openlinks:"http://www.openlinksw.com/schemas/virtrdf#",cdm:"http://publications.europa.eu/ontology/cdm#",sdmxdim:"http://purl.org/linked-data/sdmx/2009/dimension#",adms:"http://www.w3.org/ns/adms#",type:"https://webiomed.ai/blog/obzor-rossiiskikh-sistem-podderzhki-priniatiia-vrachebnykh-reshenii/",om:"http://opendata.caceres.es/def/ontomunicipio#",nif:"http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#",ontology:"http://dbpedia.org/ontology/",db:"http://dbpedia.org/",photoshop:"http://ns.adobe.com/photoshop/1.0/",wfs:"http://schemas.opengis.net/wfs/",lemon:"http://lemon-model.net/lemon#",exif:"http://www.w3.org/2003/12/exif/ns#",gvp:"http://vocab.getty.edu/ontology#",ac:"http://umbel.org/umbel/ac/",isbd:"http://iflastandards.info/ns/isbd/elements/",sdmxa:"http://purl.org/linked-data/sdmx/2009/attribute#",xsi:"http://www.w3.org/2001/XMLSchema-instance#",aat:"http://vocab.getty.edu/aat/",fabio:"http://purl.org/spar/fabio/",sh:"http://www.w3.org/ns/shacl#",cert:"http://www.w3.org/ns/auth/cert#",wdt:"http://www.wikidata.org/prop/direct/",dul:"http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#",prism:"http://prismstandard.org/namespaces/basic/2.0/",swrl:"http://www.w3.org/2003/11/swrl#",test:"https://test4.example.com/",cnt:"http://www.w3.org/2011/content#",eat:"http://www.eat.rl.ac.uk/#",tgn:"http://vocab.getty.edu/tgn/",ulan:"http://vocab.getty.edu/ulan/",edm:"http://www.europeana.eu/schemas/edm/",sf:"http://www.opengis.net/ont/sf#",ore:"http://www.openarchives.org/ore/terms/",swrcfe:"http://www.morelab.deusto.es/ontologies/swrcfe#",gtfs:"http://vocab.gtfs.org/terms#",voaf:"http://purl.org/vocommons/voaf#",uniprot:"http://purl.uniprot.org/uniprot/",core:"http://vivoweb.org/ontology/core#",swrlb:"http://www.w3.org/2003/11/swrlb#",eg:"http://www.example.org/",nfo:"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#",room:"http://vocab.deri.ie/rooms#",ssn:"http://www.w3.org/ns/ssn/",dbc:"http://dbpedia.org/resource/Category:",go:"http://purl.obolibrary.org/obo/GO_",scovo:"http://purl.org/NET/scovo#",lv:"http://purl.org/lobid/lv#",ceo:"https://linkeddata.cultureelerfgoed.nl/def/ceo#",music:"http://musicontology.com/",dbprop:"http://dbpedia.org/property/",movie:"http://data.linkedmdb.org/resource/movie/",fise:"http://fise.iks-project.eu/ontology/",xml:"http://www.w3.org/XML/1998/namespace/",bif:"http://www.openlinksw.com/schemas/bif#",ldp:"http://www.w3.org/ns/ldp#",sioct:"http://rdfs.org/sioc/types#",wikidata:"http://www.wikidata.org/entity/",siocserv:"http://rdfs.org/sioc/services#",itsrdf:"http://www.w3.org/2005/11/its/rdf#",lexinfo:"http://www.lexinfo.net/ontology/3.0/lexinfo#",ro:"http://purl.org/wf4ever/ro#",geoes:"http://geo.linkeddata.es/ontology/",ping:"https://namso-gen.com/",am:"http://vocab.deri.ie/am#",gndo:"http://d-nb.info/standards/elementset/gnd#",coref:"http://www.rkbexplorer.com/ontologies/coref#",pat:"http://purl.org/hpi/patchr#",ptr:"http://www.w3.org/2009/pointers#",cco:"http://www.ontologyrepository.com/CommonCoreOntologies/",nmo:"http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#",mods:"http://www.loc.gov/mods/v3#",loc:"http://purl.org/ontomedia/core/space#",dblp:"http://dblp.uni-trier.de/rdf/schema-2015-01-26#",nao:"http://www.semanticdesktop.org/ontologies/2007/08/15/nao#",acc:"http://purl.org/NET/acc#",nsogi:"http://prefix.cc/nsogi:",gnd:"http://d-nb.info/gnd/",pmlj:"http://inference-web.org/2.0/pml-justification.owl#",dce:"http://purl.org/dc/elements/1.1/",chebi:"http://purl.obolibrary.org/obo/CHEBI_",wp:"http://vocabularies.wikipathways.org/",product:"http://purl.org/commerce/product#",whois:"http://www.kanzaki.com/ns/whois#",bd:"http://www.bigdata.com/rdf#",imm:"http://schemas.microsoft.com/imm/",sparql:"http://www.w3.org/ns/sparql#",gold:"http://purl.org/linguistics/gold/",doc:"http://www.w3.org/2000/10/swap/pim/doc#",leak:"http://maco.com/",up:"http://purl.uniprot.org/core/",cerif:"http://spi-fm.uca.es/neologism/cerif#",rec:"http://purl.org/ontology/rec/core#",gd:"http://rdf.data-vocabulary.org/#",sdo:"https://schema.org/",list:"http://www.w3.org/2000/10/swap/list#",georss:"http://www.georss.org/georss/",sec:"https://w3id.org/security#",java:"http://www.w3.org/2007/uwa/context/java.owl#",meta:"https://krr.triply.cc/krr/sameas-meta/def/",rsa:"http://www.w3.org/ns/auth/rsa#",space:"http://purl.org/net/schemas/space/",ti:"http://www.ontologydesignpatterns.org/cp/owl/timeinterval.owl#",example:"http://www.example.org/rdf#",opm:"https://w3id.org/opm#",xlink:"https://es.scribd.com/doc/79794476/05-Ejercicios-Resueltos-Caja-Negra-y-Recapitulacion/",lgd:"http://linkedgeodata.org/triplify/",cube:"https://cube.link/",akts:"http://www.aktors.org/ontology/support#",geosparql:"http://www.opengis.net/ont/geosparql#",ms:"http://purl.org/obo/owl/MS#",wiki:"http://en.wikipedia.org/wiki/",penn:"http://purl.org/olia/penn.owl#",iot:"http://iotschema.org/",bp:"http://www.biopax.org/release/biopax-level3.owl#",mf:"http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",acl:"http://www.w3.org/ns/auth/acl#",geof:"http://www.opengis.net/def/function/geosparql/",hg:"http://rdf.histograph.io/",pext:"http://www.ontotext.com/proton/protonext#",video:"http://purl.org/ontology/video#",rdfsharp:"https://rdfsharp.codeplex.com/",cro:"http://rhizomik.net/ontologies/copyrightonto.owl#",cito:"http://purl.org/spar/cito/",sim:"http://www.w3id.org/simulation/ontology/",vivo:"http://vivoweb.org/ontology/core#",st:"http://ns.inria.fr/sparql-template/",httph:"http://www.w3.org/2007/ont/httph#",kb:"http://deductions.sf.net/ontology/knowledge_base.owl#",api:"http://purl.org/linked-data/api/vocab#",dbpediaowl:"http://dbpedia.org/owl/",sp:"http://spinrdf.org/sp#",nt:"http://ns.inria.fr/nicetag/2010/09/09/voc#",wn:"http://xmlns.com/wordnet/1.6/",nco:"http://www.semanticdesktop.org/ontologies/2007/03/22/nco#",acm:"http://www.rkbexplorer.com/ontologies/acm#",xl:"http://langegger.at/xlwrap/vocab#",pim:"http://www.w3.org/ns/pim/space#",exterms:"http://www.example.org/terms/",web:"http://www.w3.org/2007/uwa/context/web.owl#",wgs:"http://www.w3.org/2003/01/geo/wgs84_pos#",dcatapit:"http://dati.gov.it/onto/dcatapit#",atom:"http://www.w3.org/2005/Atom/",olia:"http://purl.org/olia/olia.owl#",bag:"https://bag2.basisregistraties.overheid.nl/bag/def/",cgov:"http://reference.data.gov.uk/def/central-government/",overheid:"http://standaarden.overheid.nl/owms/",sider:"http://www4.wiwiss.fu-berlin.de/sider/resource/sider/",po:"http://purl.org/ontology/po/",lode:"http://linkedevents.org/ontology/",postcode:"http://data.ordnancesurvey.co.uk/id/postcodeunit/",ocd:"http://dati.camera.it/ocd/",sirext:"http://t.me/sirextt/247:",urn:"http://fliqz.com/",pgterms:"http://www.gutenberg.org/2009/pgterms/",dbnary:"http://kaiko.getalp.org/dbnary#",abc:"http://www.metadata.net/harmony/ABCSchemaV5Commented.rdf#",dbkwik:"http://dbkwik.webdatacommons.org/",cidoc:"http://www.cidoc-crm.org/cidoc-crm/",dco:"http://info.deepcarbon.net/schema#",seas:"https://w3id.org/seas/",pav:"http://purl.org/pav/",wdrs:"http://www.w3.org/2007/05/powder-s#",formats:"http://www.w3.org/ns/formats/",service:"http://purl.org/ontology/service#",ean:"http://openean.kaufkauf.net/id/",eu:"http://eulersharp.sourceforge.net/2003/03swap/log-rules#",zoology:"http://purl.org/NET/biol/zoology#",cpa:"http://www.ontologydesignpatterns.org/schemas/cpannotationschema.owl#",ass:"http://uptheasset.org/ontology#",purl:"http://www.purl.org/",lime:"http://www.w3.org/ns/lemon/lime#",admingeo:"http://data.ordnancesurvey.co.uk/ontology/admingeo/",wn20schema:"http://www.w3.org/2006/03/wn/wn20/schema/",smf:"http://topbraid.org/sparqlmotionfunctions#",ecs:"http://rdf.ecs.soton.ac.uk/ontology/ecs#",prv:"http://purl.org/net/provenance/ns#",gsp:"http://www.opengis.net/ont/geosparql#",daml:"http://www.daml.org/2001/03/daml+oil#",dcm:"http://purl.org/dc/dcmitype/",rdfdf:"http://www.openlinksw.com/virtrdf-data-formats#",pr:"http://purl.org/ontology/prv/core#",ontolex:"http://www.w3.org/ns/lemon/ontolex#",role:"https://w3id.org/role/",resource:"http://dbpedia.org/resource/",swid:"http://semanticweb.org/id/",edam:"http://edamontology.org/",ya:"http://blogs.yandex.ru/schema/foaf/",irw:"http://www.ontologydesignpatterns.org/ont/web/irw.owl#",name:"http://example.org/name#",greg:"http://kasei.us/about/foaf.xrdf#",hydra:"http://www.w3.org/ns/hydra/core#",spin:"http://spinrdf.org/spin#",ignf:"http://data.ign.fr/def/ignf#",scot:"http://rdfs.org/scot/ns#",ndl:"http://schemas.ogf.org/nml/2013/05/base#",wo:"http://purl.org/ontology/wo/",xkos:"http://rdf-vocabulary.ddialliance.org/xkos#",omt:"http://purl.org/ontomedia/ext/common/trait#",pmt:"http://tipsy.googlecode.com/svn/trunk/vocab/pmt#",user:"http://schemas.talis.com/2005/user/schema#",umbelrc:"http://umbel.org/umbel/rc/",wikipedia:"https://en.wikipedia.org/wiki/",myspo:"http://purl.org/ontology/myspace#",agg:"http://purl.org/twc/health/vocab/aggregate/",organism:"http://eulersharp.sourceforge.net/2003/03swap/organism#",site:"http://ns.ontowiki.net/SysOnt/Site/",res:"http://dbpedia.org/resource/",sdl:"http://purl.org/vocab/riro/sdl#",euvoc:"http://publications.europa.eu/ontology/euvoc#",bmo:"http://collection.britishmuseum.org/id/ontology/",faldo:"http://biohackathon.org/resource/faldo#",blt:"http://www.bl.uk/schemas/bibliographic/blterms#",sesame:"http://www.openrdf.org/schema/sesame#",resist:"http://www.rkbexplorer.com/ontologies/resist#",iao:"http://purl.obolibrary.org/obo/IAO_",inno:"http://purl.org/innovation/ns#",premis:"http://www.loc.gov/premis/rdf/v3/",bing:"http://bing.com/schema/media/",label:"http://purl.org/net/vocab/2004/03/label#",prj:"http://purl.org/stuff/project/",npg:"http://ns.nature.com/terms/",fresnel:"http://www.w3.org/2004/09/fresnel#",omb:"http://purl.org/ontomedia/ext/common/being#",rov:"http://www.w3.org/ns/regorg#",saref:"https://saref.etsi.org/core/",biol:"http://purl.org/NET/biol/ns#",iso:"http://purl.org/iso25964/skos-thes#",bibframe:"http://id.loc.gov/ontologies/bibframe/",won:"https://w3id.org/won/core#",link:"http://www.w3.org/2007/ont/link#",audio:"http://purl.org/media/audio#",tmo:"http://www.semanticdesktop.org/ontologies/2008/05/20/tmo#",sit:"http://www.ontologydesignpatterns.org/cp/owl/situation.owl#",fed:"http://www.openrdf.org/config/sail/federation#",swp:"http://www.w3.org/2004/03/trix/swp-2/",biocore:"http://bio2rdf.org/core#",mm:"http://linkedmultimedia.org/sparql-mm/ns/2.0.0/function#",umbel:"http://umbel.org/umbel#",phil:"http://philosurfical.open.ac.uk/ontology/philosurfical.owl#",uco:"http://purl.org/uco/ns#",wgs84:"http://www.w3.org/2003/01/geo/wgs84_pos#",food:"http://purl.org/foodontology#",cordis:"http://cordis.europa.eu/projects/",rdau:"http://rdaregistry.info/Elements/u/",gist:"http://ontologies.semanticarts.com/gist#",ero:"http://purl.obolibrary.org/obo/",wv:"http://vocab.org/waiver/terms/",ref:"http://purl.org/vocab/relationship/",sml:"https://w3id.org/sml/def#",oad:"http://lod.xdams.org/reload/oad/",spl:"http://spinrdf.org/spl#",lx:"http://purl.org/NET/lx#",es:"http://eulersharp.sourceforge.net/2003/03swap/log-rules#",conv:"http://purl.org/twc/vocab/conversion/",ps:"https://w3id.org/payswarm#",acco:"http://purl.org/acco/ns#",code:"http://telegraphis.net/ontology/measurement/code#",sco:"http://purl.org/ontology/sco#",rnews:"http://iptc.org/std/rNews/2011-10-07#",ub:"http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#",protege:"http://protege.stanford.edu/system#",lgdo:"http://linkedgeodata.org/ontology/",oc:"http://opencoinage.org/rdf/",doac:"http://ramonantonio.net/doac/0.1/#",taxo:"http://purl.org/rss/1.0/modules/taxonomy/",rail:"http://ontologi.es/rail/vocab#",ludo:"http://ns.inria.fr/ludo/v1#",cpm:"http://catalogus-professorum.org/cpm/2/",opensearch:"http://a9.com/-/spec/opensearch/1.1/",so:"http://schema.org/",efo:"http://www.ebi.ac.uk/efo/",linkedmdb:"http://data.linkedmdb.org/",airport:"http://www.daml.org/2001/10/html/airport-ont#",bio2rdf:"http://bio2rdf.org/",spc:"http://purl.org/ontomedia/core/space#",meteo:"http://purl.org/ns/meteo#",bne:"http://datos.bne.es/resource/",awol:"http://bblfish.net/work/atom-owl/2006-06-06/#",dctype:"http://purl.org/dc/dcmitype/",omp:"http://purl.org/ontomedia/ext/common/profession#",granatum:"http://chem.deri.ie/granatum/",dwc:"http://rs.tdwg.org/dwc/terms/",lom:"http://ltsc.ieee.org/rdf/lomv1p0/lom#",disco:"http://rdf-vocabulary.ddialliance.org/discovery#",act:"http://www.w3.org/2007/rif-builtin-action#",taxon:"http://purl.org/biodiversity/taxon/",net:"http://www.w3.org/2007/uwa/context/network.owl#",gpt:"http://purl.org/vocab/riro/gpt#",mit:"http://purl.org/ontology/mo/mit#",isothes:"http://purl.org/iso25964/skos-thes#",lu:"http://www.ontologydesignpatterns.org/ont/framenet/abox/lu/",ao:"http://purl.org/ontology/ao/core#",sport:"http://purl.org/ontology/sport/",hp:"http://purl.org/voc/hp/",gso:"http://www.w3.org/2006/gen/ont#",xhe:"http://buzzword.org.uk/rdf/xhtml-elements#",frir:"http://purl.org/twc/ontology/frir.owl#",powder:"http://www.w3.org/2007/05/powder#",omm:"http://purl.org/ontomedia/core/media#",bibtex:"http://purl.org/net/nknouf/ns/bibtex#",wordnet:"http://wordnet-rdf.princeton.edu/ontology#",fec:"http://www.rdfabout.com/rdf/schema/usfec/",asn:"http://purl.org/ASN/schema/core/",tdb:"http://jena.hpl.hp.com/2008/tdb#",atomix:"http://buzzword.org.uk/rdf/atomix#",pbo:"http://purl.org/ontology/pbo/core#",orges:"http://datos.gob.es/def/sector-publico/organizacion#",rep:"http://www.openrdf.org/config/repository#",obj:"http://www.openrdf.org/rdf/2009/object#",library:"http://purl.org/library/",compass:"http://purl.org/net/compass#",lfm:"http://purl.org/ontology/last-fm/",crypto:"http://www.w3.org/2000/10/swap/crypto#",rdrel:"http://rdvocab.info/RDARelationshipsWEMI/",doclist:"http://www.junkwork.net/xml/DocumentList#",rei:"http://www.w3.org/2004/06/rei#",os:"http://www.w3.org/2000/10/swap/os#",vra:"http://purl.org/vra/",cheminf:"http://www.semanticweb.org/ontologies/cheminf.owl#",fbgeo:"http://rdf.freebase.com/ns/location/geocode/",mime:"https://www.iana.org/assignments/media-types/",muto:"http://purl.org/muto/core#",lang:"http://ontologi.es/lang/core#",pom:"http://maven.apache.org/POM/4.0.0#",txn:"http://lod.taxonconcept.org/ontology/txn.owl#",oauth:"http://demiblog.org/vocab/oauth#",affy:"http://www.affymetrix.com/community/publications/affymetrix/tmsplice#",ire:"http://www.ontologydesignpatterns.org/cpont/ire.owl#",ngeo:"http://geovocab.org/geometry#",ddc:"http://purl.org/NET/decimalised#",money:"http://purl.org/net/rdf-money/",conversion:"http://purl.org/twc/vocab/conversion/",game:"http://data.totl.net/game/",eco:"http://www.ebusiness-unibw.org/ontologies/eclass/5.1.4/#",custom:"http://www.openrdf.org/config/sail/custom#",vocab:"http://rdf.ontology2.com/vocab#",swh:"http://plugin.org.uk/swh-plugins/",soft:"http://www.w3.org/2007/uwa/context/software.owl#",contact:"http://www.w3.org/2000/10/swap/pim/contact#",xen:"http://buzzword.org.uk/rdf/xen#",hard:"http://www.w3.org/2007/uwa/context/hardware.owl#",lfn:"http://www.dotnetrdf.org/leviathan#",nrl:"http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#",politico:"http://www.rdfabout.com/rdf/schema/politico/",dailymed:"http://www4.wiwiss.fu-berlin.de/dailymed/resource/dailymed/",vsr:"http://purl.org/twc/vocab/vsr#",string:"http://www.w3.org/2000/10/swap/string#",bib:"http://zeitkunst.org/bibtex/0.1/bibtex.owl#",bfo:"http://purl.obolibrary.org/obo/",sede:"http://eventography.org/sede/0.1/",omc:"http://purl.org/ontomedia/ext/common/bestiary#",climb:"http://climb.dataincubator.org/vocabs/climb/",usgov:"http://www.rdfabout.com/rdf/schema/usgovt/",ct:"http://data.linkedct.org/resource/linkedct/",interval:"http://reference.data.gov.uk/def/intervals/",bbc:"http://www.bbc.co.uk/ontologies/news/",soc:"http://purl.org/net/hdlipcores/ontology/soc#",locn:"http://www.w3.org/ns/locn#",stanford:"http://purl.org/olia/stanford.owl#",cycann:"http://sw.cyc.com/CycAnnotations_v1#",aos:"http://rdf.muninn-project.org/ontologies/appearances#",apivc:"http://purl.org/linked-data/api/vocab#",aifb:"http://www.aifb.kit.edu/id/",person:"http://www.w3.org/ns/person#",ui:"http://www.w3.org/ns/ui#",scv:"http://purl.org/NET/scovo#",rdac:"http://rdaregistry.info/Elements/c/",deo:"http://purl.org/spar/deo/",isq:"http://purl.org/ontology/is/quality/",coo:"http://purl.org/coo/ns#",bsb:"http://opacplus.bsb-muenchen.de/title/",coin:"http://purl.org/court/def/2009/coin#",eli:"http://data.europa.eu/eli/ontology#",sv:"http://schemas.talis.com/2005/service/schema#",biopax:"http://www.biopax.org/release/biopax-level3.owl#",xro:"http://purl.org/xro/ns#",dnr:"http://www.dotnetrdf.org/configuration#",pro:"http://purl.org/hpi/patchr#",sosa:"http://www.w3.org/ns/sosa/",vso:"http://purl.org/vso/ns#",mysql:"http://web-semantics.org/ns/mysql/",courseware:"http://courseware.rkbexplorer.com/ontologies/courseware#",lvont:"http://lexvo.org/ontology#",is:"http://purl.org/ontology/is/core#",xds:"http://www.w3.org/2001/XMLSchema#",zem:"http://s.zemanta.com/ns#",rs:"http://rightsstatements.org/vocab/",arch:"http://purl.org/archival/vocab/arch#",cex:"http://purl.org/weso/ontology/computex#",com:"http://purl.org/commerce#",arg:"http://rdfs.org/sioc/argument#",push:"http://www.w3.org/2007/uwa/context/push.owl#",ic:"http://imi.go.jp/ns/core/rdf#",chord:"http://purl.org/ontology/chord/",pdo:"http://ontologies.smile.deri.ie/pdo#",yoda:"http://purl.org/NET/yoda#",dt:"http://w3id.org/dt#",isi:"http://purl.org/ontology/is/inst/",gob:"http://purl.org/ontology/last-fm/",gml:"http://www.opengis.net/ont/gml#",worldbank:"http://worldbank.270a.info/dataset/",states:"http://www.w3.org/2005/07/aaa#",prot:"http://www.proteinontology.info/po.owl#",moat:"http://moat-project.org/ns#",uri:"http://purl.org/NET/uri#",dbpp:"http://dbpedia.org/property/",dso:"http://purl.org/ontology/dso#",muo:"http://purl.oclc.org/NET/muo/muo#",ttl:"http://www.w3.org/2008/turtle#",cpv:"http://purl.org/weso/cpv/",city:"http://datos.localidata.com/def/City#",pmlr:"http://inference-web.org/2.0/pml-relation.owl#",dady:"http://purl.org/NET/dady#",ist:"http://purl.org/ontology/is/types/",conserv:"http://conserv.deri.ie/ontology#",pos:"http://www.w3.org/2003/01/geo/wgs84_pos#",wdr:"http://www.w3.org/2007/05/powder#",freebase:"http://rdf.freebase.com/ns/",cogs:"http://vocab.deri.ie/cogs#",swanco:"http://purl.org/swan/1.2/swan-commons/",resex:"http://resex.rkbexplorer.com/ontologies/resex#",fea:"http://vocab.data.gov/def/fea#",odrl:"http://www.w3.org/ns/odrl/2/",lex:"http://purl.org/lex#",article:"http://ogp.me/ns/article#",dcmitype:"http://purl.org/dc/dcmitype/",profiling:"http://ontologi.es/profiling#",payment:"http://reference.data.gov.uk/def/payment#",xforms:"http://www.w3.org/2002/xforms/",nexif:"http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#",viaf:"http://viaf.org/viaf/",tio:"http://purl.org/tio/ns#",nsa:"http://multimedialab.elis.ugent.be/organon/ontologies/ninsuna#",hlisting:"http://sindice.com/hlisting/0.1/",voag:"http://voag.linkedmodel.org/schema/voag#",posh:"http://poshrdf.org/ns/posh/",address:"http://schemas.talis.com/2005/address/schema#",lotico:"http://www.lotico.com/resource/",swivt:"http://semantic-mediawiki.org/swivt/1.0#",opo:"http://online-presence.net/opo/ns#",toby:"http://tobyinkster.co.uk/#",evset:"http://dsnotify.org/vocab/eventset/0.1/",psys:"http://proton.semanticweb.org/protonsys#",rlog:"http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#",cos:"http://www.inria.fr/acacia/corese#",vote:"http://www.rdfabout.com/rdf/schema/vote/",meetup:"http://www.lotico.com/meetup/",rooms:"http://vocab.deri.ie/rooms#",pay:"http://reference.data.gov.uk/def/payment#",puc:"http://purl.org/NET/puc#",anca:"http://users.utcluj.ro/~raluca/rdf_ontologies_ralu/ralu_modified_ontology_pizzas2_0#",lifecycle:"http://purl.org/vocab/lifecycle/schema#",bsbm:"http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/",wlp:"http://weblab-project.org/core/model/property/processing/",datafaqs:"http://purl.org/twc/vocab/datafaqs#",sail:"http://www.openrdf.org/config/sail#",teach:"http://linkedscience.org/teach/ns#",common:"http://www.w3.org/2007/uwa/context/common.owl#",sysont:"http://ns.ontowiki.net/SysOnt/",ldap:"http://purl.org/net/ldap/",rda:"http://www.rdaregistry.info/",wi:"http://purl.org/ontology/wi/core#",lingvoj:"http://www.lingvoj.org/ontology#",p3p:"http://www.w3.org/2002/01/p3prdfv1#",tags:"http://www.holygoat.co.uk/owl/redwood/0.1/tags/",lp:"http://launchpad.net/rdf/launchpad#",rdfa:"http://www.w3.org/ns/rdfa#",dcr:"http://www.isocat.org/ns/dcr.rdf#",swanqs:"http://purl.org/swan/1.2/qualifiers/",fab:"http://purl.org/fab/ns#",eclap:"http://www.eclap.eu/schema/eclap/",ddl:"http://purl.org/vocab/riro/ddl#",nuts:"http://dd.eionet.europa.eu/vocabulary/common/nuts/",like:"http://ontologi.es/like#",sem:"http://semanticweb.cs.vu.nl/2009/11/sem/",psych:"http://purl.org/vocab/psychometric-profile/",oboinowl:"http://www.geneontology.org/formats/oboInOwl#",enc:"http://www.w3.org/2001/04/xmlenc#",ann:"http://www.w3.org/2000/10/annotation-ns#",wnschema:"http://www.cogsci.princeton.edu/~wn/schema/",bte:"http://purl.org/twc/vocab/between-the-edges/",wai:"http://purl.org/wai#",pobo:"http://purl.obolibrary.org/obo/",cdt:"https://w3id.org/cdt/",cmo:"http://purl.org/twc/ontologies/cmo.owl#",oslc:"http://open-services.net/ns/core#",kwijibo:"http://kwijibo.talis.com/",play:"http://uriplay.org/spec/ontology/#",br:"http://vocab.deri.ie/br#",algo:"http://securitytoolbox.appspot.com/securityAlgorithms#",eztag:"http://ontologies.ezweb.morfeo-project.org/eztag/ns#",drug:"http://www.agfa.com/w3c/2009/drugTherapy#",care:"http://eulersharp.sourceforge.net/2003/03swap/care#",vitro:"http://vitro.mannlib.cornell.edu/ns/vitro/public#",oboe:"http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#",bridge:"http://purl.org/vocommons/bridge#",irrl:"http://www.ontologydesignpatterns.org/cp/owl/informationobjectsandrepresentationlanguages.owl#",prissma:"http://ns.inria.fr/prissma/v1#",lastfm:"http://purl.org/ontology/last-fm/",sl:"http://www.semanlink.net/2001/00/semanlink-schema#",pol:"http://escience.rpi.edu/ontology/semanteco/2/0/pollution.owl#",mei:"http://www.music-encoding.org/ns/mei/",ogp:"http://ogp.me/ns#",mygrid:"http://www.mygrid.org.uk/ontology#",fo:"http://www.w3.org/1999/XSL/Format#",esd:"http://def.esd.org.uk/",r2rml:"http://www.w3.org/ns/r2rml#",grddl:"http://www.w3.org/2003/g/data-view#",phss:"http://ns.poundhill.com/phss/1.0/",oat:"http://openlinksw.com/schemas/oat/",fls:"http://lukasblaho.sk/football_league_schema#",olo:"http://purl.org/ontology/olo/core#",h5:"http://buzzword.org.uk/rdf/h5#",uni:"http://purl.org/weso/uni/uni.html#",wordmap:"http://purl.org/net/ns/wordmap#",tarot:"http://data.totl.net/tarot/card/",iswc:"http://annotation.semanticweb.org/2004/iswc#",sm:"http://topbraid.org/sparqlmotion#",b2bo:"http://purl.org/b2bo#",hospital:"http://www.agfa.com/w3c/2009/hospital#",swandr:"http://purl.org/swan/1.2/discourse-relationships/",remus:"http://www.semanticweb.org/ontologies/2010/6/Ontology1279614123500.owl#",osn:"http://spatial.ucd.ie/lod/osn/",ezcontext:"http://ontologies.ezweb.morfeo-project.org/ezcontext/ns#",lt:"http://diplomski.nelakolundzija.org/LTontology.rdf#",ne:"http://umbel.org/umbel/ne/",smiley:"http://www.smileyontology.com/ns#",calli:"http://callimachusproject.org/rdf/2009/framework#",places:"http://purl.org/ontology/places#",ibis:"http://purl.org/ibis#",sioca:"http://rdfs.org/sioc/actions#",geom:"http://data.ign.fr/def/geometrie#",hcterms:"http://purl.org/uF/hCard/terms/",human:"http://eulersharp.sourceforge.net/2003/03swap/human#",rulz:"http://purl.org/NET/rulz#",rdagr1:"http://rdvocab.info/Elements/",pimo:"http://www.semanticdesktop.org/ontologies/2007/11/01/pimo#",countries:"http://eulersharp.sourceforge.net/2003/03swap/countries#",recipe:"http://linkedrecipes.org/schema/",oac:"https://w3id.org/oac#",ppo:"http://vocab.deri.ie/ppo#",cdc:"https://w3id.org/cdc#",status:"http://www.w3.org/2003/06/sw-vocab-status/ns#",httpvoc:"http://www.w3.org/2006/http#",data:"http://data.odw.tw/",aapi:"http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema#",session:"http://redfoot.net/2005/session#",np:"http://www.nanopub.org/nschema#",omv:"http://omv.ontoware.org/2005/05/ontology#",card:"http://www.ashutosh.com/test/",reve:"http://data.eurecom.fr/ontology/reve#",sql:"http://ns.inria.fr/ast/sql#",icaltzd:"http://www.w3.org/2002/12/cal/icaltzd#",dnb:"http://d-nb.info/gnd/",san:"http://www.irit.fr/recherches/MELODI/ontologies/SAN#",wbc:"http://worldbank.270a.info/classification/",pml:"http://provenanceweb.org/ns/pml#",rdaa:"http://rdaregistry.info/Elements/a/",wfm:"http://purl.org/net/wf-motifs#",osoc:"http://web-semantics.org/ns/opensocial#",webtlab:"http://webtlab.it.uc3m.es/",tr:"http://www.thomsonreuters.com/",ebucore:"http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#",cao:"http://purl.org/makolab/caont/",esdir:"http://vocab.linkeddata.es/datosabiertos/def/urbanismo-infraestructuras/direccion-postal#",xmls:"http://www.w3.org/2001/XMLSchema#",wgspos:"http://www.w3.org/2003/01/geo/wgs84_pos#",okkam:"http://models.okkam.org/ENS-core-vocabulary#",arpfo:"http://vocab.ouls.ox.ac.uk/projectfunding#",dbt:"http://dbpedia.org/resource/Template:",csvw:"http://www.w3.org/ns/csvw#",scsv:"http://purl.org/NET/schema-org-csv#",prf:"http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#",wisski:"http://wiss-ki.eu/",units:"http://eulersharp.sourceforge.net/2003/03swap/units#",wl:"http://www.wsmo.org/ns/wsmo-lite#",geospecies:"http://rdf.geospecies.org/ont/geospecies#",wsc:"http://www.openk.org/wscaim.owl#",opwn:"http://www.ontologyportal.org/WordNet.owl#",elog:"http://eulersharp.sourceforge.net/2003/03swap/log-rules#",ple:"http://pleiades.stoa.org/places/",zbwext:"http://zbw.eu/namespaces/zbw-extensions/",infosys:"http://www.infosys.com/",span:"http://www.ifomis.org/bfo/1.1/span#",derecho:"http://purl.org/derecho#",geofla:"http://data.ign.fr/ontologies/geofla#",mp:"http://jicamaro.info/mp#",agent:"http://eulersharp.sourceforge.net/2003/03swap/agent#",agents:"http://eulersharp.sourceforge.net/2003/03swap/agent#",imreg:"http://www.w3.org/2004/02/image-regions#",pmlt:"http://inference-web.org/2.0/pml-trust.owl#",pccz:"http://purl.org/procurement/public-contracts-czech#",wbp:"http://worldbank.270a.info/property/",agro:"http://purl.obolibrary.org/obo/agro.owl#",cb:"http://cbasewrap.ontologycentral.com/vocab#",gridworks:"http://purl.org/net/opmv/types/gridworks#",geographis:"http://telegraphis.net/ontology/geography/geography#",marl:"http://www.gsi.dit.upm.es/ontologies/marl/ns#",rdo:"http://purl.org/rdo/ns#",dita:"http://purl.org/dita/ns#",pmlp:"http://inference-web.org/2.0/pml-provenance.owl#",ncal:"http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#",qdoslf:"http://foaf.qdos.com/lastfm/schema/",plink:"http://buzzword.org.uk/rdf/personal-link-types#",opus:"http://lsdis.cs.uga.edu/projects/semdis/opus#",osgb:"http://data.ordnancesurvey.co.uk/id/",html:"http://www.w3.org/1999/xhtml/",kontakt:"http://richard.cyganiak.de/",qa:"http://www.mit.jyu.fi/ai/TRUST_Ontologies/QA.owl#",sindice:"http://vocab.sindice.net/",prefix:"http://prefix.cc/",provenir:"http://knoesis.wright.edu/provenir/provenir.owl#",shv:"http://ns.aksw.org/spatialHierarchy/",dis:"http://stanbol.apache.org/ontology/disambiguation/disambiguation#",open:"http://open.vocab.org/terms/",r2r:"http://www4.wiwiss.fu-berlin.de/bizer/r2r/",c4n:"http://vocab.deri.ie/c4n#",dsp:"http://purl.org/metainfo/terms/dsp#",pns:"http://data.press.net/ontology/stuff/",visit:"http://purl.org/net/vocab/2004/07/visit#",timeline:"http://purl.org/NET/c4dm/timeline.owl#",ncbitaxon:"http://purl.obolibrary.org/obo/NCBITaxon_",nid3:"http://www.semanticdesktop.org/ontologies/2007/05/10/nid3#",hxl:"http://hxl.humanitarianresponse.info/ns/#",organiz:"http://eulersharp.sourceforge.net/2003/03swap/organization#",wairole:"http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#",dgtwc:"http://data-gov.tw.rpi.edu/2009/data-gov-twc.rdf#",muni:"http://vocab.linkeddata.es/urbanismo-infraestructuras/territorio#",life:"http://life.deri.ie/schema/",swanpav:"http://purl.org/swan/1.2/pav/",dummy:"http://hello.com/",osr:"http://dati.senato.it/osr/",lr:"http://linkedrecipes.org/schema/",ens:"http://models.okkam.org/ENS-core-vocabulary.owl#",gv:"http://rdf.data-vocabulary.org/#",req:"http://purl.org/req/",agetec:"http://www.agetec.org/",frbre:"http://purl.org/vocab/frbr/extended#",prvtypes:"http://purl.org/net/provenance/types#",odp:"http://ontologydesignpatterns.org/",aair:"http://xmlns.notu.be/aair#",hemogram:"http://www.agfa.com/w3c/2009/hemogram#",out:"http://ontologies.hypios.com/out#",pubmed:"http://bio2rdf.org/pubmed_vocabulary:",meb:"http://rdf.myexperiment.org/ontologies/base/",vaem:"http://www.linkedmodel.org/schema/vaem#",xsl:"http://www.w3.org/1999/XSL/Transform#",nex:"http://www.nexml.org/2009/",set:"http://www.w3.org/2000/10/swap/set#",aims:"http://aims.fao.org/aos/common/",ecb:"http://ecb.270a.info/class/1.0/",xhtmlvocab:"http://www.w3.org/1999/xhtml/vocab/",copyright:"http://rhizomik.net/ontologies/copyrightonto.owl#",xt:"http://purl.org/twc/vocab/cross-topix#",un:"http://www.w3.org/2007/ont/unit#",parl:"https://id.parliament.uk/schema/",visko:"http://trust.utep.edu/visko/ontology/visko-operator-v3.owl#",fowl:"http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#",rdapo:"http://rdaregistry.info/Elements/p/object/",eprints:"http://eprints.org/ontology/",trackback:"http://madskills.com/public/xml/rss/module/trackback/",wao:"http://webtlab.it.uc3m.es/2010/10/WebAppsOntology#",pna:"http://data.press.net/ontology/asset/",tripfs:"http://purl.org/tripfs/2010/02#",lark1:"http://users.utcluj.ro/~raluca/ontology/Ontology1279614123500.owl#",carfo:"http://purl.org/carfo#",geodata:"http://sws.geonames.org/",grel:"http://users.ugent.be/~bjdmeest/function/grel.ttl#",spatial:"http://geovocab.org/spatial#",skip:"http://skipforward.net/skipforward/resource/",wapp:"http://ns.rww.io/wapp#",swanci:"http://purl.org/swan/1.2/citations/",ops:"https://w3id.org/ops#",eye:"http://jena.hpl.hp.com/Eyeball#",sdm:"https://w3id.org/okn/o/sdm#",emotion:"http://ns.inria.fr/emoca#",emp:"http://purl.org/ctic/empleo/oferta#",admssw:"http://purl.org/adms/sw/",archdesc:"http://archdesc.info/archEvent#",aneo:"http://akonadi-project.org/ontologies/aneo#",rv:"https://data.elsevier.com/research/schema/rv/",oper:"http://sweet.jpl.nasa.gov/2.0/mathOperation.owl#",fl:"http://eulersharp.sourceforge.net/2003/03swap/fl-rules#",rdam:"http://rdaregistry.info/Elements/m/",kdo:"http://kdo.render-project.eu/kdo#",ospost:"http://data.ordnancesurvey.co.uk/ontology/postcode/",fd:"http://foodable.co/ns/",fno:"https://w3id.org/function/ontology#",pne:"http://data.press.net/ontology/event/",soap:"http://www.w3.org/2003/05/soap-envelope/",gelo:"http://krauthammerlab.med.yale.edu/ontologies/gelo#",doco:"http://purl.org/spar/doco/",evopat:"http://ns.aksw.org/Evolution/",xesam:"http://freedesktop.org/standards/xesam/1.0/core#",dayta:"http://dayta.me/resource#",commons:"http://commons.psi.enakting.org/def/",nsl:"http://purl.org/ontology/storyline/",prolog:"http://eulersharp.sourceforge.net/2003/03swap/prolog#",dtype:"http://www.linkedmodel.org/schema/dtype#",languages:"http://eulersharp.sourceforge.net/2003/03swap/languages#",sdgp:"http://stats.data-gov.ie/property/",metalex:"http://www.metalex.eu/schema/1.0#",hgnc:"http://bio2rdf.org/hgnc:",ipad:"http://www.padinthecity.com/",xfnv:"http://vocab.sindice.com/xfn#",dive:"http://scubadive.networld.to/dive.rdf#",pam:"http://prismstandard.org/namespaces/pam/2.0/",re:"http://www.w3.org/2000/10/swap/reason#",atomowl:"http://bblfish.net/work/atom-owl/2006-06-06/#",ccom:"http://purl.org/ontology/cco/mappings#",sawsdl:"http://www.w3.org/ns/sawsdl#",comm:"http://vocab.resc.info/communication#",bioskos:"http://eulersharp.sourceforge.net/2003/03swap/bioSKOSSchemes#",semtweet:"http://semantictweet.com/",tei:"http://www.tei-c.org/ns/1.0/",rad:"http://www.w3.org/ns/rad#",aigp:"http://swat.cse.lehigh.edu/resources/onto/aigp.owl#",ecpo:"http://purl.org/ontology/ecpo#",tcga:"http://purl.org/tcga/core#",psh:"http://ns.inria.fr/probabilistic-shacl/",gc:"http://www.oegov.org/core/owl/gc#",dgfoaf:"http://west.uni-koblenz.de/ontologies/2010/07/dgfoaf.owl#",sig:"http://purl.org/signature#",tvc:"http://www.essepuntato.it/2012/04/tvc/",oj:"http://ontojob.at/",decl:"http://www.linkedmodel.org/1.0/schema/decl#",func:"http://www.w3.org/2007/rif-builtin-function#",fc:"http://www.freeclass.eu/freeclass_v1#",dssn:"http://purl.org/net/dssn/",orca:"http://geni-orca.renci.org/owl/topology.owl#",oboro:"http://obofoundry.org/ro/ro.owl#",agrelon:"http://d-nb.info/standards/elementset/agrelon#",linkedct:"http://data.linkedct.org/vocab/",frame:"http://www.ontologydesignpatterns.org/ont/framenet/abox/frame/",nndsr:"http://semanticdiet.com/schema/usda/nndsr/",quak:"http://dev.w3.org/cvsweb/2000/quacken/vocab#",opmv:"http://purl.org/net/opmv/ns#",geop:"http://aims.fao.org/aos/geopolitical.owl#",xch:"http://oanda2rdf.appspot.com/xch/",fcm:"http://eulersharp.sourceforge.net/2006/02swap/fcm#",igeo:"http://rdf.insee.fr/def/geo#",swpo:"http://sw-portal.deri.org/ontologies/swportal#",theatre:"http://purl.org/theatre#",sad:"http://vocab.deri.ie/sad#",aersv:"http://aers.data2semantics.org/vocab/",nxp:"http://purl.org/nxp/schema/v1/",transit:"http://vocab.org/transit/terms/",spif:"http://spinrdf.org/spif#",bookmark:"http://www.w3.org/2002/01/bookmark#",tripfs2:"http://purl.org/tripfs/2010/06#",coeus:"http://bioinformatics.ua.pt/coeus/",enhancer:"http://stanbol.apache.org/ontology/enhancer/enhancer#",oboso:"http://purl.org/obo/owl/SO#",gxa:"http://www.ebi.ac.uk/gxa/",xbrli:"http://www.xbrl.org/2003/instance#",rso:"http://www.researchspace.org/ontology/",nyt:"http://data.nytimes.com/",eseduc:"http://www.purl.org/ontologia/eseduc#",td:"https://www.w3.org/2019/wot/td#",ling:"http://purl.org/voc/ling/",tp:"https://triplydb.com/Triply/tp/def/",mte:"http://nl.ijs.si/ME/owl/",iron:"http://purl.org/ontology/iron#",dbpo:"http://dbpedia.org/ontology/",rlno:"http://rdflivenews.aksw.org/ontology/",qu:"http://purl.oclc.org/NET/ssnx/qu/qu#",protons:"http://proton.semanticweb.org/2005/04/protons#",w3p:"http://prov4j.org/w3p/",events:"http://eulersharp.sourceforge.net/2003/03swap/event#",cidoccrm:"http://purl.org/NET/cidoc-crm/core#",dl:"http://ontology.ip.rm.cnr.it/ontologies/DOLCE-Lite#",httpm:"http://www.w3.org/2011/http-methods#",prvr:"http://purl.org/ontology/prv/rules#",json:"https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf#",rich:"http://rdf.data-vocabulary.org/",myprefix:"http://myprefix.org/",telix:"http://purl.org/telix#",c4o:"http://purl.org/spar/c4o/",gazetteer:"http://data.ordnancesurvey.co.uk/ontology/50kGazetteer/",htir:"http://www.w3.org/2011/http#",estrn:"http://vocab.linkeddata.es/datosabiertos/def/urbanismo-infraestructuras/transporte#",sgv:"http://www.w3.org/TR/SVG/",owls:"http://www.daml.org/services/owl-s/1.2/Service.owl#",no:"http://km.aifb.kit.edu/projects/numbers/number#",frapo:"http://purl.org/cerif/frapo/",rpubl:"http://rinfo.lagrummet.se/ns/2008/11/rinfo/publ#",moby:"http://www.mygrid.org.uk/mygrid-moby-service#",ecc:"https://ns.eccenca.com/",oax:"http://www.w3.org/ns/openannotation/extensions/",kw:"http://kwantu.net/kw/",fct:"http://openlinksw.com/services/facets/1.0/",scowt:"http://purl.org/weso/ontologies/scowt#",coun:"http://www.daml.org/2001/09/countries/iso-3166-ont#",mesh:"http://id.nlm.nih.gov/mesh/",tmpl:"http://purl.org/restdesc/http-template#",frad:"http://iflastandards.info/ns/fr/frad/",artstor:"http://simile.mit.edu/2003/10/ontologies/artstor#",wf:"http://www.w3.org/2005/01/wf/flow#",humanbody:"http://eulersharp.sourceforge.net/2003/03swap/humanBody#",wm:"http://ns.inria.fr/webmarks#",arecipe:"http://purl.org/amicroformat/arecipe/",rdaw:"http://rdaregistry.info/Elements/w/",fingal:"http://vocab.deri.ie/fingal#",govtrackus:"http://www.rdfabout.com/rdf/usgov/geo/us/",gbv:"http://purl.org/ontology/gbv/",ext:"http://mu.semte.ch/vocabularies/ext/",jita:"http://aims.fao.org/aos/jita/",lgv:"http://linkedgeodata.org/ontology/",oecd:"http://oecd.270a.info/dataset/",ccard:"http://purl.org/commerce/creditcard#",swanag:"http://purl.org/swan/1.2/agents/",ru:"http://purl.org/imbi/ru-meta.owl#",pf:"http://jena.hpl.hp.com/ARQ/property#",owltime:"http://www.w3.org/TR/owl-time#",clineva:"http://www.agfa.com/w3c/2009/clinicalEvaluation#",ec:"http://eulergui.sourceforge.net/contacts.owl.n3#",goef:"http://purl.org/twc/vocab/goef#",bm:"http://bio2rdf.org/",intervals:"http://reference.data.gov.uk/def/intervals/",flow:"http://www.w3.org/2005/01/wf/flow#",grs:"http://www.georss.org/georss/",vcardx:"http://buzzword.org.uk/rdf/vcardx#",dbpedia2:"http://dbpedia.org/property/",ends:"http://labs.mondeca.com/vocab/endpointStatus#",quantity:"http://qudt.org/schema/quantity#",fe:"http://www.ontologydesignpatterns.org/ont/framenet/abox/fe/",rating:"http://www.tvblob.com/ratings/#",health:"http://purl.org/twc/health/vocab/",genab:"http://eulersharp.sourceforge.net/2003/03swap/genomeAbnormality#",italy:"http://data.kasabi.com/dataset/italy/schema/",dossier:"https://data.omgeving.vlaanderen.be/ns/dossier#",abs:"http://abs.270a.info/dataset/",luc:"http://www.ontotext.com/owlim/lucene#",identity:"http://purl.org/twc/ontologies/identity.owl#",vf:"https://w3id.org/valueflows/ont/vf#",sor:"http://purl.org/net/soron/",lod2:"http://lod2.eu/schema/",osp:"http://data.lirmm.fr/ontologies/osp#",penis:"http://penis.to/#",d2r:"http://sites.wiwiss.fu-berlin.de/suhl/bizer/d2r-server/config.rdf#",wfdesc:"http://purl.org/wf4ever/wfdesc#",kupkb:"http://www.e-lico.eu/data/kupkb/",nytimes:"http://data.nytimes.com/elements/",govwild:"http://govwild.org/0.6/GWOntology.rdf/",osmsemnet:"http://spatial.ucd.ie/2012/08/osmsemnet/",hcard:"http://purl.org/uF/hCard/terms/",frbrcore:"http://purl.org/vocab/frbr/core#",ql:"http://www.w3.org/2004/ql#",ecos:"http://purl.org/ecos#",crtv:"http://open-services.net/ns/crtv#",environ:"http://eulersharp.sourceforge.net/2003/03swap/environment#",p20:"http://zbw.eu/beta/p20/vocab/",cmd:"https://w3id.org/cmd#",s4ac:"http://ns.inria.fr/s4ac/v2#",sro:"http://salt.semanticauthoring.org/ontologies/sro#",npgd:"http://ns.nature.com/datasets/",loticoowl:"http://www.lotico.com/ontology/",shex:"http://www.w3.org/ns/shex#",cold:"http://purl.org/configurationontology#",transmed:"http://www.w3.org/2001/sw/hcls/ns/transmed/",wikibase:"http://wikiba.se/ontology#",daiaserv:"http://purl.org/ontology/daia/Service/",gfo:"http://www.onto-med.de/ontologies/gfo.owl#",cl:"http://advene.org/ns/cinelab/",itsmo:"http://ontology.it/itsmo/v1#",bl:"https://w3id.org/biolink/vocab/",ogorg:"http://opengraph.org/schema/",idemo:"http://rdf.insee.fr/def/demo#",ufmedia:"http://purl.org/microformat/hmedia/",crmdig:"http://www.ics.forth.gr/isl/CRMdig/",genea:"http://www.owl-ontologies.com/generations.owl#",poder:"http://poderopedia.com/vocab/",dpd:"http://www.kanzaki.com/ns/dpd#",nocal:"http://vocab.deri.ie/nocal#",skiresort:"http://www.openlinksw.com/ski_resorts/schema#",provone:"http://purl.org/provone#",lindt:"http://purl.org/NET/lindt#",rkd:"http://data.rkd.nl/def#",npgg:"http://ns.nature.com/graphs/",str:"http://nlp2rdf.lod2.eu/schema/string/",sw:"http://linkedwidgets.org/statisticalwidget/ontology/",hartigprov:"http://purl.org/net/provenance/ns#",va:"http://code-research.eu/ontology/visual-analytics#",bcncon:"http://datos.bcn.cl/ontologies/bcn-congress#",cf:"http://mmisw.org/ont/cf/parameter/",steel:"https://w3id.org/steel/ProcessOntology/",gesis:"http://lod.gesis.org/lodpilot/ALLBUS/vocab.rdf#",wscaim:"http://www.openk.org/wscaim.owl#",sci:"http://data.scientology.org/ns/",protegedc:"http://protege.stanford.edu/plugins/owl/dc/protege-dc.owl#",cdtype:"http://purl.org/cld/cdtype/",diseasome:"http://www4.wiwiss.fu-berlin.de/diseasome/resource/diseasome/",ls:"http://linkedspending.aksw.org/instance/",s2s:"http://escience.rpi.edu/ontology/sesf/s2s/4/0/",cis:"http://purl.org/NET/cloudisus#",healthcare:"http://www.agfa.com/w3c/2009/healthCare#",rankrage:"https://rankrage.de/",stac:"http://securitytoolbox.appspot.com/stac#",kbp:"http://tackbp.org/2013/ontology#",dctypes:"http://purl.org/dc/dcmitype/",atomrdf:"http://atomowl.org/ontologies/atomrdf#",mohammad:"http://manesht.ir/",atlas:"http://rdf.ebi.ac.uk/resource/atlas/",ngeoi:"http://vocab.lenka.no/geo-deling#",openskos:"http://openskos.org/xmlns#",centrifuge:"http://purl.org/twc/vocab/centrifuge#",paia:"http://purl.org/ontology/paia#",ipo:"http://purl.org/ipo/core#",occult:"http://data.totl.net/occult/",ianarel:"https://www.w3.org/ns/iana/link-relations/relation#",saxon:"http://saxon.sf.net/",solid:"http://www.w3.org/ns/solid/terms#",foo:"http://filmontology.org/ontology/1.0/",curr:"https://w3id.org/cc#",osukdt:"http://www.ordnancesurvey.co.uk/ontology/Datatypes.owl#",gs1:"https://gs1.org/voc/",marshall:"http://sites.google.com/site/xgmaitc/",l4a:"http://labels4all.info/ns/",skos08:"http://www.w3.org/2008/05/skos#",vsto:"http://escience.rpi.edu/ontology/vsto/2/0/vsto.owl#",rec54:"http://www.w3.org/2001/02pd/rec54.rdf#",l4lod:"http://ns.inria.fr/l4lod/v2/",lctr:"http://data.linkedct.org/vocab/resource/",mtecore:"http://purl.org/olia/mte/multext-east.owl#",harrisons:"http://harrisons.cc/",opmw:"http://www.opmw.org/ontology/",category:"http://dbpedia.org/resource/Category:",rml:"http://w3id.org/rml/",biordf:"http://purl.org/net/biordfmicroarray/ns#",wfprov:"http://purl.org/wf4ever/wfprov#",gov:"http://gov.genealogy.net/ontology.owl#",clinproc:"http://www.agfa.com/w3c/2009/clinicalProcedure#",pizza:"http://www.co-ode.org/ontologies/pizza/pizza.owl#",prism21:"http://prismstandard.org/namespaces/basic/2.1/",daq:"http://purl.org/eis/vocab/daq#",campsite:"http://www.openlinksw.com/campsites/schema#",aerols:"http://xmlns.com/aerols/0.1/",hasco:"http://hadatac.org/ont/hasco/",laposte:"http://data.lirmm.fr/ontologies/laposte#",mpeg7:"http://rhizomik.net/ontologies/2005/03/Mpeg7-2001.owl#",pronom:"http://reference.data.gov.uk/technical-registry/",dbyago:"http://dbpedia.org/class/yago/",b2rpubchem:"http://bio2rdf.org/ns/ns/ns/pubchem#",lh:"http://vocab.inf.ed.ac.uk/library/holdings#",refe:"http://orion.tw.rpi.edu/~xgmatwc/refe/",malignneo:"http://www.agfa.com/w3c/2009/malignantNeoplasm#",opl:"http://openlinksw.com/schema/attribution#",pkmn:"http://pokedex.dataincubator.org/pkm/",okg:"http://openknowledgegraph.org/ontology/",wno:"http://wordnet-rdf.princeton.edu/ontology#",ldr:"http://purl.oclc.org/NET/ldr/ns#",ifc:"http://ifcowl.openbimstandards.org/IFC2X3_Final#",odcs:"http://opendata.cz/infrastructure/odcleanstore/",camelot:"http://vocab.ox.ac.uk/camelot#",wkd:"http://schema.wolterskluwer.de/",dpl:"http://dbpedialite.org/things/",oslo:"http://purl.org/oslo/ns/localgov#",sam:"http://def.seegrid.csiro.au/isotc211/iso19156/2011/sampling#",verb:"https://w3id.org/verb/",te:"http://www.w3.org/2006/time-entry#",c4dm:"http://purl.org/NET/c4dm/event.owl#",bv:"http://purl.org/vocommons/bv#",pod:"https://project-open-data.cio.gov/v1.1/schema/#",dqv:"http://www.w3.org/ns/dqv#",geovocab:"http://geovocab.org/",crv:"http://purl.org/twc/vocab/datacarver#",germplasm:"http://purl.org/germplasm/terms#",doas:"http://deductions.github.io/doas.owl.ttl#",dannet:"http://www.wordnet.dk/owl/instance/2009/03/instances/",lio:"http://purl.org/net/lio#",ds:"http://purl.org/ctic/dcat#",scms:"http://ns.aksw.org/scms/annotations/",mads:"http://www.loc.gov/mads/rdf/v1#",lc:"http://semweb.mmlab.be/ns/linkedconnections#",cart:"http://purl.org/net/cartCoord#",date:"http://contextus.net/ontology/ontomedia/misc/date#",vgo:"http://purl.org/net/VideoGameOntology#",odo:"http://ocean-data.org/schema/",lso:"http://linkedspending.aksw.org/ontology/",ekaw:"http://data.semanticweb.org/conference/ekaw/2012/complete/",puelia:"http://kwijibo.talis.com/vocabs/puelia#",bcnnorms:"http://datos.bcn.cl/ontologies/bcn-norms#",of:"http://owlrep.eu01.aws.af.cm/fridge#",alchemy:"http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema#",ebu:"http://semantic.eurobau.com/eurobau-utility.owl#",shoah:"http://dati.cdec.it/lod/shoah/",sso:"http://nlp2rdf.lod2.eu/schema/sso/",prvt:"http://purl.org/net/provenance/types#",omnlife:"http://open-multinet.info/ontology/omn-lifecycle#",plo:"http://purl.org/net/po#",mmo:"http://purl.org/momayo/mmo/",tac:"http://ns.bergnet.org/tac/0.1/triple-access-control#",hifm:"http://purl.org/net/hifm/data#",yo:"http://yovisto.com/",pattern:"http://www.essepuntato.it/2008/12/pattern#",dawgt:"http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#",tisc:"http://observedchange.com/tisc/ns#",bdd:"https://api.bloomberg.com/eap/catalogs/bbg/fields/",namespaces:"https://vg.no/",ottr:"http://ns.ottr.xyz/templates#",shw:"http://paul.staroch.name/thesis/SmartHomeWeather.owl#",dvia:"http://data.eurecom.fr/ontology/dvia#",insdc:"http://ddbj.nig.ac.jp/ontologies/sequence#",strdf:"http://strdf.di.uoa.gr/ontology#",esco:"http://data.europa.eu/esco/model#",dcndl:"http://ndl.go.jp/dcndl/terms/",hints2005:"http://purl.org/twc/cabig/model/HINTS2005-1.owl#",rdacarrier:"http://rdvocab.info/termList/RDACarrierType/",opllic:"http://www.openlinksw.com/ontology/licenses#",daisy:"http://www.daisy.org/z3998/2012/vocab/",smg:"http://ns.cerise-project.nl/energy/def/cim-smartgrid#",adr:"http://kg.artsdata.ca/resource/",vin:"http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#",dn:"http://purl.org/datanode/ns/",antenne:"https://data.zendantennes.omgeving.vlaanderen.be/ns/zendantenne#",csm:"http://purl.org/csm/1.0#",sbench:"http://swat.cse.lehigh.edu/onto/univ-bench.owl#",cts2:"http://schema.omg.org/spec/CTS2/1.0/",part:"http://purl.org/vocab/participation/schema#",bn:"http://babelnet.org/rdf/",rssynd:"http://web.resource.org/rss/1.0/modules/syndication/",cpsv:"http://purl.org/vocab/cpsv#",wsl:"http://www.wsmo.org/ns/wsmo-lite#",quantities:"http://eulersharp.sourceforge.net/2003/03swap/quantitiesExtension#",iol:"http://www.ontologydesignpatterns.org/ont/dul/IOLite.owl#",latitude:"https://www.w3.org/2006/vcard/ns#",gastro:"http://www.ebsemantics.net/gastro#",dpc:"http://hospee.org/ontologies/dpc/",chembl:"http://rdf.ebi.ac.uk/terms/chembl#",ssso:"http://purl.org/ontology/ssso#",art:"http://w3id.org/art/terms/1.0/",clinic:"http://example.com/clinic#",wro:"http://purl.org/net/wf4ever/ro#",ptop:"http://www.ontotext.com/proton/protontop#",fos:"http://futurios.org/fos/spec/",rdamt:"http://rdaregistry.info/termList/RDAMediaType/",pso:"http://purl.org/spar/pso/",sioctypes:"http://rdfs.org/sioc/types#",scor:"http://purl.org/eis/vocab/scor#",turismo:"http://idi.fundacionctic.org/cruzar/turismo#",rdae:"http://rdaregistry.info/Elements/e/",semio:"http://www.lingvoj.org/semio#",goog:"http://schema.googleapis.com/",rmo:"http://eatld.et.tu-dresden.de/rmo#",qrl:"http://www.aifb.kit.edu/project/ld-retriever/qrl#",trait:"http://contextus.net/ontology/ontomedia/ext/common/trait#",bihap:"http://bihap.kb.gov.tr/ontology/",stream:"http://dbpedia.org/ontology/Stream/",ccrel:"http://creativecommons.org/ns#",cpant:"http://purl.org/NET/cpan-uri/terms#",decision:"https://decision-ontology.googlecode.com/svn/trunk/decision.owl#",mico:"http://www.mico-project.eu/ns/platform/1.0/schema#",bk:"http://www.provbook.org/ns/#",oan:"http://data.lirmm.fr/ontologies/oan/",property:"http://fr.dbpedia.org/property/",guo:"http://purl.org/hpi/guo#",ep:"http://eprints.org/ontology/",who:"http://www.who.int/vocab/ontology#",webbox:"http://webbox.ecs.soton.ac.uk/ns#",ost:"http://w3id.org/ost/ns#",emtr:"http://purl.org/NET/ssnext/electricmeters#",cosmo:"http://purl.org/ontology/cosmo#",xlime:"http://xlime-project.org/vocab/",obsm:"http://rdf.geospecies.org/methods/observationMethod#",omapi:"http://purl.org/omapi/0.2/#",thors:"http://resource.geosciml.org/ontology/timescale/thors#",opencyc:"http://sw.opencyc.org/concept/",shacl:"http://www.w3.org/ns/shacl#",lldr:"http://purl.oclc.org/NET/lldr/ns#",onc:"http://www.ics.forth.gr/isl/oncm/core#",gf:"http://def.seegrid.csiro.au/isotc211/iso19109/2005/feature#",conf:"http://richard.cyganiak.de/2007/pubby/config.rdf#",fma:"http://sig.uw.edu/fma#",op:"http://environment.data.gov.au/def/op#",vsso:"http://automotive.eurecom.fr/vsso#",zoomaterms:"http://rdf.ebi.ac.uk/vocabulary/zooma/",rdarel2:"http://metadataregistry.org/uri/schema/RDARelationshipsGR2/",kai:"http://kai.uni-kiel.de/",msr:"http://www.telegraphis.net/ontology/measurement/measurement#",sao:"http://salt.semanticauthoring.org/ontologies/sao#",wikterms:"http://wiktionary.dbpedia.org/terms/",bgcat:"http://bg.dbpedia.org/resource/\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f:",rdafnm:"http://rdaregistry.info/termList/FormNoteMus/",ses:"http://lod.taxonconcept.org/ses/",faq:"http://www.openlinksw.com/ontology/faq#",mmd:"http://musicbrainz.org/ns/mmd-1.0#",ljkl:"http://teste.com/",oarj:"http://opendepot.org/reference/linked/1.0/",my:"http://www.mobile.com/model/",cvbase:"http://purl.org/captsolo/resume-rdf/0.2/base#",rdamedia:"http://rdvocab.info/termList/RDAMediaType/",place:"http://purl.org/ontology/places/",tblcard:"http://www.w3.org/People/Berners-Lee/card#",spt:"http://spitfire-project.eu/ontology/ns/",security:"http://securitytoolbox.appspot.com/securityMain#",ecrm:"http://erlangen-crm.org/current/",mged:"http://mged.sourceforge.net/ontologies/MGEDOntology.owl#",moac:"http://observedchange.com/moac/ns#",telmap:"http://purl.org/telmap/",dr:"http://purl.org/swan/2.0/discourse-relationships/",poste:"http://data.lirmm.fr/ontologies/poste#",rdafr:"http://rdaregistry.info/termList/frequency/",eumida:"http://data.kasabi.com/dataset/eumida/terms/",bgn:"http://bibliograph.net/schemas/",w3con:"http://www.w3.org/2000/10/swap/pim/contact#",bcnbio:"http://datos.bcn.cl/ontologies/bcn-biographies#",aers:"http://aers.data2semantics.org/resource/",qud:"http://qudt.org/1.1/schema/qudt#",jpo:"http://rdf.jpostdb.org/ontology/jpost.owl#",icane:"http://www.icane.es/opendata/vocab#",wlo:"http://purl.org/ontology/wo/",mil:"http://rdf.muninn-project.org/ontologies/military#",lodac:"http://lod.ac/ns/lodac#",sdmxd:"http://purl.org/linked-data/sdmx/2009/dimension#",rdasoi:"http://rdaregistry.info/termList/statIdentification/",seq:"http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#",scoro:"http://purl.org/spar/scoro/",dqm:"http://purl.org/dqm-vocabulary/v1/dqm#",nerd:"http://nerd.eurecom.fr/ontology#",gl:"http://schema.geolink.org/",rdarel:"http://rdvocab.info/RDARelationshipsWEMI/",disease:"http://www.agfa.com/w3c/2009/humanDisorder#",qvoc:"http://mlode.nlp2rdf.org/quranvocab#",odrs:"http://schema.theodi.org/odrs#",finlaw:"http://purl.org/finlex/schema/laki/",exo:"https://w3id.org/example#",mv:"http://schema.mobivoc.org/",oss:"http://opendata.caceres.es/def/ontosemanasanta#",kbv:"https://id.kb.se/vocab/",dcs:"http://ontologi.es/doap-changeset#",delta:"http://www.w3.org/2004/delta#",xapi:"https://w3id.org/xapi/ontology#",tw:"http://tw.rpi.edu/schema/",holding:"http://purl.org/ontology/holding#",biro:"http://purl.org/spar/biro/",ctorg:"http://purl.org/ctic/infraestructuras/organizacion#",li:"http://def.seegrid.csiro.au/isotc211/iso19115/2003/lineage#",twaapi:"http://purl.org/twc/vocab/aapi-schema#",accom:"http://purl.org/acco/ns#",oplcert:"http://www.openlinksw.com/schemas/cert#",onyx:"http://www.gsi.dit.upm.es/ontologies/onyx/ns#",eui:"http://institutions.publicdata.eu/#",xcql:"http://docs.oasis-open.org/ns/search-ws/xcql#",lsc:"http://linkedscience.org/lsc/ns#",auto:"http://auto.schema.org/",infor:"http://www.ontologydesignpatterns.org/cp/owl/informationrealization.owl#",dbcat:"http://dbpedia.org/resource/Category:",osspr:"http://data.ordnancesurvey.co.uk/ontology/spatialrelations/",ll:"http://lodlaundromat.org/resource/",rdacontent:"http://rdvocab.info/termList/RDAContentType/",fam:"http://vocab.fusepool.info/fam#",swperson:"http://data.semanticweb.org/person/",esequip:"http://vocab.linkeddata.es/datosabiertos/def/urbanismo-infraestructuras/equipamiento#",od:"http://purl.org/twc/vocab/opendap#",affymetrix:"http://bio2rdf.org/affymetrix_vocabulary:",vsws:"http://verticalsearchworks.com/ontology/synset#",coll:"http://purl.org/co/",cbo:"http://comicmeta.org/cbo/",mrel:"http://id.loc.gov/vocabulary/relators/",mb:"http://dbtune.org/musicbrainz/resource/instrument/",raul:"http://vocab.deri.ie/raul#",onssprel:"http://www.ordnancesurvey.co.uk/ontology/SpatialRelations/v0.2/SpatialRelations.owl#",tsioc:"http://rdfs.org/sioc/types#",wb:"http://data.worldbank.org/",gawd:"http://gawd.atlantides.org/terms/",stats:"http://purl.org/rdfstats/stats#",pnc:"http://data.press.net/ontology/classification/",npgx:"http://ns.nature.com/extensions/",dash:"http://datashapes.org/dash#",osgeom:"http://data.ordnancesurvey.co.uk/ontology/geometry/",emoca:"http://ns.inria.fr/emoca#",ogc:"http://www.opengis.net/def/",fao:"http://fao.270a.info/dataset/",tao:"http://pubannotation.org/ontology/tao.owl#",dogont:"http://elite.polito.it/ontologies/dogont.owl#",drm:"http://vocab.data.gov/def/drm#",app:"http://jmvanel.free.fr/ontology/software_applications.n3#",call:"http://webofcode.org/wfn/call:",lsmap:"http://ontology.cybershare.utep.edu/ELSEWeb/elseweb-data.owl#",pnt:"http://data.press.net/ontology/tag/",mvco:"http://purl.oclc.org/NET/mvco.owl#",geocontext:"http://www.geocontext.org/publ/2013/vocab#",dbpr:"http://dbpedia.org/resource/",esaloj:"http://vocab.linkeddata.es/datosabiertos/def/turismo/alojamiento#",elec:"http://purl.org/ctic/sector-publico/elecciones#",lcy:"http://purl.org/vocab/lifecycle/schema#",water:"http://escience.rpi.edu/ontology/semanteco/2/0/water.owl#",nidm:"http://nidm.nidash.org/",vapour:"http://vapour.sourceforge.net/vocab.rdf#",xrd:"http://docs.oasis-open.org/ns/xri/xrd-1.0#",rdacct:"http://rdaregistry.info/termList/CollTitle/",wn31:"http://wordnet-rdf.princeton.edu/wn31/",llo:"http://lodlaundromat.org/ontology/",bgt:"https://bgt.basisregistraties.overheid.nl/bgt/def/",oml:"http://def.seegrid.csiro.au/ontology/om/om-lite#",stories:"http://purl.org/ontology/stories/",pni:"http://data.press.net/ontology/identifier/",gadm:"http://gadm.geovocab.org/ontology#",pois:"http://purl.oclc.org/POIS/vcblr#",bwb:"http://doc.metalex.eu/bwb/ontology/",dbtont:"http://dbtropes.org/ont/",sg:"http://name.scigraph.com/ontologies/core/",graffle:"http://purl.org/twc/vocab/vsr/graffle#",ox:"http://vocab.ox.ac.uk/projectfunding#",isocat:"http://www.isocat.org/datcat/",seokoeln:"http://rankrage.de/",particip:"http://purl.org/vocab/participation/schema#",allot:"https://w3id.org/akn/ontology/allot#",rdami:"http://rdaregistry.info/termList/modeIssue/",viskov:"http://trust.utep.edu/visko/ontology/visko-view-v3.owl#",dcite:"http://purl.org/spar/datacite/",pvcs:"http://purl.org/twc/vocab/pvcs#",evident:"http://purl.org/net/evident#",doi:"https://doi.org/",saif:"http://wwwiti.cs.uni-magdeburg.de/~srahman/",brick:"https://brickschema.org/schema/Brick#",odapp:"http://vocab.deri.ie/odapp#",snarm:"http://rdf.myexperiment.org/ontologies/snarm/",viso:"http://purl.org/viso/",pingback:"http://purl.org/net/pingback/",s3db:"http://www.s3db.org/core#",deps:"http://ontologi.es/doap-deps#",frb:"http://frb.270a.info/dataset/",mt:"http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",cbase:"http://ontologycentral.com/2010/05/cb/vocab#",kees:"http://linkeddata.center/kees/v1#",pic:"http://www.ipaw.info/ns/picaso#",ramon:"http://rdfdata.eionet.europa.eu/ramon/ontology/",scip:"http://lod.taxonconcept.org/ontology/sci_people.owl#",ev:"http://www.w3.org/2001/xml-events/",swo:"http://www.ebi.ac.uk/swo/",fincaselaw:"http://purl.org/finlex/schema/oikeus/",biotop:"http://purl.org/biotop/biotop.owl#",oh:"http://semweb.mmlab.be/ns/oh#",ostop:"http://www.ordnancesurvey.co.uk/ontology/Topography/v0.1/Topography.owl#",ncit:"https://ncit.nci.nih.gov/ncitbrowser/ConceptReport.jsp?dictionary=NCI_Thesaurus&ns=ncit&code=",spfood:"http://kmi.open.ac.uk/projects/smartproducts/ontologies/food.owl#",voidp:"http://www.enakting.org/provenance/voidp/",quty:"http://www.telegraphis.net/ontology/measurement/quantity#",c9d:"http://purl.org/twc/vocab/conversion/",viskoo:"http://trust.utep.edu/visko/ontology/visko-operator-v3.owl#",eunis:"http://eunis.eea.europa.eu/rdf/species-schema.rdf#",fcp:"http://www.newmedialab.at/fcp/",dcoid:"http://dx.deepcarbon.net/",d2d:"http://rdfns.org/d2d/",vag:"http://www.essepuntato.it/2013/10/vagueness/",w3po:"http://purl.org/provenance/w3p/w3po#",rdatc:"http://rdaregistry.info/termList/trackConfig/",vvo:"http://purl.org/vvo/ns#",prviv:"http://purl.org/net/provenance/integrity#",rdl:"http://data.posccaesar.org/rdl/",bco:"http://purl.obolibrary.org/obo/bco.owl#",mmf:"http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#",rvdata:"http://data.rvdata.us/",bner:"http://datos.bne.es/resource/",lexcz:"http://purl.org/lex/cz#",rdagw:"http://rdaregistry.info/termList/grooveWidth/",olad:"http://openlad.org/vocab#",origins:"http://origins.link/",rdagd:"http://rdaregistry.info/termList/gender/",bgdbp:"http://bg.dbpedia.org/property/",geosp:"http://rdf.geospecies.org/ont/geospecies#",driver:"http://deductions.github.io/drivers.owl.ttl#",fcs:"http://clarin.eu/fcs/resource#",im:"http://imgpedia.dcc.uchile.cl/resource/",saws:"http://purl.org/saws/ontology#",tg:"https://triplydb.com/Triply/tg/def/",company:"http://intellimind.io/ns/company#",lden:"http://www.linklion.org/lden/",swpatho:"http://swpatho.ag-nbi.de/context/meta.owl#",cmdm:"http://infra.clarin.eu/cmd/",vdpp:"http://data.lirmm.fr/ontologies/vdpp#",vsw:"http://verticalsearchworks.com/ontology/",lingvo:"http://www.lingvoj.org/ontology#",waarde:"https://lod.milieuinfo.be/ns/waarde#",tis:"http://www.ontologydesignpatterns.org/cp/owl/timeindexedsituation.owl#",gnvc:"http://purl.org/gc/",odpart:"http://www.ontologydesignpatterns.org/cp/owl/participation.owl#",agr:"http://promsns.org/def/agr#",pkm:"http://www.ontotext.com/proton/protonkm#",radion:"http://www.w3.org/ns/radion#",ntag:"http://ns.inria.fr/nicetag/2010/09/09/voc#",gpml:"http://vocabularies.wikipathways.org/gpml#",agrd:"http://agrinepaldata.com/",vartrans:"http://www.w3.org/ns/lemon/vartrans#",rdarole:"http://rdvocab.info/roles/",vext:"http://ldf.fi/void-ext#",lexvo:"http://lexvo.org/ontology#",aws:"http://purl.oclc.org/NET/ssnx/meteo/aws#",agls:"http://www.agls.gov.au/agls/terms/",rdai:"http://rdaregistry.info/Elements/i/",dao:"http://purl.org/dao#",lsweb:"http://ontology.cybershare.utep.edu/ELSEWeb/elseweb-data.owl#",employee:"http://www.employee.com/data#",lw:"http://linkedwidgets.org/ontologies/",npdv:"http://sws.ifi.uio.no/vocab/npd#",dbptmpl:"http://dbpedia.org/resource/Template:",oae:"http://www.ics.forth.gr/isl/oae/core#",gcis:"http://data.globalchange.gov/gcis.owl#",friends:"http://www.openarchives.org/OAI/2.0/friends/",mtlo:"http://www.ics.forth.gr/isl/MarineTLO/v4/marinetlo.owl#",rdabm:"http://rdaregistry.info/termList/RDABaseMaterial/",cwrc:"http://sparql.cwrc.ca/ontology/cwrc#",ontopic:"http://www.ontologydesignpatterns.org/ont/dul/ontopic.owl#",fire:"http://tldp.org/HOWTO/XML-RPC-HOWTO/xmlrpc-howto-java.html#",situ:"http://www.ontologydesignpatterns.org/cp/owl/situation.owl#",frsad:"http://iflastandards.info/ns/fr/frsad/",activity:"https://www.w3.org/TR/activitystreams-vocabulary/",ordf:"http://purl.org/NET/ordf/",beth:"http://www.google.com/",roevo:"http://purl.org/wf4ever/roevo#",lmm1:"http://www.ontologydesignpatterns.org/ont/lmm/LMM_L1.owl#",vrank:"http://purl.org/voc/vrank#",orth:"http://purl.org/net/orth#",bot:"https://w3id.org/bot#",lmdb:"http://data.linkedmdb.org/",galaksiya:"http://ontoloji.galaksiya.com/vocab/",bioc:"http://deductions.github.io/biological-collections.owl.ttl#",csp:"http://vocab.deri.ie/csp#",gm:"http://def.seegrid.csiro.au/isotc211/iso19107/2003/geometry#",vmm:"http://spi-fm.uca.es/spdef/models/genericTools/vmm/1.0#",wikim:"http://spi-fm.uca.es/spdef/models/genericTools/wikim/1.0#",lpeu:"http://purl.org/linkedpolitics/vocabulary/eu/plenary/",bcngeo:"http://datos.bcn.cl/ontologies/bcn-geographics#",oplprod:"http://www.openlinksw.com/ontology/products#",salad:"https://w3id.org/cwl/salad#",scufl2:"http://ns.taverna.org.uk/2010/scufl2#",opengov:"http://www.w3.org/opengov#",ldvm:"http://linked.opendata.cz/ontology/ldvm/",uis:"http://uis.270a.info/dataset/",wf4ever:"http://purl.org/wf4ever/wf4ever#",ftcontent:"http://www.ft.com/ontology/content/",mammal:"http://lod.taxonconcept.org/ontology/p01/Mammalia/index.owl#",wfn:"http://webofcode.org/wfn/",opmo:"http://openprovenance.org/model/opmo#",being:"http://purl.org/ontomedia/ext/common/being#",bbcprov:"http://www.bbc.co.uk/ontologies/provenance/",ids:"https://w3id.org/idsa/core/",d0:"http://ontologydesignpatterns.org/ont/wikipedia/d0.owl#",mod:"http://www.isibang.ac.in/ns/mod#",pcdt:"http://purl.org/procurement/public-contracts-datatypes#",language:"http://id.loc.gov/vocabulary/iso639-1/",pproc:"http://contsem.unizar.es/def/sector-publico/pproc#",passim:"http://data.lirmm.fr/ontologies/passim#",rlnr:"http://rdflivenews.aksw.org/resource/",tddo:"http://databugger.aksw.org/ns/core#",bnf:"http://www.w3.org/2000/10/swap/grammar/bnf#",frbrer:"http://iflastandards.info/ns/fr/frbr/frbrer/",wn20:"http://www.w3.org/2006/03/wn/wn20/",lsd:"http://linkedwidgets.org/statisticaldata/ontology/",s4envi:"https://w3id.org/def/saref4envi#",crml:"http://semweb.mmlab.be/ns/rml/condition#",lmo:"http://linkedmultimedia.org/sparql-mm/ns/2.0.0/ontology#",ws:"http://www.w3.org/ns/pim/space#",samfl:"http://def.seegrid.csiro.au/ontology/om/sam-lite#",eurostat:"http://wifo5-04.informatik.uni-mannheim.de/eurostat/resource/eurostat/",foam:"https://www.koerperfettwaage-test.de/",ogbd:"http://www.ogbd.fr/2012/ontologie#",cjr:"http://vocab.linkeddata.es/datosabiertos/def/urbanismo-infraestructuras/callejero#",lsqv:"http://lsq.aksw.org/vocab#",graves:"http://rdf.muninn-project.org/ontologies/graves#",static:"http://vocab-ld.org/vocab/static-ld#",fog:"https://w3id.org/fog#",geos:"http://www.telegraphis.net/ontology/geography/geography#",limoo:"http://purl.org/LiMo/0.1/",contsem:"http://contsem.unizar.es/def/sector-publico/contratacion#",pwo:"http://purl.org/spar/pwo/",swpm:"http://spi-fm.uca.es/spdef/models/deployment/swpm/1.0#",edgar:"http://edgarwrap.ontologycentral.com/vocab/edgar#",pco:"http://purl.org/procurement/public-contracts#",sct:"http://snomed.info/id/",roterms:"http://purl.org/wf4ever/roterms#",imf:"http://imf.270a.info/dataset/",dq:"http://def.seegrid.csiro.au/isotc211/iso19115/2003/dataquality#",citof:"http://www.essepuntato.it/2013/03/cito-functions#",phdd:"http://rdf-vocabulary.ddialliance.org/phdd#",bgdbr:"http://bg.dbpedia.org/resource/",asgv:"http://aims.fao.org/aos/agrovoc/",lmm2:"http://www.ontologydesignpatterns.org/ont/lmm/LMM_L2.owl#",step:"http://purl.org/net/step#",locwd:"http://purl.org/locwd/schema#",babelnet:"http://babelnet.org/2.0/",qb4o:"http://purl.org/olap#",lda:"http://purl.org/linked-data/api/vocab#",hico:"http://purl.org/emmedi/hico/",rdact:"http://rdaregistry.info/termList/RDACarrierType/",r4ta:"http://ns.inria.fr/ratio4ta/v1#",trig:"http://www.w3.org/2004/03/trix/rdfg-1/",text:"http://jena.apache.org/text#",form:"http://deductions-software.com/ontologies/forms.owl.ttl#",rdafrbr:"http://rdvocab.info/uri/schema/FRBRentitiesRDA/",omdoc:"http://omdoc.org/ontology/",hto:"http://project-haystack.org/hto#",acrt:"http://privatealpha.com/ontology/certification/1#",olca:"http://www.lingvoj.org/olca#",rut:"http://rdfunit.aksw.org/ns/core#",amalgame:"http://purl.org/vocabularies/amalgame#",rdagrp:"http://rdaregistry.info/termList/groovePitch/",jolux:"http://data.legilux.public.lu/resource/ontology/jolux#",csv:"http://vocab.sindice.net/csv/",merge:"http://jazz.net/ns/lqe/merge/",condition:"http://www.kinjal.com/condition:",mds:"http://doc.metalex.eu/id/",pmd:"https://w3id.org/pmd/co/",lexicon:"http://www.example.org/lexicon#",hlygt:"http://www.holygoat.co.uk/owl/redwood/0.1/tags/",jjd:"http://www.joshuajeeson.com/",osadm:"http://data.ordnancesurvey.co.uk/ontology/admingeo/",rdf123:"http://rdf123.umbc.edu/ns/",gci:"http://ontology.eil.utoronto.ca/GCI/Foundation/GCI-Foundation.owl#",infection:"http://www.agfa.com/w3c/2009/infectiousDisorder#",laabs:"http://dbpedia.org/resource/",location:"http://sw.deri.org/2006/07/location/loc#",gaf:"http://groundedannotationframework.org/",pkgsrc:"http://pkgsrc.co/schema#",dbrc:"http://dbpedia.org/resource/Category:",bis:"http://bis.270a.info/dataset/",locah:"http://data.archiveshub.ac.uk/def/",prof:"http://www.w3.org/ns/dx/prof/",odv:"http://reference.data.gov.uk/def/organogram/",msm:"http://iserve.kmi.open.ac.uk/ns/msm#",lcdr:"http://ns.lucid-project.org/revision/",topo:"http://data.ign.fr/def/topo#",year:"http://www.w3.org/year/",mocanal:"http://www.semanticweb.org/asow/ontologies/2013/9/untitled-ontology-36#",oecc:"http://www.oegov.org/core/owl/cc#",dot:"https://w3id.org/dot#",limo:"http://www.purl.org/limo-ontology/limo#",owlse:"http://www.daml.org/services/owl-s/1.2/generic/Expression.owl#",tm:"http://def.seegrid.csiro.au/isotc211/iso19108/2002/temporal#",escom:"http://vocab.linkeddata.es/datosabiertos/def/comercio/tejidoComercial#",incident:"http://vocab.resc.info/incident#",gt:"https://vocab.eccenca.com/geniustex/",pair:"http://virtual-assembly.org/ontologies/pair#",sto:"https://w3id.org/i40/sto#",llm:"http://lodlaundromat.org/metrics/ontology/",gnm:"http://www.geonames.org/ontology/mappings/",obeu:"http://data.openbudgets.eu/ontology/",reegle:"http://reegle.info/schema#",regorg:"http://www.w3.org/ns/regorg#",aktivesa:"http://sa.aktivespace.org/ontologies/aktivesa#",pmc:"http://identifiers.org/pmc/",airs:"https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#",odbc:"http://www.openlinksw.com/ontology/odbc#",ceterms:"http://purl.org/ctdl/terms/",crowd:"http://purl.org/crowd/",nxs:"http://www.neclimateus.org/",dio:"https://w3id.org/dio#",rdarm:"http://registry.info/termList/recMedium/",rdafs:"http://rdaregistry.info/termList/fontSize/",sx:"http://shex.io/ns/shex#",zr:"http://explain.z3950.org/dtd/2.0/",rdarr:"http://rdaregistry.info/termList/RDAReductionRatio/",proms:"http://promsns.org/def/proms#",ecgl:"http://schema.geolink.org/",jp1:"http://rdf.muninn-project.org/ontologies/jp1/",uc:"http://ucuenca.edu.ec/ontology#",webservice:"http://www.openlinksw.com/ontology/webservices#",puml:"http://plantuml.com/ontology#",crsw:"http://courseware.rkbexplorer.com/ontologies/courseware#",genre:"http://sparql.cwrc.ca/ontologies/genre#",rdatr:"http://rdaregistry.info/termList/typeRec/",uta:"http://uptheasset.org/ontology#",sru:"http://www.loc.gov/zing/srw/",pv:"http://ns.inria.fr/provoc#",teamwork:"http://topbraid.org/teamwork#",geod:"http://vocab.lenka.no/geo-deling#",demlab:"http://www.demcare.eu/ontologies/demlab.owl#",bevon:"http://rdfs.co/bevon/",muldicat:"http://iflastandards.info/ns/muldicat#",ou:"http://opendata.unex.es/def/ontouniversidad#",olac:"http://www.language-archives.org/OLAC/1.0/",oplcb:"http://www.openlinksw.com/schemas/crunchbase#",ns1:"http://www.w3.org/1999/xhtml/vocab#",ontosec:"http://www.semanticweb.org/ontologies/2008/11/OntologySecurity.owl#",essglobal:"http://purl.org/essglobal/vocab/v1.0/",cpack:"http://cliopatria.swi-prolog.org/schema/cpack#",rdaco:"http://rdaregistry.info/termList/RDAContentType/",cd:"http://citydata.wu.ac.at/ns#",oprovo:"http://openprovenance.org/ontology#",defns:"http://www.openarchives.org/OAI/2.0/",voc:"http://voc.odw.tw/",rdaftn:"http://rdaregistry.info/termList/TacNotation/",mdi:"http://w3id.org/multidimensional-interface/ontology#",glview:"http://schema.geolink.org/dev/view/",omnfed:"http://open-multinet.info/ontology/omn-federation#",basic:"http://def.seegrid.csiro.au/isotc211/iso19103/2005/basic#",clirio:"http://clirio.kaerle.com/clirio.owl#",mml:"http://www.w3.org/1998/Math/MathML/",cmdi:"http://www.clarin.eu/cmd/",oplecrm:"http://www.openlinksw.com/ontology/ecrm#",ha:"http://sensormeasurement.appspot.com/ont/home/homeActivity#",keys:"http://purl.org/NET/c4dm/keys.owl#",lido:"http://www.lido-schema.org/",rdag2:"http://rdvocab.info/ElementsGr2/",eurlex:"http://eur-lex.publicdata.eu/ontology/",crime:"http://purl.org/vocab/reloc/",moo:"http://www.movieontology.org/2009/11/09/movieontology.owl#",soch:"http://kulturarvsdata.se/ksamsok#",maso:"http://securitytoolbox.appspot.com/MASO#",rdafmn:"http://rdaregistry.info/termList/MusNotation/",oplmkt:"http://www.openlinksw.com/ontology/market#",output:"http://volt-name.space/vocab/output#",erce:"http://xxefe.de/",ecglview:"http://schema.geolink.org/view/",roar:"https://w3id.org/roar#",lofv:"http://purl.org/legal_form/vocab#",plg:"http://parliament.uk/ontologies/legislation/",spdx:"http://spdx.org/rdf/terms#",mmt:"http://linkedmultimedia.org/sparql-mm/functions/temporal#",espresup:"http://vocab.linkeddata.es/datosabiertos/def/hacienda/presupuestos#",bsym:"http://bsym.bloomberg.com/sym/",sylld:"http://www.semanticweb.org/syllabus/data/",rdacc:"http://rdaregistry.info/termList/RDAColourContent/",caplibacl:"http://schemas.capita-libraries.co.uk/2015/acl/schema#",ppn:"http://parliament.uk/ontologies/person-name/",kegg:"http://bio2rdf.org/ns/kegg#",vstoi:"http://hadatac.org/ont/vstoi#",vcard2006:"http://www.w3.org/2006/vcard/ns#",gq:"http://genomequest.com/",owsom:"https://onlinesocialmeasures.wordpress.com/",ali:"http://www.niso.org/schemas/ali/1.0/",rdag1:"http://rdvocab.info/Elements/",rdaterm:"http://rdaregistry.info/termList/RDATerms/",gts:"http://resource.geosciml.org/ontology/timescale/gts#",rdasco:"http://rdaregistry.info/termList/soundCont/",fnabox:"http://www.ontologydesignpatterns.org/ont/framenet/abox/",ttp:"http://eample.com/test#",esadm:"http://vocab.linkeddata.es/datosabiertos/def/sector-publico/territorio#",dsn:"http://purl.org/dsnotify/vocab/eventset/",rofch:"http://rdaregistry.info/termList/rofch/",td5:"http://td5.org/#",organ:"http://www.univalle.edu.co/ontologies/Organ#",nlon:"http://lod.nl.go.kr/ontology/",tsn:"http://purl.org/net/tsn#",eem:"http://purl.org/eem#",rofem:"http://rdaregistry.info/termList/rofem/",eccauth:"https://vocab.eccenca.com/auth/",task:"http://deductions.github.io/task-management.owl.ttl#",iana:"http://www.iana.org/assignments/relation/",kml:"http://www.opengis.net/kml/2.2#",door:"http://kannel.open.ac.uk/ontology#",ruto:"http://rdfunit.aksw.org/ns/core#",hr:"http://iserve.kmi.open.ac.uk/ns/hrests#",jpost:"http://rdf.jpostdb.org/ontology/jpost.owl#",logies:"https://data.vlaanderen.be/ns/logies#",ubiq:"http://server.ubiqore.com/ubiq/core#",eccrev:"https://vocab.eccenca.com/revision/",oplweb:"http://www.openlinksw.com/schemas/oplweb#",dcx:"http://dublincore.org/dcx/",rofer:"http://rdaregistry.info/termList/rofer/",navm:"https://w3id.org/navigation_menu#",sakthi:"http://infotech.nitk.ac.in/research-scholars/sakthi-murugan-r/",ssno:"http://www.w3.org/ns/ssn/",rvz:"http://rdfvizler.dyreriket.xyz/vocabulary/core#",lslife:"http://ontology.cybershare.utep.edu/ELSEWeb/elseweb-lifemapper.owl#",diag:"http://www.loc.gov/zing/srw/diagnostic/",oxi:"http://omerxi.com/ontologies/core.owl.ttl#",datex:"http://vocab.datex.org/terms#",pato:"http://purl.obolibrary.org/obo/",lawd:"http://lawd.info/ontology/",newsevents:"http://www.aifb.uni-karlsruhe.de/WBS/uhe/ontologies#",agrovoc:"http://aims.fao.org/aos/agrovoc/",cdao:"http://purl.obolibrary.org/obo/",bb:"http://www.snik.eu/ontology/bb/",sdt:"http://statisticaldata.linkedwidgets.org/terms/",led:"http://led.kmi.open.ac.uk/term/",lmx:"http://www.w3.org/XML/1998/namespace/",mmoon:"http://mmoon.org/mmoon/",munc:"http://ns.inria.fr/munc#",fuseki:"http://jena.apache.org/fuseki#",studiop:"http://purl.org/resource/pilatesstudio/",fntbox:"http://www.ontologydesignpatterns.org/ont/framenet/tbox/",tix:"http://toptix.com/2010/esro/",geojson:"https://purl.org/geojson/vocab#",hva:"http://www.ebusiness-unibw.org/ontologies/hva/ontology#",lheo:"http://www.conjecto.com/ontology/2015/lheo#",fr:"https://w3id.org/fr/def/core#",mexv:"http://mex.aksw.org/mex-algo#",ldl:"https://w3id.org/ldpdl/ns#",ruian:"https://data.cssz.cz/ontology/ruian/",esapar:"http://vocab.linkeddata.es/datosabiertos/def/urbanismo-infraestructuras/aparcamiento#",rdapmt:"http://rdaregistry.info/termList/prodTactile/",csdbp:"http://cs.dbpedia.org/",onisep:"http://rdf.onisep.fr/resource/",efrbroo:"http://erlangen-crm.org/efrbroo/",literal:"http://www.essepuntato.it/2010/06/literalreification/",figigii:"http://www.omg.org/spec/FIGI/GlobalInstrumentIdentifiers/",tb:"https://w3id.org/timebank#",spcm:"http://spi-fm.uca.es/spdef/models/deployment/spcm/1.0#",vidont:"http://vidont.org/",oplres:"http://www.openlinksw.com/ontology/restrictions#",sirene:"https://sireneld.io/vocab/sirene#",rdaemm:"http://rdaregistry.info/termList/emulsionMicro/",fdbp:"http://fr.dbpedia.org/property/",cwl:"https://w3id.org/cwl/cwl#",voidext:"http://rdfs.org/ns/void-ext#",whisky:"http://vocab.org/whisky/terms/",rdag3:"http://rdvocab.info/ElementsGr3/",sgg:"http://www.springernature.com/scigraph/graphs/",planet:"http://dbpedia.org/",lswpm:"http://ontology.cybershare.utep.edu/ELSEWeb/elseweb-lifemapper-parameters.owl#",webac:"http://fedora.info/definitions/v4/webac#",bbccore:"http://www.bbc.co.uk/ontologies/coreconcepts/",orcid:"http://orcid.org/",oils:"http://lemon-model.net/oils#",hello:"https://www.youtube.com/user/SuperTellAFriend/featured/",ago:"http://awesemantic-geo.link/ontology/",pid:"http://permid.org/ontology/organization/",owl2xml:"http://www.w3.org/2006/12/owl2-xml#",traffic:"http://www.sensormeasurement.appspot.com/ont/transport/traffic#",lswmo:"http://ontology.cybershare.utep.edu/ELSEWeb/elseweb-modelling.owl#",dbug:"http://ontologi.es/doap-bugs#",roadmap:"http://mappings.roadmap.org/",umls:"http://bioportal.bioontology.org/ontologies/umls/",gdc:"https://portal.gdc.cancer.gov/cases/",ldt:"https://www.w3.org/ns/ldt#",faostat:"http://reference.eionet.europa.eu/faostat/schema/",open311:"http://ontology.eil.utoronto.ca/open311#",rdfdata:"http://rdf.data-vocabulary.org/rdf.xml#",dicom:"http://purl.org/healthcarevocab/v1#",videogame:"http://purl.org/net/vgo#",vogd:"http://ogd.ifs.tuwien.ac.at/vienna/geo/",bibrm:"http://vocab.ub.uni-leipzig.de/bibrm/",oliasystem:"http://purl.org/olia/system.owl#",physo:"http://merlin.phys.uni.lodz.pl/onto/physo/physo.owl#",radar:"http://www.radar-projekt.org/display/",tui:"http://data.ifs.tuwien.ac.at/study/resource/",apf:"http://jena.apache.org/ARQ/property#",customer:"http://www.valuelabs.com/",yd:"https://yodata.io/",conll:"http://ufal.mff.cuni.cz/conll2009-st/task-description.html#",si:"http://sisteminformasi.com/",mbgd:"http://mbgd.genome.ad.jp/owl/mbgd.owl#",meeting:"http://www.w3.org/2002/07/meeting#",aprov:"http://purl.org/a-proc#",rofrr:"http://rdaregistry.info/termList/rofrr/",pp:"http://peoplesplaces.de/ontology#",escjr:"http://vocab.linkeddata.es/datosabiertos/def/urbanismo-infraestructuras/callejero#",ndnp:"http://chroniclingamerica.loc.gov/terms#",ja:"http://jena.hpl.hp.com/2005/11/Assembler#",jerm:"http://jermontology.org/ontology/JERMOntology#",vocnet:"http://schema.vocnet.org/",iati:"http://purl.org/collections/iati/",bbccms:"http://www.bbc.co.uk/ontologies/cms/",url:"http://schema.org/",mls:"http://www.w3.org/ns/mls#",rdaz:"http://rdaregistry.info/Elements/z/",eccdi:"https://vocab.eccenca.com/di/",cpov:"http://data.europa.eu/m8g/",uom:"http://www.opengis.net/def/uom/OGC/1.0/",rdabf:"http://rdaregistry.info/termList/bookFormat/",bpo:"https://w3id.org/bpo#",memento:"http://mementoweb.org/ns#",doacc:"http://purl.org/net/bel-epa/doacc#",religion:"http://rdf.muninn-project.org/ontologies/religion#",itm:"http://spi-fm.uca.es/spdef/models/genericTools/itm/1.0#",hdo:"http://www.samos.gr/ontologies/helpdeskOnto.owl#",omg:"https://w3id.org/omg#",gg:"http://www.gemeentegeschiedenis.nl/gg-schema#",lemonuby:"http://lemon-model.net/lexica/uby/",afr:"http://purl.allotrope.org/ontologies/result#",glycan:"http://purl.jp/bio/12/glyco/glycan#",fred:"http://www.ontologydesignpatterns.org/ont/fred/domain.owl#",scco:"http://rdf.ebi.ac.uk/terms/surechembl#",nobel:"http://data.nobelprize.org/terms/",ensembl:"http://rdf.ebi.ac.uk/resource/ensembl/",cim:"http://iec.ch/TC57/2013/CIM-schema-cim16#",ln:"https://w3id.org/ln#",sfd:"http://semantic-forms.cc:9112/ldp/",numbers:"http://km.aifb.kit.edu/projects/numbers/",dicera:"http://semweb.mmlab.be/ns/dicera#",wimpo:"http://rdfex.org/withImports?uri=",reg:"http://purl.org/linked-data/registry#",lfov:"https://w3id.org/legal_form#",gns:"http://sws.geonames.org/",esair:"http://vocab.linkeddata.es/datosabiertos/def/medio-ambiente/calidad-aire#",cocoon:"https://w3id.org/cocoon/v1.0#",r3d:"http://www.re3data.org/schema/3-0#",pdf:"http://ns.adobe.com/pdf/1.3/",rpath:"https://w3id.org/lodsight/rdf-path#",ethc:"http://ethoinformatics.org/ethocore/",cbim:"http://www.coinsweb.nl/cbim-2.0.rdf#",amt:"http://academic-meta-tool.xyz/vocab#",dpn:"http://purl.org/dpn#",ofrd:"http://purl.org/opdm/refrigerator#",lgdm:"http://linkedgeodata.org/meta/",its:"http://www.w3.org/2005/11/its/rdf#",gont:"https://gont.ch/",frgeo:"http://rdf.insee.fr/geo/",volt:"http://volt-name.space/ontology/",ioto:"http://www.irit.fr/recherches/MELODI/ontologies/IoT-O#",rdalay:"http://rdaregistry.info/termList/layout/",yaco:"https://www.irit.fr/recherches/MELODI/ontologies/cinema#",lmf:"http://www.lexinfo.net/lmf#",rdaar:"http://rdaregistry.info/termList/AspectRatio/",pep:"https://w3id.org/pep/",dataid:"http://dataid.dbpedia.org/ns/core#",rdacarx:"http://rdaregistry.info/termList/RDACarrierEU/",fp3:"http://vocab.fusepool.info/fp3#",esservicio:"http://vocab.linkeddata.es/datosabiertos/def/sector-publico/servicio#",tx:"http://swtmp.gitlab.io/vocabulary/templates.owl#",datacite:"http://purl.org/spar/datacite/",markus:"http://www.markus.com/",cue:"http://www.clarin.eu/cmdi/cues/display/1.0#",odapps:"http://semweb.mmlab.be/ns/odapps#",llont:"http://www.linklion.org/ontology#",audit:"http://fedora.info/definitions/v4/audit#",biml:"http://schemas.varigence.com/biml.xsd#",seeds:"http://deductions.github.io/seeds.owl.ttl#",pmo:"http://premon.fbk.eu/ontology/core#",amsl:"http://vocab.ub.uni-leipzig.de/amsl/",provinsi:"http://provinsi.com/",ttla:"https://w3id.org/ttla/",mexcore:"http://mex.aksw.org/mex-core#",opa:"https://w3id.org/laas-iot/adream#",imo:"http://imgpedia.dcc.uchile.cl/ontology#",eame:"http://www.semanticweb.org/ontologia_EA#",opllog:"http://www.openlinksw.com/ontology/logging#",ver:"https://w3id.org/version/ontology#",add:"http://www.datatourisme.fr/ontology/core/1.0#",alethio:"http://aleth.io/",rofsm:"http://rdaregistry.info/termList/rofsm/",h2o:"http://def.seegrid.csiro.au/isotc211/iso19150/-2/2012/basic#",tree:"https://w3id.org/tree#",huto:"http://ns.inria.fr/huto/",svcs:"http://rdfs.org/sioc/services#",piero:"http://reactionontology.org/piero/",bdo:"http://purl.bdrc.io/ontology/core/",vir:"http://w3id.org/vir#",um:"http://intelleo.eu/ontologies/user-model/ns/",da:"https://www.wowman.org/index.php?id=1&type=get#",uby:"http://purl.org/olia/ubyCat.owl#",lyon:"http://dbpedia.org/resource/Lyon/",naval:"http://rdf.muninn-project.org/ontologies/naval#",system:"http://www.univalle.edu.co/ontologies/System#",vplan:"http://www.ifs.tuwien.ac.at/~miksa/ontologies/VPlan.owl#",az:"https://w3id.org/people/az/",dk:"http://www.data-knowledge.org/dk/schema/rdf/latest/",cwork:"http://www.bbc.co.uk/ontologies/creativework/",wde:"http://www.wikidata.org/entity/",lovc:"https://w3id.org/lovcube/ns/lovcube#",geovoid:"http://purl.org/geovocamp/ontology/geovoid/",composer:"http://dbpedia.org/ontology/composer/",tadirah:"http://tadirah.dariah.eu/vocab/",travel:"http://www.co-ode.org/roberts/travel.owl#",imind:"http://schema.intellimind.ns/symbology#",afm:"http://purl.allotrope.org/ontologies/material/",eepsa:"https://w3id.org/eepsa#",owms:"http://standaarden.overheid.nl/owms/terms/",bdc:"http://dbpedia.org/resource/Category:",minim:"http://purl.org/minim/minim#",frappe:"http://streamreasoning.org/ontologies/frappe#",rofid:"http://rdaregistry.info/termList/rofid/",rls:"https://w3id.org/lovcube/ns/relovstats#",b3kat:"http://lod.b3kat.de/title/",rdafnv:"http://rdaregistry.info/termList/noteForm/",uneskos:"http://purl.org/voc/uneskos#",sdshare:"http://www.sdshare.org/2012/extension/",vacseen1:"http://www.semanticweb.org/parthasb/ontologies/2014/6/vacseen1/",qms:"http://data.europa.eu/esco/qms#",koly:"http://www.ensias.ma/",l2sp:"http://www.linked2safety-project.eu/properties/",tgm:"http://id.loc.gov/vocabulary/graphicMaterials/",cwlprov:"https://w3id.org/cwl/prov#",rofin:"http://rdaregistry.info/termList/rofin/",rofit:"http://rdaregistry.info/termList/rofit/",eol:"http://purl.org/biodiversity/eol/",ecore:"http://www.eclipse.org/emf/2002/Ecore#",dpv:"http://www.w3.org/ns/dpv#",alice:"http://example.org/",rdapm:"http://rdaregistry.info/termList/RDAproductionMethod/",county:"http://myexample.org/county#",gbol:"http://gbol.life/0.1#",sdmxcode:"http://purl.org/linked-data/sdmx/2009/code#",ims:"http://www.imsglobal.org/xsd/imsmd_v1p2/",ecoll:"http://purl.org/ceu/eco/1.0#",pcit:"http://public-contracts.nexacenter.org/id/propertiesRole/",tarql:"http://tarql.github.io/tarql#",mydb:"http://mydb.org/",id:"http://identifiers.org/",scho:"http://www.scholarlydata.org/ontology/conference-ontology.owl#",duv:"http://www.w3.org/ns/duv#",oplacl:"http://www.openlinksw.com/ontology/acl#",mexalgo:"http://mex.aksw.org/mex-algo#",assoc:"https://w3id.org/associations/vocab#",fun:"http://w3id.org/sparql-generate/fn/",rofrt:"http://rdaregistry.info/termList/rofrt/",meshv:"http://id.nlm.nih.gov/mesh/vocab#",lgt:"http://linkedgadget.com/wiki/Property:",fhir:"http://hl7.org/fhir/",qkdv:"http://qudt.org/vocab/dimensionvector/",rgml:"http://purl.org/puninj/2001/05/rgml-schema#",hasneto:"http://hadatac.org/ont/hasneto#",vehma:"http://deductions.github.io/vehicule-management.owl.ttl#",rdaspc:"http://rdaregistry.info/termList/specPlayback/",conference:"https://w3id.org/scholarlydata/ontology/conference-ontology.owl#",swa:"http://topbraid.org/swa#",uri4uri:"http://uri4uri.net/vocab#",juso:"http://rdfs.co/juso/",bblfish:"http://bblfish.net/people/henry/card#",pmhb:"http://pmhb.org/",cpi:"http://www.ebusiness-unibw.org/ontologies/cpi/ns#",semiot:"http://w3id.org/semiot/ontologies/semiot#",dcosample:"http://info.deepcarbon.net/sample/schema#",mmm:"http://www.mico-project.eu/ns/mmm/2.0/schema#",irsteaont:"http://ontology.irstea.fr/weather/ontology#",yso:"http://www.yso.fi/onto/yso/",brk:"http://brk.basisregistraties.overheid.nl/def/brk#",rdaft:"http://rdaregistry.info/termList/fileType/",smxm:"http://smxm.ga/",mobivoc:"http://schema.mobivoc.org/",rdabs:"http://rdaregistry.info/termList/broadcastStand/",rvl:"http://purl.org/rvl/",ipsv:"http://id.esd.org.uk/list/",dsw:"http://purl.org/dsw/",iiif:"http://iiif.io/api/image/2#",odf:"http://docs.oasis-open.org/ns/office/1.2/meta/odf#",drk:"http://drakon.su/",itcat:"http://th-brandenburg.de/ns/itcat#",pmonb:"http://premon.fbk.eu/ontology/nb#",pmofn:"http://premon.fbk.eu/ontology/fn#",ilap:"http://data.posccaesar.org/ilap/",gvoith:"http://assemblee-virtuelle.github.io/grands-voisins-v2/thesaurus.ttl#",dead:"http://utpl.edu.ec/sbc/data/",adf:"http://purl.allotrope.org/ontologies/datapackage#",emergelm:"http://purl.org/emergel/modules#",mandaat:"http://data.vlaanderen.be/ns/mandaat#",sorg:"http://schema.org/",irstea:"http://ontology.irstea.fr/",dto:"http://www.datatourisme.fr/ontology/core/1.0#",maeco:"http://edg.topbraid.solutions/maeco/",rofrm:"http://rdaregistry.info/termList/rofrm/",dwciri:"http://rs.tdwg.org/dwc/iri/",alg:"http://drakon.su/ADF#",tosh:"http://topbraid.org/tosh#",shui:"https://vocab.eccenca.com/shui/",sdmxm:"http://purl.org/linked-data/sdmx/2009/measure#",neotec:"http://neotec.rc.unesp.br/resource/Neotectonics/",vam:"http://www.metmuseum.org/",lgdt:"http://linkedgeodata.org/triplify/",chear:"http://hadatac.org/ont/chear#",oplli:"http://www.openlinksw.com/schemas/linkedin#",besluit:"http://data.vlaanderen.be/ns/besluit#",srx:"http://www.w3.org/2005/sparql-results#",ondc:"http://www.semanticweb.org/ontologies/2012/1/Ontology1329913965202.owl#",tavprov:"http://ns.taverna.org.uk/2012/tavernaprov/",nkos:"http://w3id.org/nkos#",bds:"http://www.bigdata.com/rdf/search#",gobierno:"http://www.gobierno.es/gobierno/",persee:"http://data.persee.fr/ontology/persee_ontology/",dm2e:"http://onto.dm2e.eu/schemas/dm2e/",ctrl:"https://w3id.org/ibp/CTRLont#",sfn:"http://semweb.datasciencelab.be/ns/sfn#",or:"http://openresearch.org/vocab/",fluidops:"http://www.fluidops.com/",clapit:"http://dati.gov.it/onto/clapit/",nih:"http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#",one:"https://bioportal.bioontology.org/ontologies/ONE/",pfeepsa:"https://w3id.org/pfeepsa#",nature:"http://deductions.github.io/nature_observation.owl.ttl#",pm:"http://premon.fbk.eu/resource/",rofhf:"http://rdaregistry.info/termList/rofhf/",timex:"http://data.wu.ac.at/ns/timex#",summa:"http://purl.org/voc/summa/",wdtn:"http://www.wikidata.org/prop/direct-normalized/",ppr:"http://purl.org/datanode/ppr/ns/",vsearch:"http://vocab.sti2.at/vsearch#",undata:"http://citydata.wu.ac.at/Linked-UNData/data/",oplwebsrv:"http://www.openlinksw.com/ontology/webservices#",dbfo:"http://dbpedia.org/facts/ontology#",ncicp:"http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#",voidex:"http://www.swi-prolog.org/rdf/library/",esproc:"http://vocab.linkeddata.es/datosabiertos/def/sector-publico/procedimientos#",isbdu:"http://iflastandards.info/ns/isbd/unc/elements/",metadata:"http://purl.oreilly.com/ns/meta/",scholl:"http://menemeneml.com/school#",veo:"http://linkeddata.finki.ukim.mk/lod/ontology/veo#",olac11:"http://www.language-archives.org/OLAC/1.1/",mem:"http://mementoweb.org/ns#",pcdm:"http://pcdm.org/models#",rdfp:"https://w3id.org/rdfp/",edac:"http://ontology.cybershare.utep.edu/ELSEWeb/elseweb-edac.owl#",legal:"http://www.w3.org/ns/legal#",sgfn:"http://w3id.org/sparql-generate/fn/",rdax:"http://rdaregistry.info/Elements/x/",cubeont:"http://ontology.cube.global/",input:"http://volt-name.space/vocab/input#",ctxdesc:"http://www.demcare.eu/ontologies/contextdescriptor.owl#",brt:"http://brt.basisregistraties.overheid.nl/def/top10nl#",osd:"http://a9.com/-/spec/opensearch/1.1/",ldn:"https://www.w3.org/TR/ldn/#",iter:"http://w3id.org/sparql-generate/iter/",semsur:"http://purl.org/SemSur/",lsq:"http://lsq.aksw.org/vocab#",oplbenefit:"http://www.openlinksw.com/ontology/benefits#",pmovn:"http://premon.fbk.eu/ontology/vn#",lmu:"https://w3id.org/laas-iot/lmu#",ispra:"http://dati.isprambiente.it/ontology/core#",rdapf:"http://rdaregistry.info/termList/presFormat/",cog:"http://purl.org/ontology/cco/core#",remetca:"http://www.purl.org/net/remetca#",mwapi:"https://www.mediawiki.org/ontology#API/",vocals:"http://w3id.org/rsp/vocals#",ucum:"http://purl.oclc.org/NET/muo/ucum/",pand:"http://bag.basisregistraties.overheid.nl/bag/id/pand/",geoloc:"http://deductions.github.io/geoloc.owl.ttl#",beer:"http://beer.com/",edg:"http://edg.topbraid.solutions/model/",refexo:"http://purl.jp/bio/01/refexo#",it:"http://www.influencetracker.com/ontology#",physics:"http://www.astro.umd.edu/~eshaya/astro-onto/owl/physics.owl#",wdv:"http://www.wikidata.org/value/",km4c:"http://www.disit.org/km4city/schema#",neotecbib:"http://neotec.rc.unesp.br/resource/NeotectonicsBibliography/",spv:"http://completeness.inf.unibz.it/sp-vocab#",edgarcik:"http://edgarwrap.ontologycentral.com/cik/",wail:"http://www.eyrie.org/~zednenem/2002/wail/",aozora:"http://purl.org/net/aozora/",sdmxc:"http://purl.org/linked-data/sdmx/2009/concept#",dcodt:"http://info.deepcarbon.net/datatype/schema#",swrc2:"https://www.cs.vu.nl/~mcaklein/onto/swrc_ext/2005/05#",fnom:"https://w3id.org/function/vocabulary/mapping#",bkb:"https://budayakb.cs.ui.ac.id/ns#",cff:"http://purl.oclc.org/NET/ssnx/cf/cf-feature#",roc:"https://w3id.org/ro/curate#",gdpr:"https://vocab.eccenca.com/gdpr/",rami:"http://iais.fraunhofer.de/vocabs/rami#",elod:"http://linkedeconomy.org/ontology#",nosql:"http://purl.org/db/nosql#",oplstocks:"http://www.openlinksw.com/ontology/stocks#",sgiter:"http://w3id.org/sparql-generate/iter/",bioentity:"http://bioentity.io/vocab/",dsv:"https://w3id.org/dsv#",asawoo:"http://liris.cnrs.fr/asawoo/",mus:"http://data.doremus.org/ontology#",cska:"http://pfclitex.com/",s4syst:"https://saref.etsi.org/saref4syst/",ido:"http://purl.obolibrary.org/obo/ido.owl#",provoc:"http://ns.inria.fr/provoc/",dsfv:"http://sws.ifi.uio.no/vocab/dsf/henriwi/dsf#",docker:"http://www.w3.org/ns/bde/docker/",ldqm:"http://linkeddata.es/resource/ldqm/",lg:"https://purl.org/lg/",isidore:"http://www.rechercheisidore.fr/class/",seo:"http://sda.tech/SEOontology/SEO/",changeset:"http://purl.org/vocab/changeset/schema#",dcap:"http://purl.org/ws-mmi-dc/terms/",eccpubsub:"https://vocab.eccenca.com/pubsub/",aml:"https://w3id.org/i40/aml#",swcomp:"https://github.com/ali1k/ld-reactor/blob/master/vocabulary/index.ttl#",connard:"https://mail.google.com/mail/u/1/#",dcodata:"http://info.deepcarbon.net/data/schema#",wikimedia:"http://upload.wikimedia.org/wikipedia/commons/f/f6/",rdacpc:"http://rdaregistry.info/termList/configPlayback/",rdaill:"http://rdaregistry.info/termList/IllusContent/",globalcube:"http://kalmar32.fzi.de/triples/global-cube.ttl#",devuan:"https://devuan.net.br/",ns2:"http://ogp.me/ns#video:",sdterms:"http://statisticaldata.linkedwidgets.org/terms/",dbms:"http://www.openlinksw.com/ontology/dbms-app-ontology#",edr:"https://w3id.org/laas-iot/edr#",loted:"http://loted.eu/ontology#",nno:"https://w3id.org/nno/ontology#",rm:"http://jazz.net/ns/rm#",ca:"http://complyadvantage.com/",wab:"http://wab.uib.no/cost-a32_philospace/wittgenstein.owl#",xslopm:"http://purl.org/net/opmv/types/xslt#",master1:"http://idl.u-grenoble3.fr/",number:"http://km.aifb.kit.edu/projects/numbers/number#",bld:"http://biglinkeddata.com/",d3s:"http://vocbench.solidaridad.cloud/taxonomies#",psv:"http://www.wikidata.org/prop/statement/value/",wsdl:"http://www.w3.org/ns/wsdl-rdf#",vort:"http://rockets.topbraid.solutions/vort/",iso37120:"http://ontology.eil.utoronto.ca/ISO37120.owl#",bdr:"http://purl.bdrc.io/resource/",bob:"http://good.dad/meaning/bob#",ldq:"http://www.linkeddata.es/ontology/ldq#",ifcowl:"http://www.buildingsmart-tech.org/ifcOWL/IFC4_ADD2#",rdare:"http://rdaregistry.info/termList/RDARegionalEncoding/",aseonto:"http://requirement.ase.ru/requirements_ontology#",meat:"http://example.com/",qbe:"http://citydata.wu.ac.at/qb-equations#",maet:"http://edg.topbraid.solutions/taxonomy/macroeconomics/",dby:"http://dbpedia.org/class/yago/",s4ee:"https://w3id.org/saref4ee#",unspsc:"http://ontoview.org/schema/unspsc/1#",efd:"http://data.foodanddrinkeurope.eu/ontology#",trao:"http://linkeddata.finki.ukim.mk/lod/ontology/tao#",rdagen:"http://rdaregistry.info/termList/RDAGeneration/",pbody:"http://reference.data.gov.uk/def/public-body/",aksw:"http://aksw.org/",otl:"https://w3id.org/opentrafficlights#",ontop:"https://w3id.org/ontop/",wn30:"http://purl.org/vocabularies/princeton/wn30/",spvqa:"https://bmake.th-brandenburg.de/spv#",rofim:"http://rdaregistry.info/termList/rofim/",w3cgeo:"http://www.w3.org/2003/01/geo/wgs84_pos#",eustd:"http://eurostat.linked-statistics.org/data#",rdavf:"http://rdaregistry.info/termList/videoFormat/",noise:"http://vocab.linkeddata.es/datosabiertos/def/medio-ambiente/contaminacion-acustica#",datacron:"http://www.datacron-project.eu/datAcron#",pop:"http://wiki.dbpedia.org/",rofsf:"http://rdaregistry.info/termList/rofsf/",geo7:"https://www.geo7.ch/",marcrole:"http://id.loc.gov/vocabulary/relators/",ksam:"http://kulturarvsdata.se/ksamsok#",geor:"http://www.opengis.net/def/rule/geosparql/",rfd:"http://com.intrinsec//ontology#",rdacdt:"http://rdaregistry.info/termList/RDACartoDT/",foaffff:"http://gogl.com/",imas:"https://sparql.crssnky.xyz/imasrdf/URIs/imas-schema.ttl#",tissue:"http://www.univalle.edu.co/ontologies/Tissue#",sohukd:"http://sweetontology.net/humanKnowledgeDomain/",halyard:"http://merck.github.io/Halyard/ns#",ul:"http://underlay.mit.edu/ns/",idot:"http://identifiers.org/idot/",sciprov:"http://sweetontology.net/reprSciProvenance/",ncbigene:"http://identifiers.org/ncbigene/",emergel:"http://purl.org/emergel/core#",apb:"http://www.analysispartners.org/businessmodel/",bsh:"https://brickschema.org/schema/1.1.0/BrickShape#",powla:"http://purl.org/powla/powla.owl#",ods:"http://lod.xdams.org/ontologies/ods/",atlasterms:"http://rdf.ebi.ac.uk/terms/atlas/",dnbt:"http://d-nb.info/standards/elementset/dnb#",estatwrap:"http://ontologycentral.com/2009/01/eurostat/ns#",llr:"http://lodlaundromat.org/resource/",phy:"https://w3id.org/skgo/phy#",obws:"http://delicias.dia.fi.upm.es/ontologies/ObjectWithStates.owl#",llalg:"http://www.linklion.org/algorithm/",esagen:"http://vocab.ciudadesabiertas.es/def/sector-publico/agenda-municipal#",rsctx:"http://softeng.polito.it/rsctx#",rico:"https://www.ica.org/standards/RiC/ontology#",goaf:"http://goaf.fr/goaf#",soma:"http://sweetontology.net/matr/",dpla:"http://dp.la/info/developers/map/",pmopb:"http://premon.fbk.eu/ontology/pb#",kmgeo:"http://km.aifb.kit.edu/services/geo/ontology#",crmeh:"http://purl.org/crmeh#",dm:"http://datamusee.givingsense.eu/onto/",fnml:"http://semweb.mmlab.be/ns/fnml#",ermrk:"http://www.essepuntato.it/2008/12/earmark#",eproc:"http://10.0.3.120/download/eproc_FORN_v02.owl#",bci:"https://w3id.org/BCI-ontology#",dgfr:"http://colin.maudry.com/ontologies/dgfr#",valueflows:"https://w3id.org/valueflows/",oop:"http://w3id.org/oop#",manto:"http://com.vortic3.MANTO/",r4r:"http://guava.iis.sinica.edu.tw/r4r/",modsci:"https://w3id.org/skgo/modsci#",rdaad:"http://rdaregistry.info/Elements/a/datatype/",decprov:"http://promsns.org/def/decprov#",scra:"http://purl.org/net/schemarama#",dqc:"http://semwebquality.org/ontologies/dq-constraints#",gvoi:"http://assemblee-virtuelle.github.io/grands-voisins-v2/gv.owl.ttl#",dcatnl:"http://standaarden.overheid.nl/dcatnl/terms/",oplangel:"http://www.openlinksw.com/schemas/angel#",loci:"http://linked.data.gov.au/def/loci#",daap:"http://daap.dsi.universite-paris-saclay.fr/wiki/",literature:"http://purl.org/net/cnyt-literature#",estatgph:"http://estatwrap.ontologycentral.com/id/nama_aux_gph#",ocds:"http://purl.org/onto-ocds/ocds#",fssp:"http://linkeddata.fssprus.ru/resource/",s3n:"http://w3id.org/s3n/",orgesv2:"http://datos.gob.es/sites/default/files/OntologiaDIR3/orges.owl#",oup:"http://purl.org/ontology-use-patterns#",cbb:"https://data.cbb.omgeving.vlaanderen.be/ns/cbb#",theme:"http://voc.odw.tw/theme/",estrf:"http://vocab.linkeddata.es/datosabiertos/def/transporte/trafico#",vss:"http://automotive.eurecom.fr/vsso#",rofet:"http://rdaregistry.info/termList/rofet/",imjv:"https://data.imjv.omgeving.vlaanderen.be/ns/imjv#",voidwh:"http://www.ics.forth.gr/isl/VoIDWarehouse/VoID_Extension_Schema.owl#",occ:"http://w3id.org/occ#",gmo:"http://purl.jp/bio/10/gmo/",ideotalex:"http://www.ideotalex.eu/datos/recurso/",nas:"https://data.nasa.gov/ontologies/atmonto/NAS#",xbrll:"https://w3id.org/vocab/xbrll#",ii:"http://sparql.cwrc.ca/ontologies/ii#",iotlite:"http://purl.oclc.org/NET/UNIS/fiware/iot-lite#",dmp:"http://www.sysresearch.org/rda-common-dmp#",rimmf:"http://rimmf.com/vocab/",ogdl4m:"https://github.com/martynui/OGDL4M/",odw:"http://odw.tw/",tikag:"https://www.tikag.com/",qk:"http://qudt.org/vocab/quantitykind/",somaoc:"http://sweetontology.net/matrOrganicCompound/",tsnchange:"http://purl.org/net/tsnchange#",crminf:"http://www.cidoc-crm.org/cidoc-crm/CRMinf/",prohow:"https://w3id.org/prohow#",hosp:"http://health.data.gov/def/hospital/",gdprov:"https://w3id.org/GDPRov#",lcsh:"http://id.loc.gov/authorities/subjects/",ecowlim:"http://ecowlim.tfri.gov.tw/lode/resource/",pham:"https://w3id.org/skgo/pham#",nrv:"http://ns.inria.fr/nrv#",gdprtext:"https://w3id.org/GDPRtEXT#",geofabric:"http://linked.data.gov.au/def/geofabric#",gnaf:"http://linked.data.gov.au/def/gnaf#",soproptg:"http://sweetontology.net/propTemperatureGradient/",snac:"http://socialarchive.iath.virginia.edu/",linkrel:"https://www.w3.org/ns/iana/link-relations/relation#",smartapi:"http://smart-api.io/ontology/1.0/smartapi#",ccp:"http://cookingbigdata.com/linkeddata/ccpricing#",oplp:"http://www.openlinksw.com/ontology/purchases#",terms:"http://purl.org/dc/terms/",yandex:"http://yandex.ru/",soreaa:"http://sweetontology.net/realmAtmo/",mexperf:"http://mex.aksw.org/mex-perf#",omnlc:"http://open-multinet.info/ontology/omn-lifecycle#",sfl:"http://data.finlex.fi/schema/sfl/",eproc2:"http://10.0.3.120/download/eproc_FORN_v04.owl#",fel:"http://w3id.org/vcb/fel#",isaterms:"http://purl.org/isaterms/",cwlgit:"https://w3id.org/cwl/view/git/",esdbpr:"http://es.dbpedia.org/resource/",loupe:"http://ont-loupe.linkeddata.es/def/core/",bitl:"http://lib.bit.edu.cn/ontology/1.0/",iab:"https://www.iab.com/guidelines/taxonomy/",s4bldg:"https://w3id.org/def/saref4bldg#",shema:"http://schema.org/",isoadr:"http://reference.data.gov.au/def/ont/iso19160-1-address#",m3:"http://sensormeasurement.appspot.com/m3#",earth:"http://linked.earth/ontology#",ordo:"http://www.orpha.net/ORDO/",ontoneo:"http://purl.obolibrary.org/obo/ontoneo/",cwmo:"http://purl.org/cwmo/#",eqp:"https://data.nasa.gov/ontologies/atmonto/equipment#",lesa:"http://hadatac.org/ont/lesa#",gcon:"https://w3id.org/GConsent#",mdont:"http://ont.matchdeck.com/",wild:"http://purl.org/wild/vocab#",ddb:"http://www.deutsche-digitale-bibliothek.de/edm/",stx:"http://purl.org/cyber/stix#",pplan:"http://purl.org/net/p-plan#",jup:"http://w3id.org/charta77/jup/",sopropp:"http://sweetontology.net/propPressure/",pq:"http://www.wikidata.org/prop/qualifier/",m3lite:"http://purl.org/iot/vocab/m3-lite#",osys:"http://purl.org/olia/system.owl#",hctl:"https://www.w3.org/2019/wot/hypermedia#",stencila:"http://schema.stenci.la/",sopropsl:"http://sweetontology.net/propSpaceLocation/",biolink:"https://w3id.org/biolink/vocab/",lblodlg:"http://data.lblod.info/vocabularies/leidinggevenden/",capes:"http://vocab.capes.gov.br/def/vcav#",esgs:"https://w3id.org/edwin/ontology/",sostc:"http://sweetontology.net/stateChemical/",iaph:"http://www.juntadeandalucia.es/datosabiertos/portal/iaph/dataset/dataset/6c199ca2-8d2e-4c12-833c-f28",extech:"https://w3id.org/executionTechnique/ontology/",sostv:"http://sweetontology.net/stateVisibility/",soproptf:"http://sweetontology.net/propTimeFrequency/",frbroo:"http://iflastandards.info/ns/fr/frbr/frbroo/",sophatmowm:"https://sweetontology.net/phenAtmoWindMesoscale/",losp:"http://sparql.sstu.ru:3030/speciality/",medred:"http://w3id.org/medred/medred#",soprocsc:"http://sweetontology.net/procStateChange/",sopropsp:"http://sweetontology.net/propSpeed/",chemsci:"https://w3id.org/skgo/chemsci#",jsonschema:"https://www.w3.org/2019/wot/json-schema#",vehman:"http://deductions.github.io/vehicule-management.owl.ttl#",skoslex:"https://bp4mc2.org/def/skos-lex#",sorepsc:"http://sweetontology.net/reprSciComponent/",sopropsdis:"http://sweetontology.net/propSpaceDistance/",wotsec:"https://www.w3.org/2019/wot/security#",constant:"http://qudt.org/vocab/constant/",epplan:"https://w3id.org/ep-plan#",sorepsf:"http://sweetontology.net/reprSciFunction/",soreacz:"http://sweetontology.net/realmClimateZone/",sophsy:"http://sweetontology.net/phenSystem/",sorepmo:"http://sweetontology.net/reprMathOperation/",sweet:"http://sweetontology.net/",sosttf:"http://sweetontology.net/stateTimeFrequency/",sopropti:"http://sweetontology.net/propTime/",esagm:"http://vocab.ciudadesabiertas.es/def/sector-publico/agenda-municipal#",soprocp:"http://sweetontology.net/procPhysical/",eppl:"https://w3id.org/ep-plan#",sorelm:"http://sweetontology.net/relaMath/",sopropo:"http://sweetontology.net/propOrdinal/",eccf:"http://data.europa.eu/54i/",iospress:"http://ld.iospress.nl/rdf/ontology/",sorept:"http://sweetontology.net/reprTime/",dave:"http://theme-e.adaptcentre.ie/dave#",dentsci:"https://w3id.org/skgo/dentsci#",soproc:"http://sweetontology.net/proc/",soprops:"http://sweetontology.net/propSpace/",sorepsrs:"http://sweetontology.net/reprSpaceReferenceSystem/",sorepsl:"http://sweetontology.net/reprSciLaw/",soreaas:"http://sweetontology.net/realmAstroStar/",somamin:"http://sweetontology.net/matrMineral/",sophatmow:"http://sweetontology.net/phenAtmoWind/",sopropsdir:"http://sweetontology.net/propSpaceDirection/",sorelh:"http://sweetontology.net/relaHuman/",soreaofl:"http://sweetontology.net/realmOceanFloor/",sostth:"http://sweetontology.net/stateThermodynamic/",sorealc:"http://sweetontology.net/realmLandCoastal/",sorepscd:"http://sweetontology.net/reprSpaceCoordinate/",sopropi:"http://sweetontology.net/propIndex/",sohutr:"http://sweetontology.net/humanTechReadiness/",sostrr:"http://sweetontology.net/stateRoleRepresentative/",sohut:"http://sweetontology.net/humanTransportation/",sohur:"http://sweetontology.net/humanResearch/",pineapple:"http://hexananas.com/pineapple#",sophso:"http://sweetontology.net/phenSolid/",sorepmso:"http://sweetontology.net/reprMathSolution/",sophoc:"http://sweetontology.net/phenOceanCoastal/",sorepmg:"http://sweetontology.net/reprMathGraph/",sophfd:"http://sweetontology.net/phenFluidDynamics/",sopropr:"http://sweetontology.net/propRotation/",sorepmfo:"http://sweetontology.net/reprMathFunctionOrthogonal/",soprope:"http://sweetontology.net/propEnergy/",ldc:"https://tac.nist.gov/tracks/SM-KBP/2018/ontologies/SeedlingOntology#",sopropsh:"http://sweetontology.net/propSpaceHeight/",sorepsu:"http://sweetontology.net/reprSciUnits/",dprov:"http://promsns.org/def/do#",sorepdp:"http://sweetontology.net/reprDataProduct/",sorel:"http://sweetontology.net/rela/",sopropfr:"http://sweetontology.net/propFraction/",soreas:"http://sweetontology.net/realmSoil/",pcdmuse:"http://pcdm.org/use#",skosthes:"http://purl.org/iso25964/skos-thes#",asgs:"http://linked.data.gov.au/def/asgs#",foio:"https://w3id.org/seas/FeatureOfInterestOntology/",misp:"http://purl.org/cyber/misp#",somaae:"http://sweetontology.net/matrAerosol/",trek:"https://w3id.org/trek/",sostri:"http://sweetontology.net/stateRoleImpact/",sorear:"http://sweetontology.net/realmRegion/",sorelcl:"http://sweetontology.net/relaClimate/",inchikey:"https://identifiers.org/inchikey:",sophatmopc:"http://sweetontology.net/phenAtmoPrecipitation/",sohues:"http://sweetontology.net/humanEnvirStandards/",somanr:"http://sweetontology.net/matrNaturalResource/",sopropmf:"http://sweetontology.net/propMassFlux/",sorepm:"http://sweetontology.net/reprMath/",sopropcap:"http://sweetontology.net/propCapacity/",sorep:"http://sweetontology.net/repr/",sorelpr:"http://sweetontology.net/relaProvenance/",mccv:"http://purl.jp/bio/10/mccv#",probont:"http://www.probonto.org/ontology#",sopropfu:"http://sweetontology.net/propFunction/",sopropm:"http://sweetontology.net/propMass/",sopropb:"http://sweetontology.net/propBinary/",sostrt:"http://sweetontology.net/stateRoleTrust/",somarock:"http://sweetontology.net/matrRock/",sorepdsr:"http://sweetontology.net/reprDataServiceReduction/",sophel:"http://sweetontology.net/phenElecMag/",phto:"http://rhizomik.net/ontologies/PlantHealthThreats.owl.ttl#",sorelsp:"http://sweetontology.net/relaSpace/",sorelsc:"http://sweetontology.net/relaSci/",somais:"http://sweetontology.net/matrIsotope/",twitter:"http://stocktwits.com/",somaem:"http://sweetontology.net/matrElementalMolecule/",sostso:"http://sweetontology.net/stateSolid/",sopropef:"http://sweetontology.net/propEnergyFlux/",soreps:"http://sweetontology.net/reprSpace/",sost:"http://sweetontology.net/state/",sopropcat:"http://sweetontology.net/propCategorical/",d2s:"https://w3id.org/d2s/",proton:"http://www.ontotext.com/proton/",sosttg:"http://sweetontology.net/stateTimeGeologic/",sorealp:"http://sweetontology.net/realmLandProtected/",sorepsp:"http://sweetontology.net/reprSciProvenance/",somapl:"http://sweetontology.net/matrPlant/",sophatmos:"http://sweetontology.net/phenAtmoSky/",matvoc:"http://stream-ontology.com/matvoc/",sopropdifu:"http://sweetontology.net/propDiffusivity/",edupro:"http://ns.inria.fr/semed/eduprogression#",sorealo:"http://sweetontology.net/realmLandOrographic/",sophcr:"http://sweetontology.net/phenCryo/",sophec:"http://sweetontology.net/phenEcology/",sorepdf:"http://sweetontology.net/reprDataFormat/",sostsy:"http://sweetontology.net/stateSystem/",soph:"http://sweetontology.net/phen/",sorepsme:"http://sweetontology.net/reprSciMethodology/",sorepdsv:"http://sweetontology.net/reprDataServiceValidation/",sopropsm:"http://sweetontology.net/propSpaceMultidimensional/",soreahb:"http://sweetontology.net/realmHydroBody/",biogrid:"http://thebiogrid.org/",soprop:"http://sweetontology.net/prop/",sostb:"http://sweetontology.net/stateBiological/",sosto:"http://sweetontology.net/stateOrdinal/",sorelch:"http://sweetontology.net/relaChemical/",sopropcou:"http://sweetontology.net/propCount/",soreao:"http://sweetontology.net/realmOcean/",sorepmf:"http://sweetontology.net/reprMathFunction/",sorelph:"http://sweetontology.net/relaPhysical/",soreac:"http://sweetontology.net/realmCryo/",sophei:"http://sweetontology.net/phenEnvirImpact/",sophst:"http://sweetontology.net/phenStar/",sorelt:"http://sweetontology.net/relaTime/",sophcy:"http://sweetontology.net/phenCycle/",sorepdsg:"http://sweetontology.net/reprDataServiceGeospatial/",sorepmst:"http://sweetontology.net/reprMathStatistics/",soreabb:"http://sweetontology.net/realmBiolBiome/",somaind:"http://sweetontology.net/matrIndustrial/",sopropdife:"http://sweetontology.net/propDifference/",soreaaw:"http://sweetontology.net/realmAtmoWeather/",somac:"http://sweetontology.net/matrCompound/",somaw:"http://sweetontology.net/matrWater/",ciao:"http://ciao.it/",sohuj:"http://sweetontology.net/humanJurisdiction/",somains:"http://sweetontology.net/matrInstrument/",sophatmofo:"http://sweetontology.net/phenAtmoFog/",sopropq:"http://sweetontology.net/propQuantity/",sorepsd:"http://sweetontology.net/reprSpaceDirection/",atts:"https://data.nasa.gov/ontologies/atmonto/general#",sopropche:"http://sweetontology.net/propChemical/",sorepds:"http://sweetontology.net/reprDataService/",sorepts:"http://sweetontology.net/reprTimeSeason/",ingredient:"http://www.owl-ontologies.com/test.owl/ingredient/",sophft:"http://sweetontology.net/phenFluidTransport/",sophpc:"http://sweetontology.net/phenPlanetClimate/",sophatmoc:"http://sweetontology.net/phenAtmoCloud/",sophcm:"http://sweetontology.net/phenCycleMaterial/",sorepdsa:"http://sweetontology.net/reprDataServiceAnalysis/",sopropcon:"http://sweetontology.net/propConductivity/",osmm:"https://www.openstreetmap.org/meta/",sopropdr:"http://sweetontology.net/propDimensionlessRatio/",somael:"http://sweetontology.net/matrElement/",somarocki:"http://sweetontology.net/matrRockIgneous/",lprov:"http://id.learning-provider.data.ac.uk/terms#",donto:"http://reference.data.gov.au/def/ont/dataset#",sopropcha:"http://sweetontology.net/propCharge/",sophwn:"http://sweetontology.net/phenWaveNoise/",somaf:"http://sweetontology.net/matrFacility/",hdgi:"https://w3id.org/hdgi#",snomedct:"http://purl.bioontology.org/ontology/SNOMEDCT/",beo:"https://w3id.org/beo#",somab:"http://sweetontology.net/matrBiomass/",sophb:"http://sweetontology.net/phenBiol/",country:"http://eulersharp.sourceforge.net/2003/03swap/countries#",bldont:"http://ont.biglinkeddata.com/",sorepdm:"http://sweetontology.net/reprDataModel/",sostrg:"http://sweetontology.net/stateRoleGeographic/",somaeq:"http://sweetontology.net/matrEquipment/",sophod:"http://sweetontology.net/phenOceanDynamics/",somaen:"http://sweetontology.net/matrEnergy/",sohuecons:"http://sweetontology.net/humanEnvirConservation/",soreaabl:"http://sweetontology.net/realmAtmoBoundaryLayer/",sopropst:"http://sweetontology.net/propSpaceThickness/",soreal:"http://sweetontology.net/realmLandform/",gleio:"http://lei.info/gleio/",eupont:"http://elite.polito.it/ontologies/eupont.owl#",sophatmot:"http://sweetontology.net/phenAtmoTransport/",idsc:"https://w3id.org/idsa/code/",soman:"http://sweetontology.net/matrAnimal/",taxref:"http://taxref.mnhn.fr/lod/taxon/",somas:"http://sweetontology.net/matrSediment/",esbici:"http://vocab.ciudadesabiertas.es/def/transporte/bicicleta-publica#",sophatmol:"http://sweetontology.net/phenAtmoLightning/",istex:"https://data.istex.fr/ontology/istex#",sostf:"http://sweetontology.net/stateFluid/",mmms:"http://ldf.fi/schema/mmm/",sophatmofr:"http://sweetontology.net/phenAtmoFront/",sophsyc:"http://sweetontology.net/phenSystemComplexity/",soprocc:"http://sweetontology.net/procChemical/",sostre:"http://sweetontology.net/stateRealm/",sophw:"http://sweetontology.net/phenWave/",schoi:"https://w3id.org/scholarlydata/ontology/indicators-ontology.owl#",sosttc:"http://sweetontology.net/stateTimeCycle/",sostti:"http://sweetontology.net/stateTime/",soprocw:"http://sweetontology.net/procWave/",sophatmops:"http://sweetontology.net/phenAtmoPressure/",sostsb:"http://sweetontology.net/stateSpectralBand/",ocsw:"http://data.diekb.org/def/ocsw#",cci:"http://cookingbigdata.com/linkeddata/ccinstances#",sophr:"http://sweetontology.net/phenReaction/",atd:"https://data.nasa.gov/ontologies/atmonto/data#",dbm:"http://purl.org/net/dbm/ontology#",sostrc:"http://sweetontology.net/stateRoleChemical/",sophm:"http://sweetontology.net/phenMixing/",somaio:"http://sweetontology.net/matrIon/",osmt:"https://wiki.openstreetmap.org/wiki/Key:",sorepsg3:"http://sweetontology.net/reprSpaceGeometry3D/",sostsp:"http://sweetontology.net/stateSpace/",soreaah:"http://sweetontology.net/realmAstroHelio/",soreptd:"http://sweetontology.net/reprTimeDay/",cbs:"http://betalinkeddata.cbs.nl/def/cbs#",lv2:"http://lv2plug.in/ns/lv2core/",ggbn:"http://data.ggbn.org/schemas/ggbn/terms/",sohu:"http://sweetontology.net/human/",sophatmo:"http://sweetontology.net/phenAtmo/",sostrb:"http://sweetontology.net/stateRoleBiological/",sostdp:"http://sweetontology.net/stateDataProcessing/",sopropt:"http://sweetontology.net/propTemperature/",cfrl:"http://linkeddata.finki.ukim.mk/lod/ontology/cfrl#",sophfi:"http://sweetontology.net/phenFluidInstability/",mbkeys:"https://pastebin.com/ThBfphb8#",pnv:"https://w3id.org/pnv#",sophhe:"http://sweetontology.net/phenHelio/",ccomid:"http://www.ontologyrepository.com/CommonCoreOntologies/Mid/",sostp:"http://sweetontology.net/statePhysical/",omop:"http://api.ohdsi.org/WebAPI/vocabulary/concept/",rank:"http://www.ontotext.com/owlim/RDFRank#",sostef:"http://sweetontology.net/stateEnergyFlux/",sophen:"http://sweetontology.net/phenEnergy/",wds:"http://www.wikidata.org/entity/statement/",asio:"http://purl.org/hercules/asio/core#",sostss:"http://sweetontology.net/stateSpaceScale/",omim:"http://purl.bioontology.org/ontology/OMIM/",soreaer:"http://sweetontology.net/realmEarthReference/",soreaofe:"http://sweetontology.net/realmOceanFeature/",somapa:"http://sweetontology.net/matrParticle/",malaka:"http://george.gr/",sohueccont:"http://sweetontology.net/humanEnvirControl/",compub:"https://sireneld.io/vocab/compub#",sostst:"http://sweetontology.net/stateStorm/",she:"http://shacleditor.org/",sostro:"http://sweetontology.net/stateRole/",sophhy:"http://sweetontology.net/phenHydro/",sorepsmo:"http://sweetontology.net/reprSciModel/",sorealv:"http://sweetontology.net/realmLandVolcanic/",sophgt:"http://sweetontology.net/phenGeolTectonic/",ccsla:"http://cookingbigdata.com/linkeddata/ccsla#",oplsoft:"http://www.openlinksw.com/ontology/software#",mobiliteit:"https://data.vlaanderen.be/ns/mobiliteit#",s4city:"https://saref.etsi.org/saref4city/",io:"https://iaco.me/",sorealf:"http://sweetontology.net/realmLandFluvial/",sohuc:"http://sweetontology.net/humanCommerce/",sopho:"http://sweetontology.net/phenOcean/",somamic:"http://sweetontology.net/matrMicrobiota/",sohuea:"http://sweetontology.net/humanEnvirAssessment/",sorealg:"http://sweetontology.net/realmLandGlacial/",soreaab:"http://sweetontology.net/realmAstroBody/",sostsc:"http://sweetontology.net/stateSpaceConfiguration/",sophgs:"http://sweetontology.net/phenGeolSeismicity/",gx:"https://graphite.synaptica.net/extension/",gas:"http://www.bigdata.com/rdf/gas#",soall:"http://sweetontology.net/sweetAll/",sophgg:"http://sweetontology.net/phenGeolGeomorphology/",brot:"https://w3id.org/brot#",sorealt:"http://sweetontology.net/realmLandTectonic/",oco:"https://w3id.org/oc/ontology/",say:"http://example.org/say/",sohua:"http://sweetontology.net/humanAgriculture/",iaco:"https://iaco.me/",dfcb:"http://datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#",birthdate:"http://schema.org/birthDate/",atm:"https://data.nasa.gov/ontologies/atmonto/ATM#",docam:"https://www.docam.ca/glossaurus/",arp:"http://www.arpenteur.org/ontology/Arpenteur.owl#",dfc:"http://datafoodconsortium.org/ontologies/DFC_FullModel.owl#",sophg:"http://sweetontology.net/phenGeol/",taxrefprop:"http://taxref.mnhn.fr/lod/property/",ei2a:"http://opendata.aragon.es/def/ei2a#",sostsl:"http://sweetontology.net/stateSpectralLine/",sohud:"http://sweetontology.net/humanDecision/",wasa:"http://vocab.sti2.at/wasa/",sophgv:"http://sweetontology.net/phenGeolVolcano/",osmrel:"https://www.openstreetmap.org/relation/",soreala:"http://sweetontology.net/realmLandAeolian/",dd:"http://example.org/dummydata/",waa:"http://purl.oclc.org/NET/WebApiAuthentication#",ci:"https://privatealpha.com/ontology/content-inventory/1#",s4agri:"https://saref.etsi.org/saref4agri/",bs:"https://w3id.org/bs#",fibo:"https://spec.edmcouncil.org/fibo/ontology/master/latest/",fernanda:"http://fernanda.nl/",uimo:"http://vocab.sti2.at/uimo/",persoon:"http://data.vlaanderen.be/ns/persoon#",bperson:"http://data.vlaanderen.be/ns/persoon#",ld:"http://linkeddata.ru/",saref4envi:"https://saref.etsi.org/saref4envi/",trak:"https://trakmetamodel.sourceforge.io/vocab/rdf-schema.rdf#",s4ener:"https://saref.etsi.org/saref4ener/",wotc:"http://purl.org/wot-catalogue#",osmway:"https://www.openstreetmap.org/way/",sorea:"http://sweetontology.net/realm/",sophgf:"http://sweetontology.net/phenGeolFault/",osmnode:"https://www.openstreetmap.org/node/",oplfeat:"http://www.openlinksw.com/ontology/features#",mgv:"http://mangaview.fr/mgv#",ccr:"http://cookingbigdata.com/linkeddata/ccregions#",ogura:"https://sparql.crssnky.xyz/Ogura_Hyakunin_Isshu_LinkedRDF/URIs/Ogura_Hyakunin_Isshu_schema.ttl#",knows:"http://semantic.komc/usu/2020/knows#",ldes:"https://w3id.org/ldes#",movieo:"http://movie.com/ontology/",lexicog:"http://www.w3.org/ns/lemon/lexicog#",toaru:"https://metadata.moe/toaru-sparql/elements/",eppo:"https://gd.eppo.int/taxon/",gco:"http://purl.jp/bio/12/glyco/conjugate#",ebg:"http://data.businessgraph.io/ontology#",mpg123:"https://devuan.net.br/wiki/mpg123/",univ:"http://univ.io/",jur:"http://sweet.jpl.nasa.gov/2.3/humanJurisdiction.owl#",motogp:"http://www.motogp.com/",mr:"http://marineregions.org/ns/ontology#",dbonto:"http://dbepedia.org/ontology/",bao:"http://www.bioassayontology.org/bao#",quran:"http://khalidaloufi.sa/quran#",estraf:"http://vocab.ciudadesabiertas.es/def/transporte/trafico#",srv:"http://www.daml.org/services/owl-s/1.2/Service.owl#",cto:"https://w3id.org/cto#",maroc:"http://fr.dbpedia.org/page/Maroc/",mltd:"https://mltd.pikopikopla.net/mltd-schema#",cts:"http://rdf.cdisc.org/ct/schema#",esconv:"http://vocab.ciudadesabiertas.es/def/sector-publico/convenio#",prismdb:"https://prismdb.takanakahiko.me/prism-schema.ttl#",rl:"http://rl.com/resources/",hola:"https://moodle.insa-lyon.fr/course/view.php?id=",kko:"http://kbpedia.org/kko/rc/",pgxo:"http://pgxo.loria.fr/",melding:"http://lblod.data.gift/vocabularies/automatische-melding/",ble:"http://vocab.rapidthings.eu/ns/ble.ttl#",geodcat:"http://data.europa.eu/930/",ams:"http://data.amadeus.com/",cso:"http://cso.kmi.open.ac.uk/schema/cso/",marcgt:"https://id.loc.gov/vocabulary/marcgt/",accid:"http://pid.accurids.com/",ibeacon:"http://vocab.rapidthings.eu/ns/apple/ibeacon.ttl#",nsg:"https://neuroshapes.org/",rdasource:"http://rdaregistry.info/termList/RDARecordingSources/",i18n:"https://www.w3.org/ns/i18n#",contry:"http://dbpedia.org/resource/Lyon#",gom:"https://w3id.org/gom#",rdapol:"http://rdaregistry.info/termList/RDAPolarity/",la:"https://linked.art/ns/terms/",vlueprint:"https://vlueprint.org/schema/",fx:"http://sparql.xyz/facade-x/ns/",xyz:"http://sparql.xyz/facade-x/data/",mag:"https://makg.org/property/",mdcs:"https://mdcs.monumentenkennis.nl/damageatlas/ontology#",sty:"http://purl.bioontology.org/ontology/STY/",karstlink:"https://ontology.uis-speleo.org/ontology/#",rdaut:"http://rdaregistry.info/termList/RDAUnitOfTime/",tso:"https://w3id.org/tso#",contax:"https://w3id.org/con-tax#",rdat:"http://rdaregistry.info/Elements/t/",dom:"https://html.spec.whatwg.org/#",esautob:"http://vocab.ciudadesabiertas.es/def/transporte/autobus#",oeso:"http://www.opensilex.org/vocabularies/oeso#",w3id:"https://w3id.org/",ssnx:"http://purl.oclc.org/NET/ssnx/ssn#",bop:"https://w3id.org/bop#",vph:"http://purl.org/ozo/vph.owl#",rdaio:"http://rdaregistry.info/Elements/i/object/",hops:"https://rdf.ag/o/hops#",w3geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",rdaep:"http://rdaregistry.info/termList/RDAExtensionPlan/",datagc:"https://data.grottocenter.org/ldp/",esempleo:"http://vocab.ciudadesabiertas.es/def/sector-publico/empleo#",rpg:"http://rpg.data.is4.site/",rofchrda:"http://rdaregistry.info/termList/rofchrda/",srr:"https://w3id.org/srr#",samian:"http://lod.archaeology.link/data/samian/",check:"http://pornhub.com/",rdaao:"http://rdaregistry.info/Elements/a/object/",matrycs:"http://matrycs.com/",kpd:"http://purl.org/kpd/",freq:"http://purl.org/cld/freq/",smithy:"https://awslabs.github.io/smithy/rdf-1.0#",itops:"https://vocab.eccenca.com/itops/",slm:"http://urn.fi/URN:NBN:fi:au:slm:",rdaxd:"http://rdaregistry.info/Elements/x/datatype/",mnx:"https://rdf.metanetx.org/schema/",rdatd:"http://rdaregistry.info/Elements/t/datatype/",mesh2021:"http://id.nlm.nih.gov/mesh/2021/",textgrid:"https://textgridrep.org/",rdamo:"http://rdaregistry.info/Elements/m/object/",rdato:"http://rdaregistry.info/Elements/t/object/",bdg:"http://data.bigdatagrapes.eu/resource/ontology/",rdaed:"http://rdaregistry.info/Elements/e/datatype/",rdaid:"http://rdaregistry.info/Elements/i/datatype/",seasd:"https://w3id.org/seas/",rdatb:"http://rdaregistry.info/termList/RDATypeOfBinding/",bleadapter:"http://vocab.rapidthings.eu/ns/ble/adapter.ttl#",vr:"https://www.w3.org/2018/credentials/v1/",epcis:"https://ns.gs1.org/epcis/",sou:"http://qudt.org/vocab/sou/",memorix:"http://memorix.io/ontology#",lado:"http://archaeology.link/ontology#",rdan:"http://rdaregistry.info/Elements/n/",oghamonto:"http://ontology.ogham.link/",signify:"http://purl.org/signify/ns#",comp:"http://semweb.mmlab.be/ns/rml-compression#",rdand:"http://rdaregistry.info/Elements/n/datatype/",rdamd:"http://rdaregistry.info/Elements/m/datatype/",m8g:"http://data.europa.eu/m8g/",rdaxo:"http://rdaregistry.info/Elements/x/object/",cerealstoo:"http://rdf.ag/o/cerealstoo#",faas:"http://semantic-faas.com/ontology#",rdano:"http://rdaregistry.info/Elements/n/object/",cinema:"http://www.semanticweb.org/julien/morgann/cinema#",idpo:"https://w3id.org/idpo#",kdsf:"https://kerndatensatz-forschung.de/version1/technisches_datenmodell/owl/kdsf.owl#",rdawd:"http://rdaregistry.info/Elements/w/datatype/",rdatask:"http://rdaregistry.info/termList/RDATasks/",bcom:"https://w3id.org/bcom#",spec:"http://www.w3.org/ns/spec#",arena:"https://solid.ti.rw.fau.de/public/ns/arena#",ch:"https://schema.ld.admin.ch/",hpont:"https://w3id.org/hpont#",rdap:"http://rdaregistry.info/Elements/p/",cbv:"https://ns.gs1.org/cbv/",rdamat:"http://rdaregistry.info/termList/RDAMaterial/",ogham:"http://lod.ogham.link/data/",oidc:"http://www.w3.org/ns/solid/oidc#",rdapath:"http://rdaregistry.info/termList/RDARecordingMethods/",rdasca:"http://rdaregistry.info/termList/scale/",eurio:"http://data.europa.eu/s66#",citedcat:"https://w3id.org/citedcat-ap/",mrk:"http://www.mydomain.org/Mrk-ns#",nprl:"http://data.nobelprize.org/resource/laureate/",folio:"http://IBCNServices.github.io/Folio-Ontology/Folio.owl#",rdawo:"http://rdaregistry.info/Elements/w/object/",rdapd:"http://rdaregistry.info/Elements/p/datatype/",biocrm:"http://ldf.fi/schema/bioc/",ofn:"http://www.ontotext.com/sparql/functions/",rofsfrda:"http://rdaregistry.info/termList/rofsfrda/",paf:"https://paf.link/",rofitrda:"http://rdaregistry.info/termList/rofitrda/",bcfowl:"http://lbd.arch.rwth-aachen.de/bcfOWL#",rdaim:"http://rdaregistry.info/termList/RDAInteractivityMode/",luigiusai:"https://www.luigiusai.it/wp#",nanopub:"http://www.nanopub.org/nschema#",roffgrda:"http://rdaregistry.info/termList/roffgrda/",encargado:"http://semRAT.edu/",poke:"https://pokemonkg.org/ontology#",aspect:"http://purl.org/aspect/",react:"https://w3id.org/react#",eep:"https://w3id.org/eep#",uberon:"http://purl.obolibrary.org/obo/UBERON_",cpc:"https://data.epo.org/linked-data/def/cpc/",cpg:"http://modellingdh.github.io/ont/odp/pgc/",bag2:"http://bag.basisregistraties.overheid.nl/def/bag#",rmlt:"http://semweb.mmlab.be/ns/rml-target#",ea:"http://eaontology.protect.linkeddata.es/def/",opltw:"http://www.openlinksw.com/schemas/twitter#",tci:"https://w3id.org/lbs/tci#",cgo:"https://www.tno.nl/agrifood/ontology/common-greenhouse-ontology#",s223:"http://data.ashrae.org/standard223#",aff:"https://w3id.org/affectedBy#",xmlns:"http://xmlns.com/foaf/0.1/",gax:"http://w3id.org/gaia-x/core#",setl:"http://purl.org/twc/vocab/setl/",lsqr:"http://lsq.aksw.org/",mrt:"http://marineregions.org/ns/placetypes#",djo:"http://purl.org/datajourneys/",srtun:"https://www.inf.bi.rub.de/srtun#",ghga:"http://w3id.org/ghga/",bau:"https://terminology.fraunhofer.de/voc/bau#",srmo:"https://w3id.org/srmo#",nsd:"https://w3id.org/nsd#",hqdmontol:"http://www.semanticweb.org/magma-core/ontologies/hqdm#",srt:"http://w3id.org/srt#",ewg:"http://ethoinformatics.org/",generiek:"https://data.vlaanderen.be/ns/generiek#",ontobras:"http://www.semanticweb.org/fefar/ontologies/ontobras#",m4i:"http://w3id.org/nfdi4ing/metadata4ing#",olias:"http://purl.org/olia/system.owl#",wfont:"https://w3id.org/wfont#",rc:"https://w3id.org/rc#",ldpsc:"https://solid.ti.rw.fau.de/public/ns/stream-containers#",interop:"http://www.w3.org/ns/solid/interop#",ppeer:"http://parliament.uk/ontologies/peerage/",esc:"https://solid.ti.rw.fau.de/public/ns/event-sourcing-containers#",walmart:"https://www.amazon.de/",quid:"https://w3id.org/quid/",wdno:"http://www.wikidata.org/prop/novalue/",rdaeo:"http://rdaregistry.info/Elements/e/object/",edu:"https://schema.edu.ee/",stix:"http://purl.org/cyber/stix#",paam:"https://lod.mediathek-tanz-theater.de/schema/paam/",eb:"https://w3id.org/eb#",hqdm:"http://www.semanticweb.org/hqdm#",gufo:"http://purl.org/nemo/gufo#",raum:"https://terminology.fraunhofer.de/voc/raum#",caso:"http://www.w3id.org/def/caso#",lds:"https://solid.ti.rw.fau.de/public/ns/linked-data-structures#",jsonld:"http://www.w3.org/ns/json-ld#",magmardl:"http://www.semanticweb.org/magma-core/rdl#",dsd:"https://w3id.org/dsd#",godaddy:"https://sso.godaddy.com/",asf:"https://www.stm-assoc.org/asf/",lrcommon:"http://landregistry.data.gov.uk/def/common/",kgi:"http://ns.inria.fr/kg/index#",marc:"http://www.loc.gov/MARC21/slim/",ofo:"https://w3id.org/ofo#",hni:"https://collectiedata.hetnieuweinstituut.nl/",feed:"https://www.feedipedia.org/",magmauser:"http://www.semanticweb.org/magma-core/user#",archivo:"https://archivo.dbpedia.org/onto#",rto:"https://w3id.org/rail/topo#",osdu:"https://w3id.org/OSDU#",diso:"https://purls.helmholtz-metadaten.de/diso#",lbdserver:"https://w3id.org/lbdserver#",bdsubj:"https://purl.org/fidbaudigital/subjects#",nomo:"https://nomenclature.info/nom/ontology/",rro:"http://semanticweb.org/patricia/ontologies/rro#",conllu:"https://universaldependencies.org/format.html#",value:"http://gfgfd.vs/",chameo:"https://w3id.org/emmo/domain/characterisation-methodology/chameo#",tern:"http://w3id.org/tern/ontologies/tern/",sds:"https://w3id.org/sds#",respond:"https://w3id.org/respond#",covido:"https://w3id.org/CovidO#",rsx:"http://rdf4j.org/shacl-extensions#",linkml:"https://w3id.org/linkml/",rdb:"http://www.dbs.cs.uni-duesseldorf.de/RDF/relational#",stirdata:"https://w3id.org/stirdata/vocabulary/",robotarm:"https://solid.ti.rw.fau.de/public/ns/robotArm#",nom:"https://nomenclature.info/nom/",nbo:"http://data.bioontology.org/ontologies/NBO/",fpr:"http://www.filmstandards.org/schemas/filmportal_relations#",weki:"https://en.wikipedia.org/wiki/",experts:"http://emmo.info/emmo/application/maeo/experts#",tro:"https://w3id.org/TRO/",oeo:"http://openenergy-platform.org/ontology/oeo/",lbds:"https://w3id.org/lbdserver#",itcrdf:"http://www.w3.org/2005/11/its/rdf#",perscido:"https://perscido.univ-grenoble-alpes.fr/",express:"https://w3id.org/express#",pgo:"http://ii.uwb.edu.pl/pgo#",rsp:"http://www.researchspace.org/resource/",dsi:"https://data.dsi.omgeving.vlaanderen.be/ns/dsi#",chemrof:"https://w3id.org/chemrof/",dmo:"https://w3id.org/dmo#",tempo:"http://purl.org/tempo/",cido:"http://purl.obolibrary.org/obo/cido.owl/",icon:"https://w3id.org/icon/ontology/",rnce:"https://data.cultureelerfgoed.nl/id/rnce#",linkedart:"https://linked.art/ns/terms/",osmo:"https://purl.org/vimmp/osmo#",rism:"http://rism.online/",veelana:"http://onlyfans.com/veelana/",ultragaz:"https://ultragaz24horas.com/",dbd:"http://dbpedia.org/datatype/",roh:"http://w3id.org/roh#",vntourism:"http://www.semanticweb.org/minhn/ontologies/2021/0/vntourism#",rtedurp:"http://purl.org/eduo/rtedurp/",chess:"http://purl.org/NET/rdfchess/ontology/",raad:"https://raadzaam.nl/schema/",dqvno:"https://data.norge.no/vocabulary/dqvno#",ttrpg:"https://w3id.org/TTRpg#",era:"http://data.europa.eu/949/",iddo:"https://w3id.org/iddo#",bp3:"http://www.biopax.org/release/biopax-level3.owl#",vl:"https://version.link/",fso:"https://w3id.org/fso#",consolid:"https://w3id.org/consolid#",gql:"http://www.openlinksw.com/schemas/graphql#",kokot:"http://www.koko.t/",besluitvor:"https://data.vlaanderen.be/ns/besluitvorming#",ammo:"http://ldf.fi/schema/ammo/",rcgs:"https://collection.rcgs.jp/terms/",pubchem:"https://pubchem.ncbi.nlm.nih.gov/",ufo:"http://ufo.com/#",mondo:"http://purl.obolibrary.org/obo/",cvb:"http://rdfs.org/resume-rdf/base.rdfs#",film:"http://semantics.id/ns/example/film/",iottta:"https://w3id.org/iot-tta#",grscicoll:"https://www.gbif.org/grscicoll/collection/",nen2660:"https://w3id.org/nen2660/def#",thub:"http://vocabularis.crai.ub.edu/thub/",dcb:"http://dbpedia.org/resource/Category:",apods:"http://activitypods.org/ns/core#",skosm:"http://www.w3.org/2004/02/skos/mapping#",nalt:"https://lod.nal.usda.gov/nalt/",version:"https://version.link/",koko:"https://seznam.cz/",bmp:"http://w3id.org/bmp#",coy:"https://schema.coypu.org/global#",dcatno:"https://data.norge.no/vocabulary/dcatno#",yanice:"http://yanice-boady.webflow.io/",fdp:"https://w3id.org/fdp/fdp-o#",vcs:"https://data.vlaanderen.be/ns/chemische_stof#",dick:"http://pornhub.com/",vhbieo:"https://w3id.org/vhbieo#",ntp:"https://schema.finto.fi/ntp#",ceox:"https://linkeddata.cultureelerfgoed.nl/def/ceox#",lis:"http://rds.posccaesar.org/ontology/lis14/rdl/",lib:"http://purl.org/library/",goavoc:"http://bio2rdf.org/goa_vocabulary:",crmsci:"http://cidoc-crm.org/crmsci/",hyr:"https://w3id.org/simulation/data/",hmas:"https://purl.org/hmas/",nutscode:"http://data.europa.eu/nuts/code/",dbpg:"http://dbpedia.org/page/",lcnaf:"http://id.loc.gov/authorities/names/",ncbi:"https://www.ncbi.nlm.nih.gov/",to:"http://purl.obolibrary.org/obo/TO_",coda:"http://art.uniroma2.it/coda/contracts/",epo:"http://data.europa.eu/a4g/ontology#",relation:"http://www.iana.org/assignments/relation/",plant:"http://example.org/plant/",peco:"https://w3id.org/peco#",ecfo:"https://w3id.org/ecfo#",acp:"http://www.w3.org/ns/solid/acp#",lol:"https://sbalot.github.io/lol/",tsso:"https://scch.org/technical_standards#",fs:"https://www.compliancequest.com/training-management-software-system-solutions/",ags:"https://id.agschemas.org/",dcatap:"http://data.europa.eu/r5r/",spatialf:"http://jena.apache.org/function/spatial#",coreo:"http://purl.org/coreo#",asb:"https://w3id.org/asbingowl/core#",atcc:"https://www.atcc.org/products/",rb:"https://w3id.org/riverbench/schema/metadata#",cur:"http://qudt.org/2.1/vocab/currency/",aec3po:"https://w3id.org/lbd/aec3po/",doce:"http://purl.org/nemo/doce#",sure:"http://ns.inria.fr/sure#",fdof:"https://w3id.org/fdof/ontology#",threat:"https://cve.mitre.org/",mindat:"https://www.mindat.org/",oav:"http://lod.openaire.eu/vocab/",quest:"https://rb.gy/ntg7l/",risk:"https://www.w3id.org/risk#",docbook:"http://docbook.org/ns/docbook/",databus:"https://dataid.dbpedia.org/databus#",egdo:"http://example.org/",ontouml:"https://w3id.org/ontouml#",coos:"http://id.unece.org/def/coos#",fisa:"https://ifitkau.github.io/fisa/",bacnet:"http://data.ashrae.org/bacnet/2020#",bsdd:"http://bsdd.buildingsmart.org/def#",iop:"https://w3id.org/iadopt/ont/",p2po:"https://purl.org/p2p-o#",ontologia:"http://ub.edu/dades/ontologia/Cinema#Cinemes#",hu:"https://mail.google.com/",oplben:"http://www.openlinksw.com/ontology/benefits#",baf:"https://w3id.org/baf#",pit:"http://data.elsevier.com/vocabulary/ElsevierPubItemTypes/",batmanont:"http://emmo.info/emmo/application/bmo#",ksamsok:"http://kulturarvsdata.se/ksamsok#",uio:"https://www.mitre.org/mparmelee/ontologies/2023/6/UserIntentOntology/",mi:"http://www.marineinfo.org/ns/ontology#",matmine:"http://materialsmine.org/ns/",notify:"http://www.w3.org/ns/solid/notifications#",ocmv:"https://w3id.org/ontouml-models/vocabulary#",wrroc:"https://w3id.org/ro/terms/workflow-run#",sense:"https://w3id.org/sense#",mibc:"http://marineinfo.org/ns/library/bibcodes#",cpsvno:"http://data.norge.no/vocabulary/cpsvno#",imbor:"https://data.crow.nl/imbor/def/",stax:"https://w3id.org/stax/ontology#",emmo:"https://w3id.org/emmo#",rbdoc:"https://w3id.org/riverbench/schema/documentation#",quit:"http://quit.aksw.org/vocab/",dde:"https://www.ddeworld.org/",doam:"http://emmo.info/doam#",keyon:"http://keyelements.ltd/ontologies/keyon/#",sssom:"https://w3id.org/sssom/",ogcf:"http://www.opengis.net/def/function/geosparql/",cercabib:"https://cercabib.ub.edu/",przecieki:"http://onlyfans.com/emiliaszymanska/",skosno:"http://data.norge.no/skosno#",bioschemas:"https://bioschemas.org/",bto:"http://w3id.org/emmo-bto/bto#",mibt:"https://marineinfo.org/ns/library/bibtypes#",maeo:"http://w3id.org/emmo-maeo/maeo#",ind:"https://w3id.org/inesdata#",olis:"http://olis.dev/",semapv:"https://w3id.org/semapv/vocab/",pbac:"https://w3id.org/pbac#",ies4:"http://ies.data.gov.uk/ontology/ies4#",mifesto:"https://w3id.org/mifesto#",exekg:"https://raw.githubusercontent.com/nsai-uio/ExeKGOntology/main/ds_exeKGOntology.ttl#",w3:"http://www.w3.org/",mir:"http://marineinfo.org/ns/person/roles#",cergy:"https://dbpedia.org/page/Cergy/",eurovoc:"http://eurovoc.europa.eu/",plasma:"https://w3id.org/plasma#",guez:"http://guez.fr/",iig:"https://w3id.org/iicongraph/data/",sri:"https://w3id.org/sri#",into:"https://app.korfin.de/ontology/into/",doid:"http://purl.obolibrary.org/obo/DOID_",ies:"http://ies.data.gov.uk/ontology/ies4#",hpo:"http://w3id.org/emmo-hpo/hpo#",miprog:"https://marineinfo.org/ns/progress#",hy:"https://api.hyprdia.com/",pcp:"https://pcp-on-web.de/ontology/0.2/index-en.html#",oio:"http://www.geneontology.org/formats/oboInOwl#",top:"http://w3id.org/topologicpy#",soa:"https://semopenalex.org/ontology/",uiot:"http://www.w3id.org/urban-iot/core#",deonta:"https://deonta.linkedmodel.org/deonta/",ceosp:"https://linkeddata.cultureelerfgoed.nl/def/ceosp/",lpwc:"https://linkedpaperswithcode.com/property/",cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties/",ioc:"http://w3id.org/ioc#",htv:"http://www.w3.org/2011/http#",occupation:"http://nikunj.org/ontology/occupatioin#",loinc:"https://loinc.org/",tdm:"http://www.w3.org/ns/tdmrep#",tsdcreq:"https://w3id.org/oseg/ont/tsdc/req#",okh:"https://w3id.org/oseg/ont/okh#",tsdc:"https://w3id.org/oseg/ont/tsdc/core#",pwkso:"http://ns.inria.fr/pwkso/",spa:"https://paul.ti.rw.fau.de/~jo00defe/voc/spa#",chpaf:"https://ch.paf.link/",spo:"https://w3id.org/steel/ProcessOntology/",osh:"https://w3id.org/oseg/ont/osh#",ontohgis:"https://onto.kul.pl/ontohgis/",otrl:"https://w3id.org/oseg/ont/otrl#",aao:"http://purl.obolibrary.org/obo/AAO_",firebim:"http://w3id.org/firebim#",oplmarket:"http://www.openlinksw.com/ontology/market#",cwo:"http://kcoyle.net/cwo/",clyh:"http://purl.obolibrary.org/obo/ZP_",imdb:"http://m.imdb.com/",obi:"http://purl.obolibrary.org/obo/OBI_",envo:"http://purl.obolibrary.org/obo/ZP_",dinto:"http://purl.obolibrary.org/obo/ZP_",lrm:"https://iflastandards.info/ns/lrm/lrmoo/",kbmarc:"https://id.kb.se/marc/",clo:"http://purl.obolibrary.org/obo/ZP_",ado:"http://purl.obolibrary.org/obo/ADO_",rxno:"http://purl.obolibrary.org/obo/ZP_",obom:"https://w3id.org/open-bom/ont/open-bom#",dcid:"https://datacommons.org/browser/",crcr:"https://credit.niso.org/contributor-roles/",sep:"http://purl.obolibrary.org/obo/ZP_",gecko:"http://purl.obolibrary.org/obo/ZP_",reloc:"https://w3id.org/reloc#",sibo:"http://purl.obolibrary.org/obo/ZP_",coswot:"https://w3id.org/coswot/",cacax:"http://cacax.fun/",bcgo:"http://purl.obolibrary.org/obo/ZP_",moont:"https://w3id.org/moont/",ohd:"http://purl.obolibrary.org/obo/ZP_",dpo:"http://purl.obolibrary.org/obo/FBcv_",lpto:"http://w3id.org/lpto#",oplgit:"http://www.openlinksw.com/schemas/github#",htn:"http://purl.obolibrary.org/obo/ZP_",ypc:"http://www.semanticweb.org/sunsr/ontologies/2024/ypc#",txpo:"http://purl.obolibrary.org/obo/ZP_",adw:"https://animaldiversity.org/accounts/",omit:"http://purl.obolibrary.org/obo/OMIT_",mpio:"http://purl.obolibrary.org/obo/ZP_",ckg:"http://example.org/ckg#",sbo:"http://purl.obolibrary.org/obo/SBO_",mfo:"http://purl.obolibrary.org/obo/ZP_",bspo:"http://purl.obolibrary.org/obo/BSPO_",vo:"http://purl.obolibrary.org/obo/VO_",mbl:"https://w3id.org/mbl#",aimaix:"https://w3id.org/aimaix#",oip:"http://www.exemple.org/ontologia/",aix:"https://w3id.org/aix#",trans:"http://purl.obolibrary.org/obo/TRANS_",mop:"http://purl.obolibrary.org/obo/MOP_",oix:"http://www.exemple.org/ontologia/",ogi:"http://purl.obolibrary.org/obo/OGI_",uo:"http://purl.obolibrary.org/obo/UO_",zp:"http://purl.obolibrary.org/obo/ZP_",zo:"https://linkeddata.cultureelerfgoed.nl/def/zo/",libeas:"https://w3id.org/libeas#",fro:"https://foundry.ai.mil/ontology/nas/fro/",ontoavida:"http://purl.obolibrary.org/obo/ONTOAVIDA_",sopharm:"http://purl.obolibrary.org/obo/SOPHARM_",duo:"http://purl.obolibrary.org/obo/DUO_",xlmod:"http://purl.obolibrary.org/obo/XLMOD_",pw:"http://purl.obolibrary.org/obo/PW_",omo:"http://purl.obolibrary.org/obo/OMO_",fovt:"http://purl.obolibrary.org/obo/FOVT_",phipo:"http://purl.obolibrary.org/obo/PHIPO_",gramene:"http://www.gramene.org/db/ontology/search?id=GRO:",spd:"http://purl.obolibrary.org/obo/SPD_",sepio:"http://purl.obolibrary.org/obo/SEPIO_",xco:"http://purl.obolibrary.org/obo/XCO_",meas:"https://graph.interoptx.org/meas/",nmr:"https://www.ebi.ac.uk/ols4/ontologies/nmrcv/terms?short_form=NMR:",imr:"http://www.inoh.org/ontology-viewer/cgi-bin/InohOVAttr.php?type=IMR&id=",fypo:"http://purl.obolibrary.org/obo/FYPO_",msl:"https://w3id.org/msl#",foodon:"http://purl.obolibrary.org/obo/FOODON_",isoprops:"https://w3id.org/isoprops#",zfs:"http://purl.obolibrary.org/obo/ZFS_",psm:"https://paul.ti.rw.fau.de/~jo00defe/ont/psm#",occo:"http://purl.obolibrary.org/obo/OCCO_",pao:"http://purl.obolibrary.org/obo/PAO_",fbcv:"http://purl.obolibrary.org/obo/FBcv_",symp:"http://purl.obolibrary.org/obo/SYMP_",cteno:"http://purl.obolibrary.org/obo/CTENO_",cams:"https://graph.interoptx.org/cams/schema/",ehdaa2:"http://purl.obolibrary.org/obo/EHDAA2_",fiaf:"https://ontology.fiafcore.org/",gallont:"http://purl.obolibrary.org/obo/GALLONT_",mco:"http://purl.obolibrary.org/obo/MCO_",ogsf:"http://purl.obolibrary.org/obo/OGSF_",credit:"https://credit.niso.org/",ypo:"http://purl.obolibrary.org/obo/YPO_",pgdso:"http://purl.obolibrary.org/obo/PGDSO_",loin:"http://w3id.org/loin#",ehda:"http://purl.obolibrary.org/obo/EHDA_",oba:"http://purl.obolibrary.org/obo/OBA_",t4fs:"http://purl.obolibrary.org/obo/T4FS_",eo:"http://purl.obolibrary.org/obo/EO_",zeco:"http://purl.obolibrary.org/obo/ZECO_",opmi:"http://purl.obolibrary.org/obo/OPMI_",ddanat:"http://purl.obolibrary.org/obo/DDANAT_",scdo:"http://purl.obolibrary.org/obo/SCDO_",xpo:"http://purl.obolibrary.org/obo/XPO_",dron:"http://purl.obolibrary.org/obo/DRON_",bila:"http://4dx.embl.de/4DXpress/reg/all/cview/gene.do?geneID=",gaz:"http://purl.obolibrary.org/obo/GAZ_",hancestro:"http://purl.obolibrary.org/obo/HANCESTRO_",geogeo:"http://purl.obolibrary.org/obo/GEO_",poro:"http://purl.obolibrary.org/obo/PORO_",fobi:"http://purl.obolibrary.org/obo/FOBI_",emapa:"http://purl.obolibrary.org/obo/EMAPA_",stato:"http://purl.obolibrary.org/obo/STATO_",ohmi:"http://purl.obolibrary.org/obo/OHMI_",cvdo:"http://purl.obolibrary.org/obo/CVDO_",caro:"http://purl.obolibrary.org/obo/CARO_",psdo:"http://purl.obolibrary.org/obo/PSDO_",obcs:"http://purl.obolibrary.org/obo/OBCS_",zfa:"http://purl.obolibrary.org/obo/ZFA_",fix:"http://purl.obolibrary.org/obo/FIX_",aism:"http://purl.obolibrary.org/obo/AISM_",nomen:"http://purl.obolibrary.org/obo/NOMEN_",edo:"http://semanticweb.org/edo#",cdno:"http://purl.obolibrary.org/obo/CDNO_",ceph:"http://purl.obolibrary.org/obo/CEPH_",micro:"http://purl.obolibrary.org/obo/MICRO_",wbbt:"http://purl.obolibrary.org/obo/WBbt_",colao:"http://purl.obolibrary.org/obo/COLAO_",ecto:"http://purl.obolibrary.org/obo/ECTO_",genepio:"http://purl.obolibrary.org/obo/GENEPIO_",gno:"http://purl.obolibrary.org/obo/GNO_",tahh:"http://purl.obolibrary.org/obo/TAHH_",loggerhead:"http://purl.obolibrary.org/obo/LOGGERHEAD_",iptc4xmpc:"http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/",mirnao:"http://purl.obolibrary.org/obo/MIRNAO_",pdro:"http://purl.obolibrary.org/obo/PDRO_",ncro:"http://purl.obolibrary.org/obo/NCRO_",bootstrep:"http://purl.obolibrary.org/obo/BOOTSTREP_",mao:"http://purl.obolibrary.org/obo/MAO_",mfmo:"http://purl.obolibrary.org/obo/MFMO_",multionto:"http://purl.org/net/multionto/",whyis:"http://vocab.rpi.edu/whyis/",ecocore:"http://purl.obolibrary.org/obo/ECOCORE_",aeo:"http://purl.obolibrary.org/obo/AEO_",ecao:"http://purl.obolibrary.org/obo/ECAO_",fbbi:"http://purl.obolibrary.org/obo/FBbi_",ato:"http://purl.obolibrary.org/obo/ATO_",lipro:"http://purl.obolibrary.org/obo/LIPRO_",tads:"http://purl.obolibrary.org/obo/TADS_",disdriv:"http://purl.obolibrary.org/obo/DISDRIV_",vto:"http://purl.obolibrary.org/obo/VTO_",miapa:"http://purl.obolibrary.org/obo/MIAPA_",cio:"http://purl.obolibrary.org/obo/CIO_",lepao:"http://purl.obolibrary.org/obo/LEPAO_",resid:"https://proteininformationresource.org/cgi-bin/resid?id=",interpro:"http://purl.obolibrary.org/obo/IPR_",ogg:"http://purl.obolibrary.org/obo/OGG_",miro:"http://purl.obolibrary.org/obo/MIRO_",zea:"http://purl.obolibrary.org/obo/ZEA_",mpbv:"http://meta-pfarrerbuch.evangelische-archive.de/vocabulary#",chiro:"http://purl.obolibrary.org/obo/CHIRO_",dgaterms:"https://w3id.org/dgaterms#",emobon:"http://www.embrc.eu/emobon/EmoBonOntology#",duodrl:"https://w3id.org/duodrl#",norse:"https://w3id.org/aksw/norse#",mcro:"https://www.ebi.ac.uk/ols4/ontologies/mcro/classes?obo_id=MCRO:",vario:"http://purl.obolibrary.org/obo/VariO_",aro:"http://purl.obolibrary.org/obo/ARO_",ngbo:"http://purl.obolibrary.org/obo/NGBO_",flopo:"http://purl.obolibrary.org/obo/FLOPO_",hso:"http://purl.obolibrary.org/obo/HSO_",upa:"http://www.grenoble.prabi.fr/obiwarehouse/unipathway/upa?upid=",amphx:"http://purl.obolibrary.org/obo/AMPHX_",fbsp:"http://purl.obolibrary.org/obo/FBSP_",rex:"http://purl.obolibrary.org/obo/REX_"};let TU=(()=>{class r{static _instance;_nsMap;static getInstance(){return this._instance||(this._instance=new r),this._instance}compactIRI(t){let n=this._nsMap;void 0===n&&(n=this._buildNSMap());let i=t;if(t.includes("#"))i=`${t.split("#")[0]}#`;else{const a=t.split("/");a.pop(),i=a.join("/")+"/"}if(void 0===i)return t;const o=n[i];return void 0===o?t:t.replace(i,`${o}:`)}expandIRI(t){const n=t.split(":")[0];return t.replace(`${n}:`,dl[n]??Un[n])}_buildNSMap(){const t={};return Object.keys(dl).forEach(n=>t[dl[n]]=n),Object.keys(Un).forEach(n=>t[Un[n]]=n),this._nsMap=t,t}}return r})();class QR{constructor(e,t,n,i,o){this._api=e,this._projectId=t,this._queryCache=i,this._graphType=o,this._currentLang=n,this._api.setLanguage(n),this._contentCategories=new Fi([]),this._entityCategories=new Fi([]),this._relationships=new Fi([]),this.availableContentCategories=this._contentCategories.asReadonly(),this.availableEntityCategories=this._entityCategories.asReadonly(),this.availableEntityRelationships=this._relationships.asReadonly(),this.ready=this._load(n).catch(a=>console.error("[CueProjectSchema] Initial load failed:",a))}_api;_projectId;_queryCache;_graphType;_cache=new Map;_currentLang;_contentCategories;_entityCategories;_relationships;availableContentCategories;availableEntityCategories;availableEntityRelationships;ready;get language(){return this._api.language}setLanguage(e){this._currentLang!==e&&(this._currentLang=e,this._api.setLanguage(e),this._load(e).catch(t=>console.error("[CueProjectSchema] Language switch failed:",t)))}refresh(){var e=this;return(0,O.A)(function*(){const t=e._api.language;e._cache.delete(t),yield e._load(t)})()}_load(e){var t=this;return(0,O.A)(function*(){const n=t._cache.get(e);if(n)return void t._apply(n);const i=t._buildCategoriesQuery(e,"ContentCategory"),o=t._buildCategoriesQuery(e,"EntityCategory"),a=t._buildRelationshipsQuery(e);yield V_(i+o+a,(0,O.A)(function*(){const[s,l,u]=yield Promise.all([t._runCategoriesQuery(i),t._runCategoriesQuery(o),t._runRelationshipsQuery(a)]);return{contentCategories:s,entityCategories:l,relationships:u}}),s=>{t._cache.set(e,s),t._currentLang===e&&t._apply(s)},t._queryCache)})()}_apply(e){this._contentCategories.set(e.contentCategories),this._entityCategories.set(e.entityCategories),this._relationships.set(e.relationships)}_fetchCategories(e,t){var n=this;return(0,O.A)(function*(){return n._runCategoriesQuery(n._buildCategoriesQuery(e,t))})()}_buildCategoriesQuery(e,t){return`PREFIX qcy: <${Un.qcy}>\nPREFIX skos: <${dl.skos}>\nSELECT ?iri ?parent (SAMPLE(?l) AS ?label)\nWHERE {\n ?iri a qcy:${t} .\n OPTIONAL { ?iri skos:prefLabel ?lang_label FILTER(LANG(?lang_label) = "${e}") }\n OPTIONAL { ?iri skos:prefLabel ?no_lang_label }\n BIND(COALESCE(?lang_label, ?no_lang_label) AS ?l)\n OPTIONAL { ?iri skos:broader ?parent }\n}\nGROUP BY ?iri ?parent`}_runCategoriesQuery(e){var t=this;return(0,O.A)(function*(){return(yield t._api.sparql(e,t._projectId,t._graphType)).results.bindings.filter(n=>void 0!==n.iri).map(n=>{const i=n.iri.value;return{iri:i,label:n.label?.value??i.split("#").at(-1)??i,parent:n.parent?.value}})})()}_fetchRelationships(e){var t=this;return(0,O.A)(function*(){return t._runRelationshipsQuery(t._buildRelationshipsQuery(e))})()}_buildRelationshipsQuery(e){return`PREFIX qcy: <${Un.qcy}>\nPREFIX rdfs: <${dl.rdfs}>\nSELECT ?iri ?parent (SAMPLE(?l) AS ?label)\nWHERE {\n ?x qcy:relatedEntity ?y ;\n ?iri ?y .\n OPTIONAL { ?iri rdfs:label ?lang_label FILTER(LANG(?lang_label) = "${e}") }\n OPTIONAL { ?iri rdfs:label ?no_lang_label }\n BIND(COALESCE(?lang_label, ?no_lang_label) AS ?l)\n OPTIONAL { ?iri rdfs:subPropertyOf ?parent }\n}\nGROUP BY ?iri ?parent`}_runRelationshipsQuery(e){var t=this;return(0,O.A)(function*(){return(yield t._api.sparql(e,t._projectId,t._graphType)).results.bindings.filter(n=>void 0!==n.iri).map(n=>{const i=n.iri.value;return{iri:i,label:n.label?.value??i.split("#").at(-1)??i,parent:n.parent?.value}})})()}}class K_{constructor(e,t,n=z_,i,o){this._api=e,this._projectId=t,this._queryCache=i,this._graphType=o,this.baseURL=`${n}${t}/`,this.entityInfoMap=this._entityInfoMapComputed,this.entityGraph=this._entityGraph.asReadonly(),this._entityOSMMap.subscribe(()=>this._checkPendingOSMFetches()),this._fetchEntityGraph().catch(a=>console.error("[CueProjectEntities] Entity graph fetch failed:",a))}_api;_projectId;_queryCache;_graphType;baseURL;_entityDetails=new Fi({});_entityDocuments=new Fi({});_entityRelationships=new Fi({});_entityOSMMap=new Fi({});_osmWKTMap=new Fi({});_fetchingOSMIds=new Set;_entityGraph=new Fi(void 0);_entityInfoMapComputed=function F_(r,e){const t=new Set;let n=e(),i=!1;const o=[],a=()=>{i=!0;for(const s of t)s()};for(const s of r)o.push(s.subscribe(a));return{get:()=>(i&&(n=e(),i=!1),n),subscribe:s=>(t.add(s),()=>t.delete(s)),destroy(){for(const s of o)s();t.clear()}}}([this._entityDetails,this._entityDocuments,this._entityRelationships,this._entityOSMMap,this._osmWKTMap],()=>this._computeEntityInfoMap());entityInfoMap;entityGraph;entityIri(e){return`${this.baseURL}${e}`}reset(){this._entityDetails.set({}),this._entityDocuments.set({}),this._entityRelationships.set({}),this._entityOSMMap.set({}),this._osmWKTMap.set({}),this._entityGraph.set(void 0),this._fetchingOSMIds.clear(),this._fetchEntityGraph().catch(e=>console.error("[CueProjectEntities] Entity graph fetch failed after reset:",e))}requestEntityData(e,t=!1){const n=e.filter(a=>void 0===this._entityDetails.get()[a]);if(0===n.length)return;const i=n.map(a=>`r:${a}`).join(" ");this._api.sparql(`PREFIX qcy: <${Un.qcy}>\nPREFIX r: <${this.baseURL}>\nSELECT ?id (SAMPLE(?val) AS ?value) (GROUP_CONCAT(DISTINCT STR(?cat); SEPARATOR=";") AS ?categories) ?mentionCount\nWHERE {\n VALUES ?iri { ${i} }\n ?iri qcy:hasEntityCategory ?cat ;\n qcy:value ?val\n BIND(REPLACE(STR(?iri), "^.*/([^/]*)$", "$1") AS ?id)\n ${t?"{SELECT ?iri (COUNT(?mention) AS ?mentionCount)\n WHERE { ?mention qcy:resolvesTo ?iri } GROUP BY ?iri}":""}\n}\nGROUP BY ?id ?mentionCount`,this._projectId,this._graphType).then(a=>{const s=a,l={...this._entityDetails.get()};s.results.bindings.forEach(u=>{u.id&&(l[u.id.value]={value:u.value?.value??"",categories:u.categories?.value?.split(";").filter(Boolean)??[],mentionCount:u.mentionCount?parseInt(u.mentionCount.value,10):void 0})}),this._entityDetails.set(l)}).catch(a=>console.error("[CueProjectEntities] requestEntityData failed:",a))}requestEntityLocations(e){var t=this;return(0,O.A)(function*(){const n=e.filter(u=>void 0===t._entityOSMMap.get()[u]);if(0===n.length)return;const i={...t._entityOSMMap.get()};for(const u of n)i[u]={direct:[],indirect:[]};t._entityOSMMap.set(i);const o=n.map(u=>`r:${u}`).join(" "),a=`PREFIX qcy: <${Un.qcy}>\nPREFIX r: <${t.baseURL}>\nSELECT ?id ?osm ?direct ?rels ?entityUUID\nWHERE {\n VALUES ?iri { ${o} }\n {\n SELECT ?iri ?osm ?direct\n WHERE {\n ?iri qcy:similarTo ?osm .\n FILTER STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")\n BIND(true AS ?direct)\n }\n }\n UNION\n {\n SELECT ?iri ?osm ?direct ?entityUUID (GROUP_CONCAT(STR(?rel); SEPARATOR=";") AS ?rels)\n WHERE {\n ?iri qcy:relatedEntity ?loc .\n ?iri ?rel ?loc .\n ?loc qcy:similarTo ?osm .\n FILTER STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")\n FILTER(?rel != qcy:relatedEntity)\n BIND(false AS ?direct)\n BIND(REPLACE(STR(?loc), "^.*/([^/]*)$", "$1") AS ?entityUUID)\n } GROUP BY ?iri ?osm ?direct ?entityUUID\n }\n BIND(REPLACE(STR(?iri), "^.*/([^/]*)$", "$1") AS ?id)\n}`,s=yield t._api.sparql(a,t._projectId,t._graphType),l={...t._entityOSMMap.get()};s.results.bindings.forEach(u=>{if(!u.id||!u.osm)return;const c=u.id.value,h=u.osm.value,d="true"===u.direct?.value,p=u.rels?.value?.split(";").filter(Boolean)??[],g=u.entityUUID?.value,y=l[c]??{direct:[],indirect:[]};d?y.direct.push(h):g&&y.indirect.push({osm:h,viaRels:p,entityUUID:g}),l[c]=y}),t._entityOSMMap.set(l)})()}fetchEntityRelationships(e){var t=this;return(0,O.A)(function*(){const n=e.replace(/^.*\/([^/]*)$/,"$1");t._entityRelationships.set({...t._entityRelationships.get(),[n]:{incoming:[],outgoing:[]}});const[i,o]=yield Promise.all([t._fetchOutgoingRelationships(e),t._fetchIncomingRelationships(e)]),a={outgoing:i,incoming:o};return t._entityRelationships.set({...t._entityRelationships.get(),[n]:a}),a})()}fetchEntityDocuments(e){var t=this;return(0,O.A)(function*(){const n=e.replace(/^.*\/([^/]*)$/,"$1");t._entityDocuments.set({...t._entityDocuments.get(),[n]:[]}),void 0===t._entityDetails.get()[n]&&t.requestEntityData([n]);const i=`PREFIX qcy: <${Un.qcy}>\nSELECT DISTINCT ?id\nWHERE {\n BIND(<${e}> AS ?iri)\n ?doc a qcy:FileContent ;\n qcy:about ?iri .\n BIND(REPLACE(STR(?doc), "^.*/([^/]*)$", "$1") AS ?id)\n}`,o=(yield t._api.sparql(i,t._projectId,t._graphType)).results.bindings.filter(a=>void 0!==a.id).map(a=>a.id.value);return t._entityDocuments.set({...t._entityDocuments.get(),[n]:o}),o})()}contentCategoriesInProject(){var e=this;return(0,O.A)(function*(t=!0){const i=`PREFIX qcy: <${Un.qcy}>\nPREFIX skos: <${dl.skos}>\nSELECT ?iri (SAMPLE(?l) AS ?label) ?count\nWHERE {\n ?iri a qcy:EntityCategory .\n OPTIONAL { ?iri skos:prefLabel ?lang_label FILTER(LANG(?lang_label) = "${e._api.language}") }\n OPTIONAL { ?iri skos:prefLabel ?no_lang_label }\n BIND(COALESCE(?lang_label, ?no_lang_label) AS ?l)\n ${t?"{ SELECT (COUNT(?x) AS ?count) ?iri where { ?x a qcy:CanonicalEntity ; qcy:hasEntityCategory ?iri } GROUP BY ?iri }":""}\n}\nGROUP BY ?iri ?count\nORDER BY ${t?"DESC(?count)":"ASC(?label)"}`;return(yield e._api.sparql(i,e._projectId,e._graphType)).results.bindings.filter(o=>void 0!==o.iri).map(o=>{const a=o.count?parseInt(o.count.value,10):0,s=o.label?.value??o.iri.value.split("#").at(-1);return{iri:o.iri.value,label:a>0?`${s} (${a})`:s??""}})}).apply(this,arguments)}buildSummaryGraph(e){var t=this;return(0,O.A)(function*(){const n=`PREFIX qcy: <${Un.qcy}>\nSELECT\n ?sourceCat\n ?predicate\n ?targetCat\n (COUNT(*) AS ?weight)\nWHERE {\n ?s a qcy:CanonicalEntity ;\n qcy:hasEntityCategory ?sourceCat .\n ?o a qcy:CanonicalEntity ;\n qcy:hasEntityCategory ?targetCat .\n ?s ?predicate ?o .\n FILTER(isIRI(?s) && isIRI(?o))\n FILTER(?predicate != qcy:relatedEntity)\n}\nGROUP BY ?sourceCat ?predicate ?targetCat\nORDER BY DESC(?weight)`,i=yield t._api.sparql(n,t._projectId,t._graphType),o=i.results.bindings.filter(a=>a.sourceCat&&a.predicate&&a.targetCat);if("graph"===e){const a=new Set,s=[];for(const l of o){const u=l.sourceCat.value,c=l.predicate.value,h=l.targetCat.value,d=parseInt(l.weight.value,10);a.add(u),a.add(h),s.push({sourceID:u,predicate:c,targetID:h,weight:d})}return{entities:Array.from(a).map(l=>({iri:l})),relations:s}}if("md"===e){const a=TU.getInstance(),s=o.map(h=>({src:a.compactIRI(h.sourceCat.value),pred:a.compactIRI(h.predicate.value),tgt:a.compactIRI(h.targetCat.value),weight:parseInt(h.weight.value,10)}));if(0===s.length)return"(no results)";const l=Math.max(...s.map(h=>h.src.length)),u=Math.max(...s.map(h=>h.pred.length)),c=Math.max(...s.map(h=>h.tgt.length));return s.map(h=>`${h.src.padEnd(l)} -> ${h.pred.padEnd(u)} -> ${h.tgt.padEnd(c)} (${h.weight})`).join("\n")}return i})()}_computeEntityInfoMap(){const e=this._entityDetails.get(),t=this._entityDocuments.get(),n=this._entityRelationships.get(),i=this._entityOSMMap.get(),o=this._osmWKTMap.get(),a=new Set([...Object.keys(e),...Object.keys(i).filter(l=>{const u=i[l];return u.direct.length>0||u.indirect.length>0})]),s={};for(const l of a){const u=e[l],c=i[l];let h,d;if(c){const p=new Set;h=c.direct.filter(y=>void 0!==o[y]&&!p.has(y)&&!!p.add(y)).map(y=>({osmIRI:y,wkt:o[y]}));const g=new Map;for(const{osm:y,viaRels:v,entityUUID:m}of c.indirect){const _=o[y];if(_)for(const I of v){const U=`${I}:${m}`,ne=g.get(U)??{geometries:[],entityUUID:m};ne.geometries.some(re=>re.osmIRI===y)||(ne.geometries.push({osmIRI:y,wkt:_}),g.set(U,ne))}}g.size>0&&(d=Array.from(g.entries()).map(([y,{geometries:v,entityUUID:m}])=>({rel:y.split(":")[0],geometries:v,entityUUID:m})))}s[l]={value:u?.value??"",categories:u?.categories??[],mentionCount:u?.mentionCount,documentRefs:t[l],relationshipData:n[l],directMapGeometries:h,indirectMapGeometries:d}}return s}_fetchOutgoingRelationships(e){var t=this;return(0,O.A)(function*(){const n=`PREFIX qcy: <${Un.qcy}>\nSELECT ?rel ?related (SAMPLE(?val) AS ?nodeValue) (GROUP_CONCAT(STR(?cat); SEPARATOR=";") AS ?categories)\nWHERE {\n BIND(<${e}> AS ?s)\n ?s qcy:relatedEntity ?related ;\n ?rel ?related .\n ?related qcy:hasEntityCategory ?cat ;\n qcy:value ?val\n FILTER(?rel != qcy:relatedEntity)\n}\nGROUP BY ?rel ?related`,i=yield t._api.sparql(n,t._projectId,t._graphType),o=[],a={...t._entityDetails.get()};return i.results.bindings.forEach(s=>{if(!s.rel||!s.related)return;const l=s.categories?.value?.split(";").filter(Boolean)??[];o.push({relIRI:s.rel.value,nodeIRI:s.related.value,nodeValue:s.nodeValue?.value??"",nodeCategories:l});const u=s.related.value.replace(/^.*\/([^/]*)$/,"$1");a[u]={value:s.nodeValue?.value??"",categories:l}}),t._entityDetails.set(a),o})()}_fetchIncomingRelationships(e){var t=this;return(0,O.A)(function*(){const n=`PREFIX qcy: <${Un.qcy}>\nSELECT ?rel ?relating (SAMPLE(?val) AS ?nodeValue) (GROUP_CONCAT(STR(?cat); SEPARATOR=";") AS ?categories)\nWHERE {\n BIND(<${e}> AS ?s)\n ?relating qcy:relatedEntity ?s ;\n ?rel ?s .\n ?relating qcy:hasEntityCategory ?cat ;\n qcy:value ?val\n FILTER(?rel != qcy:relatedEntity)\n}\nGROUP BY ?rel ?relating`,i=yield t._api.sparql(n,t._projectId,t._graphType),o=[],a={...t._entityDetails.get()};return i.results.bindings.forEach(s=>{if(!s.rel||!s.relating)return;const l=s.categories?.value?.split(";").filter(Boolean)??[];o.push({relIRI:s.rel.value,nodeIRI:s.relating.value,nodeValue:s.nodeValue?.value??"",nodeCategories:l});const u=s.relating.value.replace(/^.*\/([^/]*)$/,"$1");a[u]={value:s.nodeValue?.value??"",categories:l}}),t._entityDetails.set(a),o})()}_fetchEntityGraph(){var e=this;return(0,O.A)(function*(){const t=`PREFIX qcy: <${Un.qcy}>\nSELECT ?e1Cat ?e2Cat (COUNT(?e1) AS ?e1Count) (COUNT(?e2) AS ?e2Count)\nWHERE {\n ?e1 a qcy:CanonicalEntity ;\n qcy:hasEntityCategory ?e1Cat ;\n qcy:relatedEntity ?e2 .\n ?e2 qcy:hasEntityCategory ?e2Cat\n}\nGROUP BY ?e1Cat ?e2Cat`;yield V_(t,(0,O.A)(function*(){const n=yield e._api.sparql(t,e._projectId,e._graphType),i=[],o=[];return n.results.bindings.forEach(a=>{if(!a.e1Cat||!a.e2Cat)return;const s=a.e1Cat.value,l=a.e2Cat.value,u=a.e1Count&&parseInt(a.e1Count.value,10)||20,c=a.e2Count&&parseInt(a.e2Count.value,10)||20;i.some(h=>h.iri===s)||i.push({iri:s,size:u}),i.some(h=>h.iri===l)||i.push({iri:l,size:c}),o.push({sourceID:s,targetID:l})}),{entities:i,relations:o}}),n=>e._entityGraph.set(n),e._queryCache)})()}_checkPendingOSMFetches(){const e=this._entityOSMMap.get(),t=this._osmWKTMap.get(),n=[];for(const i of Object.values(e)){for(const o of i.direct)!t[o]&&!this._fetchingOSMIds.has(o)&&n.push(o);for(const{osm:o}of i.indirect)!t[o]&&!this._fetchingOSMIds.has(o)&&n.push(o)}if(0!==n.length){for(const i of n)this._fetchingOSMIds.add(i);this._fetchOSMLocations(n).catch(i=>console.error("[CueProjectEntities] OSM WKT fetch failed:",i))}}_fetchOSMLocations(e){var t=this;return(0,O.A)(function*(){const n=e.filter(l=>!l.includes("/relation/"));if(0===n.length)return;const i=n.map(l=>`<${l}>`).join(" "),o=`PREFIX geo: <${dl.geo}>\nSELECT * WHERE {\n VALUES ?s { ${i} }\n SERVICE <https://qlever.dev/api/osm-planet> {\n ?s geo:hasGeometry/geo:asWKT ?wkt\n }\n}`,a=yield t._api.sparql(o,t._projectId,t._graphType),s={...t._osmWKTMap.get()};a.results.bindings.forEach(l=>{!l.s||!l.wkt||(s[l.s.value]=l.wkt.value,t._fetchingOSMIds.delete(l.s.value))}),t._osmWKTMap.set(s)})()}}class op{constructor(e,t,n,i=z_,o,a){this._api=e,this._projectId=t,this._queryCache=o,this._graphType=a,this.baseURL=`${i}${t}/`,this._currentLang=n??this._api.language,this.documentInfoMap=this._documentInfoMap.asReadonly(),this.projectDocumentsData=this._projectDocumentsData.asReadonly()}_api;_projectId;_queryCache;_graphType;baseURL;_currentLang;_documentInfoMap=new Fi({});_projectDocumentsData=new Fi({duplicateCount:0,documentsBySuffix:{},documentsByContentCategory:{}});documentInfoMap;projectDocumentsData;reset(){this._documentInfoMap.set({}),this._projectDocumentsData.set({duplicateCount:0,documentsBySuffix:{},documentsByContentCategory:{}})}setLanguage(e){this._currentLang!==e&&(this._currentLang=e,this._api.setLanguage(e),this._documentInfoMap.set({}))}fetchOverview(){var e=this;return(0,O.A)(function*(){e._projectDocumentsData.set({duplicateCount:0,documentsBySuffix:{},documentsByContentCategory:{}});const t=e._buildDocumentsBySuffixQuery(),n=e._buildDocumentsByContentCategoryQuery(),i=e._buildDuplicateCountQuery();yield V_(t+n+i,(0,O.A)(function*(){const[o,a,s]=yield Promise.all([e._runDocumentsBySuffixQuery(t),e._runDocumentsByContentCategoryQuery(n),e._runDuplicateCountQuery(i)]);return{duplicateCount:s,documentsBySuffix:o,documentsByContentCategory:a}}),o=>e._projectDocumentsData.set(o),e._queryCache)})()}requestDocumentData(e){const t=e.filter(n=>void 0===this._documentInfoMap.get()[n]);0!==t.length&&this._fetchDocumentInfoBatch(t).catch(n=>console.error("[CueProjectDocuments] requestDocumentData failed:",n))}fetchDocumentData(e){var t=this;return(0,O.A)(function*(){const n=t._documentInfoMap.get(),i=e.filter(a=>void 0===n[a]);i.length>0&&(yield t._fetchDocumentInfoBatch(i));const o=t._documentInfoMap.get();return Object.fromEntries(e.filter(a=>void 0!==o[a]).map(a=>[a,o[a]]))})()}fetchDocumentDataSimple(e){var t=this;return(0,O.A)(function*(){const n=t._documentInfoMap.get(),i=e.filter(a=>void 0===n[a]);i.length>0&&(yield t._fetchSimpleDocumentInfoBatch(i));const o=t._documentInfoMap.get();return Object.fromEntries(e.filter(a=>void 0!==o[a]).map(a=>[a,o[a]]))})()}fetchAlternativeRepresentations(e){var t=this;return(0,O.A)(function*(){const n=`PREFIX qcy: <${Un.qcy}>\nPREFIX r: <${t.baseURL}>\nSELECT ?altId ?contentIRI ?suffix ?rrp\nWHERE {\n r:${e} qcy:alternativeRepresentation ?contentIRI .\n BIND(REPLACE(STR(?contentIRI), "^.*/([^/]*)$", "$1") AS ?altId)\n ?contentIRI qcy:hasFileLocation ?loc .\n ?loc qcy:suffix ?suffix .\n OPTIONAL { ?loc qcy:remoteRelativePath ?rrp }\n}`,i=yield t._api.sparql(n,t._projectId,t._graphType),o={...t._documentInfoMap.get()},a=[];return i.results.bindings.forEach(s=>{if(!s.altId||!s.contentIRI)return;const l=s.altId.value,u={id:l,contentIRI:s.contentIRI.value,path:"",suffix:s.suffix?.value??"",size:0,tags:[],categories:[],remoteRelativePath:s.rrp?.value};o[l]=u,a.push(u)}),t._documentInfoMap.set(o),a})()}randomFilePath(){var e=this;return(0,O.A)(function*(){const t=`PREFIX qcy: <${Un.qcy}>\nSELECT ?path\nWHERE {\n ?fl a qcy:FileLocation ;\n qcy:filePath ?path .\n}\nLIMIT 1`;return(yield e._api.sparql(t,e._projectId,e._graphType)).results.bindings[0]?.path?.value??null})()}_fetchDocumentInfoBatch(e){var t=this;return(0,O.A)(function*(){const n=e.map(u=>`r:${u}`).join(" "),i=t._api.language,o=`PREFIX qcy: <${Un.qcy}>\nPREFIX r: <${t.baseURL}>\nSELECT ?id ?contentIRI ?suffix ?size ?subject ?summary\n (SAMPLE(?fp) AS ?path)\n (GROUP_CONCAT(DISTINCT ?tag; SEPARATOR=";") AS ?tags)\n (GROUP_CONCAT(DISTINCT STR(?cat); SEPARATOR=";") AS ?categories)\nWHERE {\n VALUES ?contentIRI { ${n} }\n ?contentIRI qcy:sizeBytes ?size ;\n qcy:hasFileLocation ?loc .\n ?loc qcy:filePath ?fp ;\n qcy:suffix ?suffix .\n OPTIONAL { ?contentIRI qcy:hasContentCategory ?cat }\n OPTIONAL { ?contentIRI qcy:tag ?tag }\n OPTIONAL { ?loc qcy:remoteProviderId ?pid }\n\n OPTIONAL { ?contentIRI qcy:subject ?lang_subj FILTER(LANG(?lang_subj) = "${i}") }\n OPTIONAL { ?contentIRI qcy:subject ?no_lang_subj }\n BIND(COALESCE(?lang_subj, ?no_lang_subj) AS ?subject)\n\n OPTIONAL { ?contentIRI qcy:textSummary ?lang_summary FILTER(LANG(?lang_summary) = "${i}") }\n OPTIONAL { ?contentIRI qcy:textSummary ?no_lang_summary }\n BIND(COALESCE(?lang_summary, ?no_lang_summary) AS ?summary)\n\n BIND(REPLACE(STR(?contentIRI), "^.*/([^/]*)$", "$1") AS ?id)\n}\nGROUP BY ?id ?contentIRI ?suffix ?size ?subject ?summary`,a=yield t._api.sparql(o,t._projectId),s={...t._documentInfoMap.get()},l={};return a.results.bindings.forEach(u=>{if(!u.id||!u.contentIRI)return;const c=u.id.value,h={id:c,contentIRI:u.contentIRI.value,path:u.path?.value??"",suffix:u.suffix?.value??"",size:u.size?parseInt(u.size.value,10):0,tags:u.tags?.value?.split(";").filter(Boolean)??[],categories:u.categories?.value?.split(";").filter(Boolean)??[],subject:u.subject?.value,summary:u.summary?.value,providerId:u.pid?.value};s[c]=h,l[c]=h}),t._documentInfoMap.set(s),l})()}_fetchSimpleDocumentInfoBatch(e){var t=this;return(0,O.A)(function*(){const n=e.map(l=>`r:${l}`).join(" "),i=`PREFIX qcy: <${Un.qcy}>\nPREFIX r: <${t.baseURL}>\nSELECT ?id ?contentIRI ?suffix ?size (SAMPLE(?fp) AS ?path)\nWHERE {\n VALUES ?contentIRI { ${n} }\n ?contentIRI qcy:sizeBytes ?size ;\n qcy:hasFileLocation ?loc .\n ?loc qcy:filePath ?fp ;\n qcy:suffix ?suffix .\n BIND(REPLACE(STR(?contentIRI), "^.*/([^/]*)$", "$1") AS ?id)\n}\nGROUP BY ?id ?contentIRI ?suffix ?size`,o=yield t._api.sparql(i,t._projectId,t._graphType),a={...t._documentInfoMap.get()},s={};return o.results.bindings.forEach(l=>{if(!l.id)return;const u=l.id.value,c=a[u],h={id:u,contentIRI:l.contentIRI?.value??c?.contentIRI??u,path:l.path?.value??c?.path??u,suffix:l.suffix?.value??c?.suffix??"",size:l.size?parseInt(l.size.value,10):c?.size??0,tags:c?.tags??[],categories:c?.categories??[],subject:c?.subject,summary:c?.summary,providerId:c?.providerId};a[u]=h,s[u]=h}),t._documentInfoMap.set(a),s})()}_fetchDocumentsBySuffix(){var e=this;return(0,O.A)(function*(){return e._runDocumentsBySuffixQuery(e._buildDocumentsBySuffixQuery())})()}_buildDocumentsBySuffixQuery(){return`PREFIX qcy: <${Un.qcy}>\nSELECT ?ext (SUM(?size) AS ?totalSize) (COUNT(*) AS ?docCount)\nWHERE {\n {\n SELECT DISTINCT ?fc ?ext ?size\n WHERE {\n ?fc a qcy:FileContent ;\n qcy:sizeBytes ?size ;\n qcy:hasFileLocation/qcy:suffix ?ext .\n FILTER NOT EXISTS { ?x qcy:alternativeRepresentation ?fc }\n }\n }\n}\nGROUP BY ?ext\nORDER BY DESC(?docCount)`}_runDocumentsBySuffixQuery(e){var t=this;return(0,O.A)(function*(){const n=yield t._api.sparql(e,t._projectId,t._graphType),i={};return n.results.bindings.forEach(o=>{o.ext&&(i[o.ext.value]={size:o.totalSize?parseInt(o.totalSize.value,10):0,count:o.docCount?parseInt(o.docCount.value,10):0})}),i})()}_fetchDocumentsByContentCategory(){var e=this;return(0,O.A)(function*(){return e._runDocumentsByContentCategoryQuery(e._buildDocumentsByContentCategoryQuery())})()}_buildDocumentsByContentCategoryQuery(){return`PREFIX qcy: <${Un.qcy}>\nSELECT ?cat (SUM(?size) AS ?totalSize) (COUNT(*) AS ?docCount)\nWHERE {\n {\n SELECT DISTINCT ?fc ?cat ?size\n WHERE {\n ?fc a qcy:FileContent ;\n qcy:hasContentCategory ?cat ;\n qcy:sizeBytes ?size .\n FILTER NOT EXISTS { ?x qcy:alternativeRepresentation ?fc }\n }\n }\n}\nGROUP BY ?cat\nORDER BY DESC(?docCount)`}_runDocumentsByContentCategoryQuery(e){var t=this;return(0,O.A)(function*(){const n=yield t._api.sparql(e,t._projectId,t._graphType),i={};return n.results.bindings.forEach(o=>{o.cat&&(i[o.cat.value]={size:o.totalSize?parseInt(o.totalSize.value,10):0,count:o.docCount?parseInt(o.docCount.value,10):0})}),i})()}_fetchDuplicateCount(){var e=this;return(0,O.A)(function*(){return e._runDuplicateCountQuery(e._buildDuplicateCountQuery())})()}_buildDuplicateCountQuery(){return`PREFIX qcy: <${Un.qcy}>\nSELECT (COUNT(*) AS ?count)\nWHERE {\n SELECT ?fc\n WHERE {\n ?fc a qcy:FileContent ;\n qcy:hasFileLocation ?fl .\n FILTER NOT EXISTS { ?x qcy:alternativeRepresentation ?fc }\n }\n GROUP BY ?fc\n HAVING (COUNT(?fl) > 1)\n}`}_runDuplicateCountQuery(e){var t=this;return(0,O.A)(function*(){const n=(yield t._api.sparql(e,t._projectId,t._graphType)).results.bindings[0];return n?.count?parseInt(n.count.value,10):0})()}}const{namedNode:RU}=Q;RU("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");const{namedNode:SU}=Q;SU("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");const{namedNode:PU}=Q;PU("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");const{namedNode:kU}=Q;kU("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");var MU=oe(9769),ea=oe(9352),FU=oe(5187),oS=oe(5381),VU=oe(1024),BU=oe(9421),UU=oe(5903),zU=oe(6117),GU=oe(8547),qU=oe(3319),jU=oe(5971),ib=oe(7573),le=oe(5547);function HU(r,e){if(1&r&&(le.nrm(0,"cue-key-val",4),le.nI1(1,"transloco")),2&r){const t=le.XpG(2);le.Y8G("key",le.bMT(1,2,"components.entityInfo.labelValue"))("val",t.entity().value)}}function $U(r,e){if(1&r&&(le.nrm(0,"cue-key-val-editable",5),le.nI1(1,"transloco"),le.nI1(2,"transloco")),2&r){const t=le.XpG(3);le.Y8G("key",1===t.entityCategories().length?le.bMT(1,4,"components.entityInfo.labelEntityCategory"):le.bMT(2,6,"components.entityInfo.labelEntityCategories"))("val",t.entityCategoriesString())("rdfConfig",t.rdfEditConfig())("editDisabled",!t.entityCategoriesEditable())}}function WU(r,e){if(1&r&&(le.nrm(0,"hr"),le.nVh(1,$U,3,8,"cue-key-val-editable",5)),2&r){const t=le.XpG(2);le.R7$(),le.vxM(t.entityCategories()&&t.entityCategories().length>0?1:-1)}}function KU(r,e){if(1&r&&(le.j41(0,"cue-key-val-list"),le.nVh(1,HU,2,4,"cue-key-val",4),le.nVh(2,WU,2,1),le.k0s()),2&r){const t=le.XpG();le.R7$(),le.vxM(t.entity().value?1:-1),le.R7$(),le.vxM(t.collapsed()?-1:2)}}function XU(r,e){if(1&r&&(le.j41(0,"cue-flexcontainer",3)(1,"cue-menu",6)(2,"cue-button",7,0),le.nrm(4,"cue-button-icon",8),le.k0s(),le.nrm(5,"cue-menu-nested",9),le.k0s()()),2&r){le.XpG();const t=le.r8f(3);le.R7$(5),le.Y8G("items",t)}}let YU=(()=>{class r{entity=F.hFB.required();handlers=F.hFB.required();entityCategoriesEditable=(0,F.hFB)(!1);menuItems=(0,F.hFB)([]);availableEntityCategories=(0,F.hFB)([]);collapsed=(0,F.hFB)(!1);dataChanged=(0,F.CGW)();_entityCategories=(0,k.uu)(()=>this.entity()?.categories||[]);entityCategories=(0,k.EW)(()=>this._entityCategories());entityCategoriesString=(0,k.EW)(()=>this._entityCategories().map(t=>this._iriToString(t)).sort().join(", "));infoChangeEntityCategory=(0,ea.Xx)("components.entityInfo.infoChangeEntityCategory");rdfEditConfig=(0,k.EW)(()=>{var t=this;const n=this.handlers()?.requestRDFChange;var i;if(void 0!==n)return{message:this.infoChangeEntityCategory(),existingValue:this._entityCategories(),dataType:"multiselect",options:this.availableEntityCategories()?.map(i=>i.iri),optionLabelMap:this.availableEntityCategories()?.reduce((i,o)=>(i[o.iri]=o.label,i),{}),requestSave:(i=(0,O.A)(function*(o){console.log(o);const a={subject:t.entity()?.iri,predicate:`${ib.E.qcy}entityCategory`,objects:t._entityCategories(),newObjects:o.newValue,type:"entityCategory",comment:o.comment};yield n(a),t._entityCategories.set(o.newValue),t.dataChanged.emit({entityCategories:o.newValue})}),function(a){return i.apply(this,arguments)})};console.warn("No RDF change request handler defined")});_iriToString(t){const n=this.availableEntityCategories()?.find(i=>i.iri===t);return n?n.label:t}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=le.VBU({type:r,selectors:[["cue-entity-info"]],inputs:{entity:[1,"entity"],handlers:[1,"handlers"],entityCategoriesEditable:[1,"entityCategoriesEditable"],menuItems:[1,"menuItems"],availableEntityCategories:[1,"availableEntityCategories"],collapsed:[1,"collapsed"]},outputs:{dataChanged:"dataChanged"},decls:5,vars:3,consts:[["trigger",""],["direction","row",2,"min-height","50px"],["direction","column",2,"flex","1 1"],["direction","column",2,"width","50px"],["size","l",3,"key","val"],["size","s",3,"key","val","rdfConfig","editDisabled"],["positioning","bottomleft"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu","",3,"items"]],template:function(n,i){if(1&n&&(le.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2),le.nVh(2,KU,3,2,"cue-key-val-list"),le.k0s(),le.SS7(3),le.nVh(4,XU,6,1,"cue-flexcontainer",3),le.k0s()),2&n){le.R7$(2),le.vxM(i.entity()?2:-1),le.R7$();const o=le.bH3(i.menuItems());le.R7$(),le.vxM(void 0!==o&&o.length>0?4:-1)}},dependencies:[oS.n,VU.p,BU.F,UU.L,zU.W,GU.T,qU.a,jU.$,ea.Kj],encapsulation:2,changeDetection:0})}return r})();var QU=oe(8611);class aS{hideClassAssignmentTriples=!0;hideDatatypePropertyTriples=!0;collapseIntoClassificationLabels=[];preferredLabelLanguage="en";showClassLabelOnInstance=!0}var sS=oe(2130),ZU=oe(8402);class lS{_doc;_omitClassAssignments;_omitDatatypeProperties;_preferredLabelLanguage;_collapseIntoClassificationLabels;_context;_nodes=[];_edges=[];_seenNodes=[];_resourceLabels={};_resourceAltLabels={};_resolvedCollapsePredicates=new Set;_knownPrefixes={schema:"http://schema.org/"};constructor(e,t=!0,n=!0,i="en",o=[]){this._doc=e,this._omitClassAssignments=t,this._omitDatatypeProperties=n,this._preferredLabelLanguage=i,this._collapseIntoClassificationLabels=o}get elementData(){return{nodes:this._nodes,edges:this._edges}}init(){var e=this;return(0,O.A)(function*(){return"http://schema.org/"==e._doc["@context"]&&(e._doc["@context"]="https://schema.org/"),e._context={...e._doc["@context"],...e._knownPrefixes},e._nodes=[],e._edges=[],e._seenNodes=[],e._resourceLabels={},e._resourceAltLabels={},e._resolvedCollapsePredicates=new Set(e._collapseIntoClassificationLabels.map(n=>e._expandIRI(n))),(yield(0,sS.toRDF)(e._doc)).forEach(n=>e._processQuad(n)),e._nodes=e._appendNames(e._nodes),e._edges=e._appendNames(e._edges),{nodes:e._nodes,edges:e._edges}})()}append(e){var t=this;return(0,O.A)(function*(){return(yield(0,sS.toRDF)(e)).forEach(i=>t._processQuad(i)),t._nodes=t._appendNames(t._nodes),t._edges=t._appendNames(t._edges),{nodes:t._nodes,edges:t._edges}})()}_processQuad(e){const t=e.subject.value;let n=e.predicate.value,i=e.object.value;if("http://www.w3.org/2004/02/skos/core#prefLabel"===n||"http://www.w3.org/2000/01/rdf-schema#label"===n||"http://schema.org/name"===n)return void(Object.keys(this._resourceLabels).includes(t)?this._resourceLabels[t].push(e.object):this._resourceLabels[t]=[e.object]);if("http://www.w3.org/2004/02/skos/core#altLabel"===n)return void(Object.keys(this._resourceAltLabels).includes(t)?this._resourceAltLabels[t].push(e.object):this._resourceAltLabels[t]=[e.object]);if(this._appendNamedNode(t),this._resolvedCollapsePredicates.has(n)){const a=this._nodes.find(s=>s.data.id===t);return void(void 0!==a&&(void 0===a.data.boxLabels&&(a.data.boxLabels=[]),a.data.boxLabels.push(this._appendPrefix(i))))}if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===n&&(n="a",this._seenNodes.includes(t))){const a=this._nodes.find(s=>s.data.id===t);void 0!==a&&(void 0===a.data.boxLabels&&(a.data.boxLabels=[]),a.data.boxLabels.push(this._appendPrefix(i)))}const o=e.object.termType;if("Literal"===o){if(i=this._appendLiteralNode(i),this._seenNodes.includes(t)){const a=this._nodes.find(s=>s.data.id===t);if(void 0!==a){void 0===a.data.properties&&(a.data.properties={});const s=this._getIdFromIRI(n);a.data.properties[s]=e.object.value}}}else"BlankNode"===o?this._appendNamedNode(i,"individual"):"NamedNode"===o?this._appendNamedNode(i,"a"===n?"class":"individual"):console.warn("Unknown term type "+o);this._appendEdge(t,n,i,"Literal"===o)}_appendNames(e){return e.map(t=>{const n=t.data.iri,i=(void 0!==t.data.id?this._resourceLabels[t.data.id]:void 0)??(void 0!==n?this._resourceLabels[n]:void 0)??(void 0!==t.data.id?this._resourceAltLabels[t.data.id]:void 0)??(void 0!==n?this._resourceAltLabels[n]:void 0);if(Array.isArray(i))1===i.length?t.data.label=i[0].value:console.log("MORE THAN ONE LABEL NOT YET SUPPORTED");else{if("class"===t.classes){if(null==t.data.iri)return t;t.data.label=this._getIdFromIRI(t.data.iri)}if("edge"===t.classes){if(null==t.data.iri)return t;t.data.label=this._getIdFromIRI(t.data.iri)}}const o=t.data;return void 0!==o.size&&(""!=t.data.label&&(o.size=44),Array.isArray(o.boxLabels)&&(o.boxLabels=o.boxLabels.map(a=>{const s=this._expandIRI(a),l=this._resourceLabels[s]??this._resourceAltLabels[s];return Array.isArray(l)&&l.length>0?l[0].value:a}))),t})}_appendNamedNode(e,t="individual"){if(!this._omitClassAssignments||"class"!==t)if(this._seenNodes.includes(e)){if("class"===t){const n=this._nodes.find(i=>i.data.id===e);null!=n&&(n.classes=t)}}else this._nodes.push({data:{id:e,iri:e,label:"",size:24},classes:t}),this._seenNodes.push(e)}_appendLiteralNode(e){if(this._omitDatatypeProperties)return"";""===e&&(e="-");const t=this._camelize(e);return this._seenNodes.includes(t)||(this._nodes.push({data:{id:t,label:e,size:2*e.length},classes:"literal"}),this._seenNodes.push(t)),t}_appendEdge(e,t,n,i=!1){this._omitClassAssignments&&"a"===t||this._omitDatatypeProperties&&i||this._edges.push({data:{id:(0,ZU.A)(),source:e,target:n,label:this._appendPrefix(t),iri:t},classes:"edge"})}_expandIRI(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;const t=e.indexOf(":");if(t>0){const n=e.substring(0,t),i=e.substring(t+1),o=this._context?.[n];if(o)return o+i}return e}_appendPrefix(e){const t=Object.keys(this._context),n=Object.values(this._context);for(const i in n){const o=n[i];if(e.startsWith(o)){e=e.replace(o,`${t[i]}:`);break}}return e}_camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(t,n){return 0===n?t.toLowerCase():t.toUpperCase()}).replace(/\s+/g,"")}_getIdFromIRI(e){return e.includes("#")?e.split("#")[1]:e.split("/").pop()??e}}class e4{_doc;_settings;_elementDataHandler;_elementData;constructor(e,t=new aS){this._doc=e,this._settings=t,this._elementDataHandler=new lS(this._doc,this._settings.hideClassAssignmentTriples,this._settings.hideDatatypePropertyTriples,this._settings.preferredLabelLanguage,this._settings.collapseIntoClassificationLabels)}set settings(e){this._settings=e,this._elementDataHandler=new lS(this._doc,this._settings.hideClassAssignmentTriples,this._settings.hideDatatypePropertyTriples,this._settings.preferredLabelLanguage,this._settings.collapseIntoClassificationLabels)}init(){var e=this;return(0,O.A)(function*(){return e._elementData=yield e._elementDataHandler.init(),e._elementData})()}appendElementData(e){var t=this;return(0,O.A)(function*(){return t._elementData=yield t._elementDataHandler.append(e),t._elementData})()}compact(){console.log("COMPACT")}expand(){console.log("EXPAND")}}class Ph{props={display:!0,displayOnlyOnHover:!0};boxLabels={display:!0,displayOnlyOnHover:!1}}function uS(r,e,t=new Ph){function n(){r.nodes().forEach(a=>{const s=a.renderedHeight(),l=document.getElementById(`box-${a.id()}`);if(l){if(t.boxLabels.display){const u=a.data().boxLabels;if(void 0!==u){let c=document.getElementById(`labels-box-${a.id()}`);c?c.style.bottom=s/2-10+"px":(c=document.createElement("div"),c.id=`labels-box-${a.id()}`,c.className="box-label",c.style.bottom=s/2-10+"px",t.boxLabels.displayOnlyOnHover&&(c.style.display="none"),l.appendChild(c),u.forEach((h,d)=>{if(!c)return;const p=document.createElement("div");p.id=`labels-box-${a.id()}-${d}`,p.className="entry",p.innerHTML=h,c.appendChild(p)}))}}if(t.props.display){const u=a.data().properties;if(void 0!==u){let c=document.getElementById(`props-box-${a.id()}`);c?c.style.top=s/2-10+"px":(c=document.createElement("div"),c.id=`props-box-${a.id()}`,c.style.right="0px",c.className="property",c.style.top=s/2-10+"px",t.props.displayOnlyOnHover&&(c.style.display="none"),l.appendChild(c),Object.keys(u).forEach((h,d)=>{if(!c)return;const p=document.createElement("div");p.id=`props-box-${a.id()}-${d}`,p.className="entry",p.innerHTML=`<span class="key">${h}</span><span class="value">${u[h]}</span>`,c.appendChild(p)}))}}}})}!function t4(r,e){function t(){r.nodes().forEach(i=>{const o=i.renderedPosition();let a=document.getElementById(`box-${i.id()}`);a||(a=document.createElement("div"),a.id=`box-${i.id()}`,a.style.position="absolute",e.appendChild(a)),a.style.left=`${o.x}px`,a.style.top=`${o.y}px`})}t(),r.on("position","node",t),r.on("pan zoom",t),r.on("remove","node",function n(i){const o=i.target.id(),a=document.getElementById(`box-${o}`);a&&a.remove()}),window.addEventListener("resize",t)}(r,e),n(),r.on("zoom",()=>{n(),function o(){if(!t.boxLabels.display)return;const s=r.zoom()>=.6;r.nodes().forEach(l=>{const u=document.getElementById(`labels-box-${l.id()}`);u&&(t.boxLabels.displayOnlyOnHover||(u.style.display=s?"flex":"none"))})}()}),r.on("mouseover","node",a=>{const s=a.target;if(t.props.displayOnlyOnHover){const l=document.getElementById(`props-box-${s.id()}`);l&&(l.style.display="flex")}if(t.boxLabels.displayOnlyOnHover){const l=document.getElementById(`labels-box-${s.id()}`);l&&(l.style.display="flex")}}),r.on("mouseout","node",a=>{const s=a.target;if(t.props.displayOnlyOnHover){const l=document.getElementById(`props-box-${s.id()}`);l&&(l.style.display="none")}if(t.boxLabels.displayOnlyOnHover){const l=document.getElementById(`labels-box-${s.id()}`);l&&(l.style.display="none")}})}function Vo(r){return getComputedStyle(document.documentElement).getPropertyValue(r).trim()}const up={get backgroundColor(){return Vo("--cue-main-background")||"#f5f6f9"},get edgeColor(){return Vo("--cue-primary")||"#2859e1"},edgeFontSize:"5rem",edgeWidth:"1.5rem",get nodeColor(){return Vo("--cue-primary")||"#2859e1"},nodeOpacity:"0.9",font:"Poppins",directed:!0,labelSelector:"label",showNodeLabels:!0,showEdgeLabels:!0,get hoverBorderColor(){return Vo("--cue-primary")||"#2859e1"},get textColor(){return Vo("--cue-primaryContrast")||"#ffffff"}},cS=(r=up)=>{const e=Vo("--cue-primary")||"#2859e1",t=Vo("--cue-primaryContrast")||"#ffffff",n=Vo("--cue-accent")||"#e2f552",i=Vo("--cue-accentContrast")||"#121c2b",o=Vo("--cue-neutral")||"#8394b0",a=Vo("--cue-main-foreground")||"#121c2b",s=r.backgroundColor;return[{selector:"node",style:{label:l=>l.data(r.labelSelector)&&r.showNodeLabels?l.data(r.labelSelector):"",shape:"round-rectangle","text-valign":"bottom","text-margin-y":10,"font-family":r.font,"font-size":"6rem",opacity:r.nodeOpacity,color:a,"text-outline-width":0,"text-outline-color":l=>l.data("color")?l.data("color"):e,"background-color":l=>l.data("color")?l.data("color"):e,width:l=>l.data("size")?l.data("size"):"24",height:l=>l.data("size")?l.data("size"):"24","background-image":l=>l.data("imgPath")?l.data("imgPath"):"none","background-fit":"cover","background-width":"100%","background-height":"100%","background-image-opacity":.2}},{selector:"edge",style:{label:"","font-family":r.font,"font-size":r.edgeFontSize,color:e,"target-arrow-color":e,"curve-style":"bezier","target-arrow-shape":r.directed?"triangle":"none","arrow-scale":.8,"line-color":e,"line-opacity":.5,width:l=>l.data("width")?l.data("width"):r.edgeWidth}},{selector:"edge.edge-hover",style:{label:l=>l.data(r.labelSelector)&&r.showEdgeLabels?l.data(r.labelSelector):"","line-opacity":1,width:l=>l.data("width")?l.data("width"):r.edgeWidth,"text-valign":"center","text-rotation":"autorotate","text-background-opacity":1,"text-background-color":s,"text-background-padding":4,"font-size":r.edgeFontSize,"font-weight":"600"}},{selector:".triple",style:{"background-color":s,"border-color":l=>l.data("color")?l.data("color"):e}},{selector:".literal",style:{label:l=>l.data(r.labelSelector)?l.data(r.labelSelector):"","text-valign":"center","font-size":"6rem","border-color":a,"background-color":s,"text-outline-width":0,"border-width":0,"background-opacity":0,color:a}},{selector:".loading",style:{shape:"ellipse","pie-size":"100%","pie-1-background-color":e,"pie-1-background-size":l=>`${l.data("pct")}%`,"pie-2-background-color":n,"pie-2-background-size":l=>100-parseInt(l.data("pct"))+"%",label:l=>void 0!==l.data("pct")&&100!==l.data("pct")?`${parseInt(l.data("pct"))}%`:"","font-size":"5rem","border-width":1,"border-opacity":1,"border-color":t}},{selector:".dropzone",style:{"border-color":e,"border-width":6,"border-opacity":1}},{selector:".collapser",style:{"background-color":o,"text-outline-color":o,"text-outline-width":0,"text-valign":"center",color:t,"border-width":0,"border-opacity":0,opacity:1}},{selector:".collapser-expanded",style:{opacity:.65}},{selector:".class",style:{"background-color":n,"text-outline-color":n,color:i}},{selector:".faded",style:{opacity:.12}},{selector:"node.focused",style:{"outline-color":l=>l.data("color")||e,"outline-width":"2px","outline-offset":"3px","outline-opacity":.5,"outline-style":"solid"}}]};class r4{_requestId;_animationRunning=!1;constructor(e,t=!0,n=1e-4,i=.02){this._build(e,t,n,i)}stop(){void 0!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=void 0,this._animationRunning=!1)}_build(e,t=!0,n=1e-4,i=.02){const o=()=>{this._animationRunning&&(e.nodes().forEach((a,s)=>{const l=a.position(),u=Math.sin(performance.now()*n+s)*i,c=Math.cos(performance.now()*n+s)*i;a.position({x:l.x+u,y:l.y+c})}),this._requestId=requestAnimationFrame(o))};this._animationRunning=!0,this._requestId=requestAnimationFrame(o),t&&e.on("mouseover","node",()=>{this.stop()})}}var n4=oe(6894),i4=oe.n(n4);function ob(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function ls(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function us(r,e,t){return e&&function s4(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,dS(n.key),n)}}(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function no(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=ab(r))||e){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(l){throw l},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return a=l.done,l},e:function(l){s=!0,o=l},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}function hS(r,e,t){return(e=dS(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Wn(r,e){return function o4(r){if(Array.isArray(r))return r}(r)||function u4(r,e){var t=null==r?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;l=!1}else for(;!(l=(n=o.call(t)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(r,e)||ab(r,e)||function c4(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cp(r){return function a4(r){if(Array.isArray(r))return ob(r)}(r)||function l4(r){if(typeof Symbol<"u"&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||ab(r)||function h4(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dS(r){var e=function d4(r,e){if("object"!=typeof r||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(r,"string");return"symbol"==typeof e?e:e+""}function ei(r){return(ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(r)}function ab(r,e){if(r){if("string"==typeof r)return ob(r,e);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ob(r,e):void 0}}var ub,TS,cb,IS,hb,xS,db,AS,fb,RS,pb,SS,gb,CS,vb,PS,yb,kS,wb,DS,_b,OS,bb,LS,Eb,MS,Tb,FS,ti=typeof window>"u"?null:window,fS=ti?ti.navigator:null,f4=ei(""),pS=ei({}),p4=ei(function(){}),g4=typeof HTMLElement>"u"?"undefined":ei(HTMLElement),kh=function(e){return e&&e.instanceString&&xn(e.instanceString)?e.instanceString():null},sr=function(e){return null!=e&&ei(e)==f4},xn=function(e){return null!=e&&ei(e)===p4},an=function(e){return!vo(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},Ur=function(e){return null!=e&&ei(e)===pS&&!an(e)&&e.constructor===Object},Bt=function(e){return null!=e&&ei(e)===ei(1)&&!isNaN(e)},hp=function(e){if("undefined"!==g4)return null!=e&&e instanceof HTMLElement},vo=function(e){return Dh(e)||gS(e)},Dh=function(e){return"collection"===kh(e)&&e._private.single},gS=function(e){return"collection"===kh(e)&&!e._private.single},sb=function(e){return"core"===kh(e)},mS=function(e){return"stylesheet"===kh(e)},cs=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},b4=function(e){return function(e){return null!=e&&ei(e)===pS}(e)&&xn(e.then)},Pu=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var o=[],a=0;a<arguments.length;a++)o.push(arguments[a]);return o.join("$")});var n=function(){var s,a=arguments,l=t.apply(this,a),u=n.cache;return(s=u[l])||(s=u[l]=e.apply(this,a)),s};return n.cache={},n},lb=Pu(function(r){return r.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),dp=Pu(function(r){return r.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),vS=Pu(function(r,e){return r+e[0].toUpperCase()+e.substring(1)},function(r,e){return r+"$"+e}),yS=function(e){return cs(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},hs=function(e,t){return e.slice(-1*t.length)===t},ri="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",T4="rgb[a]?\\(("+ri+"[%]?)\\s*,\\s*("+ri+"[%]?)\\s*,\\s*("+ri+"[%]?)(?:\\s*,\\s*("+ri+"))?\\)",I4="rgb[a]?\\((?:"+ri+"[%]?)\\s*,\\s*(?:"+ri+"[%]?)\\s*,\\s*(?:"+ri+"[%]?)(?:\\s*,\\s*(?:"+ri+"))?\\)",x4="hsl[a]?\\(("+ri+")\\s*,\\s*("+ri+"[%])\\s*,\\s*("+ri+"[%])(?:\\s*,\\s*("+ri+"))?\\)",A4="hsl[a]?\\((?:"+ri+")\\s*,\\s*(?:"+ri+"[%])\\s*,\\s*(?:"+ri+"[%])(?:\\s*,\\s*(?:"+ri+"))?\\)",wS=function(e,t){return e<t?-1:e>t?1:0},fr=null!=Object.assign?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t<e.length;t++){var n=e[t];if(null!=n)for(var i=Object.keys(n),o=0;o<i.length;o++){var a=i[o];r[a]=n[a]}}return r},_S=function(e){return(an(e)?e:null)||function(e){return O4[e.toLowerCase()]}(e)||function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var n,i,o,a=16;return 4===e.length?(n=parseInt(e[1]+e[1],a),i=parseInt(e[2]+e[2],a),o=parseInt(e[3]+e[3],a)):(n=parseInt(e[1]+e[2],a),i=parseInt(e[3]+e[4],a),o=parseInt(e[5]+e[6],a)),[n,i,o]}}(e)||function(e){var t,n=new RegExp("^"+T4+"$").exec(e);if(n){t=[];for(var i=[],o=1;o<=3;o++){var a=n[o];if("%"===a[a.length-1]&&(i[o]=!0),a=parseFloat(a),i[o]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}if((i[1]||i[2]||i[3])&&!(i[1]&&i[2]&&i[3]))return;var u=n[4];if(void 0!==u){if((u=parseFloat(u))<0||u>1)return;t.push(u)}}return t}(e)||function(e){var t,n,i,o,a,s,l,u;function c(g,y,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?g+6*(y-g)*v:v<.5?y:v<2/3?g+(y-g)*(2/3-v)*6:g}var h=new RegExp("^"+x4+"$").exec(e);if(h){if((n=parseInt(h[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(i=parseFloat(h[2]))<0||i>100||(i/=100,(o=parseFloat(h[3]))<0||o>100)||(o/=100,void 0!==(a=h[4])&&((a=parseFloat(a))<0||a>1)))return;if(0===i)s=l=u=Math.round(255*o);else{var d=o<.5?o*(1+i):o+i-o*i,p=2*o-d;s=Math.round(255*c(p,d,n+1/3)),l=Math.round(255*c(p,d,n)),u=Math.round(255*c(p,d,n-1/3))}t=[s,l,u,a]}return t}(e)},O4={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},bS=function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];if(Ur(a))throw Error("Tried to set map with object key");o<n.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},ES=function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];if(Ur(a))throw Error("Tried to get map with object key");if(null==(t=t[a]))return t}return t},fp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Oh(){return TS?ub:(TS=1,ub=function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)})}function pp(){if(xS)return hb;xS=1;var r=function L4(){return IS?cb:(IS=1,cb="object"==typeof fp&&fp&&fp.Object===Object&&fp)}(),e="object"==typeof self&&self&&self.Object===Object&&self,t=r||e||Function("return this")();return hb=t}function mb(){if(CS)return gb;CS=1;var r=pp();return gb=r.Symbol}function NS(){if(DS)return wb;DS=1;var r=mb(),e=function B4(){if(PS)return vb;PS=1;var r=mb(),e=Object.prototype,t=e.hasOwnProperty,n=e.toString,i=r?r.toStringTag:void 0;return vb=function o(a){var s=t.call(a,i),l=a[i];try{a[i]=void 0;var u=!0}catch{}var c=n.call(a);return u&&(s?a[i]=l:delete a[i]),c}}(),t=function U4(){if(kS)return yb;kS=1;var e=Object.prototype.toString;return yb=function t(n){return e.call(n)}}(),o=r?r.toStringTag:void 0;return wb=function a(s){return null==s?void 0===s?"[object Undefined]":"[object Null]":o&&o in Object(s)?e(s):t(s)}}function Lh(){if(LS)return bb;LS=1;var r=NS(),e=function z4(){return OS?_b:(OS=1,_b=function r(e){return null!=e&&"object"==typeof e})}();return bb=function n(i){return"symbol"==typeof i||e(i)&&"[object Symbol]"==r(i)}}var j4=function q4(){if(FS)return Tb;FS=1;var r=Oh(),e=function M4(){if(AS)return db;AS=1;var r=pp();return db=function(){return r.Date.now()}}(),t=function G4(){if(MS)return Eb;MS=1;var r=function V4(){if(SS)return pb;SS=1;var r=function F4(){if(RS)return fb;RS=1;var r=/\s/;return fb=function e(t){for(var n=t.length;n--&&r.test(t.charAt(n)););return n}}(),e=/^\s+/;return pb=function t(n){return n&&n.slice(0,r(n)+1).replace(e,"")}}(),e=Oh(),t=Lh(),i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;return Eb=function l(u){if("number"==typeof u)return u;if(t(u))return NaN;if(e(u)){var c="function"==typeof u.valueOf?u.valueOf():u;u=e(c)?c+"":c}if("string"!=typeof u)return 0===u?u:+u;u=r(u);var h=o.test(u);return h||a.test(u)?s(u.slice(2),h?2:8):i.test(u)?NaN:+u}}(),i=Math.max,o=Math.min;return Tb=function a(s,l,u){var c,h,d,p,g,y,v=0,m=!1,_=!1,I=!0;if("function"!=typeof s)throw new TypeError("Expected a function");function U(B){var me=c,be=h;return c=h=void 0,v=B,p=s.apply(be,me)}function A(B){var me=B-y;return void 0===y||me>=l||me<0||_&&B-v>=d}function C(){var B=e();if(A(B))return M(B);g=setTimeout(C,function re(B){var xe=l-(B-y);return _?o(xe,d-(B-v)):xe}(B))}function M(B){return g=void 0,I&&c?U(B):(c=h=void 0,p)}function K(){var B=e(),me=A(B);if(c=arguments,h=this,y=B,me){if(void 0===g)return function ne(B){return v=B,g=setTimeout(C,l),m?U(B):p}(y);if(_)return clearTimeout(g),g=setTimeout(C,l),U(y)}return void 0===g&&(g=setTimeout(C,l)),p}return l=t(l)||0,r(u)&&(m=!!u.leading,d=(_="maxWait"in u)?i(t(u.maxWait)||0,l):d,I="trailing"in u?!!u.trailing:I),K.cancel=function q(){void 0!==g&&clearTimeout(g),v=0,c=y=h=g=void 0},K.flush=function z(){return void 0===g?p:M(e())},K},Tb}(),Mh=Nh(j4),Ib=ti?ti.performance:null,VS=Ib&&Ib.now?function(){return Ib.now()}:function(){return Date.now()},H4=function(){if(ti){if(ti.requestAnimationFrame)return function(r){ti.requestAnimationFrame(r)};if(ti.mozRequestAnimationFrame)return function(r){ti.mozRequestAnimationFrame(r)};if(ti.webkitRequestAnimationFrame)return function(r){ti.webkitRequestAnimationFrame(r)};if(ti.msRequestAnimationFrame)return function(r){ti.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(VS())},1e3/60)}}(),gp=function(e){return H4(e)},Sa=VS,fl=9261,ku=5381,US=function(e){for(var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fl;!(i=e.next()).done;)n=65599*n+i.value|0;return n},Fh=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:fl)+e|0},Vh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ku;return(t<<5)+t+e|0},ds=function(e){return 2097152*e[0]+e[1]},mp=function(e,t){return[Fh(e[0],t[0]),Vh(e[1],t[1])]},zS=function(e,t){var n={value:0,done:!1},i=0,o=e.length;return US({next:function(){return i<o?n.value=e[i++]:n.done=!0,n}},t)},pl=function(e,t){var n={value:0,done:!1},i=0,o=e.length;return US({next:function(){return i<o?n.value=e.charCodeAt(i++):n.done=!0,n}},t)},GS=function(){return W4(arguments)},W4=function(e){for(var t,n=0;n<e.length;n++){var i=e[n];t=0===n?pl(i):pl(i,t)}return t};var qS=!0,Q4=null!=console.warn,J4=null!=console.trace,xb=Number.MAX_SAFE_INTEGER||9007199254740991,jS=function(){return!0},vp=function(){return!1},HS=function(){return 0},Ab=function(){},bn=function(e){throw new Error(e)},$S=function(e){if(void 0===e)return qS;qS=!!e},Kr=function(e){$S()&&(Q4?console.warn(e):(console.log(e),J4&&console.trace()))},ta=function(e){return null==e?e:an(e)?e.slice():Ur(e)?function(e){return fr({},e)}(e):e},WS=function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t},tz={},KS=function(){return tz},Ei=function(e){var t=Object.keys(e);return function(n){for(var i={},o=0;o<t.length;o++){var a=t[o],s=n?.[a];i[a]=void 0===s?e[a]:s}return i}},fs=function(e,t,n){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1)},Rb=function(e){e.splice(0,e.length)},io=function(e,t,n){return n&&(t=vS(n,t)),e[t]},Ca=function(e,t,n,i){n&&(t=vS(n,t)),e[t]=i},Pa=typeof Map<"u"?Map:function(){return us(function r(){ls(this,r),this._obj={}},[{key:"set",value:function(t,n){return this._obj[t]=n,this}},{key:"delete",value:function(t){return this._obj[t]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(t){return void 0!==this._obj[t]}},{key:"get",value:function(t){return this._obj[t]}}])}(),oz=function(){return us(function r(e){if(ls(this,r),this._obj=Object.create(null),this.size=0,null!=e){var t;t=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e;for(var n=0;n<t.length;n++)this.add(t[n])}},[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(t){var n=this._obj;1!==n[t]&&(n[t]=1,this.size++)}},{key:"delete",value:function(t){var n=this._obj;1===n[t]&&(n[t]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(t){return 1===this._obj[t]}},{key:"toArray",value:function(){var t=this;return Object.keys(this._obj).filter(function(n){return t.has(n)})}},{key:"forEach",value:function(t,n){return this.toArray().forEach(t,n)}}])}(),Du="undefined"!==(typeof Set>"u"?"undefined":ei(Set))?Set:oz,yp=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&sb(e)){var i=t.group;if(null==i&&(i=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===i||"edges"===i){this.length=1,this[0]=this;var o=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===i:!!t.pannable,active:!1,classes:new Du,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==o.position.x&&(o.position.x=0),null==o.position.y&&(o.position.y=0),t.renderedPosition){var a=t.renderedPosition,s=e.pan(),l=e.zoom();o.position={x:(a.x-s.x)/l,y:(a.y-s.y)/l}}var u=[];an(t.classes)?u=t.classes:sr(t.classes)&&(u=t.classes.split(/\s+/));for(var c=0,h=u.length;c<h;c++){var d=u[c];!d||""===d||o.classes.add(d)}this.createEmitter(),(void 0===n||n)&&this.restore();var p=t.style||t.css;p&&(Kr("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(p))}else bn("An element must be of type `nodes` or `edges`; you specified `"+i+"`")}else bn("An element must have a core reference and parameters set")},XS=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(n,i,o){var a;Ur(n)&&!vo(n)&&(n=(a=n).roots||a.root,i=a.visit,o=a.directed),o=2!==arguments.length||xn(i)?o:i,i=xn(i)?i:function(){};for(var y,s=this._private.cy,l=n=sr(n)?this.filter(n):n,u=[],c=[],h={},d={},p={},g=0,v=this.byGroup(),m=v.nodes,_=v.edges,I=0;I<l.length;I++){var U=l[I],ne=U.id();U.isNode()&&(u.unshift(U),e.bfs&&(p[ne]=!0,c.push(U)),d[ne]=0)}for(var A,re=function(){var B=e.bfs?u.shift():u.pop(),me=B.id();if(e.dfs){if(p[me])return 0;p[me]=!0,c.push(B)}var We,be=d[me],xe=h[me],we=null!=xe?xe.source():null,Re=null!=xe?xe.target():null,je=null==xe?void 0:B.same(we)?Re[0]:we[0];if(!0===(We=i(B,xe,je,g++,be)))return y=B,1;if(!1===We)return 1;for(var Pe=B.connectedEdges().filter(function(bt){return(!o||bt.source().same(B))&&_.has(bt)}),Fe=0;Fe<Pe.length;Fe++){var lt=Pe[Fe],mt=lt.connectedNodes().filter(function(bt){return!bt.same(B)&&m.has(bt)}),at=mt.id();0!==mt.length&&!p[at]&&(u.push(mt=mt[0]),e.bfs&&(p[at]=!0,c.push(mt)),h[at]=lt,d[at]=d[me]+1)}};0!==u.length&&(0===(A=re())||1!==A););for(var C=s.collection(),M=0;M<c.length;M++){var q=c[M],z=h[q.id()];null!=z&&C.push(z),C.push(q)}return{path:s.collection(C),found:s.collection(y)}}},Bh={breadthFirstSearch:XS({bfs:!0}),depthFirstSearch:XS({dfs:!0})};Bh.bfs=Bh.breadthFirstSearch,Bh.dfs=Bh.depthFirstSearch;var YS,Sb,QS,wp={exports:{}},az=wp.exports;var Pb,Uh=Nh(function lz(){return QS||(QS=1,Sb=function sz(){return YS||(YS=1,r=wp,function(){var t,n,i,o,a,s,l,u,c,h,d,p,g,y,v;i=Math.floor,h=Math.min,n=function(m,_){return m<_?-1:m>_?1:0},c=function(m,_,I,U,ne){var re;if(null==I&&(I=0),null==ne&&(ne=n),I<0)throw new Error("lo must be non-negative");for(null==U&&(U=m.length);I<U;)ne(_,m[re=i((I+U)/2)])<0?U=re:I=re+1;return[].splice.apply(m,[I,I-I].concat(_)),_},s=function(m,_,I){return null==I&&(I=n),m.push(_),y(m,0,m.length-1,I)},a=function(m,_){var I,U;return null==_&&(_=n),I=m.pop(),m.length?(U=m[0],m[0]=I,v(m,0,_)):U=I,U},u=function(m,_,I){var U;return null==I&&(I=n),U=m[0],m[0]=_,v(m,0,I),U},l=function(m,_,I){var U;return null==I&&(I=n),m.length&&I(m[0],_)<0&&(_=(U=[m[0],_])[0],m[0]=U[1],v(m,0,I)),_},o=function(m,_){var U,ne,re,A,C;for(null==_&&(_=n),A=[],U=0,ne=(re=function(){C=[];for(var M=0,q=i(m.length/2);0<=q?M<q:M>q;0<=q?M++:M--)C.push(M);return C}.apply(this).reverse()).length;U<ne;U++)A.push(v(m,re[U],_));return A},g=function(m,_,I){var U;if(null==I&&(I=n),-1!==(U=m.indexOf(_)))return y(m,0,U,I),v(m,U,I)},d=function(m,_,I){var ne,re,A,C;if(null==I&&(I=n),!(ne=m.slice(0,_)).length)return ne;for(o(ne,I),re=0,A=(C=m.slice(_)).length;re<A;re++)l(ne,C[re],I);return ne.sort(I).reverse()},p=function(m,_,I){var U,ne,re,A,C,M,q,z,K;if(null==I&&(I=n),10*_<=m.length){if(!(re=m.slice(0,_).sort(I)).length)return re;for(ne=re[re.length-1],A=0,M=(q=m.slice(_)).length;A<M;A++)I(U=q[A],ne)<0&&(c(re,U,0,null,I),re.pop(),ne=re[re.length-1]);return re}for(o(m,I),K=[],C=0,z=h(_,m.length);0<=z?C<z:C>z;0<=z?++C:--C)K.push(a(m,I));return K},y=function(m,_,I,U){var ne,re,A;for(null==U&&(U=n),ne=m[I];I>_&&U(ne,re=m[A=I-1>>1])<0;)m[I]=re,I=A;return m[I]=ne},v=function(m,_,I){var U,ne,re,A,C;for(null==I&&(I=n),ne=m.length,C=_,re=m[_],U=2*_+1;U<ne;)(A=U+1)<ne&&!(I(m[U],m[A])<0)&&(U=A),m[_]=m[U],U=2*(_=U)+1;return m[_]=re,y(m,C,_,I)},t=function(){function m(_){this.cmp=_??n,this.nodes=[]}return m.push=s,m.pop=a,m.replace=u,m.pushpop=l,m.heapify=o,m.updateItem=g,m.nlargest=d,m.nsmallest=p,m.prototype.push=function(_){return s(this.nodes,_,this.cmp)},m.prototype.pop=function(){return a(this.nodes,this.cmp)},m.prototype.peek=function(){return this.nodes[0]},m.prototype.contains=function(_){return-1!==this.nodes.indexOf(_)},m.prototype.replace=function(_){return u(this.nodes,_,this.cmp)},m.prototype.pushpop=function(_){return l(this.nodes,_,this.cmp)},m.prototype.heapify=function(){return o(this.nodes,this.cmp)},m.prototype.updateItem=function(_){return g(this.nodes,_,this.cmp)},m.prototype.clear=function(){return this.nodes=[]},m.prototype.empty=function(){return 0===this.nodes.length},m.prototype.size=function(){return this.nodes.length},m.prototype.clone=function(){var _;return(_=new m).nodes=this.nodes.slice(0),_},m.prototype.toArray=function(){return this.nodes.slice(0)},m.prototype.insert=m.prototype.push,m.prototype.top=m.prototype.peek,m.prototype.front=m.prototype.peek,m.prototype.has=m.prototype.contains,m.prototype.copy=m.prototype.clone,m}(),r.exports=t}.call(az)),wp.exports;var r}()),Sb}()),cz=Ei({root:null,weight:function(e){return 1},directed:!1}),hz={dijkstra:function(e){if(!Ur(e)){var t=arguments;e={root:t[0],weight:t[1],directed:t[2]}}var n=cz(e),i=n.root,a=n.directed,s=this,l=n.weight,u=sr(i)?this.filter(i)[0]:i[0],c={},h={},d={},p=this.byGroup(),g=p.nodes,y=p.edges;y.unmergeBy(function(be){return be.isLoop()});for(var v=function(xe){return c[xe.id()]},m=function(xe,we){c[xe.id()]=we,_.updateItem(xe)},_=new Uh(function(be,xe){return v(be)-v(xe)}),I=0;I<g.length;I++){var U=g[I];c[U.id()]=U.same(u)?0:1/0,_.push(U)}for(var ne=function(xe,we){for(var We,Re=(a?xe.edgesTo(we):xe.edgesWith(we)).intersect(y),je=1/0,Pe=0;Pe<Re.length;Pe++){var Fe=Re[Pe],lt=l(Fe);(lt<je||!We)&&(je=lt,We=Fe)}return{edge:We,dist:je}};_.size()>0;){var re=_.pop(),A=v(re),C=re.id();if(d[C]=A,A!==1/0)for(var M=re.neighborhood().intersect(g),q=0;q<M.length;q++){var z=M[q],K=z.id(),B=ne(re,z),me=A+B.dist;me<v(z)&&(m(z,me),h[K]={node:re,edge:B.edge})}}return{distanceTo:function(xe){var we=sr(xe)?g.filter(xe)[0]:xe[0];return d[we.id()]},pathTo:function(xe){var we=sr(xe)?g.filter(xe)[0]:xe[0],Re=[],je=we,We=je.id();if(we.length>0)for(Re.unshift(we);h[We];){var Pe=h[We];Re.unshift(Pe.edge),Re.unshift(Pe.node),We=(je=Pe.node).id()}return s.spawn(Re)}}}},dz={kruskal:function(e){e=e||function(I){return 1};for(var t=this.byGroup(),n=t.nodes,i=t.edges,o=n.length,a=new Array(o),s=n,l=function(U){for(var ne=0;ne<a.length;ne++)if(a[ne].has(U))return ne},u=0;u<o;u++)a[u]=this.spawn(n[u]);for(var c=i.sort(function(I,U){return e(I)-e(U)}),h=0;h<c.length;h++){var d=c[h],p=d.source()[0],g=d.target()[0],y=l(p),v=l(g),m=a[y],_=a[v];y!==v&&(s.merge(d),m.merge(_),a.splice(v,1))}return s}},fz=Ei({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),pz={aStar:function(e){var t=this.cy(),n=fz(e),i=n.root,o=n.goal,a=n.heuristic,s=n.directed,l=n.weight;i=t.collection(i)[0],o=t.collection(o)[0];var I,U,u=i.id(),c=o.id(),h={},d={},p={},g=new Uh(function(We,Pe){return d[We.id()]-d[Pe.id()]}),y=new Du,v={},m={},_=function(Pe,Fe){g.push(Pe),y.add(Fe)},ne=function(){I=g.pop(),U=I.id(),y.delete(U)},re=function(Pe){return y.has(Pe)};_(i,u),h[u]=0,d[u]=a(i);for(var A=0;g.size()>0;){if(ne(),A++,U===c){for(var C=[],M=o,q=c,z=m[q];C.unshift(M),null!=z&&C.unshift(z),null!=(M=v[q]);)z=m[q=M.id()];return{found:!0,distance:h[U],path:this.spawn(C),steps:A}}p[U]=!0;for(var K=I._private.edges,B=0;B<K.length;B++){var me=K[B];if(this.hasElementWithId(me.id())&&(!s||me.data("source")===U)){var be=me.source(),xe=me.target(),we=be.id()!==U?be:xe,Re=we.id();if(this.hasElementWithId(Re)&&!p[Re]){var je=h[U]+l(me);if(!re(Re)){h[Re]=je,d[Re]=je+a(we),_(we,Re),v[Re]=I,m[Re]=me;continue}je<h[Re]&&(h[Re]=je,d[Re]=je+a(we),v[Re]=I,m[Re]=me)}}}}return{found:!1,distance:void 0,path:void 0,steps:A}}},gz=Ei({weight:function(e){return 1},directed:!1}),mz={floydWarshall:function(e){for(var t=this.cy(),n=gz(e),o=n.directed,a=n.weight,s=this.byGroup(),l=s.nodes,u=s.edges,c=l.length,h=c*c,d=function(lt){return l.indexOf(lt)},p=function(lt){return l[lt]},g=new Array(h),y=0;y<h;y++){var v=y%c;g[y]=(y-v)/c===v?0:1/0}for(var _=new Array(h),I=new Array(h),U=0;U<u.length;U++){var ne=u[U],re=ne.source()[0],A=ne.target()[0];if(re!==A){var C=d(re),M=d(A),q=C*c+M,z=a(ne);if(g[q]>z&&(g[q]=z,_[q]=M,I[q]=ne),!o){var K=M*c+C;!o&&g[K]>z&&(g[K]=z,_[K]=C,I[K]=ne)}}}for(var B=0;B<c;B++)for(var me=0;me<c;me++)for(var be=me*c+B,xe=0;xe<c;xe++){var we=me*c+xe,Re=B*c+xe;g[be]+g[Re]<g[we]&&(g[we]=g[be]+g[Re],_[we]=_[be])}var We=function(lt){return d(function(lt){return(sr(lt)?t.filter(lt):lt)[0]}(lt))};return{distance:function(lt,mt){var at=We(lt),bt=We(mt);return g[at*c+bt]},path:function(lt,mt){var at=We(lt),bt=We(mt),xt=p(at);if(at===bt)return xt.collection();if(null==_[at*c+bt])return t.collection();var Ut=t.collection();for(Ut.merge(xt);at!==bt;)Ut.merge(I[at*c+(at=_[at*c+bt])]),Ut.merge(p(at));return Ut}}}},vz=Ei({weight:function(e){return 1},directed:!1,root:null}),yz={bellmanFord:function(e){var t=this,n=vz(e),o=n.directed,a=n.root,s=n.weight,l=this,u=this.cy(),c=this.byGroup(),h=c.edges,d=c.nodes,p=d.length,g=new Pa,y=!1,v=[];a=u.collection(a)[0],h.unmergeBy(function(gr){return gr.isLoop()});for(var m=h.length,_=function(lr){var ar=g.get(lr.id());return ar||(ar={},g.set(lr.id(),ar)),ar},I=function(lr){return(sr(lr)?u.$(lr):lr)[0]},re=0;re<p;re++){var A=d[re],C=_(A);C.dist=A.same(a)?0:1/0,C.pred=null,C.edge=null}for(var M=!1,q=function(lr,ar,Ct,Gt,tr,vr){var ir=Gt.dist+vr;ir<tr.dist&&!Ct.same(Gt.edge)&&(tr.dist=ir,tr.pred=lr,tr.edge=Ct,M=!0)},z=1;z<p;z++){M=!1;for(var K=0;K<m;K++){var B=h[K],me=B.source(),be=B.target(),xe=s(B),we=_(me),Re=_(be);q(me,0,B,we,Re,xe),o||q(be,0,B,Re,we,xe)}if(!M)break}if(M)for(var je=[],We=0;We<m;We++){var Pe=h[We],Fe=Pe.source(),lt=Pe.target(),mt=s(Pe),at=_(Fe).dist,bt=_(lt).dist;if(at+mt<bt||!o&&bt+mt<at){if(y||(Kr("Graph contains a negative weight cycle for Bellman-Ford"),y=!0),!1===e.findNegativeWeightCycles)break;var xt=[];at+mt<bt&&xt.push(Fe),!o&&bt+mt<at&&xt.push(lt);for(var Ut=xt.length,_t=0;_t<Ut;_t++){var Me=xt[_t],$e=[Me];$e.push(_(Me).edge);for(var Xe=_(Me).pred;-1===$e.indexOf(Xe);)$e.push(Xe),$e.push(_(Xe).edge),Xe=_(Xe).pred;for(var dt=($e=$e.slice($e.indexOf(Xe)))[0].id(),Lt=0,er=2;er<$e.length;er+=2)$e[er].id()<dt&&(dt=$e[er].id(),Lt=er);($e=$e.slice(Lt).concat($e.slice(0,Lt))).push($e[0]);var Mr=$e.map(function(gr){return gr.id()}).join(",");-1===je.indexOf(Mr)&&(v.push(l.spawn($e)),je.push(Mr))}}}return{distanceTo:function(lr){return _(I(lr)).dist},pathTo:function(lr){for(var ar=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,Gt=[],tr=I(lr);;){if(null==tr)return t.spawn();var vr=_(tr),ir=vr.edge,xr=vr.pred;if(Gt.unshift(tr[0]),tr.same(ar)&&Gt.length>0)break;null!=ir&&Gt.unshift(ir),tr=xr}return l.spawn(Gt)},hasNegativeWeightCycle:y,negativeWeightCycles:v}}},wz=Math.sqrt(2),_z=function(e,t,n){0===n.length&&bn("Karger-Stein must be run on a connected (sub)graph");for(var i=n[e],s=t[i[1]],l=t[i[2]],u=n,c=u.length-1;c>=0;c--){var h=u[c],d=h[1],p=h[2];(t[d]===s&&t[p]===l||t[d]===l&&t[p]===s)&&u.splice(c,1)}for(var g=0;g<u.length;g++){var y=u[g];y[1]===l?(u[g]=y.slice(),u[g][1]=s):y[2]===l&&(u[g]=y.slice(),u[g][2]=s)}for(var v=0;v<t.length;v++)t[v]===l&&(t[v]=s);return u},Cb=function(e,t,n,i){for(;n>i;){var o=Math.floor(Math.random()*t.length);t=_z(o,e,t),n--}return t},bz={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,i=t.edges;i.unmergeBy(function(Re){return Re.isLoop()});var o=n.length,a=i.length,s=Math.ceil(Math.pow(Math.log(o)/Math.LN2,2)),l=Math.floor(o/wz);if(!(o<2)){for(var u=[],c=0;c<a;c++){var h=i[c];u.push([c,n.indexOf(h.source()),n.indexOf(h.target())])}for(var d=1/0,p=[],g=new Array(o),y=new Array(o),v=new Array(o),m=function(je,We){for(var Pe=0;Pe<o;Pe++)We[Pe]=je[Pe]},_=0;_<=s;_++){for(var I=0;I<o;I++)y[I]=I;var U=Cb(y,u.slice(),o,l),ne=U.slice();m(y,v);var re=Cb(y,U,l,2),A=Cb(v,ne,l,2);re.length<=A.length&&re.length<d?(d=re.length,p=re,m(y,g)):A.length<=re.length&&A.length<d&&(d=A.length,p=A,m(v,g))}for(var C=this.spawn(p.map(function(Re){return i[Re[0]]})),M=this.spawn(),q=this.spawn(),z=g[0],K=0;K<g.length;K++){var me=n[K];g[K]===z?M.merge(me):q.merge(me)}var be=function(je){var We=e.spawn();return je.forEach(function(Pe){We.merge(Pe),Pe.connectedEdges().forEach(function(Fe){e.contains(Fe)&&!C.contains(Fe)&&We.merge(Fe)})}),We},xe=[be(M),be(q)];return{cut:C,components:xe,partition1:M,partition2:q}}bn("At least 2 nodes are required for Karger-Stein algorithm")}},_p=function(e,t,n){return{x:e.x*t+n.x,y:e.y*t+n.y}},JS=function(e,t,n){return{x:(e.x-n.x)/t,y:(e.y-n.y)/t}},Nu=function(e){return{x:e[0],y:e[1]}},bp=function(e,t){return Math.atan2(t,e)-Math.PI/2},kb=Math.log2||function(r){return Math.log(r)/Math.log(2)},Db=function(e){return e>0?1:e<0?-1:0},gl=function(e,t){return Math.sqrt(ml(e,t))},ml=function(e,t){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i},Sz=function(e){for(var t=e.length,n=0,i=0;i<t;i++)n+=e[i];for(var o=0;o<t;o++)e[o]=e[o]/n;return e},di=function(e,t,n,i){return(1-i)*(1-i)*e+2*(1-i)*i*t+i*i*n},Ou=function(e,t,n,i){return{x:di(e.x,t.x,n.x,i),y:di(e.y,t.y,n.y,i)}},zh=function(e,t,n){return Math.max(e,Math.min(n,t))},Ki=function(e){if(null==e)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=e.x1&&null!=e.y1){if(null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Dz=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},ZS=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Ep=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Tp=function(e){var n,i,o,a,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===t.length)n=i=o=a=t[0];else if(2===t.length)n=o=t[0],a=i=t[1];else if(4===t.length){var s=Wn(t,4);n=s[0],i=s[1],o=s[2],a=s[3]}return e.x1-=a,e.x2+=i,e.y1-=n,e.y2+=o,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},eC=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Nb=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2<t.x1||t.x2<e.x1||e.y2<t.y1||t.y2<e.y1||e.y1>t.y2||t.y1>e.y2)},ps=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},tC=function(e,t){return ps(e,t.x,t.y)},rC=function(e,t){return ps(e,t.x1,t.y1)&&ps(e,t.x2,t.y2)},Nz=null!==(Pb=Math.hypot)&&void 0!==Pb?Pb:function(r,e){return Math.sqrt(r*r+e*e)};var nC=function(e,t,n,i,o,a,s){var g,be,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",u="auto"===l?ms(o,a):l,c=o/2,h=a/2,d=(u=Math.min(u,c,h))!==c,p=u!==h;if(d){var v=i-h-s;if((g=gs(e,t,n,i,n-c+u-s,v,n+c-u+s,v,!1)).length>0)return g}if(p){var I=n+c+s;if((g=gs(e,t,n,i,I,i-h+u-s,I,i+h-u+s,!1)).length>0)return g}if(d){var C=i+h+s;if((g=gs(e,t,n,i,n-c+u-s,C,n+c-u+s,C,!1)).length>0)return g}if(p){var z=n-c-s;if((g=gs(e,t,n,i,z,i-h+u-s,z,i+h-u+s,!1)).length>0)return g}var xe=n-c+u,we=i-h+u;if((be=Gh(e,t,n,i,xe,we,u+s)).length>0&&be[0]<=xe&&be[1]<=we)return[be[0],be[1]];var Re=n+c-u,je=i-h+u;if((be=Gh(e,t,n,i,Re,je,u+s)).length>0&&be[0]>=Re&&be[1]<=je)return[be[0],be[1]];var We=n+c-u,Pe=i+h-u;if((be=Gh(e,t,n,i,We,Pe,u+s)).length>0&&be[0]>=We&&be[1]>=Pe)return[be[0],be[1]];var Fe=n-c+u,lt=i+h-u;return(be=Gh(e,t,n,i,Fe,lt,u+s)).length>0&&be[0]<=Fe&&be[1]>=lt?[be[0],be[1]]:[]},Mz=function(e,t,n,i,o,a,s){var l=s,u=Math.min(n,o),c=Math.max(n,o),h=Math.min(i,a),d=Math.max(i,a);return u-l<=e&&e<=c+l&&h-l<=t&&t<=d+l},Fz=function(e,t,n,i,o,a,s,l,u){var c_x1=Math.min(n,s,o)-u,c_x2=Math.max(n,s,o)+u,c_y1=Math.min(i,l,a)-u,c_y2=Math.max(i,l,a)+u;return!(e<c_x1||e>c_x2||t<c_y1||t>c_y2)},Uz=function(e,t,n,i,o,a,s,l){var p=[];!function(e,t,n,i,o){var s,l,u,c,h,d,p,g;0===e&&(e=1e-5),u=-27*(i/=e)+(t/=e)*(9*(n/=e)-t*t*2),s=(l=(3*n-t*t)/9)*l*l+(u/=54)*u,o[1]=0,p=t/3,s>0?(h=(h=u+Math.sqrt(s))<0?-Math.pow(-h,1/3):Math.pow(h,1/3),d=(d=u-Math.sqrt(s))<0?-Math.pow(-d,1/3):Math.pow(d,1/3),o[0]=-p+h+d,o[4]=o[2]=-(p+=(h+d)/2),p=Math.sqrt(3)*(-d+h)/2,o[3]=p,o[5]=-p):(o[5]=o[3]=0,0===s?(g=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),o[0]=2*g-p,o[4]=o[2]=-(g+p)):(c=(l=-l)*l*l,c=Math.acos(u/Math.sqrt(c)),g=2*Math.sqrt(l),o[0]=-p+g*Math.cos(c/3),o[2]=-p+g*Math.cos((c+2*Math.PI)/3),o[4]=-p+g*Math.cos((c+4*Math.PI)/3)))}(1*n*n-4*n*o+2*n*s+4*o*o-4*o*s+s*s+i*i-4*i*a+2*i*l+4*a*a-4*a*l+l*l,9*n*o-3*n*n-3*n*s-6*o*o+3*o*s+9*i*a-3*i*i-3*i*l-6*a*a+3*a*l,3*n*n-6*n*o+n*s-n*e+2*o*o+2*o*e-s*e+3*i*i-6*i*a+i*l-i*t+2*a*a+2*a*t-l*t,1*n*o-n*n+n*e-o*e+i*a-i*i+i*t-a*t,p);for(var y=[],v=0;v<6;v+=2)Math.abs(p[v+1])<1e-7&&p[v]>=0&&p[v]<=1&&y.push(p[v]);y.push(1),y.push(0);for(var _,I,U,m=-1,ne=0;ne<y.length;ne++)_=Math.pow(1-y[ne],2)*n+2*(1-y[ne])*y[ne]*o+y[ne]*y[ne]*s,I=Math.pow(1-y[ne],2)*i+2*(1-y[ne])*y[ne]*a+y[ne]*y[ne]*l,U=Math.pow(_-e,2)+Math.pow(I-t,2),m>=0?U<m&&(m=U):m=U;return m},zz=function(e,t,n,i,o,a){var s=[e-n,t-i],l=[o-n,a-i],u=l[0]*l[0]+l[1]*l[1],c=s[0]*s[0]+s[1]*s[1],h=s[0]*l[0]+s[1]*l[1],d=h*h/u;return h<0?c:d>u?(e-o)*(e-o)+(t-a)*(t-a):c-d},oo=function(e,t,n){for(var i,o,a,s,u=0,c=0;c<n.length/2;c++)if(o=n[2*c+1],c+1<n.length/2?(a=n[2*(c+1)],s=n[2*(c+1)+1]):(a=n[2*(c+1-n.length/2)],s=n[2*(c+1-n.length/2)+1]),(i=n[2*c])!=e||a!=e){if(!(i>=e&&e>=a||i<=e&&e<=a))continue;(e-i)/(a-i)*(s-o)+o>t&&u++}return u%2!=0},ka=function(e,t,n,i,o,a,s,l,u){var h,y,c=new Array(n.length);null!=l[0]?(h=Math.atan(l[1]/l[0]),l[0]<0?h+=Math.PI/2:h=-h-Math.PI/2):h=l;for(var d=Math.cos(-h),p=Math.sin(-h),g=0;g<c.length/2;g++)c[2*g]=a/2*(n[2*g]*d-n[2*g+1]*p),c[2*g+1]=s/2*(n[2*g+1]*d+n[2*g]*p),c[2*g]+=i,c[2*g+1]+=o;if(u>0){var v=xp(c,-u);y=Ip(v)}else y=c;return oo(e,t,y)},Ip=function(e){for(var s,l,u,c,t=new Array(e.length/2),h=0;h<e.length/4;h++){h<e.length/4-1?(s=e[4*(h+1)],l=e[4*(h+1)+1],u=e[4*(h+1)+2],c=e[4*(h+1)+3]):(s=e[0],l=e[1],u=e[2],c=e[3]);var d=gs(e[4*h],e[4*h+1],e[4*h+2],e[4*h+3],s,l,u,c,!0);t[2*h]=d[0],t[2*h+1]=d[1]}return t},xp=function(e,t){for(var i,o,a,s,n=new Array(2*e.length),l=0;l<e.length/2;l++){l<e.length/2-1?(a=e[2*(l+1)],s=e[2*(l+1)+1]):(a=e[0],s=e[1]);var u=s-(o=e[2*l+1]),c=-(a-(i=e[2*l])),h=Math.sqrt(u*u+c*c),d=u/h,p=c/h;n[4*l]=i+d*t,n[4*l+1]=o+p*t,n[4*l+2]=a+d*t,n[4*l+3]=s+p*t}return n},vl=function(e,t,n,i,o,a,s){return e-=o,t-=a,(e/=n/2+s)*e+(t/=i/2+s)*t<=1},Gh=function(e,t,n,i,o,a,s){var l=[n-e,i-t],u=[e-o,t-a],c=l[0]*l[0]+l[1]*l[1],h=2*(u[0]*l[0]+u[1]*l[1]),p=h*h-4*c*(u[0]*u[0]+u[1]*u[1]-s*s);if(p<0)return[];var g=(-h+Math.sqrt(p))/(2*c),y=(-h-Math.sqrt(p))/(2*c),v=Math.min(g,y),m=Math.max(g,y),_=[];if(v>=0&&v<=1&&_.push(v),m>=0&&m<=1&&_.push(m),0===_.length)return[];var I=_[0]*l[0]+e,U=_[0]*l[1]+t;return _.length>1?_[0]==_[1]?[I,U]:[I,U,_[1]*l[0]+e,_[1]*l[1]+t]:[I,U]},Ob=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},gs=function(e,t,n,i,o,a,s,l,u){var c=e-o,h=n-e,d=s-o,p=t-a,g=i-t,y=l-a,v=d*p-y*c,m=h*p-g*c,_=y*h-d*g;if(0!==_){var I=v/_,U=m/_;return-.001<=I&&I<=1.001&&-.001<=U&&U<=1.001||u?[e+I*h,t+I*g]:[]}return 0===v||0===m?Ob(e,n,s)===s?[s,l]:Ob(e,n,o)===o?[o,a]:Ob(o,s,n)===n?[n,i]:[]:[]},jz=function(e,t,n,i,o){var a=[],s=i/2,l=o/2,u=t,c=n;a.push({x:u+s*e[0],y:c+l*e[1]});for(var h=1;h<e.length/2;h++)a.push({x:u+s*e[2*h],y:c+l*e[2*h+1]});return a},qh=function(e,t,n,i,o,a,s,l){var c,p,u=[],h=new Array(n.length),d=!0;if(null==a&&(d=!1),d){for(var g=0;g<h.length/2;g++)h[2*g]=n[2*g]*a+i,h[2*g+1]=n[2*g+1]*s+o;if(l>0){var y=xp(h,-l);p=Ip(y)}else p=h}else p=n;for(var _,I,U=0;U<p.length/2;U++)U<p.length/2-1?(_=p[2*(U+1)],I=p[2*(U+1)+1]):(_=p[0],I=p[1]),0!==(c=gs(e,t,i,o,p[2*U],p[2*U+1],_,I)).length&&u.push(c[0],c[1]);return u},Ap=function(e,t,n){var i=[e[0]-t[0],e[1]-t[1]],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]),a=(o-n)/o;return a<0&&(a=1e-5),[t[0]+a*i[0],t[1]+a*i[1]]},Xi=function(e,t){var n=Lb(e,t);return iC(n)},iC=function(e){for(var t,n,i=e.length/2,o=1/0,a=1/0,s=-1/0,l=-1/0,u=0;u<i;u++)t=e[2*u],n=e[2*u+1],o=Math.min(o,t),s=Math.max(s,t),a=Math.min(a,n),l=Math.max(l,n);for(var c=2/(s-o),h=2/(l-a),d=0;d<i;d++)t=e[2*d]=e[2*d]*c,n=e[2*d+1]=e[2*d+1]*h,o=Math.min(o,t),s=Math.max(s,t),a=Math.min(a,n),l=Math.max(l,n);if(a<-1)for(var p=0;p<i;p++)n=e[2*p+1]=e[2*p+1]+(-1-a);return e},Lb=function(e,t){var n=1/e*2*Math.PI,i=e%2==0?Math.PI/2+n/2:Math.PI/2;i+=t;for(var a,o=new Array(2*e),s=0;s<e;s++)a=s*n+i,o[2*s]=Math.cos(a),o[2*s+1]=Math.sin(-a);return o},ms=function(e,t){return Math.min(e/4,t/4,8)},oC=function(e,t){return Math.min(e/10,t/10,8)},Fb=function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}};function Vb(r,e){function t(h){for(var d=[],p=0;p<h.length;p++){var g=h[p],y=h[(p+1)%h.length],v={x:y.x-g.x,y:y.y-g.y},m={x:-v.y,y:v.x},_=Math.sqrt(m.x*m.x+m.y*m.y);d.push({x:m.x/_,y:m.y/_})}return d}function n(h,d){var v,p=1/0,g=-1/0,y=no(h);try{for(y.s();!(v=y.n()).done;){var m=v.value,_=m.x*d.x+m.y*d.y;p=Math.min(p,_),g=Math.max(g,_)}}catch(I){y.e(I)}finally{y.f()}return{min:p,max:g}}function i(h,d){return!(h.max<d.min||d.max<h.min)}var s,a=no([].concat(cp(t(r)),cp(t(e))));try{for(a.s();!(s=a.n()).done;){var l=s.value;if(!i(n(r,l),n(e,l)))return!1}}catch(h){a.e(h)}finally{a.f()}return!0}var Wz=Ei({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),Kz={pageRank:function(e){for(var t=Wz(e),n=t.dampingFactor,i=t.precision,o=t.iterations,a=t.weight,s=this._private.cy,l=this.byGroup(),u=l.nodes,c=l.edges,h=u.length,p=c.length,g=new Array(h*h),y=new Array(h),v=(1-n)/h,m=0;m<h;m++){for(var _=0;_<h;_++)g[m*h+_]=0;y[m]=0}for(var U=0;U<p;U++){var ne=c[U],re=ne.data("source"),A=ne.data("target");if(re!==A){var C=u.indexOfId(re),M=u.indexOfId(A),q=a(ne);g[M*h+C]+=q,y[C]+=q}}for(var K=1/h+v,B=0;B<h;B++)if(0===y[B])for(var me=0;me<h;me++)g[me*h+B]=K;else for(var xe=0;xe<h;xe++){var we=xe*h+B;g[we]=g[we]/y[B]+v}for(var We,Re=new Array(h),je=new Array(h),Pe=0;Pe<h;Pe++)Re[Pe]=1;for(var Fe=0;Fe<o;Fe++){for(var lt=0;lt<h;lt++)je[lt]=0;for(var mt=0;mt<h;mt++)for(var at=0;at<h;at++)je[mt]+=g[mt*h+at]*Re[at];Sz(je),We=Re,Re=je,je=We;for(var xt=0,Ut=0;Ut<h;Ut++){var _t=We[Ut]-Re[Ut];xt+=_t*_t}if(xt<i)break}return{rank:function(Xe){return Xe=s.collection(Xe)[0],Re[u.indexOf(Xe)]}}}},aC=Ei({root:null,weight:function(e){return 1},directed:!1,alpha:0}),Lu={degreeCentralityNormalized:function(e){e=aC(e);var t=this.cy(),n=this.nodes(),i=n.length;if(e.directed){for(var c={},h={},d=0,p=0,g=0;g<i;g++){var y=n[g],v=y.id();e.root=y;var m=this.degreeCentrality(e);d<m.indegree&&(d=m.indegree),p<m.outdegree&&(p=m.outdegree),c[v]=m.indegree,h[v]=m.outdegree}return{indegree:function(I){return 0==d?0:(sr(I)&&(I=t.filter(I)),c[I.id()]/d)},outdegree:function(I){return 0===p?0:(sr(I)&&(I=t.filter(I)),h[I.id()]/p)}}}for(var o={},a=0,s=0;s<i;s++){var l=n[s];e.root=l;var u=this.degreeCentrality(e);a<u.degree&&(a=u.degree),o[l.id()]=u.degree}return{degree:function(I){return 0===a?0:(sr(I)&&(I=t.filter(I)),o[I.id()]/a)}}},degreeCentrality:function(e){e=aC(e);var t=this.cy(),n=this,o=e.root,a=e.weight,s=e.directed,l=e.alpha;if(o=t.collection(o)[0],s){for(var p=o.connectedEdges(),g=p.filter(function(re){return re.target().same(o)&&n.has(re)}),y=p.filter(function(re){return re.source().same(o)&&n.has(re)}),v=g.length,m=y.length,_=0,I=0,U=0;U<g.length;U++)_+=a(g[U]);for(var ne=0;ne<y.length;ne++)I+=a(y[ne]);return{indegree:Math.pow(v,1-l)*Math.pow(_,l),outdegree:Math.pow(m,1-l)*Math.pow(I,l)}}for(var u=o.connectedEdges().intersection(n),c=u.length,h=0,d=0;d<u.length;d++)h+=a(u[d]);return{degree:Math.pow(c,1-l)*Math.pow(h,l)}}};Lu.dc=Lu.degreeCentrality,Lu.dcn=Lu.degreeCentralityNormalised=Lu.degreeCentralityNormalized;var sC=Ei({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Mu={closenessCentralityNormalized:function(e){for(var t=sC(e),n=t.harmonic,i=t.weight,o=t.directed,a=this.cy(),s={},l=0,u=this.nodes(),c=this.floydWarshall({weight:i,directed:o}),h=0;h<u.length;h++){for(var d=0,p=u[h],g=0;g<u.length;g++)if(h!==g){var y=c.distance(p,u[g]);d+=n?1/y:y}n||(d=1/d),l<d&&(l=d),s[p.id()]=d}return{closeness:function(m){return 0==l?0:(m=sr(m)?a.filter(m)[0].id():m.id(),s[m]/l)}}},closenessCentrality:function(e){var t=sC(e),n=t.root,i=t.weight,o=t.directed,a=t.harmonic;n=this.filter(n)[0];for(var s=this.dijkstra({root:n,weight:i,directed:o}),l=0,u=this.nodes(),c=0;c<u.length;c++){var h=u[c];if(!h.same(n)){var d=s.distanceTo(h);l+=a?1/d:d}}return a?l:1/l}};Mu.cc=Mu.closenessCentrality,Mu.ccn=Mu.closenessCentralityNormalised=Mu.closenessCentralityNormalized;var Xz=Ei({weight:null,directed:!1}),Bb={betweennessCentrality:function(e){for(var t=Xz(e),n=t.directed,i=t.weight,o=null!=i,a=this.cy(),s=this.nodes(),l={},u={},c=0,h={set:function(I,U){u[I]=U,U>c&&(c=U)},get:function(I){return u[I]}},d=0;d<s.length;d++){var p=s[d],g=p.id();l[g]=n?p.outgoers().nodes():p.openNeighborhood().nodes(),h.set(g,0)}for(var y=function(){for(var I=s[v].id(),U=[],ne={},re={},A={},C=new Uh(function(mt,at){return A[mt]-A[at]}),M=0;M<s.length;M++){var q=s[M].id();ne[q]=[],re[q]=0,A[q]=1/0}for(re[I]=1,A[I]=0,C.push(I);!C.empty();){var z=C.pop();if(U.push(z),o)for(var K=0;K<l[z].length;K++){var be,B=l[z][K],me=a.getElementById(z);be=me.edgesTo(B).length>0?me.edgesTo(B)[0]:B.edgesTo(me)[0];var xe=i(be);B=B.id(),A[B]>A[z]+xe&&(A[B]=A[z]+xe,C.nodes.indexOf(B)<0?C.push(B):C.updateItem(B),re[B]=0,ne[B]=[]),A[B]==A[z]+xe&&(re[B]=re[B]+re[z],ne[B].push(z))}else for(var we=0;we<l[z].length;we++){var Re=l[z][we].id();A[Re]==1/0&&(C.push(Re),A[Re]=A[z]+1),A[Re]==A[z]+1&&(re[Re]=re[Re]+re[z],ne[Re].push(z))}}for(var je={},We=0;We<s.length;We++)je[s[We].id()]=0;for(;U.length>0;){for(var Pe=U.pop(),Fe=0;Fe<ne[Pe].length;Fe++){var lt=ne[Pe][Fe];je[lt]=je[lt]+re[lt]/re[Pe]*(1+je[Pe])}Pe!=s[v].id()&&h.set(Pe,h.get(Pe)+je[Pe])}},v=0;v<s.length;v++)y();var m={betweenness:function(I){var U=a.collection(I).id();return h.get(U)},betweennessNormalized:function(I){if(0==c)return 0;var U=a.collection(I).id();return h.get(U)/c}};return m.betweennessNormalised=m.betweennessNormalized,m}};Bb.bc=Bb.betweennessCentrality;var Yz=Ei({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(r){return 1}]}),Jz=function(e,t){for(var n=0,i=0;i<t.length;i++)n+=t[i](e);return n},lC=function(e,t){for(var n,i=0;i<t;i++){n=0;for(var o=0;o<t;o++)n+=e[o*t+i];for(var a=0;a<t;a++)e[a*t+i]=e[a*t+i]/n}},e5=function(e,t,n){for(var i=new Array(n*n),o=0;o<n;o++){for(var a=0;a<n;a++)i[o*n+a]=0;for(var s=0;s<n;s++)for(var l=0;l<n;l++)i[o*n+l]+=e[o*n+s]*t[s*n+l]}return i},t5=function(e,t,n){for(var i=e.slice(0),o=1;o<n;o++)e=e5(e,i,t);return e},r5=function(e,t,n){for(var i=new Array(t*t),o=0;o<t*t;o++)i[o]=Math.pow(e[o],n);return lC(i,t),i},n5=function(e,t,n,i){for(var o=0;o<n;o++)if(Math.round(e[o]*Math.pow(10,i))/Math.pow(10,i)!==Math.round(t[o]*Math.pow(10,i))/Math.pow(10,i))return!1;return!0},o5=function(e,t){for(var n=0;n<e.length;n++)if(!t[n]||e[n].id()!==t[n].id())return!1;return!0},uC=function(e){for(var t=this.nodes(),n=this.edges(),i=this.cy(),o=function(e){return Yz(e)}(e),a={},s=0;s<t.length;s++)a[t[s].id()]=s;for(var h,l=t.length,u=l*l,c=new Array(u),d=0;d<u;d++)c[d]=0;for(var p=0;p<n.length;p++){var g=n[p],y=a[g.source().id()],v=a[g.target().id()],m=Jz(g,o.attributes);c[y*l+v]+=m,c[v*l+y]+=m}(function(e,t,n){for(var i=0;i<t;i++)e[i*t+i]=n})(c,l,o.multFactor),lC(c,l);for(var _=!0,I=0;_&&I<o.maxIterations;)_=!1,h=t5(c,l,o.expandFactor),c=r5(h,l,o.inflateFactor),n5(c,h,u,4)||(_=!0),I++;var U=function(e,t,n,i){for(var o=[],a=0;a<t;a++){for(var s=[],l=0;l<t;l++)Math.round(1e3*e[a*t+l])/1e3>0&&s.push(n[l]);0!==s.length&&o.push(i.collection(s))}return o}(c,l,t,i);return U=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e.length;n++)t!=n&&o5(e[t],e[n])&&e.splice(n,1);return e}(U),U},s5={markovClustering:uC,mcl:uC},l5=function(e){return e},cC=function(e,t){return Math.abs(t-e)},hC=function(e,t,n){return e+cC(t,n)},dC=function(e,t,n){return e+Math.pow(n-t,2)},u5=function(e){return Math.sqrt(e)},c5=function(e,t,n){return Math.max(e,cC(t,n))},jh=function(e,t,n,i,o){for(var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:l5,s=i,c=0;c<e;c++)s=o(s,t(c),n(c));return a(s)},Fu={euclidean:function(e,t,n){return e>=2?jh(e,t,n,0,dC,u5):jh(e,t,n,0,hC)},squaredEuclidean:function(e,t,n){return jh(e,t,n,0,dC)},manhattan:function(e,t,n){return jh(e,t,n,0,hC)},max:function(e,t,n){return jh(e,t,n,-1/0,c5)}};function Rp(r,e,t,n,i,o){var a;return a=xn(r)?r:Fu[r]||Fu.euclidean,0===e&&xn(r)?a(i,o):a(e,t,n,i,o)}Fu["squared-euclidean"]=Fu.squaredEuclidean,Fu.squaredeuclidean=Fu.squaredEuclidean;var h5=Ei({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Ub=function(e){return h5(e)},Sp=function(e,t,n,i,o){var s="kMedoids"!==o?function(h){return n[h]}:function(h){return i[h](n)};return Rp(e,i.length,s,function(d){return i[d](t)},n,t)},zb=function(e,t,n){for(var i=n.length,o=new Array(i),a=new Array(i),s=new Array(t),l=null,u=0;u<i;u++)o[u]=e.min(n[u]).value,a[u]=e.max(n[u]).value;for(var c=0;c<t;c++){l=[];for(var h=0;h<i;h++)l[h]=Math.random()*(a[h]-o[h])+o[h];s[c]=l}return s},fC=function(e,t,n,i,o){for(var a=1/0,s=0,l=0;l<t.length;l++){var u=Sp(n,e,t[l],i,o);u<a&&(a=u,s=l)}return s},pC=function(e,t,n){for(var i=[],o=null,a=0;a<t.length;a++)n[(o=t[a]).id()]===e&&i.push(o);return i},d5=function(e,t,n){return Math.abs(t-e)<=n},f5=function(e,t,n){for(var i=0;i<e.length;i++)for(var o=0;o<e[i].length;o++)if(Math.abs(e[i][o]-t[i][o])>n)return!1;return!0},p5=function(e,t,n){for(var i=0;i<n;i++)if(e===t[i])return!0;return!1},gC=function(e,t){var n=new Array(t);if(e.length<50)for(var i=0;i<t;i++){for(var o=e[Math.floor(Math.random()*e.length)];p5(o,n,i);)o=e[Math.floor(Math.random()*e.length)];n[i]=o}else for(var a=0;a<t;a++)n[a]=e[Math.floor(Math.random()*e.length)];return n},mC=function(e,t,n){for(var i=0,o=0;o<t.length;o++)i+=Sp("manhattan",t[o],e,n,"kMedoids");return i},v5=function(e,t,n,i,o){for(var a,s,l=0;l<t.length;l++)for(var u=0;u<e.length;u++)i[l][u]=Math.pow(n[l][u],o.m);for(var c=0;c<e.length;c++)for(var h=0;h<o.attributes.length;h++){a=0,s=0;for(var d=0;d<t.length;d++)a+=i[d][c]*o.attributes[h](t[d]),s+=i[d][c];e[c][h]=a/s}},y5=function(e,t,n,i,o){for(var a=0;a<e.length;a++)t[a]=e[a].slice();for(var s,l,u,c=2/(o.m-1),h=0;h<n.length;h++)for(var d=0;d<i.length;d++){s=0;for(var p=0;p<n.length;p++)l=Sp(o.distance,i[d],n[h],o.attributes,"cmeans"),u=Sp(o.distance,i[d],n[p],o.attributes,"cmeans"),s+=Math.pow(l/u,c);e[d][h]=1/s}},vC=function(e){var o,a,s,l,u,t=this.cy(),n=this.nodes(),i=Ub(e);l=new Array(n.length);for(var c=0;c<n.length;c++)l[c]=new Array(i.k);s=new Array(n.length);for(var h=0;h<n.length;h++)s[h]=new Array(i.k);for(var d=0;d<n.length;d++){for(var p=0,g=0;g<i.k;g++)s[d][g]=Math.random(),p+=s[d][g];for(var y=0;y<i.k;y++)s[d][y]=s[d][y]/p}a=new Array(i.k);for(var v=0;v<i.k;v++)a[v]=new Array(i.attributes.length);u=new Array(n.length);for(var m=0;m<n.length;m++)u[m]=new Array(i.k);for(var _=!0,I=0;_&&I<i.maxIterations;)_=!1,v5(a,n,s,u,i),y5(s,l,a,n,i),f5(s,l,i.sensitivityThreshold)||(_=!0),I++;return o=function(e,t,n,i){for(var o=new Array(n.k),a=0;a<o.length;a++)o[a]=[];for(var s,l,u=0;u<t.length;u++){s=-1/0,l=-1;for(var c=0;c<t[0].length;c++)t[u][c]>s&&(s=t[u][c],l=c);o[l].push(e[u])}for(var h=0;h<o.length;h++)o[h]=i.collection(o[h]);return o}(n,s,i,t),{clusters:o,degreeOfMembership:s}},_5={kMeans:function(e){var l,t=this.cy(),n=this.nodes(),i=null,o=Ub(e),a=new Array(o.k),s={};l=o.testMode?"number"==typeof o.testCentroids?zb(n,o.k,o.attributes):"object"===ei(o.testCentroids)?o.testCentroids:zb(n,o.k,o.attributes):zb(n,o.k,o.attributes);for(var u=!0,c=0;u&&c<o.maxIterations;){for(var h=0;h<n.length;h++)s[(i=n[h]).id()]=fC(i,l,o.distance,o.attributes,"kMeans");u=!1;for(var d=0;d<o.k;d++){var p=pC(d,n,s);if(0!==p.length){for(var g=o.attributes.length,y=l[d],v=new Array(g),m=new Array(g),_=0;_<g;_++){m[_]=0;for(var I=0;I<p.length;I++)m[_]+=o.attributes[_](i=p[I]);v[_]=m[_]/p.length,d5(v[_],y[_],o.sensitivityThreshold)||(u=!0)}l[d]=v,a[d]=t.collection(p)}}c++}return a},kMedoids:function(e){var s,u,t=this.cy(),n=this.nodes(),i=null,o=Ub(e),a=new Array(o.k),l={},c=new Array(o.k);o.testMode?"number"==typeof o.testCentroids||(s="object"===ei(o.testCentroids)?o.testCentroids:gC(n,o.k)):s=gC(n,o.k);for(var h=!0,d=0;h&&d<o.maxIterations;){for(var p=0;p<n.length;p++)l[(i=n[p]).id()]=fC(i,s,o.distance,o.attributes,"kMedoids");h=!1;for(var g=0;g<s.length;g++){var y=pC(g,n,l);if(0!==y.length){c[g]=mC(s[g],y,o.attributes);for(var v=0;v<y.length;v++)(u=mC(y[v],y,o.attributes))<c[g]&&(c[g]=u,s[g]=y[v],h=!0);a[g]=t.collection(y)}}d++}return a},fuzzyCMeans:vC,fcm:vC},b5=Ei({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),E5={single:"min",complete:"max"},yC=function(e,t,n,i,o){for(var l,a=0,s=1/0,u=o.attributes,c=function(M,q){return Rp(o.distance,u.length,function(z){return u[z](M)},function(z){return u[z](q)},M,q)},h=0;h<e.length;h++){var d=e[h].key,p=n[d][i[d]];p<s&&(a=d,s=p)}if("threshold"===o.mode&&s>=o.threshold||"dendrogram"===o.mode&&1===e.length)return!1;var v,g=t[a],y=t[i[a]];v="dendrogram"===o.mode?{left:g,right:y,key:g.key}:{value:g.value.concat(y.value),key:g.key},e[g.index]=v,e.splice(y.index,1),t[g.key]=v;for(var m=0;m<e.length;m++){var _=e[m];g.key===_.key?l=1/0:"min"===o.linkage?(l=n[g.key][_.key],n[g.key][_.key]>n[y.key][_.key]&&(l=n[y.key][_.key])):"max"===o.linkage?(l=n[g.key][_.key],n[g.key][_.key]<n[y.key][_.key]&&(l=n[y.key][_.key])):l="mean"===o.linkage?(n[g.key][_.key]*g.size+n[y.key][_.key]*y.size)/(g.size+y.size):"dendrogram"===o.mode?c(_.value,g.value):c(_.value[0],g.value[0]),n[g.key][_.key]=n[_.key][g.key]=l}for(var I=0;I<e.length;I++){var U=e[I].key;if(i[U]===g.key||i[U]===y.key){for(var ne=U,re=0;re<e.length;re++){var A=e[re].key;n[U][A]<n[U][ne]&&(ne=A)}i[U]=ne}e[I].index=I}return g.key=y.key=g.index=y.index=null,!0},Vu=function(e,t,n){e&&(e.value?t.push(e.value):(e.left&&Vu(e.left,t),e.right&&Vu(e.right,t)))},Gb=function(e,t){if(!e)return"";if(e.left&&e.right){var n=Gb(e.left,t),i=Gb(e.right,t),o=t.add({group:"nodes",data:{id:n+","+i}});return t.add({group:"edges",data:{source:n,target:o.id()}}),t.add({group:"edges",data:{source:i,target:o.id()}}),o.id()}return e.value?e.value.id():void 0},qb=function(e,t,n){if(!e)return[];var i=[],o=[],a=[];return 0===t?(e.left&&Vu(e.left,i),e.right&&Vu(e.right,o),a=i.concat(o),[n.collection(a)]):1===t?e.value?[n.collection(e.value)]:(e.left&&Vu(e.left,i),e.right&&Vu(e.right,o),[n.collection(i),n.collection(o)]):e.value?[n.collection(e.value)]:(e.left&&(i=qb(e.left,t-1,n)),e.right&&(o=qb(e.right,t-1,n)),i.concat(o))},wC=function(e){for(var t=this.cy(),n=this.nodes(),i=function(e){var t=b5(e),n=E5[t.linkage];return null!=n&&(t.linkage=n),t}(e),o=i.attributes,a=function(I,U){return Rp(i.distance,o.length,function(ne){return o[ne](I)},function(ne){return o[ne](U)},I,U)},s=[],l=[],u=[],c=[],h=0;h<n.length;h++){var d={value:"dendrogram"===i.mode?n[h]:[n[h]],key:h,index:h};s[h]=d,c[h]=d,l[h]=[],u[h]=0}for(var p=0;p<s.length;p++)for(var g=0;g<=p;g++){var y;y="dendrogram"===i.mode?p===g?1/0:a(s[p].value,s[g].value):p===g?1/0:a(s[p].value[0],s[g].value[0]),l[p][g]=y,l[g][p]=y,y<l[p][u[p]]&&(u[p]=g)}for(var v=yC(s,c,l,u,i);v;)v=yC(s,c,l,u,i);var m;return"dendrogram"===i.mode?(m=qb(s[0],i.dendrogramDepth,t),i.addDendrogram&&Gb(s[0],t)):(m=new Array(s.length),s.forEach(function(_,I){_.key=_.index=null,m[I]=t.collection(_.value)})),m},I5={hierarchicalClustering:wC,hca:wC},x5=Ei({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),R5=function(e,t,n,i){var o=function(s,l){return i[l](s)};return-Rp(e,i.length,function(a){return o(t,a)},function(a){return o(n,a)},t,n)},_C=function(e,t,n){for(var i=[],o=0;o<e;o++){for(var a=-1,s=-1/0,l=0;l<n.length;l++){var u=n[l];t[o*e+u]>s&&(a=u,s=t[o*e+u])}a>0&&i.push(a)}for(var c=0;c<n.length;c++)i[n[c]]=n[c];return i},bC=function(e){for(var t=this.cy(),n=this.nodes(),i=function(e){var t=e.damping,n=e.preference;.5<=t&&t<1||bn("Damping must range on [0.5, 1). Got: ".concat(t));var i=["median","mean","min","max"];return i.some(function(o){return o===n})||Bt(n)||bn("Preference must be one of [".concat(i.map(function(o){return"'".concat(o,"'")}).join(", "),"] or a number. Got: ").concat(n)),x5(e)}(e),o={},a=0;a<n.length;a++)o[n[a].id()]=a;var s,l,u,c,h,d,M;l=(s=n.length)*s,u=new Array(l);for(var p=0;p<l;p++)u[p]=-1/0;for(var g=0;g<s;g++)for(var y=0;y<s;y++)g!==y&&(u[g*s+y]=R5(i.distance,n[g],n[y],i.attributes));c=function(e,t){var n;return n="median"===t?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n<e.length&&e.splice(n,e.length-n),t>0&&e.splice(0,t)):e=e.slice(t,n);for(var s=0,l=e.length-1;l>=0;l--)a?isFinite(e[l])||(e[l]=-1/0,s++):e.splice(l,1);o&&e.sort(function(d,p){return d-p});var c=e.length,h=Math.floor(c/2);return c%2!=0?e[h+1+s]:(e[h-1+s]+e[h+s])/2}(e):"mean"===t?function(e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,i=0,o=0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a<n;a++){var s=e[a];isFinite(s)&&(i+=s,o++)}return i/o}(e):"min"===t?function(e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,i=1/0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;o<n;o++){var a=e[o];isFinite(a)&&(i=Math.min(a,i))}return i}(e):"max"===t?function(e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,i=-1/0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;o<n;o++){var a=e[o];isFinite(a)&&(i=Math.max(a,i))}return i}(e):t,n}(u,i.preference);for(var v=0;v<s;v++)u[v*s+v]=c;h=new Array(l);for(var m=0;m<l;m++)h[m]=0;d=new Array(l);for(var _=0;_<l;_++)d[_]=0;for(var I=new Array(s),U=new Array(s),ne=new Array(s),re=0;re<s;re++)I[re]=0,U[re]=0,ne[re]=0;for(var A=new Array(s*i.minIterations),C=0;C<A.length;C++)A[C]=0;for(M=0;M<i.maxIterations;M++){for(var q=0;q<s;q++){for(var z=-1/0,K=-1/0,B=-1,me=0,be=0;be<s;be++)I[be]=h[q*s+be],(me=d[q*s+be]+u[q*s+be])>=z?(K=z,z=me,B=be):me>K&&(K=me);for(var xe=0;xe<s;xe++)h[q*s+xe]=(1-i.damping)*(u[q*s+xe]-z)+i.damping*I[xe];h[q*s+B]=(1-i.damping)*(u[q*s+B]-K)+i.damping*I[B]}for(var we=0;we<s;we++){for(var Re=0,je=0;je<s;je++)I[je]=d[je*s+we],U[je]=Math.max(0,h[je*s+we]),Re+=U[je];Re-=U[we],U[we]=h[we*s+we],Re+=U[we];for(var We=0;We<s;We++)d[We*s+we]=(1-i.damping)*Math.min(0,Re-U[We])+i.damping*I[We];d[we*s+we]=(1-i.damping)*(Re-U[we])+i.damping*I[we]}for(var Pe=0,Fe=0;Fe<s;Fe++){var lt=d[Fe*s+Fe]+h[Fe*s+Fe]>0?1:0;A[M%i.minIterations*s+Fe]=lt,Pe+=lt}if(Pe>0&&(M>=i.minIterations-1||M==i.maxIterations-1)){for(var mt=0,at=0;at<s;at++){ne[at]=0;for(var bt=0;bt<i.minIterations;bt++)ne[at]+=A[bt*s+at];(0===ne[at]||ne[at]===i.minIterations)&&mt++}if(mt===s)break}}for(var xt=function(e,t,n){for(var i=[],o=0;o<e;o++)t[o*e+o]+n[o*e+o]>0&&i.push(o);return i}(s,h,d),Ut=function(e,t,n){for(var i=_C(e,t,n),o=0;o<n.length;o++){for(var a=[],s=0;s<i.length;s++)i[s]===n[o]&&a.push(s);for(var l=-1,u=-1/0,c=0;c<a.length;c++){for(var h=0,d=0;d<a.length;d++)h+=t[a[d]*e+a[c]];h>u&&(l=c,u=h)}n[o]=a[l]}return _C(e,t,n)}(s,u,xt),_t={},Me=0;Me<xt.length;Me++)_t[xt[Me]]=[];for(var $e=0;$e<n.length;$e++){var dt=Ut[o[n[$e].id()]];null!=dt&&_t[dt].push(n[$e])}for(var Lt=new Array(xt.length),er=0;er<xt.length;er++)Lt[er]=t.collection(_t[xt[er]]);return Lt},k5={affinityPropagation:bC,ap:bC},D5=Ei({root:void 0,directed:!1}),N5={hierholzer:function(e){if(!Ur(e)){var t=arguments;e={root:t[0],directed:t[1]}}var l,u,c,n=D5(e),i=n.root,o=n.directed,a=this,s=!1;i&&(c=sr(i)?this.filter(i)[0].id():i[0].id());var h={},d={};a.forEach(o?function(_){var I=_.id();if(_.isNode()){var U=_.indegree(!0),ne=_.outdegree(!0),re=U-ne,A=ne-U;1==re?l?s=!0:l=I:1==A?u?s=!0:u=I:(A>1||re>1)&&(s=!0),h[I]=[],_.outgoers().forEach(function(C){C.isEdge()&&h[I].push(C.id())})}else d[I]=[void 0,_.target().id()]}:function(_){var I=_.id();_.isNode()?(_.degree(!0)%2&&(l?u?s=!0:u=I:l=I),h[I]=[],_.connectedEdges().forEach(function(ne){return h[I].push(ne.id())})):d[I]=[_.source().id(),_.target().id()]});var p={found:!1,trail:void 0};if(s)return p;if(u&&l)if(o){if(c&&u!=c)return p;c=u}else{if(c&&u!=c&&l!=c)return p;c||(c=u)}else c||(c=a[0].id());var g=function(I){for(var re,A,C,U=I,ne=[I];h[U].length;)re=h[U].shift(),A=d[re][0],U!=(C=d[re][1])?(h[C]=h[C].filter(function(M){return M!=re}),U=C):!o&&U!=A&&(h[A]=h[A].filter(function(M){return M!=re}),U=A),ne.unshift(re),ne.unshift(U);return ne},y=[],v=[];for(v=g(c);1!=v.length;)0==h[v[0]].length?(y.unshift(a.getElementById(v.shift())),y.unshift(a.getElementById(v.shift()))):v=g(v.shift()).concat(v);for(var m in y.unshift(a.getElementById(v.shift())),h)if(h[m].length)return p;return p.found=!0,p.trail=this.spawn(y,!0),p}},Cp=function(){var e=this,t={},n=0,i=0,o=[],a=[],s={},u=function(d,p,g){d===g&&(i+=1),t[p]={id:n,low:n++,cutVertex:!1};var v,m,_,I,y=e.getElementById(p).connectedEdges().intersection(e);0===y.size()?o.push(e.spawn(e.getElementById(p))):y.forEach(function(U){v=U.source().id(),m=U.target().id(),(_=v===p?m:v)!==g&&(I=U.id(),s[I]||(s[I]=!0,a.push({x:p,y:_,edge:U})),_ in t?t[p].low=Math.min(t[p].low,t[_].id):(u(d,_,p),t[p].low=Math.min(t[p].low,t[_].low),t[p].id<=t[_].low&&(t[p].cutVertex=!0,function(d,p){for(var g=a.length-1,y=[],v=e.spawn();a[g].x!=d||a[g].y!=p;)y.push(a.pop().edge),g--;y.push(a.pop().edge),y.forEach(function(m){var _=m.connectedNodes().intersection(e);v.merge(m),_.forEach(function(I){var U=I.id(),ne=I.connectedEdges().intersection(e);v.merge(I),v.merge(t[U].cutVertex?ne.filter(function(re){return re.isLoop()}):ne)})}),o.push(v)}(p,_))))})};e.forEach(function(h){if(h.isNode()){var d=h.id();d in t||(i=0,u(d,d),t[d].cutVertex=i>1)}});var c=Object.keys(t).filter(function(h){return t[h].cutVertex}).map(function(h){return e.getElementById(h)});return{cut:e.spawn(c),components:o}},Pp=function(){var e=this,t={},n=0,i=[],o=[],a=e.spawn(e),s=function(u){if(o.push(u),t[u]={index:n,low:n++,explored:!1},e.getElementById(u).connectedEdges().intersection(e).forEach(function(y){var v=y.target().id();v!==u&&(v in t||s(v),t[v].explored||(t[u].low=Math.min(t[u].low,t[v].low)))}),t[u].index===t[u].low){for(var h=e.spawn();;){var d=o.pop();if(h.merge(e.getElementById(d)),t[d].low=t[u].index,t[d].explored=!0,d===u)break}var p=h.edgesWith(h),g=h.merge(p);i.push(g),a=a.difference(g)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in t||s(u)}}),{cut:a,components:i}},EC={};[Bh,hz,dz,pz,mz,yz,bz,Kz,Lu,Mu,Bb,s5,_5,I5,k5,N5,{hopcroftTarjanBiconnected:Cp,htbc:Cp,htb:Cp,hopcroftTarjanBiconnectedComponents:Cp},{tarjanStronglyConnected:Pp,tsc:Pp,tscc:Pp,tarjanStronglyConnectedComponents:Pp}].forEach(function(r){fr(EC,r)});var Bo=function(e){if(!(this instanceof Bo))return new Bo(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Bo.prototype={fulfill:function(e){return AC(this,1,"fulfillValue",e)},reject:function(e){return AC(this,2,"rejectReason",e)},then:function(e,t){var n=this,i=new Bo;return n.onFulfilled.push(CC(e,i,"fulfill")),n.onRejected.push(CC(t,i,"reject")),RC(n),i.proxy}};var AC=function(e,t,n,i){return 0===e.state&&(e.state=t,e[n]=i,RC(e)),e},RC=function(e){1===e.state?SC(e,"onFulfilled",e.fulfillValue):2===e.state&&SC(e,"onRejected",e.rejectReason)},SC=function(e,t,n){if(0!==e[t].length){var i=e[t];e[t]=[];var o=function(){for(var s=0;s<i.length;s++)i[s](n)};"function"==typeof setImmediate?setImmediate(o):setTimeout(o,0)}},CC=function(e,t,n){return function(i){if("function"!=typeof e)t[n].call(t,i);else{var o;try{o=e(i)}catch(a){return void t.reject(a)}PC(t,o)}}},PC=function(e,t){if(e!==t&&e.proxy!==t){var n;if("object"===ei(t)&&null!==t||"function"==typeof t)try{n=t.then}catch(o){return void e.reject(o)}if("function"!=typeof n)e.fulfill(t);else{var i=!1;try{n.call(t,function(o){i||(i=!0,o===t?e.reject(new TypeError("circular thenable chain")):PC(e,o))},function(o){i||(i=!0,e.reject(o))})}catch(o){i||e.reject(o)}}}else e.reject(new TypeError("cannot resolve promise with itself"))};Bo.all=function(r){return new Bo(function(e,t){for(var n=new Array(r.length),i=0,o=function(l,u){n[l]=u,++i===r.length&&e(n)},a=0;a<r.length;a++)(function(s){var l=r[s];null!=l&&null!=l.then?l.then(function(h){o(s,h)},function(h){t(h)}):o(s,l)})(a)})},Bo.resolve=function(r){return new Bo(function(e,t){e(r)})},Bo.reject=function(r){return new Bo(function(e,t){t(r)})};var Bu=typeof Promise<"u"?Promise:Bo,jb=function(e,t,n){var i=sb(e),o=!i,a=this._private=fr({duration:1e3},t,n);if(a.target=e,a.style=a.style||a.css,a.started=!1,a.playing=!1,a.hooked=!1,a.applying=!1,a.progress=0,a.completes=[],a.frames=[],a.complete&&xn(a.complete)&&a.completes.push(a.complete),o){var s=e.position();a.startPosition=a.startPosition||{x:s.x,y:s.y},a.startStyle=a.startStyle||e.cy().style().getAnimationStartStyle(e,a.style)}if(i){var l=e.pan();a.startPan={x:l.x,y:l.y},a.startZoom=e.zoom()}this.length=1,this[0]=this},yl=jb.prototype;fr(yl,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var n=e.target._private.animation;(e.queue?n.queue:n.current).push(this),vo(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,n=t.playing;return void 0===e?t.progress:(n&&this.pause(),t.progress=e,t.started=!1,n&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(u,c){var h=e[u];null!=h&&(e[u]=e[c],e[c]=h)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var i=0;i<e.style.length;i++){var o=e.style[i],a=o.name,s=e.startStyle[a];e.startStyle[a]=o,e.style[i]=s}return t&&this.play(),this},promise:function(e){var n,t=this._private;return n="frame"===e?t.frames:t.completes,new Bu(function(i,o){n.push(function(){i()})})}}),yl.complete=yl.completed,yl.run=yl.play,yl.running=yl.playing;var Hb,kC,$b,DC,Wb,NC,Kb,OC,Xb,LC,Yb,MC,Qb,FC,Jb,VC,Zb,BC,t0,UC,r0,zC,n0,GC,i0,qC,o0,jC,a0,HC,s0,$C,l0,WC,u0,KC,c0,YC,h0,QC,d0,JC,f0,ZC,p0,eP,g0,tP,m0,rP,v0,nP,y0,iP,w0,oP,_0,aP,b0,sP,E0,lP,T0,uP,I0,cP,x0,hP,A0,dP,R0,fP,S0,gP,C0,vP,P0,yP,k0,_P,D0,EP,O0,TP,L0,IP,M5={animated:function(){return function(){var t=this,i=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return!1;var a=i[0];return a?a._private.animation.current.length>0:void 0}},clearQueue:function(){return function(){var t=this,i=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return this;for(var a=0;a<i.length;a++)i[a]._private.animation.queue=[];return this}},delay:function(){return function(t,n){return(this._private.cy||this).styleEnabled()?this.animate({delay:t,duration:t,complete:n}):this}},delayAnimation:function(){return function(t,n){return(this._private.cy||this).styleEnabled()?this.animation({delay:t,duration:t,complete:n}):this}},animation:function(){return function(t,n){var i=this,o=void 0!==i.length,a=o?i:[i],s=this._private.cy||this,l=!o,u=!l;if(!s.styleEnabled())return this;var c=s.style();if(t=fr({},t,n),0===Object.keys(t).length)return new jb(a[0],t);switch(void 0===t.duration&&(t.duration=400),t.duration){case"slow":t.duration=600;break;case"fast":t.duration=200}if(u&&(t.style=c.getPropsList(t.style||t.css),t.css=void 0),u&&null!=t.renderedPosition){var d=t.renderedPosition,p=s.pan(),g=s.zoom();t.position=JS(d,g,p)}if(l&&null!=t.panBy){var y=t.panBy,v=s.pan();t.pan={x:v.x+y.x,y:v.y+y.y}}var m=t.center||t.centre;if(l&&null!=m){var _=s.getCenterPan(m.eles,t.zoom);null!=_&&(t.pan=_)}if(l&&null!=t.fit){var I=t.fit,U=s.getFitViewport(I.eles||I.boundingBox,I.padding);null!=U&&(t.pan=U.pan,t.zoom=U.zoom)}if(l&&Ur(t.zoom)){var ne=s.getZoomedViewport(t.zoom);null!=ne?(ne.zoomed&&(t.zoom=ne.zoom),ne.panned&&(t.pan=ne.pan)):t.zoom=null}return new jb(a[0],t)}},animate:function(){return function(t,n){var i=this,a=void 0!==i.length?i:[i];if(!(this._private.cy||this).styleEnabled())return this;n&&(t=fr({},t,n));for(var l=0;l<a.length;l++){var u=a[l],c=u.animated()&&(void 0===t.queue||t.queue);u.animation(t,c?{queue:!0}:void 0).play()}return this}},stop:function(){return function(t,n){var i=this,a=void 0!==i.length?i:[i],s=this._private.cy||this;if(!s.styleEnabled())return this;for(var l=0;l<a.length;l++){for(var c=a[l]._private,h=c.animation.current,d=0;d<h.length;d++)n&&(h[d]._private.duration=0);t&&(c.animation.queue=[]),n||(c.animation.current=[])}return s.notify("draw"),this}}};function kp(){return kC?Hb:(kC=1,Hb=Array.isArray)}function G5(){if(FC)return Qb;FC=1;var r=function V5(){if(NC)return Wb;NC=1;var r=NS(),e=Oh();return Wb=function a(s){if(!e(s))return!1;var l=r(s);return"[object Function]"==l||"[object GeneratorFunction]"==l||"[object AsyncFunction]"==l||"[object Proxy]"==l}}(),e=function U5(){if(LC)return Xb;LC=1;var n,r=function B5(){if(OC)return Kb;OC=1;var r=pp();return Kb=r["__core-js_shared__"]}(),e=(n=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";return Xb=function t(n){return!!e&&e in n},Xb}(),t=Oh(),n=function z5(){if(MC)return Yb;MC=1;var e=Function.prototype.toString;return Yb=function t(n){if(null!=n){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}}(),o=/^\[object .+?Constructor\]$/,c=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return Qb=function h(d){return!(!t(d)||e(d))&&(r(d)?c:o).test(n(d))}}function e0(){if(BC)return Zb;BC=1;var r=G5(),e=function q5(){return VC?Jb:(VC=1,Jb=function r(e,t){return e?.[t]})}();return Zb=function t(n,i){var o=e(n,i);return r(o)?o:void 0}}function Dp(){if(UC)return t0;UC=1;var e=e0()(Object,"create");return t0=e}function XC(){return KC?u0:(KC=1,u0=function r(e,t){return e===t||e!=e&&t!=t})}function Np(){if(YC)return c0;YC=1;var r=XC();return c0=function e(t,n){for(var i=t.length;i--;)if(r(t[i][0],n))return i;return-1}}function nG(){if(nP)return v0;nP=1;var r=function X5(){if($C)return s0;$C=1;var r=function j5(){if(zC)return r0;zC=1;var r=Dp();return r0=function e(){this.__data__=r?r(null):{},this.size=0}}(),e=function H5(){return GC?n0:(GC=1,n0=function r(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t})}(),t=function $5(){if(qC)return i0;qC=1;var r=Dp(),n=Object.prototype.hasOwnProperty;return i0=function i(o){var a=this.__data__;if(r){var s=a[o];return"__lodash_hash_undefined__"===s?void 0:s}return n.call(a,o)?a[o]:void 0}}(),n=function W5(){if(jC)return o0;jC=1;var r=Dp(),t=Object.prototype.hasOwnProperty;return o0=function n(i){var o=this.__data__;return r?void 0!==o[i]:t.call(o,i)}}(),i=function K5(){if(HC)return a0;HC=1;var r=Dp();return a0=function t(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=r&&void 0===i?"__lodash_hash_undefined__":i,this}}();function o(a){var s=-1,l=null==a?0:a.length;for(this.clear();++s<l;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=r,o.prototype.delete=e,o.prototype.get=t,o.prototype.has=n,o.prototype.set=i,s0=o}(),e=function tG(){if(tP)return g0;tP=1;var r=function Y5(){return WC?l0:(WC=1,l0=function r(){this.__data__=[],this.size=0})}(),e=function Q5(){if(QC)return h0;QC=1;var r=Np(),t=Array.prototype.splice;return h0=function n(i){var o=this.__data__,a=r(o,i);return!(a<0||(a==o.length-1?o.pop():t.call(o,a,1),--this.size,0))}}(),t=function J5(){if(JC)return d0;JC=1;var r=Np();return d0=function e(t){var n=this.__data__,i=r(n,t);return i<0?void 0:n[i][1]}}(),n=function Z5(){if(ZC)return f0;ZC=1;var r=Np();return f0=function e(t){return r(this.__data__,t)>-1}}(),i=function eG(){if(eP)return p0;eP=1;var r=Np();return p0=function e(t,n){var i=this.__data__,o=r(i,t);return o<0?(++this.size,i.push([t,n])):i[o][1]=n,this}}();function o(a){var s=-1,l=null==a?0:a.length;for(this.clear();++s<l;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=r,o.prototype.delete=e,o.prototype.get=t,o.prototype.has=n,o.prototype.set=i,g0=o}(),t=function rG(){if(rP)return m0;rP=1;var t=e0()(pp(),"Map");return m0=t}();return v0=function n(){this.size=0,this.__data__={hash:new r,map:new(t||e),string:new r}}}function Op(){if(oP)return w0;oP=1;var r=function iG(){return iP?y0:(iP=1,y0=function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e})}();return w0=function e(t,n){var i=t.__data__;return r(n)?i["string"==typeof n?"string":"hash"]:i.map}}function hG(){if(dP)return A0;dP=1;var r=function cG(){if(hP)return x0;hP=1;var r=function uG(){if(cP)return I0;cP=1;var r=nG(),e=function oG(){if(aP)return _0;aP=1;var r=Op();return _0=function e(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}}(),t=function aG(){if(sP)return b0;sP=1;var r=Op();return b0=function e(t){return r(this,t).get(t)}}(),n=function sG(){if(lP)return E0;lP=1;var r=Op();return E0=function e(t){return r(this,t).has(t)}}(),i=function lG(){if(uP)return T0;uP=1;var r=Op();return T0=function e(t,n){var i=r(this,t),o=i.size;return i.set(t,n),this.size+=i.size==o?0:1,this}}();function o(a){var s=-1,l=null==a?0:a.length;for(this.clear();++s<l;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=r,o.prototype.delete=e,o.prototype.get=t,o.prototype.has=n,o.prototype.set=i,I0=o}();function t(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError("Expected a function");var o=function(){var a=arguments,s=i?i.apply(this,a):a[0],l=o.cache;if(l.has(s))return l.get(s);var u=n.apply(this,a);return o.cache=l.set(s,u)||l,u};return o.cache=new(t.Cache||r),o}return t.Cache=r,x0=t}();return A0=function t(n){var i=r(n,function(a){return 500===o.size&&o.clear(),a}),o=i.cache;return i}}function pP(){if(fP)return R0;fP=1;var r=hG(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,t=/\\(\\)?/g,n=r(function(i){var o=[];return 46===i.charCodeAt(0)&&o.push(""),i.replace(e,function(a,s,l,u){o.push(l?u.replace(t,"$1"):s||a)}),o});return R0=n}function mP(){return gP?S0:(gP=1,S0=function r(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o})}function wP(){if(yP)return P0;yP=1;var r=function dG(){if(vP)return C0;vP=1;var r=mb(),e=mP(),t=kp(),n=Lh(),i=r?r.prototype:void 0,o=i?i.toString:void 0;return C0=function a(s){if("string"==typeof s)return s;if(t(s))return e(s,a)+"";if(n(s))return o?o.call(s):"";var l=s+"";return"0"==l&&1/s==-1/0?"-0":l}}();return P0=function e(t){return null==t?"":r(t)}}function bP(){if(_P)return k0;_P=1;var r=kp(),e=function F5(){if(DC)return $b;DC=1;var r=kp(),e=Lh(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;return $b=function i(o,a){if(r(o))return!1;var s=typeof o;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=o&&!e(o))||n.test(o)||!t.test(o)||null!=a&&o in Object(a)}}(),t=pP(),n=wP();return k0=function i(o,a){return r(o)?o:e(o,a)?[o]:t(n(o))}}function N0(){if(EP)return D0;EP=1;var r=Lh();return D0=function e(t){if("string"==typeof t||r(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}}var M0,xP,F0,AP,V0,RP,B0,SP,U0,CP,z0,PP,gG=function pG(){if(IP)return L0;IP=1;var r=function fG(){if(TP)return O0;TP=1;var r=bP(),e=N0();return O0=function t(n,i){for(var o=0,a=(i=r(i,n)).length;null!=n&&o<a;)n=n[e(i[o++])];return o&&o==a?n:void 0}}();return L0=function e(t,n,i){var o=null==t?void 0:r(t,n);return void 0===o?i:o}}(),mG=Nh(gG);function bG(){if(CP)return U0;CP=1;var r=function wG(){if(RP)return V0;RP=1;var r=function yG(){if(AP)return F0;AP=1;var r=function vG(){if(xP)return M0;xP=1;var r=e0(),e=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch{}}();return M0=e}();return F0=function e(t,n,i){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}}(),e=XC(),n=Object.prototype.hasOwnProperty;return V0=function i(o,a,s){var l=o[a];(!n.call(o,a)||!e(l,s)||void 0===s&&!(a in o))&&r(o,a,s)}}(),e=bP(),t=function _G(){if(SP)return B0;SP=1;var e=/^(?:0|[1-9]\d*)$/;return B0=function t(n,i){var o=typeof n;return!!(i=i??9007199254740991)&&("number"==o||"symbol"!=o&&e.test(n))&&n>-1&&n%1==0&&n<i}}(),n=Oh(),i=N0();return U0=function o(a,s,l,u){if(!n(a))return a;for(var c=-1,h=(s=e(s,a)).length,d=h-1,p=a;null!=p&&++c<h;){var g=i(s[c]),y=l;if("__proto__"===g||"constructor"===g||"prototype"===g)return a;if(c!=d){var v=p[g];void 0===(y=u?u(v,g,p):void 0)&&(y=n(v)?v:t(s[c+1])?[]:{})}r(p,g,y),p=p[g]}return a}}var G0,kP,q0,DP,IG=Nh(function EG(){if(PP)return z0;PP=1;var r=bG();return z0=function e(t,n,i){return null==t?t:r(t,n,i)}}()),RG=function AG(){if(DP)return q0;DP=1;var r=mP(),e=function xG(){return kP?G0:(kP=1,G0=function r(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t})}(),t=kp(),n=Lh(),i=pP(),o=N0(),a=wP();return q0=function s(l){return t(l)?r(l,o):n(l)?[l]:e(i(a(l)))}}(),SG=Nh(RG),CG={data:function(e){return e=fr({},{field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(i){},beforeSet:function(i,o){},onSet:function(i){},canSet:function(i){return!0}},e),function(i,o){var a=e,s=this,l=void 0!==s.length,u=l?s:[s],c=l?s[0]:s;if(sr(i)){var p,d=-1!==i.indexOf(".")&&SG(i);if(a.allowGetting&&void 0===o)return c&&(a.beforeGet(c),p=d&&void 0===c._private[a.field][i]?mG(c._private[a.field],d):c._private[a.field][i]),p;if(a.allowSetting&&void 0!==o&&!a.immutableKeys[i]){var y=hS({},i,o);a.beforeSet(s,y);for(var v=0,m=u.length;v<m;v++){var _=u[v];a.canSet(_)&&(d&&void 0===c._private[a.field][i]?IG(_._private[a.field],d,o):_._private[a.field][i]=o)}a.updateStyle&&s.updateStyle(),a.onSet(s),a.settingTriggersEvent&&s[a.triggerFnName](a.settingEvent)}}else if(a.allowSetting&&Ur(i)){var U,ne,I=i,re=Object.keys(I);a.beforeSet(s,I);for(var A=0;A<re.length;A++)if(ne=I[U=re[A]],!a.immutableKeys[U])for(var M=0;M<u.length;M++){var q=u[M];a.canSet(q)&&(q._private[a.field][U]=ne)}a.updateStyle&&s.updateStyle(),a.onSet(s),a.settingTriggersEvent&&s[a.triggerFnName](a.settingEvent)}else if(a.allowBinding&&xn(i))s.on(a.bindingEvent,i);else if(a.allowGetting&&void 0===i){var K;return c&&(a.beforeGet(c),K=c._private[a.field]),K}return s}},removeData:function(e){return e=fr({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},e),function(i){var o=e,a=this,l=void 0!==a.length?a:[a];if(sr(i)){for(var u=i.split(/\s+/),c=u.length,h=0;h<c;h++){var d=u[h];if(!cs(d)&&!o.immutableKeys[d])for(var g=0,y=l.length;g<y;g++)l[g]._private[o.field][d]=void 0}o.triggerEvent&&a[o.triggerFnName](o.event)}else if(void 0===i){for(var v=0,m=l.length;v<m;v++)for(var _=l[v]._private[o.field],I=Object.keys(_),U=0;U<I.length;U++){var ne=I[U];!o.immutableKeys[ne]&&(_[ne]=void 0)}o.triggerEvent&&a[o.triggerFnName](o.event)}return a}}},PG={eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.unlisten=t.unbind=t.off=t.removeListener,t.trigger=t.emit,t.pon=t.promiseOn=function(n,i){var o=this,a=Array.prototype.slice.call(arguments,0);return new Bu(function(s,l){var c=a.concat([function(p){o.off.apply(o,h),s(p)}]),h=c.concat([]);o.on.apply(o,c)})}}},Xr={};[M5,CG,PG].forEach(function(r){fr(Xr,r)});var kG={animate:Xr.animate(),animation:Xr.animation(),animated:Xr.animated(),clearQueue:Xr.clearQueue(),delay:Xr.delay(),delayAnimation:Xr.delayAnimation(),stop:Xr.stop()},Lp={classes:function(e){var t=this;if(void 0===e){var n=[];return t[0]._private.classes.forEach(function(g){return n.push(g)}),n}an(e)||(e=(e||"").match(/\S+/g)||[]);for(var i=[],o=new Du(e),a=0;a<t.length;a++){for(var s=t[a],l=s._private,u=l.classes,c=!1,h=0;h<e.length;h++)if(!u.has(e[h])){c=!0;break}c||(c=u.size!==e.length),c&&(l.classes=o,i.push(s))}return i.length>0&&this.spawn(i).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){an(e)||(e=e.match(/\S+/g)||[]);for(var n=this,i=void 0===t,o=[],a=0,s=n.length;a<s;a++)for(var l=n[a],u=l._private.classes,c=!1,h=0;h<e.length;h++){var d=e[h],p=u.has(d),g=!1;t||i&&!p?(u.add(d),g=!0):(!t||i&&p)&&(u.delete(d),g=!0),!c&&g&&(o.push(l),c=!0)}return o.length>0&&this.spawn(o).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}};Lp.className=Lp.classNames=Lp.classes;var zr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:ri,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};zr.variable="(?:[\\w-.]|(?:\\\\"+zr.metaChar+"))+",zr.className="(?:[\\w-]|(?:\\\\"+zr.metaChar+"))+",zr.value=zr.string+"|"+zr.number,zr.id=zr.variable,function(){var r,e,t;for(r=zr.comparatorOp.split("|"),t=0;t<r.length;t++)zr.comparatorOp+="|@"+(e=r[t]);for(r=zr.comparatorOp.split("|"),t=0;t<r.length;t++)!((e=r[t]).indexOf("!")>=0)&&"="!==e&&(zr.comparatorOp+="|\\!"+e)}();var j0=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(r,e){return function(e,t){return-1*wS(e,t)}(r.selector,e.selector)}),DG=function(){for(var e,r={},t=0;t<j0.length;t++)r[(e=j0[t]).selector]=e.matches;return r}(),OG="("+j0.map(function(r){return r.selector}).join("|")+")",Uu=function(e){return e.replace(new RegExp("\\\\("+zr.metaChar+")","g"),function(t,n){return n})},vs=function(e,t,n){e[e.length-1]=n},H0=[{name:"group",query:!0,regex:"("+zr.group+")",populate:function(e,t,n){var o=Wn(n,1)[0];t.checks.push({type:0,value:"*"===o?o:o+"s"})}},{name:"state",query:!0,regex:OG,populate:function(e,t,n){var i=Wn(n,1);t.checks.push({type:7,value:i[0]})}},{name:"id",query:!0,regex:"\\#("+zr.id+")",populate:function(e,t,n){var i=Wn(n,1);t.checks.push({type:8,value:Uu(i[0])})}},{name:"className",query:!0,regex:"\\.("+zr.className+")",populate:function(e,t,n){var i=Wn(n,1);t.checks.push({type:9,value:Uu(i[0])})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+zr.variable+")\\s*\\]",populate:function(e,t,n){var i=Wn(n,1);t.checks.push({type:4,field:Uu(i[0])})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+zr.variable+")\\s*("+zr.comparatorOp+")\\s*("+zr.value+")\\s*\\]",populate:function(e,t,n){var i=Wn(n,3),o=i[0],a=i[1],s=i[2];s=null!=new RegExp("^"+zr.string+"$").exec(s)?s.substring(1,s.length-1):parseFloat(s),t.checks.push({type:3,field:Uu(o),operator:a,value:s})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+zr.boolOp+")\\s*("+zr.variable+")\\s*\\]",populate:function(e,t,n){var i=Wn(n,2),o=i[0];t.checks.push({type:5,field:Uu(i[1]),operator:o})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+zr.meta+")\\s*("+zr.comparatorOp+")\\s*("+zr.number+")\\s*\\]\\]",populate:function(e,t,n){var i=Wn(n,3),a=i[1],s=i[2];t.checks.push({type:6,field:Uu(i[0]),operator:a,value:parseFloat(s)})}},{name:"nextQuery",separator:!0,regex:zr.separator,populate:function(e,t){var n=e.currentSubject,i=e.edgeCount,o=e.compoundCount,a=e[e.length-1];return null!=n&&(a.subject=n,e.currentSubject=null),a.edgeCount=i,a.compoundCount=o,e.edgeCount=0,e.compoundCount=0,e[e.length++]={checks:[]}}},{name:"directedEdge",separator:!0,regex:zr.directedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},o={checks:[]};return n.checks.push({type:11,source:t,target:o}),vs(e,0,n),e.edgeCount++,o}var a={checks:[]},l={checks:[]};return a.checks.push({type:12,source:t,target:l}),vs(e,0,a),e.edgeCount++,l}},{name:"undirectedEdge",separator:!0,regex:zr.undirectedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},o={checks:[]};return n.checks.push({type:10,nodes:[t,o]}),vs(e,0,n),e.edgeCount++,o}var a={checks:[]},l={checks:[]};return a.checks.push({type:14,node:t,neighbor:l}),vs(e,0,a),l}},{name:"child",separator:!0,regex:zr.child,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},i={checks:[]};return n.checks.push({type:15,parent:e[e.length-1],child:i}),vs(e,0,n),e.compoundCount++,i}if(e.currentSubject===t){var a={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]},h={checks:[]};return a.checks.push({type:19,left:e[e.length-1],right:l,subject:u}),u.checks=t.checks,t.checks=[{type:20}],h.checks.push({type:20}),l.checks.push({type:17,parent:h,child:c}),vs(e,0,a),e.currentSubject=u,e.compoundCount++,c}var d={checks:[]},p={checks:[]},g=[{type:17,parent:d,child:p}];return d.checks=t.checks,t.checks=g,e.compoundCount++,p}},{name:"descendant",separator:!0,regex:zr.descendant,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},i={checks:[]};return n.checks.push({type:16,ancestor:e[e.length-1],descendant:i}),vs(e,0,n),e.compoundCount++,i}if(e.currentSubject===t){var a={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]},h={checks:[]};return a.checks.push({type:19,left:e[e.length-1],right:l,subject:u}),u.checks=t.checks,t.checks=[{type:20}],h.checks.push({type:20}),l.checks.push({type:18,ancestor:h,descendant:c}),vs(e,0,a),e.currentSubject=u,e.compoundCount++,c}var d={checks:[]},p={checks:[]},g=[{type:18,ancestor:d,descendant:p}];return d.checks=t.checks,t.checks=g,e.compoundCount++,p}},{name:"subject",modifier:!0,regex:zr.subject,populate:function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return Kr("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t;var i=e[e.length-1].checks[0],o=null==i?null:i.type;11===o?i.type=13:10===o&&(i.type=14,i.node=i.nodes[1],i.neighbor=i.nodes[0],i.nodes=null)}}];H0.forEach(function(r){return r.regexObj=new RegExp("^"+r.regex)});var LG=function(e){for(var t,n,i,o=0;o<H0.length;o++){var a=H0[o],s=a.name,l=e.match(a.regexObj);if(null!=l){n=l,t=a,i=s,e=e.substring(l[0].length);break}}return{expr:t,match:n,name:i,remaining:e}},BG={parse:function(e){var t=this,n=t.inputText=e,i=t[0]={checks:[]};for(t.length=1,n=function(e){var t=e.match(/^\s+/);return t&&(e=e.substring(t[0].length)),e}(n);;){var o=LG(n);if(null==o.expr)return Kr("The selector `"+e+"`is invalid"),!1;var a=o.match.slice(1),s=o.expr.populate(t,i,a);if(!1===s)return!1;if(null!=s&&(i=s),(n=o.remaining).match(/^\s*$/))break}var l=t[t.length-1];null!=t.currentSubject&&(l.subject=t.currentSubject),l.edgeCount=t.edgeCount,l.compoundCount=t.compoundCount;for(var u=0;u<t.length;u++){var c=t[u];if(c.compoundCount>0&&c.edgeCount>0)return Kr("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(c.edgeCount>1)return Kr("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===c.edgeCount&&Kr("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(c){return c??""},t=function(c){return sr(c)?'"'+c+'"':e(c)},n=function(c){return" "+c+" "},o=function(c,h){return c.checks.reduce(function(d,p,g){return d+(h===c&&0===g?"$":"")+function(c,h){var p=c.value;switch(c.type){case 0:var g=e(p);return g.substring(0,g.length-1);case 3:return"["+c.field+n(e(c.operator))+t(p)+"]";case 5:var _=c.field;return"["+e(c.operator)+_+"]";case 4:return"["+c.field+"]";case 6:return"[["+c.field+n(e(c.operator))+t(p)+"]]";case 7:return p;case 8:return"#"+p;case 9:return"."+p;case 17:case 15:return o(c.parent,h)+n(">")+o(c.child,h);case 18:case 16:return o(c.ancestor,h)+" "+o(c.descendant,h);case 19:var re=o(c.left,h),A=o(c.subject,h),C=o(c.right,h);return re+(re.length>0?" ":"")+A+C;case 20:return""}}(p,h)},"")},a="",s=0;s<this.length;s++){var l=this[s];a+=o(l,l.subject),this.length>1&&s<this.length-1&&(a+=", ")}return this.toStringCache=a,a}},NP=function(e,t,n){var i,l,u,o=sr(e),a=Bt(e),s=sr(n),c=!1,h=!1,d=!1;switch(t.indexOf("!")>=0&&(t=t.replace("!",""),h=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),c=!0),(o||s||c)&&(l=o||a?""+e:"",u=""+n),c&&(e=l=l.toLowerCase(),n=u=u.toLowerCase()),t){case"*=":i=l.indexOf(u)>=0;break;case"$=":i=l.indexOf(u,l.length-u.length)>=0;break;case"^=":i=0===l.indexOf(u);break;case"=":i=e===n;break;case">":d=!0,i=e>n;break;case">=":d=!0,i=e>=n;break;case"<":d=!0,i=e<n;break;case"<=":d=!0,i=e<=n;break;default:i=!1}return h&&(null!=e||!d)&&(i=!i),i},$0=function(e,t){return e.data(t)},Nn=[],vn=function(e,t){return e.checks.every(function(n){return Nn[n.type](n,t)})};Nn[0]=function(r,e){var t=r.value;return"*"===t||t===e.group()},Nn[7]=function(r,e){return function(e,t){return DG[e](t)}(r.value,e)},Nn[8]=function(r,e){var t=r.value;return e.id()===t},Nn[9]=function(r,e){return e.hasClass(r.value)},Nn[6]=function(r,e){var n=r.operator,i=r.value;return NP(function(e,t){return e[t]()}(e,r.field),n,i)},Nn[3]=function(r,e){var n=r.operator,i=r.value;return NP($0(e,r.field),n,i)},Nn[5]=function(r,e){var n=r.operator;return function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}}($0(e,r.field),n)},Nn[4]=function(r,e){return function(e){return void 0!==e}($0(e,r.field))},Nn[10]=function(r,e){var t=r.nodes[0],n=r.nodes[1],i=e.source(),o=e.target();return vn(t,i)&&vn(n,o)||vn(n,i)&&vn(t,o)},Nn[14]=function(r,e){return vn(r.node,e)&&e.neighborhood().some(function(t){return t.isNode()&&vn(r.neighbor,t)})},Nn[11]=function(r,e){return vn(r.source,e.source())&&vn(r.target,e.target())},Nn[12]=function(r,e){return vn(r.source,e)&&e.outgoers().some(function(t){return t.isNode()&&vn(r.target,t)})},Nn[13]=function(r,e){return vn(r.target,e)&&e.incomers().some(function(t){return t.isNode()&&vn(r.source,t)})},Nn[15]=function(r,e){return vn(r.child,e)&&vn(r.parent,e.parent())},Nn[17]=function(r,e){return vn(r.parent,e)&&e.children().some(function(t){return vn(r.child,t)})},Nn[16]=function(r,e){return vn(r.descendant,e)&&e.ancestors().some(function(t){return vn(r.ancestor,t)})},Nn[18]=function(r,e){return vn(r.ancestor,e)&&e.descendants().some(function(t){return vn(r.descendant,t)})},Nn[19]=function(r,e){return vn(r.subject,e)&&vn(r.left,e)&&vn(r.right,e)},Nn[20]=function(){return!0},Nn[1]=function(r,e){return r.value.has(e)},Nn[2]=function(r,e){return(0,r.value)(e)};var HG={matches:function(e){for(var n=0;n<this.length;n++)if(vn(this[n],e))return!0;return!1},filter:function(e){var t=this;if(1===t.length&&1===t[0].checks.length&&8===t[0].checks[0].type)return e.getElementById(t[0].checks[0].value).collection();var n=function(o){for(var a=0;a<t.length;a++)if(vn(t[a],o))return!0;return!1};return null==t.text()&&(n=function(){return!0}),e.filter(n)}},ys=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==e||sr(e)&&e.match(/^\s*$/)||(vo(e)?this.addQuery({checks:[{type:1,value:e.collection()}]}):xn(e)?this.addQuery({checks:[{type:2,value:e}]}):sr(e)?this.parse(e)||(this.invalid=!0):bn("A selector must be created from a string; found "))},ws=ys.prototype;[BG,HG].forEach(function(r){return fr(ws,r)}),ws.text=function(){return this.inputText},ws.size=function(){return this.length},ws.eq=function(r){return this[r]},ws.sameText=function(r){return!this.invalid&&!r.invalid&&this.text()===r.text()},ws.addQuery=function(r){this[this.length++]=r},ws.selector=ws.toString;var _s={allAre:function(e){var t=new ys(e);return this.every(function(n){return t.matches(n)})},is:function(e){var t=new ys(e);return this.some(function(n){return t.matches(n)})},some:function(e,t){for(var n=0;n<this.length;n++)if(t?e.apply(t,[this[n],n,this]):e(this[n],n,this))return!0;return!1},every:function(e,t){for(var n=0;n<this.length;n++)if(!(t?e.apply(t,[this[n],n,this]):e(this[n],n,this)))return!1;return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var t=this.length;return t===e.length&&(1===t?this[0]===e[0]:this.every(function(i){return e.hasElementWithId(i.id())}))},anySame:function(e){return e=this.cy().collection(e),this.some(function(t){return e.hasElementWithId(t.id())})},allAreNeighbors:function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every(function(n){return t.hasElementWithId(n.id())})},contains:function(e){e=this.cy().collection(e);var t=this;return e.every(function(n){return t.hasElementWithId(n.id())})}};_s.allAreNeighbours=_s.allAreNeighbors,_s.has=_s.contains,_s.equal=_s.equals=_s.same;var Hh,MP,xo=function(e,t){return function(i,o,a,s){var c,l=i,u=this;if(null==l?c="":vo(l)&&1===l.length&&(c=l.id()),1===u.length&&c){var h=u[0]._private,d=h.traversalCache=h.traversalCache||{},p=d[t]=d[t]||[],g=pl(c);return p[g]||(p[g]=e.call(u,i,o,a,s))}return e.call(u,i,o,a,s)}},zu={parent:function(e){var t=[];if(1===this.length){var n=this[0]._private.parent;if(n)return n}for(var i=0;i<this.length;i++){var a=this[i]._private.parent;a&&t.push(a)}return this.spawn(t,!0).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var i=0;i<n.length;i++)t.push(n[i]);n=n.parent()}return this.spawn(t,!0).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var o=this[n].parents();t=(t=t||o).intersect(o)}return t.filter(e)},orphans:function(e){return this.stdFilter(function(t){return t.isOrphan()}).filter(e)},nonorphans:function(e){return this.stdFilter(function(t){return t.isChild()}).filter(e)},children:xo(function(r){for(var e=[],t=0;t<this.length;t++)for(var i=this[t]._private.children,o=0;o<i.length;o++)e.push(i[o]);return this.spawn(e,!0).filter(r)},"children"),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},isChildless:function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},isChild:function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},descendants:function(e){var t=[];return function n(i){for(var o=0;o<i.length;o++){var a=i[o];t.push(a),a.children().nonempty()&&n(a.children())}}(this.children()),this.spawn(t,!0).filter(e)}};function W0(r,e,t,n){for(var i=[],o=new Du,s=r.cy().hasCompoundNodes(),l=0;l<r.length;l++){var u=r[l];t?i.push(u):s&&n(i,o,u)}for(;i.length>0;){var c=i.shift();e(c),o.add(c.id()),s&&n(i,o,c)}return r}function OP(r,e,t){if(t.isParent())for(var n=t._private.children,i=0;i<n.length;i++){var o=n[i];e.has(o.id())||r.push(o)}}function LP(r,e,t){if(t.isChild()){var n=t._private.parent;e.has(n.id())||r.push(n)}}function $G(r,e,t){LP(r,e,t),OP(r,e,t)}zu.forEachDown=function(r){return W0(this,r,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],OP)},zu.forEachUp=function(r){return W0(this,r,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],LP)},zu.forEachUpAndDown=function(r){return W0(this,r,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],$G)},zu.ancestors=zu.parents,Hh=MP={data:Xr.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Xr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Xr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Xr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Xr.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Xr.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},Hh.attr=Hh.data,Hh.removeAttr=Hh.removeData;var WG=MP,Mp={};function K0(r){return function(e){var t=this;if(void 0===e&&(e=!0),0===t.length);else if(t.isNode()&&!t.removed()){for(var n=0,i=t[0],o=i._private.edges,a=0;a<o.length;a++){var s=o[a];!e&&s.isLoop()||(n+=r(i,s))}return n}}}function Gu(r,e){return function(t){for(var n,i=this.nodes(),o=0;o<i.length;o++){var s=i[o][r](t);void 0!==s&&(void 0===n||e(s,n))&&(n=s)}return n}}fr(Mp,{degree:K0(function(r,e){return e.source().same(e.target())?2:1}),indegree:K0(function(r,e){return e.target().same(r)?1:0}),outdegree:K0(function(r,e){return e.source().same(r)?1:0})}),fr(Mp,{minDegree:Gu("degree",function(r,e){return r<e}),maxDegree:Gu("degree",function(r,e){return r>e}),minIndegree:Gu("indegree",function(r,e){return r<e}),maxIndegree:Gu("indegree",function(r,e){return r>e}),minOutdegree:Gu("outdegree",function(r,e){return r<e}),maxOutdegree:Gu("outdegree",function(r,e){return r>e})}),fr(Mp,{totalDegree:function(e){for(var t=0,n=this.nodes(),i=0;i<n.length;i++)t+=n[i].degree(e);return t}});var Uo,FP,VP=function(e,t,n){for(var i=0;i<e.length;i++){var o=e[i];if(!o.locked()){var a=o._private.position,s={x:null!=t.x?t.x-a.x:0,y:null!=t.y?t.y-a.y:0};o.isParent()&&!(0===s.x&&0===s.y)&&o.children().shift(s,n),o.dirtyBoundingBoxCache()}}},BP={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,t){VP(e,t,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};Uo=FP={position:Xr.data(BP),silentPosition:Xr.data(fr({},BP,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,t){VP(e,t,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,t){if(Ur(e))t?this.silentPosition(e):this.position(e);else if(xn(e)){var n=e,i=this.cy();i.startBatch();for(var o=0;o<this.length;o++){var s,a=this[o];(s=n(a,o))&&(t?a.silentPosition(s):a.position(s))}i.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,t,n){var i;if(Ur(e)?(i={x:Bt(e.x)?e.x:0,y:Bt(e.y)?e.y:0},n=t):sr(e)&&Bt(t)&&((i={x:0,y:0})[e]=t),null!=i){var o=this.cy();o.startBatch();for(var a=0;a<this.length;a++){var s=this[a];if(!(o.hasCompoundNodes()&&s.isChild()&&s.ancestors().anySame(this))){var l=s.position(),u={x:l.x+i.x,y:l.y+i.y};n?s.silentPosition(u):s.position(u)}}o.endBatch()}return this},silentShift:function(e,t){return Ur(e)?this.shift(e,!0):sr(e)&&Bt(t)&&this.shift(e,t,!0),this},renderedPosition:function(e,t){var n=this[0],i=this.cy(),o=i.zoom(),a=i.pan(),s=Ur(e)?e:void 0,l=void 0!==s||void 0!==t&&sr(e);if(n&&n.isNode()){if(!l){var h=n.position();return s=_p(h,o,a),void 0===e?s:s[e]}for(var u=0;u<this.length;u++){var c=this[u];void 0!==t?c.position(e,(t-a[e])/o):void 0!==s&&c.position(JS(s,o,a))}}else if(!l)return;return this},relativePosition:function(e,t){var n=this[0],i=this.cy(),o=Ur(e)?e:void 0,a=void 0!==o||void 0!==t&&sr(e),s=i.hasCompoundNodes();if(n&&n.isNode()){if(!a){var g=n.position(),y=s?n.parent():null,v=y&&y.length>0;v&&(y=y[0]);var _=v?y.position():{x:0,y:0};return o={x:g.x-_.x,y:g.y-_.y},void 0===e?o:o[e]}for(var l=0;l<this.length;l++){var u=this[l],c=s?u.parent():null,h=c&&c.length>0;h&&(c=c[0]);var p=h?c.position():{x:0,y:0};void 0!==t?u.position(e,t+p[e]):void 0!==o&&u.position({x:o.x+p.x,y:o.y+p.y})}}else if(!a)return;return this}},Uo.modelPosition=Uo.point=Uo.position,Uo.modelPositions=Uo.points=Uo.positions,Uo.renderedPoint=Uo.renderedPosition,Uo.relativePoint=Uo.relativePosition;var qu,bs,KG=FP;qu=bs={},bs.renderedBoundingBox=function(r){var e=this.boundingBox(r),t=this.cy(),n=t.zoom(),i=t.pan(),o=e.x1*n+i.x,a=e.x2*n+i.x,s=e.y1*n+i.y,l=e.y2*n+i.y;return{x1:o,x2:a,y1:s,y2:l,w:a-o,h:l-s}},bs.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,r||t.emitAndNotify("bounds")}}),this):this},bs.updateCompoundBounds=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!r&&e.batching())return this;function t(a){if(a.isParent()){var s=a._private,l=a.children(),u="include"===a.pstyle("compound-sizing-wrt-labels").value,c={width:{val:a.pstyle("min-width").pfValue,left:a.pstyle("min-width-bias-left"),right:a.pstyle("min-width-bias-right")},height:{val:a.pstyle("min-height").pfValue,top:a.pstyle("min-height-bias-top"),bottom:a.pstyle("min-height-bias-bottom")}},h=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),d=s.position;(0===h.w||0===h.h)&&((h={w:a.pstyle("width").pfValue,h:a.pstyle("height").pfValue}).x1=d.x-h.w/2,h.x2=d.x+h.w/2,h.y1=d.y-h.h/2,h.y2=d.y+h.h/2);var y=c.width.left.value;"px"===c.width.left.units&&c.width.val>0&&(y=100*y/c.width.val);var v=c.width.right.value;"px"===c.width.right.units&&c.width.val>0&&(v=100*v/c.width.val);var m=c.height.top.value;"px"===c.height.top.units&&c.height.val>0&&(m=100*m/c.height.val);var _=c.height.bottom.value;"px"===c.height.bottom.units&&c.height.val>0&&(_=100*_/c.height.val);var I=p(c.width.val-h.w,y,v),U=I.biasDiff,ne=I.biasComplementDiff,re=p(c.height.val-h.h,m,_),A=re.biasDiff,C=re.biasComplementDiff;s.autoPadding=function g(M,q,z,K){if("%"!==z.units)return"px"===z.units?z.pfValue:0;switch(K){case"width":return M>0?z.pfValue*M:0;case"height":return q>0?z.pfValue*q:0;case"average":return M>0&&q>0?z.pfValue*(M+q)/2:0;case"min":return M>0&&q>0?M>q?z.pfValue*q:z.pfValue*M:0;case"max":return M>0&&q>0?M>q?z.pfValue*M:z.pfValue*q:0;default:return 0}}(h.w,h.h,a.pstyle("padding"),a.pstyle("padding-relative-to").value),s.autoWidth=Math.max(h.w,c.width.val),d.x=(-U+h.x1+h.x2+ne)/2,s.autoHeight=Math.max(h.h,c.height.val),d.y=(-A+h.y1+h.y2+C)/2}function p(M,q,z){var K=0,B=0,me=q+z;return M>0&&me>0&&(K=q/me*M,B=z/me*M),{biasDiff:K,biasComplementDiff:B}}}for(var n=0;n<this.length;n++){var i=this[n],o=i._private;(!o.compoundBoundsClean||r)&&(t(i),e.batching()||(o.compoundBoundsClean=!0))}return this};var Ao=function(e){return e===1/0||e===-1/0?0:e},zo=function(e,t,n,i,o){i-t===0||o-n===0||null==t||null==n||null==i||null==o||(e.x1=t<e.x1?t:e.x1,e.x2=i>e.x2?i:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=o>e.y2?o:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},Es=function(e,t){return null==t?e:zo(e,t.x1,t.y1,t.x2,t.y2)},$h=function(e,t,n){return io(e,t,n)},Fp=function(e,t,n){if(!t.cy().headless()){var l,u,i=t._private,o=i.rstyle,a=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(l=o.srcX,u=o.srcY):"target"===n?(l=o.tgtX,u=o.tgtY):(l=o.midX,u=o.midY);var c=i.arrowBounds=i.arrowBounds||{},h=c[n]=c[n]||{};h.x1=l-a,h.y1=u-a,h.x2=l+a,h.y2=u+a,h.w=h.x2-h.x1,h.h=h.y2-h.y1,Ep(h,1),zo(e,h.x1,h.y1,h.x2,h.y2)}}},X0=function(e,t,n){if(!t.cy().headless()){var i,o=t._private,a=o.rstyle;if(t.pstyle((i=n?n+"-":"")+"label").strValue){var z,K,B,me,l=t.pstyle("text-halign"),u=t.pstyle("text-valign"),c=$h(a,"labelWidth",n),h=$h(a,"labelHeight",n),d=$h(a,"labelX",n),p=$h(a,"labelY",n),g=t.pstyle(i+"text-margin-x").pfValue,y=t.pstyle(i+"text-margin-y").pfValue,v=t.isEdge(),m=t.pstyle(i+"text-rotation"),_=t.pstyle("text-outline-width").pfValue,U=t.pstyle("text-border-width").pfValue/2,ne=t.pstyle("text-background-padding").pfValue,A=h,C=c,M=C/2,q=A/2;if(v)z=d-M,K=d+M,B=p-q,me=p+q;else{switch(l.value){case"left":z=d-C,K=d;break;case"center":z=d-M,K=d+M;break;case"right":z=d,K=d+C}switch(u.value){case"top":B=p-A,me=p;break;case"center":B=p-q,me=p+q;break;case"bottom":B=p,me=p+A}}var be=g-Math.max(_,U)-ne-2,xe=g+Math.max(_,U)+ne+2,we=y-Math.max(_,U)-ne-2,Re=y+Math.max(_,U)+ne+2;z+=be,K+=xe,B+=we,me+=Re;var je=n||"main",We=o.labelBounds,Pe=We[je]=We[je]||{};Pe.x1=z,Pe.y1=B,Pe.x2=K,Pe.y2=me,Pe.w=K-z,Pe.h=me-B,Pe.leftPad=be,Pe.rightPad=xe,Pe.topPad=we,Pe.botPad=Re;var Fe=v&&"autorotate"===m.strValue;if(Fe||null!=m.pfValue&&0!==m.pfValue){var mt=Fe?$h(o.rstyle,"labelAngle",n):m.pfValue,at=Math.cos(mt),bt=Math.sin(mt),xt=(z+K)/2,Ut=(B+me)/2;if(!v){switch(l.value){case"left":xt=K;break;case"right":xt=z}switch(u.value){case"top":Ut=me;break;case"bottom":Ut=B}}var _t=function(gr,lr){return{x:(gr-=xt)*at-(lr-=Ut)*bt+xt,y:gr*bt+lr*at+Ut}},Me=_t(z,B),$e=_t(z,me),Xe=_t(K,B),dt=_t(K,me);z=Math.min(Me.x,$e.x,Xe.x,dt.x),K=Math.max(Me.x,$e.x,Xe.x,dt.x),B=Math.min(Me.y,$e.y,Xe.y,dt.y),me=Math.max(Me.y,$e.y,Xe.y,dt.y)}var Lt=je+"Rot",er=We[Lt]=We[Lt]||{};er.x1=z,er.y1=B,er.x2=K,er.y2=me,er.w=K-z,er.h=me-B,zo(e,z,B,K,me),zo(o.labelBounds.all,z,B,K,me)}return e}},UP=function(e,t){if(!t.cy().headless()){var n=t.pstyle("outline-opacity").value,a=t.pstyle("outline-width").value+t.pstyle("outline-offset").value;zP(e,t,n,a,"outside",a/2)}},zP=function(e,t,n,i,o,a){if(!(0===n||i<=0||"inside"===o)){var s=t.cy(),l=t.pstyle("shape").value,u=s.renderer().nodeShapes[l],c=t.position(),h=c.x,d=c.y,p=t.width(),g=t.height();if(u.hasMiterBounds){"center"===o&&(i/=2);var y=u.miterBounds(h,d,p,g,i);Es(e,y)}else null!=a&&a>0&&Tp(e,[a,a,a,a])}},GP=function(e){var t=0,n=function(a){return(a?1:0)<<t++},i=0;return i+=n(e.incudeNodes),i+=n(e.includeEdges),i+=n(e.includeLabels),i+=n(e.includeMainLabels),i+=n(e.includeSourceLabels),i+=n(e.includeTargetLabels),(i+=n(e.includeOverlays))+n(e.includeOutlines)},qP=function(e){var t=function(s){return Math.round(s)};if(e.isEdge()){var n=e.source().position(),i=e.target().position();return zS([t(n.x),t(n.y),t(i.x),t(i.y)])}var o=e.position();return zS([t(o.x),t(o.y)])},jP=function(e,t){var i,n=e._private,o=e.isEdge(),s=(null==t?HP:GP(t))===HP;if(null==n.bbCache?(i=function(e,t){var c,h,d,p,g,y,n=e._private.cy,i=n.styleEnabled(),o=n.headless(),a=Ki(),s=e._private,l=e.isNode(),u=e.isEdge(),v=s.rstyle,m=l&&i?e.pstyle("bounds-expansion").pfValue:[0],_=function(Mr){return"none"!==Mr.pstyle("display").value},I=!i||_(e)&&(!u||_(e.source())&&_(e.target()));if(I){var ne=0;i&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(ne=e.pstyle("overlay-padding").value);var A=0;i&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(A=e.pstyle("underlay-padding").value);var C=Math.max(ne,A),q=0;if(i&&(q=e.pstyle("width").pfValue/2),l&&t.includeNodes){var z=e.position();g=z.x,y=z.y;var B=e.outerWidth()/2,be=e.outerHeight()/2;zo(a,c=g-B,d=y-be,h=g+B,p=y+be),i&&UP(a,e),i&&t.includeOutlines&&!o&&UP(a,e),i&&function(e,t){if(!t.cy().headless()){var n=t.pstyle("border-opacity").value,i=t.pstyle("border-width").pfValue,o=t.pstyle("border-position").value;zP(e,t,n,i,o)}}(a,e)}else if(u&&t.includeEdges)if(i&&!o){var xe=e.pstyle("curve-style").strValue;if(c=Math.min(v.srcX,v.midX,v.tgtX),h=Math.max(v.srcX,v.midX,v.tgtX),d=Math.min(v.srcY,v.midY,v.tgtY),p=Math.max(v.srcY,v.midY,v.tgtY),zo(a,c-=q,d-=q,h+=q,p+=q),"haystack"===xe){var we=v.haystackPts;if(we&&2===we.length){if((c=we[0].x)>(h=we[1].x)){var Re=c;c=h,h=Re}if((d=we[0].y)>(p=we[1].y)){var je=d;d=p,p=je}zo(a,c-q,d-q,h+q,p+q)}}else if("bezier"===xe||"unbundled-bezier"===xe||hs(xe,"segments")||hs(xe,"taxi")){var We;switch(xe){case"bezier":case"unbundled-bezier":We=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":We=v.linePts}if(null!=We)for(var Pe=0;Pe<We.length;Pe++){var Fe=We[Pe];zo(a,c=Fe.x-q,d=Fe.y-q,h=Fe.x+q,p=Fe.y+q)}}}else{var mt=e.source().position(),bt=e.target().position();if((c=mt.x)>(h=bt.x)){var xt=c;c=h,h=xt}if((d=mt.y)>(p=bt.y)){var Ut=d;d=p,p=Ut}zo(a,c-=q,d-=q,h+=q,p+=q)}if(i&&t.includeEdges&&u&&(Fp(a,e,"mid-source"),Fp(a,e,"mid-target"),Fp(a,e,"source"),Fp(a,e,"target")),i&&"yes"===e.pstyle("ghost").value){var Me=e.pstyle("ghost-offset-x").pfValue,$e=e.pstyle("ghost-offset-y").pfValue;zo(a,a.x1+Me,a.y1+$e,a.x2+Me,a.y2+$e)}var Xe=s.bodyBounds=s.bodyBounds||{};eC(Xe,a),Tp(Xe,m),Ep(Xe,1),i&&zo(a,(c=a.x1)-C,(d=a.y1)-C,(h=a.x2)+C,(p=a.y2)+C);var dt=s.overlayBounds=s.overlayBounds||{};eC(dt,a),Tp(dt,m),Ep(dt,1);var Lt=s.labelBounds=s.labelBounds||{};null!=Lt.all?function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0}(Lt.all):Lt.all=Ki(),i&&t.includeLabels&&(t.includeMainLabels&&X0(a,e,null),u&&(t.includeSourceLabels&&X0(a,e,"source"),t.includeTargetLabels&&X0(a,e,"target")))}return a.x1=Ao(a.x1),a.y1=Ao(a.y1),a.x2=Ao(a.x2),a.y2=Ao(a.y2),a.w=Ao(a.x2-a.x1),a.h=Ao(a.y2-a.y1),a.w>0&&a.h>0&&I&&(Tp(a,m),Ep(a,1)),a}(e,Wh),n.bbCache=i,n.bbCachePosKey=qP(e)):i=n.bbCache,!s){var l=e.isNode();i=Ki(),(t.includeNodes&&l||t.includeEdges&&!l)&&Es(i,t.includeOverlays?n.overlayBounds:n.bodyBounds),t.includeLabels&&(t.includeMainLabels&&(!o||t.includeSourceLabels&&t.includeTargetLabels)?Es(i,n.labelBounds.all):(t.includeMainLabels&&Es(i,n.labelBounds.mainRot),t.includeSourceLabels&&Es(i,n.labelBounds.sourceRot),t.includeTargetLabels&&Es(i,n.labelBounds.targetRot))),i.w=i.x2-i.x1,i.h=i.y2-i.y1}return i},Wh={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},HP=GP(Wh),$P=Ei(Wh);bs.boundingBox=function(r){var e,t=void 0===r||void 0===r.useCache||!0===r.useCache,n=Pu(function(c){var h=c._private;return null==h.bbCache||h.styleDirty||h.bbCachePosKey!==qP(c)},function(c){return c.id()});if(t&&1===this.length&&!n(this[0]))r=void 0===r?Wh:$P(r),e=jP(this[0],r);else{e=Ki();var i=$P(r=r||Wh),o=this,s=o.cy().styleEnabled();this.edges().forEach(n),this.nodes().forEach(n),s&&this.recalculateRenderedStyle(t),this.updateCompoundBounds(!t);for(var l=0;l<o.length;l++){var u=o[l];n(u)&&u.dirtyBoundingBoxCache(),Es(e,jP(u,i))}}return e.x1=Ao(e.x1),e.y1=Ao(e.y1),e.x2=Ao(e.x2),e.y2=Ao(e.y2),e.w=Ao(e.x2-e.x1),e.h=Ao(e.y2-e.y1),e},bs.dirtyBoundingBoxCache=function(){for(var r=0;r<this.length;r++){var e=this[r]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},bs.boundingBoxAt=function(r){var e=this.nodes(),t=this.cy(),n=t.hasCompoundNodes(),i=t.collection();if(n&&(i=e.filter(function(u){return u.isParent()}),e=e.not(i)),Ur(r)){var o=r;r=function(){return o}}t.startBatch(),e.forEach(function(c,h){return c._private.bbAtOldPos=r(c,h)}).silentPositions(r),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0));var l=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}}(this.boundingBox({useCache:!1}));return e.silentPositions(function(c){return c._private.bbAtOldPos}),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0)),t.endBatch(),l},qu.boundingbox=qu.bb=qu.boundingBox,qu.renderedBoundingbox=qu.renderedBoundingBox;var Kh,Xh,QG=bs;Kh=Xh={};var WP=function(e){e.uppercaseName=yS(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=yS(e.outerName),Kh[e.name]=function(){var n=this[0],i=n._private;if(n){if(i.cy._private.styleEnabled){if(n.isParent())return n.updateCompoundBounds(),i[e.autoName]||0;var s=n.pstyle(e.name);return"label"===s.strValue?(n.recalculateRenderedStyle(),i.rstyle[e.labelName]||0):s.pfValue}return 1}},Kh["outer"+e.uppercaseName]=function(){var n=this[0];if(n){if(n._private.cy._private.styleEnabled){var s=n[e.name](),l=n.pstyle("border-position").value;return s+("center"===l?n.pstyle("border-width").pfValue:"outside"===l?2*n.pstyle("border-width").pfValue:0)+2*n.padding()}return 1}},Kh["rendered"+e.uppercaseName]=function(){var n=this[0];if(n)return n[e.name]()*this.cy().zoom()},Kh["rendered"+e.uppercaseOuterName]=function(){var n=this[0];if(n)return n[e.outerName]()*this.cy().zoom()}};WP({name:"width"}),WP({name:"height"}),Xh.padding=function(){var r=this[0],e=r._private;return r.isParent()?(r.updateCompoundBounds(),void 0!==e.autoPadding?e.autoPadding:r.pstyle("padding").pfValue):r.pstyle("padding").pfValue},Xh.paddedHeight=function(){var r=this[0];return r.height()+2*r.padding()},Xh.paddedWidth=function(){var r=this[0];return r.width()+2*r.padding()};var JG=Xh,KP={controlPoints:{get:function(e){return e.renderer().getControlPoints(e)},mult:!0},segmentPoints:{get:function(e){return e.renderer().getSegmentPoints(e)},mult:!0},sourceEndpoint:{get:function(e){return e.renderer().getSourceEndpoint(e)}},targetEndpoint:{get:function(e){return e.renderer().getTargetEndpoint(e)}},midpoint:{get:function(e){return e.renderer().getEdgeMidpoint(e)}}},lq=Object.keys(KP).reduce(function(r,e){var t=KP[e],n=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)}(e);return r[e]=function(){return function(e,t){if(e.isEdge()&&e.takesUpSpace())return t(e)}(this,t.get)},r[n]=t.mult?function(){return function(e,t){if(e.isEdge()&&e.takesUpSpace()){var n=e.cy(),i=n.pan(),o=n.zoom();return t(e).map(function(a){return _p(a,o,i)})}}(this,t.get)}:function(){return function(e,t){if(e.isEdge()&&e.takesUpSpace()){var n=e.cy();return _p(t(e),n.zoom(),n.pan())}}(this,t.get)},r},{}),uq=fr({},KG,QG,JG,lq),XP=function(e,t){this.recycle(e,t)};function Yh(){return!1}function Vp(){return!0}XP.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=Yh,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Vp:Yh):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=null!=t.type?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var n=this.position,i=this.cy.zoom(),o=this.cy.pan();this.renderedPosition={x:n.x*i+o.x,y:n.y*i+o.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=Vp;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Vp;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Vp,this.stopPropagation()},isDefaultPrevented:Yh,isPropagationStopped:Yh,isImmediatePropagationStopped:Yh};var YP=/^([^.]+)(\.(?:[^.]+))?$/,QP={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},JP=Object.keys(QP),hq={};function Bp(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hq,e=arguments.length>1?arguments[1]:void 0,t=0;t<JP.length;t++){var n=JP[t];this[n]=r[n]||QP[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}var Ts=Bp.prototype,ZP=function(e,t,n,i,o,a,s){xn(i)&&(o=i,i=null),s&&(a=null==a?s:fr({},a,s));for(var l=an(n)?n:n.split(/\s+/),u=0;u<l.length;u++){var c=l[u];if(!cs(c)){var h=c.match(YP);if(h&&!1===t(e,c,h[1],h[2]?h[2]:null,i,o,a))break}}},ek=function(e,t){return e.addEventFields(e.context,t),new XP(t.type,t)};Ts.on=Ts.addListener=function(r,e,t,n,i){return ZP(this,function(o,a,s,l,u,c,h){xn(c)&&o.listeners.push({event:a,callback:c,type:s,namespace:l,qualifier:u,conf:h})},r,e,t,n,i),this},Ts.one=function(r,e,t,n){return this.on(r,e,t,n,{one:!0})},Ts.removeListener=Ts.off=function(r,e,t,n){var i=this;0!==this.emitting&&(this.listeners=function(e){return e.slice()}(this.listeners));for(var o=this.listeners,a=function(u){var c=o[u];ZP(i,function(h,d,p,g,y,v){if((c.type===p||"*"===r)&&(!g&&".*"!==c.namespace||c.namespace===g)&&(!y||h.qualifierCompare(c.qualifier,y))&&(!v||c.callback===v))return o.splice(u,1),!1},r,e,t,n)},s=o.length-1;s>=0;s--)a(s);return this},Ts.removeAllListeners=function(){return this.removeListener("*")},Ts.emit=Ts.trigger=function(r,e,t){var n=this.listeners,i=n.length;return this.emitting++,an(e)||(e=[e]),function(e,t,n){if(function(e){return"event"===kh(e)}(n))t(e,n);else if(Ur(n))t(e,ek(e,n));else for(var i=an(n)?n:n.split(/\s+/),o=0;o<i.length;o++){var a=i[o];if(!cs(a)){var s=a.match(YP);s&&t(e,ek(e,{type:s[1],namespace:s[2]?s[2]:null,target:e.context}))}}}(this,function(o,a){null!=t&&(i=(n=[{event:a.event,type:a.type,namespace:a.namespace,callback:t}]).length);for(var s=function(){var c=n[l];if(c.type===a.type&&(!c.namespace||c.namespace===a.namespace||".*"===c.namespace)&&o.eventMatches(o.context,c,a)){var h=[a];null!=e&&function(e,t){for(var n=0;n<t.length;n++)e.push(t[n])}(h,e),o.beforeEmit(o.context,c,a),c.conf&&c.conf.one&&(o.listeners=o.listeners.filter(function(g){return g!==c}));var d=o.callbackContext(o.context,c,a),p=c.callback.apply(d,h);o.afterEmit(o.context,c,a),!1===p&&(a.stopPropagation(),a.preventDefault())}},l=0;l<i;l++)s();o.bubble(o.context)&&!a.isPropagationStopped()&&o.parent(o.context).emit(a,e)},r),this.emitting--,this};var fq={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var i=t.qualifier;return null==i||e!==n.target&&Dh(n.target)&&i.matches(n.target)},addEventFields:function(e,t){t.cy=e.cy(),t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e},beforeEmit:function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},Up=function(e){return sr(e)?new ys(e):e},tk={createEmitter:function(){for(var e=0;e<this.length;e++){var t=this[e],n=t._private;n.emitter||(n.emitter=new Bp(fq,t))}return this},emitter:function(){return this._private.emitter},on:function(e,t,n){for(var i=Up(t),o=0;o<this.length;o++)this[o].emitter().on(e,i,n);return this},removeListener:function(e,t,n){for(var i=Up(t),o=0;o<this.length;o++)this[o].emitter().removeListener(e,i,n);return this},removeAllListeners:function(){for(var e=0;e<this.length;e++)this[e].emitter().removeAllListeners();return this},one:function(e,t,n){for(var i=Up(t),o=0;o<this.length;o++)this[o].emitter().one(e,i,n);return this},once:function(e,t,n){for(var i=Up(t),o=0;o<this.length;o++)this[o].emitter().on(e,i,n,{once:!0,onceCollection:this})},emit:function(e,t){for(var n=0;n<this.length;n++)this[n].emitter().emit(e,t);return this},emitAndNotify:function(e,t){if(0!==this.length)return this.cy().notify(e,this),this.emit(e,t),this}};Xr.eventAliasesOn(tk);var rk={nodes:function(e){return this.filter(function(t){return t.isNode()}).filter(e)},edges:function(e){return this.filter(function(t){return t.isEdge()}).filter(e)},byGroup:function(){for(var e=this.spawn(),t=this.spawn(),n=0;n<this.length;n++){var i=this[n];i.isNode()?e.push(i):t.push(i)}return{nodes:e,edges:t}},filter:function(e,t){if(void 0===e)return this;if(sr(e)||vo(e))return new ys(e).filter(this);if(xn(e)){for(var n=this.spawn(),i=this,o=0;o<i.length;o++){var a=i[o];(t?e.apply(t,[a,o,i]):e(a,o,i))&&n.push(a)}return n}return this.spawn()},not:function(e){if(e){sr(e)&&(e=this.filter(e));for(var t=this.spawn(),n=0;n<this.length;n++){var i=this[n];e.has(i)||t.push(i)}return t}return this},absoluteComplement:function(){return this.cy().mutableElements().not(this)},intersect:function(e){if(sr(e))return this.filter(e);for(var n=this.spawn(),a=this.length<e.length,s=a?this:e,l=a?e:this,u=0;u<s.length;u++){var c=s[u];l.has(c)&&n.push(c)}return n},xor:function(e){var t=this._private.cy;sr(e)&&(e=t.$(e));var n=this.spawn(),o=e,a=function(l,u){for(var c=0;c<l.length;c++){var h=l[c];u.hasElementWithId(h._private.data.id)||n.push(h)}};return a(this,o),a(o,this),n},diff:function(e){var t=this._private.cy;sr(e)&&(e=t.$(e));var n=this.spawn(),i=this.spawn(),o=this.spawn(),s=e,l=function(c,h,d){for(var p=0;p<c.length;p++){var g=c[p];h.hasElementWithId(g._private.data.id)?o.merge(g):d.push(g)}};return l(this,s,n),l(s,this,i),{left:n,right:i,both:o}},add:function(e){var t=this._private.cy;if(!e)return this;if(sr(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=this.spawnSelf(),o=0;o<e.length;o++){var a=e[o];!this.has(a)&&i.push(a)}return i},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&sr(e)){var i=e;e=n.mutableElements().filter(i)}for(var o=t.map,a=0;a<e.length;a++){var s=e[a],l=s._private.data.id;if(!o.has(l)){var c=this.length++;this[c]=s,o.set(l,{ele:s,index:c})}}return this},unmergeAt:function(e){var n=this[e].id(),o=this._private.map;if(this[e]=void 0,o.delete(n),this.length>1&&e!==this.length-1){var s=this.length-1,l=this[s],u=l._private.data.id;this[s]=void 0,this[e]=l,o.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){var o=this._private.map.get((e=e[0])._private.data.id);return o?(this.unmergeAt(o.index),this):this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&sr(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=0;i<e.length;i++)this.unmergeOne(e[i]);return this},unmergeBy:function(e){for(var t=this.length-1;t>=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],i=this,o=0;o<i.length;o++){var a=i[o],s=t?e.apply(t,[a,o,i]):e(a,o,i);n.push(s)}return n},reduce:function(e,t){for(var n=t,i=this,o=0;o<i.length;o++)n=e(n,i[o],o,i);return n},max:function(e,t){for(var i,n=-1/0,o=this,a=0;a<o.length;a++){var s=o[a],l=t?e.apply(t,[s,a,o]):e(s,a,o);l>n&&(n=l,i=s)}return{value:n,ele:i}},min:function(e,t){for(var i,n=1/0,o=this,a=0;a<o.length;a++){var s=o[a],l=t?e.apply(t,[s,a,o]):e(s,a,o);l<n&&(n=l,i=s)}return{value:n,ele:i}}},$r=rk;$r.u=$r["|"]=$r["+"]=$r.union=$r.or=$r.add,$r["\\"]=$r["!"]=$r["-"]=$r.difference=$r.relativeComplement=$r.subtract=$r.not,$r.n=$r["&"]=$r["."]=$r.and=$r.intersection=$r.intersect,$r["^"]=$r["(+)"]=$r["(-)"]=$r.symmetricDifference=$r.symdiff=$r.xor,$r.fnFilter=$r.filterFn=$r.stdFilter=$r.filter,$r.complement=$r.abscomp=$r.absoluteComplement;var e,nk=function(e,t){var i=e.cy().hasCompoundNodes();function o(c){var h=c.pstyle("z-compound-depth");return"auto"===h.value?i?c.zDepth():0:"bottom"===h.value?-1:"top"===h.value?xb:0}var a=o(e)-o(t);if(0!==a)return a;function s(c){return"auto"===c.pstyle("z-index-compare").value&&c.isNode()?1:0}var l=s(e)-s(t);if(0!==l)return l;var u=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==u?u:e.poolIndex()-t.poolIndex()},zp={forEach:function(e,t){if(xn(e))for(var n=this.length,i=0;i<n;i++){var o=this[i];if(!1===(t?e.apply(t,[o,i,this]):e(o,i,this)))break}return this},toArray:function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},slice:function(e,t){var n=[],i=this.length;null==t&&(t=i),null==e&&(e=0),e<0&&(e=i+e),t<0&&(t=i+t);for(var o=e;o>=0&&o<t&&o<i;o++)n.push(this[o]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(e){if(!xn(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(nk)},zDepth:function(){var e=this[0];if(e){var t=e._private;if("nodes"===t.group){var i=t.data.parent?e.parents().size():0;return e.isParent()?i:xb-1}var a=t.target,s=t.source.zDepth(),l=a.zDepth();return Math.max(s,l,0)}}};zp.each=zp.forEach,e="undefined",(typeof Symbol>"u"?"undefined":ei(Symbol))!=e&&ei(Symbol.iterator)!=e&&(zp[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},o=0,a=this.length;return hS({next:function(){return o<a?i.value=n[o++]:(i.value=void 0,i.done=!0),i}},Symbol.iterator,function(){return this})});var mq=Ei({nodeDimensionsIncludeLabels:!1}),Gp={layoutDimensions:function(e){var t;if(e=mq(e),this.takesUpSpace())if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();t={w:n.w,h:n.h}}else t={w:this.outerWidth(),h:this.outerHeight()};else t={w:0,h:0};return(0===t.w||0===t.h)&&(t.w=t.h=1),t},layoutPositions:function(e,t,n){var i=this.nodes().filter(function(ne){return!ne.isParent()}),o=this.cy(),a=t.eles,s=function(re){return re.id()},l=Pu(n,s);e.emit({type:"layoutstart",layout:e}),e.animations=[];var c=t.spacingFactor&&1!==t.spacingFactor,d=function(){if(!c)return null;for(var re=Ki(),A=0;A<i.length;A++){var M=l(i[A],A);ZS(re,M.x,M.y)}return re}(),p=Pu(function(ne,re){var A=l(ne,re);return c&&(A=function(re,A,C){var M_x=A.x1+A.w/2,M_y=A.y1+A.h/2;return{x:M_x+(C.x-M_x)*re,y:M_y+(C.y-M_y)*re}}(Math.abs(t.spacingFactor),d,A)),null!=t.transform&&(A=t.transform(ne,A)),A},s);if(t.animate){for(var g=0;g<i.length;g++){var y=i[g],v=p(y,g);if(null==t.animateFilter||t.animateFilter(y,g)){var _=y.animation({position:v,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(_)}else y.position(v)}if(t.fit){var I=o.animation({fit:{boundingBox:a.boundingBoxAt(p),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(I)}else if(void 0!==t.zoom&&void 0!==t.pan){var U=o.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(U)}e.animations.forEach(function(ne){return ne.play()}),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),Bu.all(e.animations.map(function(ne){return ne.promise()})).then(function(){e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e})})}else i.positions(p),t.fit&&o.fit(t.eles,t.padding),null!=t.zoom&&o.zoom(t.zoom),t.pan&&o.pan(t.pan),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e});return this},layout:function(e){return this.cy().makeLayout(fr({},e,{eles:this}))}};function ik(r,e,t){var o,n=t._private,i=n.styleCache=n.styleCache||[];return null!=(o=i[r])||(o=i[r]=e(t)),o}function qp(r,e){return r=pl(r),function(n){return ik(r,e,n)}}function jp(r,e){r=pl(r);var t=function(i){return e.call(i)};return function(){var i=this[0];if(i)return ik(r,t,i)}}Gp.createLayout=Gp.makeLayout=Gp.layout;var Ti={recalculateRenderedStyle:function(e){var t=this.cy(),n=t.renderer(),i=t.styleEnabled();return n&&i&&n.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var n,e=this.cy(),t=function(o){return o._private.styleCache=null};return e.hasCompoundNodes()?((n=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(n.connectedEdges()),n.forEach(t)):this.forEach(function(i){t(i),i.connectedEdges().forEach(t)}),this},updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t.batching())return t._private.batchStyleEles.merge(this),this;var o=this;e=!(!e&&void 0!==e),t.hasCompoundNodes()&&(o=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var a=o;return e?a.emitAndNotify("style"):a.emit("style"),o.forEach(function(s){return s._private.styleDirty=!0}),this},cleanStyle:function(){var e=this.cy();if(e.styleEnabled())for(var t=0;t<this.length;t++){var n=this[t];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},parsedStyle:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this[0],i=n.cy();if(i.styleEnabled()&&n)return n._private.styleDirty&&(n._private.styleDirty=!1,i.style().apply(n)),n._private.style[e]??(t?i.style().getDefaultProperty(e):null)},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,o=n.style();if(Ur(e))o.applyBypass(this,e,i),this.emitAndNotify("style");else if(sr(e)){if(void 0===t){var s=this[0];return s?o.getStylePropertyValue(s,e):void 0}o.applyBypass(this,e,t,i),this.emitAndNotify("style")}else if(void 0===e){var l=this[0];return l?o.getRawStyle(l):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,i=t.style(),o=this;if(void 0===e)for(var a=0;a<o.length;a++)i.removeAllBypasses(o[a],n);else{e=e.split(/\s+/);for(var l=0;l<o.length;l++)i.removeBypasses(o[l],e,n)}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var t=e.hasCompoundNodes(),n=this[0];if(n){var i=n._private,o=n.pstyle("opacity").value;if(!t)return o;var a=i.data.parent?n.parents():null;if(a)for(var s=0;s<a.length;s++)o*=a[s].pstyle("opacity").value;return o}},transparent:function(){if(!this.cy().styleEnabled())return!1;var t=this[0],n=t.cy().hasCompoundNodes();return t?n?0===t.effectiveOpacity():0===t.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}};function Y0(r,e){var n=r._private.data.parent?r.parents():null;if(n)for(var i=0;i<n.length;i++)if(!e(n[i]))return!1;return!0}function Q0(r){var e=r.ok,t=r.edgeOkViaNode||r.ok,n=r.parentOk||r.ok;return function(){var i=this.cy();if(!i.styleEnabled())return!0;var o=this[0],a=i.hasCompoundNodes();if(o){var s=o._private;if(!e(o))return!1;if(o.isNode())return!a||Y0(o,n);var l=s.source,u=s.target;return t(l)&&(!a||Y0(l,t))&&(l===u||t(u)&&(!a||Y0(u,t)))}}}var ju=qp("eleTakesUpSpace",function(r){return"element"===r.pstyle("display").value&&0!==r.width()&&(!r.isNode()||0!==r.height())});Ti.takesUpSpace=jp("takesUpSpace",Q0({ok:ju}));var vq=qp("eleInteractive",function(r){return"yes"===r.pstyle("events").value&&"visible"===r.pstyle("visibility").value&&ju(r)}),yq=qp("parentInteractive",function(r){return"visible"===r.pstyle("visibility").value&&ju(r)});Ti.interactive=jp("interactive",Q0({ok:vq,parentOk:yq,edgeOkViaNode:ju})),Ti.noninteractive=function(){var r=this[0];if(r)return!r.interactive()};var wq=qp("eleVisible",function(r){return"visible"===r.pstyle("visibility").value&&0!==r.pstyle("opacity").pfValue&&ju(r)});Ti.visible=jp("visible",Q0({ok:wq,edgeOkViaNode:ju})),Ti.hidden=function(){var r=this[0];if(r)return!r.visible()},Ti.isBundledBezier=jp("isBundledBezier",function(){return!!this.cy().styleEnabled()&&!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace()}),Ti.bypass=Ti.css=Ti.style,Ti.renderedCss=Ti.renderedStyle,Ti.removeBypass=Ti.removeCss=Ti.removeStyle,Ti.pstyle=Ti.parsedStyle;var Is={};function ok(r){return function(){var e=arguments,t=[];if(2===e.length)this.on(r.event,e[0],e[1]);else if(1===e.length&&xn(e[0]))this.on(r.event,e[0]);else if(0===e.length||1===e.length&&an(e[0])){for(var a=1===e.length?e[0]:null,s=0;s<this.length;s++){var l=this[s],u=!r.ableField||l._private[r.ableField],c=l._private[r.field]!=r.value;if(r.overrideAble){var h=r.overrideAble(l);if(void 0!==h&&(u=h,!h))return this}u&&(l._private[r.field]=r.value,c&&t.push(l))}var d=this.spawn(t);d.updateStyle(),d.emit(r.event),a&&d.emit(a)}return this}}function Hu(r){Is[r.field]=function(){var e=this[0];if(e){if(r.overrideField){var t=r.overrideField(e);if(void 0!==t)return t}return e._private[r.field]}},Is[r.on]=ok({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),Is[r.off]=ok({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}Hu({field:"locked",overrideField:function(e){return!!e.cy().autolock()||void 0},on:"lock",off:"unlock"}),Hu({field:"grabbable",overrideField:function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},on:"grabify",off:"ungrabify"}),Hu({field:"selected",ableField:"selectable",overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),Hu({field:"selectable",overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),Is.deselect=Is.unselect,Is.grabbed=function(){var r=this[0];if(r)return r._private.grabbed},Hu({field:"active",on:"activate",off:"unactivate"}),Hu({field:"pannable",on:"panify",off:"unpanify"}),Is.inactive=function(){var r=this[0];if(r)return!r._private.active};var Vi={},ak=function(e){return function(n){for(var o=[],a=0;a<this.length;a++){var s=this[a];if(s.isNode()){for(var l=!1,u=s.connectedEdges(),c=0;c<u.length;c++){var h=u[c],d=h.source(),p=h.target();if(e.noIncomingEdges&&p===s&&d!==s||e.noOutgoingEdges&&d===s&&p!==s){l=!0;break}}l||o.push(s)}}return this.spawn(o,!0).filter(n)}},sk=function(e){return function(t){for(var i=[],o=0;o<this.length;o++){var a=this[o];if(a.isNode())for(var s=a.connectedEdges(),l=0;l<s.length;l++){var u=s[l],c=u.source(),h=u.target();e.outgoing&&c===a?(i.push(u),i.push(h)):e.incoming&&h===a&&(i.push(u),i.push(c))}}return this.spawn(i,!0).filter(t)}},lk=function(e){return function(t){for(var n=this,i=[],o={};;){var a=e.outgoing?n.outgoers():n.incomers();if(0===a.length)break;for(var s=!1,l=0;l<a.length;l++){var u=a[l],c=u.id();o[c]||(o[c]=!0,i.push(u),s=!0)}if(!s)break;n=a}return this.spawn(i,!0).filter(t)}};function uk(r){return function(t){for(var n=[],i=0;i<this.length;i++){var a=this[i]._private[r.attr];a&&n.push(a)}return this.spawn(n,!0).filter(t)}}function ck(r){return function(t){var n=[],i=this._private.cy,o=r||{};sr(t)&&(t=i.$(t));for(var a=0;a<t.length;a++)for(var s=t[a]._private.edges,l=0;l<s.length;l++){var u=s[l],c=u._private.data,h=this.hasElementWithId(c.source)&&t.hasElementWithId(c.target),d=t.hasElementWithId(c.source)&&this.hasElementWithId(c.target);(h||d)&&((o.thisIsSrc||o.thisIsTgt)&&(o.thisIsSrc&&!h||o.thisIsTgt&&!d)||n.push(u))}return this.spawn(n,!0)}}function hk(r){return r=fr({},{codirected:!1},r),function(n){for(var i=[],o=this.edges(),a=r,s=0;s<o.length;s++)for(var u=o[s]._private,c=u.source,h=c._private.data.id,d=u.data.target,p=c._private.edges,g=0;g<p.length;g++){var y=p[g],v=y._private.data,m=v.target,_=v.source,I=m===d&&_===h;(a.codirected&&I||!a.codirected&&(I||h===m&&d===_))&&i.push(y)}return this.spawn(i,!0).filter(n)}}Vi.clearTraversalCache=function(){for(var r=0;r<this.length;r++)this[r]._private.traversalCache=null},fr(Vi,{roots:ak({noIncomingEdges:!0}),leaves:ak({noOutgoingEdges:!0}),outgoers:xo(sk({outgoing:!0}),"outgoers"),successors:lk({outgoing:!0}),incomers:xo(sk({incoming:!0}),"incomers"),predecessors:lk({})}),fr(Vi,{neighborhood:xo(function(r){for(var e=[],t=this.nodes(),n=0;n<t.length;n++)for(var i=t[n],o=i.connectedEdges(),a=0;a<o.length;a++){var s=o[a],l=s.source(),u=s.target(),c=i===l?u:l;c.length>0&&e.push(c[0]),e.push(s[0])}return this.spawn(e,!0).filter(r)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),Vi.neighbourhood=Vi.neighborhood,Vi.closedNeighbourhood=Vi.closedNeighborhood,Vi.openNeighbourhood=Vi.openNeighborhood,fr(Vi,{source:xo(function(e){var n,t=this[0];return t&&(n=t._private.source||t.cy().collection()),n&&e?n.filter(e):n},"source"),target:xo(function(e){var n,t=this[0];return t&&(n=t._private.target||t.cy().collection()),n&&e?n.filter(e):n},"target"),sources:uk({attr:"source"}),targets:uk({attr:"target"})}),fr(Vi,{edgesWith:xo(ck(),"edgesWith"),edgesTo:xo(ck({thisIsSrc:!0}),"edgesTo")}),fr(Vi,{connectedEdges:xo(function(r){for(var e=[],n=0;n<this.length;n++){var i=this[n];if(i.isNode())for(var o=i._private.edges,a=0;a<o.length;a++)e.push(o[a])}return this.spawn(e,!0).filter(r)},"connectedEdges"),connectedNodes:xo(function(r){for(var e=[],n=0;n<this.length;n++){var i=this[n];i.isEdge()&&(e.push(i.source()[0]),e.push(i.target()[0]))}return this.spawn(e,!0).filter(r)},"connectedNodes"),parallelEdges:xo(hk(),"parallelEdges"),codirectedEdges:xo(hk({codirected:!0}),"codirectedEdges")}),fr(Vi,{components:function(e){var t=this,n=t.cy(),i=n.collection(),o=null==e?t.nodes():e.nodes(),a=[];null!=e&&o.empty()&&(o=e.sources());var s=function(c,h){i.merge(c),o.unmerge(c),h.merge(c)};if(o.empty())return t.spawn();var l=function(){var c=n.collection();a.push(c);var h=o[0];s(h,c),t.bfs({directed:!1,roots:h,visit:function(p){return s(p,c)}}),c.forEach(function(d){d.connectedEdges().forEach(function(p){t.has(p)&&c.has(p.source())&&c.has(p.target())&&c.merge(p)})})};do{l()}while(o.length>0);return a},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),Vi.componentsOf=Vi.components;var Ii=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var o=new Pa,a=!1;if(t){if(t.length>0&&Ur(t[0])&&!Dh(t[0])){a=!0;for(var s=[],l=new Du,u=0,c=t.length;u<c;u++){var h=t[u];null==h.data&&(h.data={});var d=h.data;if(null==d.id)d.id=WS();else if(e.hasElementWithId(d.id)||l.has(d.id))continue;var p=new yp(e,h,!1);s.push(p),l.add(d.id)}t=s}}else t=[];this.length=0;for(var g=0,y=t.length;g<y;g++){var v=t[g][0];if(null!=v){var m=v._private.data.id;(!n||!o.has(m))&&(n&&o.set(m,{index:this.length,ele:v}),this[this.length]=v,this.length++)}}this._private={eles:this,cy:e,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(_){this.lazyMap=_},rebuildMap:function(){for(var I=this.lazyMap=new Pa,U=this.eles,ne=0;ne<U.length;ne++){var re=U[ne];I.set(re.id(),{index:ne,ele:re})}}},n&&(this._private.map=o),a&&!i&&this.restore()}else bn("A collection must have a reference to the core")},cn=yp.prototype=Ii.prototype=Object.create(Array.prototype);cn.instanceString=function(){return"collection"},cn.spawn=function(r,e){return new Ii(this.cy(),r,e)},cn.spawnSelf=function(){return this.spawn(this)},cn.cy=function(){return this._private.cy},cn.renderer=function(){return this._private.cy.renderer()},cn.element=function(){return this[0]},cn.collection=function(){return gS(this)?this:new Ii(this._private.cy,[this])},cn.unique=function(){return new Ii(this._private.cy,this,!0)},cn.hasElementWithId=function(r){return this._private.map.has(r=""+r)},cn.getElementById=function(r){var e=this._private.cy,t=this._private.map.get(r=""+r);return t?t.ele:new Ii(e)},cn.$id=cn.getElementById,cn.poolIndex=function(){return this._private.cy._private.elements._private.map.get(this[0]._private.data.id).index},cn.indexOf=function(r){return this._private.map.get(r[0]._private.data.id).index},cn.indexOfId=function(r){return this._private.map.get(r=""+r).index},cn.json=function(r){var e=this.element(),t=this.cy();if(null==e&&r)return this;if(null!=e){var n=e._private;if(Ur(r)){if(t.startBatch(),r.data){e.data(r.data);var i=n.data;if(e.isEdge()){var o=!1,a={},s=r.data.source,l=r.data.target;null!=s&&s!=i.source&&(a.source=""+s,o=!0),null!=l&&l!=i.target&&(a.target=""+l,o=!0),o&&(e=e.move(a))}else{var c=r.data.parent;"parent"in r.data&&(null!=c||null!=i.parent)&&c!=i.parent&&(void 0===c&&(c=null),null!=c&&(c=""+c),e=e.move({parent:c}))}}r.position&&e.position(r.position);var h=function(y,v,m){var _=r[y];null!=_&&_!==n[y]&&(_?e[v]():e[m]())};return h("removed","remove","restore"),h("selected","select","unselect"),h("selectable","selectify","unselectify"),h("locked","lock","unlock"),h("grabbable","grabify","ungrabify"),h("pannable","panify","unpanify"),null!=r.classes&&e.classes(r.classes),t.endBatch(),this}if(void 0===r){var d={data:ta(n.data),position:ta(n.position),group:n.group,removed:n.removed,selected:n.selected,selectable:n.selectable,locked:n.locked,grabbable:n.grabbable,pannable:n.pannable,classes:""},p=0;return n.classes.forEach(function(g){return d.classes+=0===p++?g:" "+g}),d}}},cn.jsons=function(){for(var r=[],e=0;e<this.length;e++){var n=this[e].json();r.push(n)}return r},cn.clone=function(){for(var r=this.cy(),e=[],t=0;t<this.length;t++){var i=this[t].json(),o=new yp(r,i,!1);e.push(o)}return new Ii(r,e)},cn.copy=cn.clone,cn.restore=function(){for(var s,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=this,n=t.cy(),i=n._private,o=[],a=[],l=0,u=t.length;l<u;l++){var c=t[l];e&&!c.removed()||(c.isNode()?o.push(c):a.push(c))}s=o.concat(a);var h,d=function(){s.splice(h,1),h--};for(h=0;h<s.length;h++){var p=s[h],g=p._private,y=g.data;if(p.clearTraversalCache(),e||g.removed)if(void 0===y.id)y.id=WS();else if(Bt(y.id))y.id=""+y.id;else{if(cs(y.id)||!sr(y.id)){bn("Can not create element with invalid string ID `"+y.id+"`"),d();continue}if(n.hasElementWithId(y.id)){bn("Can not create second element with ID `"+y.id+"`"),d();continue}}var v=y.id;if(p.isNode()){var m=g.position;null==m.x&&(m.x=0),null==m.y&&(m.y=0)}if(p.isEdge()){for(var _=p,I=["source","target"],U=I.length,ne=!1,re=0;re<U;re++){var A=I[re],C=y[A];Bt(C)&&(C=y[A]=""+y[A]),null==C||""===C?(bn("Can not create edge `"+v+"` with unspecified "+A),ne=!0):n.hasElementWithId(C)||(bn("Can not create edge `"+v+"` with nonexistant "+A+" `"+C+"`"),ne=!0)}if(ne){d();continue}var M=n.getElementById(y.source),q=n.getElementById(y.target);M.same(q)?M._private.edges.push(_):(M._private.edges.push(_),q._private.edges.push(_)),_._private.source=M,_._private.target=q}g.map=new Pa,g.map.set(v,{ele:p,index:0}),g.removed=!1,e&&n.addToPool(p)}for(var z=0;z<o.length;z++){var K=o[z],B=K._private.data;Bt(B.parent)&&(B.parent=""+B.parent);var me=B.parent;if(null!=me||K._private.parent){var xe=K._private.parent?n.collection().merge(K._private.parent):n.getElementById(me);if(xe.empty())B.parent=void 0;else if(xe[0].removed())Kr("Node added with missing parent, reference to parent removed"),B.parent=void 0,K._private.parent=null;else{for(var we=!1,Re=xe;!Re.empty();){if(K.same(Re)){we=!0,B.parent=void 0;break}Re=Re.parent()}we||(xe[0]._private.children.push(K),K._private.parent=xe[0],i.hasCompoundNodes=!0)}}}if(s.length>0){for(var je=s.length===t.length?t:new Ii(n,s),We=0;We<je.length;We++){var Pe=je[We];Pe.isNode()||(Pe.parallelEdges().clearTraversalCache(),Pe.source().clearTraversalCache(),Pe.target().clearTraversalCache())}(i.hasCompoundNodes?n.collection().merge(je).merge(je.connectedNodes()).merge(je.parent()):je).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(r),r?je.emitAndNotify("add"):e&&je.emit("add")}return t},cn.removed=function(){var r=this[0];return r&&r._private.removed},cn.inside=function(){var r=this[0];return r&&!r._private.removed},cn.remove=function(){var r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=this,n=[],i={},o=t._private.cy;function l(me){var be=i[me.id()];e&&me.removed()||be||(i[me.id()]=!0,me.isNode()?(n.push(me),function a(me){for(var be=me._private.edges,xe=0;xe<be.length;xe++)l(be[xe])}(me),function s(me){for(var be=me._private.children,xe=0;xe<be.length;xe++)l(be[xe])}(me)):n.unshift(me))}for(var u=0,c=t.length;u<c;u++)l(t[u]);function d(me,be){fs(me._private.edges,be),me.clearTraversalCache()}function p(me){me.clearTraversalCache()}var g=[];function y(me,be){be=be[0];var xe=(me=me[0])._private.children,we=me.id();fs(xe,be),be._private.parent=null,g.ids[we]||(g.ids[we]=!0,g.push(me))}g.ids={},t.dirtyCompoundBoundsCache(),e&&o.removeFromPool(n);for(var v=0;v<n.length;v++){var m=n[v];if(m.isEdge()){var _=m.source()[0],I=m.target()[0];d(_,m),d(I,m);for(var U=m.parallelEdges(),ne=0;ne<U.length;ne++){var re=U[ne];p(re),re.isBundledBezier()&&re.dirtyBoundingBoxCache()}}else{var A=m.parent();0!==A.length&&y(A,m)}e&&(m._private.removed=!0)}var C=o._private.elements;o._private.hasCompoundNodes=!1;for(var M=0;M<C.length;M++)if(C[M].isParent()){o._private.hasCompoundNodes=!0;break}var z=new Ii(this.cy(),n);z.size()>0&&(r?z.emitAndNotify("remove"):e&&z.emit("remove"));for(var K=0;K<g.length;K++){var B=g[K];(!e||!B.removed())&&B.updateStyle()}return z},cn.move=function(r){var e=this._private.cy,t=this,n=!1,i=!1,o=function(g){return null==g?g:""+g};if(void 0!==r.source||void 0!==r.target){var a=o(r.source),s=o(r.target),l=null!=a&&e.hasElementWithId(a),u=null!=s&&e.hasElementWithId(s);(l||u)&&(e.batch(function(){t.remove(n,i),t.emitAndNotify("moveout");for(var p=0;p<t.length;p++){var g=t[p],y=g._private.data;g.isEdge()&&(l&&(y.source=a),u&&(y.target=s))}t.restore(n,i)}),t.emitAndNotify("move"))}else if(void 0!==r.parent){var c=o(r.parent);if(null===c||e.hasElementWithId(c)){var d=null===c?void 0:c;e.batch(function(){var p=t.remove(n,i);p.emitAndNotify("moveout");for(var g=0;g<t.length;g++){var y=t[g],v=y._private.data;y.isNode()&&(v.parent=d)}p.restore(n,i)}),t.emitAndNotify("move")}}return this},[EC,kG,Lp,_s,zu,WG,Mp,uq,tk,rk,{isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},zp,Gp,Ti,Is,Vi].forEach(function(r){fr(cn,r)});var bq={add:function(e){var t,n=this;if(vo(e)){var i=e;if(i._private.cy===n)t=i.restore();else{for(var o=[],a=0;a<i.length;a++)o.push(i[a].json());t=new Ii(n,o)}}else if(an(e))t=new Ii(n,e);else if(Ur(e)&&(an(e.nodes)||an(e.edges))){for(var u=e,c=[],h=["nodes","edges"],d=0,p=h.length;d<p;d++){var g=h[d],y=u[g];if(an(y))for(var v=0,m=y.length;v<m;v++){var _=fr({group:g},y[v]);c.push(_)}}t=new Ii(n,c)}else t=new yp(n,e).collection();return t},remove:function(e){return vo(e)||sr(e)&&(e=this.$(e)),e.remove()}};function Eq(r,e,t,n){var u=.1,c=typeof Float32Array<"u";if(4!==arguments.length)return!1;for(var h=0;h<4;++h)if("number"!=typeof arguments[h]||isNaN(arguments[h])||!isFinite(arguments[h]))return!1;r=Math.min(r,1),t=Math.min(t,1),r=Math.max(r,0),t=Math.max(t,0);var d=c?new Float32Array(11):new Array(11);function p(q,z){return 1-3*z+3*q}function g(q,z){return 3*z-6*q}function y(q){return 3*q}function v(q,z,K){return((p(z,K)*q+g(z,K))*q+y(z))*q}function m(q,z,K){return 3*p(z,K)*q*q+2*g(z,K)*q+y(z)}var re=!1;var C=function(z){return re||function A(){re=!0,(r!==e||t!==n)&&function I(){for(var q=0;q<11;++q)d[q]=v(q*u,r,t)}()}(),r===e&&t===n?z:0===z?0:1===z?1:v(function ne(q){for(var z=0,K=1;10!==K&&d[K]<=q;++K)z+=u;--K;var be=z+(q-d[K])/(d[K+1]-d[K])*u,xe=m(be,r,t);return xe>=.001?function _(q,z){for(var K=0;K<4;++K){var B=m(z,r,t);if(0===B)return z;z-=(v(z,r,t)-q)/B}return z}(q,be):0===xe?be:function U(q,z,K){var B,me,be=0;do{(B=v(me=z+(K-z)/2,r,t)-q)>0?K=me:z=me}while(Math.abs(B)>1e-7&&++be<10);return me}(q,z,z+u)}(z),e,n)};C.getControlPoints=function(){return[{x:r,y:e},{x:t,y:n}]};var M="generateBezier("+[r,e,t,n]+")";return C.toString=function(){return M},C}var Tq=function(){function r(n){return-n.tension*n.x-n.friction*n.v}function e(n,i,o){var a={x:n.x+o.dx*i,v:n.v+o.dv*i,tension:n.tension,friction:n.friction};return{dx:a.v,dv:r(a)}}function t(n,i){var o={dx:n.v,dv:r(n)},a=e(n,.5*i,o),s=e(n,.5*i,a),l=e(n,i,s),c=1/6*(o.dv+2*(a.dv+s.dv)+l.dv);return n.x=n.x+1/6*(o.dx+2*(a.dx+s.dx)+l.dx)*i,n.v=n.v+c*i,n}return function n(i,o,a){var d,p,g,s={x:-1,v:0,tension:null,friction:null},l=[0],u=0,c=1e-4;for(i=parseFloat(i)||500,o=parseFloat(o)||20,a=a||null,s.tension=i,s.friction=o,p=(d=null!==a)?(u=n(i,o))/a*.016:.016;g=t(g||s,p),l.push(1+g.x),u+=16,Math.abs(g.x)>c&&Math.abs(g.v)>c;);return d?function(y){return l[y*(l.length-1)|0]}:u}}(),hn=function(e,t,n,i){var o=Eq(e,t,n,i);return function(a,s,l){return a+(s-a)*o(l)}},Hp={linear:function(e,t,n){return e+(t-e)*n},ease:hn(.25,.1,.25,1),"ease-in":hn(.42,0,1,1),"ease-out":hn(0,0,.58,1),"ease-in-out":hn(.42,0,.58,1),"ease-in-sine":hn(.47,0,.745,.715),"ease-out-sine":hn(.39,.575,.565,1),"ease-in-out-sine":hn(.445,.05,.55,.95),"ease-in-quad":hn(.55,.085,.68,.53),"ease-out-quad":hn(.25,.46,.45,.94),"ease-in-out-quad":hn(.455,.03,.515,.955),"ease-in-cubic":hn(.55,.055,.675,.19),"ease-out-cubic":hn(.215,.61,.355,1),"ease-in-out-cubic":hn(.645,.045,.355,1),"ease-in-quart":hn(.895,.03,.685,.22),"ease-out-quart":hn(.165,.84,.44,1),"ease-in-out-quart":hn(.77,0,.175,1),"ease-in-quint":hn(.755,.05,.855,.06),"ease-out-quint":hn(.23,1,.32,1),"ease-in-out-quint":hn(.86,0,.07,1),"ease-in-expo":hn(.95,.05,.795,.035),"ease-out-expo":hn(.19,1,.22,1),"ease-in-out-expo":hn(1,0,0,1),"ease-in-circ":hn(.6,.04,.98,.335),"ease-out-circ":hn(.075,.82,.165,1),"ease-in-out-circ":hn(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Hp.linear;var i=Tq(e,t,n);return function(o,a,s){return o+(a-o)*i(s)}},"cubic-bezier":hn};function dk(r,e,t,n,i){if(1===n||e===t)return t;var o=i(e,t,n);return null==r||((r.roundValue||r.color)&&(o=Math.round(o)),void 0!==r.min&&(o=Math.max(o,r.min)),void 0!==r.max&&(o=Math.min(o,r.max))),o}function fk(r,e){return null!=r.pfValue||null!=r.value?null==r.pfValue||null!=e&&"%"===e.type.units?r.value:r.pfValue:r}function $u(r,e,t,n,i){var o=null!=i?i.type:null;t<0?t=0:t>1&&(t=1);var a=fk(r,i),s=fk(e,i);if(Bt(a)&&Bt(s))return dk(o,a,s,t,n);if(an(a)&&an(s)){for(var l=[],u=0;u<s.length;u++){var c=a[u],h=s[u];if(null!=c&&null!=h){var d=dk(o,c,h,t,n);l.push(d)}else l.push(h)}return l}}function Iq(r,e,t,n){var i=!n,o=r._private,a=e._private,s=a.easing,l=a.startTime,c=(n?r:r.cy()).style();if(!a.easingImpl)if(null==s)a.easingImpl=Hp.linear;else{var h,p,g;h=sr(s)?c.parse("transition-timing-function",s).value:s,sr(h)?(p=h,g=[]):(p=h[1],g=h.slice(2).map(function(je){return+je})),g.length>0?("spring"===p&&g.push(a.duration),a.easingImpl=Hp[p].apply(null,g)):a.easingImpl=Hp[p]}var v,y=a.easingImpl;if(v=0===a.duration?1:(t-l)/a.duration,a.applying&&(v=a.progress),v<0?v=0:v>1&&(v=1),null==a.delay){var m=a.startPosition,_=a.position;if(_&&i&&!r.locked()){var I={};Qh(m.x,_.x)&&(I.x=$u(m.x,_.x,v,y)),Qh(m.y,_.y)&&(I.y=$u(m.y,_.y,v,y)),r.position(I)}var U=a.startPan,ne=a.pan,re=o.pan,A=null!=ne&&n;A&&(Qh(U.x,ne.x)&&(re.x=$u(U.x,ne.x,v,y)),Qh(U.y,ne.y)&&(re.y=$u(U.y,ne.y,v,y)),r.emit("pan"));var C=a.startZoom,M=a.zoom,q=null!=M&&n;q&&(Qh(C,M)&&(o.zoom=zh(o.minZoom,$u(C,M,v,y),o.maxZoom)),r.emit("zoom")),(A||q)&&r.emit("viewport");var z=a.style;if(z&&z.length>0&&i){for(var K=0;K<z.length;K++){var B=z[K],me=B.name,xe=a.startStyle[me],Re=$u(xe,B,v,y,c.properties[xe.name]);c.overrideBypass(r,me,Re)}r.emit("style")}}return a.progress=v,v}function Qh(r,e){return!!(null!=r&&null!=e&&(Bt(r)&&Bt(e)||r&&e))}function xq(r,e,t,n){var i=e._private;i.started=!0,i.startTime=t-i.progress*i.duration}function pk(r,e){var t=e._private.aniEles,n=[];function i(c,h){var d=c._private,p=d.animation.current,g=d.animation.queue,y=!1;if(0===p.length){var v=g.shift();v&&p.push(v)}for(var m=function(re){for(var A=re.length-1;A>=0;A--)(0,re[A])();re.splice(0,re.length)},_=p.length-1;_>=0;_--){var I=p[_],U=I._private;U.stopped?(p.splice(_,1),U.hooked=!1,U.playing=!1,U.started=!1,m(U.frames)):!U.playing&&!U.applying||(U.playing&&U.applying&&(U.applying=!1),U.started||xq(0,I,r),Iq(c,I,r,h),U.applying&&(U.applying=!1),m(U.frames),null!=U.step&&U.step(r),I.completed()&&(p.splice(_,1),U.hooked=!1,U.playing=!1,U.started=!1,m(U.completes)),y=!0)}return!h&&0===p.length&&0===g.length&&n.push(c),y}for(var o=!1,a=0;a<t.length;a++){var l=i(t[a]);o=o||l}var u=i(e,!0);(o||u)&&(t.length>0?e.notify("draw",t):e.notify("draw")),t.unmerge(n),e.emit("step")}var Aq={animate:Xr.animate(),animation:Xr.animation(),animated:Xr.animated(),clearQueue:Xr.clearQueue(),delay:Xr.delay(),delayAnimation:Xr.delayAnimation(),stop:Xr.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(o,a){pk(a,e)},n.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&gp(function(o){pk(o,e),t()})}()}}},Rq={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var i=t.qualifier;return null==i||e!==n.target&&Dh(n.target)&&i.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},$p=function(e){return sr(e)?new ys(e):e},gk={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Bp(Rq,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,$p(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,$p(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,$p(t),n),this},once:function(e,t,n){return this.emitter().one(e,$p(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Xr.eventAliasesOn(gk);var J0={png:function(e){return this._private.renderer.png(e=e||{})},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};J0.jpeg=J0.jpg;var Wp={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var o,n=e.name,i=t.extension("layout",n);if(null!=i)return o=sr(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new i(fr({},e,{cy:t,eles:o}));bn("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else bn("A `name` must be specified to make a layout");else bn("Layout options must be specified to make a layout")}};Wp.createLayout=Wp.makeLayout=Wp.layout;var Sq={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&i.merge(t)}else if(n.notificationsEnabled){var o=this.renderer();this.destroyed()||!o||o.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var i=e.batchNotifications[n];i.empty()?t.notify(n):t.notify(n,i)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),i=0;i<n.length;i++){var o=n[i],a=e[o];t.getElementById(o).data(a)}})}},Cq=Ei({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),Z0={renderTo:function(e,t,n,i){return this._private.renderer.renderTo(e,t,n,i),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(e){var t=this,n=t.extension("renderer",e.name);if(null!=n){void 0!==e.wheelSensitivity&&Kr("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var i=Cq(e);i.cy=t,t._private.renderer=new n(i),this.notify("init")}else bn("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"))},destroyRenderer:function(){var e=this;e.notify("destroy");var t=e.container();if(t)for(t._cyreg=null;t.childNodes.length>0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Z0.invalidateDimensions=Z0.resize;var Kp={collection:function(e,t){return sr(e)?this.$(e):vo(e)?e.collection():an(e)?(t||(t={}),new Ii(this,e,t.unique,t.removed)):new Ii(this)},nodes:function(e){var t=this.$(function(n){return n.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(n){return n.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Kp.elements=Kp.filter=Kp.$;var fi={apply:function(r){for(var e=this,i=e._private.cy.collection(),o=0;o<r.length;o++){var a=r[o],s=e.getContextMeta(a);if(!s.empty){var l=e.getContextStyle(s),u=e.applyContextStyle(s,l,a);a._private.appliedInitStyle?e.updateTransitions(a,u.diffProps):a._private.appliedInitStyle=!0,e.updateStyleHints(a)&&i.push(a)}}return i},getPropertiesDiff:function(r,e){var t=this,n=t._private.propDiffs=t._private.propDiffs||{},i=r+"-"+e,o=n[i];if(o)return o;for(var a=[],s={},l=0;l<t.length;l++){var u=t[l],h="t"===e[l],d="t"===r[l]!==h,p=u.mappedProperties.length>0;if(d||h&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var y=0;y<g.length;y++){for(var v=g[y],m=v.name,_=!1,I=l+1;I<t.length&&("t"!==e[I]||!(_=null!=t[I].properties[v.name]));I++);!s[m]&&!_&&(s[m]=!0,a.push(m))}}}return n[i]=a,a},getContextMeta:function(r){for(var n,e=this,t="",i=r._private.styleCxtKey||"",o=0;o<e.length;o++){var a=e[o];t+=a.selector&&a.selector.matches(r)?"t":"f"}return n=e.getPropertiesDiff(i,t),r._private.styleCxtKey=t,{key:t,diffPropNames:n,empty:0===n.length}},getContextStyle:function(r){var e=r.key,n=this._private.contextStyles=this._private.contextStyles||{};if(n[e])return n[e];for(var i={_private:{key:e}},o=0;o<this.length;o++){var a=this[o];if("t"===e[o])for(var l=0;l<a.properties.length;l++){var u=a.properties[l];i[u.name]=u}}return n[e]=i,i},applyContextStyle:function(r,e,t){for(var i=r.diffPropNames,o={},a=this.types,s=0;s<i.length;s++){var l=i[s],u=e[l],c=t.pstyle(l);if(!u){if(!c)continue;u=c.bypass?{name:l,deleteBypassed:!0}:{name:l,delete:!0}}if(c!==u){if(u.mapped===a.fn&&null!=c&&null!=c.mapping&&c.mapping.value===u.value){var h=c.mapping;if((h.fnValue=u.value(t))===h.prevFnValue)continue}var p=o[l]={prev:c};this.applyParsedProperty(t,u),p.next=t.pstyle(l),p.next&&p.next.bypass&&(p.next=p.next.bypassed)}}return{diffProps:o}},updateStyleHints:function(r){var n,e=r._private,t=this,i=t.propertyGroupKeys,o=function(Xe,dt,Lt){return t.getPropertiesHash(Xe,dt,Lt)},a=e.styleKey;if(r.removed())return!1;var s="nodes"===e.group,l=r._private.style;n=Object.keys(l);for(var u=0;u<i.length;u++)e.styleKeys[i[u]]=[fl,ku];for(var h=function(Xe,dt){return e.styleKeys[dt][0]=Fh(Xe,e.styleKeys[dt][0])},d=function(Xe,dt){return e.styleKeys[dt][1]=Vh(Xe,e.styleKeys[dt][1])},p=function(Xe,dt){h(Xe,dt),d(Xe,dt)},g=function(Xe,dt){for(var Lt=0;Lt<Xe.length;Lt++){var er=Xe.charCodeAt(Lt);h(er,dt),d(er,dt)}},v=function(Xe){return-128<Xe&&Xe<128&&Math.floor(Xe)!==Xe?2e9-(1024*Xe|0):Xe},m=0;m<n.length;m++){var _=n[m],I=l[_];if(null!=I){var U=this.properties[_],ne=U.type,re=U.groupKey,A=void 0;null!=U.hashOverride?A=U.hashOverride(r,I):null!=I.pfValue&&(A=I.pfValue);var C=null==U.enums?I.value:null,M=null!=A,K=I.units;!ne.number||!M&&null==C||ne.multiple?g(I.strValue,re):(p(v(M?A:C),re),!M&&null!=K&&g(K,re))}}for(var me=[fl,ku],be=0;be<i.length;be++){var we=e.styleKeys[i[be]];me[0]=Fh(we[0],me[0]),me[1]=Vh(we[1],me[1])}e.styleKey=function(e,t){return 2097152*e+t}(me[0],me[1]);var Re=e.styleKeys;e.labelDimsKey=ds(Re.labelDimensions);var je=o(r,["label"],Re.labelDimensions);if(e.labelKey=ds(je),e.labelStyleKey=ds(mp(Re.commonLabel,je)),!s){var We=o(r,["source-label"],Re.labelDimensions);e.sourceLabelKey=ds(We),e.sourceLabelStyleKey=ds(mp(Re.commonLabel,We));var Pe=o(r,["target-label"],Re.labelDimensions);e.targetLabelKey=ds(Pe),e.targetLabelStyleKey=ds(mp(Re.commonLabel,Pe))}if(s){var Fe=e.styleKeys,Ut=Fe.pie,_t=Fe.stripe,Me=[Fe.nodeBody,Fe.nodeBorder,Fe.nodeOutline,Fe.backgroundImage,Fe.compound,Ut,_t].filter(function($e){return null!=$e}).reduce(mp,[fl,ku]);e.nodeKey=ds(Me),e.hasPie=null!=Ut&&Ut[0]!==fl&&Ut[1]!==ku,e.hasStripe=null!=_t&&_t[0]!==fl&&_t[1]!==ku}return a!==e.styleKey},clearStyleHints:function(r){var e=r._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null,e.hasStripe=null},applyParsedProperty:function(r,e){var o,t=this,n=e,i=r._private.style,a=t.types,s=t.properties[n.name].type,l=n.bypass,u=i[n.name],c=u&&u.bypass,h=r._private,d="mapping",p=function(lt){return null==lt?null:null!=lt.pfValue?lt.pfValue:lt.value},g=function(){var lt=p(u),mt=p(n);t.checkTriggers(r,n.name,lt,mt)};if("curve-style"===e.name&&r.isEdge()&&("bezier"!==e.value&&r.isLoop()||"haystack"===e.value&&(r.source().isParent()||r.target().isParent()))&&(n=e=this.parse(e.name,"bezier",l)),n.delete)return i[n.name]=void 0,g(),!0;if(n.deleteBypassed)return u?!!u.bypass&&(u.bypassed=void 0,g(),!0):(g(),!0);if(n.deleteBypass)return u?!!u.bypass&&(i[n.name]=u.bypassed,g(),!0):(g(),!0);var y=function(){Kr("Do not assign mappings to elements without corresponding data (i.e. ele `"+r.id()+"` has no mapping for property `"+n.name+"` with data field `"+n.field+"`); try a `["+n.field+"]` selector to limit scope to elements with `"+n.field+"` defined")};switch(n.mapped){case a.mapData:for(var v=n.field.split("."),m=h.data,_=0;_<v.length&&m;_++)m=m[v[_]];if(null==m)return y(),!1;var U;if(!Bt(m))return Kr("Do not use continuous mappers without specifying numeric data (i.e. `"+n.field+": "+m+"` for `"+r.id()+"` is non-numeric)"),!1;var ne=n.fieldMax-n.fieldMin;if((U=0===ne?0:(m-n.fieldMin)/ne)<0?U=0:U>1&&(U=1),s.color){var re=n.valueMin[0],C=n.valueMin[1],M=n.valueMax[1],q=n.valueMin[2],z=n.valueMax[2],K=null==n.valueMin[3]?1:n.valueMin[3],B=null==n.valueMax[3]?1:n.valueMax[3],me=[Math.round(re+(n.valueMax[0]-re)*U),Math.round(C+(M-C)*U),Math.round(q+(z-q)*U),Math.round(K+(B-K)*U)];o={bypass:n.bypass,name:n.name,value:me,strValue:"rgb("+me[0]+", "+me[1]+", "+me[2]+")"}}else{if(!s.number)return!1;o=this.parse(n.name,n.valueMin+(n.valueMax-n.valueMin)*U,n.bypass,d)}if(!o)return y(),!1;o.mapping=n,n=o;break;case a.data:for(var xe=n.field.split("."),we=h.data,Re=0;Re<xe.length&&we;Re++)we=we[xe[Re]];if(null!=we&&(o=this.parse(n.name,we,n.bypass,d)),!o)return y(),!1;o.mapping=n,n=o;break;case a.fn:var Pe=null!=n.fnValue?n.fnValue:(0,n.value)(r);if(n.prevFnValue=Pe,null==Pe)return Kr("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+r.id()+"` is null)"),!1;if(!(o=this.parse(n.name,Pe,n.bypass,d)))return Kr("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+r.id()+"` is invalid)"),!1;o.mapping=ta(n),n=o;break;case void 0:break;default:return!1}return l?(n.bypassed=c?u.bypassed:u,i[n.name]=n):c?u.bypassed=n:i[n.name]=n,g(),!0},cleanElements:function(r,e){for(var t=0;t<r.length;t++){var n=r[t];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),e)for(var i=n._private.style,o=Object.keys(i),a=0;a<o.length;a++){var s=o[a],l=i[s];null!=l&&(l.bypass?l.bypassed=null:i[s]=null)}else n._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateTransitions:function(r,e){var t=this,n=r._private,i=r.pstyle("transition-property").value,o=r.pstyle("transition-duration").pfValue,a=r.pstyle("transition-delay").pfValue;if(i.length>0&&o>0){for(var s={},l=!1,u=0;u<i.length;u++){var c=i[u],h=r.pstyle(c),d=e[c];if(d){var g=d.prev,y=null!=d.next?d.next:h,v=!1,m=void 0,_=1e-6;g&&(Bt(g.pfValue)&&Bt(y.pfValue)?m=g.pfValue+_*(v=y.pfValue-g.pfValue):Bt(g.value)&&Bt(y.value)?m=g.value+_*(v=y.value-g.value):an(g.value)&&an(y.value)&&(v=g.value[0]!==y.value[0]||g.value[1]!==y.value[1]||g.value[2]!==y.value[2],m=g.strValue),v&&(s[c]=y.strValue,this.applyBypass(r,c,m),l=!0))}}if(!l)return;n.transitioning=!0,new Bu(function(I){a>0?r.delayAnimation(a).play().promise().then(I):I()}).then(function(){return r.animation({style:s,duration:o,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){t.removeBypasses(r,i),r.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(r,i),r.emitAndNotify("style"),n.transitioning=!1)},checkTrigger:function(r,e,t,n,i,o){var a=this.properties[e],s=i(a);r.removed()||null!=s&&s(t,n,r)&&o(a)},checkZOrderTrigger:function(r,e,t,n){var i=this;this.checkTrigger(r,e,t,n,function(o){return o.triggersZOrder},function(){i._private.cy.notify("zorder",r)})},checkBoundsTrigger:function(r,e,t,n){this.checkTrigger(r,e,t,n,function(i){return i.triggersBounds},function(i){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache()})},checkConnectedEdgesBoundsTrigger:function(r,e,t,n){this.checkTrigger(r,e,t,n,function(i){return i.triggersBoundsOfConnectedEdges},function(i){r.connectedEdges().forEach(function(o){o.dirtyBoundingBoxCache()})})},checkParallelEdgesBoundsTrigger:function(r,e,t,n){this.checkTrigger(r,e,t,n,function(i){return i.triggersBoundsOfParallelEdges},function(i){r.parallelEdges().forEach(function(o){o.dirtyBoundingBoxCache()})})},checkTriggers:function(r,e,t,n){r.dirtyStyleCache(),this.checkZOrderTrigger(r,e,t,n),this.checkBoundsTrigger(r,e,t,n),this.checkConnectedEdgesBoundsTrigger(r,e,t,n),this.checkParallelEdgesBoundsTrigger(r,e,t,n)}},Zh={applyBypass:function(r,e,t,n){var o=[];if("*"===e||"**"===e){if(void 0!==t)for(var s=0;s<this.properties.length;s++){var c=this.parse(this.properties[s].name,t,!0);c&&o.push(c)}}else if(sr(e)){var h=this.parse(e,t,!0);h&&o.push(h)}else{if(!Ur(e))return!1;var d=e;n=t;for(var p=Object.keys(d),g=0;g<p.length;g++){var y=p[g],v=d[y];if(void 0===v&&(v=d[dp(y)]),void 0!==v){var m=this.parse(y,v,!0);m&&o.push(m)}}}if(0===o.length)return!1;for(var _=!1,I=0;I<r.length;I++){for(var U=r[I],ne={},re=void 0,A=0;A<o.length;A++){var C=o[A];if(n){var M=U.pstyle(C.name);re=ne[C.name]={prev:M}}_=this.applyParsedProperty(U,ta(C))||_,n&&(re.next=U.pstyle(C.name))}_&&this.updateStyleHints(U),n&&this.updateTransitions(U,ne,!0)}return _},overrideBypass:function(r,e,t){e=lb(e);for(var n=0;n<r.length;n++){var i=r[n],o=i._private.style[e],a=this.properties[e].type,s=a.color,l=a.mutiple,u=o?null!=o.pfValue?o.pfValue:o.value:null;o&&o.bypass?(o.value=t,null!=o.pfValue&&(o.pfValue=t),o.strValue=s?"rgb("+t.join(",")+")":l?t.join(" "):""+t,this.updateStyleHints(i)):this.applyBypass(i,e,t),this.checkTriggers(i,e,u,t)}},removeAllBypasses:function(r,e){return this.removeBypasses(r,this.propertyNames,e)},removeBypasses:function(r,e,t){for(var i=0;i<r.length;i++){for(var o=r[i],a={},s=0;s<e.length;s++){var l=e[s],u=this.properties[l],c=o.pstyle(u.name);if(c&&c.bypass){var d=this.parse(l,"",!0),p=a[u.name]={prev:c};this.applyParsedProperty(o,d),p.next=o.pstyle(u.name)}}this.updateStyleHints(o),t&&this.updateTransitions(o,a,!0)}}},eE={getEmSizeInPixels:function(){var r=this.containerCss("font-size");return null!=r?parseFloat(r):1},containerCss:function(r){var e=this._private.cy,t=e.container(),n=e.window();if(n&&t&&n.getComputedStyle)return n.getComputedStyle(t).getPropertyValue(r)}},ra={getRenderedStyle:function(r,e){return e?this.getStylePropertyValue(r,e,!0):this.getRawStyle(r,!0)},getRawStyle:function(r,e){var t=this;if(r=r[0]){for(var n={},i=0;i<t.properties.length;i++){var o=t.properties[i],a=t.getStylePropertyValue(r,o.name,e);null!=a&&(n[o.name]=a,n[dp(o.name)]=a)}return n}},getIndexedStyle:function(r,e,t,n){return r.pstyle(e)[t][n]??r.cy().style().getDefaultProperty(e)[t][0]},getStylePropertyValue:function(r,e,t){if(r=r[0]){var i=this.properties[e];i.alias&&(i=i.pointsTo);var o=i.type,a=r.pstyle(i.name);if(a){var s=a.value,l=a.units,u=a.strValue;if(t&&o.number&&null!=s&&Bt(s)){var c=r.cy().zoom(),h=function(v){return v*c},d=function(v,m){return h(v)+m},p=an(s);return(p?l.every(function(y){return null!=y}):null!=l)?p?s.map(function(y,v){return d(y,l[v])}).join(" "):d(s,l):p?s.map(function(y){return sr(y)?y:""+h(y)}).join(" "):""+h(s)}if(null!=u)return u}return null}},getAnimationStartStyle:function(r,e){for(var t={},n=0;n<e.length;n++){var o=e[n].name,a=r.pstyle(o);void 0!==a&&(a=Ur(a)?this.parse(o,a.strValue):this.parse(o,a)),a&&(t[o]=a)}return t},getPropsList:function(r){var t=[],n=r,i=this.properties;if(n)for(var o=Object.keys(n),a=0;a<o.length;a++){var s=o[a],l=n[s],u=i[s]||i[lb(s)],c=this.parse(u.name,l);c&&t.push(c)}return t},getNonDefaultPropertiesHash:function(r,e,t){var o,a,s,l,u,n=t.slice();for(l=0;l<e.length;l++)if(null!=(o=r.pstyle(e[l],!1)))if(null!=o.pfValue)n[0]=Fh(s,n[0]),n[1]=Vh(s,n[1]);else for(a=o.strValue,u=0;u<a.length;u++)s=a.charCodeAt(u),n[0]=Fh(s,n[0]),n[1]=Vh(s,n[1]);return n}};ra.getPropertiesHash=ra.getNonDefaultPropertiesHash;var Xp={appendFromJson:function(r){for(var e=this,t=0;t<r.length;t++){var n=r[t],i=n.selector,o=n.style||n.css,a=Object.keys(o);e.selector(i);for(var s=0;s<a.length;s++){var l=a[s];e.css(l,o[l])}}return e},fromJson:function(r){var e=this;return e.resetToDefault(),e.appendFromJson(r),e},json:function(){for(var r=[],e=this.defaultLength;e<this.length;e++){for(var t=this[e],n=t.selector,i=t.properties,o={},a=0;a<i.length;a++){var s=i[a];o[s.name]=s.strValue}r.push({selector:n?n.toString():"core",style:o})}return r}},tE={appendFromString:function(r){var i,o,a,t=this,n=""+r;function s(){n=n.length>i.length?n.substr(i.length):""}function l(){o=o.length>a.length?o.substr(a.length):""}for(n=n.replace(/[/][*](\s|.)+?[*][/]/g,"");!n.match(/^\s*$/);){var c=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!c){Kr("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=c[0];var h=c[1];if("core"!==h&&new ys(h).invalid)Kr("Skipping parsing of block: Invalid selector found in string stylesheet: "+h),s();else{var p=c[2],g=!1;o=p;for(var y=[];!o.match(/^\s*$/);){var m=o.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!m){Kr("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),g=!0;break}a=m[0];var _=m[1],I=m[2];this.properties[_]?t.parse(_,I)?(y.push({name:_,val:I}),l()):(Kr("Skipping property: Invalid property definition in: "+a),l()):(Kr("Skipping property: Invalid property name in: "+a),l())}if(g){s();break}t.selector(h);for(var re=0;re<y.length;re++){var A=y[re];t.css(A.name,A.val)}s()}}return t},fromString:function(r){var e=this;return e.resetToDefault(),e.appendFromString(r),e}},Kn={};(function(){var r=ri,e=I4,t=A4,o=function($e){return"^"+$e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},a=function($e){var Xe=r+"|\\w+|"+e+"|"+t+"|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+$e+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+r+")\\s*\\,\\s*("+r+")\\s*,\\s*("+Xe+")\\s*\\,\\s*("+Xe+")\\)$"},s=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];Kn.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle","circle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:o("data")},layoutData:{mapping:!0,regex:o("layoutData")},scratch:{mapping:!0,regex:o("scratch")},mapData:{mapping:!0,regex:a("mapData")},mapLayoutData:{mapping:!0,regex:a("mapLayoutData")},mapScratch:{mapping:!0,regex:a("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:s,singleRegexMatchValue:!0},urls:{regexes:s,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function($e,Xe){switch($e.length){case 2:return"deg"!==Xe[0]&&"rad"!==Xe[0]&&"deg"!==Xe[1]&&"rad"!==Xe[1];case 1:return sr($e[0])||"deg"===Xe[0]||"rad"===Xe[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+r+")\\s*,\\s*("+r+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+r+")\\s*,\\s*("+r+")\\s*,\\s*("+r+")\\s*,\\s*("+r+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function($e){var Xe=$e.length;return 1===Xe||2===Xe||4===Xe}}};var l={zeroNonZero:function($e,Xe){return(null==$e||null==Xe)&&$e!==Xe||0==$e&&0!=Xe||0!=$e&&0==Xe},any:function($e,Xe){return $e!=Xe},emptyNonEmpty:function($e,Xe){var dt=cs($e),Lt=cs(Xe);return dt&&!Lt||!dt&&Lt}},u=Kn.types,c=[{name:"label",type:u.text,triggersBounds:l.any,triggersZOrder:l.emptyNonEmpty},{name:"text-rotation",type:u.textRotation,triggersBounds:l.any},{name:"text-margin-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"text-margin-y",type:u.bidirectionalSize,triggersBounds:l.any}],h=[{name:"source-label",type:u.text,triggersBounds:l.any},{name:"source-text-rotation",type:u.textRotation,triggersBounds:l.any},{name:"source-text-margin-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"source-text-margin-y",type:u.bidirectionalSize,triggersBounds:l.any},{name:"source-text-offset",type:u.size,triggersBounds:l.any}],d=[{name:"target-label",type:u.text,triggersBounds:l.any},{name:"target-text-rotation",type:u.textRotation,triggersBounds:l.any},{name:"target-text-margin-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"target-text-margin-y",type:u.bidirectionalSize,triggersBounds:l.any},{name:"target-text-offset",type:u.size,triggersBounds:l.any}],p=[{name:"font-family",type:u.fontFamily,triggersBounds:l.any},{name:"font-style",type:u.fontStyle,triggersBounds:l.any},{name:"font-weight",type:u.fontWeight,triggersBounds:l.any},{name:"font-size",type:u.size,triggersBounds:l.any},{name:"text-transform",type:u.textTransform,triggersBounds:l.any},{name:"text-wrap",type:u.textWrap,triggersBounds:l.any},{name:"text-overflow-wrap",type:u.textOverflowWrap,triggersBounds:l.any},{name:"text-max-width",type:u.size,triggersBounds:l.any},{name:"text-outline-width",type:u.size,triggersBounds:l.any},{name:"line-height",type:u.positiveNumber,triggersBounds:l.any}],g=[{name:"text-valign",type:u.valign,triggersBounds:l.any},{name:"text-halign",type:u.halign,triggersBounds:l.any},{name:"color",type:u.color},{name:"text-outline-color",type:u.color},{name:"text-outline-opacity",type:u.zeroOneNumber},{name:"text-background-color",type:u.color},{name:"text-background-opacity",type:u.zeroOneNumber},{name:"text-background-padding",type:u.size,triggersBounds:l.any},{name:"text-border-opacity",type:u.zeroOneNumber},{name:"text-border-color",type:u.color},{name:"text-border-width",type:u.size,triggersBounds:l.any},{name:"text-border-style",type:u.borderStyle,triggersBounds:l.any},{name:"text-background-shape",type:u.textBackgroundShape,triggersBounds:l.any},{name:"text-justification",type:u.justification},{name:"box-select-labels",type:u.bool,triggersBounds:l.any}],y=[{name:"events",type:u.bool,triggersZOrder:l.any},{name:"text-events",type:u.bool,triggersZOrder:l.any},{name:"box-selection",type:u.boxSelection,triggersZOrder:l.any}],v=[{name:"display",type:u.display,triggersZOrder:l.any,triggersBounds:l.any,triggersBoundsOfConnectedEdges:l.any,triggersBoundsOfParallelEdges:function($e,Xe,dt){return $e!==Xe&&"bezier"===dt.pstyle("curve-style").value}},{name:"visibility",type:u.visibility,triggersZOrder:l.any},{name:"opacity",type:u.zeroOneNumber,triggersZOrder:l.zeroNonZero},{name:"text-opacity",type:u.zeroOneNumber},{name:"min-zoomed-font-size",type:u.size},{name:"z-compound-depth",type:u.zCompoundDepth,triggersZOrder:l.any},{name:"z-index-compare",type:u.zIndexCompare,triggersZOrder:l.any},{name:"z-index",type:u.number,triggersZOrder:l.any}],m=[{name:"overlay-padding",type:u.size,triggersBounds:l.any},{name:"overlay-color",type:u.color},{name:"overlay-opacity",type:u.zeroOneNumber,triggersBounds:l.zeroNonZero},{name:"overlay-shape",type:u.overlayShape,triggersBounds:l.any},{name:"overlay-corner-radius",type:u.cornerRadius}],_=[{name:"underlay-padding",type:u.size,triggersBounds:l.any},{name:"underlay-color",type:u.color},{name:"underlay-opacity",type:u.zeroOneNumber,triggersBounds:l.zeroNonZero},{name:"underlay-shape",type:u.overlayShape,triggersBounds:l.any},{name:"underlay-corner-radius",type:u.cornerRadius}],I=[{name:"transition-property",type:u.propList},{name:"transition-duration",type:u.time},{name:"transition-delay",type:u.time},{name:"transition-timing-function",type:u.easing}],U=function($e,Xe){return"label"===Xe.value?-$e.poolIndex():Xe.pfValue},ne=[{name:"height",type:u.nodeSize,triggersBounds:l.any,hashOverride:U},{name:"width",type:u.nodeSize,triggersBounds:l.any,hashOverride:U},{name:"shape",type:u.nodeShape,triggersBounds:l.any},{name:"shape-polygon-points",type:u.polygonPointList,triggersBounds:l.any},{name:"corner-radius",type:u.cornerRadius},{name:"background-color",type:u.color},{name:"background-fill",type:u.fill},{name:"background-opacity",type:u.zeroOneNumber},{name:"background-blacken",type:u.nOneOneNumber},{name:"background-gradient-stop-colors",type:u.colors},{name:"background-gradient-stop-positions",type:u.percentages},{name:"background-gradient-direction",type:u.gradientDirection},{name:"padding",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"padding-relative-to",type:u.paddingRelativeTo,triggersBounds:l.any},{name:"bounds-expansion",type:u.boundsExpansion,triggersBounds:l.any}],re=[{name:"border-color",type:u.color},{name:"border-opacity",type:u.zeroOneNumber},{name:"border-width",type:u.size,triggersBounds:l.any},{name:"border-style",type:u.borderStyle},{name:"border-cap",type:u.lineCap},{name:"border-join",type:u.lineJoin},{name:"border-dash-pattern",type:u.numbers},{name:"border-dash-offset",type:u.number},{name:"border-position",type:u.linePosition}],A=[{name:"outline-color",type:u.color},{name:"outline-opacity",type:u.zeroOneNumber},{name:"outline-width",type:u.size,triggersBounds:l.any},{name:"outline-style",type:u.borderStyle},{name:"outline-offset",type:u.size,triggersBounds:l.any}],C=[{name:"background-image",type:u.urls},{name:"background-image-crossorigin",type:u.bgCrossOrigin},{name:"background-image-opacity",type:u.zeroOneNumbers},{name:"background-image-containment",type:u.bgContainment},{name:"background-image-smoothing",type:u.bools},{name:"background-position-x",type:u.bgPos},{name:"background-position-y",type:u.bgPos},{name:"background-width-relative-to",type:u.bgRelativeTo},{name:"background-height-relative-to",type:u.bgRelativeTo},{name:"background-repeat",type:u.bgRepeat},{name:"background-fit",type:u.bgFit},{name:"background-clip",type:u.bgClip},{name:"background-width",type:u.bgWH},{name:"background-height",type:u.bgWH},{name:"background-offset-x",type:u.bgPos},{name:"background-offset-y",type:u.bgPos}],M=[{name:"position",type:u.position,triggersBounds:l.any},{name:"compound-sizing-wrt-labels",type:u.compoundIncludeLabels,triggersBounds:l.any},{name:"min-width",type:u.size,triggersBounds:l.any},{name:"min-width-bias-left",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"min-width-bias-right",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"min-height",type:u.size,triggersBounds:l.any},{name:"min-height-bias-top",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"min-height-bias-bottom",type:u.sizeMaybePercent,triggersBounds:l.any}],q=[{name:"line-style",type:u.lineStyle},{name:"line-color",type:u.color},{name:"line-fill",type:u.fill},{name:"line-cap",type:u.lineCap},{name:"line-opacity",type:u.zeroOneNumber},{name:"line-dash-pattern",type:u.numbers},{name:"line-dash-offset",type:u.number},{name:"line-outline-width",type:u.size},{name:"line-outline-color",type:u.color},{name:"line-gradient-stop-colors",type:u.colors},{name:"line-gradient-stop-positions",type:u.percentages},{name:"curve-style",type:u.curveStyle,triggersBounds:l.any,triggersBoundsOfParallelEdges:function($e,Xe){return $e!==Xe&&("bezier"===$e||"bezier"===Xe)}},{name:"haystack-radius",type:u.zeroOneNumber,triggersBounds:l.any},{name:"source-endpoint",type:u.edgeEndpoint,triggersBounds:l.any},{name:"target-endpoint",type:u.edgeEndpoint,triggersBounds:l.any},{name:"control-point-step-size",type:u.size,triggersBounds:l.any},{name:"control-point-distances",type:u.bidirectionalSizes,triggersBounds:l.any},{name:"control-point-weights",type:u.numbers,triggersBounds:l.any},{name:"segment-distances",type:u.bidirectionalSizes,triggersBounds:l.any},{name:"segment-weights",type:u.numbers,triggersBounds:l.any},{name:"segment-radii",type:u.numbers,triggersBounds:l.any},{name:"radius-type",type:u.radiusType,triggersBounds:l.any},{name:"taxi-turn",type:u.bidirectionalSizeMaybePercent,triggersBounds:l.any},{name:"taxi-turn-min-distance",type:u.size,triggersBounds:l.any},{name:"taxi-direction",type:u.axisDirection,triggersBounds:l.any},{name:"taxi-radius",type:u.number,triggersBounds:l.any},{name:"edge-distances",type:u.edgeDistances,triggersBounds:l.any},{name:"arrow-scale",type:u.positiveNumber,triggersBounds:l.any},{name:"loop-direction",type:u.angle,triggersBounds:l.any},{name:"loop-sweep",type:u.angle,triggersBounds:l.any},{name:"source-distance-from-node",type:u.size,triggersBounds:l.any},{name:"target-distance-from-node",type:u.size,triggersBounds:l.any}],z=[{name:"ghost",type:u.bool,triggersBounds:l.any},{name:"ghost-offset-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"ghost-offset-y",type:u.bidirectionalSize,triggersBounds:l.any},{name:"ghost-opacity",type:u.zeroOneNumber}],K=[{name:"selection-box-color",type:u.color},{name:"selection-box-opacity",type:u.zeroOneNumber},{name:"selection-box-border-color",type:u.color},{name:"selection-box-border-width",type:u.size},{name:"active-bg-color",type:u.color},{name:"active-bg-opacity",type:u.zeroOneNumber},{name:"active-bg-size",type:u.size},{name:"outside-texture-bg-color",type:u.color},{name:"outside-texture-bg-opacity",type:u.zeroOneNumber}],B=[];Kn.pieBackgroundN=16,B.push({name:"pie-size",type:u.sizeMaybePercent}),B.push({name:"pie-hole",type:u.sizeMaybePercent}),B.push({name:"pie-start-angle",type:u.angle});for(var me=1;me<=Kn.pieBackgroundN;me++)B.push({name:"pie-"+me+"-background-color",type:u.color}),B.push({name:"pie-"+me+"-background-size",type:u.percent}),B.push({name:"pie-"+me+"-background-opacity",type:u.zeroOneNumber});var be=[];Kn.stripeBackgroundN=16,be.push({name:"stripe-size",type:u.sizeMaybePercent}),be.push({name:"stripe-direction",type:u.axisDirectionPrimary});for(var xe=1;xe<=Kn.stripeBackgroundN;xe++)be.push({name:"stripe-"+xe+"-background-color",type:u.color}),be.push({name:"stripe-"+xe+"-background-size",type:u.percent}),be.push({name:"stripe-"+xe+"-background-opacity",type:u.zeroOneNumber});var we=[],Re=Kn.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:u.arrowShape,triggersBounds:l.any},{name:"arrow-color",type:u.color},{name:"arrow-fill",type:u.arrowFill},{name:"arrow-width",type:u.arrowWidth}].forEach(function(Me){Re.forEach(function($e){we.push({name:$e+"-"+Me.name,type:Me.type,triggersBounds:Me.triggersBounds})})},{});var je=Kn.properties=[].concat(y,I,v,m,_,z,g,p,c,h,d,ne,re,A,C,B,be,M,q,we,K),We=Kn.propertyGroups={behavior:y,transition:I,visibility:v,overlay:m,underlay:_,ghost:z,commonLabel:g,labelDimensions:p,mainLabel:c,sourceLabel:h,targetLabel:d,nodeBody:ne,nodeBorder:re,nodeOutline:A,backgroundImage:C,pie:B,stripe:be,compound:M,edgeLine:q,edgeArrow:we,core:K},Pe=Kn.propertyGroupNames={};(Kn.propertyGroupKeys=Object.keys(We)).forEach(function(Me){Pe[Me]=We[Me].map(function($e){return $e.name}),We[Me].forEach(function($e){return $e.groupKey=Me})});var lt=Kn.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];Kn.propertyNames=je.map(function(Me){return Me.name});for(var mt=0;mt<je.length;mt++){var at=je[mt];je[at.name]=at}for(var bt=0;bt<lt.length;bt++){var xt=lt[bt],_t={name:xt.name,alias:!0,pointsTo:je[xt.pointsTo]};je.push(_t),je[xt.name]=_t}})(),Kn.getDefaultProperty=function(r){return this.getDefaultProperties()[r]},Kn.getDefaultProperties=function(){var r=this._private;if(null!=r.defaultProperties)return r.defaultProperties;for(var e=fr({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","box-selection":"contain","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(l,u){for(var c=1;c<=Kn.pieBackgroundN;c++)l[u.name.replace("{{i}}",c)]=u.value;return l},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(l,u){for(var c=1;c<=Kn.stripeBackgroundN;c++)l[u.name.replace("{{i}}",c)]=u.value;return l},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(l,u){return Kn.arrowPrefixes.forEach(function(c){l[c+"-"+u.name]=u.value}),l},{})),t={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var o=i.name,s=this.parse(o,e[o]);t[o]=s}}return r.defaultProperties=t,r.defaultProperties},Kn.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var Yp={parse:function(r,e,t,n){var i=this;if(xn(e))return i.parseImplWarn(r,e,t,n);var c,l=GS(r,""+e,t?"t":"f","mapping"===n||!0===n||!1===n||null==n?"dontcare":n),u=i.propCache=i.propCache||[];return(c=u[l])||(c=u[l]=i.parseImplWarn(r,e,t,n)),(t||"mapping"===n)&&(c=ta(c))&&(c.value=ta(c.value)),c},parseImplWarn:function(r,e,t,n){var i=this.parseImpl(r,e,t,n);return!i&&null!=e&&Kr("The style property `".concat(r,": ").concat(e,"` is invalid")),i&&("width"===i.name||"height"===i.name)&&"label"===e&&Kr("The style value of `label` is deprecated for `"+i.name+"`"),i},parseImpl:function(r,e,t,n){var i=this;r=lb(r);var o=i.properties[r],a=e,s=i.types;if(!o||void 0===e)return null;o.alias&&(r=(o=o.pointsTo).name);var l=sr(e);l&&(e=e.trim());var c,h,u=o.type;if(!u)return null;if(t&&(""===e||null===e))return{name:r,value:e,bypass:!0,deleteBypass:!0};if(xn(e))return{name:r,value:e,strValue:"fn",mapped:s.fn,bypass:t};if(!(!l||n||e.length<7||"a"!==e[1])){if(e.length>=7&&"d"===e[0]&&(c=new RegExp(s.data.regex).exec(e)))return!t&&{name:r,value:c,strValue:""+e,mapped:s.data,field:c[1],bypass:t};if(e.length>=10&&"m"===e[0]&&(h=new RegExp(s.mapData.regex).exec(e))){if(t||u.multiple)return!1;var p=s.mapData;if(!u.color&&!u.number)return!1;var g=this.parse(r,h[4]);if(!g||g.mapped)return!1;var y=this.parse(r,h[5]);if(!y||y.mapped)return!1;if(g.pfValue===y.pfValue||g.strValue===y.strValue)return Kr("`"+r+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+g.strValue+"`"),this.parse(r,g.strValue);if(u.color){var v=g.value,m=y.value;if(!(v[0]!==m[0]||v[1]!==m[1]||v[2]!==m[2]||v[3]!==m[3]&&(null!=v[3]&&1!==v[3]||null!=m[3]&&1!==m[3])))return!1}return{name:r,value:h,strValue:""+e,mapped:p,field:h[1],fieldMin:parseFloat(h[2]),fieldMax:parseFloat(h[3]),valueMin:g.value,valueMax:y.value,bypass:t}}}if(u.multiple&&"multiple"!==n){var I;if(I=l?e.split(/\s+/):an(e)?e:[e],u.evenMultiple&&I.length%2!=0)return null;for(var U=[],ne=[],re=[],A="",C=!1,M=0;M<I.length;M++){var q=i.parse(r,I[M],t,"multiple");C=C||sr(q.value),U.push(q.value),re.push(null!=q.pfValue?q.pfValue:q.value),ne.push(q.units),A+=(M>0?" ":"")+q.strValue}return u.validate&&!u.validate(U,ne)?null:u.singleEnum&&C?1===U.length&&sr(U[0])?{name:r,value:U[0],strValue:U[0],bypass:t}:null:{name:r,value:U,pfValue:re,strValue:A,bypass:t,units:ne}}var z=function(){for(var _t=0;_t<u.enums.length;_t++)if(u.enums[_t]===e)return{name:r,value:e,strValue:""+e,bypass:t};return null};if(u.number){var K,B="px";if(u.units&&(K=u.units),u.implicitUnits&&(B=u.implicitUnits),!u.unitless)if(l){var me="px|em"+(u.allowPercent?"|\\%":"");K&&(me=K);var be=e.match("^("+ri+")("+me+")?$");be&&(e=be[1],K=be[2]||B)}else(!K||u.implicitUnits)&&(K=B);if(e=parseFloat(e),isNaN(e)&&void 0===u.enums)return null;if(isNaN(e)&&void 0!==u.enums)return e=a,z();if(u.integer&&!function(e){return Bt(e)&&Math.floor(e)===e}(e)||void 0!==u.min&&(e<u.min||u.strictMin&&e===u.min)||void 0!==u.max&&(e>u.max||u.strictMax&&e===u.max))return null;var xe={name:r,value:e,strValue:""+e+(K||""),units:K,bypass:t};return xe.pfValue=u.unitless||"px"!==K&&"em"!==K?e:"px"!==K&&K?this.getEmSizeInPixels()*e:e,("ms"===K||"s"===K)&&(xe.pfValue="ms"===K?e:1e3*e),("deg"===K||"rad"===K)&&(xe.pfValue="rad"===K?e:function(e){return Math.PI*e/180}(e)),"%"===K&&(xe.pfValue=e/100),xe}if(u.propList){var we=[],Re=""+e;if("none"!==Re){for(var je=Re.split(/\s*,\s*|\s+/),We=0;We<je.length;We++){var Pe=je[We].trim();i.properties[Pe]?we.push(Pe):Kr("`"+Pe+"` is not a valid property name")}if(0===we.length)return null}return{name:r,value:we,strValue:0===we.length?"none":we.join(" "),bypass:t}}if(u.color){var Fe=_S(e);return Fe?{name:r,value:Fe,pfValue:Fe,strValue:"rgb("+Fe[0]+","+Fe[1]+","+Fe[2]+")",bypass:t}:null}if(u.regex||u.regexes){if(u.enums){var lt=z();if(lt)return lt}for(var mt=u.regexes?u.regexes:[u.regex],at=0;at<mt.length;at++){var xt=new RegExp(mt[at]).exec(e);if(xt)return{name:r,value:u.singleRegexMatchValue?xt[1]:xt,strValue:""+e,bypass:t}}return null}return u.string?{name:r,value:""+e,strValue:""+e,bypass:t}:u.enums?z():null}},pi=function(e){if(!(this instanceof pi))return new pi(e);sb(e)?(this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()):bn("A style must have a core reference")},Bi=pi.prototype;Bi.instanceString=function(){return"style"},Bi.clear=function(){for(var r=this._private,t=r.cy.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,r.contextStyles={},r.propDiffs={},this.cleanElements(t,!0),t.forEach(function(i){var o=i[0]._private;o.styleDirty=!0,o.appliedInitStyle=!1}),this},Bi.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Bi.core=function(r){return this._private.coreStyle[r]||this.getDefaultProperty(r)},Bi.selector=function(r){var e="core"===r?null:new ys(r),t=this.length++;return this[t]={selector:e,properties:[],mappedProperties:[],index:t},this},Bi.css=function(){var e=arguments;if(1===e.length)for(var t=e[0],n=0;n<this.properties.length;n++){var i=this.properties[n],o=t[i.name];void 0===o&&(o=t[dp(i.name)]),void 0!==o&&this.cssRule(i.name,o)}else 2===e.length&&this.cssRule(e[0],e[1]);return this},Bi.style=Bi.css,Bi.cssRule=function(r,e){var t=this.parse(r,e);if(t){var n=this.length-1;this[n].properties.push(t),this[n].properties[t.name]=t,t.name.match(/pie-(\d+)-background-size/)&&t.value&&(this._private.hasPie=!0),t.name.match(/stripe-(\d+)-background-size/)&&t.value&&(this._private.hasStripe=!0),t.mapped&&this[n].mappedProperties.push(t),!this[n].selector&&(this._private.coreStyle[t.name]=t)}return this},Bi.append=function(r){return mS(r)?r.appendToStyle(this):an(r)?this.appendFromJson(r):sr(r)&&this.appendFromString(r),this},pi.fromJson=function(r,e){var t=new pi(r);return t.fromJson(e),t},pi.fromString=function(r,e){return new pi(r).fromString(e)},[fi,Zh,eE,ra,Xp,tE,Kn,Yp].forEach(function(r){fr(Bi,r)}),pi.types=Bi.types,pi.properties=Bi.properties,pi.propertyGroups=Bi.propertyGroups,pi.propertyGroupNames=Bi.propertyGroupNames,pi.propertyGroupKeys=Bi.propertyGroupKeys;var kq={style:function(e){return e&&this.setStyle(e).update(),this._private.style},setStyle:function(e){var t=this._private;return t.style=mS(e)?e.generateStyle(this):an(e)?pi.fromJson(this,e):sr(e)?pi.fromString(this,e):pi(this),t.style},updateStyle:function(){this.mutableElements().updateStyle()}},wl={autolock:function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},autoungrabify:function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},autounselectify:function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},selectionType:function(e){var t=this._private;return null==t.selectionType&&(t.selectionType="single"),void 0===e?t.selectionType:(("additive"===e||"single"===e)&&(t.selectionType=e),this)},panningEnabled:function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},userPanningEnabled:function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},zoomingEnabled:function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},userZoomingEnabled:function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},boxSelectionEnabled:function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},pan:function(){var n,i,o,a,s,e=arguments,t=this._private.pan;switch(e.length){case 0:return t;case 1:if(sr(e[0]))return t[n=e[0]];if(Ur(e[0])){if(!this._private.panningEnabled)return this;s=(o=e[0]).y,Bt(a=o.x)&&(t.x=a),Bt(s)&&(t.y=s),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;i=e[1],("x"===(n=e[0])||"y"===n)&&Bt(i)&&(t[n]=i),this.emit("pan viewport")}return this.notify("viewport"),this},panBy:function(e,t){var o,a,s,l,u,n=arguments,i=this._private.pan;if(!this._private.panningEnabled)return this;switch(n.length){case 1:Ur(e)&&(u=(s=n[0]).y,Bt(l=s.x)&&(i.x+=l),Bt(u)&&(i.y+=u),this.emit("pan viewport"));break;case 2:a=t,("x"===(o=e)||"y"===o)&&Bt(a)&&(i[o]+=a),this.emit("pan viewport")}return this.notify("viewport"),this},gc:function(){this.notify("gc")},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var i=this._private;i.zoom=n.zoom,i.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(e,t){var n;if((Bt(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled)&&(sr(e)?e=this.$(e):!function(e){return Ur(e)&&Bt(e.x1)&&Bt(e.x2)&&Bt(e.y1)&&Bt(e.y2)}(e)?vo(e)||(e=this.mutableElements()):((n={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1),!vo(e)||!e.empty())){n=n||e.boundingBox();var l,a=this.width(),s=this.height();if(t=Bt(t)?t:0,!isNaN(a)&&!isNaN(s)&&a>0&&s>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:l=(l=(l=Math.min((a-2*t)/n.w,(s-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:l)<this._private.minZoom?this._private.minZoom:l,pan:{x:(a-l*(n.x1+n.x2))/2,y:(s-l*(n.y1+n.y2))/2}}}},zoomRange:function(e,t){var n=this._private;if(null==t){var i=e;e=i.min,t=i.max}return Bt(e)&&Bt(t)&&e<=t?(n.minZoom=e,n.maxZoom=t):Bt(e)&&void 0===t&&e<=n.maxZoom?n.minZoom=e:Bt(t)&&void 0===e&&t>=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var o,a,t=this._private,n=t.pan,i=t.zoom,s=!1;return t.zoomingEnabled||(s=!0),Bt(e)?a=e:Ur(e)&&(a=e.level,null!=e.position?o=_p(e.position,i,n):null!=e.renderedPosition&&(o=e.renderedPosition),null!=o&&!t.panningEnabled&&(s=!0)),a=(a=a>t.maxZoom?t.maxZoom:a)<t.minZoom?t.minZoom:a,!s&&Bt(a)&&a!==i&&(null==o||Bt(o.x)&&Bt(o.y))?null!=o?{zoomed:!0,panned:!0,zoom:a,pan:{x:-a/i*(o.x-n.x)+o.x,y:-a/i*(o.y-n.y)+o.y}}:{zoomed:!0,panned:!1,zoom:a,pan:n}:null},zoom:function(e){if(void 0===e)return this._private.zoom;var t=this.getZoomedViewport(e),n=this._private;return null!=t&&t.zoomed?(n.zoom=t.zoom,t.panned&&(n.pan.x=t.pan.x,n.pan.y=t.pan.y),this.emit("zoom"+(t.panned?" pan":"")+" viewport"),this.notify("viewport"),this):this},viewport:function(e){var t=this._private,n=!0,i=!0,o=[],a=!1,s=!1;if(!e)return this;if(Bt(e.zoom)||(n=!1),Ur(e.pan)||(i=!1),!n&&!i)return this;if(n){var l=e.zoom;l<t.minZoom||l>t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=l,o.push("zoom"))}if(i&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;Bt(u.x)&&(t.pan.x=u.x,s=!1),Bt(u.y)&&(t.pan.y=u.y,s=!1),s||o.push("pan")}return o.length>0&&(o.push("viewport"),this.emit(o.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(sr(e)){var n=e;e=this.mutableElements().filter(n)}else vo(e)||(e=this.mutableElements());if(0!==e.length){var i=e.boundingBox(),o=this.width(),a=this.height();return{x:(o-(t=void 0===t?this._private.zoom:t)*(i.x1+i.x2))/2,y:(a-t*(i.y1+i.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var i,o,e=this._private,t=e.container;return e.sizeCache=e.sizeCache||(t?(i=this.window().getComputedStyle(t),{width:t.clientWidth-(o=function(s){return parseFloat(i.getPropertyValue(s))})("padding-left")-o("padding-right"),height:t.clientHeight-o("padding-top")-o("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),i={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};wl.centre=wl.center,wl.autolockNodes=wl.autolock,wl.autoungrabifyNodes=wl.autoungrabify;var ed={data:Xr.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Xr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Xr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Xr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};ed.attr=ed.data,ed.removeAttr=ed.removeData;var td=function(e){var t=this,n=(e=fr({},e)).container;n&&!hp(n)&&hp(n[0])&&(n=n[0]);var i=n?n._cyreg:null;(i=i||{})&&i.cy&&(i.cy.destroy(),i={});var o=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=t;var a=void 0!==ti&&void 0!==n&&!e.headless,s=e;s.layout=fr({name:a?"grid":"null"},s.layout),s.renderer=fr({name:a?"canvas":"null"},s.renderer);var l=function(g,y,v){return void 0!==y?y:void 0!==v?v:g},u=this._private={container:n,ready:!1,options:s,elements:new Ii(this),listeners:[],aniEles:new Ii(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,s.zoomingEnabled),userZoomingEnabled:l(!0,s.userZoomingEnabled),panningEnabled:l(!0,s.panningEnabled),userPanningEnabled:l(!0,s.userPanningEnabled),boxSelectionEnabled:l(!0,s.boxSelectionEnabled),autolock:l(!1,s.autolock,s.autolockNodes),autoungrabify:l(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:l(!1,s.autounselectify),styleEnabled:void 0===s.styleEnabled?a:s.styleEnabled,zoom:Bt(s.zoom)?s.zoom:1,pan:{x:Ur(s.pan)&&Bt(s.pan.x)?s.pan.x:0,y:Ur(s.pan)&&Bt(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom}),u.styleEnabled&&t.setStyle([]);var h=fr({},s,s.renderer);t.initRenderer(h),function(g,y){if(g.some(b4))return Bu.all(g).then(y);y(g)}([s.style,s.elements],function(p){var g=p[0],y=p[1];u.styleEnabled&&t.style().append(g),function(g,y,v){t.notifications(!1);var m=t.mutableElements();m.length>0&&m.remove(),null!=g&&(Ur(g)||an(g))&&t.add(g),t.one("layoutready",function(I){t.notifications(!0),t.emit(I),t.one("load",y),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",v),t.emit("done")});var _=fr({},t._private.options.layout);_.eles=t.elements(),t.layout(_).run()}(y,function(){t.startAnimationLoop(),u.ready=!0,xn(s.ready)&&t.on("ready",s.ready);for(var v=0;v<o.length;v++)t.on("ready",o[v]);i&&(i.readies=[]),t.emit("ready")},s.done)})},Qp=td.prototype;fr(Qp,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},window:function(){if(null==this._private.container)return ti;var t=this._private.container.ownerDocument;return void 0===t||null==t?ti:t.defaultView||ti},mount:function(e){if(null!=e){var t=this,n=t._private,i=n.options;return!hp(e)&&hp(e[0])&&(e=e[0]),t.stopAnimationLoop(),t.destroyRenderer(),n.container=e,n.styleEnabled=!0,t.invalidateSize(),t.initRenderer(fr({},i,i.renderer,{name:"null"===i.renderer.name?"canvas":i.renderer.name})),t.startAnimationLoop(),t.style(i.style),t.emit("mount"),t}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},options:function(){return ta(this._private.options)},json:function(e){var t=this,n=t._private,i=t.mutableElements();if(Ur(e)){if(t.startBatch(),e.elements){var a={},s=function(U,ne){for(var re=[],A=[],C=0;C<U.length;C++){var M=U[C];if(M.data.id){var q=""+M.data.id,z=t.getElementById(q);a[q]=!0,0!==z.length?A.push({ele:z,json:M}):(ne&&(M.group=ne),re.push(M))}else Kr("cy.json() cannot handle elements without an ID attribute")}t.add(re);for(var K=0;K<A.length;K++){var B=A[K];B.ele.json(B.json)}};if(an(e.elements))s(e.elements);else for(var l=["nodes","edges"],u=0;u<l.length;u++){var c=l[u],h=e.elements[c];an(h)&&s(h,c)}var d=t.collection();i.filter(function(I){return!a[I.id()]}).forEach(function(I){I.isParent()?d.merge(I):I.remove()}),d.forEach(function(I){return I.children().move({parent:null})}),d.forEach(function(I){return(U=I,t.getElementById(U.id())).remove();var U})}e.style&&t.style(e.style),null!=e.zoom&&e.zoom!==n.zoom&&t.zoom(e.zoom),e.pan&&(e.pan.x!==n.pan.x||e.pan.y!==n.pan.y)&&t.pan(e.pan),e.data&&t.data(e.data);for(var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],g=0;g<p.length;g++){var y=p[g];null!=e[y]&&t[y](e[y])}return t.endBatch(),this}var m={};e?m.elements=this.elements().map(function(I){return I.json()}):(m.elements={},i.forEach(function(I){var U=I.group();m.elements[U]||(m.elements[U]=[]),m.elements[U].push(I.json())})),this._private.styleEnabled&&(m.style=t.style().json()),m.data=ta(t.data());var _=n.options;return m.zoomingEnabled=n.zoomingEnabled,m.userZoomingEnabled=n.userZoomingEnabled,m.zoom=n.zoom,m.minZoom=n.minZoom,m.maxZoom=n.maxZoom,m.panningEnabled=n.panningEnabled,m.userPanningEnabled=n.userPanningEnabled,m.pan=ta(n.pan),m.boxSelectionEnabled=n.boxSelectionEnabled,m.renderer=ta(_.renderer),m.hideEdgesOnViewport=_.hideEdgesOnViewport,m.textureOnViewport=_.textureOnViewport,m.wheelSensitivity=_.wheelSensitivity,m.motionBlur=_.motionBlur,m.multiClickDebounceTime=_.multiClickDebounceTime,m}}),Qp.$id=Qp.getElementById,[bq,Aq,gk,J0,Wp,Sq,Z0,Kp,kq,wl,ed].forEach(function(r){fr(Qp,r)});var Nq={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},Oq={maximal:!1,acyclic:!1},Wu=function(e){return e.scratch("breadthfirst")},mk=function(e,t){return e.scratch("breadthfirst",t)};function vk(r){this.options=fr({},Nq,Oq,r)}vk.prototype.run=function(){var u,r=this.options,e=r.cy,t=r.eles,n=t.nodes().filter(function(ar){return ar.isChildless()}),i=t,o=r.directed,a=r.acyclic||r.maximal||r.maximalAdjustments>0,s=!!r.boundingBox,l=Ki(s?r.boundingBox:structuredClone(e.extent()));if(vo(r.roots))u=r.roots;else if(an(r.roots)){for(var c=[],h=0;h<r.roots.length;h++){var p=e.getElementById(r.roots[h]);c.push(p)}u=e.collection(c)}else if(sr(r.roots))u=e.$(r.roots);else if(o)u=n.roots();else{var g=t.components();u=e.collection();for(var y=function(){var Ct=g[v],Gt=Ct.maxDegree(!1),tr=Ct.filter(function(vr){return vr.degree(!1)===Gt});u=u.add(tr)},v=0;v<g.length;v++)y()}var m=[],_={},I=function(Ct,Gt){null==m[Gt]&&(m[Gt]=[]);var tr=m[Gt].length;m[Gt].push(Ct),mk(Ct,{index:tr,depth:Gt})};i.bfs({roots:u,directed:r.directed,visit:function(Ct,Gt,tr,vr,ir){var xr=Ct[0],Cr=xr.id();xr.isChildless()&&I(xr,ir),_[Cr]=!0}});for(var ne=[],re=0;re<n.length;re++){var A=n[re];_[A.id()]||ne.push(A)}var C=function(Ct){for(var Gt=m[Ct],tr=0;tr<Gt.length;tr++){var vr=Gt[tr];null!=vr?mk(vr,{depth:Ct,index:tr}):(Gt.splice(tr,1),tr--)}},M=function(Ct,Gt){for(var tr=Wu(Ct),vr=Ct.incomers().filter(function(mr){return mr.isNode()&&t.has(mr)}),ir=-1,xr=Ct.id(),Cr=0;Cr<vr.length;Cr++){var qr=Wu(vr[Cr]);ir=Math.max(ir,qr.depth)}if(tr.depth<=ir){if(!r.acyclic&&Gt[xr])return null;var Vr=ir+1;return function(Ct,Gt){var tr=Wu(Ct);m[tr.depth][tr.index]=null,Ct.isChildless()&&I(Ct,Gt)}(Ct,Vr),Gt[xr]=Vr,!0}return!1};if(o&&a){var q=[],z={},K=function(Ct){return q.push(Ct)},B=function(){return q.shift()};for(n.forEach(function(ar){return q.push(ar)});q.length>0;){var me=B(),be=M(me,z);if(be)me.outgoers().filter(function(ar){return ar.isNode()&&t.has(ar)}).forEach(K);else if(null===be){Kr("Detected double maximal shift for node `"+me.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var xe=0;if(r.avoidOverlap)for(var we=0;we<n.length;we++){var je=n[we].layoutDimensions(r);xe=Math.max(xe,je.w,je.h)}var Fe={},lt=function(Ct){if(Fe[Ct.id()])return Fe[Ct.id()];for(var Gt=Wu(Ct).depth,tr=Ct.neighborhood(),vr=0,ir=0,xr=0;xr<tr.length;xr++){var Cr=tr[xr];if(!Cr.isEdge()&&!Cr.isParent()&&n.has(Cr)){var Gr=Wu(Cr);if(null!=Gr){var qr=Gr.index,Vr=Gr.depth;null!=qr&&null!=Vr&&Vr<Gt&&(vr+=qr/m[Vr].length,ir++)}}}return vr/=ir=Math.max(1,ir),0===ir&&(vr=0),Fe[Ct.id()]=vr,vr},mt=function(Ct,Gt){var ir=lt(Ct)-lt(Gt);return 0===ir?wS(Ct.id(),Gt.id()):ir};void 0!==r.depthSort&&(mt=r.depthSort);for(var at=m.length,bt=0;bt<at;bt++)m[bt].sort(mt),C(bt);for(var xt=[],Ut=0;Ut<ne.length;Ut++)xt.push(ne[Ut]);xt.length&&(m.unshift(xt),at=m.length,function(){for(var Ct=0;Ct<at;Ct++)C(Ct)}());for(var Me=0,$e=0;$e<at;$e++)Me=Math.max(m[$e].length,Me);var Xe_x=l.x1+l.w/2,Xe_y=l.y1+l.h/2,dt=n.reduce(function(ar,Ct){return Gt=Ct.boundingBox({includeLabels:r.nodeDimensionsIncludeLabels}),{w:-1===ar.w?Gt.w:(ar.w+Gt.w)/2,h:-1===ar.h?Gt.h:(ar.h+Gt.h)/2};var Gt},{w:-1,h:-1}),Lt=Math.max(1===at?0:s?(l.h-2*r.padding-dt.h)/(at-1):(l.h-2*r.padding-dt.h)/(at+1),xe),er=m.reduce(function(ar,Ct){return Math.max(ar,Ct.length)},0),gr={downward:0,leftward:90,upward:180,rightward:-90};return-1===Object.keys(gr).indexOf(r.direction)&&bn("Invalid direction '".concat(r.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(gr).join(", "))),t.nodes().layoutPositions(this,r,function(Ct){return function Y4(r,e,t){if(0===t)return r;var n=(e.x1+e.x2)/2,i=(e.y1+e.y2)/2,o=e.w/e.h,a=1/o,s=function K4(r,e,t,n,i){var o=i*Math.PI/180;return{x:Math.cos(o)*(r-t)-Math.sin(o)*(e-n)+t,y:Math.sin(o)*(r-t)+Math.cos(o)*(e-n)+n}}(r.x,r.y,n,i,t),l=function(e,t,n,i,o,a){return{x:(e-n)*o+n,y:(t-i)*a+i}}(s.x,s.y,n,i,o,a);return{x:l.x,y:l.y}}(function(Ct){var Gt=Wu(Ct),tr=Gt.depth,vr=Gt.index;if(r.circle){var ir=Math.min(l.w/2/at,l.h/2/at),xr=(ir=Math.max(ir,xe))*tr+ir-(at>0&&m[0].length<=3?ir/2:0),Cr=2*Math.PI/m[tr].length*vr;return 0===tr&&1===m[0].length&&(xr=1),{x:Xe_x+xr*Math.cos(Cr),y:Xe_y+xr*Math.sin(Cr)}}var Gr=m[tr].length,qr=Math.max(1===Gr?0:s?(l.w-2*r.padding-dt.w)/((r.grid?er:Gr)-1):(l.w-2*r.padding-dt.w)/((r.grid?er:Gr)+1),xe);return{x:Xe_x+(vr+1-(Gr+1)/2)*qr,y:Xe_y+(tr+1-(at+1)/2)*Lt}}(Ct),l,gr[r.direction])}),this};var Lq={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function yk(r){this.options=fr({},Lq,r)}yk.prototype.run=function(){var r=this.options,e=r,t=r.cy,n=e.eles,i=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,o=n.nodes().not(":parent");e.sort&&(o=o.sort(e.sort));for(var c,a=Ki(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),s={x:a.x1+a.w/2,y:a.y1+a.h/2},u=(void 0===e.sweep?2*Math.PI-2*Math.PI/o.length:e.sweep)/Math.max(1,o.length-1),h=0,d=0;d<o.length;d++){var g=o[d].layoutDimensions(e);h=Math.max(h,g.w,g.h)}if(c=Bt(e.radius)?e.radius:o.length<=1?0:Math.min(a.h,a.w)/2-h,o.length>1&&e.avoidOverlap){h*=1.75;var m=Math.cos(u)-Math.cos(0),_=Math.sin(u)-Math.sin(0),I=Math.sqrt(h*h/(m*m+_*_));c=Math.max(I,c)}return n.nodes().layoutPositions(this,e,function(re,A){var C=e.startAngle+A*u*(i?1:-1),M=c*Math.cos(C),q=c*Math.sin(C);return{x:s.x+M,y:s.y+q}}),this};var Mq={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function wk(r){this.options=fr({},Mq,r)}wk.prototype.run=function(){for(var r=this.options,e=r,t=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,n=r.cy,i=e.eles,o=i.nodes().not(":parent"),a=Ki(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),s={x:a.x1+a.w/2,y:a.y1+a.h/2},l=[],u=0,c=0;c<o.length;c++){var d,h=o[c];d=e.concentric(h),l.push({value:d,node:h}),h._private.scratch.concentric=d}o.updateStyle();for(var p=0;p<o.length;p++){var y=o[p].layoutDimensions(e);u=Math.max(u,y.w,y.h)}l.sort(function(Lt,er){return er.value-Lt.value});for(var v=e.levelWidth(o),m=[[]],_=m[0],I=0;I<l.length;I++){var U=l[I];_.length>0&&Math.abs(_[0].value-U.value)>=v&&m.push(_=[]),_.push(U)}var re=u+e.minNodeSpacing;if(!e.avoidOverlap){var A=m.length>0&&m[0].length>1,C=Math.min(a.w,a.h)/2-re;re=Math.min(re,C/(m.length+A?1:0))}for(var q=0,z=0;z<m.length;z++){var K=m[z],B=void 0===e.sweep?2*Math.PI-2*Math.PI/K.length:e.sweep,me=K.dTheta=B/Math.max(1,K.length-1);if(K.length>1&&e.avoidOverlap){var be=Math.cos(me)-Math.cos(0),xe=Math.sin(me)-Math.sin(0),we=Math.sqrt(re*re/(be*be+xe*xe));q=Math.max(we,q)}K.r=q,q+=re}if(e.equidistant){for(var Re=0,je=0,We=0;We<m.length;We++)Re=Math.max(Re,m[We].r-je);je=0;for(var lt=0;lt<m.length;lt++){var mt=m[lt];0===lt&&(je=mt.r),mt.r=je,je+=Re}}for(var at={},bt=0;bt<m.length;bt++)for(var xt=m[bt],Ut=xt.dTheta,_t=xt.r,Me=0;Me<xt.length;Me++){var $e=xt[Me],Xe=e.startAngle+(t?1:-1)*Ut*Me,dt={x:s.x+_t*Math.cos(Xe),y:s.y+_t*Math.sin(Xe)};at[$e.node.id()]=dt}return i.nodes().layoutPositions(this,e,function(Lt){var er=Lt.id();return at[er]}),this};var rE,Fq={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,t){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function Jp(r){this.options=fr({},Fq,r),this.options.layout=this;var e=this.options.eles.nodes(),n=this.options.eles.edges().filter(function(i){var o=i.source().data("id"),a=i.target().data("id"),s=e.some(function(u){return u.data("id")===o}),l=e.some(function(u){return u.data("id")===a});return!s||!l});this.options.eles=this.options.eles.not(n)}Jp.prototype.run=function(){var r=this.options,e=r.cy,t=this;t.stopped=!1,(!0===r.animate||!1===r.animate)&&t.emit({type:"layoutstart",layout:t}),rE=!0===r.debug;var n=Vq(e,t,r);rE&&(void 0)(n),r.randomize&&zq(n);var i=Sa(),o=function(){Gq(n,e,r),!0===r.fit&&e.fit(r.padding)},a=function(d){return!(t.stopped||d>=r.numIter||(qq(n,r),n.temperature=n.temperature*r.coolingFactor,n.temperature<r.minTemp))},s=function(){if(!0===r.animate||!1===r.animate)o(),t.one("layoutstop",r.stop),t.emit({type:"layoutstop",layout:t});else{var d=r.eles.nodes(),p=bk(n,r,d);d.layoutPositions(t,r,p)}},l=0,u=!0;if(!0===r.animate){var c=function(){for(var d=0;u&&d<r.refresh;)u=a(l),l++,d++;u?(Sa()-i>=r.animationThreshold&&o(),gp(c)):(Ik(n,r),s())};c()}else{for(;u;)u=a(l),l++;Ik(n,r),s()}return this},Jp.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Jp.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Vq=function(e,t,n){for(var i=n.eles.edges(),o=n.eles.nodes(),a=Ki(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:o.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},l=n.eles.components(),u={},c=0;c<l.length;c++)for(var h=l[c],d=0;d<h.length;d++)u[h[d].id()]=c;for(c=0;c<s.nodeSize;c++){var y=(g=o[c]).layoutDimensions(n);(v={}).isLocked=g.locked(),v.id=g.data("id"),v.parentId=g.data("parent"),v.cmptId=u[g.id()],v.children=[],v.positionX=g.position("x"),v.positionY=g.position("y"),v.offsetX=0,v.offsetY=0,v.height=y.w,v.width=y.h,v.maxX=v.positionX+v.width/2,v.minX=v.positionX-v.width/2,v.maxY=v.positionY+v.height/2,v.minY=v.positionY-v.height/2,v.padLeft=parseFloat(g.style("padding")),v.padRight=parseFloat(g.style("padding")),v.padTop=parseFloat(g.style("padding")),v.padBottom=parseFloat(g.style("padding")),v.nodeRepulsion=xn(n.nodeRepulsion)?n.nodeRepulsion(g):n.nodeRepulsion,s.layoutNodes.push(v),s.idToIndex[v.id]=c}var m=[],_=0,I=-1,U=[];for(c=0;c<s.nodeSize;c++){var g,ne=(g=s.layoutNodes[c]).parentId;null!=ne?s.layoutNodes[s.idToIndex[ne]].children.push(g.id):(m[++I]=g.id,U.push(g.id))}for(s.graphSet.push(U);_<=I;){var re=m[_++],C=s.layoutNodes[s.idToIndex[re]].children;if(C.length>0)for(s.graphSet.push(C),c=0;c<C.length;c++)m[++I]=C[c]}for(c=0;c<s.graphSet.length;c++){var M=s.graphSet[c];for(d=0;d<M.length;d++)s.indexToGraph[s.idToIndex[M[d]]]=c}for(c=0;c<s.edgeSize;c++){var z=i[c],K={};K.id=z.data("id"),K.sourceId=z.data("source"),K.targetId=z.data("target");var B=xn(n.idealEdgeLength)?n.idealEdgeLength(z):n.idealEdgeLength,me=xn(n.edgeElasticity)?n.edgeElasticity(z):n.edgeElasticity,be=s.idToIndex[K.sourceId],xe=s.idToIndex[K.targetId];if(s.indexToGraph[be]!=s.indexToGraph[xe]){for(var je=Bq(K.sourceId,K.targetId,s),We=s.graphSet[je],Pe=0,v=s.layoutNodes[be];-1===We.indexOf(v.id);)v=s.layoutNodes[s.idToIndex[v.parentId]],Pe++;for(v=s.layoutNodes[xe];-1===We.indexOf(v.id);)v=s.layoutNodes[s.idToIndex[v.parentId]],Pe++;B*=Pe*n.nestingFactor}K.idealLength=B,K.elasticity=me,s.layoutEdges.push(K)}return s},Bq=function(e,t,n){var i=_k(e,t,0,n);return 2>i.count?0:i.graph},_k=function(e,t,n,i){var o=i.graphSet[n];if(-1<o.indexOf(e)&&-1<o.indexOf(t))return{count:2,graph:n};for(var a=0,s=0;s<o.length;s++){var c=i.layoutNodes[i.idToIndex[o[s]]].children;if(0!==c.length){var d=_k(e,t,i.indexToGraph[i.idToIndex[c[0]]],i);if(0!==d.count){if(1!==d.count)return d;if(2===++a)break}}}return{count:a,graph:n}},zq=function(e,t){for(var n=e.clientWidth,i=e.clientHeight,o=0;o<e.nodeSize;o++){var a=e.layoutNodes[o];0===a.children.length&&!a.isLocked&&(a.positionX=Math.random()*n,a.positionY=Math.random()*i)}},bk=function(e,t,n){var i=e.boundingBox,o={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return t.boundingBox&&(n.forEach(function(a){var s=e.layoutNodes[e.idToIndex[a.data("id")]];o.x1=Math.min(o.x1,s.positionX),o.x2=Math.max(o.x2,s.positionX),o.y1=Math.min(o.y1,s.positionY),o.y2=Math.max(o.y2,s.positionY)}),o.w=o.x2-o.x1,o.h=o.y2-o.y1),function(a,s){var l=e.layoutNodes[e.idToIndex[a.data("id")]];return t.boundingBox?{x:i.x1+(0===o.w?.5:(l.positionX-o.x1)/o.w)*i.w,y:i.y1+(0===o.h?.5:(l.positionY-o.y1)/o.h)*i.h}:{x:l.positionX,y:l.positionY}}},Gq=function(e,t,n){var i=n.layout,o=n.eles.nodes(),a=bk(e,n,o);o.positions(a),!0!==e.ready&&(e.ready=!0,i.one("layoutready",n.ready),i.emit({type:"layoutready",layout:this}))},qq=function(e,t,n){jq(e,t),Wq(e),Kq(e,t),Xq(e),Yq(e)},jq=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var i=e.graphSet[n],o=i.length,a=0;a<o;a++)for(var s=e.layoutNodes[e.idToIndex[i[a]]],l=a+1;l<o;l++)Hq(s,e.layoutNodes[e.idToIndex[i[l]]],e,t)},Ek=function(e){return 2*e*Math.random()-1},Hq=function(e,t,n,i){if(e.cmptId===t.cmptId||n.isCompound){var s=t.positionX-e.positionX,l=t.positionY-e.positionY;0===s&&0===l&&(s=Ek(1),l=Ek(1));var c=$q(e,t,s,l);if(c>0)var p=(h=i.nodeOverlap*c)*s/(d=Math.sqrt(s*s+l*l)),g=h*l/d;else{var h,y=Zp(e,s,l),v=Zp(t,-1*s,-1*l),m=v.x-y.x,_=v.y-y.y,I=m*m+_*_,d=Math.sqrt(I);p=(h=(e.nodeRepulsion+t.nodeRepulsion)/I)*m/d,g=h*_/d}e.isLocked||(e.offsetX-=p,e.offsetY-=g),t.isLocked||(t.offsetX+=p,t.offsetY+=g)}},$q=function(e,t,n,i){if(n>0)var o=e.maxX-t.minX;else o=t.maxX-e.minX;if(i>0)var a=e.maxY-t.minY;else a=t.maxY-e.minY;return o>=0&&a>=0?Math.sqrt(o*o+a*a):0},Zp=function(e,t,n){var i=e.positionX,o=e.positionY,a=e.height||1,s=e.width||1,l=n/t,u=a/s,c={};return 0===t&&0<n||0===t&&0>n?(c.x=i,c.y=o+a/2,c):0<t&&-1*u<=l&&l<=u?(c.x=i+s/2,c.y=o+s*n/2/t,c):0>t&&-1*u<=l&&l<=u?(c.x=i-s/2,c.y=o-s*n/2/t,c):0<n&&(l<=-1*u||l>=u)?(c.x=i+a*t/2/n,c.y=o+a/2,c):(0>n&&(l<=-1*u||l>=u)&&(c.x=i-a*t/2/n,c.y=o-a/2),c)},Wq=function(e,t){for(var n=0;n<e.edgeSize;n++){var i=e.layoutEdges[n],a=e.layoutNodes[e.idToIndex[i.sourceId]],l=e.layoutNodes[e.idToIndex[i.targetId]],u=l.positionX-a.positionX,c=l.positionY-a.positionY;if(0!==u||0!==c){var h=Zp(a,u,c),d=Zp(l,-1*u,-1*c),p=d.x-h.x,g=d.y-h.y,y=Math.sqrt(p*p+g*g),v=Math.pow(i.idealLength-y,2)/i.elasticity;if(0!==y)var m=v*p/y,_=v*g/y;else m=0,_=0;a.isLocked||(a.offsetX+=m,a.offsetY+=_),l.isLocked||(l.offsetX-=m,l.offsetY-=_)}}},Kq=function(e,t){if(0!==t.gravity)for(var i=0;i<e.graphSet.length;i++){var o=e.graphSet[i],a=o.length;if(0===i)var s=e.clientHeight/2,l=e.clientWidth/2;else{var c=e.layoutNodes[e.idToIndex[e.layoutNodes[e.idToIndex[o[0]]].parentId]];s=c.positionX,l=c.positionY}for(var h=0;h<a;h++){var d=e.layoutNodes[e.idToIndex[o[h]]];if(!d.isLocked){var p=s-d.positionX,g=l-d.positionY,y=Math.sqrt(p*p+g*g);if(y>1){var m=t.gravity*g/y;d.offsetX+=t.gravity*p/y,d.offsetY+=m}}}}},Xq=function(e,t){var n=[],i=0,o=-1;for(n.push.apply(n,e.graphSet[0]),o+=e.graphSet[0].length;i<=o;){var a=n[i++],l=e.layoutNodes[e.idToIndex[a]],u=l.children;if(0<u.length&&!l.isLocked){for(var c=l.offsetX,h=l.offsetY,d=0;d<u.length;d++){var p=e.layoutNodes[e.idToIndex[u[d]]];p.offsetX+=c,p.offsetY+=h,n[++o]=u[d]}l.offsetX=0,l.offsetY=0}}},Yq=function(e,t){for(var n=0;n<e.nodeSize;n++)0<(i=e.layoutNodes[n]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0);for(n=0;n<e.nodeSize;n++)if(!(0<(i=e.layoutNodes[n]).children.length||i.isLocked)){var o=Qq(i.offsetX,i.offsetY,e.temperature);i.positionX+=o.x,i.positionY+=o.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,Tk(i,e)}for(n=0;n<e.nodeSize;n++){var i;0<(i=e.layoutNodes[n]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},Qq=function(e,t,n){var i=Math.sqrt(e*e+t*t);if(i>n)var o={x:n*e/i,y:n*t/i};else o={x:e,y:t};return o},Tk=function(e,t){var n=e.parentId;if(null!=n){var i=t.layoutNodes[t.idToIndex[n]],o=!1;if((null==i.maxX||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,o=!0),(null==i.minX||e.minX-i.padLeft<i.minX)&&(i.minX=e.minX-i.padLeft,o=!0),(null==i.maxY||e.maxY+i.padBottom>i.maxY)&&(i.maxY=e.maxY+i.padBottom,o=!0),(null==i.minY||e.minY-i.padTop<i.minY)&&(i.minY=e.minY-i.padTop,o=!0),o)return Tk(i,t)}},Ik=function(e,t){for(var n=e.layoutNodes,i=[],o=0;o<n.length;o++){var a=n[o],s=a.cmptId;(i[s]=i[s]||[]).push(a)}var u=0;for(o=0;o<i.length;o++)if(c=i[o]){c.x1=1/0,c.x2=-1/0,c.y1=1/0,c.y2=-1/0;for(var h=0;h<c.length;h++){var d=c[h];c.x1=Math.min(c.x1,d.positionX-d.width/2),c.x2=Math.max(c.x2,d.positionX+d.width/2),c.y1=Math.min(c.y1,d.positionY-d.height/2),c.y2=Math.max(c.y2,d.positionY+d.height/2)}c.w=c.x2-c.x1,c.h=c.y2-c.y1,u+=c.w*c.h}i.sort(function(_,I){return I.w*I.h-_.w*_.h});var p=0,g=0,y=0,v=0,m=Math.sqrt(u)*e.clientWidth/e.clientHeight;for(o=0;o<i.length;o++){var c;if(c=i[o]){for(h=0;h<c.length;h++)(d=c[h]).isLocked||(d.positionX+=p-c.x1,d.positionY+=g-c.y1);p+=c.w+t.componentSpacing,y+=c.w+t.componentSpacing,v=Math.max(v,c.h),y>m&&(g+=v+t.componentSpacing,p=0,y=0,v=0)}}},Jq={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function xk(r){this.options=fr({},Jq,r)}xk.prototype.run=function(){var r=this.options,e=r,t=r.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var o=Ki(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});if(0===o.h||0===o.w)n.nodes().layoutPositions(this,e,function(lt){return{x:o.x1,y:o.y1}});else{var a=i.size(),s=Math.sqrt(a*o.h/o.w),l=Math.round(s),u=Math.round(o.w/o.h*s),c=function(mt){if(null==mt)return Math.min(l,u);Math.min(l,u)==l?l=mt:u=mt},h=function(mt){if(null==mt)return Math.max(l,u);Math.max(l,u)==l?l=mt:u=mt},d=e.rows,p=null!=e.cols?e.cols:e.columns;if(null!=d&&null!=p)l=d,u=p;else if(null!=d&&null==p)l=d,u=Math.ceil(a/l);else if(null==d&&null!=p)u=p,l=Math.ceil(a/u);else if(u*l>a){var g=c(),y=h();(g-1)*y>=a?c(g-1):(y-1)*g>=a&&h(y-1)}else for(;u*l<a;){var v=c(),m=h();(m+1)*v>=a?h(m+1):c(v+1)}var _=o.w/u,I=o.h/l;if(e.condense&&(_=0,I=0),e.avoidOverlap)for(var U=0;U<i.length;U++){var ne=i[U],re=ne._private.position;(null==re.x||null==re.y)&&(re.x=0,re.y=0);var A=ne.layoutDimensions(e),C=e.avoidOverlapPadding,q=A.h+C;_=Math.max(_,A.w+C),I=Math.max(I,q)}for(var z={},K=function(mt,at){return!!z["c-"+mt+"-"+at]},B=function(mt,at){z["c-"+mt+"-"+at]=!0},me=0,be=0,xe=function(){++be>=u&&(be=0,me++)},we={},Re=0;Re<i.length;Re++){var je=i[Re],We=e.position(je);if(We&&(void 0!==We.row||void 0!==We.col)){var Pe={row:We.row,col:We.col};if(void 0===Pe.col)for(Pe.col=0;K(Pe.row,Pe.col);)Pe.col++;else if(void 0===Pe.row)for(Pe.row=0;K(Pe.row,Pe.col);)Pe.row++;we[je.id()]=Pe,B(Pe.row,Pe.col)}}i.layoutPositions(this,e,function(mt,at){var bt,xt;if(mt.locked()||mt.isParent())return!1;var Ut=we[mt.id()];if(Ut)bt=Ut.col*_+_/2+o.x1,xt=Ut.row*I+I/2+o.y1;else{for(;K(me,be);)xe();bt=be*_+_/2+o.x1,xt=me*I+I/2+o.y1,B(me,be),xe()}return{x:bt,y:xt}})}return this};var Zq={ready:function(){},stop:function(){}};function nE(r){this.options=fr({},Zq,r)}nE.prototype.run=function(){var r=this.options,e=r.eles,t=this;return t.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),t.one("layoutready",r.ready),t.emit("layoutready"),t.one("layoutstop",r.stop),t.emit("layoutstop"),this},nE.prototype.stop=function(){return this};var ej={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Ak(r){this.options=fr({},ej,r)}Ak.prototype.run=function(){var r=this.options,t=r.eles.nodes(),n=xn(r.positions);return t.layoutPositions(this,r,function(o,a){var s=function i(o){return null==r.positions?function(e){return{x:e.x,y:e.y}}(o.position()):n?r.positions(o):r.positions[o._private.data.id]??null}(o);return!o.locked()&&null!=s&&s}),this};var tj={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Rk(r){this.options=fr({},tj,r)}Rk.prototype.run=function(){var r=this.options,e=r.cy,t=r.eles,n=Ki(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()});return t.nodes().layoutPositions(this,r,function(a,s){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}}),this};var rj=[{name:"breadthfirst",impl:vk},{name:"circle",impl:yk},{name:"concentric",impl:wk},{name:"cose",impl:Jp},{name:"grid",impl:xk},{name:"null",impl:nE},{name:"preset",impl:Ak},{name:"random",impl:Rk}];function Sk(r){this.options=r,this.notifications=0}var Ck=function(){},Pk=function(){throw new Error("A headless instance can not render images")};Sk.prototype={recalculateRenderedStyle:Ck,notify:function(){this.notifications++},init:Ck,isHeadless:function(){return!0},png:Pk,jpg:Pk};var iE={arrowShapeWidth:.3,registerArrowShapes:function(){var r=this.arrowShapes={},e=this,t=function(u,c,h,d,p,g,y){return p.x-h/2-y<=u&&u<=p.x+h/2+y&&p.y-h/2-y<=c&&c<=p.y+h/2+y},n=function(u,c,h,d,p){var g=u*Math.cos(d)-c*Math.sin(d),y=u*Math.sin(d)+c*Math.cos(d);return{x:g*h+p.x,y:y*h+p.y}},i=function(u,c,h,d){for(var p=[],g=0;g<u.length;g+=2)p.push(n(u[g],u[g+1],c,h,d));return p},o=function(u){for(var c=[],h=0;h<u.length;h++){var d=u[h];c.push(d.x,d.y)}return c},a=function(u){return u.pstyle("width").pfValue*u.pstyle("arrow-scale").pfValue*2},s=function(u,c){sr(c)&&(c=r[c]),r[u]=fr({name:u,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(d,p,g,y,v,m){var _=o(i(this.points,g+2*m,y,v));return oo(d,p,_)},roughCollide:t,draw:function(d,p,g,y){var v=i(this.points,p,g,y);e.arrowShapeImpl("polygon")(d,v)},spacing:function(d){return 0},gap:a},c)};s("none",{collide:vp,roughCollide:vp,draw:Ab,spacing:HS,gap:HS}),s("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),s("arrow","triangle"),s("triangle-backcurve",{points:r.triangle.points,controlPoint:[0,-.15],roughCollide:t,draw:function(u,c,h,d,p){var g=i(this.points,c,h,d),y=this.controlPoint,v=n(y[0],y[1],c,h,d);e.arrowShapeImpl(this.name)(u,g,v)},gap:function(u){return.8*a(u)}}),s("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(u,c,h,d,p,g,y){var v=o(i(this.points,h+2*y,d,p)),m=o(i(this.pointsTee,h+2*y,d,p));return oo(u,c,v)||oo(u,c,m)},draw:function(u,c,h,d,p){var g=i(this.points,c,h,d),y=i(this.pointsTee,c,h,d);e.arrowShapeImpl(this.name)(u,g,y)}}),s("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(u,c,h,d,p,g,y){var v=p,m=Math.pow(v.x-u,2)+Math.pow(v.y-c,2)<=Math.pow((h+2*y)*this.radius,2),_=o(i(this.points,h+2*y,d,p));return oo(u,c,_)||m},draw:function(u,c,h,d,p){var g=i(this.pointsTr,c,h,d);e.arrowShapeImpl(this.name)(u,g,d.x,d.y,this.radius*c)},spacing:function(u){return e.getArrowWidth(u.pstyle("width").pfValue,u.pstyle("arrow-scale").value)*this.radius}}),s("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(u,c){var h=this.baseCrossLinePts.slice(),d=c/u;return h[3]=h[3]-d,h[5]=h[5]-d,h},collide:function(u,c,h,d,p,g,y){var v=o(i(this.points,h+2*y,d,p)),m=o(i(this.crossLinePts(h,g),h+2*y,d,p));return oo(u,c,v)||oo(u,c,m)},draw:function(u,c,h,d,p){var g=i(this.points,c,h,d),y=i(this.crossLinePts(c,p),c,h,d);e.arrowShapeImpl(this.name)(u,g,y)}}),s("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(u){return.525*a(u)}}),s("circle",{radius:.15,collide:function(u,c,h,d,p,g,y){var v=p;return Math.pow(v.x-u,2)+Math.pow(v.y-c,2)<=Math.pow((h+2*y)*this.radius,2)},draw:function(u,c,h,d,p){e.arrowShapeImpl(this.name)(u,d.x,d.y,this.radius*c)},spacing:function(u){return e.getArrowWidth(u.pstyle("width").pfValue,u.pstyle("arrow-scale").value)*this.radius}}),s("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(u){return 1},gap:function(u){return 1}}),s("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),s("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(u){return u.pstyle("width").pfValue*u.pstyle("arrow-scale").value}}),s("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(u){return.95*u.pstyle("width").pfValue*u.pstyle("arrow-scale").value}})}},_l={projectIntoViewport:function(r,e){var t=this.cy,n=this.findContainerClientCoords(),i=n[0],o=n[1],a=n[4],s=t.pan(),l=t.zoom();return[((r-i)/a-s.x)/l,((e-o)/a-s.y)/l]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var r=this.container,e=r.getBoundingClientRect(),t=this.cy.window().getComputedStyle(r),n=function(m){return parseFloat(t.getPropertyValue(m))},i_left=n("padding-left"),i_right=n("padding-right"),i_top=n("padding-top"),i_bottom=n("padding-bottom"),o_left=n("border-left-width"),o_right=n("border-right-width"),o_top=n("border-top-width"),a=(n("border-bottom-width"),r.clientWidth);return this.containerBB=[e.left+i_left+o_left,e.top+i_top+o_top,a-(i_left+i_right),r.clientHeight-(i_top+i_bottom),e.width/(a+(o_left+o_right))]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(r,e,t,n){return this.findNearestElements(r,e,t,n)[0]},findNearestElements:function(r,e,t,n){var g,y,i=this,o=this,a=o.getCachedZSortedEles(),s=[],l=o.cy.zoom(),u=o.cy.hasCompoundNodes(),c=(n?24:8)/l,h=(n?8:2)/l,d=(n?8:2)/l,p=1/0;function v(A,C){if(A.isNode()){if(y)return;y=A,s.push(A)}if(A.isEdge()&&(null==C||C<p))if(g){if(g.pstyle("z-compound-depth").value===A.pstyle("z-compound-depth").value&&g.pstyle("z-compound-depth").value===A.pstyle("z-compound-depth").value)for(var M=0;M<s.length;M++)if(s[M].isEdge()){s[M]=A,g=A,p=C??p;break}}else s.push(A),g=A,p=C??p}function m(A){var C=A.outerWidth()+2*h,M=A.outerHeight()+2*h,q=C/2,z=M/2,K=A.position(),B="auto"===A.pstyle("corner-radius").value?"auto":A.pstyle("corner-radius").pfValue,me=A._private.rscratch;if(K.x-q<=r&&r<=K.x+q&&K.y-z<=e&&e<=K.y+z&&o.nodeShapes[i.getNodeShape(A)].checkPoint(r,e,0,C,M,K.x,K.y,B,me))return v(A,0),!0}function _(A){var be,C=A._private,M=C.rscratch,q=A.pstyle("width").pfValue,z=A.pstyle("arrow-scale").value,K=q/2+c,B=K*K,me=2*K,Re=C.source,je=C.target;if("segments"===M.edgeType||"straight"===M.edgeType||"haystack"===M.edgeType){for(var xe=M.allpts,we=0;we+3<xe.length;we+=2)if(Mz(r,e,xe[we],xe[we+1],xe[we+2],xe[we+3],me)&&B>(be=zz(r,e,xe[we],xe[we+1],xe[we+2],xe[we+3])))return v(A,be),!0}else if("bezier"===M.edgeType||"multibezier"===M.edgeType||"self"===M.edgeType||"compound"===M.edgeType)for(xe=M.allpts,we=0;we+5<M.allpts.length;we+=4)if(Fz(r,e,xe[we],xe[we+1],xe[we+2],xe[we+3],xe[we+4],xe[we+5],me)&&B>(be=Uz(r,e,xe[we],xe[we+1],xe[we+2],xe[we+3],xe[we+4],xe[we+5])))return v(A,be),!0;Re=Re||C.source,je=je||C.target;var We=i.getArrowWidth(q,z),Pe=[{name:"source",x:M.arrowStartX,y:M.arrowStartY,angle:M.srcArrowAngle},{name:"target",x:M.arrowEndX,y:M.arrowEndY,angle:M.tgtArrowAngle},{name:"mid-source",x:M.midX,y:M.midY,angle:M.midsrcArrowAngle},{name:"mid-target",x:M.midX,y:M.midY,angle:M.midtgtArrowAngle}];for(we=0;we<Pe.length;we++){var Fe=Pe[we],lt=o.arrowShapes[A.pstyle(Fe.name+"-arrow-shape").value],mt=A.pstyle("width").pfValue;if(lt.roughCollide(r,e,We,Fe.angle,{x:Fe.x,y:Fe.y},mt,c)&&lt.collide(r,e,We,Fe.angle,{x:Fe.x,y:Fe.y},mt,c))return v(A),!0}u&&s.length>0&&(m(Re),m(je))}function I(A,C,M){return io(A,C,M)}function U(A,C){var z,M=A._private,q=d;z=C?C+"-":"",A.boundingBox();var K=M.labelBounds[C||"main"],B=A.pstyle(z+"label").value;if("yes"===A.pstyle("text-events").strValue&&B){var be=I(M.rscratch,"labelX",C),xe=I(M.rscratch,"labelY",C),we=I(M.rscratch,"labelAngle",C),Re=A.pstyle(z+"text-margin-x").pfValue,je=A.pstyle(z+"text-margin-y").pfValue,We=K.x1-q-Re,Pe=K.x2+q-Re,Fe=K.y1-q-je,lt=K.y2+q-je;if(we){var mt=Math.cos(we),at=Math.sin(we),bt=function(dt,Lt){return{x:(dt-=be)*mt-(Lt-=xe)*at+be,y:dt*at+Lt*mt+xe}},xt=bt(We,Fe),Ut=bt(We,lt),_t=bt(Pe,Fe),Me=bt(Pe,lt);if(oo(r,e,[xt.x+Re,xt.y+je,_t.x+Re,_t.y+je,Me.x+Re,Me.y+je,Ut.x+Re,Ut.y+je]))return v(A),!0}else if(ps(K,r,e))return v(A),!0}}t&&(a=a.interactive);for(var ne=a.length-1;ne>=0;ne--){var re=a[ne];re.isNode()?m(re)||U(re):_(re)||U(re)||U(re,"source")||U(re,"target")}return s},getAllInBox:function(r,e,t,n){var i=this.getCachedZSortedEles().interactive,a=2/this.cy.zoom(),s=[],l=Math.min(r,t),u=Math.max(r,t),c=Math.min(e,n),h=Math.max(e,n),d=Ki({x1:r=l,y1:e=c,x2:t=u,y2:n=h}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],g=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function y(dt,Lt,er){return io(dt,Lt,er)}function v(dt,Lt){var er=dt._private,Mr=a;dt.boundingBox();var lr=er.labelBounds.main;if(!lr)return null;var ar=y(er.rscratch,"labelX",Lt),Ct=y(er.rscratch,"labelY",Lt),Gt=y(er.rscratch,"labelAngle",Lt),tr=dt.pstyle("text-margin-x").pfValue,vr=dt.pstyle("text-margin-y").pfValue,ir=lr.x1-Mr-tr,xr=lr.x2+Mr-tr,Cr=lr.y1-Mr-vr,Gr=lr.y2+Mr-vr;if(Gt){var qr=Math.cos(Gt),Vr=Math.sin(Gt),mr=function(ut,ue){return{x:(ut-=ar)*qr-(ue-=Ct)*Vr+ar,y:ut*Vr+ue*qr+Ct}};return[mr(ir,Cr),mr(xr,Cr),mr(xr,Gr),mr(ir,Gr)]}return[{x:ir,y:Cr},{x:xr,y:Cr},{x:xr,y:Gr},{x:ir,y:Gr}]}function m(dt,Lt,er,Mr){function gr(lr,ar,Ct){return(Ct.y-lr.y)*(ar.x-lr.x)>(ar.y-lr.y)*(Ct.x-lr.x)}return gr(dt,er,Mr)!==gr(Lt,er,Mr)&&gr(dt,Lt,er)!==gr(dt,Lt,Mr)}for(var _=0;_<i.length;_++){var I=i[_];if(I.isNode()){var U=I,ne="yes"===U.pstyle("text-events").strValue,re=U.pstyle("box-selection").strValue,A="yes"===U.pstyle("box-select-labels").strValue;if("none"===re)continue;var M=U.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:("overlap"===re||A)&&ne});if("contain"===re){var q=!1;if(A&&ne){var z=v(U);z&&Vb(z,p)&&(s.push(U),q=!0)}!q&&rC(d,M)&&s.push(U)}else if("overlap"===re&&Nb(d,M)){var K=U.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1});if(Vb([{x:K.x1,y:K.y1},{x:K.x2,y:K.y1},{x:K.x2,y:K.y2},{x:K.x1,y:K.y2}],p))s.push(U);else{var me=v(U);me&&Vb(me,p)&&s.push(U)}}}else{var be=I,xe=be._private,we=xe.rscratch,Re=be.pstyle("box-selection").strValue;if("none"===Re)continue;if("contain"===Re){if(null!=we.startX&&null!=we.startY&&!ps(d,we.startX,we.startY)||null!=we.endX&&null!=we.endY&&!ps(d,we.endX,we.endY))continue;if("bezier"===we.edgeType||"multibezier"===we.edgeType||"self"===we.edgeType||"compound"===we.edgeType||"segments"===we.edgeType||"haystack"===we.edgeType){for(var je=xe.rstyle.bezierPts||xe.rstyle.linePts||xe.rstyle.haystackPts,We=!0,Pe=0;Pe<je.length;Pe++)if(!tC(d,je[Pe])){We=!1;break}We&&s.push(be)}else"straight"===we.edgeType&&s.push(be)}else if("overlap"===Re){var Fe=!1;if(null!=we.startX&&null!=we.startY&&null!=we.endX&&null!=we.endY&&(ps(d,we.startX,we.startY)||ps(d,we.endX,we.endY)))s.push(be),Fe=!0;else if(!Fe&&"haystack"===we.edgeType)for(var lt=xe.rstyle.haystackPts,mt=0;mt<lt.length;mt++)if(tC(d,lt[mt])){s.push(be),Fe=!0;break}if(!Fe){var at=xe.rstyle.bezierPts||xe.rstyle.linePts||xe.rstyle.haystackPts;if((!at||at.length<2)&&"straight"===we.edgeType&&null!=we.startX&&null!=we.startY&&null!=we.endX&&null!=we.endY&&(at=[{x:we.startX,y:we.startY},{x:we.endX,y:we.endY}]),!at||at.length<2)continue;for(var bt=0;bt<at.length-1;bt++){for(var xt=at[bt],Ut=at[bt+1],_t=0;_t<g.length;_t++){var Me=Wn(g[_t],2);if(m(xt,Ut,Me[0],Me[1])){s.push(be),Fe=!0;break}}if(Fe)break}}}}}return s}},eg={calculateArrowAngles:function(r){var l,u,c,h,d,p,e=r._private.rscratch,t="haystack"===e.edgeType,n="bezier"===e.edgeType,i="multibezier"===e.edgeType,o="segments"===e.edgeType,a="compound"===e.edgeType,s="self"===e.edgeType;t?(c=e.haystackPts[0],h=e.haystackPts[1],d=e.haystackPts[2],p=e.haystackPts[3]):(c=e.arrowStartX,h=e.arrowStartY,d=e.arrowEndX,p=e.arrowEndY),m=e.midX,_=e.midY,o?(l=c-e.segpts[0],u=h-e.segpts[1]):i||a||s||n?(l=c-di((g=e.allpts)[0],g[2],g[4],.1),u=h-di(g[1],g[3],g[5],.1)):(l=c-m,u=h-_),e.srcArrowAngle=bp(l,u);var m=e.midX,_=e.midY;if(t&&(m=(c+d)/2,_=(h+p)/2),l=d-c,u=p-h,o)if((g=e.allpts).length/2%2==0)l=g[I=g.length/2]-g[U=I-2],u=g[I+1]-g[U+1];else if(e.isRound)l=e.midVector[1],u=-e.midVector[0];else{var U;l=g[I=g.length/2-1]-g[U=I-2],u=g[I+1]-g[U+1]}else if(i||a||s){var re,A,C,M,z,q,K,g=e.allpts;e.ctrlpts.length/2%2==0?(re=di(g[q=g.length/2-1],g[z=q+2],g[K=z+2],0),A=di(g[q+1],g[z+1],g[K+1],0),C=di(g[q],g[z],g[K],1e-4),M=di(g[q+1],g[z+1],g[K+1],1e-4)):(re=di(g[q=(z=g.length/2-1)-2],g[z],g[K=z+2],.4999),A=di(g[q+1],g[z+1],g[K+1],.4999),C=di(g[q],g[z],g[K],.5),M=di(g[q+1],g[z+1],g[K+1],.5)),l=C-re,u=M-A}if(e.midtgtArrowAngle=bp(l,u),e.midDispX=l,e.midDispY=u,l*=-1,u*=-1,o&&(g=e.allpts).length/2%2!=0&&!e.isRound){var I,B=2+(I=g.length/2-1);l=-(g[B]-g[I]),u=-(g[B+1]-g[I+1])}if(e.midsrcArrowAngle=bp(l,u),o)l=d-e.segpts[e.segpts.length-2],u=p-e.segpts[e.segpts.length-1];else if(i||a||s||n){var me=(g=e.allpts).length;l=d-di(g[me-6],g[me-4],g[me-2],.9),u=p-di(g[me-5],g[me-3],g[me-1],.9)}else l=d-m,u=p-_;e.tgtArrowAngle=bp(l,u)}};eg.getArrowWidth=eg.getArrowHeight=function(r,e){var t=this.arrowWidthCache=this.arrowWidthCache||{},n=t[r+", "+e];return n||(n=Math.max(Math.pow(13.37*r,.9),29)*e,t[r+", "+e]=n,n)};var oE,aE,Dk,bl,tg,Da,El,Tl,ia,Ku,rg,Nk,Ok,sE,lE,Lk,na={},Ro={},Mk=function(e,t,n){n.x=t.x-e.x,n.y=t.y-e.y,n.len=Math.sqrt(n.x*n.x+n.y*n.y),n.nx=n.x/n.len,n.ny=n.y/n.len,n.ang=Math.atan2(n.ny,n.nx)};function Fk(r,e){0===e.radius?r.lineTo(e.cx,e.cy):r.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function uE(r,e,t,n){return 0===n||0===e.radius?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(function(e,t,n,i,o){if(e!==Lk?Mk(t,e,na):function(e,t){t.x=-1*e.x,t.y=-1*e.y,t.nx=-1*e.nx,t.ny=-1*e.ny,t.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang}(Ro,na),Mk(t,n,Ro),Dk=na.nx*Ro.nx-na.ny*-Ro.ny,Da=Math.asin(Math.max(-1,Math.min(1,na.nx*Ro.ny-na.ny*Ro.nx))),Math.abs(Da)<1e-6)return oE=t.x,aE=t.y,void(Tl=Ku=0);bl=1,tg=!1,Dk<0?Da<0?Da=Math.PI+Da:(Da=Math.PI-Da,bl=-1,tg=!0):Da>0&&(bl=-1,tg=!0),Ku=void 0!==t.radius?t.radius:i,El=Da/2,rg=Math.min(na.len/2,Ro.len/2),o?(ia=Math.abs(Math.cos(El)*Ku/Math.sin(El)))>rg?(ia=rg,Tl=Math.abs(ia*Math.sin(El)/Math.cos(El))):Tl=Ku:(ia=Math.min(rg,Ku),Tl=Math.abs(ia*Math.sin(El)/Math.cos(El))),oE=(sE=t.x+Ro.nx*ia)-Ro.ny*Tl*bl,aE=(lE=t.y+Ro.ny*ia)+Ro.nx*Tl*bl,Nk=t.x+na.nx*ia,Ok=t.y+na.ny*ia,Lk=t}(r,e,t,n,!(arguments.length>4&&void 0!==arguments[4])||arguments[4]),{cx:oE,cy:aE,radius:Tl,startX:Nk,startY:Ok,stopX:sE,stopY:lE,startAngle:na.ang+Math.PI/2*bl,endAngle:Ro.ang-Math.PI/2*bl,counterClockwise:tg})}var oj=Math.sqrt(.02),Ui={};function Vk(r){var e=[];if(null!=r){for(var t=0;t<r.length;t+=2)e.push({x:r[t],y:r[t+1]});return e}}Ui.findMidptPtsEtc=function(r,e){var o,M,q,z,t=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a=r.pstyle("source-endpoint"),s=r.pstyle("target-endpoint"),l=null!=a.units&&null!=s.units;switch(r.pstyle("edge-distances").value){case"node-position":o=t;break;case"intersection":o=n;break;case"endpoints":if(l){var d=Wn(this.manualEndptToPx(r.source()[0],a),2),p=d[0],g=d[1],v=Wn(this.manualEndptToPx(r.target()[0],s),2),m=v[0],_=v[1],I={x1:p,y1:g,x2:m,y2:_};q=m-p,i={x:-(M=_-g)/(z=Math.sqrt(q*q+M*M)),y:q/z},o=I}else Kr("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),o=n}return{midptPts:o,vectorNormInverse:i}},Ui.findHaystackPoints=function(r){for(var e=0;e<r.length;e++){var t=r[e],n=t._private,i=n.rscratch;if(!i.haystack){var o=2*Math.random()*Math.PI;i.source={x:Math.cos(o),y:Math.sin(o)},o=2*Math.random()*Math.PI,i.target={x:Math.cos(o),y:Math.sin(o)}}var a=n.source,s=n.target,l=a.position(),u=s.position(),c=a.width(),h=s.width(),d=a.height(),p=s.height(),y=t.pstyle("haystack-radius").value/2;i.haystackPts=i.allpts=[i.source.x*c*y+l.x,i.source.y*d*y+l.y,i.target.x*h*y+u.x,i.target.y*p*y+u.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(t),this.calculateArrowAngles(t),this.recalculateEdgeLabelProjections(t),this.calculateLabelAngles(t)}},Ui.findSegmentsPoints=function(r,e){var t=r._private.rscratch,n=r.pstyle("segment-weights"),i=r.pstyle("segment-distances"),o=r.pstyle("segment-radii"),a=r.pstyle("radius-type"),s=Math.min(n.pfValue.length,i.pfValue.length),l=o.pfValue[o.pfValue.length-1],u=a.pfValue[a.pfValue.length-1];t.edgeType="segments",t.segpts=[],t.radii=[],t.isArcRadius=[];for(var c=0;c<s;c++){var h=n.pfValue[c],d=i.pfValue[c],p=1-h,g=h,y=this.findMidptPtsEtc(r,e),v=y.midptPts,m=y.vectorNormInverse,_={x:v.x1*p+v.x2*g,y:v.y1*p+v.y2*g};t.segpts.push(_.x+m.x*d,_.y+m.y*d),t.radii.push(void 0!==o.pfValue[c]?o.pfValue[c]:l),t.isArcRadius.push("arc-radius"===(void 0!==a.pfValue[c]?a.pfValue[c]:u))}},Ui.findLoopPoints=function(r,e,t,n){var i=r._private.rscratch,o=e.dirCounts,a=e.srcPos,s=r.pstyle("control-point-distances"),l=s?s.pfValue[0]:void 0,u=r.pstyle("loop-direction").pfValue,c=r.pstyle("loop-sweep").pfValue,h=r.pstyle("control-point-step-size").pfValue;i.edgeType="self";var d=t,p=h;n&&(d=0,p=l);var g=u-Math.PI/2,y=g-c/2,v=g+c/2,m=u+"_"+c;d=void 0===o[m]?o[m]=0:++o[m],i.ctrlpts=[a.x+1.4*Math.cos(y)*p*(d/3+1),a.y+1.4*Math.sin(y)*p*(d/3+1),a.x+1.4*Math.cos(v)*p*(d/3+1),a.y+1.4*Math.sin(v)*p*(d/3+1)]},Ui.findCompoundLoopPoints=function(r,e,t,n){var i=r._private.rscratch;i.edgeType="compound";var o=e.srcPos,a=e.tgtPos,s=e.srcW,l=e.srcH,u=e.tgtW,c=e.tgtH,h=r.pstyle("control-point-step-size").pfValue,d=r.pstyle("control-point-distances"),g=t,y=h;n&&(g=0,y=d?d.pfValue[0]:void 0);var m={x:o.x-s/2,y:o.y-l/2},_={x:a.x-u/2,y:a.y-c/2},I={x:Math.min(m.x,_.x),y:Math.min(m.y,_.y)},ne=Math.max(.5,Math.log(.01*s)),re=Math.max(.5,Math.log(.01*u));i.ctrlpts=[I.x,I.y-(1+Math.pow(50,1.12)/100)*y*(g/3+1)*ne,I.x-(1+Math.pow(50,1.12)/100)*y*(g/3+1)*re,I.y]},Ui.findStraightEdgePoints=function(r){r._private.rscratch.edgeType="straight"},Ui.findBezierPoints=function(r,e,t,n,i){var o=r._private.rscratch,a=r.pstyle("control-point-step-size").pfValue,s=r.pstyle("control-point-distances"),l=r.pstyle("control-point-weights"),u=s&&l?Math.min(s.value.length,l.value.length):1,c=s?s.pfValue[0]:void 0,h=l.value[0],d=n;o.edgeType=d?"multibezier":"bezier",o.ctrlpts=[];for(var p=0;p<u;p++){var y,g=(.5-e.eles.length/2+t)*a*(i?-1:1),v=Db(g);d&&(c=s?s.pfValue[p]:a,h=l.value[p]);var m=void 0!==(y=n?c:void 0!==c?v*c:void 0)?y:g,_=1-h,I=h,U=this.findMidptPtsEtc(r,e),ne=U.midptPts,re=U.vectorNormInverse,A={x:ne.x1*_+ne.x2*I,y:ne.y1*_+ne.y2*I};o.ctrlpts.push(A.x+re.x*m,A.y+re.y*m)}},Ui.findTaxiPoints=function(r,e){var t=r._private.rscratch;t.edgeType="segments";var n="vertical",i="horizontal",o="leftward",a="rightward",s="downward",l="upward",c=e.posPts,h=e.srcW,d=e.srcH,p=e.tgtW,g=e.tgtH,v="node-position"!==r.pstyle("edge-distances").value,m=r.pstyle("taxi-direction").value,_=m,I=r.pstyle("taxi-turn"),U="%"===I.units,ne=I.pfValue,re=ne<0,A=r.pstyle("taxi-turn-min-distance").pfValue,M=v?(d+g)/2:0,q=c.x2-c.x1,z=c.y2-c.y1,K=function(ue,He){return ue>0?Math.max(ue-He,0):Math.min(ue+He,0)},B=K(q,v?(h+p)/2:0),me=K(z,M),be=!1;"auto"===_?m=Math.abs(B)>Math.abs(me)?i:n:_===l||_===s?(m=n,be=!0):(_===o||_===a)&&(m=i,be=!0);var Pe,xe=m===n,we=xe?me:B,Re=xe?z:q,je=Db(Re),We=!1;(!be||!U&&!re)&&(_===s&&Re<0||_===l&&Re>0||_===o&&Re>0||_===a&&Re<0)&&(we=(je*=-1)*Math.abs(we),We=!0);var mt=function(ue){return Math.abs(ue)<A||Math.abs(ue)>=Math.abs(we)},at=mt(Pe=U?(ne<0?1+ne:ne)*we:(ne<0?we:0)+ne*je),bt=mt(Math.abs(we)-Math.abs(Pe));if(!at&&!bt||We)if(xe){var ir=c.y1+Pe+(v?d/2*je:0);t.segpts=[c.x1,ir,c.x2,ir]}else{var Gr=c.x1+Pe+(v?h/2*je:0);t.segpts=[Gr,c.y1,Gr,c.y2]}else if(xe){var Ut=Math.abs(Re)<=d/2,_t=Math.abs(q)<=p/2;if(Ut){var Me=(c.x1+c.x2)/2;t.segpts=[Me,c.y1,Me,c.y2]}else if(_t){var dt=(c.y1+c.y2)/2;t.segpts=[c.x1,dt,c.x2,dt]}else t.segpts=[c.x1,c.y2]}else{var Mr=Math.abs(Re)<=h/2,gr=Math.abs(z)<=g/2;if(Mr){var lr=(c.y1+c.y2)/2;t.segpts=[c.x1,lr,c.x2,lr]}else if(gr){var Gt=(c.x1+c.x2)/2;t.segpts=[Gt,c.y1,Gt,c.y2]}else t.segpts=[c.x2,c.y1]}if(t.isRound){var mr=r.pstyle("taxi-radius").value,Kt="arc-radius"===r.pstyle("radius-type").value[0];t.radii=new Array(t.segpts.length/2).fill(mr),t.isArcRadius=new Array(t.segpts.length/2).fill(Kt)}},Ui.tryToCorrectInvalidPoints=function(r,e){var t=r._private.rscratch;if("bezier"===t.edgeType){var n=e.srcPos,i=e.tgtPos,o=e.srcW,a=e.srcH,s=e.tgtW,l=e.tgtH,u=e.srcShape,c=e.tgtShape,h=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,g=e.tgtRs,y=!Bt(t.startX)||!Bt(t.startY),v=!Bt(t.arrowStartX)||!Bt(t.arrowStartY),m=!Bt(t.endX)||!Bt(t.endY),_=!Bt(t.arrowEndX)||!Bt(t.arrowEndY),ne=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,re=gl({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.startX,y:t.startY}),A=re<ne,C=gl({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.endX,y:t.endY}),M=C<ne,q=!1;if(y||v||A){q=!0;var z={x:t.ctrlpts[0]-n.x,y:t.ctrlpts[1]-n.y},K=Math.sqrt(z.x*z.x+z.y*z.y),B={x:z.x/K,y:z.y/K},me=Math.max(o,a),be={x:t.ctrlpts[0]+2*B.x*me,y:t.ctrlpts[1]+2*B.y*me},xe=u.intersectLine(n.x,n.y,o,a,be.x,be.y,0,h,p);A?(t.ctrlpts[0]=t.ctrlpts[0]+B.x*(ne-re),t.ctrlpts[1]=t.ctrlpts[1]+B.y*(ne-re)):(t.ctrlpts[0]=xe[0]+B.x*ne,t.ctrlpts[1]=xe[1]+B.y*ne)}if(m||_||M){q=!0;var we={x:t.ctrlpts[0]-i.x,y:t.ctrlpts[1]-i.y},Re=Math.sqrt(we.x*we.x+we.y*we.y),je={x:we.x/Re,y:we.y/Re},We=Math.max(o,a),Pe={x:t.ctrlpts[0]+2*je.x*We,y:t.ctrlpts[1]+2*je.y*We},Fe=c.intersectLine(i.x,i.y,s,l,Pe.x,Pe.y,0,d,g);M?(t.ctrlpts[0]=t.ctrlpts[0]+je.x*(ne-C),t.ctrlpts[1]=t.ctrlpts[1]+je.y*(ne-C)):(t.ctrlpts[0]=Fe[0]+je.x*ne,t.ctrlpts[1]=Fe[1]+je.y*ne)}q&&this.findEndpoints(r)}},Ui.storeAllpts=function(r){var e=r._private.rscratch;if("multibezier"===e.edgeType||"bezier"===e.edgeType||"self"===e.edgeType||"compound"===e.edgeType){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var t=0;t+1<e.ctrlpts.length;t+=2)e.allpts.push(e.ctrlpts[t],e.ctrlpts[t+1]),t+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[t]+e.ctrlpts[t+2])/2,(e.ctrlpts[t+1]+e.ctrlpts[t+3])/2);var n;e.allpts.push(e.endX,e.endY),e.ctrlpts.length/2%2==0?(e.midX=e.allpts[n=e.allpts.length/2-1],e.midY=e.allpts[n+1]):(e.midX=di(e.allpts[n=e.allpts.length/2-3],e.allpts[n+2],e.allpts[n+4],.5),e.midY=di(e.allpts[n+1],e.allpts[n+3],e.allpts[n+5],.5))}else if("straight"===e.edgeType)e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if("segments"===e.edgeType){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var o=2;o+3<e.allpts.length;o+=2){var a=e.radii[o/2-1];e.roundCorners.push(uE({x:e.allpts[o-2],y:e.allpts[o-1]},{x:e.allpts[o],y:e.allpts[o+1],radius:a},{x:e.allpts[o+2],y:e.allpts[o+3]},a,e.isArcRadius[o/2-1]))}}if(e.segpts.length%4==0){var l=e.segpts.length/2,u=l-2;e.midX=(e.segpts[u]+e.segpts[l])/2,e.midY=(e.segpts[u+1]+e.segpts[l+1])/2}else{var c=e.segpts.length/2-1;if(e.isRound){var h={x:e.segpts[c],y:e.segpts[c+1]},d=e.roundCorners[c/2];if(0===d.radius){var p={x:e.segpts[c+2],y:e.segpts[c+3]};e.midX=h.x,e.midY=h.y,e.midVector=[h.y-p.y,p.x-h.x]}else{var g=[h.x-d.cx,h.y-d.cy],y=d.radius/Math.sqrt(Math.pow(g[0],2)+Math.pow(g[1],2));g=g.map(function(v){return v*y}),e.midX=d.cx+g[0],e.midY=d.cy+g[1],e.midVector=g}}else e.midX=e.segpts[c],e.midY=e.segpts[c+1]}}},Ui.checkForInvalidEdgeWarning=function(r){var e=r[0]._private.rscratch;e.nodesOverlap||Bt(e.startX)&&Bt(e.startY)&&Bt(e.endX)&&Bt(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,Kr("Edge `"+r.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},Ui.findEdgeControlPoints=function(r){var e=this;if(r&&0!==r.length){for(var t=this,i=t.cy.hasCompoundNodes(),o=new Pa,a=function(M,q){return[].concat(cp(M),[q?1:0]).join("-")},s=[],l=[],u=0;u<r.length;u++){var c=r[u],h=c._private,d=c.pstyle("curve-style").value;if(!c.removed()&&c.takesUpSpace()){if("haystack"===d){l.push(c);continue}var p="unbundled-bezier"===d||hs(d,"segments")||"straight"===d||"straight-triangle"===d||hs(d,"taxi"),g="unbundled-bezier"===d||"bezier"===d,v=h.target,I=[h.source.poolIndex(),v.poolIndex()].sort(),U=a(I,p),ne=o.get(U);null==ne&&(ne={eles:[]},s.push({pairId:I,edgeIsUnbundled:p}),o.set(U,ne)),ne.eles.push(c),p&&(ne.hasUnbundled=!0),g&&(ne.hasBezier=!0)}}for(var re=function(){var me,M=s[A],K=a(M.pairId,M.edgeIsUnbundled),B=o.get(K);if(!B.hasUnbundled){var be=B.eles[0].parallelEdges().filter(function(Kt){return Kt.isBundledBezier()});Rb(B.eles),be.forEach(function(Kt){return B.eles.push(Kt)}),B.eles.sort(function(Kt,ut){return Kt.poolIndex()-ut.poolIndex()})}var xe=B.eles[0],we=xe.source(),Re=xe.target();if(we.poolIndex()>Re.poolIndex()){var je=we;we=Re,Re=je}var We=B.srcPos=we.position(),Pe=B.tgtPos=Re.position(),Fe=B.srcW=we.outerWidth(),lt=B.srcH=we.outerHeight(),mt=B.tgtW=Re.outerWidth(),at=B.tgtH=Re.outerHeight(),bt=B.srcShape=t.nodeShapes[e.getNodeShape(we)],xt=B.tgtShape=t.nodeShapes[e.getNodeShape(Re)],Ut=B.srcCornerRadius="auto"===we.pstyle("corner-radius").value?"auto":we.pstyle("corner-radius").pfValue,_t=B.tgtCornerRadius="auto"===Re.pstyle("corner-radius").value?"auto":Re.pstyle("corner-radius").pfValue,Me=B.tgtRs=Re._private.rscratch,$e=B.srcRs=we._private.rscratch;B.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var Xe=0;Xe<B.eles.length;Xe++){var dt=B.eles[Xe],Lt=dt[0]._private.rscratch,er=dt.pstyle("curve-style").value,Mr="unbundled-bezier"===er||hs(er,"segments")||hs(er,"taxi"),gr=!we.same(dt.source());if(!B.calculatedIntersection&&we!==Re&&(B.hasBezier||B.hasUnbundled)){B.calculatedIntersection=!0;var lr=bt.intersectLine(We.x,We.y,Fe,lt,Pe.x,Pe.y,0,Ut,$e),ar=B.srcIntn=lr,Ct=xt.intersectLine(Pe.x,Pe.y,mt,at,We.x,We.y,0,_t,Me),Gt=B.tgtIntn=Ct,tr=B.intersectionPts={x1:lr[0],x2:Ct[0],y1:lr[1],y2:Ct[1]},vr=B.posPts={x1:We.x,x2:Pe.x,y1:We.y,y2:Pe.y},ir=Ct[1]-lr[1],xr=Ct[0]-lr[0],Cr=Math.sqrt(xr*xr+ir*ir);Bt(Cr)&&Cr>=oj||(Cr=Math.sqrt(Math.max(xr*xr,.01)+Math.max(ir*ir,.01)));var Gr=B.vector={x:xr,y:ir},qr=B.vectorNorm={x:Gr.x/Cr,y:Gr.y/Cr},Vr={x:-qr.y,y:qr.x};B.nodesOverlap=!Bt(Cr)||xt.checkPoint(lr[0],lr[1],0,mt,at,Pe.x,Pe.y,_t,Me)||bt.checkPoint(Ct[0],Ct[1],0,Fe,lt,We.x,We.y,Ut,$e),B.vectorNormInverse=Vr,me={nodesOverlap:B.nodesOverlap,dirCounts:B.dirCounts,calculatedIntersection:!0,hasBezier:B.hasBezier,hasUnbundled:B.hasUnbundled,eles:B.eles,srcPos:Pe,srcRs:Me,tgtPos:We,tgtRs:$e,srcW:mt,srcH:at,tgtW:Fe,tgtH:lt,srcIntn:Gt,tgtIntn:ar,srcShape:xt,tgtShape:bt,posPts:{x1:vr.x2,y1:vr.y2,x2:vr.x1,y2:vr.y1},intersectionPts:{x1:tr.x2,y1:tr.y2,x2:tr.x1,y2:tr.y1},vector:{x:-Gr.x,y:-Gr.y},vectorNorm:{x:-qr.x,y:-qr.y},vectorNormInverse:{x:-Vr.x,y:-Vr.y}}}var mr=gr?me:B;Lt.nodesOverlap=mr.nodesOverlap,Lt.srcIntn=mr.srcIntn,Lt.tgtIntn=mr.tgtIntn,Lt.isRound=er.startsWith("round"),i&&(we.isParent()||we.isChild()||Re.isParent()||Re.isChild())&&(we.parents().anySame(Re)||Re.parents().anySame(we)||we.same(Re)&&we.isParent())?e.findCompoundLoopPoints(dt,mr,Xe,Mr):we===Re?e.findLoopPoints(dt,mr,Xe,Mr):er.endsWith("segments")?e.findSegmentsPoints(dt,mr):er.endsWith("taxi")?e.findTaxiPoints(dt,mr):"straight"===er||!Mr&&B.eles.length%2==1&&Xe===Math.floor(B.eles.length/2)?e.findStraightEdgePoints(dt):e.findBezierPoints(dt,mr,Xe,Mr,gr),e.findEndpoints(dt),e.tryToCorrectInvalidPoints(dt,mr),e.checkForInvalidEdgeWarning(dt),e.storeAllpts(dt),e.storeEdgeProjections(dt),e.calculateArrowAngles(dt),e.recalculateEdgeLabelProjections(dt),e.calculateLabelAngles(dt)}},A=0;A<s.length;A++)re();this.findHaystackPoints(l)}},Ui.getSegmentPoints=function(r){var e=r[0]._private.rscratch;if(this.recalculateRenderedStyle(r),"segments"===e.edgeType)return Vk(e.segpts)},Ui.getControlPoints=function(r){var e=r[0]._private.rscratch;this.recalculateRenderedStyle(r);var t=e.edgeType;if("bezier"===t||"multibezier"===t||"self"===t||"compound"===t)return Vk(e.ctrlpts)},Ui.getEdgeMidpoint=function(r){var e=r[0]._private.rscratch;return this.recalculateRenderedStyle(r),{x:e.midX,y:e.midY}};var nd={manualEndptToPx:function(r,e){var n=r.position(),i=r.outerWidth(),o=r.outerHeight(),a=r._private.rscratch;if(2===e.value.length){var s=[e.pfValue[0],e.pfValue[1]];return"%"===e.units[0]&&(s[0]=s[0]*i),"%"===e.units[1]&&(s[1]=s[1]*o),s[0]+=n.x,s[1]+=n.y,s}var l=e.pfValue[0];l=-Math.PI/2+l;var u=2*Math.max(i,o),c=[n.x+Math.cos(l)*u,n.y+Math.sin(l)*u];return this.nodeShapes[this.getNodeShape(r)].intersectLine(n.x,n.y,i,o,c[0],c[1],0,"auto"===r.pstyle("corner-radius").value?"auto":r.pstyle("corner-radius").pfValue,a)},findEndpoints:function(r){var e,t,n,i,a,o=this,s=r.source()[0],l=r.target()[0],u=s.position(),c=l.position(),h=r.pstyle("target-arrow-shape").value,d=r.pstyle("source-arrow-shape").value,p=r.pstyle("target-distance-from-node").pfValue,g=r.pstyle("source-distance-from-node").pfValue,y=s._private.rscratch,v=l._private.rscratch,m=r.pstyle("curve-style").value,_=r._private.rscratch,I=_.edgeType,U=hs(m,"taxi"),ne="self"===I||"compound"===I,re="bezier"===I||"multibezier"===I||ne,A="bezier"!==I,C="straight"===I||"segments"===I,M="segments"===I,q=re||A||C,z=ne||U,K=r.pstyle("source-endpoint"),B=z?"outside-to-node":K.value,me="auto"===s.pstyle("corner-radius").value?"auto":s.pstyle("corner-radius").pfValue,be=r.pstyle("target-endpoint"),xe=z?"outside-to-node":be.value,we="auto"===l.pstyle("corner-radius").value?"auto":l.pstyle("corner-radius").pfValue;_.srcManEndpt=K,_.tgtManEndpt=be;var Re,je,We,Pe,Fe=null!==(e=2===(null==be||null===(t=be.pfValue)||void 0===t?void 0:t.length)?be.pfValue:null)&&void 0!==e?e:[0,0],lt=null!==(n=2===(null==K||null===(i=K.pfValue)||void 0===i?void 0:i.length)?K.pfValue:null)&&void 0!==n?n:[0,0];if(re){var mt=[_.ctrlpts[0],_.ctrlpts[1]];Re=A?[_.ctrlpts[_.ctrlpts.length-2],_.ctrlpts[_.ctrlpts.length-1]]:mt,je=mt}else if(C){var bt=M?_.segpts.slice(0,2):[c.x+Fe[0],c.y+Fe[1]];Re=M?_.segpts.slice(_.segpts.length-2):[u.x+lt[0],u.y+lt[1]],je=bt}if("inside-to-node"===xe)a=[c.x,c.y];else if(be.units)a=this.manualEndptToPx(l,be);else if("outside-to-line"===xe)a=_.tgtIntn;else if("outside-to-node"===xe||"outside-to-node-or-label"===xe?We=Re:("outside-to-line"===xe||"outside-to-line-or-label"===xe)&&(We=[u.x,u.y]),a=o.nodeShapes[this.getNodeShape(l)].intersectLine(c.x,c.y,l.outerWidth(),l.outerHeight(),We[0],We[1],0,we,v),"outside-to-node-or-label"===xe||"outside-to-line-or-label"===xe){var Ut=l._private.rscratch,$e=Ut.labelX,Xe=Ut.labelY,dt=Ut.labelWidth/2,Lt=Ut.labelHeight/2,er=l.pstyle("text-valign").value;"top"===er?Xe-=Lt:"bottom"===er&&(Xe+=Lt);var Mr=l.pstyle("text-halign").value;"left"===Mr?$e-=dt:"right"===Mr&&($e+=dt);var gr=qh(We[0],We[1],[$e-dt,Xe-Lt,$e+dt,Xe-Lt,$e+dt,Xe+Lt,$e-dt,Xe+Lt],c.x,c.y);if(gr.length>0){var lr=u,ar=ml(lr,Nu(a)),Ct=ml(lr,Nu(gr)),Gt=ar;Ct<ar&&(a=gr,Gt=Ct),gr.length>2&&ml(lr,{x:gr[2],y:gr[3]})<Gt&&(a=[gr[2],gr[3]])}}var vr=Ap(a,Re,o.arrowShapes[h].spacing(r)+p),ir=Ap(a,Re,o.arrowShapes[h].gap(r)+p);if(_.endX=ir[0],_.endY=ir[1],_.arrowEndX=vr[0],_.arrowEndY=vr[1],"inside-to-node"===B)a=[u.x,u.y];else if(K.units)a=this.manualEndptToPx(s,K);else if("outside-to-line"===B)a=_.srcIntn;else if("outside-to-node"===B||"outside-to-node-or-label"===B?Pe=je:("outside-to-line"===B||"outside-to-line-or-label"===B)&&(Pe=[c.x,c.y]),a=o.nodeShapes[this.getNodeShape(s)].intersectLine(u.x,u.y,s.outerWidth(),s.outerHeight(),Pe[0],Pe[1],0,me,y),"outside-to-node-or-label"===B||"outside-to-line-or-label"===B){var xr=s._private.rscratch,qr=xr.labelX,Vr=xr.labelY,mr=xr.labelWidth/2,Kt=xr.labelHeight/2,ut=s.pstyle("text-valign").value;"top"===ut?Vr-=Kt:"bottom"===ut&&(Vr+=Kt);var ue=s.pstyle("text-halign").value;"left"===ue?qr-=mr:"right"===ue&&(qr+=mr);var He=qh(Pe[0],Pe[1],[qr-mr,Vr-Kt,qr+mr,Vr-Kt,qr+mr,Vr+Kt,qr-mr,Vr+Kt],u.x,u.y);if(He.length>0){var rt=c,nt=ml(rt,Nu(a)),ot=ml(rt,Nu(He)),Ht=nt;ot<nt&&(a=[He[0],He[1]],Ht=ot),He.length>2&&ml(rt,{x:He[2],y:He[3]})<Ht&&(a=[He[2],He[3]])}}var Qt=Ap(a,je,o.arrowShapes[d].spacing(r)+g),jt=Ap(a,je,o.arrowShapes[d].gap(r)+g);_.startX=jt[0],_.startY=jt[1],_.arrowStartX=Qt[0],_.arrowStartY=Qt[1],q&&(_.badLine=!(Bt(_.startX)&&Bt(_.startY)&&Bt(_.endX)&&Bt(_.endY)))},getSourceEndpoint:function(r){var e=r[0]._private.rscratch;return this.recalculateRenderedStyle(r),"haystack"===e.edgeType?{x:e.haystackPts[0],y:e.haystackPts[1]}:{x:e.arrowStartX,y:e.arrowStartY}},getTargetEndpoint:function(r){var e=r[0]._private.rscratch;return this.recalculateRenderedStyle(r),"haystack"===e.edgeType?{x:e.haystackPts[2],y:e.haystackPts[3]}:{x:e.arrowEndX,y:e.arrowEndY}}},cE={};function aj(r,e,t){for(var n=function(u,c,h,d){return di(u,c,h,d)},o=e._private.rstyle.bezierPts,a=0;a<r.bezierProjPcts.length;a++){var s=r.bezierProjPcts[a];o.push({x:n(t[0],t[2],t[4],s),y:n(t[1],t[3],t[5],s)})}}cE.storeEdgeProjections=function(r){var e=r._private,t=e.rscratch,n=t.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,"multibezier"===n||"bezier"===n||"self"===n||"compound"===n){e.rstyle.bezierPts=[];for(var i=0;i+5<t.allpts.length;i+=4)aj(this,r,t.allpts.slice(i,i+6))}else if("segments"===n){var o=e.rstyle.linePts=[];for(i=0;i+1<t.allpts.length;i+=2)o.push({x:t.allpts[i],y:t.allpts[i+1]})}else if("haystack"===n){var a=t.haystackPts;e.rstyle.haystackPts=[{x:a[0],y:a[1]},{x:a[2],y:a[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth},cE.recalculateEdgeProjections=function(r){this.findEdgeControlPoints(r)};var oa={recalculateNodeLabelProjection:function(r){var e=r.pstyle("label").strValue;if(!cs(e)){var t,n,i=r._private,o=r.width(),a=r.height(),s=r.padding(),l=r.position(),u=r.pstyle("text-halign").strValue,c=r.pstyle("text-valign").strValue,h=i.rscratch,d=i.rstyle;switch(u){case"left":t=l.x-o/2-s;break;case"right":t=l.x+o/2+s;break;default:t=l.x}switch(c){case"top":n=l.y-a/2-s;break;case"bottom":n=l.y+a/2+s;break;default:n=l.y}h.labelX=t,h.labelY=n,d.labelX=t,d.labelY=n,this.calculateLabelAngles(r),this.applyLabelDimensions(r)}}},Bk=function(e,t){var n=Math.atan(t/e);return 0===e&&n<0&&(n*=-1),n},Uk=function(e,t){return Bk(t.x-e.x,t.y-e.y)};oa.recalculateEdgeLabelProjections=function(r){var e,t=r._private,n=t.rscratch,i=this,o={mid:r.pstyle("label").strValue,source:r.pstyle("source-label").strValue,target:r.pstyle("target-label").strValue};if(o.mid||o.source||o.target){var a=function(h,d,p){Ca(t.rscratch,h,d,p),Ca(t.rstyle,h,d,p)};a("labelX",null,(e={x:n.midX,y:n.midY}).x),a("labelY",null,e.y);var s=Bk(n.midDispX,n.midDispY);a("labelAutoAngle",null,s);var l=function(){if(l.cache)return l.cache;for(var h=[],d=0;d+5<n.allpts.length;d+=4)h.push({p0:{x:n.allpts[d],y:n.allpts[d+1]},p1:{x:n.allpts[d+2],y:n.allpts[d+3]},p2:{x:n.allpts[d+4],y:n.allpts[d+5]},startDist:0,length:0,segments:[]});var v=t.rstyle.bezierPts,m=i.bezierProjPcts.length;function _(A,C,M,q,z){var K=gl(C,M),B=A.segments[A.segments.length-1];A.segments.push({p0:C,p1:M,t0:q,t1:z,startDist:B?B.startDist+B.length:0,length:K}),A.length+=K}for(var I=0;I<h.length;I++){var U=h[I],ne=h[I-1];ne&&(U.startDist=ne.startDist+ne.length),_(U,U.p0,v[I*m],0,i.bezierProjPcts[0]);for(var re=0;re<m-1;re++)_(U,v[I*m+re],v[I*m+re+1],i.bezierProjPcts[re],i.bezierProjPcts[re+1]);_(U,v[I*m+m-1],U.p2,i.bezierProjPcts[m-1],1)}return l.cache=h},u=function(h){var d,p="source"===h;if(o[h]){var g=r.pstyle(h+"-text-offset").pfValue;switch(n.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var v,y=l(),m=0,_=0,I=0;I<y.length;I++){for(var U=y[p?I:y.length-1-I],ne=0;ne<U.segments.length;ne++){var re=U.segments[p?ne:U.segments.length-1-ne];if(m=_,(_+=re.length)>=g||I===y.length-1&&ne===U.segments.length-1){v={cp:U,segment:re};break}}if(v)break}var C=v.cp,M=v.segment,q=(g-m)/M.length,z=M.t1-M.t0,K=p?M.t0+z*q:M.t1-z*q;K=zh(0,K,1),e=Ou(C.p0,C.p1,C.p2,K),d=function(e,t,n,i){var o=zh(0,i-.001,1),a=zh(0,i+.001,1),s=Ou(e,t,n,o),l=Ou(e,t,n,a);return Uk(s,l)}(C.p0,C.p1,C.p2,K);break;case"straight":case"segments":case"haystack":for(var me,be,xe,we,B=0,Re=n.allpts.length,je=0;je+3<Re&&(p?(xe={x:n.allpts[je],y:n.allpts[je+1]},we={x:n.allpts[je+2],y:n.allpts[je+3]}):(xe={x:n.allpts[Re-2-je],y:n.allpts[Re-1-je]},we={x:n.allpts[Re-4-je],y:n.allpts[Re-3-je]}),be=B,!((B+=me=gl(xe,we))>=g));je+=2);var Pe=(g-be)/me;Pe=zh(0,Pe,1),e=function(e,t,n,i){var o_x=t.x-e.x,o_y=t.y-e.y,a=gl(e,t);return n=n??0,{x:e.x+o_x/a*(i=i??n*a),y:e.y+o_y/a*i}}(xe,we,Pe),d=Uk(xe,we)}a("labelX",h,e.x),a("labelY",h,e.y),a("labelAutoAngle",h,d)}};u("source"),u("target"),this.applyLabelDimensions(r)}},oa.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))},oa.applyPrefixedLabelDimensions=function(r,e){var t=r._private,n=this.getLabelText(r,e),i=pl(n,r._private.labelDimsKey);if(io(t.rscratch,"prefixedLabelDimsKey",e)!==i){Ca(t.rscratch,"prefixedLabelDimsKey",e,i);var o=this.calculateLabelDimensions(r,n),a=r.pstyle("line-height").pfValue,s=r.pstyle("text-wrap").strValue,l=io(t.rscratch,"labelWrapCachedLines",e)||[],u="wrap"!==s?1:Math.max(l.length,1),c=o.height/u,h=c*a,d=o.width,p=o.height+(u-1)*(a-1)*c;Ca(t.rstyle,"labelWidth",e,d),Ca(t.rscratch,"labelWidth",e,d),Ca(t.rstyle,"labelHeight",e,p),Ca(t.rscratch,"labelHeight",e,p),Ca(t.rscratch,"labelLineHeight",e,h)}},oa.getLabelText=function(r,e){var t=r._private,i=r.pstyle((e?e+"-":"")+"label").strValue,o=r.pstyle("text-transform").value,a=function(lt,mt){return mt?(Ca(t.rscratch,lt,e,mt),mt):io(t.rscratch,lt,e)};if(!i)return"";"none"==o||("uppercase"==o?i=i.toUpperCase():"lowercase"==o&&(i=i.toLowerCase()));var s=r.pstyle("text-wrap").value;if("wrap"===s){var l=a("labelKey");if(null!=l&&a("labelWrapKey")===l)return a("labelWrapCachedText");for(var c=i.split("\n"),h=r.pstyle("text-max-width").pfValue,p="anywhere"===r.pstyle("text-overflow-wrap").value,g=[],y=/[\s\u200b]+|$/g,v=0;v<c.length;v++){var m=c[v],I=this.calculateLabelDimensions(r,m).width;if(p){var U=m.split("").join("\u200b");m=U}if(I>h){var M,re="",A=0,C=no(m.matchAll(y));try{for(C.s();!(M=C.n()).done;){var q=M.value,z=q[0],K=m.substring(A,q.index);A=q.index+z.length,this.calculateLabelDimensions(r,0===re.length?K:re+K+z).width<=h?re+=K+z:(re&&g.push(re),re=K+z)}}catch(Fe){C.e(Fe)}finally{C.f()}re.match(/^[\s\u200b]+$/)||g.push(re)}else g.push(m)}a("labelWrapCachedLines",g),i=a("labelWrapCachedText",g.join("\n")),a("labelWrapKey",l)}else if("ellipsis"===s){var xe=r.pstyle("text-max-width").pfValue,we="",je=!1;if(this.calculateLabelDimensions(r,i).width<xe)return i;for(var We=0;We<i.length&&!(this.calculateLabelDimensions(r,we+i[We]+"\u2026").width>xe);We++)we+=i[We],We===i.length-1&&(je=!0);return je||(we+="\u2026"),we}return i},oa.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!r.isNode())return"center";switch(t){case"left":return"right";case"right":return"left";default:return"center"}},oa.calculateLabelDimensions=function(r,e){var i=this.cy.window().document,a=r.pstyle("font-style").strValue,s=r.pstyle("font-size").pfValue,l=r.pstyle("font-family").strValue,u=r.pstyle("font-weight").strValue,c=this.labelCalcCanvas,h=this.labelCalcCanvasContext;if(!c){c=this.labelCalcCanvas=i.createElement("canvas"),h=this.labelCalcCanvasContext=c.getContext("2d");var d=c.style;d.position="absolute",d.left="-9999px",d.top="-9999px",d.zIndex="-1",d.visibility="hidden",d.pointerEvents="none"}h.font="".concat(a," ").concat(u," ").concat(s,"px ").concat(l);for(var p=0,g=0,y=e.split("\n"),v=0;v<y.length;v++){var _=h.measureText(y[v]),I=Math.ceil(_.width),U=s;p=Math.max(I,p),g+=U}return{width:p+=0,height:g+=0}},oa.calculateLabelAngle=function(r,e){var n=r._private.rscratch,i=r.isEdge(),a=r.pstyle((e?e+"-":"")+"text-rotation"),s=a.strValue;return"none"===s?0:i&&"autorotate"===s?n.labelAutoAngle:"autorotate"===s?0:a.pfValue},oa.calculateLabelAngles=function(r){var e=this,t=r.isEdge(),i=r._private.rscratch;i.labelAngle=e.calculateLabelAngle(r),t&&(i.sourceLabelAngle=e.calculateLabelAngle(r,"source"),i.targetLabelAngle=e.calculateLabelAngle(r,"target"))};var zk={},qk=!1;zk.getNodeShape=function(r){var t=r.pstyle("shape").value;if("cutrectangle"===t&&(r.width()<28||r.height()<28))return qk||(Kr("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),qk=!0),"rectangle";if(r.isParent())return"rectangle"===t||"roundrectangle"===t||"round-rectangle"===t||"cutrectangle"===t||"cut-rectangle"===t||"barrel"===t?t:"rectangle";if("polygon"===t){var n=r.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(n).name}return t};var ig={updateCachedGrabbedEles:function(){var r=this.cachedZSortedEles;if(r){r.drag=[],r.nondrag=[];for(var e=[],t=0;t<r.length;t++){var i=(n=r[t])._private.rscratch;n.grabbed()&&!n.isParent()?e.push(n):i.inDragLayer?r.drag.push(n):r.nondrag.push(n)}for(t=0;t<e.length;t++){var n;r.drag.push(n=e[t])}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(r){if(r||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(nk),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e}},jk={};[_l,eg,Ui,nd,cE,oa,zk,{registerCalculationListeners:function(){var r=this.cy,e=r.collection(),t=this,n=function(a){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.merge(a),s)for(var l=0;l<a.length;l++){var h=a[l]._private.rstyle;h.clean=!1,h.cleanConnected=!1}};t.binder(r).on("bounds.* dirty.*",function(a){n(a.target)}).on("style.* background.*",function(a){n(a.target,!1)});var i=function(a){if(a){var s=t.onUpdateEleCalcsFns;e.cleanStyle();for(var l=0;l<e.length;l++){var u=e[l],c=u._private.rstyle;u.isNode()&&!c.cleanConnected&&(n(u.connectedEdges()),c.cleanConnected=!0)}if(s)for(var h=0;h<s.length;h++)(0,s[h])(a,e);t.recalculateRenderedStyle(e),e=r.collection()}};t.flushRenderedStyleQueue=function(){i(!0)},t.beforeRender(i,t.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(r){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(r)},recalculateRenderedStyle:function(r,e){var t=function(U){return U._private.rstyle.cleanConnected};if(0!==r.length){var n=[],i=[];if(!this.destroyed){void 0===e&&(e=!0);for(var o=0;o<r.length;o++){var a=r[o],s=a._private,l=s.rstyle;a.isEdge()&&(!t(a.source())||!t(a.target()))&&(l.clean=!1),a.isEdge()&&a.isBundledBezier()&&a.parallelEdges().some(function(I){return!I._private.rstyle.clean&&I.isBundledBezier()})&&(l.clean=!1),!(e&&l.clean||a.removed())&&"none"!==a.pstyle("display").value&&("nodes"===s.group?i.push(a):n.push(a),l.clean=!0)}for(var u=0;u<i.length;u++){var c=i[u],d=c._private.rstyle,p=c.position();this.recalculateNodeLabelProjection(c),d.nodeX=p.x,d.nodeY=p.y,d.nodeW=c.pstyle("width").pfValue,d.nodeH=c.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var g=0;g<n.length;g++){var v=n[g]._private,m=v.rstyle,_=v.rscratch;m.srcX=_.arrowStartX,m.srcY=_.arrowStartY,m.tgtX=_.arrowEndX,m.tgtY=_.arrowEndY,m.midX=_.midX,m.midY=_.midY,m.labelAngle=_.labelAngle,m.sourceLabelAngle=_.sourceLabelAngle,m.targetLabelAngle=_.targetLabelAngle}}}}},ig].forEach(function(r){fr(jk,r)});var Hk={getCachedImage:function(r,e,t){var i=this.imageCache=this.imageCache||{},o=i[r];if(o)return o.image.complete||o.image.addEventListener("load",t),o.image;var a=(o=i[r]=i[r]||{}).image=new Image;a.addEventListener("load",t),a.addEventListener("error",function(){a.error=!0});return"data:"===r.substring(0,5).toLowerCase()||(a.crossOrigin=e="null"===e?null:e),a.src=r,a}},Xu={registerBinding:function(r,e,t,n){var i=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(r)){for(var o=[],a=0;a<r.length;a++){var s=r[a];if(void 0!==s){var l=this.binder(s);o.push(l.on.apply(l,i))}}return o}return(l=this.binder(r)).on.apply(l,i)},binder:function(r){var e=this,t=e.cy.window(),n=r===t||r===t.document||r===t.document.body||function(e){return!(typeof HTMLElement>"u")&&e instanceof HTMLElement}(r);if(null==e.supportsPassiveEvents){var i=!1;try{var o=Object.defineProperty({},"passive",{get:function(){return i=!0,!0}});t.addEventListener("test",null,o)}catch{}e.supportsPassiveEvents=i}var a=function(l,u,c){var h=Array.prototype.slice.call(arguments);return n&&e.supportsPassiveEvents&&(h[2]={capture:c??!1,passive:!1,once:!1}),e.bindings.push({target:r,args:h}),(r.addEventListener||r.on).apply(r,h),this};return{on:a,addEventListener:a,addListener:a,bind:a}},nodeIsDraggable:function(r){return r&&r.isNode()&&!r.locked()&&r.grabbable()},nodeIsGrabbable:function(r){return this.nodeIsDraggable(r)&&r.interactive()}};Xu.load=function(){var r=this,e=r.cy.window(),t=function(ue){return ue.selected()},i=function(ue,He,rt,nt){null==ue&&(ue=r.cy);for(var ot=0;ot<He.length;ot++)ue.emit({originalEvent:rt,type:He[ot],position:nt})},o=function(ue){return ue.shiftKey||ue.metaKey||ue.ctrlKey},a=function(ue,He){var rt=!0;if(r.cy.hasCompoundNodes()&&ue&&ue.pannable()){for(var nt=0;He&&nt<He.length;nt++)if((ue=He[nt]).isNode()&&ue.isParent()&&!ue.pannable()){rt=!1;break}}else rt=!0;return rt},u=function(ue){ue[0]._private.rscratch.inDragLayer=!0},h=function(ue){ue[0]._private.rscratch.isGrabTarget=!0},p=function(ue,He){var rt=He.addToList;!rt.has(ue)&&ue.grabbable()&&!ue.locked()&&(rt.merge(ue),function(ue){ue[0]._private.grabbed=!0}(ue))},y=function(ue,He){He=He||{};var rt=ue.cy().hasCompoundNodes();He.inDragLayer&&(ue.forEach(u),ue.neighborhood().stdFilter(function(nt){return!rt||nt.isEdge()}).forEach(u)),He.addToList&&ue.forEach(function(nt){p(nt,He)}),function(ue,He){if(ue.cy().hasCompoundNodes()&&(null!=He.inDragLayer||null!=He.addToList)){var rt=ue.descendants();He.inDragLayer&&(rt.forEach(u),rt.connectedEdges().forEach(u)),He.addToList&&p(rt,He)}}(ue,He),_(ue,{inDragLayer:He.inDragLayer}),r.updateCachedGrabbedEles()},v=y,m=function(ue){ue&&(r.getCachedZSortedEles().forEach(function(He){(function(ue){ue[0]._private.grabbed=!1})(He),function(ue){ue[0]._private.rscratch.inDragLayer=!1}(He),function(ue){ue[0]._private.rscratch.isGrabTarget=!1}(He)}),r.updateCachedGrabbedEles())},_=function(ue,He){if((null!=He.inDragLayer||null!=He.addToList)&&ue.cy().hasCompoundNodes()){var rt=ue.ancestors().orphans();if(!rt.same(ue)){var nt=rt.descendants().spawnSelf().merge(rt).unmerge(ue).unmerge(ue.descendants()),ot=nt.connectedEdges();He.inDragLayer&&(ot.forEach(u),nt.forEach(u)),He.addToList&&nt.forEach(function(Ht){p(Ht,He)})}}},I=function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},U=typeof MutationObserver<"u",ne=typeof ResizeObserver<"u";U?(r.removeObserver=new MutationObserver(function(ut){for(var ue=0;ue<ut.length;ue++){var rt=ut[ue].removedNodes;if(rt)for(var nt=0;nt<rt.length;nt++)if(rt[nt]===r.container){r.destroy();break}}}),r.container.parentNode&&r.removeObserver.observe(r.container.parentNode,{childList:!0})):r.registerBinding(r.container,"DOMNodeRemoved",function(ut){r.destroy()});var re=Mh(function(){r.cy.resize()},100);U&&(r.styleObserver=new MutationObserver(re),r.styleObserver.observe(r.container,{attributes:!0})),r.registerBinding(e,"resize",re),ne&&(r.resizeObserver=new ResizeObserver(re),r.resizeObserver.observe(r.container));var C=function(){r.invalidateContainerClientCoordsCache()};(function(ue,He){for(;null!=ue;)He(ue),ue=ue.parentNode})(r.container,function(ut){r.registerBinding(ut,"transitionend",C),r.registerBinding(ut,"animationend",C),r.registerBinding(ut,"scroll",C)}),r.registerBinding(r.container,"contextmenu",function(ut){ut.preventDefault()});var q=function(ue){for(var He=r.findContainerClientCoords(),rt=He[0],nt=He[1],ot=He[2],Ht=He[3],Et=ue.touches?ue.touches:[ue],Qt=!1,jt=0;jt<Et.length;jt++){var ur=Et[jt];if(rt<=ur.clientX&&ur.clientX<=rt+ot&&nt<=ur.clientY&&ur.clientY<=nt+Ht){Qt=!0;break}}if(!Qt)return!1;for(var hr=r.container,Yt=ue.target.parentNode,br=!1;Yt;){if(Yt===hr){br=!0;break}Yt=Yt.parentNode}return!!br};r.registerBinding(r.container,"mousedown",function(ue){if(q(ue)&&(1!==r.hoverData.which||1===ue.which)){ue.preventDefault(),I(),r.hoverData.capture=!0,r.hoverData.which=ue.which;var He=r.cy,rt=[ue.clientX,ue.clientY],nt=r.projectIntoViewport(rt[0],rt[1]),ot=r.selection,Ht=r.findNearestElements(nt[0],nt[1],!0,!1),Et=Ht[0],Qt=r.dragData.possibleDragElements;r.hoverData.mdownPos=nt,r.hoverData.mdownGPos=rt;var jt=function(Pr){return{originalEvent:ue,type:Pr,position:{x:nt[0],y:nt[1]}}};if(3==ue.which){r.hoverData.cxtStarted=!0;var hr={originalEvent:ue,type:"cxttapstart",position:{x:nt[0],y:nt[1]}};Et?(Et.activate(),Et.emit(hr),r.hoverData.down=Et):He.emit(hr),r.hoverData.downTime=(new Date).getTime(),r.hoverData.cxtDragged=!1}else if(1==ue.which){if(Et&&Et.activate(),null!=Et&&r.nodeIsGrabbable(Et)){if(h(Et),Et.selected()){Qt=r.dragData.possibleDragElements=He.collection();var Yt=He.$(function(br){return br.isNode()&&br.selected()&&r.nodeIsGrabbable(br)});y(Yt,{addToList:Qt}),Et.emit(jt("grabon")),Yt.forEach(function(Pr){Pr.emit(jt("grab"))})}else Qt=r.dragData.possibleDragElements=He.collection(),v(Et,{addToList:Qt}),Et.emit(jt("grabon")).emit(jt("grab"));r.redrawHint("eles",!0),r.redrawHint("drag",!0)}r.hoverData.down=Et,r.hoverData.downs=Ht,r.hoverData.downTime=(new Date).getTime(),i(Et,["mousedown","tapstart","vmousedown"],ue,{x:nt[0],y:nt[1]}),null==Et?(ot[4]=1,r.data.bgActivePosistion={x:nt[0],y:nt[1]},r.redrawHint("select",!0),r.redraw()):Et.pannable()&&(ot[4]=1),r.hoverData.tapholdCancelled=!1,clearTimeout(r.hoverData.tapholdTimeout),r.hoverData.tapholdTimeout=setTimeout(function(){if(!r.hoverData.tapholdCancelled){var Pr=r.hoverData.down;Pr?Pr.emit(jt("taphold")):He.emit(jt("taphold"))}},r.tapholdDuration)}ot[0]=ot[2]=nt[0],ot[1]=ot[3]=nt[1]}},!1);var K,B,me,z=function(ue){var He=ue.getRootNode();if(He&&11===He.nodeType&&void 0!==He.host)return He}(r.container);r.registerBinding([e,z],"mousemove",function(ue){var ao;if(r.hoverData.capture||q(ue)){var rt=!1,nt=r.cy,ot=nt.zoom(),Ht=[ue.clientX,ue.clientY],Et=r.projectIntoViewport(Ht[0],Ht[1]),Qt=r.hoverData.mdownPos,jt=r.hoverData.mdownGPos,ur=r.selection,hr=null;!r.hoverData.draggingEles&&!r.hoverData.dragging&&!r.hoverData.selecting&&(hr=r.findNearestElement(Et[0],Et[1],!0,!1));var zn,_r=r.hoverData.last,Yt=r.hoverData.down,br=[Et[0]-ur[2],Et[1]-ur[3]],Pr=r.dragData.possibleDragElements;if(jt){var Zr=Ht[0]-jt[0],On=Ht[1]-jt[1];r.hoverData.isOverThresholdDrag=zn=Zr*Zr+On*On>=r.desktopTapThreshold2}var Xn=o(ue);zn&&(r.hoverData.tapholdCancelled=!0),rt=!0,i(hr,["mousemove","vmousemove","tapdrag"],ue,{x:Et[0],y:Et[1]});var dn=function(ao){return{originalEvent:ue,type:ao,position:{x:Et[0],y:Et[1]}}},Go=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||nt.emit(dn("boxstart")),ur[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(3===r.hoverData.which){if(zn){var gi=dn("cxtdrag");Yt?Yt.emit(gi):nt.emit(gi),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||hr!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit(dn("cxtdragout")),r.hoverData.cxtOver=hr,hr&&hr.emit(dn("cxtdragover")))}}else if(r.hoverData.dragging){if(rt=!0,nt.panningEnabled()&&nt.userPanningEnabled()){var La;if(r.hoverData.justStartedPan){var Rl=r.hoverData.mdownPos;La={x:(Et[0]-Rl[0])*ot,y:(Et[1]-Rl[1])*ot},r.hoverData.justStartedPan=!1}else La={x:br[0]*ot,y:br[1]*ot};nt.panBy(La),nt.emit(dn("dragpan")),r.hoverData.dragged=!0}Et=r.projectIntoViewport(ue.clientX,ue.clientY)}else if(1!=ur[4]||null!=Yt&&!Yt.pannable()){if(Yt&&Yt.pannable()&&Yt.active()&&Yt.unactivate(),(!Yt||!Yt.grabbed())&&hr!=_r&&(_r&&i(_r,["mouseout","tapdragout"],ue,{x:Et[0],y:Et[1]}),hr&&i(hr,["mouseover","tapdragover"],ue,{x:Et[0],y:Et[1]}),r.hoverData.last=hr),Yt)if(zn){if(nt.boxSelectionEnabled()&&Xn)Yt&&Yt.grabbed()&&(m(Pr),Yt.emit(dn("freeon")),Pr.emit(dn("free")),r.dragData.didDrag&&(Yt.emit(dn("dragfreeon")),Pr.emit(dn("dragfree")))),Go();else if(Yt&&Yt.grabbed()&&r.nodeIsDraggable(Yt)){var mi=!r.dragData.didDrag;mi&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||y(Pr,{inDragLayer:!0});var ii={x:0,y:0};if(Bt(br[0])&&Bt(br[1])&&(ii.x+=br[0],ii.y+=br[1],mi)){var zi=r.hoverData.dragDelta;zi&&Bt(zi[0])&&Bt(zi[1])&&(ii.x+=zi[0],ii.y+=zi[1])}r.hoverData.draggingEles=!0,Pr.silentShift(ii).emit(dn("position")).emit(dn("drag")),r.redrawHint("drag",!0),r.redraw()}}else 0===(ao=r.hoverData.dragDelta=r.hoverData.dragDelta||[]).length?(ao.push(br[0]),ao.push(br[1])):(ao[0]+=br[0],ao[1]+=br[1]);rt=!0}else zn&&(r.hoverData.dragging||!nt.boxSelectionEnabled()||!Xn&&nt.panningEnabled()&&nt.userPanningEnabled()?!r.hoverData.selecting&&nt.panningEnabled()&&nt.userPanningEnabled()&&a(Yt,r.hoverData.downs)&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,ur[4]=0,r.data.bgActivePosistion=Nu(Qt),r.redrawHint("select",!0),r.redraw()):Go(),Yt&&Yt.pannable()&&Yt.active()&&Yt.unactivate());if(ur[2]=Et[0],ur[3]=Et[1],rt)return ue.stopPropagation&&ue.stopPropagation(),ue.preventDefault&&ue.preventDefault(),!1}},!1),r.registerBinding(e,"mouseup",function(ue){if((1!==r.hoverData.which||1===ue.which||!r.hoverData.capture)&&r.hoverData.capture){r.hoverData.capture=!1;var rt=r.cy,nt=r.projectIntoViewport(ue.clientX,ue.clientY),ot=r.selection,Ht=r.findNearestElement(nt[0],nt[1],!0,!1),Et=r.dragData.possibleDragElements,Qt=r.hoverData.down,jt=o(ue);r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,Qt&&Qt.unactivate();var ur=function(Zr){return{originalEvent:ue,type:Zr,position:{x:nt[0],y:nt[1]}}};if(3===r.hoverData.which){var hr=ur("cxttapend");if(Qt?Qt.emit(hr):rt.emit(hr),!r.hoverData.cxtDragged){var _r=ur("cxttap");Qt?Qt.emit(_r):rt.emit(_r)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(1===r.hoverData.which){if(i(Ht,["mouseup","tapend","vmouseup"],ue,{x:nt[0],y:nt[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(i(Qt,["click","tap","vclick"],ue,{x:nt[0],y:nt[1]}),B=!1,ue.timeStamp-me<=rt.multiClickDebounceTime()?(K&&clearTimeout(K),B=!0,me=null,i(Qt,["dblclick","dbltap","vdblclick"],ue,{x:nt[0],y:nt[1]})):(K=setTimeout(function(){B||i(Qt,["oneclick","onetap","voneclick"],ue,{x:nt[0],y:nt[1]})},rt.multiClickDebounceTime()),me=ue.timeStamp)),null==Qt&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!o(ue)&&(rt.$(t).unselect(["tapunselect"]),Et.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=Et=rt.collection()),Ht==Qt&&!r.dragData.didDrag&&!r.hoverData.selecting&&null!=Ht&&Ht._private.selectable&&(r.hoverData.dragging||("additive"===rt.selectionType()||jt?Ht.selected()?Ht.unselect(["tapunselect"]):Ht.select(["tapselect"]):jt||(rt.$(t).unmerge(Ht).unselect(["tapunselect"]),Ht.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var Yt=rt.collection(r.getAllInBox(ot[0],ot[1],ot[2],ot[3]));r.redrawHint("select",!0),Yt.length>0&&r.redrawHint("eles",!0),rt.emit(ur("boxend")),"additive"===rt.selectionType()||jt||rt.$(t).unmerge(Yt).unselect(),Yt.emit(ur("box")).stdFilter(function(Zr){return Zr.selectable()&&!Zr.selected()}).select().emit(ur("boxselect")),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!ot[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var Pr=Qt&&Qt.grabbed();m(Et),Pr&&(Qt.emit(ur("freeon")),Et.emit(ur("free")),r.dragData.didDrag&&(Qt.emit(ur("dragfreeon")),Et.emit(ur("dragfree"))))}}ot[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}},!1);var we,be=[],Re=1e5,Pe=function(ue){var He=!1,rt=ue.deltaY;if(null==rt&&(null!=ue.wheelDeltaY?rt=ue.wheelDeltaY/4:null!=ue.wheelDelta&&(rt=ue.wheelDelta/4)),0!==rt){if(null==we)if(be.length>=4){var nt=be;if(we=function(ue){for(var rt=0;rt<ue.length;rt++)if(ue[rt]%5!=0)return!1;return!0}(nt),!we){var ot=Math.abs(nt[0]);we=function(ue){for(var He=Math.abs(ue[0]),rt=1;rt<ue.length;rt++)if(Math.abs(ue[rt])!==He)return!1;return!0}(nt)&&ot>5}if(we)for(var Ht=0;Ht<nt.length;Ht++)Re=Math.min(Math.abs(nt[Ht]),Re)}else be.push(rt),He=!0;else we&&(Re=Math.min(Math.abs(rt),Re));if(!r.scrollingPage){var Et=r.cy,Qt=Et.zoom(),jt=Et.pan(),ur=r.projectIntoViewport(ue.clientX,ue.clientY),hr=[ur[0]*Qt+jt.x,ur[1]*Qt+jt.y];if(r.hoverData.draggingEles||r.hoverData.dragging||r.hoverData.cxtStarted||0!==r.selection[4])return void ue.preventDefault();if(Et.panningEnabled()&&Et.userPanningEnabled()&&Et.zoomingEnabled()&&Et.userZoomingEnabled()){var _r;ue.preventDefault(),r.data.wheelZooming=!0,clearTimeout(r.data.wheelTimeout),r.data.wheelTimeout=setTimeout(function(){r.data.wheelZooming=!1,r.redrawHint("eles",!0),r.redraw()},150),He&&Math.abs(rt)>5&&(rt=5*Db(rt)),_r=rt/-250,we&&(_r/=Re,_r*=3),_r*=r.wheelSensitivity,1===ue.deltaMode&&(_r*=33);var br=Et.zoom()*Math.pow(10,_r);"gesturechange"===ue.type&&(br=r.gestureStartZoom*ue.scale),Et.zoom({level:br,renderedPosition:{x:hr[0],y:hr[1]}}),Et.emit({type:"gesturechange"===ue.type?"pinchzoom":"scrollzoom",originalEvent:ue,position:{x:ur[0],y:ur[1]}})}}}};r.registerBinding(r.container,"wheel",Pe,!0),r.registerBinding(e,"scroll",function(ue){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(ue){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||ue.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(ut){r.hasTouchStarted||Pe(ut)},!0),r.registerBinding(r.container,"mouseout",function(ue){var He=r.projectIntoViewport(ue.clientX,ue.clientY);r.cy.emit({originalEvent:ue,type:"mouseout",position:{x:He[0],y:He[1]}})},!1),r.registerBinding(r.container,"mouseover",function(ue){var He=r.projectIntoViewport(ue.clientX,ue.clientY);r.cy.emit({originalEvent:ue,type:"mouseover",position:{x:He[0],y:He[1]}})},!1);var Fe,lt,mt,at,bt,xt,Ut,_t,Me,$e,Xe,dt,Lt,gr,lr,ar,Ct,Gt,tr,vr,er=function(ue,He,rt,nt){return Math.sqrt((rt-ue)*(rt-ue)+(nt-He)*(nt-He))},Mr=function(ue,He,rt,nt){return(rt-ue)*(rt-ue)+(nt-He)*(nt-He)};if(r.registerBinding(r.container,"touchstart",gr=function(ue){if(r.hasTouchStarted=!0,q(ue)){I(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var He=r.cy,rt=r.touchData.now,nt=r.touchData.earlier;if(ue.touches[0]){var ot=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY);rt[0]=ot[0],rt[1]=ot[1]}ue.touches[1]&&(ot=r.projectIntoViewport(ue.touches[1].clientX,ue.touches[1].clientY),rt[2]=ot[0],rt[3]=ot[1]),ue.touches[2]&&(ot=r.projectIntoViewport(ue.touches[2].clientX,ue.touches[2].clientY),rt[4]=ot[0],rt[5]=ot[1]);var Ht=function(Xn){return{originalEvent:ue,type:Xn,position:{x:rt[0],y:rt[1]}}};if(ue.touches[1]){r.touchData.singleTouchMoved=!0,m(r.dragData.touchDragEles);var Et=r.findContainerClientCoords();Xe=Et[2],dt=Et[3],lt=ue.touches[0].clientY-($e=Et[1]),mt=ue.touches[1].clientX-(Me=Et[0]),at=ue.touches[1].clientY-$e,Lt=0<=(Fe=ue.touches[0].clientX-Me)&&Fe<=Xe&&0<=mt&&mt<=Xe&&0<=lt&&lt<=dt&&0<=at&&at<=dt;var Qt=He.pan(),jt=He.zoom();if(bt=er(Fe,lt,mt,at),xt=Mr(Fe,lt,mt,at),_t=[((Ut=[(Fe+mt)/2,(lt+at)/2])[0]-Qt.x)/jt,(Ut[1]-Qt.y)/jt],xt<4e4&&!ue.touches[2]){var _r=r.findNearestElement(rt[0],rt[1],!0,!0),Yt=r.findNearestElement(rt[2],rt[3],!0,!0);return _r&&_r.isNode()?(_r.activate().emit(Ht("cxttapstart")),r.touchData.start=_r):Yt&&Yt.isNode()?(Yt.activate().emit(Ht("cxttapstart")),r.touchData.start=Yt):He.emit(Ht("cxttapstart")),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!0,r.touchData.cxtDragged=!1,r.data.bgActivePosistion=void 0,void r.redraw()}}if(ue.touches[2])He.boxSelectionEnabled()&&ue.preventDefault();else if(!ue.touches[1]&&ue.touches[0]){var br=r.findNearestElements(rt[0],rt[1],!0,!0),Pr=br[0];if(null!=Pr&&(Pr.activate(),r.touchData.start=Pr,r.touchData.starts=br,r.nodeIsGrabbable(Pr))){var zn=r.dragData.touchDragEles=He.collection(),Zr=null;r.redrawHint("eles",!0),r.redrawHint("drag",!0),Pr.selected()?(Zr=He.$(function(Ln){return Ln.selected()&&r.nodeIsGrabbable(Ln)}),y(Zr,{addToList:zn})):v(Pr,{addToList:zn}),h(Pr),Pr.emit(Ht("grabon")),Zr?Zr.forEach(function(Ln){Ln.emit(Ht("grab"))}):Pr.emit(Ht("grab"))}i(Pr,["touchstart","tapstart","vmousedown"],ue,{x:rt[0],y:rt[1]}),null==Pr&&(r.data.bgActivePosistion={x:ot[0],y:ot[1]},r.redrawHint("select",!0),r.redraw()),r.touchData.singleTouchMoved=!1,r.touchData.singleTouchStartTime=+new Date,clearTimeout(r.touchData.tapholdTimeout),r.touchData.tapholdTimeout=setTimeout(function(){!1===r.touchData.singleTouchMoved&&!r.pinching&&!r.touchData.selecting&&i(r.touchData.start,["taphold"],ue,{x:rt[0],y:rt[1]})},r.tapholdDuration)}if(ue.touches.length>=1){for(var Ai=r.touchData.startPosition=[null,null,null,null,null,null],On=0;On<rt.length;On++)Ai[On]=nt[On]=rt[On];var An=ue.touches[0];r.touchData.startGPosition=[An.clientX,An.clientY]}}},!1),r.registerBinding(e,"touchmove",lr=function(ue){var He=r.touchData.capture;if(He||q(ue)){var rt=r.selection,nt=r.cy,ot=r.touchData.now,Ht=r.touchData.earlier,Et=nt.zoom();if(ue.touches[0]){var Qt=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY);ot[0]=Qt[0],ot[1]=Qt[1]}ue.touches[1]&&(Qt=r.projectIntoViewport(ue.touches[1].clientX,ue.touches[1].clientY),ot[2]=Qt[0],ot[3]=Qt[1]),ue.touches[2]&&(Qt=r.projectIntoViewport(ue.touches[2].clientX,ue.touches[2].clientY),ot[4]=Qt[0],ot[5]=Qt[1]);var hr,jt=function(sn){return{originalEvent:ue,type:sn,position:{x:ot[0],y:ot[1]}}},ur=r.touchData.startGPosition;if(He&&ue.touches[0]&&ur){for(var _r=[],Yt=0;Yt<ot.length;Yt++)_r[Yt]=ot[Yt]-Ht[Yt];var br=ue.touches[0].clientX-ur[0],zn=ue.touches[0].clientY-ur[1];hr=br*br+zn*zn>=r.touchTapThreshold2}if(He&&r.touchData.cxt){ue.preventDefault();var So=Mr(On=ue.touches[0].clientX-Me,An=ue.touches[0].clientY-$e,Ln=ue.touches[1].clientX-Me,Xn=ue.touches[1].clientY-$e);if(So/xt>=2.25||So>=22500){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var qo=jt("cxttapend");r.touchData.start?(r.touchData.start.unactivate().emit(qo),r.touchData.start=null):nt.emit(qo)}}if(He&&r.touchData.cxt){qo=jt("cxtdrag"),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(qo):nt.emit(qo),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var mi=r.findNearestElement(ot[0],ot[1],!0,!0);(!r.touchData.cxtOver||mi!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit(jt("cxtdragout")),r.touchData.cxtOver=mi,mi&&mi.emit(jt("cxtdragover")))}else if(He&&ue.touches[2]&&nt.boxSelectionEnabled())ue.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||nt.emit(jt("boxstart")),r.touchData.selecting=!0,r.touchData.didSelect=!0,rt[4]=1,rt&&0!==rt.length&&void 0!==rt[0]?(rt[2]=(ot[0]+ot[2]+ot[4])/3,rt[3]=(ot[1]+ot[3]+ot[5])/3):(rt[0]=(ot[0]+ot[2]+ot[4])/3,rt[1]=(ot[1]+ot[3]+ot[5])/3,rt[2]=(ot[0]+ot[2]+ot[4])/3+1,rt[3]=(ot[1]+ot[3]+ot[5])/3+1),r.redrawHint("select",!0),r.redraw();else if(He&&ue.touches[1]&&!r.touchData.didSelect&&nt.zoomingEnabled()&&nt.panningEnabled()&&nt.userZoomingEnabled()&&nt.userPanningEnabled()){if(ue.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),ii=r.dragData.touchDragEles){r.redrawHint("drag",!0);for(var zi=0;zi<ii.length;zi++){var Ss=ii[zi]._private;Ss.grabbed=!1,Ss.rscratch.inDragLayer=!1}}var On,An,Ln,Xn,ao=r.touchData.start,Sl=er(On=ue.touches[0].clientX-Me,An=ue.touches[0].clientY-$e,Ln=ue.touches[1].clientX-Me,Xn=ue.touches[1].clientY-$e),dg=Sl/bt;if(Lt){var CE=(On-Fe+(Ln-mt))/2,fg=(An-lt+(Xn-at))/2,Cs=nt.zoom(),tc=Cs*dg,Ps=nt.pan(),rc=_t[0]*Cs+Ps.x,pd=_t[1]*Cs+Ps.y,pg={x:-tc/Cs*(rc-Ps.x-CE)+rc,y:-tc/Cs*(pd-Ps.y-fg)+pd};ao&&ao.active()&&(m(ii=r.dragData.touchDragEles),r.redrawHint("drag",!0),r.redrawHint("eles",!0),ao.unactivate().emit(jt("freeon")),ii.emit(jt("free")),r.dragData.didDrag&&(ao.emit(jt("dragfreeon")),ii.emit(jt("dragfree")))),nt.viewport({zoom:tc,pan:pg,cancelOnFailedZoom:!0}),nt.emit(jt("pinchzoom")),bt=Sl,Fe=On,lt=An,mt=Ln,at=Xn,r.pinching=!0}ue.touches[0]&&(Qt=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY),ot[0]=Qt[0],ot[1]=Qt[1]),ue.touches[1]&&(Qt=r.projectIntoViewport(ue.touches[1].clientX,ue.touches[1].clientY),ot[2]=Qt[0],ot[3]=Qt[1]),ue.touches[2]&&(Qt=r.projectIntoViewport(ue.touches[2].clientX,ue.touches[2].clientY),ot[4]=Qt[0],ot[5]=Qt[1])}else if(ue.touches[0]&&!r.touchData.didSelect){var so=r.touchData.start,gd=r.touchData.last;if(!r.hoverData.draggingEles&&!r.swipePanning&&(mi=r.findNearestElement(ot[0],ot[1],!0,!0)),He&&null!=so&&ue.preventDefault(),He&&null!=so&&r.nodeIsDraggable(so))if(hr){var ii=r.dragData.touchDragEles,jo=!r.dragData.didDrag;jo&&y(ii,{inDragLayer:!0}),r.dragData.didDrag=!0;var Gi={x:0,y:0};Bt(_r[0])&&Bt(_r[1])&&(Gi.x+=_r[0],Gi.y+=_r[1],jo)&&(r.redrawHint("eles",!0),(Ri=r.touchData.dragDelta)&&Bt(Ri[0])&&Bt(Ri[1])&&(Gi.x+=Ri[0],Gi.y+=Ri[1])),r.hoverData.draggingEles=!0,ii.silentShift(Gi).emit(jt("position")).emit(jt("drag")),r.redrawHint("drag",!0),r.touchData.startPosition[0]==Ht[0]&&r.touchData.startPosition[1]==Ht[1]&&r.redrawHint("eles",!0),r.redraw()}else{var Ri;0===(Ri=r.touchData.dragDelta=r.touchData.dragDelta||[]).length?(Ri.push(_r[0]),Ri.push(_r[1])):(Ri[0]+=_r[0],Ri[1]+=_r[1])}if(i(so||mi,["touchmove","tapdrag","vmousemove"],ue,{x:ot[0],y:ot[1]}),(!so||!so.grabbed())&&mi!=gd&&(gd&&gd.emit(jt("tapdragout")),mi&&mi.emit(jt("tapdragover"))),r.touchData.last=mi,He)for(zi=0;zi<ot.length;zi++)ot[zi]&&r.touchData.startPosition[zi]&&hr&&(r.touchData.singleTouchMoved=!0);He&&(null==so||so.pannable())&&nt.panningEnabled()&&nt.userPanningEnabled()&&(a(so,r.touchData.starts)&&(ue.preventDefault(),r.data.bgActivePosistion||(r.data.bgActivePosistion=Nu(r.touchData.startPosition)),r.swipePanning?(nt.panBy({x:_r[0]*Et,y:_r[1]*Et}),nt.emit(jt("dragpan"))):hr&&(r.swipePanning=!0,nt.panBy({x:br*Et,y:zn*Et}),nt.emit(jt("dragpan")),so&&(so.unactivate(),r.redrawHint("select",!0),r.touchData.start=null))),Qt=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY),ot[0]=Qt[0],ot[1]=Qt[1])}for(Yt=0;Yt<ot.length;Yt++)Ht[Yt]=ot[Yt];He&&ue.touches.length>0&&!r.hoverData.draggingEles&&!r.swipePanning&&null!=r.data.bgActivePosistion&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1),r.registerBinding(e,"touchcancel",ar=function(ue){var He=r.touchData.start;r.touchData.capture=!1,He&&He.unactivate()}),r.registerBinding(e,"touchend",Ct=function(ue){var He=r.touchData.start;if(r.touchData.capture){0===ue.touches.length&&(r.touchData.capture=!1),ue.preventDefault();var nt=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var ot=r.cy,Ht=ot.zoom(),Et=r.touchData.now,Qt=r.touchData.earlier;if(ue.touches[0]){var jt=r.projectIntoViewport(ue.touches[0].clientX,ue.touches[0].clientY);Et[0]=jt[0],Et[1]=jt[1]}ue.touches[1]&&(jt=r.projectIntoViewport(ue.touches[1].clientX,ue.touches[1].clientY),Et[2]=jt[0],Et[3]=jt[1]),ue.touches[2]&&(jt=r.projectIntoViewport(ue.touches[2].clientX,ue.touches[2].clientY),Et[4]=jt[0],Et[5]=jt[1]);var hr,ur=function(gi){return{originalEvent:ue,type:gi,position:{x:Et[0],y:Et[1]}}};if(He&&He.unactivate(),r.touchData.cxt){if(hr=ur("cxttapend"),He?He.emit(hr):ot.emit(hr),!r.touchData.cxtDragged){var _r=ur("cxttap");He?He.emit(_r):ot.emit(_r)}return r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,void r.redraw()}if(!ue.touches[2]&&ot.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var Yt=ot.collection(r.getAllInBox(nt[0],nt[1],nt[2],nt[3]));nt[0]=void 0,nt[1]=void 0,nt[2]=void 0,nt[3]=void 0,nt[4]=0,r.redrawHint("select",!0),ot.emit(ur("boxend")),Yt.emit(ur("box")).stdFilter(function(gi){return gi.selectable()&&!gi.selected()}).select().emit(ur("boxselect")),Yt.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if(He?.unactivate(),ue.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!ue.touches[1]&&!ue.touches[0]&&!ue.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Pr=r.dragData.touchDragEles;if(null!=He){var zn=He._private.grabbed;m(Pr),r.redrawHint("drag",!0),r.redrawHint("eles",!0),zn&&(He.emit(ur("freeon")),Pr.emit(ur("free")),r.dragData.didDrag&&(He.emit(ur("dragfreeon")),Pr.emit(ur("dragfree")))),i(He,["touchend","tapend","vmouseup","tapdragout"],ue,{x:Et[0],y:Et[1]}),He.unactivate(),r.touchData.start=null}else{var Zr=r.findNearestElement(Et[0],Et[1],!0,!0);i(Zr,["touchend","tapend","vmouseup","tapdragout"],ue,{x:Et[0],y:Et[1]})}var Ai=r.touchData.startPosition[0]-Et[0],An=r.touchData.startPosition[1]-Et[1],So=(Ai*Ai+An*An)*Ht*Ht;r.touchData.singleTouchMoved||(He||ot.$(":selected").unselect(["tapunselect"]),i(He,["tap","vclick"],ue,{x:Et[0],y:Et[1]}),Gt=!1,ue.timeStamp-vr<=ot.multiClickDebounceTime()?(tr&&clearTimeout(tr),Gt=!0,vr=null,i(He,["dbltap","vdblclick"],ue,{x:Et[0],y:Et[1]})):(tr=setTimeout(function(){Gt||i(He,["onetap","voneclick"],ue,{x:Et[0],y:Et[1]})},ot.multiClickDebounceTime()),vr=ue.timeStamp)),null!=He&&!r.dragData.didDrag&&He._private.selectable&&So<r.touchTapThreshold2&&!r.pinching&&("single"===ot.selectionType()?(ot.$(t).unmerge(He).unselect(["tapunselect"]),He.select(["tapselect"])):He.selected()?He.unselect(["tapunselect"]):He.select(["tapselect"]),r.redrawHint("eles",!0)),r.touchData.singleTouchMoved=!0}for(var dn=0;dn<Et.length;dn++)Qt[dn]=Et[dn];r.dragData.didDrag=!1,0===ue.touches.length&&(r.touchData.dragDelta=[],r.touchData.startPosition=[null,null,null,null,null,null],r.touchData.startGPosition=null,r.touchData.didSelect=!1),ue.touches.length<2&&(1===ue.touches.length&&(r.touchData.startGPosition=[ue.touches[0].clientX,ue.touches[0].clientY]),r.pinching=!1,r.redrawHint("eles",!0),r.redraw())}},!1),typeof TouchEvent>"u"){var ir=[],xr=function(ue){return{clientX:ue.clientX,clientY:ue.clientY,force:1,identifier:ue.pointerId,pageX:ue.pageX,pageY:ue.pageY,radiusX:ue.width/2,radiusY:ue.height/2,screenX:ue.screenX,screenY:ue.screenY,target:ue.target}},qr=function(ue){for(var He=0;He<ir.length;He++)if(ir[He].event.pointerId===ue.pointerId)return void ir.splice(He,1)},mr=function(ue){ue.touches=ir.map(function(He){return He.touch})},Kt=function(ue){return"mouse"===ue.pointerType||4===ue.pointerType};r.registerBinding(r.container,"pointerdown",function(ut){Kt(ut)||(ut.preventDefault(),ir.push(function(ue){return{event:ue,touch:xr(ue)}}(ut)),mr(ut),gr(ut))}),r.registerBinding(r.container,"pointerup",function(ut){Kt(ut)||(qr(ut),mr(ut),Ct(ut))}),r.registerBinding(r.container,"pointercancel",function(ut){Kt(ut)||(qr(ut),mr(ut),ar())}),r.registerBinding(r.container,"pointermove",function(ut){var ue,He;Kt(ut)||(ut.preventDefault(),ue=ut,(He=ir.filter(function(rt){return rt.event.pointerId===ue.pointerId})[0]).event=ue,He.touch=xr(ue),mr(ut),lr(ut))})}};var Na={generatePolygon:function(r,e){return this.nodeShapes[r]={renderer:this,name:r,points:e,draw:function(n,i,o,a,s,l){this.renderer.nodeShapeImpl("polygon",n,i,o,a,s,this.points)},intersectLine:function(n,i,o,a,s,l,u,c){return qh(s,l,this.points,n,i,o/2,a/2,u)},checkPoint:function(n,i,o,a,s,l,u,c){return ka(n,i,this.points,l,u,a,s,[0,-1],o)},hasMiterBounds:"rectangle"!==r,miterBounds:function(n,i,o,a,s,l){return function Lz(r,e,t,n,i,o){var s=function Oz(r,e){if(r.length<3)throw new Error("Need at least 3 vertices");var t=function(C,M){return{x:C.x+M.x,y:C.y+M.y}},n=function(C,M){return{x:C.x-M.x,y:C.y-M.y}},i=function(C,M){return{x:C.x*M,y:C.y*M}},o=function(C,M){return C.x*M.y-C.y*M.x},a=function(C){var M=Nz(C.x,C.y);return 0===M?{x:0,y:0}:{x:C.x/M,y:C.y/M}},l=function(C,M,q,z){var K=n(M,C),B=n(z,q),me=o(K,B);if(Math.abs(me)<1e-9)return t(C,i(K,.5));var be=o(n(q,C),B)/me;return t(C,i(K,be))},u=r.map(function(A){return{x:A.x,y:A.y}});(function(C){for(var M=0,q=0;q<C.length;q++){var z=C[q],K=C[(q+1)%C.length];M+=z.x*K.y-K.x*z.y}return M/2})(u)<0&&u.reverse();for(var c=u.length,h=[],d=0;d<c;d++){var y=n(u[(d+1)%c],u[d]),v=a({x:y.y,y:-y.x});h.push(v)}for(var m=h.map(function(A,C){return{p1:t(u[C],i(A,e)),p2:t(u[(C+1)%c],i(A,e))}}),_=[],I=0;I<c;I++){var U=m[(I-1+c)%c],ne=m[I],re=l(U.p1,U.p2,ne.p1,ne.p2);_.push(re)}return _}(jz(r,e,t,n,i),o),l=Ki();return s.forEach(function(u){return ZS(l,u.x,u.y)}),l}(this.points,n,i,o,a,s)}}},generateEllipse:function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,t,n,i,o,a){this.renderer.nodeShapeImpl(this.name,e,t,n,i,o)},intersectLine:function(e,t,n,i,o,a,s,l){return function(e,t,n,i,o,a){var s=n-e,l=i-t;s/=o,l/=a;var u=Math.sqrt(s*s+l*l),c=u-1;if(c<0)return[];var h=c/u;return[(n-e)*h+e,(i-t)*h+t]}(o,a,e,t,n/2+s,i/2+s)},checkPoint:function(e,t,n,i,o,a,s,l){return vl(e,t,i,o,a,s,n)}}},generateRoundPolygon:function(r,e){return this.nodeShapes[r]={renderer:this,name:r,points:e,getOrCreateCorners:function(n,i,o,a,s,l,u){if(void 0!==l[u]&&l[u+"-cx"]===n&&l[u+"-cy"]===i)return l[u];l[u]=new Array(e.length/2),l[u+"-cx"]=n,l[u+"-cy"]=i;var c=o/2,h=a/2;s="auto"===s?oC(o,a):s;for(var d=new Array(e.length/2),p=0;p<e.length/2;p++)d[p]={x:n+c*e[2*p],y:i+h*e[2*p+1]};var g,y,v,m,_=d.length;for(y=d[_-1],g=0;g<_;g++)l[u][g]=uE(y,v=d[g%_],m=d[(g+1)%_],s),y=v,v=m;return l[u]},draw:function(n,i,o,a,s,l,u){this.renderer.nodeShapeImpl("round-polygon",n,i,o,a,s,this.points,this.getOrCreateCorners(i,o,a,s,l,u,"drawCorners"))},intersectLine:function(n,i,o,a,s,l,u,c,h){return function(e,t,n,i,o,a,s,l,u){var h,c=[],d=new Array(2*n.length);u.forEach(function(_,I){0===I?(d[d.length-2]=_.startX,d[d.length-1]=_.startY):(d[4*I-2]=_.startX,d[4*I-1]=_.startY),d[4*I]=_.stopX,d[4*I+1]=_.stopY,0!==(h=Gh(e,t,i,o,_.cx,_.cy,_.radius)).length&&c.push(h[0],h[1])});for(var p=0;p<d.length/4;p++)0!==(h=gs(e,t,i,o,d[4*p],d[4*p+1],d[4*p+2],d[4*p+3],!1)).length&&c.push(h[0],h[1]);if(c.length>2){for(var g=[c[0],c[1]],y=Math.pow(g[0]-e,2)+Math.pow(g[1]-t,2),v=1;v<c.length/2;v++){var m=Math.pow(c[2*v]-e,2)+Math.pow(c[2*v+1]-t,2);m<=y&&(g[0]=c[2*v],g[1]=c[2*v+1],y=m)}return g}return c}(s,l,this.points,n,i,0,0,0,this.getOrCreateCorners(n,i,o,a,c,h,"corners"))},checkPoint:function(n,i,o,a,s,l,u,c,h){return function(e,t,n,i,o,a,s,l){for(var u=new Array(2*n.length),c=0;c<l.length;c++){var h=l[c];if(u[4*c+0]=h.startX,u[4*c+1]=h.startY,u[4*c+2]=h.stopX,u[4*c+3]=h.stopY,Math.pow(h.cx-e,2)+Math.pow(h.cy-t,2)<=Math.pow(h.radius,2))return!0}return oo(e,t,u)}(n,i,this.points,0,0,0,0,this.getOrCreateCorners(l,u,a,s,c,h,"corners"))}}},generateRoundRectangle:function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Xi(4,0),draw:function(e,t,n,i,o,a){this.renderer.nodeShapeImpl(this.name,e,t,n,i,o,this.points,a)},intersectLine:function(e,t,n,i,o,a,s,l){return nC(o,a,e,t,n,i,s,l)},checkPoint:function(e,t,n,i,o,a,s,l){var u=i/2,c=o/2;l="auto"===l?ms(i,o):l;var h=2*(l=Math.min(u,c,l));return!!(ka(e,t,this.points,a,s,i,o-h,[0,-1],n)||ka(e,t,this.points,a,s,i-h,o,[0,-1],n)||vl(e,t,h,h,a-u+l,s-c+l,n)||vl(e,t,h,h,a+u-l,s-c+l,n)||vl(e,t,h,h,a+u-l,s+c-l,n)||vl(e,t,h,h,a-u+l,s+c-l,n))}}},generateCutRectangle:function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:8,points:Xi(4,0),draw:function(e,t,n,i,o,a){this.renderer.nodeShapeImpl(this.name,e,t,n,i,o,null,a)},generateCutTrianglePts:function(e,t,n,i,o){var a="auto"===o?this.cornerLength:o,s=t/2,l=e/2,u=n-l,c=n+l,h=i-s,d=i+s;return{topLeft:[u,h+a,u+a,h,u+a,h+a],topRight:[c-a,h,c,h+a,c-a,h+a],bottomRight:[c,d-a,c-a,d,c-a,d-a],bottomLeft:[u+a,d,u,d-a,u+a,d-a]}},intersectLine:function(e,t,n,i,o,a,s,l){var u=this.generateCutTrianglePts(n+2*s,i+2*s,e,t,l),c=[].concat.apply([],[u.topLeft.splice(0,4),u.topRight.splice(0,4),u.bottomRight.splice(0,4),u.bottomLeft.splice(0,4)]);return qh(o,a,c,e,t)},checkPoint:function(e,t,n,i,o,a,s,l){var u="auto"===l?this.cornerLength:l;if(ka(e,t,this.points,a,s,i,o-2*u,[0,-1],n)||ka(e,t,this.points,a,s,i-2*u,o,[0,-1],n))return!0;var c=this.generateCutTrianglePts(i,o,a,s);return oo(e,t,c.topLeft)||oo(e,t,c.topRight)||oo(e,t,c.bottomRight)||oo(e,t,c.bottomLeft)}}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Xi(4,0),draw:function(e,t,n,i,o,a){this.renderer.nodeShapeImpl(this.name,e,t,n,i,o)},intersectLine:function(e,t,n,i,o,a,s,l){var d=this.generateBarrelBezierPts(n+2*s,i+2*s,e,t),p=function(v){var m=Ou({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},.15),_=Ou({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},.5),I=Ou({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},.85);return[v[0],v[1],m.x,m.y,_.x,_.y,I.x,I.y,v[4],v[5]]},g=[].concat(p(d.topLeft),p(d.topRight),p(d.bottomRight),p(d.bottomLeft));return qh(o,a,g,e,t)},generateBarrelBezierPts:function(e,t,n,i){var o=t/2,a=e/2,s=n-a,l=n+a,u=i-o,c=i+o,h=Fb(e,t),d=h.heightOffset,p=h.widthOffset,g=h.ctrlPtOffsetPct*e,y={topLeft:[s,u+d,s+g,u,s+p,u],topRight:[l-p,u,l-g,u,l,u+d],bottomRight:[l,c-d,l-g,c,l-p,c],bottomLeft:[s+p,c,s+g,c,s,c-d]};return y.topLeft.isTop=!0,y.topRight.isTop=!0,y.bottomLeft.isBottom=!0,y.bottomRight.isBottom=!0,y},checkPoint:function(e,t,n,i,o,a,s,l){var u=Fb(i,o),h=u.widthOffset;if(ka(e,t,this.points,a,s,i,o-2*u.heightOffset,[0,-1],n)||ka(e,t,this.points,a,s,i-2*h,o,[0,-1],n))return!0;for(var d=this.generateBarrelBezierPts(i,o,a,s),p=function(C,M,q){var z=q[4],K=q[2],B=q[0],me=q[5],be=q[1],xe=Math.min(z,B),we=Math.max(z,B),Re=Math.min(me,be),je=Math.max(me,be);if(xe<=C&&C<=we&&Re<=M&&M<=je){var We=function(e,t,n){return[e-2*t+n,2*(t-e),e]}(z,K,B),Pe=function(e,t,n,i){var o=t*t-4*e*(n-=i);if(o<0)return[];var a=Math.sqrt(o),s=2*e;return[(-t+a)/s,(-t-a)/s]}(We[0],We[1],We[2],C),Fe=Pe.filter(function(lt){return 0<=lt&&lt<=1});if(Fe.length>0)return Fe[0]}return null},g=Object.keys(d),y=0;y<g.length;y++){var m=d[g[y]],_=p(e,t,m);if(null!=_){var re=di(m[5],m[3],m[1],_);if(m.isTop&&re<=t||m.isBottom&&t<=re)return!0}}return!1}}},generateBottomRoundrectangle:function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Xi(4,0),draw:function(e,t,n,i,o,a){this.renderer.nodeShapeImpl(this.name,e,t,n,i,o,this.points,a)},intersectLine:function(e,t,n,i,o,a,s,l){var c=t-(i/2+s),p=gs(o,a,e,t,e-(n/2+s),c,e+(n/2+s),c,!1);return p.length>0?p:nC(o,a,e,t,n,i,s,l)},checkPoint:function(e,t,n,i,o,a,s,l){var u=2*(l="auto"===l?ms(i,o):l);if(ka(e,t,this.points,a,s,i,o-u,[0,-1],n)||ka(e,t,this.points,a,s,i-u,o,[0,-1],n))return!0;var c=i/2+2*n,h=o/2+2*n;return!!(oo(e,t,[a-c,s-h,a-c,s,a+c,s,a+c,s-h])||vl(e,t,u,u,a+i/2-l,s+o/2-l,n)||vl(e,t,u,u,a-i/2+l,s+o/2-l,n))}}},registerNodeShapes:function(){var r=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Xi(3,0)),this.generateRoundPolygon("round-triangle",Xi(3,0)),this.generatePolygon("rectangle",Xi(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var t=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t),this.generatePolygon("pentagon",Xi(5,0)),this.generateRoundPolygon("round-pentagon",Xi(5,0)),this.generatePolygon("hexagon",Xi(6,0)),this.generateRoundPolygon("round-hexagon",Xi(6,0)),this.generatePolygon("heptagon",Xi(7,0)),this.generateRoundPolygon("round-heptagon",Xi(7,0)),this.generatePolygon("octagon",Xi(8,0)),this.generateRoundPolygon("round-octagon",Xi(8,0));var n=new Array(20),i=Lb(5,0),o=Lb(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s<o.length/2;s++)o[2*s]*=a,o[2*s+1]*=a;for(s=0;s<5;s++)n[4*s]=i[2*s],n[4*s+1]=i[2*s+1],n[4*s+2]=o[2*s],n[4*s+3]=o[2*s+1];n=iC(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);var l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",l),this.generateRoundPolygon("round-tag",l),r.makePolygon=function(u){var d,h="polygon-"+u.join("$");return(d=this[h])?d:e.generatePolygon(h,u)}}},id={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(r){r=r||KS();var e=this;void 0===e.averageRedrawTime&&(e.averageRedrawTime=0),void 0===e.lastRedrawTime&&(e.lastRedrawTime=0),void 0===e.lastDrawTime&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=r},beforeRender:function(r,e){if(!this.destroyed){null==e&&bn("Priority is not optional for beforeRender");var t=this.beforeRenderCallbacks;t.push({fn:r,priority:e}),t.sort(function(n,i){return i.priority-n.priority})}}},$k=function(e,t,n){for(var i=e.beforeRenderCallbacks,o=0;o<i.length;o++)i[o].fn(t,n)};id.startRenderLoop=function(){var r=this,e=r.cy;if(!r.renderLoopStarted){r.renderLoopStarted=!0;var t=function(i){if(!r.destroyed){if(!e.batching())if(r.requestedFrame&&!r.skipFrame){$k(r,!0,i);var o=Sa();r.render(r.renderOptions);var a=r.lastDrawTime=Sa();void 0===r.averageRedrawTime&&(r.averageRedrawTime=a-o),void 0===r.redrawCount&&(r.redrawCount=0),r.redrawCount++,void 0===r.redrawTotalTime&&(r.redrawTotalTime=0);var s=a-o;r.redrawTotalTime+=s,r.lastRedrawTime=s,r.averageRedrawTime=r.averageRedrawTime/2+s/2,r.requestedFrame=!1}else $k(r,!1,i);r.skipFrame=!1,gp(t)}};gp(t)}};var Wk=function(e){this.init(e)},Yu=Wk.prototype;Yu.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],Yu.init=function(r){var e=this;e.options=r,e.cy=r.cy;var t=e.container=r.cy.container(),n=e.cy.window();if(n){var i=n.document,o=i.head,a="__________cytoscape_stylesheet",s="__________cytoscape_container",l=null!=i.getElementById(a);if(t.className.indexOf(s)<0&&(t.className=(t.className||"")+" "+s),!l){var u=i.createElement("style");u.id=a,u.textContent="."+s+" { position: relative; }",o.insertBefore(u,o.children[0])}"static"===n.getComputedStyle(t).getPropertyValue("position")&&Kr("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=r.showFps,e.debug=r.debug,e.webgl=r.webgl,e.hideEdgesOnViewport=r.hideEdgesOnViewport,e.textureOnViewport=r.textureOnViewport,e.wheelSensitivity=r.wheelSensitivity,e.motionBlurEnabled=r.motionBlur,e.forcedPixelRatio=Bt(r.pixelRatio)?r.pixelRatio:null,e.motionBlur=r.motionBlur,e.motionBlurOpacity=r.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=r.desktopTapThreshold,e.desktopTapThreshold2=r.desktopTapThreshold*r.desktopTapThreshold,e.touchTapThreshold=r.touchTapThreshold,e.touchTapThreshold2=r.touchTapThreshold*r.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()},Yu.notify=function(r,e){var t=this,n=t.cy;if(!this.destroyed){if("init"===r)return void t.load();if("destroy"===r)return void t.destroy();("add"===r||"remove"===r||"move"===r&&n.hasCompoundNodes()||"load"===r||"zorder"===r||"mount"===r)&&t.invalidateCachedZSortedEles(),"viewport"===r&&t.redrawHint("select",!0),"gc"===r&&t.redrawHint("gc",!0),("load"===r||"resize"===r||"mount"===r)&&(t.invalidateContainerClientCoordsCache(),t.matchCanvasSize(t.container)),t.redrawHint("eles",!0),t.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},Yu.destroy=function(){var r=this;r.destroyed=!0,r.cy.stopAnimationLoop();for(var e=0;e<r.bindings.length;e++){var t=r.bindings[e],i=t.target;(i.off||i.removeEventListener).apply(i,t.args)}if(r.bindings=[],r.beforeRenderCallbacks=[],r.onUpdateEleCalcsFns=[],r.removeObserver&&r.removeObserver.disconnect(),r.styleObserver&&r.styleObserver.disconnect(),r.resizeObserver&&r.resizeObserver.disconnect(),r.labelCalcDiv)try{document.body.removeChild(r.labelCalcDiv)}catch{}},Yu.isHeadless=function(){return!1},[iE,jk,Hk,Xu,Na,id].forEach(function(r){fr(Yu,r)});var hE=1e3/60,Kk_setupDequeueing=function(e){return function(){var n=this,i=this.renderer;if(!n.dequeueingSetup){n.dequeueingSetup=!0;var o=Mh(function(){i.redrawHint("eles",!0),i.redrawHint("drag",!0),i.redraw()},e.deqRedrawThreshold);i.beforeRender(function(u,c){var h=Sa(),d=i.averageRedrawTime,p=i.lastRedrawTime,g=[],y=i.cy.extent(),v=i.getPixelRatio();for(u||i.flushRenderedStyleQueue();;){var m=Sa(),_=m-h,I=m-c;if(p<hE){if(I>=e.deqFastCost*(hE-(u?d:0)))break}else if(u){if(_>=e.deqCost*p||_>=e.deqAvgCost*d)break}else if(I>=e.deqNoDrawCost*hE)break;var ne=e.deq(n,v,y);if(!(ne.length>0))break;for(var re=0;re<ne.length;re++)g.push(ne[re])}g.length>0&&(e.onDeqd(n,g),!u&&e.shouldRedraw(n,g,v,y)&&o())},(e.priority||Ab)(n))}}},uj=function(){return us(function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vp;ls(this,r),this.idsByKey=new Pa,this.keyForId=new Pa,this.cachesByLvl=new Pa,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t},[{key:"getIdsFor",value:function(t){null==t&&bn("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(t);return i||(i=new Du,n.set(t,i)),i}},{key:"addIdForKey",value:function(t,n){null!=t&&this.getIdsFor(t).add(n)}},{key:"deleteIdForKey",value:function(t,n){null!=t&&this.getIdsFor(t).delete(n)}},{key:"getNumberOfIdsForKey",value:function(t){return null==t?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var n=t.id(),i=this.keyForId.get(n),o=this.getKey(t);this.deleteIdForKey(i,n),this.addIdForKey(o,n),this.keyForId.set(n,o)}},{key:"deleteKeyMappingFor",value:function(t){var n=t.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(t){var n=t.id();return this.keyForId.get(n)!==this.getKey(t)}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var n=this.cachesByLvl,i=this.lvls,o=n.get(t);return o||(o=new Pa,n.set(t,o),i.push(t)),o}},{key:"getCache",value:function(t,n){return this.getCachesAt(n).get(t)}},{key:"get",value:function(t,n){var i=this.getKey(t),o=this.getCache(i,n);return null!=o&&this.updateKeyMappingFor(t),o}},{key:"getForCachedKey",value:function(t,n){var i=this.keyForId.get(t.id());return this.getCache(i,n)}},{key:"hasCache",value:function(t,n){return this.getCachesAt(n).has(t)}},{key:"has",value:function(t,n){var i=this.getKey(t);return this.hasCache(i,n)}},{key:"setCache",value:function(t,n,i){i.key=t,this.getCachesAt(n).set(t,i)}},{key:"set",value:function(t,n,i){var o=this.getKey(t);this.setCache(o,n,i),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,n){this.getCachesAt(n).delete(t)}},{key:"delete",value:function(t,n){var i=this.getKey(t);this.deleteCache(i,n)}},{key:"invalidateKey",value:function(t){var n=this;this.lvls.forEach(function(i){return n.deleteCache(t,i)})}},{key:"invalidate",value:function(t){var n=t.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(t);var o=this.doesEleInvalidateKey(t);return o&&this.invalidateKey(i),o||0===this.getNumberOfIdsForKey(i)}}])}(),Qu={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Tj=Ei({getKey:null,doesEleInvalidateKey:vp,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:jS,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),od=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var i=Tj(t);fr(n,i),n.lookup=new uj(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},ni=od.prototype;ni.reasons=Qu,ni.getTextureQueue=function(r){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[r]=e.eleImgCaches[r]||[]},ni.getRetiredTextureQueue=function(r){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[r]=t[r]||[]},ni.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new Uh(function(t,n){return n.reqs-t.reqs})},ni.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},ni.getElement=function(r,e,t,n,i){var o=this,a=this.renderer,s=a.cy.zoom(),l=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!r.visible()||r.removed()||!o.allowEdgeTxrCaching&&r.isEdge()||!o.allowParentTxrCaching&&r.isParent())return null;if(null==n&&(n=Math.ceil(kb(s*t))),n<-4)n=-4;else if(s>=7.99||n>3)return null;var u=Math.pow(2,n),c=e.h*u,h=e.w*u,d=a.eleTextBiggerThanMin(r,u);if(!this.isVisible(r,d))return null;var g,p=l.get(r,n);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(g=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||h>1024)return null;var y=o.getTextureQueue(g),v=y[y.length-2],m=function(){return o.recycleTexture(g,h)||o.addTexture(g,h)};v||(v=y[y.length-1]),v||(v=m()),v.width-v.usedWidth<h&&(v=m());for(var re,_=function(xe){return xe&&xe.scaledLabelShown===d},I=i&&i===Qu.dequeue,U=i&&i===Qu.highQuality,ne=i&&i===Qu.downscale,A=n+1;A<=3;A++){var C=l.get(r,A);if(C){re=C;break}}var M=re&&re.level===n+1?re:null,q=function(){v.context.drawImage(M.texture.canvas,M.x,0,M.width,M.height,v.usedWidth,0,h,c)};if(v.context.setTransform(1,0,0,1,0,0),v.context.clearRect(v.usedWidth,0,h,g),_(M))q();else if(_(re)){if(!U)return o.queueElement(r,re.level-1),re;for(var z=re.level;z>n;z--)M=o.getElement(r,e,t,z,Qu.downscale);q()}else{var K;if(!I&&!U&&!ne)for(var B=n-1;B>=-4;B--){var me=l.get(r,B);if(me){K=me;break}}if(_(K))return o.queueElement(r,n),K;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,r,e,d,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return p={x:v.usedWidth,texture:v,level:n,scale:u,width:h,height:c,scaledLabelShown:d},v.usedWidth+=Math.ceil(h+8),v.eleCaches.push(p),l.set(r,n,p),o.checkTextureFullness(v),p},ni.invalidateElements=function(r){for(var e=0;e<r.length;e++)this.invalidateElement(r[e])},ni.invalidateElement=function(r){var e=this,t=e.lookup,n=[];if(t.isInvalid(r)){for(var o=-4;o<=3;o++){var a=t.getForCachedKey(r,o);a&&n.push(a)}if(t.invalidate(r))for(var l=0;l<n.length;l++){var u=n[l],c=u.texture;c.invalidatedWidth+=u.width,u.invalidated=!0,e.checkTextureUtility(c)}e.removeFromQueue(r)}},ni.checkTextureUtility=function(r){r.invalidatedWidth>=.2*r.width&&this.retireTexture(r)},ni.checkTextureFullness=function(r){var t=this.getTextureQueue(r.height);r.usedWidth/r.width>.8&&r.fullnessChecks>=10?fs(t,r):r.fullnessChecks++},ni.retireTexture=function(r){var t=r.height,n=this.getTextureQueue(t),i=this.lookup;fs(n,r),r.retired=!0;for(var o=r.eleCaches,a=0;a<o.length;a++){var s=o[a];i.deleteCache(s.key,s.level)}Rb(o),this.getRetiredTextureQueue(t).push(r)},ni.addTexture=function(r,e){var i={};return this.getTextureQueue(r).push(i),i.eleCaches=[],i.height=r,i.width=Math.max(1024,e),i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,i.canvas=this.renderer.makeOffscreenCanvas(i.width,i.height),i.context=i.canvas.getContext("2d"),i},ni.recycleTexture=function(r,e){for(var n=this.getTextureQueue(r),i=this.getRetiredTextureQueue(r),o=0;o<i.length;o++){var a=i[o];if(a.width>=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,Rb(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),fs(i,a),n.push(a),a}},ni.queueElement=function(r,e){var n=this.getElementQueue(),i=this.getElementKeyToQueue(),o=this.getKey(r),a=i[o];if(a)a.level=Math.max(a.level,e),a.eles.merge(r),a.reqs++,n.updateItem(a);else{var s={eles:r.spawn().merge(r),level:e,reqs:1,key:o};n.push(s),i[o]=s}},ni.dequeue=function(r){for(var e=this,t=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],o=e.lookup,a=0;a<1&&t.size()>0;a++){var s=t.pop(),l=s.key,u=s.eles[0],c=o.hasCache(u,s.level);if(n[l]=null,!c){i.push(s);var h=e.getBoundingBox(u);e.getElement(u,h,r,s.level,Qu.dequeue)}}return i},ni.removeFromQueue=function(r){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(r),o=n[i];null!=o&&(1===o.eles.length?(o.reqs=xb,t.updateItem(o),t.pop(),n[i]=null):o.eles.unmerge(r))},ni.onDequeue=function(r){this.onDequeues.push(r)},ni.offDequeue=function(r){fs(this.onDequeues,r)},ni.setupDequeueing=Kk_setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n<e.onDequeues.length;n++)(0,e.onDequeues[n])(t)},shouldRedraw:function(e,t,n,i){for(var o=0;o<t.length;o++)for(var a=t[o].eles,s=0;s<a.length;s++){var l=a[s].boundingBox();if(Nb(l,i))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});var Zk=function(e){var t=this,n=t.renderer=e,i=n.cy;t.layersByLevel={},t.firstGet=!0,t.lastInvalidationTime=Sa()-500,t.skipping=!1,t.eleTxrDeqs=i.collection(),t.scheduleElementRefinement=Mh(function(){t.refineElementTextures(t.eleTxrDeqs),t.eleTxrDeqs.unmerge(t.eleTxrDeqs)},50),n.beforeRender(function(a,s){t.skipping=s-t.lastInvalidationTime<=250},n.beforeRenderPriorities.lyrTxrSkip),t.layersQueue=new Uh(function(s,l){return l.reqs-s.reqs}),t.setupDequeueing()},xi=Zk.prototype,eD=0,Lj=Math.pow(2,53)-1;xi.makeLayer=function(r,e){var t=Math.pow(2,e),n=Math.ceil(r.w*t),i=Math.ceil(r.h*t),o=this.renderer.makeOffscreenCanvas(n,i),a={id:eD=++eD%Lj,bb:r,level:e,width:n,height:i,canvas:o,context:o.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=a.context,l=-a.bb.x1,u=-a.bb.y1;return s.scale(t,t),s.translate(l,u),a},xi.getLayers=function(r,e,t){var n=this,a=n.renderer.cy.zoom(),s=n.firstGet;if(n.firstGet=!1,null==t)if((t=Math.ceil(kb(a*e)))<-4)t=-4;else if(a>=3.99||t>2)return null;n.validateLayersElesOrdering(t,r);var h,p,l=n.layersByLevel,u=Math.pow(2,t),c=l[t]=l[t]||[];if(n.levelIsComplete(t,r))return c;!function(){var q=function(be){if(n.validateLayersElesOrdering(be,r),n.levelIsComplete(be,r))return p=l[be],!0},z=function(be){if(!p)for(var xe=t+be;-4<=xe&&xe<=2&&!q(xe);xe+=be);};z(1),z(-1);for(var K=c.length-1;K>=0;K--){var B=c[K];B.invalid&&fs(c,B)}}();var v=function(q){var z=(q=q||{}).after;!function(){if(!h){h=Ki();for(var q=0;q<r.length;q++)Dz(h,r[q].boundingBox())}}();var K=Math.ceil(h.w*u),B=Math.ceil(h.h*u);if(K>32767||B>32767)return null;if(K*B>16e6)return null;var be=n.makeLayer(h,t);if(null!=z){var xe=c.indexOf(z)+1;c.splice(xe,0,be)}else(void 0===q.insert||q.insert)&&c.unshift(be);return be};if(n.skipping&&!s)return null;for(var m=null,_=r.length/1,I=!s,U=0;U<r.length;U++){var ne=r[U],re=ne._private.rscratch,A=re.imgLayerCaches=re.imgLayerCaches||{},C=A[t];if(C)m=C;else{if((!m||m.eles.length>=_||!rC(m.bb,ne.boundingBox()))&&!(m=v({insert:!0,after:m})))return null;p||I?n.queueLayer(m,ne):n.drawEleInLayer(m,ne,t,e),m.eles.push(ne),A[t]=m}}return p||(I?null:c)},xi.getEleLevelForLayerLevel=function(r,e){return r},xi.drawEleInLayer=function(r,e,t,n){var o=this.renderer,a=r.context,s=e.boundingBox();0===s.w||0===s.h||!e.visible()||(t=this.getEleLevelForLayerLevel(t,n),o.setImgSmoothing(a,!1),o.drawCachedElement(a,e,null,null,t,!0),o.setImgSmoothing(a,!0))},xi.levelIsComplete=function(r,e){var n=this.layersByLevel[r];if(!n||0===n.length)return!1;for(var i=0,o=0;o<n.length;o++){var a=n[o];if(a.reqs>0||a.invalid)return!1;i+=a.eles.length}return i===e.length},xi.validateLayersElesOrdering=function(r,e){var t=this.layersByLevel[r];if(t)for(var n=0;n<t.length;n++){for(var i=t[n],o=-1,a=0;a<e.length;a++)if(i.eles[0]===e[a]){o=a;break}if(o<0)this.invalidateLayer(i);else{var s=o;for(a=0;a<i.eles.length;a++)if(i.eles[a]!==e[s+a]){this.invalidateLayer(i);break}}}},xi.updateElementsInLayers=function(r,e){for(var n=Dh(r[0]),i=0;i<r.length;i++)for(var o=n?null:r[i],a=n?r[i]:r[i].ele,s=a._private.rscratch,l=s.imgLayerCaches=s.imgLayerCaches||{},u=-4;u<=2;u++){var c=l[u];c&&(o&&this.getEleLevelForLayerLevel(c.level)!==o.level||e(c,a,o))}},xi.haveLayers=function(){for(var e=!1,t=-4;t<=2;t++){var n=this.layersByLevel[t];if(n&&n.length>0){e=!0;break}}return e},xi.invalidateElements=function(r){var e=this;0!==r.length&&(e.lastInvalidationTime=Sa(),0!==r.length&&e.haveLayers()&&e.updateElementsInLayers(r,function(n,i,o){e.invalidateLayer(n)}))},xi.invalidateLayer=function(r){if(this.lastInvalidationTime=Sa(),!r.invalid){var e=r.level,t=r.eles;fs(this.layersByLevel[e],r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var i=0;i<t.length;i++){var o=t[i]._private.rscratch.imgLayerCaches;o&&(o[e]=null)}}},xi.refineElementTextures=function(r){var e=this;e.updateElementsInLayers(r,function(n,i,o){var a=n.replacement;if(a||((a=n.replacement=e.makeLayer(n.bb,n.level)).replaces=n,a.eles=n.eles),!a.reqs)for(var s=0;s<a.eles.length;s++)e.queueLayer(a,a.eles[s])})},xi.enqueueElementRefinement=function(r){this.eleTxrDeqs.merge(r),this.scheduleElementRefinement()},xi.queueLayer=function(r,e){var n=this.layersQueue,i=r.elesQueue,o=i.hasId=i.hasId||{};if(!r.replacement){if(e){if(o[e.id()])return;i.push(e),o[e.id()]=!0}r.reqs?(r.reqs++,n.updateItem(r)):(r.reqs=1,n.push(r))}},xi.dequeue=function(r){for(var e=this,t=e.layersQueue,n=[],i=0;i<1&&0!==t.size();){var o=t.peek();if(o.replacement)t.pop();else if(o.replaces&&o!==o.replaces.replacement)t.pop();else if(o.invalid)t.pop();else{var a=o.elesQueue.shift();a&&(e.drawEleInLayer(o,a,o.level,r),i++),0===n.length&&n.push(!0),0===o.elesQueue.length&&(t.pop(),o.reqs=0,o.replaces&&e.applyLayerReplacement(o),e.requestRedraw())}}return n},xi.applyLayerReplacement=function(r){var t=this.layersByLevel[r.level],n=r.replaces,i=t.indexOf(n);if(!(i<0||n.invalid)){t[i]=r;for(var o=0;o<r.eles.length;o++){var a=r.eles[o]._private,s=a.imgLayerCaches=a.imgLayerCaches||{};s&&(s[r.level]=r)}this.requestRedraw()}},xi.requestRedraw=Mh(function(){var r=this.renderer;r.redrawHint("eles",!0),r.redrawHint("drag",!0),r.redraw()},100),xi.setupDequeueing=Kk_setupDequeueing({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t){return e.dequeue(t)},onDeqd:Ab,shouldRedraw:jS,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});var rD,tD={};function Mj(r,e){for(var t=0;t<e.length;t++){var n=e[t];r.lineTo(n.x,n.y)}}function Fj(r,e,t){for(var n,i=0;i<e.length;i++){var o=e[i];0===i&&(n=o),r.lineTo(o.x,o.y)}r.quadraticCurveTo(t.x,t.y,n.x,n.y)}function nD(r,e,t){r.beginPath&&r.beginPath();for(var n=e,i=0;i<n.length;i++)r.lineTo((o=n[i]).x,o.y);var a=t,s=t[0];for(r.moveTo(s.x,s.y),i=1;i<a.length;i++){var o;r.lineTo((o=a[i]).x,o.y)}r.closePath&&r.closePath()}function Vj(r,e,t,n,i){r.beginPath&&r.beginPath(),r.arc(t,n,i,0,2*Math.PI,!1);var o=e,a=o[0];r.moveTo(a.x,a.y);for(var s=0;s<o.length;s++){var l=o[s];r.lineTo(l.x,l.y)}r.closePath&&r.closePath()}function Bj(r,e,t,n){r.arc(e,t,n,0,2*Math.PI,!1)}tD.arrowShapeImpl=function(r){return(rD||(rD={polygon:Mj,"triangle-backcurve":Fj,"triangle-tee":nD,"circle-triangle":Vj,"triangle-cross":nD,circle:Bj}))[r]};var aa={drawElement:function(r,e,t,n,i,o){e.isNode()?this.drawNode(r,e,t,n,i,o):this.drawEdge(r,e,t,n,i,o)},drawElementOverlay:function(r,e){e.isNode()?this.drawNodeOverlay(r,e):this.drawEdgeOverlay(r,e)},drawElementUnderlay:function(r,e){e.isNode()?this.drawNodeUnderlay(r,e):this.drawEdgeUnderlay(r,e)},drawCachedElementPortion:function(r,e,t,n,i,o,a,s){var l=this,u=t.getBoundingBox(e);if(0!==u.w&&0!==u.h){var c=t.getElement(e,u,n,i,o);if(null!=c){var h=s(l,e);if(0===h)return;var m,_,I,U,ne,C,d=a(l,e),p=u.x1,g=u.y1,y=u.w,v=u.h;if(0!==d){var re=t.getRotationPoint(e);r.translate(I=re.x,U=re.y),r.rotate(d),(ne=l.getImgSmoothing(r))||l.setImgSmoothing(r,!0);var A=t.getRotationOffset(e);m=A.x,_=A.y}else m=p,_=g;1!==h&&(r.globalAlpha=(C=r.globalAlpha)*h),r.drawImage(c.texture.canvas,c.x,0,c.width,c.height,m,_,y,v),1!==h&&(r.globalAlpha=C),0!==d&&(r.rotate(-d),r.translate(-I,-U),ne||l.setImgSmoothing(r,!1))}else t.drawElement(r,e)}}},Uj=function(){return 0},zj=function(e,t){return e.getTextAngle(t,null)},Gj=function(e,t){return e.getTextAngle(t,"source")},qj=function(e,t){return e.getTextAngle(t,"target")},jj=function(e,t){return t.effectiveOpacity()},fE=function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()};aa.drawCachedElement=function(r,e,t,n,i,o){var a=this,s=a.data,l=s.eleTxrCache,u=s.lblTxrCache,c=s.slbTxrCache,h=s.tlbTxrCache,d=e.boundingBox(),p=!0===o?l.reasons.highQuality:null;if(0!==d.w&&0!==d.h&&e.visible()&&(!n||Nb(d,n))){var g=e.isEdge(),y=e.element()._private.rscratch.badLine;a.drawElementUnderlay(r,e),a.drawCachedElementPortion(r,e,l,t,i,p,Uj,jj),(!g||!y)&&a.drawCachedElementPortion(r,e,u,t,i,p,zj,fE),g&&!y&&(a.drawCachedElementPortion(r,e,c,t,i,p,Gj,fE),a.drawCachedElementPortion(r,e,h,t,i,p,qj,fE)),a.drawElementOverlay(r,e)}},aa.drawElements=function(r,e){for(var n=0;n<e.length;n++)this.drawElement(r,e[n])},aa.drawCachedElements=function(r,e,t,n){for(var o=0;o<e.length;o++)this.drawCachedElement(r,e[o],t,n)},aa.drawCachedNodes=function(r,e,t,n){for(var o=0;o<e.length;o++){var a=e[o];a.isNode()&&this.drawCachedElement(r,a,t,n)}},aa.drawLayeredElements=function(r,e,t,n){var o=this.data.lyrTxrCache.getLayers(e,t);if(o)for(var a=0;a<o.length;a++){var s=o[a],l=s.bb;0===l.w||0===l.h||r.drawImage(s.canvas,l.x1,l.y1,l.w,l.h)}else this.drawCachedElements(r,e,t,n)};var Oa={drawEdge:function(r,e,t){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this,s=e._private.rscratch;if((!o||e.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;t&&r.translate(-(l=t).x1,-l.y1);var u=o?e.pstyle("opacity").value:1,c=o?e.pstyle("line-opacity").value:1,h=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,m=u*c,_=u*c,I=function(){var be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;"straight-triangle"===h?(a.eleStrokeStyle(r,e,be),a.drawEdgeTrianglePath(e,r,s.allpts)):(r.lineWidth=p,r.lineCap=g,a.eleStrokeStyle(r,e,be),a.drawEdgePath(e,r,s.allpts,d),r.lineCap="butt")},A=function(){a.drawArrowheads(r,e,arguments.length>0&&void 0!==arguments[0]?arguments[0]:_)};if(r.lineJoin="round","yes"===e.pstyle("ghost").value){var q=e.pstyle("ghost-offset-x").pfValue,z=e.pstyle("ghost-offset-y").pfValue,K=e.pstyle("ghost-opacity").value,B=m*K;r.translate(q,z),I(B),A(B),r.translate(-q,-z)}else!function(){var be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;r.lineWidth=p+y,r.lineCap=g,y>0?(a.colorStrokeStyle(r,v[0],v[1],v[2],be),"straight-triangle"===h?a.drawEdgeTrianglePath(e,r,s.allpts):(a.drawEdgePath(e,r,s.allpts,d),r.lineCap="butt")):r.lineCap="butt"}();i&&a.drawEdgeUnderlay(r,e),I(),A(),i&&a.drawEdgeOverlay(r,e),a.drawElementText(r,e,null,n),t&&r.translate(l.x1,l.y1)}}},iD=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var i=n.pstyle("".concat(e,"-opacity")).value;if(0!==i){var o=this,a=o.usePaths(),s=n._private.rscratch,u=2*n.pstyle("".concat(e,"-padding")).pfValue,c=n.pstyle("".concat(e,"-color")).value;t.lineWidth=u,t.lineCap="self"!==s.edgeType||a?"round":"butt",o.colorStrokeStyle(t,c[0],c[1],c[2],i),o.drawEdgePath(n,t,s.allpts,"solid")}}}};Oa.drawEdgeOverlay=iD("overlay"),Oa.drawEdgeUnderlay=iD("underlay"),Oa.drawEdgePath=function(r,e,t,n){var a,i=r._private.rscratch,o=e,s=!1,l=this.usePaths(),u=r.pstyle("line-dash-pattern").pfValue,c=r.pstyle("line-dash-offset").pfValue;if(l){var h=t.join("$");i.pathCacheKey&&i.pathCacheKey===h?(a=e=i.pathCache,s=!0):(a=e=new Path2D,i.pathCacheKey=h,i.pathCache=a)}if(o.setLineDash)switch(n){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!i.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(t[0],t[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+3<t.length;p+=4)e.quadraticCurveTo(t[p],t[p+1],t[p+2],t[p+3]);break;case"straight":case"haystack":for(var g=2;g+1<t.length;g+=2)e.lineTo(t[g],t[g+1]);break;case"segments":if(i.isRound){var v,y=no(i.roundCorners);try{for(y.s();!(v=y.n()).done;)Fk(e,v.value)}catch(I){y.e(I)}finally{y.f()}e.lineTo(t[t.length-2],t[t.length-1])}else for(var _=2;_+1<t.length;_+=2)e.lineTo(t[_],t[_+1])}e=o,l?e.stroke(a):e.stroke(),e.setLineDash&&e.setLineDash([])},Oa.drawEdgeTrianglePath=function(r,e,t){e.fillStyle=e.strokeStyle;for(var n=r.pstyle("width").pfValue,i=0;i+1<t.length;i+=2){var o=[t[i+2]-t[i],t[i+3]-t[i+1]],a=Math.sqrt(o[0]*o[0]+o[1]*o[1]),s=[o[1]/a,-o[0]/a],l=[s[0]*n/2,s[1]*n/2];e.beginPath(),e.moveTo(t[i]-l[0],t[i+1]-l[1]),e.lineTo(t[i]+l[0],t[i+1]+l[1]),e.lineTo(t[i+2],t[i+3]),e.closePath(),e.fill()}},Oa.drawArrowheads=function(r,e,t){var n=e._private.rscratch,i="haystack"===n.edgeType;i||this.drawArrowhead(r,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,t),this.drawArrowhead(r,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,t),this.drawArrowhead(r,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,t),i||this.drawArrowhead(r,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,t)},Oa.drawArrowhead=function(r,e,t,n,i,o,a){if(!(isNaN(n)||null==n||isNaN(i)||null==i||isNaN(o)||null==o)){var s=this,l=e.pstyle(t+"-arrow-shape").value;if("none"!==l){var u="hollow"===e.pstyle(t+"-arrow-fill").value?"both":"filled",c=e.pstyle(t+"-arrow-fill").value,h=e.pstyle("width").pfValue,d=e.pstyle(t+"-arrow-width"),p="match-line"===d.value?h:d.pfValue;"%"===d.units&&(p*=h);var g=e.pstyle("opacity").value;void 0===a&&(a=g);var y=r.globalCompositeOperation;(1!==a||"hollow"===c)&&(r.globalCompositeOperation="destination-out",s.colorFillStyle(r,255,255,255,1),s.colorStrokeStyle(r,255,255,255,1),s.drawArrowShape(e,r,u,h,l,p,n,i,o),r.globalCompositeOperation=y);var v=e.pstyle(t+"-arrow-color").value;s.colorFillStyle(r,v[0],v[1],v[2],a),s.colorStrokeStyle(r,v[0],v[1],v[2],a),s.drawArrowShape(e,r,c,h,l,p,n,i,o)}}},Oa.drawArrowShape=function(r,e,t,n,i,o,a,s,l){var d,u=this,c=this.usePaths()&&"triangle-cross"!==i,h=!1,p=e,g={x:a,y:s},y=r.pstyle("arrow-scale").value,v=this.getArrowWidth(n,y),m=u.arrowShapes[i];if(c){var _=u.arrowPathCache=u.arrowPathCache||[],I=pl(i),U=_[I];null!=U?(d=e=U,h=!0):(d=e=new Path2D,_[I]=d)}h||(e.beginPath&&e.beginPath(),c?m.draw(e,1,0,{x:0,y:0},1):m.draw(e,v,l,g,n),e.closePath&&e.closePath()),e=p,c&&(e.translate(a,s),e.rotate(l),e.scale(v,v)),("filled"===t||"both"===t)&&(c?e.fill(d):e.fill()),("hollow"===t||"both"===t)&&(e.lineWidth=o/(c?v:1),e.lineJoin="miter",c?e.stroke(d):e.stroke()),c&&(e.scale(1/v,1/v),e.rotate(-l),e.translate(-a,-s))};var pE={safeDrawImage:function(r,e,t,n,i,o,a,s,l,u){if(!(i<=0||o<=0||l<=0||u<=0))try{r.drawImage(e,t,n,i,o,a,s,l,u)}catch(c){Kr(c)}},drawInscribedImage:function(r,e,t,n,i){var o=this,a=t.position(),s=a.x,l=a.y,u=t.cy().style(),c=u.getIndexedStyle.bind(u),h=c(t,"background-fit","value",n),d=c(t,"background-repeat","value",n),p=t.width(),g=t.height(),y=2*t.padding(),v=p+("inner"===c(t,"background-width-relative-to","value",n)?0:y),m=g+("inner"===c(t,"background-height-relative-to","value",n)?0:y),_=t._private.rscratch,U="node"===c(t,"background-clip","value",n),ne=c(t,"background-image-opacity","value",n)*i,re=c(t,"background-image-smoothing","value",n),A=t.pstyle("corner-radius").value;"auto"!==A&&(A=t.pstyle("corner-radius").pfValue);var C=e.width||e.cachedW,M=e.height||e.cachedH;(null==C||null==M)&&(document.body.appendChild(e),C=e.cachedW=e.width||e.offsetWidth,M=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var q=C,z=M;if("auto"!==c(t,"background-width","value",n)&&(q="%"===c(t,"background-width","units",n)?c(t,"background-width","pfValue",n)*v:c(t,"background-width","pfValue",n)),"auto"!==c(t,"background-height","value",n)&&(z="%"===c(t,"background-height","units",n)?c(t,"background-height","pfValue",n)*m:c(t,"background-height","pfValue",n)),0!==q&&0!==z){if("contain"===h)q*=K=Math.min(v/q,m/z),z*=K;else if("cover"===h){var K;q*=K=Math.max(v/q,m/z),z*=K}var B=s-v/2,me=c(t,"background-position-x","units",n),be=c(t,"background-position-x","pfValue",n);B+="%"===me?(v-q)*be:be;var xe=c(t,"background-offset-x","units",n),we=c(t,"background-offset-x","pfValue",n);B+="%"===xe?(v-q)*we:we;var Re=l-m/2,je=c(t,"background-position-y","units",n),We=c(t,"background-position-y","pfValue",n);Re+="%"===je?(m-z)*We:We;var Pe=c(t,"background-offset-y","units",n),Fe=c(t,"background-offset-y","pfValue",n);Re+="%"===Pe?(m-z)*Fe:Fe,_.pathCache&&(B-=s,Re-=l,s=0,l=0);var lt=r.globalAlpha;r.globalAlpha=ne;var mt=o.getImgSmoothing(r),at=!1;if("no"===re&&mt?(o.setImgSmoothing(r,!1),at=!0):"yes"===re&&!mt&&(o.setImgSmoothing(r,!0),at=!0),"no-repeat"===d)U&&(r.save(),_.pathCache?r.clip(_.pathCache):(o.nodeShapes[o.getNodeShape(t)].draw(r,s,l,v,m,A,_),r.clip())),o.safeDrawImage(r,e,0,0,C,M,B,Re,q,z),U&&r.restore();else{var bt=r.createPattern(e,d);r.fillStyle=bt,o.nodeShapes[o.getNodeShape(t)].draw(r,s,l,v,m,A,_),r.translate(B,Re),r.fill(),r.translate(-B,-Re)}r.globalAlpha=lt,at&&o.setImgSmoothing(r,mt)}}},Il={};function oD(r,e,t,n,i){var a=Math.min(arguments.length>5&&void 0!==arguments[5]?arguments[5]:5,n/2,i/2);r.beginPath(),r.moveTo(e+a,t),r.lineTo(e+n-a,t),r.quadraticCurveTo(e+n,t,e+n,t+a),r.lineTo(e+n,t+i-a),r.quadraticCurveTo(e+n,t+i,e+n-a,t+i),r.lineTo(e+a,t+i),r.quadraticCurveTo(e,t+i,e,t+i-a),r.lineTo(e,t+a),r.quadraticCurveTo(e,t,e+a,t),r.closePath()}Il.eleTextBiggerThanMin=function(r,e){if(!e){var t=r.cy().zoom(),n=this.getPixelRatio(),i=Math.ceil(kb(t*n));e=Math.pow(2,i)}return!(r.pstyle("font-size").pfValue*e<r.pstyle("min-zoomed-font-size").pfValue)},Il.drawElementText=function(r,e,t,n,i){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this;if(null==n){if(o&&!a.eleTextBiggerThanMin(e))return}else if(!1===n)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var l=a.getLabelJustification(e);r.textAlign=l,r.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,c=e.pstyle("label"),h=e.pstyle("source-label"),d=e.pstyle("target-label");if(u||(!c||!c.value)&&(!h||!h.value)&&(!d||!d.value))return;r.textAlign="center",r.textBaseline="bottom"}var g,p=!t;t&&r.translate(-(g=t).x1,-g.y1),null==i?(a.drawText(r,e,null,p,o),e.isEdge()&&(a.drawText(r,e,"source",p,o),a.drawText(r,e,"target",p,o))):a.drawText(r,e,i,p,o),t&&r.translate(g.x1,g.y1)},Il.getFontCache=function(r){var e;this.fontCaches=this.fontCaches||[];for(var t=0;t<this.fontCaches.length;t++)if((e=this.fontCaches[t]).context===r)return e;return this.fontCaches.push(e={context:r}),e},Il.setupTextStyle=function(r,e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",o=e.pstyle("font-family").strValue,a=e.pstyle("font-weight").strValue,s=t?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*s,u=e.pstyle("color").value,c=e.pstyle("text-outline-color").value;r.font=n+" "+a+" "+i+" "+o,r.lineJoin="round",this.colorFillStyle(r,u[0],u[1],u[2],s),this.colorStrokeStyle(r,c[0],c[1],c[2],l)},Il.getTextAngle=function(r,e){var t,i=r._private.rscratch,a=r.pstyle((e?e+"-":"")+"text-rotation");if("autorotate"===a.strValue){var s=io(i,"labelAngle",e);t=r.isEdge()?s:0}else t="none"===a.strValue?0:a.pfValue;return t},Il.drawText=function(r,e,t){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e._private.rscratch,s=i?e.effectiveOpacity():1;if(!i||0!==s&&0!==e.pstyle("text-opacity").value){"main"===t&&(t=null);var c,h,l=io(a,"labelX",t),u=io(a,"labelY",t),d=this.getLabelText(e,t);if(null!=d&&""!==d&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(r,e,i);var ne,p=t?t+"-":"",g=io(a,"labelWidth",t),y=io(a,"labelHeight",t),v=e.pstyle(p+"text-margin-x").pfValue,m=e.pstyle(p+"text-margin-y").pfValue,_=e.isEdge(),I=e.pstyle("text-halign").value,U=e.pstyle("text-valign").value;switch(_&&(I="center",U="center"),l+=v,u+=m,0!==(ne=n?this.getTextAngle(e,t):0)&&(r.translate(c=l,h=u),r.rotate(ne),l=0,u=0),U){case"top":break;case"center":u+=y/2;break;case"bottom":u+=y}var re=e.pstyle("text-background-opacity").value,A=e.pstyle("text-border-opacity").value,C=e.pstyle("text-border-width").pfValue,M=e.pstyle("text-background-padding").pfValue,q=e.pstyle("text-background-shape").strValue,z="round-rectangle"===q||"roundrectangle"===q,K="circle"===q;if(re>0||C>0&&A>0){var me=r.fillStyle,be=r.strokeStyle,xe=r.lineWidth,we=e.pstyle("text-background-color").value,Re=e.pstyle("text-border-color").value,je=e.pstyle("text-border-style").value,We=re>0,Pe=C>0&&A>0,Fe=l-M;switch(I){case"left":Fe-=g;break;case"center":Fe-=g/2}var lt=u-y-M,mt=g+2*M,at=y+2*M;if(We&&(r.fillStyle="rgba(".concat(we[0],",").concat(we[1],",").concat(we[2],",").concat(re*s,")")),Pe&&(r.strokeStyle="rgba(".concat(Re[0],",").concat(Re[1],",").concat(Re[2],",").concat(A*s,")"),r.lineWidth=C,r.setLineDash))switch(je){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=C/4,r.setLineDash([]);break;default:r.setLineDash([])}if(z?(r.beginPath(),oD(r,Fe,lt,mt,at,2)):K?(r.beginPath(),function Hj(r,e,t,n,i){var a=Math.min(n,i)/2,s=e+n/2,l=t+i/2;r.beginPath(),r.arc(s,l,a,0,2*Math.PI),r.closePath()}(r,Fe,lt,mt,at)):(r.beginPath(),r.rect(Fe,lt,mt,at)),We&&r.fill(),Pe&&r.stroke(),Pe&&"double"===je){var bt=C/2;r.beginPath(),z?oD(r,Fe+bt,lt+bt,mt-2*bt,at-2*bt,2):r.rect(Fe+bt,lt+bt,mt-2*bt,at-2*bt),r.stroke()}r.fillStyle=me,r.strokeStyle=be,r.lineWidth=xe,r.setLineDash&&r.setLineDash([])}var xt=2*e.pstyle("text-outline-width").pfValue;if(xt>0&&(r.lineWidth=xt),"wrap"===e.pstyle("text-wrap").value){var Ut=io(a,"labelWrapCachedLines",t),_t=io(a,"labelLineHeight",t),Me=g/2,$e=this.getLabelJustification(e);switch("auto"===$e||("left"===I?"left"===$e?l+=-g:"center"===$e&&(l+=-Me):"center"===I?"left"===$e?l+=-Me:"right"===$e&&(l+=Me):"right"===I&&("center"===$e?l+=Me:"right"===$e&&(l+=g))),U){case"top":case"center":case"bottom":u-=(Ut.length-1)*_t}for(var Xe=0;Xe<Ut.length;Xe++)xt>0&&r.strokeText(Ut[Xe],l,u),r.fillText(Ut[Xe],l,u),u+=_t}else xt>0&&r.strokeText(d,l,u),r.fillText(d,l,u);0!==ne&&(r.rotate(-ne),r.translate(-c,-h))}}};var xs={drawNode:function(r,e,t){var s,l,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this,u=e._private,c=u.rscratch,h=e.position();if(Bt(h.x)&&Bt(h.y)&&(!o||e.visible())){var g,m,d=o?e.effectiveOpacity():1,p=a.usePaths(),y=!1,v=e.padding();s=e.width()+2*v,l=e.height()+2*v,t&&r.translate(-(m=t).x1,-m.y1);for(var I=e.pstyle("background-image").value,U=new Array(I.length),ne=new Array(I.length),re=0,A=0;A<I.length;A++){var C=I[A];if(U[A]=null!=C&&"none"!==C){var q=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",A);re++,ne[A]=a.getCachedImage(C,q,function(){u.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var z=e.pstyle("background-blacken").value,K=e.pstyle("border-width").pfValue,B=e.pstyle("background-opacity").value*d,me=e.pstyle("border-color").value,be=e.pstyle("border-style").value,xe=e.pstyle("border-join").value,we=e.pstyle("border-cap").value,Re=e.pstyle("border-position").value,je=e.pstyle("border-dash-pattern").pfValue,We=e.pstyle("border-dash-offset").pfValue,Pe=e.pstyle("border-opacity").value*d,Fe=e.pstyle("outline-width").pfValue,lt=e.pstyle("outline-color").value,mt=e.pstyle("outline-style").value,at=e.pstyle("outline-opacity").value*d,bt=e.pstyle("outline-offset").value,xt=e.pstyle("corner-radius").value;"auto"!==xt&&(xt=e.pstyle("corner-radius").pfValue);var Ut=function(){a.eleFillStyle(r,e,arguments.length>0&&void 0!==arguments[0]?arguments[0]:B)},_t=function(){a.colorStrokeStyle(r,me[0],me[1],me[2],arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pe)},Me=function(){a.colorStrokeStyle(r,lt[0],lt[1],lt[2],arguments.length>0&&void 0!==arguments[0]?arguments[0]:at)},$e=function(Kt,ut,ue,He){var Ht,rt=a.nodePathCache=a.nodePathCache||[],nt=GS("polygon"===ue?ue+","+He.join(","):ue,""+ut,""+Kt,""+xt),ot=rt[nt],Et=!1;return null!=ot?(Et=!0,c.pathCache=Ht=ot):(Ht=new Path2D,rt[nt]=c.pathCache=Ht),{path:Ht,cacheHit:Et}},Xe=e.pstyle("shape").strValue,dt=e.pstyle("shape-polygon-points").pfValue;if(p){r.translate(h.x,h.y);var Lt=$e(s,l,Xe,dt);g=Lt.path,y=Lt.cacheHit}var er=function(){if(!y){var Kt=h;p&&(Kt={x:0,y:0}),a.nodeShapes[a.getNodeShape(e)].draw(g||r,Kt.x,Kt.y,s,l,xt,c)}p?r.fill(g):r.fill()},Mr=function(){for(var Kt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,ut=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ue=u.backgrounding,He=0,rt=0;rt<ne.length;rt++){var nt=e.cy().style().getIndexedStyle(e,"background-image-containment","value",rt);ut&&"over"===nt||!ut&&"inside"===nt?He++:U[rt]&&ne[rt].complete&&!ne[rt].error&&(He++,a.drawInscribedImage(r,ne[rt],e,rt,Kt))}u.backgrounding=He!==re,ue!==u.backgrounding&&e.updateStyle(!1)},gr=function(){var Kt=arguments.length>0&&void 0!==arguments[0]&&arguments[0],ut=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;a.hasPie(e)&&(a.drawPie(r,e,ut),Kt&&(p||a.nodeShapes[a.getNodeShape(e)].draw(r,h.x,h.y,s,l,xt,c)))},lr=function(){var Kt=arguments.length>0&&void 0!==arguments[0]&&arguments[0],ut=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;a.hasStripe(e)&&(r.save(),p?r.clip(c.pathCache):(a.nodeShapes[a.getNodeShape(e)].draw(r,h.x,h.y,s,l,xt,c),r.clip()),a.drawStripe(r,e,ut),r.restore(),Kt&&(p||a.nodeShapes[a.getNodeShape(e)].draw(r,h.x,h.y,s,l,xt,c)))},ar=function(){var ue=z>0?0:255;0!==z&&(a.colorFillStyle(r,ue,ue,ue,(z>0?z:-z)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:d)),p?r.fill(g):r.fill())},Ct=function(){if(K>0){if(r.lineWidth=K,r.lineCap=we,r.lineJoin=xe,r.setLineDash)switch(be){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash(je),r.lineDashOffset=We;break;case"solid":case"double":r.setLineDash([])}if("center"!==Re){if(r.save(),r.lineWidth*=2,"inside"===Re)p?r.clip(g):r.clip();else{var Kt=new Path2D;Kt.rect(-s/2-K,-l/2-K,s+2*K,l+2*K),Kt.addPath(g),r.clip(Kt,"evenodd")}p?r.stroke(g):r.stroke(),r.restore()}else p?r.stroke(g):r.stroke();if("double"===be){r.lineWidth=K/3;var ut=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",p?r.stroke(g):r.stroke(),r.globalCompositeOperation=ut}r.setLineDash&&r.setLineDash([])}},Gt=function(){if(Fe>0){if(r.lineWidth=Fe,r.lineCap="butt",r.setLineDash)switch(mt){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([])}var Kt=h;p&&(Kt={x:0,y:0});var ut=a.getNodeShape(e),ue=K;"inside"===Re&&(ue=0),"outside"===Re&&(ue*=2);var Et,He=(s+ue+(Fe+bt))/s,rt=(l+ue+(Fe+bt))/l,nt=s*He,ot=l*rt,Ht=a.nodeShapes[ut].points;if(p&&(Et=$e(nt,ot,ut,Ht).path),"ellipse"===ut)a.drawEllipsePath(Et||r,Kt.x,Kt.y,nt,ot);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(ut)){var jt=0,ur=0,hr=0;"round-diamond"===ut?jt=1.4*(ue+bt+Fe):"round-heptagon"===ut?(jt=1.075*(ue+bt+Fe),hr=-(ue/2+bt+Fe)/35):"round-hexagon"===ut?jt=1.12*(ue+bt+Fe):"round-pentagon"===ut?(jt=1.13*(ue+bt+Fe),hr=-(ue/2+bt+Fe)/15):"round-tag"===ut?(jt=1.12*(ue+bt+Fe),ur=.07*(ue/2+Fe+bt)):"round-triangle"===ut&&(jt=(ue+bt+Fe)*(Math.PI/2),hr=-(ue+bt/2+Fe)/Math.PI),0!==jt&&(nt=s*(He=(s+jt)/s),["round-hexagon","round-tag"].includes(ut)||(ot=l*(rt=(l+jt)/l)));for(var _r=nt/2,Yt=ot/2,br=(xt="auto"===xt?oC(nt,ot):xt)+(ue+Fe+bt)/2,Pr=new Array(Ht.length/2),zn=new Array(Ht.length/2),Zr=0;Zr<Ht.length/2;Zr++)Pr[Zr]={x:Kt.x+ur+_r*Ht[2*Zr],y:Kt.y+hr+Yt*Ht[2*Zr+1]};var Ai,On,An,Ln,Xn=Pr.length;for(On=Pr[Xn-1],Ai=0;Ai<Xn;Ai++)zn[Ai]=uE(On,An=Pr[Ai%Xn],Ln=Pr[(Ai+1)%Xn],br),On=An,An=Ln;a.drawRoundPolygonPath(Et||r,Kt.x+ur,Kt.y+hr,s*He,l*rt,Ht,zn)}else["roundrectangle","round-rectangle"].includes(ut)?(xt="auto"===xt?ms(nt,ot):xt,a.drawRoundRectanglePath(Et||r,Kt.x,Kt.y,nt,ot,xt+(ue+Fe+bt)/2)):["cutrectangle","cut-rectangle"].includes(ut)?a.drawCutRectanglePath(Et||r,Kt.x,Kt.y,nt,ot,null,(xt="auto"===xt?8:xt)+(ue+Fe+bt)/4):["bottomroundrectangle","bottom-round-rectangle"].includes(ut)?(xt="auto"===xt?ms(nt,ot):xt,a.drawBottomRoundRectanglePath(Et||r,Kt.x,Kt.y,nt,ot,xt+(ue+Fe+bt)/2)):"barrel"===ut?a.drawBarrelPath(Et||r,Kt.x,Kt.y,nt,ot):ut.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(ut)?(Ht=Ip(xp(Ht,(ue+Fe+bt)/s)),a.drawPolygonPath(Et||r,Kt.x,Kt.y,s,l,Ht)):(Ht=Ip(xp(Ht,-(ue+Fe+bt)/s)),a.drawPolygonPath(Et||r,Kt.x,Kt.y,s,l,Ht));if(p?r.stroke(Et):r.stroke(),"double"===mt){r.lineWidth=ue/3;var Go=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",p?r.stroke(Et):r.stroke(),r.globalCompositeOperation=Go}r.setLineDash&&r.setLineDash([])}};if("yes"===e.pstyle("ghost").value){var Cr=e.pstyle("ghost-offset-x").pfValue,Gr=e.pstyle("ghost-offset-y").pfValue,qr=e.pstyle("ghost-opacity").value,Vr=qr*d;r.translate(Cr,Gr),Me(),Gt(),Ut(qr*B),er(),Mr(Vr,!0),_t(qr*Pe),Ct(),gr(0!==z||0!==K),lr(0!==z||0!==K),Mr(Vr,!1),ar(Vr),r.translate(-Cr,-Gr)}p&&r.translate(-h.x,-h.y),i&&a.drawNodeUnderlay(r,e,h,s,l),p&&r.translate(h.x,h.y),Me(),Gt(),Ut(),er(),Mr(d,!0),_t(),Ct(),gr(0!==z||0!==K),lr(0!==z||0!==K),Mr(d,!1),ar(),p&&r.translate(-h.x,-h.y),a.drawElementText(r,e,null,n),i&&a.drawNodeOverlay(r,e,h,s,l),t&&r.translate(m.x1,m.y1)}}},aD=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n,i,o,a){if(n.visible()){var l=n.pstyle("".concat(e,"-padding")).pfValue,u=n.pstyle("".concat(e,"-opacity")).value,c=n.pstyle("".concat(e,"-color")).value,h=n.pstyle("".concat(e,"-shape")).value,d=n.pstyle("".concat(e,"-corner-radius")).value;if(u>0){if(i=i||n.position(),null==o||null==a){var p=n.padding();o=n.width()+2*p,a=n.height()+2*p}this.colorFillStyle(t,c[0],c[1],c[2],u),this.nodeShapes[h].draw(t,i.x,i.y,o+2*l,a+2*l,d),t.fill()}}}};xs.drawNodeOverlay=aD("overlay"),xs.drawNodeUnderlay=aD("underlay"),xs.hasPie=function(r){return(r=r[0])._private.hasPie},xs.hasStripe=function(r){return(r=r[0])._private.hasStripe},xs.drawPie=function(r,e,t,n){e=e[0],n=n||e.position();var p,i=e.cy().style(),o=e.pstyle("pie-size"),a=e.pstyle("pie-hole"),s=e.pstyle("pie-start-angle").pfValue,l=n.x,u=n.y,c=e.width(),h=e.height(),d=Math.min(c,h)/2,g=0;if(this.usePaths()&&(l=0,u=0),"%"===o.units?d*=o.pfValue:void 0!==o.pfValue&&(d=o.pfValue/2),"%"===a.units?p=d*a.pfValue:void 0!==a.pfValue&&(p=a.pfValue/2),!(p>=d))for(var v=1;v<=i.pieBackgroundN;v++){var m=e.pstyle("pie-"+v+"-background-size").value,_=e.pstyle("pie-"+v+"-background-color").value,I=e.pstyle("pie-"+v+"-background-opacity").value*t,U=m/100;U+g>1&&(U=1-g);var ne=1.5*Math.PI+2*Math.PI*g,A=(ne+=s)+2*Math.PI*U;0===m||g>=1||g+U>1||(0===p?(r.beginPath(),r.moveTo(l,u),r.arc(l,u,d,ne,A),r.closePath()):(r.beginPath(),r.arc(l,u,d,ne,A),r.arc(l,u,p,A,ne,!0),r.closePath()),this.colorFillStyle(r,_[0],_[1],_[2],I),r.fill(),g+=U)}},xs.drawStripe=function(r,e,t,n){e=e[0],n=n||e.position();var i=e.cy().style(),o=n.x,a=n.y,s=e.width(),l=e.height(),u=0,c=this.usePaths();r.save();var h=e.pstyle("stripe-direction").value,d=e.pstyle("stripe-size");switch(h){case"vertical":break;case"righward":r.rotate(-Math.PI/2)}var p=s,g=l;"%"===d.units?(p*=d.pfValue,g*=d.pfValue):void 0!==d.pfValue&&(p=d.pfValue,g=d.pfValue),c&&(o=0,a=0),a-=p/2,o-=g/2;for(var y=1;y<=i.stripeBackgroundN;y++){var v=e.pstyle("stripe-"+y+"-background-size").value,m=e.pstyle("stripe-"+y+"-background-color").value,_=e.pstyle("stripe-"+y+"-background-opacity").value*t,I=v/100;I+u>1&&(I=1-u),!(0===v||u>=1||u+I>1)&&(r.beginPath(),r.rect(o,a+g*u,p,g*I),r.closePath(),this.colorFillStyle(r,m[0],m[1],m[2],_),r.fill(),u+=I)}r.restore()};var sd,Yi={};function sD(r,e,t){var n=r.createShader(e);if(r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error(r.getShaderInfoLog(n));return n}function Kj(r,e,t){void 0===t&&(t=e);var n=r.makeOffscreenCanvas(e,t),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function gE(r){var e=r.pixelRatio,t=r.cy.zoom(),n=r.cy.pan();return{zoom:t*e,pan:{x:n.x*e,y:n.y*e}}}function Qj(r){return"solid"===r.pstyle("background-fill").value&&"none"===r.pstyle("background-image").strValue&&(0===r.pstyle("border-width").value||0===r.pstyle("border-opacity").value||"solid"===r.pstyle("border-style").value)}function Jj(r,e){if(r.length!==e.length)return!1;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!1;return!0}function xl(r,e,t){var n=r[0]/255,i=r[1]/255,o=r[2]/255,a=e,s=t||new Array(4);return s[0]=n*a,s[1]=i*a,s[2]=o*a,s[3]=a,s}function Ju(r,e){var t=e||new Array(4);return t[0]=(255&r)/255,t[1]=(r>>8&255)/255,t[2]=(r>>16&255)/255,t[3]=(r>>24&255)/255,t}function Zj(r){return r[0]+(r[1]<<8)+(r[2]<<16)+(r[3]<<24)}function lD(r,e){switch(e){case"float":return[1,r.FLOAT,4];case"vec2":return[2,r.FLOAT,4];case"vec3":return[3,r.FLOAT,4];case"vec4":return[4,r.FLOAT,4];case"int":return[1,r.INT,4];case"ivec2":return[2,r.INT,4]}}function uD(r,e,t){switch(e){case r.FLOAT:return new Float32Array(t);case r.INT:return new Int32Array(t)}}function t6(r,e,t,n,i,o){switch(e){case r.FLOAT:return new Float32Array(t.buffer,o*n,i);case r.INT:return new Int32Array(t.buffer,o*n,i)}}function sa(r,e,t,n){var o=Wn(lD(r,t),3),a=o[0],s=o[1],l=o[2],u=uD(r,s,e*a),c=a*l,h=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,h),r.bufferData(r.ARRAY_BUFFER,e*c,r.DYNAMIC_DRAW),r.enableVertexAttribArray(n),s===r.FLOAT?r.vertexAttribPointer(n,a,s,!1,c,0):s===r.INT&&r.vertexAttribIPointer(n,a,s,c,0),r.vertexAttribDivisor(n,1),r.bindBuffer(r.ARRAY_BUFFER,null);for(var d=new Array(e),p=0;p<e;p++)d[p]=t6(r,s,u,c,a,p);return h.dataArray=u,h.stride=c,h.size=a,h.getView=function(g){return d[g]},h.setPoint=function(g,y,v){var m=d[g];m[0]=y,m[1]=v},h.bufferSubData=function(g){r.bindBuffer(r.ARRAY_BUFFER,h),g?r.bufferSubData(r.ARRAY_BUFFER,0,u,0,g*a):r.bufferSubData(r.ARRAY_BUFFER,0,u)},h}Yi.getPixelRatio=function(){var r=this.data.contexts[0];return null!=this.forcedPixelRatio?this.forcedPixelRatio:(this.cy.window().devicePixelRatio||1)/(r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1)},Yi.paintCache=function(r){for(var n,e=this.paintCaches=this.paintCaches||[],t=!0,i=0;i<e.length;i++)if((n=e[i]).context===r){t=!1;break}return t&&e.push(n={context:r}),n},Yi.createGradientStyleFor=function(r,e,t,n,i){var o,a=this.usePaths(),s=t.pstyle(e+"-gradient-stop-colors").value,l=t.pstyle(e+"-gradient-stop-positions").pfValue;if("radial-gradient"===n)if(t.isEdge()){var u=t.sourceEndpoint(),c=t.targetEndpoint(),h=t.midpoint(),d=gl(u,h),p=gl(c,h);o=r.createRadialGradient(h.x,h.y,0,h.x,h.y,Math.max(d,p))}else{var g=a?{x:0,y:0}:t.position(),y=t.paddedWidth(),v=t.paddedHeight();o=r.createRadialGradient(g.x,g.y,0,g.x,g.y,Math.max(y,v))}else if(t.isEdge()){var m=t.sourceEndpoint(),_=t.targetEndpoint();o=r.createLinearGradient(m.x,m.y,_.x,_.y)}else{var I=a?{x:0,y:0}:t.position(),re=t.paddedWidth()/2,A=t.paddedHeight()/2;switch(t.pstyle("background-gradient-direction").value){case"to-bottom":o=r.createLinearGradient(I.x,I.y-A,I.x,I.y+A);break;case"to-top":o=r.createLinearGradient(I.x,I.y+A,I.x,I.y-A);break;case"to-left":o=r.createLinearGradient(I.x+re,I.y,I.x-re,I.y);break;case"to-right":o=r.createLinearGradient(I.x-re,I.y,I.x+re,I.y);break;case"to-bottom-right":case"to-right-bottom":o=r.createLinearGradient(I.x-re,I.y-A,I.x+re,I.y+A);break;case"to-top-right":case"to-right-top":o=r.createLinearGradient(I.x-re,I.y+A,I.x+re,I.y-A);break;case"to-bottom-left":case"to-left-bottom":o=r.createLinearGradient(I.x+re,I.y-A,I.x-re,I.y+A);break;case"to-top-left":case"to-left-top":o=r.createLinearGradient(I.x+re,I.y+A,I.x-re,I.y-A)}}if(!o)return null;for(var M=l.length===s.length,q=s.length,z=0;z<q;z++)o.addColorStop(M?l[z]:z/(q-1),"rgba("+s[z][0]+","+s[z][1]+","+s[z][2]+","+i+")");return o},Yi.gradientFillStyle=function(r,e,t,n){var i=this.createGradientStyleFor(r,"background",e,t,n);if(!i)return null;r.fillStyle=i},Yi.colorFillStyle=function(r,e,t,n,i){r.fillStyle="rgba("+e+","+t+","+n+","+i+")"},Yi.eleFillStyle=function(r,e,t){var n=e.pstyle("background-fill").value;if("linear-gradient"===n||"radial-gradient"===n)this.gradientFillStyle(r,e,n,t);else{var i=e.pstyle("background-color").value;this.colorFillStyle(r,i[0],i[1],i[2],t)}},Yi.gradientStrokeStyle=function(r,e,t,n){var i=this.createGradientStyleFor(r,"line",e,t,n);if(!i)return null;r.strokeStyle=i},Yi.colorStrokeStyle=function(r,e,t,n,i){r.strokeStyle="rgba("+e+","+t+","+n+","+i+")"},Yi.eleStrokeStyle=function(r,e,t){var n=e.pstyle("line-fill").value;if("linear-gradient"===n||"radial-gradient"===n)this.gradientStrokeStyle(r,e,n,t);else{var i=e.pstyle("line-color").value;this.colorStrokeStyle(r,i[0],i[1],i[2],t)}},Yi.matchCanvasSize=function(r){var e=this,t=e.data,n=e.findContainerClientCoords(),i=n[2],o=n[3],a=e.getPixelRatio();(r===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]||r===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG])&&(a=e.motionBlurPxRatio);var c,l=i*a,u=o*a;if(l!==e.canvasWidth||u!==e.canvasHeight){e.fontCaches=null;var h=t.canvasContainer;h.style.width=i+"px",h.style.height=o+"px";for(var d=0;d<e.CANVAS_LAYERS;d++)(c=t.canvases[d]).width=l,c.height=u,c.style.width=i+"px",c.style.height=o+"px";for(d=0;d<e.BUFFER_COUNT;d++)(c=t.bufferCanvases[d]).width=l,c.height=u,c.style.width=i+"px",c.style.height=o+"px";e.textureMult=1,a<=1&&(c=t.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,c.width=l*e.textureMult,c.height=u*e.textureMult),e.canvasWidth=l,e.canvasHeight=u,e.pixelRatio=a}},Yi.renderTo=function(r,e,t,n){this.render({forcedContext:r,forcedZoom:e,forcedPan:t,drawAllLayers:!0,forcedPxRatio:n})},Yi.clearCanvas=function(){var r=this,e=r.data;function t(n){n.clearRect(0,0,r.canvasWidth,r.canvasHeight)}t(e.contexts[r.NODE]),t(e.contexts[r.DRAG])},Yi.render=function(r){var e=this;r=r||KS();var t=e.cy,n=r.forcedContext,i=r.drawAllLayers,o=r.drawOnlyNodeLayer,a=r.forcedZoom,s=r.forcedPan,l=void 0===r.forcedPxRatio?this.getPixelRatio():r.forcedPxRatio,u=e.data,c=u.canvasNeedsRedraw,h=e.textureOnViewport&&!n&&(e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming),d=void 0!==r.motionBlur?r.motionBlur:e.motionBlur,p=e.motionBlurPxRatio,g=t.hasCompoundNodes(),y=e.hoverData.draggingEles,m=d=d&&!n&&e.motionBlurEnabled&&!(e.hoverData.selecting||e.touchData.selecting);n||(e.prevPxRatio!==l&&(e.invalidateContainerClientCoordsCache(),e.matchCanvasSize(e.container),e.redrawHint("eles",!0),e.redrawHint("drag",!0)),e.prevPxRatio=l),!n&&e.motionBlurTimeout&&clearTimeout(e.motionBlurTimeout),d&&(null==e.mbFrames&&(e.mbFrames=0),e.mbFrames++,e.mbFrames<3&&(m=!1),e.mbFrames>e.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!h&&(c[e.NODE]=!0,c[e.SELECT_BOX]=!0);var _=t.style(),I=t.zoom(),U=void 0!==a?a:I,ne=t.pan(),re={x:ne.x,y:ne.y},A={zoom:I,pan:{x:ne.x,y:ne.y}},C=e.prevViewport;!(void 0===C||A.zoom!==C.zoom||A.pan.x!==C.pan.x||A.pan.y!==C.pan.y)&&!(y&&!g)&&(e.motionBlurPxRatio=1),s&&(re=s),U*=l,re.x*=l,re.y*=l;var q=e.getCachedZSortedEles();function z(_t,Me,$e,Xe,dt){var Lt=_t.globalCompositeOperation;_t.globalCompositeOperation="destination-out",e.colorFillStyle(_t,255,255,255,e.motionBlurTransparency),_t.fillRect(Me,$e,Xe,dt),_t.globalCompositeOperation=Lt}function K(_t,Me){var $e,Xe,dt,Lt;e.clearingMotionBlur||_t!==u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]&&_t!==u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]?($e=re,Xe=U,dt=e.canvasWidth,Lt=e.canvasHeight):($e={x:ne.x*p,y:ne.y*p},Xe=I*p,dt=e.canvasWidth*p,Lt=e.canvasHeight*p),_t.setTransform(1,0,0,1,0,0),"motionBlur"===Me?z(_t,0,0,dt,Lt):!n&&(void 0===Me||Me)&&_t.clearRect(0,0,dt,Lt),i||(_t.translate($e.x,$e.y),_t.scale(Xe,Xe)),s&&_t.translate(s.x,s.y),a&&_t.scale(a,a)}if(h||(e.textureDrawLastFrame=!1),h){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=t.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var B=e.data.bufferContexts[e.TEXTURE_BUFFER];B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:B,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult}),(A=e.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:e.canvasWidth,height:e.canvasHeight}).mpan={x:(0-A.pan.x)/A.zoom,y:(0-A.pan.y)/A.zoom}}c[e.DRAG]=!1,c[e.NODE]=!1;var be=e.textureCache.texture;A=e.textureCache.viewport,(me=u.contexts[e.NODE]).setTransform(1,0,0,1,0,0),d?z(me,0,0,A.width,A.height):me.clearRect(0,0,A.width,A.height);var xe=_.core("outside-texture-bg-color").value,we=_.core("outside-texture-bg-opacity").value;e.colorFillStyle(me,xe[0],xe[1],xe[2],we),me.fillRect(0,0,A.width,A.height),I=t.zoom(),K(me,!1),me.clearRect(A.mpan.x,A.mpan.y,A.width/A.zoom/l,A.height/A.zoom/l),me.drawImage(be,A.mpan.x,A.mpan.y,A.width/A.zoom/l,A.height/A.zoom/l)}else e.textureOnViewport&&!n&&(e.textureCache=null);var me,Re=t.extent(),je=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),We=e.hideEdgesOnViewport&&je,Pe=[];if(Pe[e.NODE]=!c[e.NODE]&&d&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,Pe[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),Pe[e.DRAG]=!c[e.DRAG]&&d&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,Pe[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),c[e.NODE]||i||o||Pe[e.NODE]){var Fe=d&&!Pe[e.NODE]&&1!==p;K(me=n||(Fe?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),d&&!Fe?"motionBlur":void 0),We?e.drawCachedNodes(me,q.nondrag,l,Re):e.drawLayeredElements(me,q.nondrag,l,Re),e.debug&&e.drawDebugPoints(me,q.nondrag),!i&&!d&&(c[e.NODE]=!1)}!o&&(c[e.DRAG]||i||Pe[e.DRAG])&&(Fe=d&&!Pe[e.DRAG]&&1!==p,K(me=n||(Fe?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]),d&&!Fe?"motionBlur":void 0),We?e.drawCachedNodes(me,q.drag,l,Re):e.drawCachedElements(me,q.drag,l,Re),e.debug&&e.drawDebugPoints(me,q.drag),!i&&!d&&(c[e.DRAG]=!1));if(this.drawSelectionRectangle(r,K),d&&1!==p){var bt=u.contexts[e.DRAG],xt=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],Ut=function(Me,$e,Xe){Me.setTransform(1,0,0,1,0,0),Xe||!m?Me.clearRect(0,0,e.canvasWidth,e.canvasHeight):z(Me,0,0,e.canvasWidth,e.canvasHeight),Me.drawImage($e,0,0,e.canvasWidth*p,e.canvasHeight*p,0,0,e.canvasWidth,e.canvasHeight)};(c[e.NODE]||Pe[e.NODE])&&(Ut(u.contexts[e.NODE],e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],Pe[e.NODE]),c[e.NODE]=!1),(c[e.DRAG]||Pe[e.DRAG])&&(Ut(bt,xt,Pe[e.DRAG]),c[e.DRAG]=!1)}e.prevViewport=A,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),d&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!h,e.mbFrames=0,c[e.NODE]=!0,c[e.DRAG]=!0,e.redraw()},100)),n||t.emit("render")},Yi.drawSelectionRectangle=function(r,e){var t=this,i=t.data,o=t.cy.style(),s=r.drawAllLayers,l=i.canvasNeedsRedraw;if(t.showFps||!r.drawOnlyNodeLayer&&l[t.SELECT_BOX]&&!s){var c=r.forcedContext||i.contexts[t.SELECT_BOX];if(e(c),1==t.selection[4]&&(t.hoverData.selecting||t.touchData.selecting)){var h=t.cy.zoom(),d=o.core("selection-box-border-width").value/h;c.lineWidth=d,c.fillStyle="rgba("+o.core("selection-box-color").value[0]+","+o.core("selection-box-color").value[1]+","+o.core("selection-box-color").value[2]+","+o.core("selection-box-opacity").value+")",c.fillRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]),d>0&&(c.strokeStyle="rgba("+o.core("selection-box-border-color").value[0]+","+o.core("selection-box-border-color").value[1]+","+o.core("selection-box-border-color").value[2]+","+o.core("selection-box-opacity").value+")",c.strokeRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]))}if(i.bgActivePosistion&&!t.hoverData.selecting){h=t.cy.zoom();var p=i.bgActivePosistion;c.fillStyle="rgba("+o.core("active-bg-color").value[0]+","+o.core("active-bg-color").value[1]+","+o.core("active-bg-color").value[2]+","+o.core("active-bg-opacity").value+")",c.beginPath(),c.arc(p.x,p.y,o.core("active-bg-size").pfValue/h,0,2*Math.PI),c.fill()}var g=t.lastRedrawTime;if(t.showFps&&g){g=Math.round(g);var y=Math.round(1e3/g),v="1 frame = "+g+" ms = "+y+" fps";if(c.setTransform(1,0,0,1,0,0),c.fillStyle="rgba(255, 0, 0, 0.75)",c.strokeStyle="rgba(255, 0, 0, 0.75)",c.font="30px Arial",!sd){var m=c.measureText(v);sd=m.actualBoundingBoxAscent}c.fillText(v,0,sd),c.strokeRect(0,sd+10,250,20),c.fillRect(0,sd+10,250*Math.min(y/60,1),20)}s||(l[t.SELECT_BOX]=!1)}};var cD=typeof Float32Array<"u"?Float32Array:Array;function mE(){var r=new cD(9);return cD!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function hD(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function lg(r,e,t){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=t[0],p=t[1];return r[0]=n,r[1]=i,r[2]=o,r[3]=a,r[4]=s,r[5]=l,r[6]=d*n+p*a+u,r[7]=d*i+p*s+c,r[8]=d*o+p*l+h,r}function dD(r,e,t){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=Math.sin(t),p=Math.cos(t);return r[0]=p*n+d*a,r[1]=p*i+d*s,r[2]=p*o+d*l,r[3]=p*a-d*n,r[4]=p*s-d*i,r[5]=p*l-d*o,r[6]=u,r[7]=c,r[8]=h,r}function vE(r,e,t){var n=t[0],i=t[1];return r[0]=n*e[0],r[1]=n*e[1],r[2]=n*e[2],r[3]=i*e[3],r[4]=i*e[4],r[5]=i*e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r}Math.hypot||(Math.hypot=function(){for(var r=0,e=arguments.length;e--;)r+=arguments[e]*arguments[e];return Math.sqrt(r)});var s6=function(){return us(function r(e,t,n,i){ls(this,r),this.debugID=Math.floor(1e4*Math.random()),this.r=e,this.texSize=t,this.texRows=n,this.texHeight=Math.floor(t/n),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(e,t,t),this.scratch=i(e,t,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(t){var n=t.w,i=t.h,a=this.texSize,s=this.texHeight/i,l=n*s,u=i*s;return l>a&&(l=n*(s=a/n),u=i*s),{scale:s,texW:l,texH:u}}},{key:"draw",value:function(t,n,i){var o=this;if(this.locked)throw new Error("can't draw, atlas is locked");var a=this.texSize,s=this.texRows,l=this.texHeight,u=this.getScale(n),c=u.scale,h=u.texW,d=u.texH,p=function(I,U){if(i&&U){var ne=U.context,C=I.x,M=l*I.row;ne.save(),ne.translate(C,M),ne.scale(c,c),i(ne,n),ne.restore()}},g=[null,null],y=function(){p(o.freePointer,o.canvas),g[0]={x:o.freePointer.x,y:o.freePointer.row*l,w:h,h:d},g[1]={x:o.freePointer.x+h,y:o.freePointer.row*l,w:0,h:d},o.freePointer.x+=h,o.freePointer.x==a&&(o.freePointer.x=0,o.freePointer.row++)},m=function(){o.freePointer.x=0,o.freePointer.row++};if(this.freePointer.x+h<=a)y();else{if(this.freePointer.row>=s-1)return!1;this.freePointer.x===a?(m(),y()):this.enableWrapping?function(){var I=o.scratch,U=o.canvas;I.clear(),p({x:0,row:0},I);var ne=a-o.freePointer.x,re=h-ne,A=l,C=o.freePointer.x,M=o.freePointer.row*l,q=ne;U.context.drawImage(I,0,0,q,A,C,M,q,A),g[0]={x:C,y:M,w:q,h:d};var K=(o.freePointer.row+1)*l,B=re;U&&U.context.drawImage(I,ne,0,B,A,0,K,B,A),g[1]={x:0,y:K,w:B,h:d},o.freePointer.x=re,o.freePointer.row++}():(m(),y())}return this.keyToLocation.set(t,g),this.needsBuffer=!0,g}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(t){if(this.locked)return!1;var n=this.texSize,i=this.texRows,o=this.getScale(t);return!(this.freePointer.x+o.texW>n)||this.freePointer.row<i-1}},{key:"bufferIfNeeded",value:function(t){this.texture||(this.texture=function e6(r){var t=r.createTexture();return t.buffer=function(n){r.bindTexture(r.TEXTURE_2D,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_NEAREST),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),r.generateMipmap(r.TEXTURE_2D),r.bindTexture(r.TEXTURE_2D,null)},t.deleteTexture=function(){r.deleteTexture(t)},t}(t)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked&&(this.canvas=null,this.scratch=null))}},{key:"dispose",value:function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0}}])}(),l6=function(){return us(function r(e,t,n,i){ls(this,r),this.r=e,this.texSize=t,this.texRows=n,this.createTextureCanvas=i,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set},[{key:"getKeys",value:function(){return new Set(this.styleKeyToAtlas.keys())}},{key:"_createAtlas",value:function(){return new s6(this.r,this.texSize,this.texRows,this.createTextureCanvas)}},{key:"_getScratchCanvas",value:function(){if(!this.scratch){var t=this.r,n=this.texSize,o=this.createTextureCanvas,a=Math.floor(n/this.texRows);this.scratch=o(t,n,a,"scratch")}return this.scratch}},{key:"draw",value:function(t,n,i){var o=this.styleKeyToAtlas.get(t);return o||((!(o=this.atlases[this.atlases.length-1])||!o.canFit(n))&&(o&&o.lock(),o=this._createAtlas(),this.atlases.push(o)),o.draw(t,n,i),this.styleKeyToAtlas.set(t,o)),o}},{key:"getAtlas",value:function(t){return this.styleKeyToAtlas.get(t)}},{key:"hasAtlas",value:function(t){return this.styleKeyToAtlas.has(t)}},{key:"markKeyForGC",value:function(t){this.markedKeys.add(t)}},{key:"gc",value:function(){var t=this,n=this.markedKeys;if(0!==n.size){var l,i=[],o=new Map,a=null,s=no(this.atlases);try{var u=function(){var h=l.value,d=h.getKeys(),p=function u6(r,e){return r.intersection?r.intersection(e):new Set(cp(r).filter(function(t){return e.has(t)}))}(n,d);if(0===p.size)return i.push(h),d.forEach(function(ne){return o.set(ne,h)}),1;a||(a=t._createAtlas(),i.push(a));var y,g=no(d);try{for(g.s();!(y=g.n()).done;){var v=y.value;if(!p.has(v)){var _=Wn(h.getOffsets(v),2),I=_[0];a.canFit({w:I.w+_[1].w,h:I.h})||(a.lock(),a=t._createAtlas(),i.push(a)),h.canvas&&(t._copyTextureToNewAtlas(v,h,a),o.set(v,a))}}}catch(ne){g.e(ne)}finally{g.f()}h.dispose()};for(s.s();!(l=s.n()).done;)u()}catch(c){s.e(c)}finally{s.f()}this.atlases=i,this.styleKeyToAtlas=o,this.markedKeys=new Set}else console.log("nothing to garbage collect")}},{key:"_copyTextureToNewAtlas",value:function(t,n,i){var a=Wn(n.getOffsets(t),2),s=a[0],l=a[1];if(0===l.w)i.draw(t,s,function(d){d.drawImage(n.canvas,s.x,s.y,s.w,s.h,0,0,s.w,s.h)});else{var u=this._getScratchCanvas();u.clear(),u.context.drawImage(n.canvas,s.x,s.y,s.w,s.h,0,0,s.w,s.h),u.context.drawImage(n.canvas,l.x,l.y,l.w,l.h,s.w,0,l.w,l.h);var c=s.w+l.w,h=s.h;i.draw(t,{w:c,h},function(d){d.drawImage(u,0,0,c,h,0,0,c,h)})}}},{key:"getCounts",value:function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}}}])}(),c6=function(){return us(function r(e,t){ls(this,r),this.r=e,this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map},[{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"addAtlasCollection",value:function(t,n){var i=this.globalOptions,o=i.webglTexSize,s=n.texRows,l=this._cacheScratchCanvas(i.createTextureCanvas),u=new l6(this.r,o,s,l);this.collections.set(t,u)}},{key:"addRenderType",value:function(t,n){var i=n.collection;if(!this.collections.has(i))throw new Error("invalid atlas collection name '".concat(i,"'"));var o=this.collections.get(i),a=fr({type:t,atlasCollection:o},n);this.renderTypes.set(t,a)}},{key:"getRenderTypeOpts",value:function(t){return this.renderTypes.get(t)}},{key:"getAtlasCollection",value:function(t){return this.collections.get(t)}},{key:"_cacheScratchCanvas",value:function(t){var n=-1,i=-1,o=null;return function(a,s,l,u){return u?((!o||s!=n||l!=i)&&(n=s,i=l,o=t(a,s,l)),o):t(a,s,l)}}},{key:"_key",value:function(t,n){return"".concat(t,"-").concat(n)}},{key:"invalidate",value:function(t){var g,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.forceRedraw,a=void 0!==o&&o,s=i.filterEle,l=void 0===s?function(){return!0}:s,u=i.filterType,c=void 0===u?function(){return!0}:u,h=!1,d=!1,p=no(t);try{for(p.s();!(g=p.n()).done;){var y=g.value;if(l(y)){var m,v=no(this.renderTypes.values());try{var _=function(){var U=m.value,ne=U.type;if(c(ne)){var re=n.collections.get(U.collection),A=U.getKey(y),C=Array.isArray(A)?A:[A];if(a)C.forEach(function(K){return re.markKeyForGC(K)}),d=!0;else{var M=U.getID?U.getID(y):y.id(),q=n._key(ne,M),z=n.typeAndIdToKey.get(q);void 0!==z&&!Jj(C,z)&&(h=!0,n.typeAndIdToKey.delete(q),z.forEach(function(K){return re.markKeyForGC(K)}))}}};for(v.s();!(m=v.n()).done;)_()}catch(I){v.e(I)}finally{v.f()}}}}catch(I){p.e(I)}finally{p.f()}return d&&(this.gc(),h=!1),h}},{key:"gc",value:function(){var n,t=no(this.collections.values());try{for(t.s();!(n=t.n()).done;)n.value.gc()}catch(o){t.e(o)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(t,n,i,o){var a=this.renderTypes.get(n),s=this.collections.get(a.collection),l=!1,u=s.draw(o,i,function(d){a.drawClipped?(d.save(),d.beginPath(),d.rect(0,0,i.w,i.h),d.clip(),a.drawElement(d,t,i,!0,!0),d.restore()):a.drawElement(d,t,i,!0,!0),l=!0});if(l){var c=a.getID?a.getID(t):t.id(),h=this._key(n,c);this.typeAndIdToKey.has(h)?this.typeAndIdToKey.get(h).push(o):this.typeAndIdToKey.set(h,[o])}return u}},{key:"getAtlasInfo",value:function(t,n){var i=this,o=this.renderTypes.get(n),a=o.getKey(t);return(Array.isArray(a)?a:[a]).map(function(l){var u=o.getBoundingBox(t,l),c=i.getOrCreateAtlas(t,n,u,l),d=Wn(c.getOffsets(l),2),p=d[0];return{atlas:c,tex:p,tex1:p,tex2:d[1],bb:u}})}},{key:"getDebugInfo",value:function(){var i,t=[],n=no(this.collections);try{for(n.s();!(i=n.n()).done;){var o=Wn(i.value,2),a=o[0],l=o[1].getCounts();t.push({type:a,keyCount:l.keyCount,atlasCount:l.atlasCount})}}catch(h){n.e(h)}finally{n.f()}return t}}])}(),h6=function(){return us(function r(e){ls(this,r),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,n){return n})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(t)}},{key:"getAtlasIndexForBatch",value:function(t){var n=this.batchAtlases.indexOf(t);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),n=this.batchAtlases.length-1}return n}}])}(),ld={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},m6=function(){return us(function r(e,t,n){ls(this,r),this.r=e,this.gl=t,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=Kj,this.atlasManager=new c6(e,n),this.batchManager=new h6(n),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(ld.SCREEN),this.pickingProgram=this._createShaderProgram(ld.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(t,n){this.atlasManager.addAtlasCollection(t,n)}},{key:"addTextureAtlasRenderType",value:function(t,n){this.atlasManager.addRenderType(t,n)}},{key:"addSimpleShapeRenderType",value:function(t,n){this.simpleShapeOptions.set(t,n)}},{key:"invalidate",value:function(t){var i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,o=this.atlasManager;return i?o.invalidate(t,{filterType:function(s){return s===i},forceRedraw:!0}):o.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var n=this.gl,i="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),o=this.batchManager.getIndexArray(),s=function Wj(r,e,t){var n=sD(r,r.VERTEX_SHADER,e),i=sD(r,r.FRAGMENT_SHADER,t),o=r.createProgram();if(r.attachShader(o,n),r.attachShader(o,i),r.linkProgram(o),!r.getProgramParameter(o,r.LINK_STATUS))throw new Error("Could not initialize shaders");return o}(n,i,"#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(o.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x<q.y)? 1.570796327 : 0.0;\n for( int i=0; i<5; i++ ) {\n vec2 cs = vec2(cos(w),sin(w));\n vec2 u = ab*vec2( cs.x,cs.y);\n vec2 v = ab*vec2(-cs.y,cs.x);\n w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));\n }\n \n // compute final point and distance\n float d = length(p-ab*vec2(cos(w),sin(w)));\n \n // return signed distance\n return (dot(p/ab,p/ab)>1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(o.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(t.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "));s.aPosition=n.getAttribLocation(s,"aPosition"),s.aIndex=n.getAttribLocation(s,"aIndex"),s.aVertType=n.getAttribLocation(s,"aVertType"),s.aTransform=n.getAttribLocation(s,"aTransform"),s.aAtlasId=n.getAttribLocation(s,"aAtlasId"),s.aTex=n.getAttribLocation(s,"aTex"),s.aPointAPointB=n.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=n.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=n.getAttribLocation(s,"aLineWidth"),s.aColor=n.getAttribLocation(s,"aColor"),s.aCornerRadius=n.getAttribLocation(s,"aCornerRadius"),s.aBorderColor=n.getAttribLocation(s,"aBorderColor"),s.uPanZoomMatrix=n.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=n.getUniformLocation(s,"uAtlasSize"),s.uBGColor=n.getUniformLocation(s,"uBGColor"),s.uZoom=n.getUniformLocation(s,"uZoom"),s.uTextures=[];for(var l=0;l<this.batchManager.getMaxAtlasesPerBatch();l++)s.uTextures.push(n.getUniformLocation(s,"uTexture".concat(l)));return s}},{key:"_createVAO",value:function(){var t=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=t.length/2;var n=this.maxInstances,i=this.gl,o=this.program,a=i.createVertexArray();return i.bindVertexArray(a),function r6(r,e,t,n){var o=Wn(lD(r,e),2),a=o[0],s=o[1],l=uD(r,s,n),u=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,u),r.bufferData(r.ARRAY_BUFFER,l,r.STATIC_DRAW),s===r.FLOAT?r.vertexAttribPointer(t,a,s,!1,0,0):s===r.INT&&r.vertexAttribIPointer(t,a,s,0,0),r.enableVertexAttribArray(t),r.bindBuffer(r.ARRAY_BUFFER,null)}(i,"vec2",o.aPosition,t),this.transformBuffer=function n6(r,e,t){for(var i=new Float32Array(9*e),o=new Array(e),a=0;a<e;a++)o[a]=new Float32Array(i.buffer,9*a*4,9);var l=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,l),r.bufferData(r.ARRAY_BUFFER,i.byteLength,r.DYNAMIC_DRAW);for(var u=0;u<3;u++){var c=t+u;r.enableVertexAttribArray(c),r.vertexAttribPointer(c,3,r.FLOAT,!1,36,12*u),r.vertexAttribDivisor(c,1)}return r.bindBuffer(r.ARRAY_BUFFER,null),l.getMatrixView=function(h){return o[h]},l.setData=function(h,d){o[d].set(h,0)},l.bufferSubData=function(){r.bindBuffer(r.ARRAY_BUFFER,l),r.bufferSubData(r.ARRAY_BUFFER,0,i)},l}(i,n,o.aTransform),this.indexBuffer=sa(i,n,"vec4",o.aIndex),this.vertTypeBuffer=sa(i,n,"int",o.aVertType),this.atlasIdBuffer=sa(i,n,"int",o.aAtlasId),this.texBuffer=sa(i,n,"vec4",o.aTex),this.pointAPointBBuffer=sa(i,n,"vec4",o.aPointAPointB),this.pointCPointDBuffer=sa(i,n,"vec4",o.aPointCPointD),this.lineWidthBuffer=sa(i,n,"vec2",o.aLineWidth),this.colorBuffer=sa(i,n,"vec4",o.aColor),this.cornerRadiusBuffer=sa(i,n,"vec4",o.aCornerRadius),this.borderColorBuffer=sa(i,n,"vec4",o.aBorderColor),i.bindVertexArray(null),a}},{key:"buffers",get:function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(n){return hs(n,"Buffer")}).map(function(n){return t[n]})),this._buffers}},{key:"startFrame",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ld.SCREEN;this.panZoomMatrix=t,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,n){return!!t.visible()&&(!n||!n.isVisible||n.isVisible(t))}},{key:"drawTexture",value:function(t,n,i){var o=this.atlasManager,a=this.batchManager,s=o.getRenderTypeOpts(i);if(this._isVisible(t,s)&&(!t.isEdge()||this._isValidEdge(t))){if(this.renderTarget.picking&&s.getTexPickingMode){var l=s.getTexPickingMode(t);if(1===l)return;if(2==l)return void this.drawPickingRectangle(t,n,i)}var h,c=no(o.getAtlasInfo(t,i));try{for(c.s();!(h=c.n()).done;){var d=h.value,p=d.atlas,g=d.tex1,y=d.tex2;a.canAddToCurrentBatch(p)||this.endBatch();for(var v=a.getAtlasIndexForBatch(p),m=0,_=[[g,!0],[y,!1]];m<_.length;m++){var I=Wn(_[m],2),U=I[0],ne=I[1];if(0!=U.w){var re=this.instanceCount;this.vertTypeBuffer.getView(re)[0]=0,Ju(n,this.indexBuffer.getView(re)),this.atlasIdBuffer.getView(re)[0]=v;var M=this.texBuffer.getView(re);M[0]=U.x,M[1]=U.y,M[2]=U.w,M[3]=U.h;var q=this.transformBuffer.getMatrixView(re);this.setTransformMatrix(t,q,s,d,ne),this.instanceCount++,ne||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(z){c.e(z)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(t,n,i,o){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=0;if(i.shapeProps&&i.shapeProps.padding&&(s=t.pstyle(i.shapeProps.padding).pfValue),o){var u=o.tex1,h=u.w/(u.w+o.tex2.w);a||(h=1-h);var d=this._getAdjustedBB(o.bb,s,a,h);this._applyTransformMatrix(n,d,i,t)}else{var p=i.getBoundingBox(t),g=this._getAdjustedBB(p,s,!0,1);this._applyTransformMatrix(n,g,i,t)}}},{key:"_applyTransformMatrix",value:function(t,n,i,o){var a,s;hD(t);var l=i.getRotation?i.getRotation(o):0;if(0!==l){var u=i.getRotationPoint(o);lg(t,t,[u.x,u.y]),dD(t,t,l);var d=i.getRotationOffset(o);a=d.x+(n.xOffset||0),s=d.y+(n.yOffset||0)}else a=n.x1,s=n.y1;lg(t,t,[a,s]),vE(t,t,[n.w,n.h])}},{key:"_getAdjustedBB",value:function(t,n,i,o){var a=t.x1,s=t.y1,l=t.w,u=t.h;n&&(a-=n,s-=n,l+=2*n,u+=2*n);var h=0,d=l*o;return i&&o<1?l=d:!i&&o<1&&(a+=h=l-d,l=d),{x1:a,y1:s,w:l,h:u,xOffset:h,yOffset:t.yOffset}}},{key:"drawPickingRectangle",value:function(t,n,i){var o=this.atlasManager.getRenderTypeOpts(i),a=this.instanceCount;this.vertTypeBuffer.getView(a)[0]=4,Ju(n,this.indexBuffer.getView(a)),xl([0,0,0],1,this.colorBuffer.getView(a));var u=this.transformBuffer.getMatrixView(a);this.setTransformMatrix(t,u,o),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,n,i){var o=this.simpleShapeOptions.get(i);if(this._isVisible(t,o)){var a=o.shapeProps,s=this._getVertTypeForShape(t,a.shape);if(void 0===s||o.isSimple&&!o.isSimple(t))return void this.drawTexture(t,n,i);var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=s,5===s||6===s){var u=o.getBoundingBox(t),c=this._getCornerRadius(t,a.radius,u),h=this.cornerRadiusBuffer.getView(l);h[0]=c,h[1]=c,h[2]=c,h[3]=c,6===s&&(h[0]=0,h[2]=0)}Ju(n,this.indexBuffer.getView(l)),xl(t.pstyle(a.color).value,t.pstyle(a.opacity).value,this.colorBuffer.getView(l));var v=this.lineWidthBuffer.getView(l);if(v[0]=0,v[1]=0,a.border){var m=t.pstyle("border-width").value;if(m>0){xl(t.pstyle("border-color").value,t.pstyle("border-opacity").value,this.borderColorBuffer.getView(l));var ne=t.pstyle("border-position").value;if("inside"===ne)v[0]=0,v[1]=-m;else if("outside"===ne)v[0]=m,v[1]=0;else{var re=m/2;v[0]=re,v[1]=-re}}}var A=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(t,A,o),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(t,n){switch(t.pstyle(n).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(t,n,i){var o=i.w,a=i.h;if("auto"===t.pstyle(n).value)return ms(o,a);var s=t.pstyle(n).pfValue;return Math.min(s,a/2,o/2)}},{key:"drawEdgeArrow",value:function(t,n,i){if(t.visible()){var a,s,l,o=t._private.rscratch;if(!("source"===i?(a=o.arrowStartX,s=o.arrowStartY,l=o.srcArrowAngle):(a=o.arrowEndX,s=o.arrowEndY,l=o.tgtArrowAngle),isNaN(a)||null==a||isNaN(s)||null==s||isNaN(l)||null==l||"none"===t.pstyle(i+"-arrow-shape").value)){var c=t.pstyle(i+"-arrow-color").value,p=t.pstyle("opacity").value*t.pstyle("line-opacity").value,g=t.pstyle("width").pfValue,y=t.pstyle("arrow-scale").value,v=this.r.getArrowWidth(g,y),m=this.instanceCount,_=this.transformBuffer.getMatrixView(m);hD(_),lg(_,_,[a,s]),vE(_,_,[v,v]),dD(_,_,l),this.vertTypeBuffer.getView(m)[0]=3,Ju(n,this.indexBuffer.getView(m)),xl(c,p,this.colorBuffer.getView(m)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(t,n){if(t.visible()){var i=this._getEdgePoints(t);if(i){var o=t.pstyle("opacity").value,a=t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,l=t.pstyle("line-color").value,u=o*a;if(i.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==i.length){var c=this.instanceCount;this.vertTypeBuffer.getView(c)[0]=1,Ju(n,this.indexBuffer.getView(c)),xl(l,u,this.colorBuffer.getView(c)),this.lineWidthBuffer.getView(c)[0]=s;var g=this.pointAPointBBuffer.getView(c);g[0]=i[0],g[1]=i[1],g[2]=i[2],g[3]=i[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y<i.length-2;y+=2){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=2,Ju(n,this.indexBuffer.getView(v)),xl(l,u,this.colorBuffer.getView(v)),this.lineWidthBuffer.getView(v)[0]=s;var U=i[y-2],ne=i[y-1],re=i[y],A=i[y+1],C=i[y+2],M=i[y+3],q=i[y+4],z=i[y+5];0==y&&(U=2*re-C+.001,ne=2*A-M+.001),y==i.length-4&&(q=2*C-re+.001,z=2*M-A+.001);var K=this.pointAPointBBuffer.getView(v);K[0]=U,K[1]=ne,K[2]=re,K[3]=A;var B=this.pointCPointDBuffer.getView(v);B[0]=C,B[1]=M,B[2]=q,B[3]=z,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(t){var n=t._private.rscratch;return!(n.badLine||null==n.allpts||isNaN(n.allpts[0]))}},{key:"_getEdgePoints",value:function(t){var n=t._private.rscratch;if(this._isValidEdge(t)){var i=n.allpts;if(4==i.length)return i;var o=this._getNumSegments(t);return this._getCurveSegmentPoints(i,o)}}},{key:"_getNumSegments",value:function(t){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,n){if(4==t.length)return t;for(var i=Array(2*(n+1)),o=0;o<=n;o++)0==o?(i[0]=t[0],i[1]=t[1]):o==n?(i[2*o]=t[t.length-2],i[2*o+1]=t[t.length-1]):this._setCurvePoint(t,o/n,i,2*o);return i}},{key:"_setCurvePoint",value:function(t,n,i,o){if(!(t.length<=2)){for(var a=Array(t.length-2),s=0;s<a.length;s+=2){var u=(1-n)*t[s+1]+n*t[s+3];a[s]=(1-n)*t[s]+n*t[s+2],a[s+1]=u}return this._setCurvePoint(a,n,i,o)}i[o]=t[0],i[o+1]=t[1]}},{key:"endBatch",value:function(){var t=this.gl,n=this.vao,i=this.vertexCount,o=this.instanceCount;if(0!==o){var a=this.renderTarget.picking?this.pickingProgram:this.program;t.useProgram(a),t.bindVertexArray(n);var l,s=no(this.buffers);try{for(s.s();!(l=s.n()).done;)l.value.bufferSubData(o)}catch(g){s.e(g)}finally{s.f()}for(var c=this.batchManager.getAtlases(),h=0;h<c.length;h++)c[h].bufferIfNeeded(t);for(var d=0;d<c.length;d++)t.activeTexture(t.TEXTURE0+d),t.bindTexture(t.TEXTURE_2D,c[d].texture),t.uniform1i(a.uTextures[d],d);t.uniform1f(a.uZoom,function Xj(r){var e=r.pixelRatio;return r.cy.zoom()*e}(this.r)),t.uniformMatrix3fv(a.uPanZoomMatrix,!1,this.panZoomMatrix),t.uniform1i(a.uAtlasSize,this.batchManager.getAtlasSize());var p=xl(this.bgColor,1);t.uniform4fv(a.uBGColor,p),t.drawArraysInstanced(t.TRIANGLES,0,i,o),t.bindVertexArray(null),t.bindTexture(t.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:o,atlasCount:c.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var t=this.atlasManager.getDebugInfo(),n=t.reduce(function(a,s){return a+s.atlasCount},0),i=this.batchDebugInfo,o=i.reduce(function(a,s){return a+s.count},0);return{atlasInfo:t,totalAtlases:n,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:i.length,batchInfo:i,totalInstances:o}}}])}(),gD={};function mD(r,e){return io(r._private.rscratch,"labelWrapCachedLines",e)||[]}gD.initWebgl=function(r,e){var t=this,n=t.data.contexts[t.WEBGL];r.bgColor=function v6(r){var e=r.cy.container();return _S(e&&e.style&&e.style.backgroundColor||"white")}(t),r.webglTexSize=Math.min(r.webglTexSize,n.getParameter(n.MAX_TEXTURE_SIZE)),r.webglTexRows=Math.min(r.webglTexRows,54),r.webglTexRowsNodes=Math.min(r.webglTexRowsNodes,54),r.webglBatchSize=Math.min(r.webglBatchSize,16384),r.webglTexPerBatch=Math.min(r.webglTexPerBatch,n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)),t.webglDebug=r.webglDebug,t.webglDebugShowAtlases=r.webglDebugShowAtlases,t.pickingFrameBuffer=function i6(r){var e=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,e);var t=r.createTexture();return r.bindTexture(r.TEXTURE_2D,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0),r.bindFramebuffer(r.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(n,i){r.bindTexture(r.TEXTURE_2D,t),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,n,i,0,r.RGBA,r.UNSIGNED_BYTE,null)},e}(n),t.pickingFrameBuffer.needsDraw=!0,t.drawing=new m6(t,n,r);var i=function(h){return function(d){return t.getTextAngle(d,h)}},o=function(h){return function(d){var p=d.pstyle(h);return p&&p.value}},a=function(h){return function(d){return d.pstyle("".concat(h,"-opacity")).value>0}},s=function(h){return"yes"===h.pstyle("text-events").strValue?2:1},l=function(h){var d=h.position(),p=d.x,g=d.y,y=h.outerWidth(),v=h.outerHeight();return{w:y,h:v,x1:p-y/2,y1:g-v/2}};t.drawing.addAtlasCollection("node",{texRows:r.webglTexRowsNodes}),t.drawing.addAtlasCollection("label",{texRows:r.webglTexRows}),t.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),t.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:Qj,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),t.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:a("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),t.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:a("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),t.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:_E(e.getLabelKey,null),getBoundingBox:bE(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:i(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:o("label")}),t.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:_E(e.getSourceLabelKey,"source"),getBoundingBox:bE(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:i("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:o("source-label")}),t.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:_E(e.getTargetLabelKey,"target"),getBoundingBox:bE(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:i("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:o("target-label")});var u=Mh(function(){console.log("garbage collect flag set"),t.data.gc=!0},1e4);t.onUpdateEleCalcs(function(c,h){var d=!1;h&&h.length>0&&(d|=t.drawing.invalidate(h)),d&&u()}),function y6(r){var e=r.render;r.render=function(o){o=o||{},r.webgl&&(r.cy.zoom()>7.99?(function w6(r){var e=r.data.contexts[r.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}(r),e.call(r,o)):(function _6(r){var e=function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,r.canvasWidth,r.canvasHeight),n.restore()};e(r.data.contexts[r.NODE]),e(r.data.contexts[r.DRAG])}(r),yD(r,o,ld.SCREEN)))};var t=r.matchCanvasSize;r.matchCanvasSize=function(o){t.call(r,o),r.pickingFrameBuffer.setFramebufferAttachmentSizes(r.canvasWidth,r.canvasHeight),r.pickingFrameBuffer.needsDraw=!0},r.findNearestElements=function(o,a,s,l){return function A6(r,e,t){var o,a,l,n=function x6(r,e,t){var o,a,u=gE(r),d=function Yj(r,e,t,n,i){var a=i*t+e.y;return[n*t+e.x,a=Math.round(r.canvasHeight-a)]}(r,u.pan,u.zoom,e,t),p=Wn(d,2);o=p[0]-3,a=p[1]-3;var m=r.data.contexts[r.WEBGL];m.bindFramebuffer(m.FRAMEBUFFER,r.pickingFrameBuffer),r.pickingFrameBuffer.needsDraw&&(m.viewport(0,0,m.canvas.width,m.canvas.height),yD(r,null,ld.PICKING),r.pickingFrameBuffer.needsDraw=!1);var I=new Uint8Array(144);m.readPixels(o,a,6,6,m.RGBA,m.UNSIGNED_BYTE,I),m.bindFramebuffer(m.FRAMEBUFFER,null);for(var U=new Set,ne=0;ne<36;ne++){var A=Zj(I.slice(4*ne,4*ne+4))-1;A>=0&&U.add(A)}return U}(r,e,t),i=r.getCachedZSortedEles(),s=no(n);try{for(s.s();!(l=s.n()).done;){var c=i[l.value];if(!o&&c.isNode()&&(o=c),!a&&c.isEdge()&&(a=c),o&&a)break}}catch(h){s.e(h)}finally{s.f()}return[o,a].filter(Boolean)}(r,o,a)};var n=r.invalidateCachedZSortedEles;r.invalidateCachedZSortedEles=function(){n.call(r),r.pickingFrameBuffer.needsDraw=!0};var i=r.notify;r.notify=function(o,a){i.call(r,o,a),"viewport"===o||"bounds"===o?r.pickingFrameBuffer.needsDraw=!0:"background"===o&&r.drawing.invalidate(a,{type:"node-body"})}}(t)};var _E=function(e,t){return function(n){var i=e(n),o=mD(n,t);return o.length>1?o.map(function(a,s){return"".concat(i,"_").concat(s)}):i}},bE=function(e,t){return function(n,i){var o=e(n);if("string"==typeof i){var a=i.indexOf("_");if(a>0){var s=Number(i.substring(a+1)),l=mD(n,t),u=o.h/l.length,c=u*s;return{x1:o.x1,w:o.w,y1:o.y1+c,h:u,yOffset:c}}}return o}};function vD(r,e){var t=r.canvasWidth,n=r.canvasHeight,i=gE(r),o=i.pan,a=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t,n),e.translate(o.x,o.y),e.scale(a,a)}function EE(r,e,t){var n=r.drawing;e+=1,t.isNode()?(n.drawNode(t,e,"node-underlay"),n.drawNode(t,e,"node-body"),n.drawTexture(t,e,"label"),n.drawNode(t,e,"node-overlay")):(n.drawEdgeLine(t,e),n.drawEdgeArrow(t,e,"source"),n.drawEdgeArrow(t,e,"target"),n.drawTexture(t,e,"label"),n.drawTexture(t,e,"edge-source-label"),n.drawTexture(t,e,"edge-target-label"))}function yD(r,e,t){var n;r.webglDebug&&(n=performance.now());var i=r.drawing,o=0;if(t.screen&&r.data.canvasNeedsRedraw[r.SELECT_BOX]&&function E6(r,e){r.drawSelectionRectangle(e,function(t){return vD(r,t)})}(r,e),r.data.canvasNeedsRedraw[r.NODE]||t.picking){var a=r.data.contexts[r.WEBGL];t.screen?(a.clearColor(0,0,0,0),a.enable(a.BLEND),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA)):a.disable(a.BLEND),a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),a.viewport(0,0,a.canvas.width,a.canvas.height);var s=function b6(r){var e=r.canvasWidth,t=r.canvasHeight,n=gE(r),i=n.pan,o=n.zoom,a=mE();lg(a,a,[i.x,i.y]),vE(a,a,[o,o]);var s=mE();!function a6(r,e,t){r[0]=2/e,r[1]=0,r[2]=0,r[3]=0,r[4]=-2/t,r[5]=0,r[6]=-1,r[7]=1,r[8]=1}(s,e,t);var l=mE();return function o6(r,e,t){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=t[0],p=t[1],g=t[2],y=t[3],v=t[4],m=t[5],_=t[6],I=t[7],U=t[8];r[0]=d*n+p*a+g*u,r[1]=d*i+p*s+g*c,r[2]=d*o+p*l+g*h,r[3]=y*n+v*a+m*u,r[4]=y*i+v*s+m*c,r[5]=y*o+v*l+m*h,r[6]=_*n+I*a+U*u,r[7]=_*i+I*s+U*c,r[8]=_*o+I*l+U*h}(l,s,a),l}(r),l=r.getCachedZSortedEles();if(o=l.length,i.startFrame(s,t),t.screen){for(var u=0;u<l.nondrag.length;u++)EE(r,u,l.nondrag[u]);for(var c=0;c<l.drag.length;c++)EE(r,c,l.drag[c])}else if(t.picking)for(var h=0;h<l.length;h++)EE(r,h,l[h]);i.endFrame(),t.screen&&r.webglDebugShowAtlases&&(function T6(r){var e=r.data.contexts[r.NODE];e.save(),vD(r,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}(r),function I6(r){var e=function(i,o,a){for(var s=i.atlasManager.getAtlasCollection(o),l=r.data.contexts[r.NODE],u=s.atlases,c=0;c<u.length;c++){var d=u[c].canvas;if(d){var p=d.width,g=d.height,y=p*c,v=d.height*a;l.save(),l.scale(.4,.4),l.drawImage(d,y,v),l.strokeStyle="black",l.rect(y,v,p,g),l.stroke(),l.restore()}}},t=0;e(r.drawing,"node",t++),e(r.drawing,"label",t++)}(r)),r.data.canvasNeedsRedraw[r.NODE]=!1,r.data.canvasNeedsRedraw[r.DRAG]=!1}if(r.webglDebug){var d=performance.now(),g=Math.ceil(d-n),y=i.getDebugInfo(),v=["".concat(o," elements"),"".concat(y.totalInstances," instances"),"".concat(y.batchCount," batches"),"".concat(y.totalAtlases," atlases"),"".concat(y.wrappedCount," wrapped textures"),"".concat(y.simpleCount," simple shapes")].join(", ");console.log("WebGL (".concat(t.name,") - frame time ").concat(g,"ms")),console.log("Totals:"),console.log(" ".concat(v)),console.log("Texture Atlases Used:");var I,_=no(y.atlasInfo);try{for(_.s();!(I=_.n()).done;){var U=I.value;console.log(" ".concat(U.type,": ").concat(U.keyCount," keys, ").concat(U.atlasCount," atlases"))}}catch(ne){_.e(ne)}finally{_.f()}console.log("")}r.data.gc&&(console.log("Garbage Collect!"),r.data.gc=!1,i.gc())}for(var As={drawPolygonPath:function(r,e,t,n,i,o){var a=n/2,s=i/2;r.beginPath&&r.beginPath(),r.moveTo(e+a*o[0],t+s*o[1]);for(var l=1;l<o.length/2;l++)r.lineTo(e+a*o[2*l],t+s*o[2*l+1]);r.closePath()},drawRoundPolygonPath:function(r,e,t,n,i,o,a){a.forEach(function(s){return Fk(r,s)}),r.closePath()},drawRoundRectanglePath:function(r,e,t,n,i,o){var a=n/2,s=i/2,l="auto"===o?ms(n,i):Math.min(o,s,a);r.beginPath&&r.beginPath(),r.moveTo(e,t-s),r.arcTo(e+a,t-s,e+a,t,l),r.arcTo(e+a,t+s,e,t+s,l),r.arcTo(e-a,t+s,e-a,t,l),r.arcTo(e-a,t-s,e,t-s,l),r.lineTo(e,t-s),r.closePath()},drawBottomRoundRectanglePath:function(r,e,t,n,i,o){var a=n/2,s=i/2,l="auto"===o?ms(n,i):o;r.beginPath&&r.beginPath(),r.moveTo(e,t-s),r.lineTo(e+a,t-s),r.lineTo(e+a,t),r.arcTo(e+a,t+s,e,t+s,l),r.arcTo(e-a,t+s,e-a,t,l),r.lineTo(e-a,t-s),r.lineTo(e,t-s),r.closePath()},drawCutRectanglePath:function(r,e,t,n,i,o,a){var s=n/2,l=i/2,u="auto"===a?8:a;r.beginPath&&r.beginPath(),r.moveTo(e-s+u,t-l),r.lineTo(e+s-u,t-l),r.lineTo(e+s,t-l+u),r.lineTo(e+s,t+l-u),r.lineTo(e+s-u,t+l),r.lineTo(e-s+u,t+l),r.lineTo(e-s,t+l-u),r.lineTo(e-s,t-l+u),r.closePath()},drawBarrelPath:function(r,e,t,n,i){var o=n/2,a=i/2,s=e-o,l=e+o,u=t-a,c=t+a,h=Fb(n,i),d=h.widthOffset,p=h.heightOffset,g=h.ctrlPtOffsetPct*d;r.beginPath&&r.beginPath(),r.moveTo(s,u+p),r.lineTo(s,c-p),r.quadraticCurveTo(s+g,c,s+d,c),r.lineTo(l-d,c),r.quadraticCurveTo(l-g,c,l,c-p),r.lineTo(l,u+p),r.quadraticCurveTo(l-g,u,l-d,u),r.lineTo(s+d,u),r.quadraticCurveTo(s+g,u,s,u+p),r.closePath()}},wD=Math.sin(0),_D=Math.cos(0),TE={},IE={},bD=Math.PI/40,ec=0*Math.PI;ec<2*Math.PI;ec+=bD)TE[ec]=Math.sin(ec),IE[ec]=Math.cos(ec);As.drawEllipsePath=function(r,e,t,n,i){if(r.beginPath&&r.beginPath(),r.ellipse)r.ellipse(e,t,n/2,i/2,0,0,2*Math.PI);else for(var o,a,s=n/2,l=i/2,u=0*Math.PI;u<2*Math.PI;u+=bD)o=e-s*TE[u]*wD+s*IE[u]*_D,a=t+l*IE[u]*wD+l*TE[u]*_D,0===u?r.moveTo(o,a):r.lineTo(o,a);r.closePath()};var hd={};function ED(r){var e=r.indexOf(",");return r.substr(e+1)}function TD(r,e,t){var n=function(){return e.toDataURL(t,r.quality)};switch(r.output){case"blob-promise":return new Bu(function(i,o){try{e.toBlob(function(a){null!=a?i(a):o(new Error("`canvas.toBlob()` sent a null value in its callback"))},t,r.quality)}catch(a){o(a)}});case"blob":return function R6(r,e){for(var t=atob(r),n=new ArrayBuffer(t.length),i=new Uint8Array(n),o=0;o<t.length;o++)i[o]=t.charCodeAt(o);return new Blob([n],{type:e})}(ED(n()),t);case"base64":return ED(n());default:return n()}}hd.createBuffer=function(r,e){var t=document.createElement("canvas");return t.width=r,t.height=e,[t,t.getContext("2d")]},hd.bufferCanvasImage=function(r){var e=this.cy,n=e.mutableElements().boundingBox(),i=this.findContainerClientCoords(),o=r.full?Math.ceil(n.w):i[2],a=r.full?Math.ceil(n.h):i[3],s=Bt(r.maxWidth)||Bt(r.maxHeight),l=this.getPixelRatio(),u=1;if(void 0!==r.scale)o*=r.scale,a*=r.scale,u=r.scale;else if(s){var c=1/0,h=1/0;Bt(r.maxWidth)&&(c=u*r.maxWidth/o),Bt(r.maxHeight)&&(h=u*r.maxHeight/a),o*=u=Math.min(c,h),a*=u}s||(o*=l,a*=l,u*=l);var d=document.createElement("canvas");d.width=o,d.height=a,d.style.width=o+"px",d.style.height=a+"px";var p=d.getContext("2d");if(o>0&&a>0){p.clearRect(0,0,o,a),p.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(r.full)p.translate(-n.x1*u,-n.y1*u),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(n.x1*u,n.y1*u);else{var y=e.pan(),v={x:y.x*u,y:y.y*u};u*=e.zoom(),p.translate(v.x,v.y),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(-v.x,-v.y)}r.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=r.bg,p.rect(0,0,o,a),p.fill())}return d},hd.png=function(r){return TD(r,this.bufferCanvasImage(r),"image/png")},hd.jpg=function(r){return TD(r,this.bufferCanvasImage(r),"image/jpeg")};var S6=xD,Dr=xD.prototype;function xD(r){var e=this,n=e.cy.window().document;r.webgl&&(Dr.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(Dr.CANVAS_LAYERS),contexts:new Array(Dr.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Dr.CANVAS_LAYERS),bufferCanvases:new Array(Dr.BUFFER_COUNT),bufferContexts:new Array(Dr.CANVAS_LAYERS)};var i="-webkit-tap-highlight-color",o="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var a=e.data.canvasContainer.style;e.data.canvasContainer.style[i]=o,a.position="relative",a.zIndex="0",a.overflow="hidden";var s=r.cy.container();s.appendChild(e.data.canvasContainer),s.style[i]=o;var l={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};fS&&fS.userAgent.match(/msie|trident|edge/i)&&(l["-ms-touch-action"]="none",l["touch-action"]="none");for(var u=0;u<Dr.CANVAS_LAYERS;u++){var c=e.data.canvases[u]=n.createElement("canvas"),h=Dr.CANVAS_TYPES[u];e.data.contexts[u]=c.getContext(h),e.data.contexts[u]||bn("Could not create canvas of type "+h),Object.keys(l).forEach(function(_t){c.style[_t]=l[_t]}),c.style.position="absolute",c.setAttribute("data-id","layer"+u),c.style.zIndex=String(Dr.CANVAS_LAYERS-u),e.data.canvasContainer.appendChild(c),e.data.canvasNeedsRedraw[u]=!1}for(e.data.topCanvas=e.data.canvases[0],e.data.canvases[Dr.NODE].setAttribute("data-id","layer"+Dr.NODE+"-node"),e.data.canvases[Dr.SELECT_BOX].setAttribute("data-id","layer"+Dr.SELECT_BOX+"-selectbox"),e.data.canvases[Dr.DRAG].setAttribute("data-id","layer"+Dr.DRAG+"-drag"),e.data.canvases[Dr.WEBGL]&&e.data.canvases[Dr.WEBGL].setAttribute("data-id","layer"+Dr.WEBGL+"-webgl"),u=0;u<Dr.BUFFER_COUNT;u++)e.data.bufferCanvases[u]=n.createElement("canvas"),e.data.bufferContexts[u]=e.data.bufferCanvases[u].getContext("2d"),e.data.bufferCanvases[u].style.position="absolute",e.data.bufferCanvases[u].setAttribute("data-id","buffer"+u),e.data.bufferCanvases[u].style.zIndex=String(-u-1),e.data.bufferCanvases[u].style.visibility="hidden";e.pathsEnabled=!0;var d=Ki(),g=function(Me){return{x:-Me.w/2,y:-Me.h/2}},v=function(Me){return Me[0]._private.nodeKey},m=function(Me){return Me[0]._private.labelStyleKey},_=function(Me){return Me[0]._private.sourceLabelStyleKey},I=function(Me){return Me[0]._private.targetLabelStyleKey},U=function(Me,$e,Xe,dt,Lt){return e.drawElement(Me,$e,Xe,!1,!1,Lt)},ne=function(Me,$e,Xe,dt,Lt){return e.drawElementText(Me,$e,Xe,dt,"main",Lt)},re=function(Me,$e,Xe,dt,Lt){return e.drawElementText(Me,$e,Xe,dt,"source",Lt)},A=function(Me,$e,Xe,dt,Lt){return e.drawElementText(Me,$e,Xe,dt,"target",Lt)},C=function(Me){return Me.boundingBox(),Me[0]._private.bodyBounds},M=function(Me){return Me.boundingBox(),Me[0]._private.labelBounds.main||d},q=function(Me){return Me.boundingBox(),Me[0]._private.labelBounds.source||d},z=function(Me){return Me.boundingBox(),Me[0]._private.labelBounds.target||d},K=function(Me,$e){return $e},B=function(Me){return function(Me){return{x:(Me.x1+Me.x2)/2,y:(Me.y1+Me.y2)/2}}(C(Me))},me=function(Me,$e,Xe){var dt=Me?Me+"-":"";return{x:$e.x+Xe.pstyle(dt+"text-margin-x").pfValue,y:$e.y+Xe.pstyle(dt+"text-margin-y").pfValue}},be=function(Me,$e,Xe){var dt=Me[0]._private.rscratch;return{x:dt[$e],y:dt[Xe]}},xe=function(Me){return me("",be(Me,"labelX","labelY"),Me)},we=function(Me){return me("source",be(Me,"sourceLabelX","sourceLabelY"),Me)},Re=function(Me){return me("target",be(Me,"targetLabelX","targetLabelY"),Me)},je=function(Me){return g(C(Me))},We=function(Me){return g(q(Me))},Pe=function(Me){return g(z(Me))},Fe=function(Me){var $e=M(Me),Xe=g(M(Me));if(Me.isNode()){switch(Me.pstyle("text-halign").value){case"left":Xe.x=-$e.w-($e.leftPad||0);break;case"right":Xe.x=-($e.rightPad||0)}switch(Me.pstyle("text-valign").value){case"top":Xe.y=-$e.h-($e.topPad||0);break;case"bottom":Xe.y=-($e.botPad||0)}}return Xe},lt=e.data.eleTxrCache=new od(e,{getKey:v,doesEleInvalidateKey:function(Me){var $e=Me[0]._private;return!($e.oldBackgroundTimestamp===$e.backgroundTimestamp)},drawElement:U,getBoundingBox:C,getRotationPoint:B,getRotationOffset:je,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),mt=e.data.lblTxrCache=new od(e,{getKey:m,drawElement:ne,getBoundingBox:M,getRotationPoint:xe,getRotationOffset:Fe,isVisible:K}),at=e.data.slbTxrCache=new od(e,{getKey:_,drawElement:re,getBoundingBox:q,getRotationPoint:we,getRotationOffset:We,isVisible:K}),bt=e.data.tlbTxrCache=new od(e,{getKey:I,drawElement:A,getBoundingBox:z,getRotationPoint:Re,getRotationOffset:Pe,isVisible:K}),xt=e.data.lyrTxrCache=new Zk(e);e.onUpdateEleCalcs(function(Me,$e){lt.invalidateElements($e),mt.invalidateElements($e),at.invalidateElements($e),bt.invalidateElements($e),xt.invalidateElements($e);for(var Xe=0;Xe<$e.length;Xe++){var dt=$e[Xe]._private;dt.oldBackgroundTimestamp=dt.backgroundTimestamp}});var Ut=function(Me){for(var $e=0;$e<Me.length;$e++)xt.enqueueElementRefinement(Me[$e].ele)};lt.onDequeue(Ut),mt.onDequeue(Ut),at.onDequeue(Ut),bt.onDequeue(Ut),r.webgl&&e.initWebgl(r,{getStyleKey:v,getLabelKey:m,getSourceLabelKey:_,getTargetLabelKey:I,drawElement:U,drawLabel:ne,drawSourceLabel:re,drawTargetLabel:A,getElementBox:C,getLabelBox:M,getSourceLabelBox:q,getTargetLabelBox:z,getElementRotationPoint:B,getElementRotationOffset:je,getLabelRotationPoint:xe,getSourceLabelRotationPoint:we,getTargetLabelRotationPoint:Re,getLabelRotationOffset:Fe,getSourceLabelRotationOffset:We,getTargetLabelRotationOffset:Pe})}Dr.CANVAS_LAYERS=3,Dr.SELECT_BOX=0,Dr.DRAG=1,Dr.NODE=2,Dr.WEBGL=3,Dr.CANVAS_TYPES=["2d","2d","2d","webgl2"],Dr.BUFFER_COUNT=3,Dr.TEXTURE_BUFFER=0,Dr.MOTIONBLUR_BUFFER_NODE=1,Dr.MOTIONBLUR_BUFFER_DRAG=2,Dr.redrawHint=function(r,e){var t=this;switch(r){case"eles":t.data.canvasNeedsRedraw[Dr.NODE]=e;break;case"drag":t.data.canvasNeedsRedraw[Dr.DRAG]=e;break;case"select":t.data.canvasNeedsRedraw[Dr.SELECT_BOX]=e;break;case"gc":t.data.gc=!0}};var C6=typeof Path2D<"u";Dr.path2dEnabled=function(r){if(void 0===r)return this.pathsEnabled;this.pathsEnabled=!!r},Dr.usePaths=function(){return C6&&this.pathsEnabled},Dr.setImgSmoothing=function(r,e){null!=r.imageSmoothingEnabled?r.imageSmoothingEnabled=e:(r.webkitImageSmoothingEnabled=e,r.mozImageSmoothingEnabled=e,r.msImageSmoothingEnabled=e)},Dr.getImgSmoothing=function(r){return null!=r.imageSmoothingEnabled?r.imageSmoothingEnabled:r.webkitImageSmoothingEnabled||r.mozImageSmoothingEnabled||r.msImageSmoothingEnabled},Dr.makeOffscreenCanvas=function(r,e){var t;return"undefined"!==(typeof OffscreenCanvas>"u"?"undefined":ei(OffscreenCanvas))?t=new OffscreenCanvas(r,e):((t=this.cy.window().document.createElement("canvas")).width=r,t.height=e),t},[tD,aa,Oa,pE,Il,xs,Yi,gD,As,hd,{nodeShapeImpl:function(r,e,t,n,i,o,a,s){switch(r){case"ellipse":return this.drawEllipsePath(e,t,n,i,o);case"polygon":return this.drawPolygonPath(e,t,n,i,o,a);case"round-polygon":return this.drawRoundPolygonPath(e,t,n,i,o,a,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,t,n,i,o,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,t,n,i,o,a,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,t,n,i,o,s);case"barrel":return this.drawBarrelPath(e,t,n,i,o)}}}].forEach(function(r){fr(Dr,r)});var k6=[{type:"layout",extensions:rj},{type:"renderer",extensions:[{name:"null",impl:Sk},{name:"base",impl:Wk},{name:"canvas",impl:S6}]}],AD={},RD={};function SD(r,e,t){var n=t,i=function(C){Kr("Can not register `"+e+"` for `"+r+"` since `"+C+"` already exists in the prototype and can not be overridden")};if("core"===r){if(td.prototype[e])return i(e);td.prototype[e]=t}else if("collection"===r){if(Ii.prototype[e])return i(e);Ii.prototype[e]=t}else if("layout"===r){for(var o=function(C){this.options=C,t.call(this,C),Ur(this._private)||(this._private={}),this._private.cy=C.cy,this._private.listeners=[],this.createEmitter()},a=o.prototype=Object.create(t.prototype),s=[],l=0;l<s.length;l++){var u=s[l];a[u]=a[u]||function(){return this}}a.start&&!a.run?a.run=function(){return this.start(),this}:!a.start&&a.run&&(a.start=function(){return this.run(),this});var c=t.prototype.stop;a.stop=function(){var A=this.options;if(A&&A.animate){var C=this.animations;if(C)for(var M=0;M<C.length;M++)C[M].stop()}return c?c.call(this):this.emit("layoutstop"),this},a.destroy||(a.destroy=function(){return this}),a.cy=function(){return this._private.cy};var h=function(C){return C._private.cy},d={addEventFields:function(C,M){M.layout=C,M.cy=h(C),M.target=C},bubble:function(){return!0},parent:function(C){return h(C)}};fr(a,{createEmitter:function(){return this._private.emitter=new Bp(d,this),this},emitter:function(){return this._private.emitter},on:function(C,M){return this.emitter().on(C,M),this},one:function(C,M){return this.emitter().one(C,M),this},once:function(C,M){return this.emitter().one(C,M),this},removeListener:function(C,M){return this.emitter().removeListener(C,M),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(C,M){return this.emitter().emit(C,M),this}}),Xr.eventAliasesOn(a),n=o}else if("renderer"===r&&"null"!==e&&"base"!==e){var p=CD("renderer","base"),g=p.prototype,y=t,v=t.prototype,m=function(){p.apply(this,arguments),y.apply(this,arguments)},_=m.prototype;for(var I in g){var U=g[I];if(null!=v[I])return i(I);_[I]=U}for(var re in v)_[re]=v[re];g.clientFunctions.forEach(function(A){_[A]=_[A]||function(){bn("Renderer does not implement `renderer."+A+"()` on its prototype")}}),n=m}else if("__proto__"===r||"constructor"===r||"prototype"===r)return bn(r+" is an illegal type to be registered, possibly lead to prototype pollutions");return bS({map:AD,keys:[r,e],value:n})}function CD(r,e){return ES({map:AD,keys:[r,e]})}function D6(r,e,t,n,i){return bS({map:RD,keys:[r,e,t,n],value:i})}function N6(r,e,t,n){return ES({map:RD,keys:[r,e,t,n]})}var xE=function(){return 2===arguments.length?CD.apply(null,arguments):3===arguments.length?SD.apply(null,arguments):4===arguments.length?N6.apply(null,arguments):5===arguments.length?D6.apply(null,arguments):void bn("Invalid extension access syntax")};td.prototype.extension=xE,k6.forEach(function(r){r.extensions.forEach(function(e){SD(r.type,e.name,e.impl)})});var hg=function(){if(!(this instanceof hg))return new hg;this.length=0},Al=hg.prototype;Al.instanceString=function(){return"stylesheet"},Al.selector=function(r){return this[this.length++]={selector:r,properties:[]},this},Al.css=function(r,e){var t=this.length-1;if(sr(r))this[t].properties.push({name:r,value:e});else if(Ur(r))for(var n=r,i=Object.keys(n),o=0;o<i.length;o++){var a=i[o],s=n[a];if(null!=s){var l=pi.properties[a]||pi.properties[dp(a)];null!=l&&this[t].properties.push({name:l.name,value:s})}}return this},Al.style=Al.css,Al.generateStyle=function(r){var e=new pi(r);return this.appendToStyle(e)},Al.appendToStyle=function(r){for(var e=0;e<this.length;e++){var t=this[e],i=t.properties;r.selector(t.selector);for(var o=0;o<i.length;o++){var a=i[o];r.css(a.name,a.value)}}return r};var Rs=function(e){return void 0===e&&(e={}),Ur(e)?new td(e):sr(e)?xE.apply(xE,arguments):void 0};Rs.use=function(r){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Rs),r.apply(null,e),this},Rs.warnings=function(r){return $S(r)},Rs.version="3.33.1",Rs.stylesheet=Rs.Stylesheet=hg;var L6=oe(5970);const M6=["graphContainer"],F6=(r,e)=>e.key,PD=(r,e)=>e.id;function V6(r,e){if(1&r&&(le.j41(0,"div",5)(1,"span",6),le.EFF(2),le.k0s(),le.j41(3,"span",7),le.EFF(4),le.k0s()()),2&r){const t=e.$implicit;le.R7$(2),le.JRh(t.key),le.R7$(2),le.JRh(t.value)}}function B6(r,e){if(1&r&&(le.j41(0,"div",4),le.Z7z(1,V6,5,2,"div",5,F6),le.k0s()),2&r){const t=e;le.xc7("left",t.x,"px")("top",t.y,"px"),le.R7$(),le.Dyx(t.entries)}}function U6(r,e){if(1&r){const t=le.RV6();le.j41(0,"button",10),le.bIt("mousedown",function(i){return i.stopPropagation()})("click",function(){const i=b.eBV(t).$implicit,o=le.XpG(2);return b.Njj(o._onContextMenuAction(i.id))}),le.EFF(1),le.k0s()}if(2&r){const t=e.$implicit;le.R7$(),le.SpI(" ",t.label," ")}}function z6(r,e){if(1&r&&(le.j41(0,"div",8),le.Z7z(1,U6,2,1,"button",9,PD),le.k0s()),2&r){const t=le.XpG();le.xc7("left",t.contextMenuPos().x,"px")("top",t.contextMenuPos().y,"px"),le.R7$(),le.Dyx(t.contextMenuItems())}}function G6(r,e){if(1&r){const t=le.RV6();le.j41(0,"button",10),le.bIt("mousedown",function(i){return i.stopPropagation()})("click",function(){const i=b.eBV(t).$implicit,o=le.XpG(2);return b.Njj(o._onEdgeContextMenuAction(i.id))}),le.EFF(1),le.k0s()}if(2&r){const t=e.$implicit;le.R7$(),le.SpI(" ",t.label," ")}}function q6(r,e){if(1&r&&(le.j41(0,"div",8),le.Z7z(1,G6,2,1,"button",9,PD),le.k0s()),2&r){const t=le.XpG();le.xc7("left",t.edgeContextMenuPos().x,"px")("top",t.edgeContextMenuPos().y,"px"),le.R7$(),le.Dyx(t.edgeContextMenuItems())}}try{Rs.use(i4())}catch{}let AE=(()=>{class r{elements=F.hFB.required();animate=(0,F.hFB)(!1);stopAnimationAfterFirstNodeHover=(0,F.hFB)(!0);layout=(0,F.hFB)("cose-bilkent");highlightNeighborsOnHover=(0,F.hFB)(!0);userZoomingEnabled=(0,F.hFB)(!0);userPanningEnabled=(0,F.hFB)(!0);appendHTMLLabels=(0,F.hFB)(!0);directed=(0,F.hFB)(!0);labelPropsSettings=(0,F.hFB)(new Ph);contextMenuItems=(0,F.hFB)([]);edgeContextMenuItems=(0,F.hFB)([]);nodeHover=(0,F.CGW)();nodeClick=(0,F.CGW)();canvasClick=(0,F.CGW)();contextMenuAction=(0,F.CGW)();edgeContextMenuAction=(0,F.CGW)();_cy=(0,b.vPA)(void 0);_container=(0,b.vPA)(void 0);_animate;_positionCache=new Map;hoverNodeOverlay=(0,b.vPA)(null);contextMenuVisible=(0,b.vPA)(!1);contextMenuPos=(0,b.vPA)({x:0,y:0});_contextMenuNode=null;edgeContextMenuVisible=(0,b.vPA)(!1);edgeContextMenuPos=(0,b.vPA)({x:0,y:0});_edgeContextMenuLabel="";_edgeContextMenuEdge={source:"",target:""};graphContainer;handleElements=(0,b.QZP)(()=>{const t=this.elements();if(void 0===this._container())return;const n=this._cy();n?this._patch(n,t):this._build(),this._setupClickHoverEvents()});handleAnimate=(0,b.QZP)(()=>{const t=this._cy();void 0!==t&&(this.animate()?this._setAnimation(t):this._stopAnimation())});handleHTMLLabels=(0,b.QZP)(()=>{const t=this._cy(),n=this._container();if(void 0===t||void 0===n)return;const i=this.labelPropsSettings(),o=new Ph;o.boxLabels={...i.boxLabels},o.props={display:!1,displayOnlyOnHover:i.props.displayOnlyOnHover},uS(t,n,o)});_bodyObserver;_resizeDebounce;_startBodyObserver(){this._bodyObserver=new MutationObserver(()=>{this._reapplyStyles()}),this._bodyObserver.observe(document.body,{attributes:!0,attributeFilter:["class"]})}_reapplyStyles(){const t=this._cy(),n=this._container();if(!t||!n)return;const i=this._resolveParentBg(n),o={...up,directed:this.directed(),backgroundColor:i};t.style(cS(o)).update()}_resolveParentBg(t){let n=t.parentElement;for(;n;){const i=window.getComputedStyle(n).backgroundColor;if(i&&"rgba(0, 0, 0, 0)"!==i&&"transparent"!==i)return i;n=n.parentElement}return"#ffffff"}ngAfterViewInit(){const t=this.graphContainer.nativeElement;void 0!==t&&this._container.update(()=>t)}ngOnDestroy(){this._bodyObserver?.disconnect(),clearTimeout(this._resizeDebounce),this._cy()?.destroy()}onResize(){const t=this._cy();t&&(t.resize(),clearTimeout(this._resizeDebounce),this._resizeDebounce=setTimeout(()=>{t.resize(),this._nodesHavePosition()||t.fit(void 0,60),t.center()},250))}_setAnimation(t){this._stopAnimation(),this._animate=new r4(t,this.stopAnimationAfterFirstNodeHover(),1e-4,.02)}_stopAnimation(){this._animate?.stop()}_patch(t,n){const i=new Set(n.nodes.map(m=>m.data.id)),o=new Set(n.edges.map(m=>m.data.id??""));t.nodes().filter(m=>!i.has(m.id())).forEach(m=>{this._positionCache.set(m.id(),{...m.position()})}),t.remove(t.nodes().filter(m=>!i.has(m.id()))),t.remove(t.edges().filter(m=>!o.has(m.id())));const a=new Set(t.nodes().map(m=>m.id())),s=new Set(t.edges().map(m=>m.id()));for(const m of n.nodes)if(a.has(m.data.id)){const _=t.getElementById(m.data.id);_.data(m.data),_.classes(m.classes??"")}const l=n.nodes.filter(m=>!a.has(m.data.id)),u=n.edges.filter(m=>!s.has(m.data.id??""));if(0===l.length&&0===u.length)return;t.nodes().lock();const c=new Set(l.map(m=>m.data.id)),h=t.nodes();t.add([...l.map(m=>({group:"nodes",data:m.data,classes:m.classes??""})),...u.map(m=>({group:"edges",data:m.data,classes:m.classes??""}))]);const d=new Map;for(const m of u){const _=c.has(m.data.source),I=c.has(m.data.target??"");if(_&&!I){const U=t.getElementById(m.data.target??"");U.length>0&&!d.has(m.data.source)&&d.set(m.data.source,{...U.position()})}if(I&&!_){const U=t.getElementById(m.data.source);U.length>0&&!d.has(m.data.target)&&d.set(m.data.target,{...U.position()})}}const p=[];let g=0;if(t.nodes().filter(m=>c.has(m.id())).forEach(m=>{const _=this._positionCache.get(m.id());if(_)m.position(_),m.lock(),this._positionCache.delete(m.id());else{const I=d.get(m.id());if(I){const U=g++*(2*Math.PI/Math.max(l.length,1)),ne=100+60*Math.random();m.position({x:I.x+ne*Math.cos(U),y:I.y+ne*Math.sin(U)})}else p.push(m)}}),p.length>0&&h.length>0){const m=h.boundingBox({}),_=(m.x1+m.x2)/2,I=(m.y1+m.y2)/2,U=Math.max(m.x2-m.x1,m.y2-m.y1)/2+180,ne=2*Math.PI/Math.max(p.length,1);p.forEach((re,A)=>{re.position({x:_+U*Math.cos(ne*A),y:I+U*Math.sin(ne*A)})})}const y=this._container();if(y&&this.appendHTMLLabels()){const m=new Ph,_=this.labelPropsSettings();m.boxLabels={..._.boxLabels},m.props={display:!1,displayOnlyOnHover:_.props.displayOnlyOnHover},uS(t,y,m)}const v=t.layout({...this._layoutOptions(),randomize:!1,fit:!1,animate:!0});v.on("layoutstop",()=>t.nodes().unlock()),v.run()}_build(){this._bodyObserver?.disconnect(),this._bodyObserver=void 0;const t=this._container(),n=t?this._resolveParentBg(t):up.backgroundColor,i={...up,directed:this.directed(),backgroundColor:n},o=cS(i),a=this._nodesHavePosition()?{name:"preset",padding:100,animate:!1}:{...this._layoutOptions(),padding:80,animate:!1},s=Rs({container:this._container(),style:o,layout:a,elements:this.elements(),userZoomingEnabled:this.userZoomingEnabled(),userPanningEnabled:this.userPanningEnabled(),minZoom:.2,maxZoom:3});s.one("layoutstop",()=>{s.resize(),this._nodesHavePosition()||s.fit(void 0,60),s.center()}),this._cy.update(()=>s),this._startBodyObserver()}_setupClickHoverEvents(){const t=this._cy();if(null==t)return;let n=t.collection();t.nodes().unbind("tapstart"),t.nodes().bind("tapstart",i=>{const o=i.target.data();!o.isCollapser&&!o.isChainExpander&&this.contextMenuItems().length>0&&(i.originalEvent?.preventDefault(),i.originalEvent?.stopPropagation())}),t.nodes().unbind("click"),t.nodes().bind("click",i=>{const o=i.target,a=o.data();if(a.isCollapser||a.isChainExpander)return this.contextMenuVisible.set(!1),this.nodeClick.emit(a),void(n=n.union(o));if(this.contextMenuItems().length>0){const s=o.renderedPosition();return this._contextMenuNode=a,this.contextMenuPos.set({x:s.x,y:s.y}),void this.contextMenuVisible.set(!0)}this.nodeClick.emit(a),n=n.union(o)}),t.nodes().unbind("mouseover"),t.nodes().bind("mouseover",i=>{this._dimAllButNeighbors(i.target);const o=i.target.data();this.nodeHover.emit(o);const a=o.properties;if(this.labelPropsSettings().props.display&&a){const s=Object.entries(a).map(([l,u])=>({key:l,value:String(u)}));if(s.length>0){const l=i.target.renderedBoundingBox();this.hoverNodeOverlay.set({x:(l.x1+l.x2)/2,y:l.y2,entries:s})}}}),t.nodes().unbind("mouseout"),t.nodes().bind("mouseout",()=>{this._unDimAll(),this.nodeHover.emit(void 0),this.hoverNodeOverlay.set(null)}),t.nodes().unbind("drag"),t.nodes().bind("drag",i=>{if(null===this.hoverNodeOverlay())return;const o=i.target.renderedBoundingBox(),a=this.hoverNodeOverlay();this.hoverNodeOverlay.set({...a,x:(o.x1+o.x2)/2,y:o.y2})}),t.nodes().unbind("dragfree"),t.nodes().bind("dragfree",()=>{this.hoverNodeOverlay.set(null)}),t.edges().unbind("mouseover"),t.edges().bind("mouseover",i=>{i.target.addClass("edge-hover")}),t.edges().unbind("mouseout"),t.edges().bind("mouseout",i=>{i.target.removeClass("edge-hover")}),t.edges().unbind("tap"),t.edges().bind("tap",i=>{if(!this.edgeContextMenuItems().length)return;const o=i.target,a=o.renderedMidpoint();this._edgeContextMenuLabel=o.data("label")??"",this._edgeContextMenuEdge={id:o.data("id"),iri:o.data("iri"),label:o.data("label"),source:o.data("source"),target:o.data("target"),color:o.data("color"),width:o.data("width")},this.edgeContextMenuPos.set({x:a.x,y:a.y}),this.edgeContextMenuVisible.set(!0),this.contextMenuVisible.set(!1)}),t.off("click"),t.on("click",i=>{0===Object.keys(i.target.data()).length&&(this.contextMenuVisible.set(!1),this.edgeContextMenuVisible.set(!1),this.canvasClick.emit())}),t.off("viewport"),t.on("viewport",()=>{this.contextMenuVisible.set(!1),this.edgeContextMenuVisible.set(!1)})}_onContextMenuAction(t){this.contextMenuVisible.set(!1),this._contextMenuNode&&this.contextMenuAction.emit({actionId:t,node:this._contextMenuNode})}_onEdgeContextMenuAction(t){this.edgeContextMenuVisible.set(!1),this.edgeContextMenuAction.emit({actionId:t,edgeLabel:this._edgeContextMenuLabel,edge:this._edgeContextMenuEdge})}_layoutOptions(){const t=this.layout();if("cose-bilkent"!==t)return{name:t};const n=this.elements().nodes,i=this.elements().edges,o=n.length>0?2*i.length/n.length:1,a=n.map(y=>{const _=[y.data.label||"",...y.data.boxLabels||[]].filter(Boolean);return Math.max(..._.map(I=>I.length),0)}),s=a.length>0?a.reduce((y,v)=>y+v,0)/a.length:0,l=a.length>0?Math.max(...a):0,c=1.5*s,h=.8*Math.max(0,l-20),d=7.2*o;return{name:"cose-bilkent",nodeDimensionsIncludeLabels:!0,randomize:!0,nodeRepulsion:Math.round(4500+500*o),idealEdgeLength:Math.round(48+c+h+d),edgeElasticity:.45,gravity:.25,gravityRange:3.8,numIter:2500}}_nodesHavePosition(){return void 0!==this.elements().nodes.find(n=>void 0!==n.position)}fitTo(t,n=80){const i=this._cy();if(!i||0===t.length)return;let o=i.collection();for(const a of t){const s=i.getElementById(a);s.length>0&&(o=o.union(s))}0!==o.length&&i.animate({fit:{eles:o,padding:n},duration:400,easing:"ease-in-out-cubic"})}_unDimAll(){const t=this._cy();t?.elements().forEach(n=>{n.removeClass("faded")})}_dimAllButNeighbors(t){const n=this._cy();if(null==n)return;const i=t.neighborhood().map(o=>o.id());n.elements().forEach(o=>{i.includes(o.id())||o.id()===t.id()?o.removeClass("faded"):o.addClass("faded")})}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=le.VBU({type:r,selectors:[["cue-simple-graph"]],viewQuery:function(n,i){if(1&n&&le.GBs(M6,5),2&n){let o;le.mGM(o=le.lsd())&&(i.graphContainer=o.first)}},inputs:{elements:[1,"elements"],animate:[1,"animate"],stopAnimationAfterFirstNodeHover:[1,"stopAnimationAfterFirstNodeHover"],layout:[1,"layout"],highlightNeighborsOnHover:[1,"highlightNeighborsOnHover"],userZoomingEnabled:[1,"userZoomingEnabled"],userPanningEnabled:[1,"userPanningEnabled"],appendHTMLLabels:[1,"appendHTMLLabels"],directed:[1,"directed"],labelPropsSettings:[1,"labelPropsSettings"],contextMenuItems:[1,"contextMenuItems"],edgeContextMenuItems:[1,"edgeContextMenuItems"]},outputs:{nodeHover:"nodeHover",nodeClick:"nodeClick",canvasClick:"canvasClick",contextMenuAction:"contextMenuAction",edgeContextMenuAction:"edgeContextMenuAction"},decls:5,vars:3,consts:[["graphContainer",""],["id","graph","cueResized","",3,"resized"],[1,"node-props-overlay",3,"left","top"],[1,"cy-context-menu",3,"left","top"],[1,"node-props-overlay"],[1,"prop-row"],[1,"prop-key"],[1,"prop-value"],[1,"cy-context-menu"],[1,"cy-context-item"],[1,"cy-context-item",3,"mousedown","click"]],template:function(n,i){if(1&n&&(le.j41(0,"div",1,0),le.bIt("resized",function(){return i.onResize()}),le.nVh(2,B6,3,4,"div",2),le.nVh(3,z6,3,4,"div",3),le.nVh(4,q6,3,4,"div",3),le.k0s()),2&n){let o;le.R7$(2),le.vxM((o=i.hoverNodeOverlay())?2:-1,o),le.R7$(),le.vxM(i.contextMenuVisible()&&i.contextMenuItems().length>0?3:-1),le.R7$(),le.vxM(i.edgeContextMenuVisible()&&i.edgeContextMenuItems().length>0?4:-1)}},dependencies:[L6.C],styles:["[_nghost-%COMP%]{display:contents}#graph[_ngcontent-%COMP%]{display:block!important;text-align:left!important;margin:0!important;min-height:100px;flex:1 1;width:100%;position:relative;overflow:hidden} .box-label{position:absolute;pointer-events:none;display:flex;flex-direction:column;align-items:flex-start;gap:4px}.node-props-overlay[_ngcontent-%COMP%]{position:absolute;transform:translate(-50%,8px);z-index:20;pointer-events:none;background:var(--cue-menu-background-color);color:var(--cue-menu-foreground-color);border:1px solid var(--cue-menu-border-color);border-radius:var(--cue-menu-border-radius);box-shadow:var(--cue-menu-box-shadow);padding:var(--cue-menu-padding-y) var(--cue-menu-padding-x);display:flex;flex-direction:column;gap:8px;min-width:140px;max-width:260px}.prop-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.prop-key[_ngcontent-%COMP%]{font-family:Poppins,sans-serif;font-size:.6rem;font-weight:600;color:var(--cue-neutral);text-transform:uppercase;letter-spacing:.05em}.prop-value[_ngcontent-%COMP%]{font-family:Poppins,sans-serif;font-size:.72rem;color:var(--cue-menu-foreground-color);overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.cy-context-menu[_ngcontent-%COMP%]{position:absolute;z-index:30;background:var(--cue-menu-background-color);color:var(--cue-menu-foreground-color);border:1px solid var(--cue-menu-border-color);border-radius:var(--cue-menu-border-radius);box-shadow:var(--cue-menu-box-shadow);padding:4px 0;min-width:160px;display:flex;flex-direction:column}.cy-context-item[_ngcontent-%COMP%]{background:none;border:none;padding:8px 16px;text-align:left;font-family:Poppins,sans-serif;font-size:.8rem;color:var(--cue-menu-foreground-color);cursor:pointer}.cy-context-item[_ngcontent-%COMP%]:hover{background:var(--cue-menu-hover-color, rgba(0, 0, 0, .06))}"],changeDetection:0})}return r})();const kD=["#2859e1","#4caf50","#fc2626","#f59e0b","#8b5cf6","#06b6d4","#f97316","#14b8a6","#ec4899","#6366f1"],LD="__collapser__",RE="__chain__";var K6=oe(9134);function X6(r,e){if(1&r){const t=le.RV6();le.j41(0,"cue-simple-graph",4),le.bIt("nodeHover",function(i){b.eBV(t);const o=le.XpG();return b.Njj(o._onNodeHover(i))})("nodeClick",function(i){b.eBV(t);const o=le.XpG();return b.Njj(o._onNodeClick(i))})("canvasClick",function(){b.eBV(t);const i=le.XpG();return b.Njj(i._onCanvasClick())})("contextMenuAction",function(i){b.eBV(t);const o=le.XpG();return b.Njj(o._onContextMenuAction(i))})("edgeContextMenuAction",function(i){b.eBV(t);const o=le.XpG();return b.Njj(o._onEdgeContextMenuAction(i))}),le.k0s()}if(2&r){const t=le.XpG();le.Y8G("elements",e)("labelPropsSettings",t.labelPropsSettings())("contextMenuItems",t._nodeMenuItems())("edgeContextMenuItems",t._edgeMenuItems())}}function Y6(r,e){1&r&&le.EFF(0," No elements ")}function Q6(r,e){if(1&r){const t=le.RV6();le.j41(0,"cue-color-legend-panel",5),le.nI1(1,"transloco"),le.bIt("close",function(){b.eBV(t);const i=le.XpG();return b.Njj(i._legendClosed.set(!0))})("layerChange",function(i){b.eBV(t);const o=le.XpG();return b.Njj(o._onCategoryLayerChange(i))})("visibilityAll",function(i){b.eBV(t);const o=le.XpG();return b.Njj(o._onCategoryVisibilityAll(i))}),le.k0s()}if(2&r){const t=le.XpG();le.Y8G("title",le.bMT(1,2,"components.graph.rdf.legendCategories"))("layers",t._categoryLayers())}}function J6(r,e){if(1&r){const t=le.RV6();le.j41(0,"cue-color-legend-panel",6),le.nI1(1,"transloco"),le.bIt("close",function(){b.eBV(t);const i=le.XpG();return b.Njj(i._predicateLegendClosed.set(!0))})("layerChange",function(i){b.eBV(t);const o=le.XpG();return b.Njj(o._onPredicateLayerChange(i))})("visibilityAll",function(i){b.eBV(t);const o=le.XpG();return b.Njj(o._onPredicateVisibilityAll(i))}),le.k0s()}if(2&r){const t=le.XpG();le.Y8G("title",le.bMT(1,3,"components.graph.rdf.legendRelationships"))("layers",t._predicateLayers())("position",t.legendPosition())}}let Z6=(()=>{class r{_graph=(0,F.ebz)(AE);doc=(0,F.hFB)();collapseClasses=(0,F.hFB)(!0);collapseAttributes=(0,F.hFB)(!0);collapseRelationships=(0,F.hFB)(!0);classPredicates=(0,F.hFB)([]);focusNodes=(0,F.hFB)([]);focusNodeColor=(0,F.hFB)("red");zoomToFocusNodes=(0,F.hFB)(!1);colorByCategory=(0,F.hFB)(!1);showRelationshipLegend=(0,F.hFB)(!1);legendPosition=(0,F.hFB)("top-left");categoryLabelsOnHover=(0,F.hFB)(!0);nodeMenuItems=(0,F.hFB)(void 0);edgeMenuItems=(0,F.hFB)(void 0);nodeHover=(0,F.CGW)();nodeClick=(0,F.CGW)();canvasClick=(0,F.CGW)();_fullElements=null;_collapserGroups=[];_chainGroups=[];_focusedNodeId=void 0;_hiddenPredicates=new Set;_categoryColors=new Map;_labelFocusOnNeighbours=(0,ea.Xx)("components.graph.rdf.labelFocusOnNeighbours");_labelUnhideEdges=(0,ea.Xx)("components.graph.rdf.labelUnhideEdges");_labelHideEdgeType=(0,ea.Xx)("components.graph.rdf.labelHideEdgeType");_labelCollapseRelationship=(0,ea.Xx)("components.graph.rdf.labelCollapseRelationship");_hoveredNode=(0,b.vPA)(null);_nodeMenuItems=(0,k.EW)(()=>{const t=this.nodeMenuItems();if(void 0!==t)return t;const n=this._hoveredNode()?.id,i=!!n&&this._collapserGroups.some(o=>o.allTargetNodeIds.includes(n));return[{id:"focus",label:this._labelFocusOnNeighbours()},{id:"unhide-edges",label:this._labelUnhideEdges()},...i?[{id:"collapse-relationship",label:this._labelCollapseRelationship()}]:[]]});_edgeMenuItems=(0,k.EW)(()=>{const t=this.edgeMenuItems();return void 0!==t?t:[{id:"hide-edge-type",label:this._labelHideEdgeType()}]});elements=(0,b.vPA)(void 0);_categoryLayers=(0,b.vPA)([]);_legendClosed=(0,b.vPA)(!1);_predicateLayers=(0,b.vPA)([]);_predicateLegendClosed=(0,b.vPA)(!1);onDoc=(0,b.QZP)((()=>{var t=this;return(0,O.A)(function*(){const n=t.doc();if(void 0===n)return;const i=new aS;i.hideClassAssignmentTriples=t.collapseClasses(),i.hideDatatypePropertyTriples=t.collapseAttributes(),i.collapseIntoClassificationLabels=t.classPredicates();const a=yield new e4(n,i).init();t._fullElements=a,t._collapserGroups=t.collapseRelationships()?function H6(r){const e=new Map,t=new Map;for(const o of r.edges)o.data.target&&e.set(o.data.target,(e.get(o.data.target)??0)+1),o.data.source&&t.set(o.data.source,(t.get(o.data.source)??0)+1);const n=new Map;for(const o of r.edges){const a=`${o.data.source}\0${o.data.label}`;n.has(a)||n.set(a,[]),n.get(a).push(o)}const i=[];for(const[o,a]of n){if(a.length<4)continue;const s=o.indexOf("\0"),l=o.slice(0,s),u=o.slice(s+1),c=a.map(h=>h.data.target).filter(h=>h&&1===(e.get(h)??0)&&0===(t.get(h)??0));c.length<4||i.push({id:`${LD}${l}\0${u}`,sourceId:l,predicateLabel:u,allTargetNodeIds:c,visibleCount:0})}return i}(a):[],t._chainGroups=function $6(r){const e=new Map,t=new Map;for(const u of r.nodes)e.set(u.data.id,[]),t.set(u.data.id,[]);for(const u of r.edges)e.get(u.data.source)?.push(u),u.data.target&&t.get(u.data.target)?.push(u);const n=new Map,i=(u,c=new Set)=>{if(n.has(u))return n.get(u);if(c.has(u))return 0;c.add(u);const p=1+(e.get(u)??[]).reduce((g,y)=>Math.max(g,y.data.target?i(y.data.target,c):0),0);return n.set(u,p),p};for(const u of r.nodes)i(u.data.id);const o=new Set,a=[...r.nodes].sort((u,c)=>(n.get(c.data.id)??0)-(n.get(u.data.id)??0));for(const u of a){if(o.size>=20)break;let c=u.data.id;for(;c&&!o.has(c)&&o.size<20;)o.add(c),c=(e.get(c)??[]).filter(d=>d.data.target&&!o.has(d.data.target)).sort((d,p)=>(n.get(p.data.target)??0)-(n.get(d.data.target)??0))[0]?.data.target}const s=new Set(r.nodes.map(u=>u.data.id).filter(u=>!o.has(u)));if(0===s.size)return[];const l=new Map;for(const u of o)for(const c of e.get(u)??[]){if(!c.data.target||!s.has(c.data.target))continue;const h=`${u}\0${c.data.label??""}`;l.has(h)||l.set(h,{id:`${RE}${u}\0${c.data.label??""}`,sourceId:u,predicateLabel:c.data.label??"",hiddenNodeIds:[],visibleCount:0});const d=l.get(h);let p=c.data.target;for(;p&&s.has(p)&&!d.hiddenNodeIds.includes(p);)d.hiddenNodeIds.push(p),s.delete(p),p=(e.get(p)??[]).filter(y=>y.data.target&&s.has(y.data.target)).sort((y,v)=>(n.get(v.data.target)??0)-(n.get(y.data.target)??0))[0]?.data.target}return s.size>0&&l.set("__orphan__",{id:`${RE}__orphan__`,sourceId:a[0]?.data.id??"",predicateLabel:"",hiddenNodeIds:[...s],visibleCount:0}),[...l.values()].filter(u=>u.hiddenNodeIds.length>0)}(a),t._categoryLayers.set(t._buildCategoryLayers(a)),t._predicateLayers.set(t._buildPredicateLayers(a)),t._legendClosed.set(!1),t._predicateLegendClosed.set(!1),t.elements.set(t._display());const s=t.focusNodes();s.length>0&&t.zoomToFocusNodes()&&setTimeout(()=>t._graph()?.fitTo(s),450)})})());focusEffect=(0,b.QZP)(()=>{const t=this.focusNodes();this._fullElements&&(this.elements.set(this._display()),t.length>0&&this.zoomToFocusNodes()&&setTimeout(()=>this._graph()?.fitTo(t),200))});triggerResize(){const t=this._graph();if(t){const n=t._cy();n.resize(),setTimeout(()=>{const i=n.container(),o=i?.offsetWidth||0,a=i?.offsetHeight||0;if(o>=100&&a>=100){n.resize();const s=n.elements();if(s.length>0){const l=s.nodes();if(!(l.length>0&&l.every(q=>{const z=q.position();return 0!==z.x||0!==z.y}))){const q=this._graph();return void(q&&q._build?.())}const c=Math.min(o,a),h=Math.min(Math.max(.15*c,40),120),d=s.boundingBox(),I=Math.min((o-2*h)/(d.w||1),(a-2*h)/(d.h||1)),U=s.nodes().length,ne=s.edges().length,re=U>0?2*ne/U:1;let A=2.5;re>10?A=1:re>6?A=1.5:re>3&&(A=2);const M=Math.min(Math.max(I,.2),A);n.animate(M!==I?{zoom:M,center:{eles:s},duration:300}:{fit:{eles:s,padding:h},duration:300})}}else console.warn("\u{1f3af} RDFGraph: container too small or invalid dimensions, skipping fit")},150)}}colorByCategoryEffect=(0,b.QZP)(()=>{this.colorByCategory()&&this._legendClosed.set(!1),this._fullElements&&this.elements.set(this._display())});showRelationshipLegendEffect=(0,b.QZP)(()=>{this.showRelationshipLegend()&&this._predicateLegendClosed.set(!1)});labelPropsSettings=(0,k.EW)(()=>{const t=new Ph;return t.boxLabels.display=this.collapseClasses(),t.props.display=this.collapseAttributes(),t.boxLabels.displayOnlyOnHover=this.colorByCategory()||this.categoryLabelsOnHover(),t});_onNodeHover(t){t&&this._hoveredNode.set(t),this.nodeHover.emit(t)}_onNodeClick(t){const n=t;if(n.isCollapser&&n.collapserGroupId){const i=this._collapserGroups.find(o=>o.id===n.collapserGroupId);if(i)return i.visibleCount=n.isExpanded?0:Math.min(i.visibleCount+5,i.allTargetNodeIds.length),void this.elements.set(this._display())}if(n.isChainExpander&&n.chainGroupId){const i=this._chainGroups.find(o=>o.id===n.chainGroupId);if(i)return i.visibleCount=n.isExpanded?0:Math.min(i.visibleCount+5,i.hiddenNodeIds.length),void this.elements.set(this._display())}this.nodeClick.emit(t)}_onCanvasClick(){this.canvasClick.emit(),this._focusedNodeId&&(this._focusedNodeId=void 0,this.elements.set(this._display()))}_onContextMenuAction(t){const n=this.nodeMenuItems();if(void 0===n){if("focus"===t.actionId){const i=t.node.id;this._focusedNodeId=this._focusedNodeId===i?void 0:i,this.elements.set(this._display())}else if("unhide-edges"===t.actionId)this._hiddenPredicates.clear(),this._predicateLayers.update(i=>i.map(o=>({...o,visible:!0}))),this.elements.set(this._display());else if("collapse-relationship"===t.actionId){const i=t.node.id;for(const o of this._collapserGroups)o.allTargetNodeIds.includes(i)&&(o.visibleCount=0);this.elements.set(this._display())}}else n.find(i=>i.id===t.actionId)?.action(t.node)}_onEdgeContextMenuAction(t){const n=this.edgeMenuItems();void 0===n?"hide-edge-type"===t.actionId&&(this._hiddenPredicates.add(t.edgeLabel),this.elements.set(this._display())):n.find(i=>i.id===t.actionId)?.action(t.edge)}_onCategoryLayerChange(t){this._categoryLayers.update(n=>[...n]),this.elements.set(this._display())}_onCategoryVisibilityAll(t){this._categoryLayers.update(n=>[...n]),this.elements.set(this._display())}_onPredicateLayerChange(t){this._predicateLayers.update(n=>[...n]),this.elements.set(this._display())}_onPredicateVisibilityAll(t){this._predicateLayers.update(n=>[...n]),this.elements.set(this._display())}static _PREDICATE_COLOR="#4a90d9";_buildPredicateLayers(t){const n=new Set,i=[];for(const o of t.edges){const a=o.data.label??"";a&&!n.has(a)&&(n.add(a),i.push(a))}return i.map(o=>({label:o,color:r._PREDICATE_COLOR,visible:!0}))}_buildCategoryLayers(t){const n=new Set,i=[];for(const o of t.nodes){if(o.data.id.startsWith(LD)||o.data.id.startsWith(RE))continue;const a=o.data.boxLabels?.[0];a&&!n.has(a)&&(n.add(a),i.push(a))}return this._categoryColors=function j6(r){const e=new Map;return r.forEach((t,n)=>{e.set(t,kD[n%kD.length])}),e}(i),i.map(o=>({label:o,color:this._categoryColors.get(o),visible:!0}))}_display(){if(!this._fullElements)return{nodes:[],edges:[]};let t=function W6(r,e,t){const n=new Set,i=new Set,o=[],a=[];for(const l of t){const u=l.hiddenNodeIds.length-l.visibleCount;if(u<=0)continue;for(const d of l.hiddenNodeIds.slice(l.visibleCount))n.add(d);const c=l.visibleCount>0,h=c?l.hiddenNodeIds[l.visibleCount-1]:l.sourceId;o.push({data:{id:l.id,label:c?"\u2212":`+${u}`,size:28,isChainExpander:!0,isExpanded:c,chainGroupId:l.id},classes:c?"collapser collapser-expanded":"collapser"}),a.push({data:{id:`edge_${l.id}`,source:h,target:l.id,label:l.predicateLabel}})}for(const l of e){const u=l.allTargetNodeIds.length-l.visibleCount;if(u<=0)continue;for(const d of l.allTargetNodeIds.slice(l.visibleCount))n.add(d);const c=r.edges.filter(d=>d.data.source===l.sourceId&&d.data.label===l.predicateLabel&&l.allTargetNodeIds.includes(d.data.target));for(const d of c)i.add(d.data.id??"");for(const d of c)l.allTargetNodeIds.indexOf(d.data.target)<l.visibleCount&&a.push(d);const h=l.visibleCount>0;o.push({data:{id:l.id,label:h?"\u2212":`+${u}`,size:28,isCollapser:!0,isExpanded:h,collapserGroupId:l.id},classes:h?"collapser collapser-expanded":"collapser"}),a.push({data:{id:`edge_${l.id}`,source:l.sourceId,target:l.id,label:l.predicateLabel}})}const s=new Set(o.map(l=>l.data.id));return{nodes:[...r.nodes.filter(l=>!n.has(l.data.id)),...o],edges:[...r.edges.filter(l=>!(i.has(l.data.id??"")||n.has(l.data.source)||n.has(l.data.target??"")||s.has(l.data.source)||s.has(l.data.target??""))),...a]}}(this._fullElements,this._collapserGroups,this._chainGroups);const n=new Set(this._predicateLayers().filter(s=>!s.visible).map(s=>s.label)),i=new Set([...this._hiddenPredicates,...n]);if(i.size>0){const s=t.edges.filter(u=>!i.has(u.data.label??"")),l=new Set;for(const u of s)l.add(u.data.source),l.add(u.data.target);t={nodes:t.nodes.filter(u=>l.has(u.data.id)),edges:s}}if(this.colorByCategory()){const s=new Set(this._categoryLayers().filter(l=>!l.visible).map(l=>l.label));if(s.size>0){const l=new Map(this._fullElements.nodes.map(h=>[h.data.id,h.data.boxLabels?.[0]])),u=h=>{const d=l.get(h);return void 0!==d&&s.has(d)},c=new Set(t.nodes.filter(h=>{const d=h.data.boxLabels?.[0];return void 0!==d&&s.has(d)}).map(h=>h.data.id));for(const h of this._collapserGroups)h.allTargetNodeIds.every(u)&&c.add(h.id);for(const h of this._chainGroups){const d=h.hiddenNodeIds.slice(h.visibleCount);d.length>0&&d.every(u)&&c.add(h.id)}t={nodes:t.nodes.filter(h=>!c.has(h.data.id)),edges:t.edges.filter(h=>!c.has(h.data.source)&&!c.has(h.data.target))}}t={...t,nodes:t.nodes.map(l=>{const u=l.data.boxLabels?.[0],c=u?this._categoryColors.get(u):void 0;return c?{...l,data:{...l.data,color:c}}:l})}}this._focusedNodeId&&(t=this._applyFocus(t,this._focusedNodeId));const o=new Set(this.focusNodes()),a=this.focusNodeColor();return o.size>0&&(t={...t,nodes:t.nodes.map(s=>{if(!o.has(s.data.id))return s;const l=s.classes?s.classes.trim():"";return{...s,data:{...s.data,color:a},classes:l?`${l} focused`:"focused"}})}),t}_applyFocus(t,n){return{...t,nodes:t.nodes.map(i=>{if(i.data.id!==n)return i;const o=i.classes?i.classes.trim():"";return{...i,classes:o?`${o} focused`:"focused"}})}}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=le.VBU({type:r,selectors:[["cue-rdf-graph"]],viewQuery:function(n,i){1&n&&le.wEZ(i._graph,AE,5),2&n&&le.NyB()},inputs:{doc:[1,"doc"],collapseClasses:[1,"collapseClasses"],collapseAttributes:[1,"collapseAttributes"],collapseRelationships:[1,"collapseRelationships"],classPredicates:[1,"classPredicates"],focusNodes:[1,"focusNodes"],focusNodeColor:[1,"focusNodeColor"],zoomToFocusNodes:[1,"zoomToFocusNodes"],colorByCategory:[1,"colorByCategory"],showRelationshipLegend:[1,"showRelationshipLegend"],legendPosition:[1,"legendPosition"],categoryLabelsOnHover:[1,"categoryLabelsOnHover"],nodeMenuItems:[1,"nodeMenuItems"],edgeMenuItems:[1,"edgeMenuItems"]},outputs:{nodeHover:"nodeHover",nodeClick:"nodeClick",canvasClick:"canvasClick"},decls:5,vars:3,consts:[[2,"display","flex","flex-direction","column","position","relative","width","100%","flex","1","min-height","0"],[3,"elements","labelPropsSettings","contextMenuItems","edgeContextMenuItems"],["position","top-right",3,"title","layers"],[3,"title","layers","position"],[3,"nodeHover","nodeClick","canvasClick","contextMenuAction","edgeContextMenuAction","elements","labelPropsSettings","contextMenuItems","edgeContextMenuItems"],["position","top-right",3,"close","layerChange","visibilityAll","title","layers"],[3,"close","layerChange","visibilityAll","title","layers","position"]],template:function(n,i){if(1&n&&(le.j41(0,"div",0),le.nVh(1,X6,1,4,"cue-simple-graph",1)(2,Y6,1,0),le.nVh(3,Q6,2,4,"cue-color-legend-panel",2),le.nVh(4,J6,2,5,"cue-color-legend-panel",3),le.k0s()),2&n){let o;le.R7$(),le.vxM((o=i.elements())?1:2,o),le.R7$(2),le.vxM(i.colorByCategory()&&i._categoryLayers().length>0&&!i._legendClosed()?3:-1),le.R7$(),le.vxM(i.showRelationshipLegend()&&i._predicateLayers().length>0&&!i._predicateLegendClosed()?4:-1)}},dependencies:[AE,K6.v,ea.Kj],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return r})();var eH=oe(4284);function tH(r,e){if(1&r){const t=le.RV6();le.j41(0,"cue-rdf-graph",1),le.bIt("nodeHover",function(i){b.eBV(t);const o=le.XpG(2);return b.Njj(o.hoveredNode.set(i))}),le.k0s()}if(2&r){const t=le.XpG(),n=le.XpG();le.Y8G("doc",t)("collapseClasses",!0)("collapseAttributes",!0)("collapseRelationships",!0)("colorByCategory",!1)("categoryLabelsOnHover",!0)("showRelationshipLegend",!0)("legendPosition",n.legendPosition())("nodeMenuItems",n.nodeMenuItems())("focusNodes",n.focusNodes())("focusNodeColor",n.focusNodeColor())("zoomToFocusNodes",!1)}}function rH(r,e){if(1&r&&le.nVh(0,tH,1,12,"cue-rdf-graph",0),2&r){const t=le.XpG();le.vxM(t._containerReady()?0:-1)}}let nH=(()=>{class r{entity=F.hFB.required();availableEntityCategories=F.hFB.required();availableEntityRelationships=(0,F.hFB)([]);relationships=(0,F.hFB)(void 0);legendPosition=(0,F.hFB)("top-left");showOpenEntityMenuItem=(0,F.hFB)(!0);clickedOpenEntity=(0,F.CGW)();doc=(0,b.vPA)(void 0);_containerReady=(0,b.vPA)(!1);_hostElement=(0,b.WQX)(le.aKT);_resolvedEntityIRI=(0,k.EW)(()=>{const t=this.entity()?.iri;if(t){if(!t.includes("://"))throw new Error(`Expected a full IRI but got: ${t}`);return t}});focusNodes=(0,k.EW)(()=>{const t=this._resolvedEntityIRI();return t?[t]:[]});focusNodeColor=(0,b.vPA)("green");_document=(0,b.WQX)(b.qQL);hoveredNode=(0,b.vPA)(void 0);labelOpenEntity=(0,ea.Xx)("components.graph.entityGraph.labelOpenEntity");nodeMenuItems=(0,k.EW)(()=>{const t=[];return this.showOpenEntityMenuItem()&&this.hoveredNode()?.id!==this._resolvedEntityIRI()&&t.push({id:"open",label:this.labelOpenEntity(),action:n=>this.clickedOpenEntity.emit(n.id)}),t});constructor(){(0,le.mal)(()=>{const t=getComputedStyle(this._document.documentElement).getPropertyValue("--cue-color-green").trim();t&&this.focusNodeColor.set(t)}),(0,b.QZP)(()=>{const t=this.entity()?.iri,n=this.relationships();void 0===t||void 0===n||this._buildDoc(n)}),(0,le.mal)(()=>{if(this._containerReady())return;const t=this._hostElement.nativeElement,n=new ResizeObserver(i=>{if(this._containerReady())return void n.disconnect();const o=i[0]?.contentRect;o&&o.width>=100&&o.height>=100&&(this._containerReady.set(!0),n.disconnect())});return n.observe(t),()=>n.disconnect()})}ngAfterViewInit(){const t=this._hostElement.nativeElement;t.clientWidth>=100&&t.clientHeight>=100&&this._containerReady.set(!0)}_buildDoc(t){const{incoming:n,outgoing:i}=t,o={"@context":{qcy:`${ib.E.qcy}`,"qcy-e":`${ib.E["qcy-e"]}`,skos:`${eH.B.skos}`},"@graph":[]},a=this._resolvedEntityIRI(),s={"@id":a,"qcy:value":this.entity()?.value,"@type":this.entity()?.categories};o["@graph"].push(s),i.forEach(c=>{o["@graph"].push({"@id":c.nodeIRI,"qcy:value":c.nodeValue,"@type":c.nodeCategories}),o["@graph"].push({"@id":a,[c.relIRI]:{"@id":c.nodeIRI}})}),n.forEach(c=>{o["@graph"].push({"@id":c.nodeIRI,"qcy:value":c.nodeValue,"@type":c.nodeCategories}),o["@graph"].push({"@id":c.nodeIRI,[c.relIRI]:{"@id":a}})});const l=new Set;n.forEach(c=>c.nodeCategories.forEach(h=>l.add(h))),i.forEach(c=>c.nodeCategories.forEach(h=>l.add(h))),this.entity()?.categories.forEach(c=>l.add(c)),l.forEach(c=>{const h=this.availableEntityCategories().find(d=>d.iri===c)?.label;void 0!==h&&o["@graph"].push({"@id":c,"skos:prefLabel":h})}),new Set(n.map(c=>c.relIRI).concat(i.map(c=>c.relIRI))).forEach(c=>{const h=this.availableEntityRelationships().find(d=>d.iri===c)?.label;void 0!==h&&o["@graph"].push({"@id":c,"skos:prefLabel":h})}),this.doc.update(()=>o)}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=le.VBU({type:r,selectors:[["cue-entity-graph"]],inputs:{entity:[1,"entity"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],relationships:[1,"relationships"],legendPosition:[1,"legendPosition"],showOpenEntityMenuItem:[1,"showOpenEntityMenuItem"]},outputs:{clickedOpenEntity:"clickedOpenEntity"},decls:1,vars:1,consts:[[3,"doc","collapseClasses","collapseAttributes","collapseRelationships","colorByCategory","categoryLabelsOnHover","showRelationshipLegend","legendPosition","nodeMenuItems","focusNodes","focusNodeColor","zoomToFocusNodes"],[3,"nodeHover","doc","collapseClasses","collapseAttributes","collapseRelationships","colorByCategory","categoryLabelsOnHover","showRelationshipLegend","legendPosition","nodeMenuItems","focusNodes","focusNodeColor","zoomToFocusNodes"]],template:function(n,i){if(1&n&&le.nVh(0,rH,1,1),2&n){let o;le.vxM((o=i.doc())?0:-1,o)}},dependencies:[Z6],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:400px;min-width:100px}"]})}return r})();var iH=oe(8017),oH=oe(2306),aH=oe(6103),sH=oe(6455),lH=oe(8334),MD=oe(2245),uH=oe(7851);function cH(r,e){1&r&&(le.j41(0,"cue-typography",2),le.EFF(1),le.nI1(2,"transloco"),le.k0s()),2&r&&(le.R7$(),le.SpI(" ",le.bMT(2,1,"components.entityData.infoNoData")," "))}function hH(r,e){if(1&r&&(le.j41(0,"div",0),le.nVh(1,cH,3,3,"cue-typography",2),le.k0s()),2&r){le.XpG();const t=le.r8f(6);le.Y8G("cueLogoLoader",t),le.R7$(),le.vxM(t?-1:1)}}function dH(r,e){if(1&r){const t=le.RV6();le.j41(0,"cue-tab",3),le.nI1(1,"transloco"),le.j41(2,"cue-entity-graph",5),le.bIt("clickedOpenEntity",function(i){let o;b.eBV(t);const a=le.XpG(2);return a.clickedOpenEntity.emit(i),b.Njj(null==(o=a.handlers())||null==o.openEntity?null:o.openEntity(i))}),le.k0s()()}if(2&r){le.XpG();const t=le.r8f(1),n=le.XpG(),i=le.r8f(0);le.Y8G("label",le.bMT(1,5,"components.entityData.titleEntityGraph")),le.R7$(2),le.Y8G("entity",t)("availableEntityCategories",n.availableEntityCategories())("availableEntityRelationships",n.availableEntityRelationships())("relationships",i)}}function fH(r,e){if(1&r){const t=le.RV6();le.j41(0,"cue-tab",4),le.nI1(1,"transloco"),le.j41(2,"cue-doc-list",6),le.bIt("clickedDocument",function(i){b.eBV(t);const o=le.XpG(2);return b.Njj(o.clickedDocument.emit(i))}),le.k0s()()}if(2&r){const t=le.XpG(2);le.Y8G("label",le.bMT(1,4,"components.entityData.titleRelatedDocuments")),le.R7$(2),le.Y8G("documentRefs",t.documentRefs())("handlers",t.internalDocumentListHandlers())("documentData",t.documentData())}}function pH(r,e){if(1&r){const t=le.RV6();le.j41(0,"cue-tab",4),le.nI1(1,"transloco"),le.j41(2,"div",7)(3,"cue-map",8),le.bIt("clickedFeature",function(i){b.eBV(t);const o=le.XpG(2);return b.Njj(o.mapFeatureClicked.emit(i))}),le.k0s()()()}if(2&r){le.XpG(2);const t=le.r8f(3),n=le.r8f(4);le.Y8G("label",le.bMT(1,3,"components.entityData.titleMap")),le.R7$(3),le.Y8G("layers",t)("settings",n)}}function gH(r,e){if(1&r&&(le.j41(0,"cue-tabs",1),le.SS7(1),le.nVh(2,dH,3,7,"cue-tab",3),le.nVh(3,fH,3,6,"cue-tab",4),le.nVh(4,pH,4,5,"cue-tab",4),le.k0s()),2&r){const t=le.XpG(),n=le.r8f(1),i=le.r8f(2),o=le.r8f(5);le.R7$();const a=le.bH3(t.entity());le.R7$(),le.vxM(n&&a?2:-1),le.R7$(),le.vxM(i?3:-1),le.R7$(),le.vxM(o?4:-1)}}let mH=(()=>{class r{iri=F.hFB.required();availableEntityCategories=F.hFB.required();availableEntityRelationships=(0,F.hFB)([]);mapboxToken=F.hFB.required();handlers=(0,F.hFB)(void 0);clickedOpenEntity=(0,F.CGW)();clickedDocument=(0,F.CGW)();mapFeatureClicked=(0,F.CGW)();relationshipData=(0,F.hFB)(void 0);documentRefs=(0,F.hFB)([]);documentData=(0,F.hFB)({});entityDetailedData=(0,F.hFB)(void 0);_fetchedIRIs=new Set;_mapLayers=(0,b.vPA)([]);_isLoading=(0,b.vPA)(!1);mapSettings=(0,k.EW)(()=>{const t=this.mapboxToken();if(t)return{...new oH.yY,mapboxToken:t}});mapLayers=this._mapLayers.asReadonly();isEntityLoading=this._isLoading.asReadonly();entity=(0,k.EW)(()=>{const t=this.entityDetailedData();return t?{iri:this.iri(),value:t.value,categories:t.categories}:void 0});internalDocumentListHandlers=(0,k.EW)(()=>{const t=this.handlers();return{requestData:n=>{t?.requestDocumentData?.(n)},requestDownload:t?.downloadDocument,requestOpen:t?.openDocument,requestOpenInDir:t?.openDocumentInFileManager}});constructor(){(0,b.QZP)(()=>{const t=this.iri(),n=this.handlers();if(!t||!n||this._fetchedIRIs.has(t))return;this._fetchedIRIs.add(t),this._isLoading.set(!0),this._mapLayers.set([]),n.requestEntityLocations?.([t]);const i=n.requestRelationships?.(t);i?i.then(()=>this._isLoading.set(!1)).catch(()=>this._isLoading.set(!1)):this._isLoading.set(!1)}),(0,b.QZP)(()=>{const t=this.entityDetailedData();if(!t)return;const n=this.iri(),i=(0,aH.N)({entityData:{[n]:t},availableEntityRelationships:this.availableEntityRelationships()});this._mapLayers.set(i)})}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=le.VBU({type:r,selectors:[["cue-entity-data"]],inputs:{iri:[1,"iri"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],mapboxToken:[1,"mapboxToken"],handlers:[1,"handlers"],relationshipData:[1,"relationshipData"],documentRefs:[1,"documentRefs"],documentData:[1,"documentData"],entityDetailedData:[1,"entityDetailedData"]},outputs:{clickedOpenEntity:"clickedOpenEntity",clickedDocument:"clickedDocument",mapFeatureClicked:"mapFeatureClicked"},decls:9,vars:8,consts:[[2,"height","400px","width","100%","display","flex","align-items","center","justify-content","center","background","var(--cue-color-background-subtle, #f8f9fa)","border-radius","4px",3,"cueLogoLoader"],[2,"width","100%","flex","1","min-height","400px","height","100%"],[2,"text-align","center","color","var(--cue-color-text-muted, #6c757d)"],[2,"height","100%",3,"label"],[3,"label"],["legendPosition","top-right",2,"flex","1","min-height","400px","width","100%",3,"clickedOpenEntity","entity","availableEntityCategories","availableEntityRelationships","relationships"],[3,"clickedDocument","documentRefs","handlers","documentData"],[2,"display","flex","flex-direction","column","flex","1","min-height","400px","width","100%","position","relative"],[2,"width","100%",3,"clickedFeature","layers","settings"]],template:function(n,i){if(1&n&&(le.SS7(0)(1)(2)(3)(4)(5)(6),le.nVh(7,hH,2,2,"div",0)(8,gH,5,4,"cue-tabs",1)),2&n){const o=le.bH3(i.relationshipData());le.R7$();const a=le.bH3(o&&o.incoming.length+o.outgoing.length>0);le.R7$();const s=le.bH3(i.documentRefs().length>0);le.R7$();const l=le.bH3(i.mapLayers());le.R7$();const u=le.bH3(i.mapSettings());le.R7$();const c=le.bH3(void 0!==u&&l.length>0);le.R7$(),le.bH3(i.isEntityLoading()),le.R7$(),le.vxM(a||s||c?8:7)}},dependencies:[nH,QU.g,sH.t,lH.o,iH.T,MD.Typography,uH.k,ea.Kj],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return r})();var vH=oe(2403);function yH(r,e){if(1&r&&(le.j41(0,"cue-flexcontainer",4)(1,"cue-typography",5),le.EFF(2),le.k0s()()),2&r){const t=le.XpG(2);le.R7$(2),le.SpI(" ",t.errorMessage()," ")}}function wH(r,e){1&r&&(le.j41(0,"cue-flexcontainer",4)(1,"cue-typography",6),le.EFF(2," No project connected. "),le.k0s()())}function _H(r,e){1&r&&(le.j41(0,"cue-flexcontainer",4)(1,"cue-typography",6),le.EFF(2," No entity selected. "),le.k0s()())}function bH(r,e){if(1&r&&le.nrm(0,"cue-entity-info",7),2&r){le.XpG();const t=le.r8f(0),n=le.XpG(2);le.Y8G("entity",t)("entityCategoriesEditable",!1)("availableEntityCategories",n.availableEntityCategories())("collapsed",!1)("handlers",n._entityInfoHandlers)}}function EH(r,e){1&r&&(le.j41(0,"cue-typography",8),le.EFF(1),le.nI1(2,"transloco"),le.k0s()),2&r&&(le.Y8G("cuePulse",!0),le.R7$(),le.JRh(le.bMT(2,2,"common.infoLoading")))}function TH(r,e){if(1&r&&(le.SS7(0),le.nVh(1,bH,1,5,"cue-entity-info",7)(2,EH,3,4,"cue-typography",8),le.nrm(3,"div",9),le.j41(4,"div",10),le.nrm(5,"cue-entity-data",11),le.k0s()),2&r){const t=le.XpG(2),n=le.bH3(t._entity());le.R7$(),le.vxM(n?1:2),le.R7$(4),le.Y8G("iri",t._currentIri())("availableEntityCategories",t.availableEntityCategories())("availableEntityRelationships",t.availableEntityRelationships())("mapboxToken",t.mapboxToken()??"")("handlers",t._entityDataHandlers())("relationshipData",t.relationshipData())("documentRefs",t.documentRefs())("documentData",t.documentData())("entityDetailedData",t.entityData())}}function IH(r,e){if(1&r&&(le.j41(0,"div",3),le.nVh(1,yH,3,1,"cue-flexcontainer",4)(2,wH,3,0,"cue-flexcontainer",4)(3,_H,3,0,"cue-flexcontainer",4)(4,TH,6,11),le.k0s()),2&r){const t=le.XpG();le.R7$(),le.vxM("error"===t.state()?1:"idle"===t.state()?2:"no-entity"===t.state()?3:t._currentIri()?4:-1)}}function xH(r,e){if(1&r&&(le.j41(0,"cue-card",1),le.eu8(1,2),le.k0s()),2&r){const t=le.XpG(),n=le.sdS(1);le.Y8G("variant",t._cardVariant())("padded",!0),le.R7$(),le.Y8G("ngTemplateOutlet",n)}}function AH(r,e){if(1&r&&le.eu8(0,2),2&r){le.XpG();const t=le.sdS(1);le.Y8G("ngTemplateOutlet",t)}}function SE(r){return r.split("/").pop()}function RH(r){return{id:r.id,contentIRI:r.contentIRI??r.id,path:r.path??"",suffix:r.suffix??"",size:r.size??0,tags:r.tags??[],summary:r.summary??"",categories:r.categories??[],subject:r.subject,providerId:r.providerId,relevance:0}}let SH=(()=>{class r{cue=(0,F.hFB)(void 0);projectId=(0,F.hFB)(void 0);iri=(0,F.hFB)(void 0);mapboxToken=(0,F.hFB)(void 0);variant=(0,F.hFB)("none");_cardVariant=(0,k.EW)(()=>this.variant());openEntity=(0,F.CGW)();state=(0,b.vPA)("idle");errorMessage=(0,b.vPA)(null);availableEntityCategories=(0,b.vPA)([]);availableEntityRelationships=(0,b.vPA)([]);relationshipData=(0,b.vPA)(void 0);documentRefs=(0,b.vPA)([]);documentData=(0,b.vPA)({});entityData=(0,b.vPA)(void 0);_entities=(0,b.vPA)(void 0);_documents=(0,b.vPA)(void 0);_unsubscribeEntities;_unsubscribeDocuments;_unsubscribeSchema;_lastIri;_currentIri=(0,k.EW)(()=>this.iri());_entity=(0,k.EW)(()=>{const t=this.entityData();return t?{iri:this.iri(),value:t.value,categories:t.categories}:void 0});_entityInfoHandlers={};_entityDataHandlers=(0,k.EW)(()=>{var t=this;const n=this._entities(),i=this._documents();return{requestRelationships:(o=(0,O.A)(function*(a){yield Promise.all([n?.fetchEntityRelationships(a).then(s=>t.relationshipData.set(s)),n?.fetchEntityDocuments(a).then(s=>{t.documentRefs.set(s.map(l=>({id:l}))),i&&s.length>0&&i.requestDocumentData(s)})])}),function(s){return o.apply(this,arguments)}),requestDocumentData:o=>i?.requestDocumentData(o),requestEntityLocations:o=>{if(!this.mapboxToken())return void console.warn("[cue-entity-viewer] No mapboxToken provided \u2014 skipping map location fetch.");const a=o.map(SE).filter(Boolean);n?.requestEntityLocations(a)},openEntity:o=>this.openEntity.emit(o)};var o});constructor(){(0,b.QZP)(()=>{this._setup(this.cue(),this.projectId())}),(0,b.QZP)(()=>{const t=this._entities(),n=this.iri();t&&n&&void 0===this._entity()&&t.requestEntityData([SE(n)],!1)}),(0,b.QZP)(()=>{const t=this._entities(),n=this.iri();!t||!n||(n!==this._lastIri&&(this._lastIri=n,this.relationshipData.set(void 0),this.documentRefs.set([]),this.entityData.set(void 0),this.state.set("ready")),this._syncEntityData(t,n))})}ngOnDestroy(){this._teardown()}_setup(t,n){if(this._teardown(),!t||!n)return this._entities.set(void 0),this._documents.set(void 0),void this.state.set("idle");const i=new K_(t.api,n),o=new op(t.api,n);this._entities.set(i),this._documents.set(o),this._lastIri=void 0,this.state.set(this.iri()?"ready":"no-entity"),this._unsubscribeEntities=i.entityInfoMap.subscribe(()=>{const s=this.iri();s&&this._syncEntityData(i,s)}),this._unsubscribeDocuments=o.documentInfoMap.subscribe(()=>{this._syncDocumentData(o)}),i.contentCategoriesInProject(!0).then(s=>this.availableEntityCategories.set(s)).catch(s=>console.error("[cue-entity-viewer] Failed to fetch categories",s));const a=new QR(t.api,n,t.api.language);this._unsubscribeSchema=a.availableEntityRelationships.subscribe(()=>{this.availableEntityRelationships.set(a.availableEntityRelationships.get())})}_syncEntityData(t,n){const i=SE(n),o=t.entityInfoMap.get()[i];if(!o)return;const a=Array.isArray(o.documentRefs)?o.documentRefs.map(u=>"string"==typeof u?{id:u}:u):[],{documentRefs:s,...l}=o;this.entityData.set({...l,documentRefs:a}),a.length>0&&this.documentRefs.set(a)}_syncDocumentData(t){const n=t.documentInfoMap.get(),i={};for(const[o,a]of Object.entries(n))i[o]=RH(a);this.documentData.set(i)}_teardown(){this._unsubscribeEntities?.(),this._unsubscribeDocuments?.(),this._unsubscribeSchema?.(),this._unsubscribeEntities=void 0,this._unsubscribeDocuments=void 0,this._unsubscribeSchema=void 0}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=le.VBU({type:r,selectors:[["cue-entity-viewer-wc"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],iri:[1,"iri"],mapboxToken:[1,"mapboxToken"],variant:[1,"variant"]},outputs:{openEntity:"openEntity"},decls:4,vars:1,consts:[["body",""],[2,"height","100%","width","100%",3,"variant","padded"],[3,"ngTemplateOutlet"],[2,"display","flex","flex-direction","column","height","100%","overflow","hidden","width","100%"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[3,"entity","entityCategoriesEditable","availableEntityCategories","collapsed","handlers"],["cuePulseMode","text",3,"cuePulse"],[2,"height","16px"],[2,"flex","1","min-height","0"],[2,"width","100%","height","100%",3,"iri","availableEntityCategories","availableEntityRelationships","mapboxToken","handlers","relationshipData","documentRefs","documentData","entityDetailedData"]],template:function(n,i){1&n&&(le.DNE(0,IH,5,1,"ng-template",null,0,le.C5r),le.nVh(2,xH,2,3,"cue-card",1)(3,AH,1,1,"ng-container",2)),2&n&&(le.R7$(2),le.vxM("none"!==i.variant()?2:3))},dependencies:[YU,mH,oS.n,MD.Typography,vH.V,FU.Z,MU.T3,ea.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow:hidden}"],changeDetection:0})}return r})()},8846(wt){"use strict";wt.exports=function Ve(oe){return null===oe||"object"!=typeof oe||null!=oe.toJSON?JSON.stringify(oe):Array.isArray(oe)?"["+oe.reduce((O,F,k)=>O+(0===k?"":",")+Ve(void 0===F||"symbol"==typeof F?null:F),"")+"]":"{"+Object.keys(oe).sort().reduce((O,F,k)=>void 0===oe[F]||"symbol"==typeof oe[F]?O:O+(0===O.length?"":",")+Ve(F)+":"+Ve(oe[F]),"")+"}"}},1692(wt,Ve,oe){var O;wt.exports=(O=oe(6556),function(F){var k={};function b(j){if(k[j])return k[j].exports;var T=k[j]={i:j,l:!1,exports:{}};return F[j].call(T.exports,T,T.exports,b),T.l=!0,T.exports}return b.m=F,b.c=k,b.i=function(j){return j},b.d=function(j,T,S){b.o(j,T)||Object.defineProperty(j,T,{configurable:!1,enumerable:!0,get:S})},b.n=function(j){var T=j&&j.__esModule?function(){return j.default}:function(){return j};return b.d(T,"a",T),T},b.o=function(j,T){return Object.prototype.hasOwnProperty.call(j,T)},b.p="",b(b.s=7)}([function(F,k){F.exports=O},function(F,k,b){"use strict";var j=b(0).FDLayoutConstants;function T(){}for(var S in j)T[S]=j[S];T.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,T.DEFAULT_RADIAL_SEPARATION=j.DEFAULT_EDGE_LENGTH,T.DEFAULT_COMPONENT_SEPERATION=60,T.TILE=!0,T.TILING_PADDING_VERTICAL=10,T.TILING_PADDING_HORIZONTAL=10,T.TREE_REDUCTION_ON_INCREMENTAL=!1,F.exports=T},function(F,k,b){"use strict";var j=b(0).FDLayoutEdge;function T(x,G,E){j.call(this,x,G,E)}for(var S in T.prototype=Object.create(j.prototype),j)T[S]=j[S];F.exports=T},function(F,k,b){"use strict";var j=b(0).LGraph;function T(x,G,E){j.call(this,x,G,E)}for(var S in T.prototype=Object.create(j.prototype),j)T[S]=j[S];F.exports=T},function(F,k,b){"use strict";var j=b(0).LGraphManager;function T(x){j.call(this,x)}for(var S in T.prototype=Object.create(j.prototype),j)T[S]=j[S];F.exports=T},function(F,k,b){"use strict";var j=b(0).FDLayoutNode,T=b(0).IMath;function S(G,E,N,J){j.call(this,G,E,N,J)}for(var x in S.prototype=Object.create(j.prototype),j)S[x]=j[x];S.prototype.move=function(){var G=this.graphManager.getLayout();this.displacementX=G.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=G.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>G.coolingFactor*G.maxNodeDisplacement&&(this.displacementX=G.coolingFactor*G.maxNodeDisplacement*T.sign(this.displacementX)),Math.abs(this.displacementY)>G.coolingFactor*G.maxNodeDisplacement&&(this.displacementY=G.coolingFactor*G.maxNodeDisplacement*T.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),G.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},S.prototype.propogateDisplacementToChildren=function(G,E){for(var J,N=this.getChild().getNodes(),H=0;H<N.length;H++)null==(J=N[H]).getChild()?(J.moveBy(G,E),J.displacementX+=G,J.displacementY+=E):J.propogateDisplacementToChildren(G,E)},S.prototype.setPred1=function(G){this.pred1=G},S.prototype.getPred1=function(){return pred1},S.prototype.getPred2=function(){return pred2},S.prototype.setNext=function(G){this.next=G},S.prototype.getNext=function(){return next},S.prototype.setProcessed=function(G){this.processed=G},S.prototype.isProcessed=function(){return processed},F.exports=S},function(F,k,b){"use strict";var j=b(0).FDLayout,T=b(4),S=b(3),x=b(5),G=b(2),E=b(1),N=b(0).FDLayoutConstants,J=b(0).LayoutConstants,H=b(0).Point,W=b(0).PointD,ae=b(0).Layout,L=b(0).Integer,Z=b(0).IGeometry,P=b(0).LGraph,ie=b(0).Transform;function Q(){j.call(this),this.toBeTiled={}}for(var w in Q.prototype=Object.create(j.prototype),j)Q[w]=j[w];Q.prototype.newGraphManager=function(){var D=new T(this);return this.graphManager=D,D},Q.prototype.newGraph=function(D){return new S(null,this.graphManager,D)},Q.prototype.newNode=function(D){return new x(this.graphManager,D)},Q.prototype.newEdge=function(D){return new G(null,null,D)},Q.prototype.initParameters=function(){j.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=E.DEFAULT_EDGE_LENGTH<10?10:E.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=E.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=N.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=N.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=N.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=N.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=N.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=N.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/N.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=N.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},Q.prototype.layout=function(){return J.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},Q.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(E.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var V=new Set(this.getAllNodes()),te=this.nodesWithGravity.filter(function(se){return V.has(se)});this.graphManager.setAllNodesToApplyGravitation(te)}}else{var D=this.getFlatForest();D.length>0?this.positionNodesRadially(D):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),V=new Set(this.getAllNodes()),te=this.nodesWithGravity.filter(function(he){return V.has(he)}),this.graphManager.setAllNodesToApplyGravitation(te),this.positionNodesRandomly())}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},Q.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%N.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var D=new Set(this.getAllNodes()),V=this.nodesWithGravity.filter(function(ge){return D.has(ge)});this.graphManager.setAllNodesToApplyGravitation(V),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var te=!this.isTreeGrowing&&!this.isGrowthFinished,he=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(te,he),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},Q.prototype.getPositionsData=function(){for(var D=this.graphManager.getAllNodes(),V={},te=0;te<D.length;te++){var he=D[te].rect,ge=D[te].id;V[ge]={id:ge,x:he.getCenterX(),y:he.getCenterY(),w:he.width,h:he.height}}return V},Q.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var D=!1;if("during"===N.ANIMATE)this.emit("layoutstarted");else{for(;!D;)D=this.tick();this.graphManager.updateBounds()}},Q.prototype.calculateNodesToApplyGravitationTo=function(){var V,ge,D=[],te=this.graphManager.getGraphs(),he=te.length;for(ge=0;ge<he;ge++)(V=te[ge]).updateConnected(),V.isConnected||(D=D.concat(V.getNodes()));return D},Q.prototype.createBendpoints=function(){var D=[];D=D.concat(this.graphManager.getAllEdges());var te,V=new Set;for(te=0;te<D.length;te++){var he=D[te];if(!V.has(he)){var ge=he.getSource(),se=he.getTarget();if(ge==se)he.getBendpoints().push(new W),he.getBendpoints().push(new W),this.createDummyNodesForBendpoints(he),V.add(he);else{var de=[];if(de=(de=de.concat(ge.getEdgeListToNode(se))).concat(se.getEdgeListToNode(ge)),!V.has(de[0])){var Ce;if(de.length>1)for(Ce=0;Ce<de.length;Ce++){var Ie=de[Ce];Ie.getBendpoints().push(new W),this.createDummyNodesForBendpoints(Ie)}de.forEach(function(Ne){V.add(Ne)})}}}if(V.size==D.length)break}},Q.prototype.positionNodesRadially=function(D){for(var V=new H(0,0),te=Math.ceil(Math.sqrt(D.length)),he=0,ge=0,se=0,de=new W(0,0),Ce=0;Ce<D.length;Ce++){Ce%te==0&&(se=0,ge=he,0!=Ce&&(ge+=E.DEFAULT_COMPONENT_SEPERATION),he=0);var Ie=D[Ce],Ne=ae.findCenterOfTree(Ie);V.x=se,V.y=ge,(de=Q.radialLayout(Ie,Ne,V)).y>he&&(he=Math.floor(de.y)),se=Math.floor(de.x+E.DEFAULT_COMPONENT_SEPERATION)}this.transform(new W(J.WORLD_CENTER_X-de.x/2,J.WORLD_CENTER_Y-de.y/2))},Q.radialLayout=function(D,V,te){var he=Math.max(this.maxDiagonalInTree(D),E.DEFAULT_RADIAL_SEPARATION);Q.branchRadialLayout(V,null,0,359,0,he);var ge=P.calculateBounds(D),se=new ie;se.setDeviceOrgX(ge.getMinX()),se.setDeviceOrgY(ge.getMinY()),se.setWorldOrgX(te.x),se.setWorldOrgY(te.y);for(var de=0;de<D.length;de++)D[de].transform(se);var Ie=new W(ge.getMaxX(),ge.getMaxY());return se.inverseTransformPoint(Ie)},Q.branchRadialLayout=function(D,V,te,he,ge,se){var de=(he-te+1)/2;de<0&&(de+=180);var Ie=(de+te)%360*Z.TWO_PI/360,tt=(Math.cos(Ie),ge*Math.cos(Ie)),Ee=ge*Math.sin(Ie);D.setCenter(tt,Ee);var fe=[],ye=(fe=fe.concat(D.getEdges())).length;null!=V&&ye--;for(var pe,Ke=0,Oe=fe.length,Ze=D.getEdgesBetween(V);Ze.length>1;){var ft=Ze[0];Ze.splice(0,1);var vt=fe.indexOf(ft);vt>=0&&fe.splice(vt,1),Oe--,ye--}pe=null!=V?(fe.indexOf(Ze[0])+1)%Oe:0;for(var It=Math.abs(he-te)/ye,Ye=pe;Ke!=ye;Ye=++Ye%Oe){var st=fe[Ye].getOtherEnd(D);if(st!=V){var De=(te+Ke*It)%360;Q.branchRadialLayout(st,D,De,(De+It)%360,ge+se,se),Ke++}}},Q.maxDiagonalInTree=function(D){for(var V=L.MIN_VALUE,te=0;te<D.length;te++){var ge=D[te].getDiagonal();ge>V&&(V=ge)}return V},Q.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},Q.prototype.groupZeroDegreeMembers=function(){var D=this,V={};this.memberGroups={},this.idToDummyNode={};for(var te=[],he=this.graphManager.getAllNodes(),ge=0;ge<he.length;ge++){var de=(se=he[ge]).getParent();0===this.getNodeDegreeWithChildren(se)&&(null==de.id||!this.getToBeTiled(de))&&te.push(se)}for(ge=0;ge<te.length;ge++){var se,Ce=(se=te[ge]).getParent().id;typeof V[Ce]>"u"&&(V[Ce]=[]),V[Ce]=V[Ce].concat(se)}Object.keys(V).forEach(function(Ie){if(V[Ie].length>1){var Ne="DummyCompound_"+Ie;D.memberGroups[Ne]=V[Ie];var tt=V[Ie][0].getParent(),Ee=new x(D.graphManager);Ee.id=Ne,Ee.paddingLeft=tt.paddingLeft||0,Ee.paddingRight=tt.paddingRight||0,Ee.paddingBottom=tt.paddingBottom||0,Ee.paddingTop=tt.paddingTop||0,D.idToDummyNode[Ne]=Ee;var fe=D.getGraphManager().add(D.newGraph(),Ee),ye=tt.getChild();ye.add(Ee);for(var Ke=0;Ke<V[Ie].length;Ke++){var Oe=V[Ie][Ke];ye.remove(Oe),fe.add(Oe)}}})},Q.prototype.clearCompounds=function(){var D={},V={};this.performDFSOnCompounds();for(var te=0;te<this.compoundOrder.length;te++)V[this.compoundOrder[te].id]=this.compoundOrder[te],D[this.compoundOrder[te].id]=[].concat(this.compoundOrder[te].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[te].getChild()),this.compoundOrder[te].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(D,V)},Q.prototype.clearZeroDegreeMembers=function(){var D=this,V=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(te){var he=D.idToDummyNode[te];V[te]=D.tileNodes(D.memberGroups[te],he.paddingLeft+he.paddingRight),he.rect.width=V[te].width,he.rect.height=V[te].height})},Q.prototype.repopulateCompounds=function(){for(var D=this.compoundOrder.length-1;D>=0;D--){var V=this.compoundOrder[D];this.adjustLocations(this.tiledMemberPack[V.id],V.rect.x,V.rect.y,V.paddingLeft,V.paddingTop)}},Q.prototype.repopulateZeroDegreeMembers=function(){var D=this,V=this.tiledZeroDegreePack;Object.keys(V).forEach(function(te){var he=D.idToDummyNode[te];D.adjustLocations(V[te],he.rect.x,he.rect.y,he.paddingLeft,he.paddingTop)})},Q.prototype.getToBeTiled=function(D){var V=D.id;if(null!=this.toBeTiled[V])return this.toBeTiled[V];var te=D.getChild();if(null==te)return this.toBeTiled[V]=!1,!1;for(var he=te.getNodes(),ge=0;ge<he.length;ge++){var se=he[ge];if(this.getNodeDegree(se)>0)return this.toBeTiled[V]=!1,!1;if(null!=se.getChild()){if(!this.getToBeTiled(se))return this.toBeTiled[V]=!1,!1}else this.toBeTiled[se.id]=!1}return this.toBeTiled[V]=!0,!0},Q.prototype.getNodeDegree=function(D){for(var te=D.getEdges(),he=0,ge=0;ge<te.length;ge++){var se=te[ge];se.getSource().id!==se.getTarget().id&&(he+=1)}return he},Q.prototype.getNodeDegreeWithChildren=function(D){var V=this.getNodeDegree(D);if(null==D.getChild())return V;for(var te=D.getChild().getNodes(),he=0;he<te.length;he++)V+=this.getNodeDegreeWithChildren(te[he]);return V},Q.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},Q.prototype.fillCompexOrderByDFS=function(D){for(var V=0;V<D.length;V++){var te=D[V];null!=te.getChild()&&this.fillCompexOrderByDFS(te.getChild().getNodes()),this.getToBeTiled(te)&&this.compoundOrder.push(te)}},Q.prototype.adjustLocations=function(D,V,te,he,ge){te+=ge;for(var se=V+=he,de=0;de<D.rows.length;de++){var Ce=D.rows[de];V=se;for(var Ie=0,Ne=0;Ne<Ce.length;Ne++){var tt=Ce[Ne];tt.rect.x=V,tt.rect.y=te,V+=tt.rect.width+D.horizontalPadding,tt.rect.height>Ie&&(Ie=tt.rect.height)}te+=Ie+D.verticalPadding}},Q.prototype.tileCompoundMembers=function(D,V){var te=this;this.tiledMemberPack=[],Object.keys(D).forEach(function(he){var ge=V[he];te.tiledMemberPack[he]=te.tileNodes(D[he],ge.paddingLeft+ge.paddingRight),ge.rect.width=te.tiledMemberPack[he].width,ge.rect.height=te.tiledMemberPack[he].height})},Q.prototype.tileNodes=function(D,V){var ge={rows:[],rowWidth:[],rowHeight:[],width:0,height:V,verticalPadding:E.TILING_PADDING_VERTICAL,horizontalPadding:E.TILING_PADDING_HORIZONTAL};D.sort(function(Ce,Ie){return Ce.rect.width*Ce.rect.height>Ie.rect.width*Ie.rect.height?-1:Ce.rect.width*Ce.rect.height<Ie.rect.width*Ie.rect.height?1:0});for(var se=0;se<D.length;se++){var de=D[se];0==ge.rows.length?this.insertNodeToRow(ge,de,0,V):this.canAddHorizontal(ge,de.rect.width,de.rect.height)?this.insertNodeToRow(ge,de,this.getShortestRowIndex(ge),V):this.insertNodeToRow(ge,de,ge.rows.length,V),this.shiftToLastRow(ge)}return ge},Q.prototype.insertNodeToRow=function(D,V,te,he){var ge=he;te==D.rows.length&&(D.rows.push([]),D.rowWidth.push(ge),D.rowHeight.push(0));var de=D.rowWidth[te]+V.rect.width;D.rows[te].length>0&&(de+=D.horizontalPadding),D.rowWidth[te]=de,D.width<de&&(D.width=de);var Ce=V.rect.height;te>0&&(Ce+=D.verticalPadding);var Ie=0;Ce>D.rowHeight[te]&&(Ie=D.rowHeight[te],D.rowHeight[te]=Ce,Ie=D.rowHeight[te]-Ie),D.height+=Ie,D.rows[te].push(V)},Q.prototype.getShortestRowIndex=function(D){for(var V=-1,te=Number.MAX_VALUE,he=0;he<D.rows.length;he++)D.rowWidth[he]<te&&(V=he,te=D.rowWidth[he]);return V},Q.prototype.getLongestRowIndex=function(D){for(var V=-1,te=Number.MIN_VALUE,he=0;he<D.rows.length;he++)D.rowWidth[he]>te&&(V=he,te=D.rowWidth[he]);return V},Q.prototype.canAddHorizontal=function(D,V,te){var he=this.getShortestRowIndex(D);if(he<0)return!0;var ge=D.rowWidth[he];if(ge+D.horizontalPadding+V<=D.width)return!0;var de,Ce,se=0;return D.rowHeight[he]<te&&he>0&&(se=te+D.verticalPadding-D.rowHeight[he]),de=D.width-ge>=V+D.horizontalPadding?(D.height+se)/(ge+V+D.horizontalPadding):(D.height+se)/D.width,se=te+D.verticalPadding,(Ce=D.width<V?(D.height+se)/V:(D.height+se)/D.width)<1&&(Ce=1/Ce),de<1&&(de=1/de),de<Ce},Q.prototype.shiftToLastRow=function(D){var V=this.getLongestRowIndex(D),te=D.rowWidth.length-1,he=D.rows[V],ge=he[he.length-1],se=ge.width+D.horizontalPadding;if(D.width-D.rowWidth[te]>se&&V!=te){he.splice(-1,1),D.rows[te].push(ge),D.rowWidth[V]=D.rowWidth[V]-se,D.rowWidth[te]=D.rowWidth[te]+se,D.width=D.rowWidth[instance.getLongestRowIndex(D)];for(var de=Number.MIN_VALUE,Ce=0;Ce<he.length;Ce++)he[Ce].height>de&&(de=he[Ce].height);V>0&&(de+=D.verticalPadding);var Ie=D.rowHeight[V]+D.rowHeight[te];D.rowHeight[V]=de,D.rowHeight[te]<ge.height+D.verticalPadding&&(D.rowHeight[te]=ge.height+D.verticalPadding),D.height+=D.rowHeight[V]+D.rowHeight[te]-Ie,this.shiftToLastRow(D)}},Q.prototype.tilingPreLayout=function(){E.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},Q.prototype.tilingPostLayout=function(){E.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},Q.prototype.reduceTrees=function(){for(var te,D=[],V=!0;V;){var he=this.graphManager.getAllNodes(),ge=[];V=!1;for(var se=0;se<he.length;se++)1==(te=he[se]).getEdges().length&&!te.getEdges()[0].isInterGraph&&null==te.getChild()&&(ge.push([te,te.getEdges()[0],te.getOwner()]),V=!0);if(1==V){for(var de=[],Ce=0;Ce<ge.length;Ce++)1==ge[Ce][0].getEdges().length&&(de.push(ge[Ce]),ge[Ce][0].getOwner().remove(ge[Ce][0]));D.push(de),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=D},Q.prototype.growTree=function(D){for(var he,te=D[D.length-1],ge=0;ge<te.length;ge++)this.findPlaceforPrunedNode(he=te[ge]),he[2].add(he[0]),he[2].add(he[1],he[1].source,he[1].target);D.splice(D.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},Q.prototype.findPlaceforPrunedNode=function(D){var V,te,he=D[0],ge=(te=he==D[1].source?D[1].target:D[1].source).startX,se=te.finishX,de=te.startY,Ce=te.finishY,fe=[0,0,0,0];if(de>0)for(var ye=ge;ye<=se;ye++)fe[0]+=this.grid[ye][de-1].length+this.grid[ye][de].length-1;if(se<this.grid.length-1)for(ye=de;ye<=Ce;ye++)fe[1]+=this.grid[se+1][ye].length+this.grid[se][ye].length-1;if(Ce<this.grid[0].length-1)for(ye=ge;ye<=se;ye++)fe[2]+=this.grid[ye][Ce+1].length+this.grid[ye][Ce].length-1;if(ge>0)for(ye=de;ye<=Ce;ye++)fe[3]+=this.grid[ge-1][ye].length+this.grid[ge][ye].length-1;for(var Oe,pe,Ke=L.MAX_VALUE,Ze=0;Ze<fe.length;Ze++)fe[Ze]<Ke?(Ke=fe[Ze],Oe=1,pe=Ze):fe[Ze]==Ke&&Oe++;if(3==Oe&&0==Ke)0==fe[0]&&0==fe[1]&&0==fe[2]?V=1:0==fe[0]&&0==fe[1]&&0==fe[3]?V=0:0==fe[0]&&0==fe[2]&&0==fe[3]?V=3:0==fe[1]&&0==fe[2]&&0==fe[3]&&(V=2);else if(2==Oe&&0==Ke){var ft=Math.floor(2*Math.random());V=0==fe[0]&&0==fe[1]?0==ft?0:1:0==fe[0]&&0==fe[2]?0==ft?0:2:0==fe[0]&&0==fe[3]?0==ft?0:3:0==fe[1]&&0==fe[2]?0==ft?1:2:0==fe[1]&&0==fe[3]?0==ft?1:3:0==ft?2:3}else V=4==Oe&&0==Ke?ft=Math.floor(4*Math.random()):pe;0==V?he.setCenter(te.getCenterX(),te.getCenterY()-te.getHeight()/2-N.DEFAULT_EDGE_LENGTH-he.getHeight()/2):1==V?he.setCenter(te.getCenterX()+te.getWidth()/2+N.DEFAULT_EDGE_LENGTH+he.getWidth()/2,te.getCenterY()):2==V?he.setCenter(te.getCenterX(),te.getCenterY()+te.getHeight()/2+N.DEFAULT_EDGE_LENGTH+he.getHeight()/2):he.setCenter(te.getCenterX()-te.getWidth()/2-N.DEFAULT_EDGE_LENGTH-he.getWidth()/2,te.getCenterY())},F.exports=Q},function(F,k,b){"use strict";var j={};j.layoutBase=b(0),j.CoSEConstants=b(1),j.CoSEEdge=b(2),j.CoSEGraph=b(3),j.CoSEGraphManager=b(4),j.CoSELayout=b(6),j.CoSENode=b(5),F.exports=j}]))},6894(wt,Ve,oe){var O;wt.exports=(O=oe(1692),function(F){var k={};function b(j){if(k[j])return k[j].exports;var T=k[j]={i:j,l:!1,exports:{}};return F[j].call(T.exports,T,T.exports,b),T.l=!0,T.exports}return b.m=F,b.c=k,b.i=function(j){return j},b.d=function(j,T,S){b.o(j,T)||Object.defineProperty(j,T,{configurable:!1,enumerable:!0,get:S})},b.n=function(j){var T=j&&j.__esModule?function(){return j.default}:function(){return j};return b.d(T,"a",T),T},b.o=function(j,T){return Object.prototype.hasOwnProperty.call(j,T)},b.p="",b(b.s=1)}([function(F,k){F.exports=O},function(F,k,b){"use strict";var j=b(0).layoutBase.LayoutConstants,T=b(0).layoutBase.FDLayoutConstants,S=b(0).CoSEConstants,x=b(0).CoSELayout,G=b(0).CoSENode,E=b(0).layoutBase.PointD,N=b(0).layoutBase.DimensionD,J={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function W(Z){this.options=function H(Z,P){var ie={};for(var Q in Z)ie[Q]=Z[Q];for(var Q in P)ie[Q]=P[Q];return ie}(J,Z),ae(this.options)}var ae=function(P){null!=P.nodeRepulsion&&(S.DEFAULT_REPULSION_STRENGTH=T.DEFAULT_REPULSION_STRENGTH=P.nodeRepulsion),null!=P.idealEdgeLength&&(S.DEFAULT_EDGE_LENGTH=T.DEFAULT_EDGE_LENGTH=P.idealEdgeLength),null!=P.edgeElasticity&&(S.DEFAULT_SPRING_STRENGTH=T.DEFAULT_SPRING_STRENGTH=P.edgeElasticity),null!=P.nestingFactor&&(S.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=T.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=P.nestingFactor),null!=P.gravity&&(S.DEFAULT_GRAVITY_STRENGTH=T.DEFAULT_GRAVITY_STRENGTH=P.gravity),null!=P.numIter&&(S.MAX_ITERATIONS=T.MAX_ITERATIONS=P.numIter),null!=P.gravityRange&&(S.DEFAULT_GRAVITY_RANGE_FACTOR=T.DEFAULT_GRAVITY_RANGE_FACTOR=P.gravityRange),null!=P.gravityCompound&&(S.DEFAULT_COMPOUND_GRAVITY_STRENGTH=T.DEFAULT_COMPOUND_GRAVITY_STRENGTH=P.gravityCompound),null!=P.gravityRangeCompound&&(S.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=T.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=P.gravityRangeCompound),null!=P.initialEnergyOnIncremental&&(S.DEFAULT_COOLING_FACTOR_INCREMENTAL=T.DEFAULT_COOLING_FACTOR_INCREMENTAL=P.initialEnergyOnIncremental),j.QUALITY="draft"==P.quality?0:"proof"==P.quality?2:1,S.NODE_DIMENSIONS_INCLUDE_LABELS=T.NODE_DIMENSIONS_INCLUDE_LABELS=j.NODE_DIMENSIONS_INCLUDE_LABELS=P.nodeDimensionsIncludeLabels,S.DEFAULT_INCREMENTAL=T.DEFAULT_INCREMENTAL=j.DEFAULT_INCREMENTAL=!P.randomize,S.ANIMATE=T.ANIMATE=j.ANIMATE=P.animate,S.TILE=P.tile,S.TILING_PADDING_VERTICAL="function"==typeof P.tilingPaddingVertical?P.tilingPaddingVertical.call():P.tilingPaddingVertical,S.TILING_PADDING_HORIZONTAL="function"==typeof P.tilingPaddingHorizontal?P.tilingPaddingHorizontal.call():P.tilingPaddingHorizontal};W.prototype.run=function(){var Z,P,ie=this.options,w=(this.idToLNode={},this.layout=new x),D=this;D.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var V=w.newGraphManager();this.gm=V;var te=this.options.eles.nodes(),he=this.options.eles.edges();this.root=V.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(te),w);for(var ge=0;ge<he.length;ge++){var se=he[ge],de=this.idToLNode[se.data("source")],Ce=this.idToLNode[se.data("target")];de!==Ce&&0==de.getEdgesBetween(Ce).length&&(V.add(w.newEdge(),de,Ce).id=se.id())}var Ne=function(fe,ye){"number"==typeof fe&&(fe=ye);var Ke=fe.data("id"),Oe=D.idToLNode[Ke];return{x:Oe.getRect().getCenterX(),y:Oe.getRect().getCenterY()}},tt=function Ee(){for(var Ke,fe=function(){ie.fit&&ie.cy.fit(ie.eles,ie.padding),Z||(Z=!0,D.cy.one("layoutready",ie.ready),D.cy.trigger({type:"layoutready",layout:D}))},ye=D.options.refresh,Oe=0;Oe<ye&&!Ke;Oe++)Ke=D.stopped||D.layout.tick();if(Ke)return w.checkLayoutSuccess()&&!w.isSubLayout&&w.doPostLayout(),w.tilingPostLayout&&w.tilingPostLayout(),w.isLayoutFinished=!0,D.options.eles.nodes().positions(Ne),fe(),D.cy.one("layoutstop",D.options.stop),D.cy.trigger({type:"layoutstop",layout:D}),P&&cancelAnimationFrame(P),void(Z=!1);var pe=D.layout.getPositionsData();ie.eles.nodes().positions(function(Ze,ft){if("number"==typeof Ze&&(Ze=ft),!Ze.isParent()){for(var vt=Ze.id(),It=pe[vt],Ye=Ze;null==It&&(It=pe[Ye.data("parent")]||pe["DummyCompound_"+Ye.data("parent")],pe[vt]=It,null!=(Ye=Ye.parent()[0])););return null!=It?{x:It.x,y:It.y}:{x:Ze.position("x"),y:Ze.position("y")}}}),fe(),P=requestAnimationFrame(Ee)};return w.addListener("layoutstarted",function(){"during"===D.options.animate&&(P=requestAnimationFrame(tt))}),w.runLayout(),"during"!==this.options.animate&&(D.options.eles.nodes().not(":parent").layoutPositions(D,D.options,Ne),Z=!1),this},W.prototype.getTopMostNodes=function(Z){for(var P={},ie=0;ie<Z.length;ie++)P[Z[ie].id()]=!0;return Z.filter(function(w,D){"number"==typeof w&&(w=D);for(var V=w.parent()[0];null!=V;){if(P[V.id()])return!1;V=V.parent()[0]}return!0})},W.prototype.processChildrenList=function(Z,P,ie){for(var Q=P.length,w=0;w<Q;w++){var te,Ce,D=P[w],V=D.children(),he=D.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((te=null!=D.outerWidth()&&null!=D.outerHeight()?Z.add(new G(ie.graphManager,new E(D.position("x")-he.w/2,D.position("y")-he.h/2),new N(parseFloat(he.w),parseFloat(he.h)))):Z.add(new G(this.graphManager))).id=D.data("id"),te.paddingLeft=parseInt(D.css("padding")),te.paddingTop=parseInt(D.css("padding")),te.paddingRight=parseInt(D.css("padding")),te.paddingBottom=parseInt(D.css("padding")),this.options.nodeDimensionsIncludeLabels&&D.isParent()){var ge=D.boundingBox({includeLabels:!0,includeNodes:!1}).w,se=D.boundingBox({includeLabels:!0,includeNodes:!1}).h,de=D.css("text-halign");te.labelWidth=ge,te.labelHeight=se,te.labelPos=de}this.idToLNode[D.data("id")]=te,isNaN(te.rect.x)&&(te.rect.x=0),isNaN(te.rect.y)&&(te.rect.y=0),null!=V&&V.length>0&&(Ce=ie.getGraphManager().add(ie.newGraph(),te),this.processChildrenList(Ce,V,ie))}},W.prototype.stop=function(){return this.stopped=!0,this};var L=function(P){P("layout","cose-bilkent",W)};typeof cytoscape<"u"&&L(cytoscape),F.exports=L}]))},7839(wt,Ve,oe){"use strict";var O=oe(9293).default;const{isArray:F,isObject:k,isString:b}=oe(2831),{asArray:j}=oe(9420),{prependBase:T}=oe(2051),S=oe(262),x=oe(6181);function E(J){throw new S("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:J})}function N({context:J,base:H}){if(!J)return;const W=J["@context"];if(b(W))J["@context"]=T(H,W);else if(F(W))for(let ae=0;ae<W.length;++ae){const L=W[ae];b(L)?W[ae]=T(H,L):k(L)&&N({context:{"@context":L},base:H})}else if(k(W))for(const ae in W)N({context:W[ae],base:H})}wt.exports=class{constructor({sharedCache:H}){this.perOpCache=new Map,this.sharedCache=H}resolve(H){var W=this;return O(function*({activeCtx:ae,context:L,documentLoader:Z,base:P,cycles:ie=new Set}){L&&k(L)&&L["@context"]&&(L=L["@context"]),L=j(L);const Q=[];for(const w of L){if(b(w)){let te=W._get(w);te||(te=yield W._resolveRemoteContext({activeCtx:ae,url:w,documentLoader:Z,base:P,cycles:ie})),F(te)?Q.push(...te):Q.push(te);continue}if(null===w){Q.push(new x({document:null}));continue}k(w)||E(L);const D=JSON.stringify(w);let V=W._get(D);V||(V=new x({document:w}),W._cacheResolvedContext({key:D,resolved:V,tag:"static"})),Q.push(V)}return Q}).apply(this,arguments)}_get(H){let W=this.perOpCache.get(H);if(!W){const ae=this.sharedCache.get(H);ae&&(W=ae.get("static"),W&&this.perOpCache.set(H,W))}return W}_cacheResolvedContext({key:H,resolved:W,tag:ae}){if(this.perOpCache.set(H,W),void 0!==ae){let L=this.sharedCache.get(H);L||(L=new Map,this.sharedCache.set(H,L)),L.set(ae,W)}return W}_resolveRemoteContext(H){var W=this;return O(function*({activeCtx:ae,url:L,documentLoader:Z,base:P,cycles:ie}){L=T(P,L);const{context:Q,remoteDoc:w}=yield W._fetchContext({activeCtx:ae,url:L,documentLoader:Z,cycles:ie});N({context:Q,base:P=w.documentUrl||L});const D=yield W.resolve({activeCtx:ae,context:Q,documentLoader:Z,base:P,cycles:ie});return W._cacheResolvedContext({key:L,resolved:D,tag:w.tag}),D}).apply(this,arguments)}_fetchContext(H){return O(function*({activeCtx:W,url:ae,documentLoader:L,cycles:Z}){if(Z.size>10)throw new S("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===W.processingMode?"loading remote context failed":"context overflow",max:10});if(Z.has(ae))throw new S("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===W.processingMode?"recursive context inclusion":"context overflow",url:ae});let P,ie;Z.add(ae);try{ie=yield L(ae),P=ie.document||null,b(P)&&(P=JSON.parse(P))}catch(Q){throw new S(`Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context. URL: "${ae}".`,"jsonld.InvalidUrl",{code:"loading remote context failed",url:ae,cause:Q})}if(!k(P))throw new S(`Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object. URL: "${ae}".`,"jsonld.InvalidUrl",{code:"invalid remote context",url:ae});return P="@context"in P?{"@context":P["@context"]}:{"@context":{}},ie.contextUrl&&(F(P["@context"])||(P["@context"]=[P["@context"]]),P["@context"].push(ie.contextUrl)),{context:P,remoteDoc:ie}}).apply(this,arguments)}}},262(wt){"use strict";wt.exports=class extends Error{constructor(oe="An unspecified JSON-LD error occurred.",O="jsonld.Error",F={}){super(oe),this.name=O,this.message=oe,this.details=F}}},1328(wt){"use strict";wt.exports=Ve=>{class oe{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(oe,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(oe.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:oe}),oe.compact=function(O,F){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):Ve.compact(O,F)},oe.expand=function(O){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):Ve.expand(O)},oe.flatten=function(O){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):Ve.flatten(O)},oe}},5426(wt,Ve,oe){"use strict";wt.exports=oe(1224).NQuads},4808(wt,Ve,oe){"use strict";var O=oe(9293).default;wt.exports=class{constructor(){this._requests={}}wrapLoader(k){const b=this;return b._loader=k,function(){return b.add.apply(b,arguments)}}add(k){var b=this;return O(function*(){let j=b._requests[k];if(j)return Promise.resolve(j);j=b._requests[k]=b._loader(k);try{return yield j}finally{delete b._requests[k]}})()}}},6181(wt,Ve,oe){"use strict";const O=oe(3052);wt.exports=class{constructor({document:b}){this.document=b,this.cache=new O({max:10})}getProcessed(b){return this.cache.get(b)}setProcessed(b,j){this.cache.set(b,j)}}},3763(wt,Ve,oe){"use strict";var O=oe(9293).default;const F=oe(262),{isArray:k,isObject:b,isString:j,isUndefined:T}=oe(2831),{isList:S,isValue:x,isGraph:G,isSimpleGraph:E,isSubjectReference:N}=oe(4209),{expandIri:J,getContextValue:H,isKeyword:W,process:ae,processingMode:L}=oe(429),{removeBase:Z,prependBase:P}=oe(2051),{REGEX_KEYWORD:ie,addValue:Q,asArray:w,compareShortestLeast:D}=oe(9420),V={};function he(ge,se,de){if("@nest"!==J(ge,se,{vocab:!0},de))throw new F("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}wt.exports=V,V.compact=function(){var ge=O(function*({activeCtx:se,activeProperty:de=null,element:Ce,options:Ie={}}){if(k(Ce)){let tt=[];for(let Ee=0;Ee<Ce.length;++Ee){const fe=yield V.compact({activeCtx:se,activeProperty:de,element:Ce[Ee],options:Ie});null!==fe&&tt.push(fe)}return Ie.compactArrays&&1===tt.length&&0===(H(se,de,"@container")||[]).length&&(tt=tt[0]),tt}const Ne=H(se,de,"@context");if(T(Ne)||(se=yield ae({activeCtx:se,localCtx:Ne,propagate:!0,overrideProtected:!0,options:Ie})),b(Ce)){if(Ie.link&&"@id"in Ce&&Ie.link.hasOwnProperty(Ce["@id"])){const Ze=Ie.link[Ce["@id"]];for(let ft=0;ft<Ze.length;++ft)if(Ze[ft].expanded===Ce)return Ze[ft].compacted}if(x(Ce)||N(Ce)){const Ze=V.compactValue({activeCtx:se,activeProperty:de,value:Ce,options:Ie});return Ie.link&&N(Ce)&&(Ie.link.hasOwnProperty(Ce["@id"])||(Ie.link[Ce["@id"]]=[]),Ie.link[Ce["@id"]].push({expanded:Ce,compacted:Ze})),Ze}if(S(Ce)&&(H(se,de,"@container")||[]).includes("@list"))return V.compact({activeCtx:se,activeProperty:de,element:Ce["@list"],options:Ie});const tt="@reverse"===de,Ee={},fe=se;!x(Ce)&&!N(Ce)&&(se=se.revertToPreviousContext());const ye=H(fe,de,"@context");T(ye)||(se=yield ae({activeCtx:se,localCtx:ye,propagate:!0,overrideProtected:!0,options:Ie})),Ie.link&&"@id"in Ce&&(Ie.link.hasOwnProperty(Ce["@id"])||(Ie.link[Ce["@id"]]=[]),Ie.link[Ce["@id"]].push({expanded:Ce,compacted:Ee}));let Ke=Ce["@type"]||[];Ke.length>1&&(Ke=Array.from(Ke).sort());const Oe=se;for(const Ze of Ke){const ft=V.compactIri({activeCtx:Oe,iri:Ze,relativeTo:{vocab:!0}}),vt=H(fe,ft,"@context");T(vt)||(se=yield ae({activeCtx:se,localCtx:vt,options:Ie,propagate:!1}))}const pe=Object.keys(Ce).sort();for(const Ze of pe){const ft=Ce[Ze];if("@id"===Ze){let vt=w(ft).map(Ye=>V.compactIri({activeCtx:se,iri:Ye,relativeTo:{vocab:!1},base:Ie.base}));1===vt.length&&(vt=vt[0]),Ee[V.compactIri({activeCtx:se,iri:"@id",relativeTo:{vocab:!0}})]=vt;continue}if("@type"===Ze){let vt=w(ft).map(Ae=>V.compactIri({activeCtx:fe,iri:Ae,relativeTo:{vocab:!0}}));1===vt.length&&(vt=vt[0]);const It=V.compactIri({activeCtx:se,iri:"@type",relativeTo:{vocab:!0}}),De=(H(se,It,"@container")||[]).includes("@set")&&L(se,1.1)||k(vt)&&0===ft.length;Q(Ee,It,vt,{propertyIsArray:De});continue}if("@reverse"===Ze){const vt=yield V.compact({activeCtx:se,activeProperty:"@reverse",element:ft,options:Ie});for(const It in vt)if(se.mappings.has(It)&&se.mappings.get(It).reverse){const Ye=vt[It],De=(H(se,It,"@container")||[]).includes("@set")||!Ie.compactArrays;Q(Ee,It,Ye,{propertyIsArray:De}),delete vt[It]}if(Object.keys(vt).length>0){const It=V.compactIri({activeCtx:se,iri:Ze,relativeTo:{vocab:!0}});Q(Ee,It,vt)}continue}if("@preserve"===Ze){const vt=yield V.compact({activeCtx:se,activeProperty:de,element:ft,options:Ie});k(vt)&&0===vt.length||Q(Ee,Ze,vt);continue}if("@index"===Ze){if((H(se,de,"@container")||[]).includes("@index"))continue;const It=V.compactIri({activeCtx:se,iri:Ze,relativeTo:{vocab:!0}});Q(Ee,It,ft);continue}if("@graph"!==Ze&&"@list"!==Ze&&"@included"!==Ze&&W(Ze)){const vt=V.compactIri({activeCtx:se,iri:Ze,relativeTo:{vocab:!0}});Q(Ee,vt,ft);continue}if(!k(ft))throw new F("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===ft.length){const vt=V.compactIri({activeCtx:se,iri:Ze,value:ft,relativeTo:{vocab:!0},reverse:tt}),It=se.mappings.has(vt)?se.mappings.get(vt)["@nest"]:null;let Ye=Ee;It&&(he(se,It,Ie),b(Ee[It])||(Ee[It]={}),Ye=Ee[It]),Q(Ye,vt,ft,{propertyIsArray:!0})}for(const vt of ft){const It=V.compactIri({activeCtx:se,iri:Ze,value:vt,relativeTo:{vocab:!0},reverse:tt}),Ye=se.mappings.has(It)?se.mappings.get(It)["@nest"]:null;let st=Ee;Ye&&(he(se,Ye,Ie),b(Ee[Ye])||(Ee[Ye]={}),st=Ee[Ye]);const De=H(se,It,"@container")||[],Ae=G(vt),pt=S(vt);let Rt;pt?Rt=vt["@list"]:Ae&&(Rt=vt["@graph"]);let ht=yield V.compact({activeCtx:se,activeProperty:It,element:pt||Ae?Rt:vt,options:Ie});if(pt){if(k(ht)||(ht=[ht]),De.includes("@list")){Q(st,It,ht,{valueIsArray:!0,allowDuplicate:!0});continue}ht={[V.compactIri({activeCtx:se,iri:"@list",relativeTo:{vocab:!0}})]:ht},"@index"in vt&&(ht[V.compactIri({activeCtx:se,iri:"@index",relativeTo:{vocab:!0}})]=vt["@index"])}if(Ae)if(De.includes("@graph")&&(De.includes("@id")||De.includes("@index")&&E(vt))){let Dt;st.hasOwnProperty(It)?Dt=st[It]:st[It]=Dt={};const rr=(De.includes("@id")?vt["@id"]:vt["@index"])||V.compactIri({activeCtx:se,iri:"@none",relativeTo:{vocab:!0}});Q(Dt,rr,ht,{propertyIsArray:!Ie.compactArrays||De.includes("@set")})}else De.includes("@graph")&&E(vt)?(k(ht)&&ht.length>1&&(ht={"@included":ht}),Q(st,It,ht,{propertyIsArray:!Ie.compactArrays||De.includes("@set")})):(k(ht)&&1===ht.length&&Ie.compactArrays&&(ht=ht[0]),ht={[V.compactIri({activeCtx:se,iri:"@graph",relativeTo:{vocab:!0}})]:ht},"@id"in vt&&(ht[V.compactIri({activeCtx:se,iri:"@id",relativeTo:{vocab:!0}})]=vt["@id"]),"@index"in vt&&(ht[V.compactIri({activeCtx:se,iri:"@index",relativeTo:{vocab:!0}})]=vt["@index"]),Q(st,It,ht,{propertyIsArray:!Ie.compactArrays||De.includes("@set")}));else if(De.includes("@language")||De.includes("@index")||De.includes("@id")||De.includes("@type")){let Dt,rr;if(st.hasOwnProperty(It)?Dt=st[It]:st[It]=Dt={},De.includes("@language"))x(ht)&&(ht=ht["@value"]),rr=vt["@language"];else if(De.includes("@index")){const pr=H(se,It,"@index")||"@index",Pt=V.compactIri({activeCtx:se,iri:pr,relativeTo:{vocab:!0}});if("@index"===pr)rr=vt["@index"],delete ht[Pt];else{let dr;if([rr,...dr]=w(ht[pr]||[]),j(rr))switch(dr.length){case 0:delete ht[pr];break;case 1:ht[pr]=dr[0];break;default:ht[pr]=dr}else rr=null}}else if(De.includes("@id")){const pr=V.compactIri({activeCtx:se,iri:"@id",relativeTo:{vocab:!0}});rr=ht[pr],delete ht[pr]}else if(De.includes("@type")){const pr=V.compactIri({activeCtx:se,iri:"@type",relativeTo:{vocab:!0}});let Pt;switch([rr,...Pt]=w(ht[pr]||[]),Pt.length){case 0:delete ht[pr];break;case 1:ht[pr]=Pt[0];break;default:ht[pr]=Pt}1===Object.keys(ht).length&&"@id"in vt&&(ht=yield V.compact({activeCtx:se,activeProperty:It,element:{"@id":vt["@id"]},options:Ie}))}rr||(rr=V.compactIri({activeCtx:se,iri:"@none",relativeTo:{vocab:!0}})),Q(Dt,rr,ht,{propertyIsArray:De.includes("@set")})}else{const Dt=!Ie.compactArrays||De.includes("@set")||De.includes("@list")||k(ht)&&0===ht.length||"@list"===Ze||"@graph"===Ze;Q(st,It,ht,{propertyIsArray:Dt})}}}return Ee}return Ce});return function(se){return ge.apply(this,arguments)}}(),V.compactIri=({activeCtx:ge,iri:se,value:de=null,relativeTo:Ce={vocab:!1},reverse:Ie=!1,base:Ne=null})=>{if(null===se)return se;ge.isPropertyTermScoped&&ge.previousContext&&(ge=ge.previousContext);const tt=ge.getInverse();if(W(se)&&se in tt&&"@none"in tt[se]&&"@type"in tt[se]["@none"]&&"@none"in tt[se]["@none"]["@type"])return tt[se]["@none"]["@type"]["@none"];if(Ce.vocab&&se in tt){const Oe=ge["@language"]||"@none",pe=[];b(de)&&"@index"in de&&!("@graph"in de)&&pe.push("@index","@index@set"),b(de)&&"@preserve"in de&&(de=de["@preserve"][0]),G(de)?("@index"in de&&pe.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in de&&pe.push("@graph@id","@graph@id@set"),pe.push("@graph","@graph@set","@set"),"@index"in de||pe.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in de||pe.push("@graph@id","@graph@id@set")):b(de)&&!x(de)&&pe.push("@id","@id@set","@type","@set@type");let Ze="@language",ft="@null";if(Ie)Ze="@type",ft="@reverse",pe.push("@set");else if(S(de)){"@index"in de||pe.push("@list");const It=de["@list"];if(0===It.length)Ze="@any",ft="@none";else{let Ye=0===It.length?Oe:null,st=null;for(let De=0;De<It.length;++De){const Ae=It[De];let pt="@none",Rt="@none";if(x(Ae)?"@direction"in Ae?pt=`${(Ae["@language"]||"").toLowerCase()}_${Ae["@direction"]}`:"@language"in Ae?pt=Ae["@language"].toLowerCase():"@type"in Ae?Rt=Ae["@type"]:pt="@null":Rt="@id",null===Ye?Ye=pt:pt!==Ye&&x(Ae)&&(Ye="@none"),null===st?st=Rt:Rt!==st&&(st="@none"),"@none"===Ye&&"@none"===st)break}Ye=Ye||"@none",st=st||"@none","@none"!==st?(Ze="@type",ft=st):ft=Ye}}else{if(x(de))if("@language"in de&&!("@index"in de)){pe.push("@language","@language@set"),ft=de["@language"];const It=de["@direction"];It&&(ft=`${ft}_${It}`)}else"@direction"in de&&!("@index"in de)?ft=`_${de["@direction"]}`:"@type"in de&&(Ze="@type",ft=de["@type"]);else Ze="@type",ft="@id";pe.push("@set")}pe.push("@none"),b(de)&&!("@index"in de)&&pe.push("@index","@index@set"),x(de)&&1===Object.keys(de).length&&pe.push("@language","@language@set");const vt=function te(ge,se,de,Ce,Ie,Ne){null===Ne&&(Ne="@null");const tt=[];if(("@id"===Ne||"@reverse"===Ne)&&b(de)&&"@id"in de){"@reverse"===Ne&&tt.push("@reverse");const fe=V.compactIri({activeCtx:ge,iri:de["@id"],relativeTo:{vocab:!0}});ge.mappings.has(fe)&&ge.mappings.get(fe)&&ge.mappings.get(fe)["@id"]===de["@id"]?tt.push.apply(tt,["@vocab","@id"]):tt.push.apply(tt,["@id","@vocab"])}else{tt.push(Ne);const fe=tt.find(ye=>ye.includes("_"));fe&&tt.push(fe.replace(/^[^_]+_/,"_"))}tt.push("@none");const Ee=ge.inverse[se];for(const fe of Ce){if(!(fe in Ee))continue;const ye=Ee[fe][Ie];for(const Ke of tt)if(Ke in ye)return ye[Ke]}return null}(ge,se,de,pe,Ze,ft);if(null!==vt)return vt}if(Ce.vocab&&"@vocab"in ge){const Oe=ge["@vocab"];if(0===se.indexOf(Oe)&&se!==Oe){const pe=se.substr(Oe.length);if(!ge.mappings.has(pe))return pe}}let Ee=null;const fe=[];let ye=ge.fastCurieMap;const Ke=se.length-1;for(let Oe=0;Oe<Ke&&se[Oe]in ye;++Oe)ye=ye[se[Oe]],""in ye&&fe.push(ye[""][0]);for(let Oe=fe.length-1;Oe>=0;--Oe){const pe=fe[Oe],Ze=pe.terms;for(const ft of Ze){const vt=ft+":"+se.substr(pe.iri.length);ge.mappings.get(ft)._prefix&&(!ge.mappings.has(vt)||null===de&&ge.mappings.get(vt)["@id"]===se)&&(null===Ee||D(vt,Ee)<0)&&(Ee=vt)}}if(null!==Ee)return Ee;for(const[Oe,pe]of ge.mappings)if(pe&&pe._prefix&&se.startsWith(Oe+":"))throw new F(`Absolute IRI "${se}" confused with prefix "${Oe}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:ge});if(!Ce.vocab){if("@base"in ge){if(ge["@base"]){const Oe=Z(P(Ne,ge["@base"]),se);return ie.test(Oe)?`./${Oe}`:Oe}return se}return Z(Ne,se)}return se},V.compactValue=({activeCtx:ge,activeProperty:se,value:de,options:Ce})=>{if(x(de)){const Ee=H(ge,se,"@type"),fe=H(ge,se,"@language"),ye=H(ge,se,"@direction"),Ke=H(ge,se,"@container")||[],Oe="@index"in de&&!Ke.includes("@index");if(!Oe&&"@none"!==Ee&&(de["@type"]===Ee||"@language"in de&&de["@language"]===fe&&"@direction"in de&&de["@direction"]===ye||"@language"in de&&de["@language"]===fe||"@direction"in de&&de["@direction"]===ye))return de["@value"];const pe=Object.keys(de).length,Ze=1===pe||2===pe&&"@index"in de&&!Oe,ft="@language"in ge,vt=j(de["@value"]),It=ge.mappings.has(se)&&null===ge.mappings.get(se)["@language"];if(Ze&&"@none"!==Ee&&(!ft||!vt||It))return de["@value"];const Ye={};return Oe&&(Ye[V.compactIri({activeCtx:ge,iri:"@index",relativeTo:{vocab:!0}})]=de["@index"]),"@type"in de?Ye[V.compactIri({activeCtx:ge,iri:"@type",relativeTo:{vocab:!0}})]=V.compactIri({activeCtx:ge,iri:de["@type"],relativeTo:{vocab:!0}}):"@language"in de&&(Ye[V.compactIri({activeCtx:ge,iri:"@language",relativeTo:{vocab:!0}})]=de["@language"]),"@direction"in de&&(Ye[V.compactIri({activeCtx:ge,iri:"@direction",relativeTo:{vocab:!0}})]=de["@direction"]),Ye[V.compactIri({activeCtx:ge,iri:"@value",relativeTo:{vocab:!0}})]=de["@value"],Ye}const Ie=J(ge,se,{vocab:!0},Ce),Ne=H(ge,se,"@type"),tt=V.compactIri({activeCtx:ge,iri:de["@id"],relativeTo:{vocab:"@vocab"===Ne},base:Ce.base});return"@id"===Ne||"@vocab"===Ne||"@graph"===Ie?tt:{[V.compactIri({activeCtx:ge,iri:"@id",relativeTo:{vocab:!0}})]:tt}}},5315(wt){"use strict";const Ve="http://www.w3.org/1999/02/22-rdf-syntax-ns#",oe="http://www.w3.org/2001/XMLSchema#";wt.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:Ve,RDF_LIST:Ve+"List",RDF_FIRST:Ve+"first",RDF_REST:Ve+"rest",RDF_NIL:Ve+"nil",RDF_TYPE:Ve+"type",RDF_PLAIN_LITERAL:Ve+"PlainLiteral",RDF_XML_LITERAL:Ve+"XMLLiteral",RDF_JSON_LITERAL:Ve+"JSON",RDF_OBJECT:Ve+"object",RDF_LANGSTRING:Ve+"langString",XSD:oe,XSD_BOOLEAN:oe+"boolean",XSD_DOUBLE:oe+"double",XSD_INTEGER:oe+"integer",XSD_STRING:oe+"string"}},429(wt,Ve,oe){"use strict";var O=oe(9293).default;const F=oe(9420),k=oe(262),{isArray:b,isObject:j,isString:T,isUndefined:S}=oe(2831),{isAbsolute:x,isRelative:G,prependBase:E}=oe(2051),{handleEvent:N}=oe(2585),{REGEX_BCP47:J,REGEX_KEYWORD:H,asArray:W,compareShortestLeast:ae}=oe(9420),L=new Map,P={};function ie(w,D,V,te,he,ge){if(null===D||!T(D)||P.isKeyword(D))return D;if(D.match(H))return null;if(te&&te.hasOwnProperty(D)&&!0!==he.get(D)&&P.createTermDefinition({activeCtx:w,localCtx:te,term:D,defined:he,options:ge}),(V=V||{}).vocab){const de=w.mappings.get(D);if(null===de)return null;if(j(de)&&"@id"in de)return de["@id"]}const se=D.indexOf(":");if(se>0){const de=D.substr(0,se),Ce=D.substr(se+1);if("_"===de||0===Ce.indexOf("//"))return D;te&&te.hasOwnProperty(de)&&P.createTermDefinition({activeCtx:w,localCtx:te,term:de,defined:he,options:ge});const Ie=w.mappings.get(de);if(Ie&&Ie._prefix)return Ie["@id"]+Ce;if(x(D))return D}if(V.vocab&&"@vocab"in w)D=w["@vocab"]+D;else if(V.base){let de,Ce;"@base"in w?w["@base"]?(Ce=E(ge.base,w["@base"]),de=E(Ce,D)):(Ce=w["@base"],de=D):(Ce=ge.base,de=E(ge.base,D)),D=de}return D}function Q(w,D){if(!w||"object"!=typeof w||!D||"object"!=typeof D)return w===D;const V=Array.isArray(w);if(V!==Array.isArray(D))return!1;if(V){if(w.length!==D.length)return!1;for(let ge=0;ge<w.length;++ge)if(!Q(w[ge],D[ge]))return!1;return!0}const te=Object.keys(w),he=Object.keys(D);if(te.length!==he.length)return!1;for(const ge in w){let se=w[ge],de=D[ge];if("@container"===ge&&Array.isArray(se)&&Array.isArray(de)&&(se=se.slice().sort(),de=de.slice().sort()),!Q(se,de))return!1}return!0}wt.exports=P,P.process=function(){var w=O(function*({activeCtx:D,localCtx:V,options:te,propagate:he=!0,overrideProtected:ge=!1,cycles:se=new Set}){if(j(V)&&"@context"in V&&b(V["@context"])&&(V=V["@context"]),0===W(V).length)return D;const Ce=[],Ie=[({event:fe,next:ye})=>{Ce.push(fe),ye()}];te.eventHandler&&Ie.push(te.eventHandler);const Ne=te;te={...te,eventHandler:Ie};const tt=yield te.contextResolver.resolve({activeCtx:D,context:V,documentLoader:te.documentLoader,base:te.base});j(tt[0].document)&&"boolean"==typeof tt[0].document["@propagate"]&&(he=tt[0].document["@propagate"]);let Ee=D;!he&&!Ee.previousContext&&(Ee=Ee.clone(),Ee.previousContext=D);for(const fe of tt){let{document:ye}=fe;if(D=Ee,null===ye){if(!ge&&0!==Object.keys(D.protected).length)throw new k("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});Ee=D=P.getInitialContext(te).clone();continue}const Ke=fe.getProcessed(D);if(Ke){if(Ne.eventHandler)for(const pe of Ke.events)N({event:pe,options:Ne});Ee=D=Ke.context;continue}if(j(ye)&&"@context"in ye&&(ye=ye["@context"]),!j(ye))throw new k("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:ye});Ee=Ee.clone();const Oe=new Map;if("@version"in ye){if(1.1!==ye["@version"])throw new k("Unsupported JSON-LD version: "+ye["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:ye});if(D.processingMode&&"json-ld-1.0"===D.processingMode)throw new k("@version: "+ye["@version"]+" not compatible with "+D.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:ye});Ee.processingMode="json-ld-1.1",Ee["@version"]=ye["@version"],Oe.set("@version",!0)}if(Ee.processingMode=Ee.processingMode||D.processingMode,"@base"in ye){let pe=ye["@base"];if(null!==pe&&!x(pe)){if(!G(pe))throw new k('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:ye});pe=E(Ee["@base"],pe)}Ee["@base"]=pe,Oe.set("@base",!0)}if("@vocab"in ye){const pe=ye["@vocab"];if(null===pe)delete Ee["@vocab"];else{if(!T(pe))throw new k('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:ye});if(!x(pe)&&P.processingMode(Ee,1))throw new k('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:ye});{const Ze=ie(Ee,pe,{vocab:!0,base:!0},void 0,void 0,te);x(Ze)||te.eventHandler&&N({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:Ze}},options:te}),Ee["@vocab"]=Ze}}Oe.set("@vocab",!0)}if("@language"in ye){const pe=ye["@language"];if(null===pe)delete Ee["@language"];else{if(!T(pe))throw new k('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:ye});pe.match(J)||te.eventHandler&&N({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:pe}},options:te}),Ee["@language"]=pe.toLowerCase()}Oe.set("@language",!0)}if("@direction"in ye){const pe=ye["@direction"];if("json-ld-1.0"===D.processingMode)throw new k("Invalid JSON-LD syntax; @direction not compatible with "+D.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:ye});if(null===pe)delete Ee["@direction"];else{if("ltr"!==pe&&"rtl"!==pe)throw new k('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:ye});Ee["@direction"]=pe}Oe.set("@direction",!0)}if("@propagate"in ye){const pe=ye["@propagate"];if("json-ld-1.0"===D.processingMode)throw new k("Invalid JSON-LD syntax; @propagate not compatible with "+D.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:ye});if("boolean"!=typeof pe)throw new k("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:V});Oe.set("@propagate",!0)}if("@import"in ye){const pe=ye["@import"];if("json-ld-1.0"===D.processingMode)throw new k("Invalid JSON-LD syntax; @import not compatible with "+D.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:ye});if(!T(pe))throw new k("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:V});const Ze=yield te.contextResolver.resolve({activeCtx:D,context:pe,documentLoader:te.documentLoader,base:te.base});if(1!==Ze.length)throw new k("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:V});const ft=Ze[0].getProcessed(D);if(ft)ye=ft;else{const vt=Ze[0].document;if("@import"in vt)throw new k("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:V});for(const It in vt)ye.hasOwnProperty(It)||(ye[It]=vt[It]);Ze[0].setProcessed(D,ye)}Oe.set("@import",!0)}Oe.set("@protected",ye["@protected"]||!1);for(const pe in ye)if(P.createTermDefinition({activeCtx:Ee,localCtx:ye,term:pe,defined:Oe,options:te,overrideProtected:ge}),j(ye[pe])&&"@context"in ye[pe]){const Ze=ye[pe]["@context"];let ft=!0;if(T(Ze)){const vt=E(te.base,Ze);se.has(vt)?ft=!1:se.add(vt)}if(ft)try{yield P.process({activeCtx:Ee.clone(),localCtx:ye[pe]["@context"],overrideProtected:!0,options:te,cycles:se})}catch{throw new k("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:ye[pe]["@context"],term:pe})}}fe.setProcessed(D,{context:Ee,events:Ce})}return Ee});return function(D){return w.apply(this,arguments)}}(),P.createTermDefinition=({activeCtx:w,localCtx:D,term:V,defined:te,options:he,overrideProtected:ge=!1})=>{if(te.has(V)){if(te.get(V))return;throw new k("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:D,term:V})}let se;if(te.set(V,!1),D.hasOwnProperty(V)&&(se=D[V]),"@type"===V&&j(se)&&"@set"===(se["@container"]||"@set")&&P.processingMode(w,1.1)){const fe=["@container","@id","@protected"],ye=Object.keys(se);if(0===ye.length||ye.some(Ke=>!fe.includes(Ke)))throw new k("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:D,term:V})}else{if(P.isKeyword(V))throw new k("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:D,term:V});if(V.match(H))return void(he.eventHandler&&N({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:V}},options:he}));if(""===V)throw new k("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:D})}const de=w.mappings.get(V);w.mappings.has(V)&&w.mappings.delete(V);let Ce=!1;if((T(se)||null===se)&&(Ce=!0,se={"@id":se}),!j(se))throw new k("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:D});const Ie={};w.mappings.set(V,Ie),Ie.reverse=!1;const Ne=["@container","@id","@language","@reverse","@type"];P.processingMode(w,1.1)&&Ne.push("@context","@direction","@index","@nest","@prefix","@protected");for(const fe in se)if(!Ne.includes(fe))throw new k("Invalid JSON-LD syntax; a term definition must not contain "+fe,"jsonld.SyntaxError",{code:"invalid term definition",context:D});const tt=V.indexOf(":");if(Ie._termHasColon=tt>0,"@reverse"in se){if("@id"in se)throw new k("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:D});if("@nest"in se)throw new k("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:D});const fe=se["@reverse"];if(!T(fe))throw new k("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:D});if(fe.match(H))return he.eventHandler&&N({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:fe}},options:he}),void(de?w.mappings.set(V,de):w.mappings.delete(V));const ye=ie(w,fe,{vocab:!0,base:!1},D,te,he);if(!x(ye))throw new k("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:D});Ie["@id"]=ye,Ie.reverse=!0}else if("@id"in se){let fe=se["@id"];if(fe&&!T(fe))throw new k("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:D});if(null===fe)Ie["@id"]=null;else{if(!P.isKeyword(fe)&&fe.match(H))return he.eventHandler&&N({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:fe}},options:he}),void(de?w.mappings.set(V,de):w.mappings.delete(V));if(fe!==V){if(fe=ie(w,fe,{vocab:!0,base:!1},D,te,he),!x(fe)&&!P.isKeyword(fe))throw new k("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:D});if(V.match(/(?::[^:])|\//)&&ie(w,V,{vocab:!0,base:!1},D,new Map(te).set(V,!0),he)!==fe)throw new k("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:D});Ie["@id"]=fe,Ie._prefix=Ce&&!Ie._termHasColon&&null!==fe.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in Ie))if(Ie._termHasColon){const fe=V.substr(0,tt);if(D.hasOwnProperty(fe)&&P.createTermDefinition({activeCtx:w,localCtx:D,term:fe,defined:te,options:he}),w.mappings.has(fe)){const ye=V.substr(tt+1);Ie["@id"]=w.mappings.get(fe)["@id"]+ye}else Ie["@id"]=V}else if("@type"===V)Ie["@id"]=V;else{if(!("@vocab"in w))throw new k("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:D,term:V});Ie["@id"]=w["@vocab"]+V}if((!0===se["@protected"]||!0===te.get("@protected")&&!1!==se["@protected"])&&(w.protected[V]=!0,Ie.protected=!0),te.set(V,!0),"@type"in se){let fe=se["@type"];if(!T(fe))throw new k("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:D});if("@json"===fe||"@none"===fe){if(P.processingMode(w,1))throw new k(`Invalid JSON-LD syntax; an @context @type value must not be "${fe}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:D})}else if("@id"!==fe&&"@vocab"!==fe){if(fe=ie(w,fe,{vocab:!0,base:!1},D,te,he),!x(fe))throw new k("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:D});if(0===fe.indexOf("_:"))throw new k("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:D})}Ie["@type"]=fe}if("@container"in se){const fe=T(se["@container"])?[se["@container"]]:se["@container"]||[],ye=["@list","@set","@index","@language"];let Ke=!0;const Oe=fe.includes("@set");if(P.processingMode(w,1.1)){if(ye.push("@graph","@id","@type"),fe.includes("@list")){if(1!==fe.length)throw new k("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:D})}else if(fe.includes("@graph")){if(fe.some(pe=>"@graph"!==pe&&"@id"!==pe&&"@index"!==pe&&"@set"!==pe))throw new k("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:D})}else Ke&=fe.length<=(Oe?2:1);if(fe.includes("@type")&&(Ie["@type"]=Ie["@type"]||"@id",!["@id","@vocab"].includes(Ie["@type"])))throw new k("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:D})}else Ke&=!b(se["@container"]),Ke&=fe.length<=1;if(Ke&=fe.every(pe=>ye.includes(pe)),Ke&=!(Oe&&fe.includes("@list")),!Ke)throw new k("Invalid JSON-LD syntax; @context @container value must be one of the following: "+ye.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:D});if(Ie.reverse&&!fe.every(pe=>["@index","@set"].includes(pe)))throw new k("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:D});Ie["@container"]=fe}if("@index"in se){if(!("@container"in se)||!Ie["@container"].includes("@index"))throw new k(`Invalid JSON-LD syntax; @index without @index in @container: "${se["@index"]}" on term "${V}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:D});if(!T(se["@index"])||0===se["@index"].indexOf("@"))throw new k(`Invalid JSON-LD syntax; @index must expand to an IRI: "${se["@index"]}" on term "${V}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:D});Ie["@index"]=se["@index"]}if("@context"in se&&(Ie["@context"]=se["@context"]),"@language"in se&&!("@type"in se)){let fe=se["@language"];if(null!==fe&&!T(fe))throw new k("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:D});null!==fe&&(fe=fe.toLowerCase()),Ie["@language"]=fe}if("@prefix"in se){if(V.match(/:|\//))throw new k("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:D});if(P.isKeyword(Ie["@id"]))throw new k("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:D});if("boolean"!=typeof se["@prefix"])throw new k("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:D});Ie._prefix=!0===se["@prefix"]}if("@direction"in se){const fe=se["@direction"];if(null!==fe&&"ltr"!==fe&&"rtl"!==fe)throw new k('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:D});Ie["@direction"]=fe}if("@nest"in se){const fe=se["@nest"];if(!T(fe)||"@nest"!==fe&&0===fe.indexOf("@"))throw new k("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:D});Ie["@nest"]=fe}const Ee=Ie["@id"];if("@context"===Ee||"@preserve"===Ee)throw new k("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:D});if(de&&de.protected&&!ge&&(w.protected[V]=!0,Ie.protected=!0,!Q(de,Ie)))throw new k("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:D,term:V})},P.expandIri=(w,D,V,te)=>ie(w,D,V,void 0,void 0,te),P.getInitialContext=w=>{const D=JSON.stringify({processingMode:w.processingMode}),V=L.get(D);if(V)return V;const te={processingMode:w.processingMode,mappings:new Map,inverse:null,getInverse:function he(){const Ie=this;if(Ie.inverse)return Ie.inverse;const Ne=Ie.inverse={},tt=Ie.fastCurieMap={},Ee={},fe=(Ie["@language"]||"@none").toLowerCase(),ye=Ie["@direction"],Ke=Ie.mappings,Oe=[...Ke.keys()].sort(ae);for(const pe of Oe){const Ze=Ke.get(pe);if(null===Ze)continue;let ft=Ze["@container"]||"@none";if(ft=[].concat(ft).sort().join(""),null===Ze["@id"])continue;const vt=W(Ze["@id"]);for(const It of vt){let Ye=Ne[It];const st=P.isKeyword(It);if(Ye)!st&&!Ze._termHasColon&&Ee[It].push(pe);else if(Ne[It]=Ye={},!st&&!Ze._termHasColon){Ee[It]=[pe];const De={iri:It,terms:Ee[It]};It[0]in tt?tt[It[0]].push(De):tt[It[0]]=[De]}if(Ye[ft]||(Ye[ft]={"@language":{},"@type":{},"@any":{}}),Ye=Ye[ft],se(pe,Ye["@any"],"@none"),Ze.reverse)se(pe,Ye["@type"],"@reverse");else if("@none"===Ze["@type"])se(pe,Ye["@any"],"@none"),se(pe,Ye["@language"],"@none"),se(pe,Ye["@type"],"@none");else if("@type"in Ze)se(pe,Ye["@type"],Ze["@type"]);else if("@language"in Ze&&"@direction"in Ze){const De=Ze["@language"],Ae=Ze["@direction"];se(pe,Ye["@language"],De&&Ae?`${De}_${Ae}`.toLowerCase():De?De.toLowerCase():Ae?`_${Ae}`:"@null")}else"@language"in Ze?se(pe,Ye["@language"],(Ze["@language"]||"@null").toLowerCase()):"@direction"in Ze?se(pe,Ye["@language"],Ze["@direction"]?`_${Ze["@direction"]}`:"@none"):ye?(se(pe,Ye["@language"],`_${ye}`),se(pe,Ye["@language"],"@none"),se(pe,Ye["@type"],"@none")):(se(pe,Ye["@language"],fe),se(pe,Ye["@language"],"@none"),se(pe,Ye["@type"],"@none"))}}for(const pe in tt)ge(tt,pe,1);return Ne},clone:function de(){const Ie={};return Ie.mappings=F.clone(this.mappings),Ie.clone=this.clone,Ie.inverse=null,Ie.getInverse=this.getInverse,Ie.protected=F.clone(this.protected),this.previousContext&&(Ie.previousContext=this.previousContext.clone()),Ie.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(Ie["@base"]=this["@base"]),"@language"in this&&(Ie["@language"]=this["@language"]),"@vocab"in this&&(Ie["@vocab"]=this["@vocab"]),Ie},revertToPreviousContext:function Ce(){return this.previousContext?this.previousContext.clone():this},protected:{}};return 1e4===L.size&&L.clear(),L.set(D,te),te;function ge(Ie,Ne,tt){const Ee=Ie[Ne],fe=Ie[Ne]={};let ye,Ke;for(const Oe of Ee)ye=Oe.iri,Ke=tt>=ye.length?"":ye[tt],Ke in fe?fe[Ke].push(Oe):fe[Ke]=[Oe];for(const Oe in fe)""!==Oe&&ge(fe,Oe,tt+1)}function se(Ie,Ne,tt){Ne.hasOwnProperty(tt)||(Ne[tt]=Ie)}},P.getContextValue=(w,D,V)=>{if(null===D)return"@context"===V?void 0:null;if(w.mappings.has(D)){const te=w.mappings.get(D);if(S(V))return te;if(te.hasOwnProperty(V))return te[V]}return"@language"===V&&V in w||"@direction"===V&&V in w?w[V]:"@context"!==V?null:void 0},P.processingMode=(w,D)=>D.toString()>="1.1"?!w.processingMode||w.processingMode>="json-ld-"+D.toString():"json-ld-1.0"===w.processingMode,P.isKeyword=w=>{if(!T(w)||"@"!==w[0])return!1;switch(w){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},3120(wt,Ve,oe){"use strict";var O=oe(9293).default;const{parseLinkHeader:F,buildHeaders:k}=oe(9420),{LINK_HEADER_CONTEXT:b}=oe(5315),j=oe(262),T=oe(4808),{prependBase:S}=oe(2051),x=/(^|(\r\n))link:/i;wt.exports=({secure:E,headers:N={},xhr:J}={headers:{}})=>{return N=k(N),(new T).wrapLoader(W);function W(L){return ae.apply(this,arguments)}function ae(){return ae=O(function*(L){if(0!==L.indexOf("http:")&&0!==L.indexOf("https:"))throw new j('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:L});if(E&&0!==L.indexOf("https"))throw new j('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:L});let Z;try{Z=yield function G(E,N,J){const H=new(E=E||XMLHttpRequest);return new Promise((W,ae)=>{H.onload=()=>W(H),H.onerror=L=>ae(L),H.open("GET",N,!0);for(const L in J)H.setRequestHeader(L,J[L]);H.send()})}(J,L,N)}catch(D){throw new j("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:L,cause:D})}if(Z.status>=400)throw new j("URL could not be dereferenced: "+Z.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:L,httpStatusCode:Z.status});let P={contextUrl:null,documentUrl:L,document:Z.response},ie=null;const Q=Z.getResponseHeader("Content-Type");let w;if(x.test(Z.getAllResponseHeaders())&&(w=Z.getResponseHeader("Link")),w&&"application/ld+json"!==Q){const D=F(w),V=D[b];if(Array.isArray(V))throw new j("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:L});V&&(P.contextUrl=V.target),ie=D.alternate,ie&&"application/ld+json"==ie.type&&!(Q||"").match(/^application\/(\w*\+)?json$/)&&(P=yield W(S(L,ie.target)))}return P}),ae.apply(this,arguments)}}},2585(wt,Ve,oe){"use strict";const O=oe(262),{isArray:F}=oe(2831),{asArray:k}=oe(9420),b={};function j({event:S,handlers:x}){let G=!0;for(let E=0;G&&E<x.length;++E){G=!1;const N=x[E];if(F(N))G=j({event:S,handlers:N});else if("function"==typeof N)N({event:S,next:()=>{G=!0}});else{if("object"!=typeof N)throw new O("Invalid event handler.","jsonld.InvalidEventHandler",{event:S});S.code in N?N[S.code]({event:S,next:()=>{G=!0}}):G=!0}}return G}wt.exports=b,b.defaultEventHandler=null,b.setupEventHandler=({options:S={}})=>{const x=[].concat(S.safe?b.safeEventHandler:[],S.eventHandler?k(S.eventHandler):[],b.defaultEventHandler?b.defaultEventHandler:[]);return 0===x.length?null:x},b.handleEvent=({event:S,options:x})=>{j({event:S,handlers:x.eventHandler})};const T=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);b.safeEventHandler=function({event:x,next:G}){if("warning"===x.level&&T.has(x.code))throw new O("Safe mode validation error.","jsonld.ValidationError",{event:x});G()},b.logEventHandler=function({event:x,next:G}){console.log(`EVENT: ${x.message}`,{event:x}),G()},b.logWarningEventHandler=function({event:x,next:G}){"warning"===x.level&&console.warn(`WARNING: ${x.message}`,{event:x}),G()},b.unhandledEventHandler=function({event:x}){throw new O("No handler for event.","jsonld.UnhandledEvent",{event:x})},b.setDefaultEventHandler=function({eventHandler:S}={}){b.defaultEventHandler=S?k(S):null}},7336(wt,Ve,oe){"use strict";var O=oe(9293).default;const F=oe(262),{isArray:k,isObject:b,isEmptyObject:j,isString:T,isUndefined:S}=oe(2831),{isList:x,isValue:G,isGraph:E,isSubject:N}=oe(4209),{expandIri:J,getContextValue:H,isKeyword:W,process:ae,processingMode:L}=oe(429),{isAbsolute:Z}=oe(2051),{REGEX_BCP47:P,REGEX_KEYWORD:ie,addValue:Q,asArray:w,getValues:D,validateTypeValue:V}=oe(9420),{handleEvent:te}=oe(2585),he={};function ge({value:Ee,count:fe,options:ye}){if(0===fe||"@value"in Ee||"@list"in Ee||1===fe&&"@id"in Ee){if(ye.eventHandler){let Ke,Oe;0===fe?(Ke="empty object",Oe="Dropping empty object."):"@value"in Ee?(Ke="object with only @value",Oe="Dropping object with only @value."):"@list"in Ee?(Ke="object with only @list",Oe="Dropping object with only @list."):1===fe&&"@id"in Ee&&(Ke="object with only @id",Oe="Dropping object with only @id."),te({event:{type:["JsonLdEvent"],code:Ke,level:"warning",message:Oe,details:{value:Ee}},options:ye})}return null}return Ee}function se(Ee){return de.apply(this,arguments)}function de(){return(de=O(function*({activeCtx:Ee,activeProperty:fe,expandedActiveProperty:ye,element:Ke,expandedParent:Oe,options:pe={},insideList:Ze,typeKey:ft,typeScopedContext:vt}){const It=Object.keys(Ke).sort(),Ye=[];let st;const De=Ke[ft]&&"@json"===J(Ee,k(Ke[ft])?Ke[ft][0]:Ke[ft],{vocab:!0},{...pe,typeExpansion:!0});for(const Ae of It){let Rt,pt=Ke[Ae];if("@context"===Ae)continue;const ht=J(Ee,Ae,{vocab:!0},pe);if(null===ht||!Z(ht)&&!W(ht)){pe.eventHandler&&te({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:Ae,expandedProperty:ht}},options:pe});continue}if(W(ht)){if("@reverse"===ye)throw new F("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:pt});if(ht in Oe&&"@included"!==ht&&"@type"!==ht)throw new F("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:ht})}if("@id"===ht){if(!T(pt)){if(!pe.isFrame)throw new F('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:pt});if(b(pt)){if(!j(pt))throw new F('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:pt})}else{if(!k(pt))throw new F('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:pt});if(!pt.every(Pt=>T(Pt)))throw new F('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:pt})}}Q(Oe,"@id",w(pt).map(Pt=>{if(T(Pt)){const dr=J(Ee,Pt,{base:!0},pe);return pe.eventHandler&&(null===dr?te(null===Pt?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:Pt}},options:pe}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:Pt}},options:pe}):Z(dr)||te({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:Pt,expandedId:dr}},options:pe})),dr}return Pt}),{propertyIsArray:pe.isFrame});continue}if("@type"===ht){b(pt)&&(pt=Object.fromEntries(Object.entries(pt).map(([Pt,dr])=>[J(vt,Pt,{vocab:!0}),w(dr).map(Ar=>J(vt,Ar,{base:!0,vocab:!0},{...pe,typeExpansion:!0}))]))),V(pt,pe.isFrame),Q(Oe,"@type",w(pt).map(Pt=>{if(T(Pt)){const dr=J(vt,Pt,{base:!0,vocab:!0},{...pe,typeExpansion:!0});return"@json"!==dr&&!Z(dr)&&pe.eventHandler&&te({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:Pt}},options:pe}),dr}return Pt}),{propertyIsArray:!!pe.isFrame});continue}if("@included"===ht&&L(Ee,1.1)){const Pt=w(yield he.expand({activeCtx:Ee,activeProperty:fe,element:pt,options:pe}));if(!Pt.every(dr=>N(dr)))throw new F("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:pt});Q(Oe,"@included",Pt,{propertyIsArray:!0});continue}if("@graph"===ht&&!b(pt)&&!k(pt))throw new F('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:pt});if("@value"===ht){st=pt,De&&L(Ee,1.1)?Oe["@value"]=pt:Q(Oe,"@value",pt,{propertyIsArray:pe.isFrame});continue}if("@language"===ht){if(null===pt)continue;if(!T(pt)&&!pe.isFrame)throw new F('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:pt});pt=w(pt).map(Pt=>T(Pt)?Pt.toLowerCase():Pt);for(const Pt of pt)T(Pt)&&!Pt.match(P)&&pe.eventHandler&&te({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:Pt}},options:pe});Q(Oe,"@language",pt,{propertyIsArray:pe.isFrame});continue}if("@direction"===ht){if(!T(pt)&&!pe.isFrame)throw new F('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:pt});pt=w(pt);for(const Pt of pt)if(T(Pt)&&"ltr"!==Pt&&"rtl"!==Pt)throw new F('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:pt});Q(Oe,"@direction",pt,{propertyIsArray:pe.isFrame});continue}if("@index"===ht){if(!T(pt))throw new F('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:pt});Q(Oe,"@index",pt);continue}if("@reverse"===ht){if(!b(pt))throw new F('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:pt});if(Rt=yield he.expand({activeCtx:Ee,activeProperty:"@reverse",element:pt,options:pe}),"@reverse"in Rt)for(const dr in Rt["@reverse"])Q(Oe,dr,Rt["@reverse"][dr],{propertyIsArray:!0});let Pt=Oe["@reverse"]||null;for(const dr in Rt){if("@reverse"===dr)continue;null===Pt&&(Pt=Oe["@reverse"]={}),Q(Pt,dr,[],{propertyIsArray:!0});const Ar=Rt[dr];for(let nn=0;nn<Ar.length;++nn){const Yn=Ar[nn];if(G(Yn)||x(Yn))throw new F('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:Rt});Q(Pt,dr,Yn,{propertyIsArray:!0})}}continue}if("@nest"===ht){Ye.push(Ae);continue}let Dt=Ee;const rr=H(Ee,Ae,"@context");S(rr)||(Dt=yield ae({activeCtx:Ee,localCtx:rr,propagate:!0,overrideProtected:!0,options:pe}));const pr=H(Ee,Ae,"@container")||[];if(pr.includes("@language")&&b(pt))Rt=Ie(Dt,pt,H(Dt,Ae,"@direction"),pe);else if(pr.includes("@index")&&b(pt)){const Pt=pr.includes("@graph"),dr=H(Dt,Ae,"@index")||"@index",Ar="@index"!==dr&&J(Ee,dr,{vocab:!0},pe);Rt=yield Ne({activeCtx:Dt,options:pe,activeProperty:Ae,value:pt,asGraph:Pt,indexKey:dr,propertyIndex:Ar})}else if(pr.includes("@id")&&b(pt)){const Pt=pr.includes("@graph");Rt=yield Ne({activeCtx:Dt,options:pe,activeProperty:Ae,value:pt,asGraph:Pt,indexKey:"@id"})}else if(pr.includes("@type")&&b(pt))Rt=yield Ne({activeCtx:Dt.revertToPreviousContext(),options:pe,activeProperty:Ae,value:pt,asGraph:!1,indexKey:"@type"});else{const Pt="@list"===ht;if(Pt||"@set"===ht){let dr=fe;Pt&&"@graph"===ye&&(dr=null),Rt=yield he.expand({activeCtx:Dt,activeProperty:dr,element:pt,options:pe,insideList:Pt})}else Rt="@json"===H(Ee,Ae,"@type")?{"@type":"@json","@value":pt}:yield he.expand({activeCtx:Dt,activeProperty:Ae,element:pt,options:pe,insideList:!1})}if(null!==Rt||"@value"===ht){if("@list"!==ht&&!x(Rt)&&pr.includes("@list")&&(Rt={"@list":w(Rt)}),pr.includes("@graph")&&!pr.some(Pt=>"@id"===Pt||"@index"===Pt)){if(Rt=w(Rt),pe.isFrame||(Rt=Rt.filter(Pt=>null!==ge({value:Pt,count:Object.keys(Pt).length,options:pe}))),0===Rt.length)continue;Rt=Rt.map(Pt=>({"@graph":w(Pt)}))}if(Dt.mappings.has(Ae)&&Dt.mappings.get(Ae).reverse){const Pt=Oe["@reverse"]=Oe["@reverse"]||{};Rt=w(Rt);for(let dr=0;dr<Rt.length;++dr){const Ar=Rt[dr];if(G(Ar)||x(Ar))throw new F('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:Rt});Q(Pt,ht,Ar,{propertyIsArray:!0})}continue}Q(Oe,ht,Rt,{propertyIsArray:!0})}}if("@value"in Oe&&("@json"!==Oe["@type"]||!L(Ee,1.1))&&(b(st)||k(st))&&!pe.isFrame)throw new F('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:st});for(const Ae of Ye){const pt=k(Ke[Ae])?Ke[Ae]:[Ke[Ae]];for(const Rt of pt){if(!b(Rt)||Object.keys(Rt).some(ht=>"@value"===J(Ee,ht,{vocab:!0},pe)))throw new F("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:Rt});yield se({activeCtx:Ee,activeProperty:fe,expandedActiveProperty:ye,element:Rt,expandedParent:Oe,options:pe,insideList:Ze,typeScopedContext:vt,typeKey:ft})}}})).apply(this,arguments)}function Ce({activeCtx:Ee,activeProperty:fe,value:ye,options:Ke}){if(null==ye)return null;const Oe=J(Ee,fe,{vocab:!0},Ke);if("@id"===Oe)return J(Ee,ye,{base:!0},Ke);if("@type"===Oe)return J(Ee,ye,{vocab:!0,base:!0},{...Ke,typeExpansion:!0});const pe=H(Ee,fe,"@type");if(("@id"===pe||"@graph"===Oe)&&T(ye)){const ft=J(Ee,ye,{base:!0},Ke);return null===ft&&ye.match(ie)&&Ke.eventHandler&&te({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:fe}},options:Ke}),{"@id":ft}}if("@vocab"===pe&&T(ye))return{"@id":J(Ee,ye,{vocab:!0,base:!0},Ke)};if(W(Oe))return ye;const Ze={};if(pe&&!["@id","@vocab","@none"].includes(pe))Ze["@type"]=pe;else if(T(ye)){const ft=H(Ee,fe,"@language");null!==ft&&(Ze["@language"]=ft);const vt=H(Ee,fe,"@direction");null!==vt&&(Ze["@direction"]=vt)}return["boolean","number","string"].includes(typeof ye)||(ye=ye.toString()),Ze["@value"]=ye,Ze}function Ie(Ee,fe,ye,Ke){const Oe=[],pe=Object.keys(fe).sort();for(const Ze of pe){const ft=J(Ee,Ze,{vocab:!0},Ke);let vt=fe[Ze];k(vt)||(vt=[vt]);for(const It of vt){if(null===It)continue;if(!T(It))throw new F("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:fe});const Ye={"@value":It};"@none"!==ft&&(Ze.match(P)||Ke.eventHandler&&te({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:Ze}},options:Ke}),Ye["@language"]=Ze.toLowerCase()),ye&&(Ye["@direction"]=ye),Oe.push(Ye)}}return Oe}function Ne(Ee){return tt.apply(this,arguments)}function tt(){return(tt=O(function*({activeCtx:Ee,options:fe,activeProperty:ye,value:Ke,asGraph:Oe,indexKey:pe,propertyIndex:Ze}){const ft=[],vt=Object.keys(Ke).sort(),It="@type"===pe;for(let Ye of vt){if(It){const Ae=H(Ee,Ye,"@context");S(Ae)||(Ee=yield ae({activeCtx:Ee,localCtx:Ae,propagate:!1,options:fe}))}let De,st=Ke[Ye];k(st)||(st=[st]),st=yield he.expand({activeCtx:Ee,activeProperty:ye,element:st,options:fe,insideList:!1,insideIndex:!0}),De=Ze?"@none"===Ye?"@none":Ce({activeCtx:Ee,activeProperty:pe,value:Ye,options:fe}):J(Ee,Ye,{vocab:!0},fe),"@id"===pe?Ye=J(Ee,Ye,{base:!0},fe):It&&(Ye=De);for(let Ae of st){if(Oe&&!E(Ae)&&(Ae={"@graph":[Ae]}),"@type"===pe)"@none"===De||(Ae["@type"]=Ae["@type"]?[Ye].concat(Ae["@type"]):[Ye]);else{if(G(Ae)&&!["@language","@type","@index"].includes(pe))throw new F(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${pe}".`,"jsonld.SyntaxError",{code:"invalid value object",value:Ae});Ze?"@none"!==De&&Q(Ae,Ze,De,{propertyIsArray:!0,prependValue:!0}):"@none"!==De&&!(pe in Ae)&&(Ae[pe]=Ye)}ft.push(Ae)}}return ft})).apply(this,arguments)}wt.exports=he,he.expand=function(){var Ee=O(function*({activeCtx:fe,activeProperty:ye=null,element:Ke,options:Oe={},insideList:pe=!1,insideIndex:Ze=!1,typeScopedContext:ft=null}){if(null==Ke)return null;if("@default"===ye&&(Oe=Object.assign({},Oe,{isFrame:!1})),!k(Ke)&&!b(Ke))return pe||null!==ye&&"@graph"!==J(fe,ye,{vocab:!0},Oe)?Ce({activeCtx:fe,activeProperty:ye,value:Ke,options:Oe}):(Oe.eventHandler&&te({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:Ke}},options:Oe}),null);if(k(Ke)){let Rt=[];const ht=H(fe,ye,"@container")||[];pe=pe||ht.includes("@list");for(let Dt=0;Dt<Ke.length;++Dt){let rr=yield he.expand({activeCtx:fe,activeProperty:ye,element:Ke[Dt],options:Oe,insideIndex:Ze,typeScopedContext:ft});pe&&k(rr)&&(rr={"@list":rr}),null!==rr&&(k(rr)?Rt=Rt.concat(rr):Rt.push(rr))}return Rt}const vt=J(fe,ye,{vocab:!0},Oe),It=H(fe,ye,"@context");ft=ft||(fe.previousContext?fe:null);let Ye=Object.keys(Ke).sort(),st=!Ze;if(st&&ft&&Ye.length<=2&&!Ye.includes("@context"))for(const Rt of Ye){const ht=J(ft,Rt,{vocab:!0},Oe);if("@value"===ht){st=!1,fe=ft;break}if("@id"===ht&&1===Ye.length){st=!1;break}}st&&(fe=fe.revertToPreviousContext()),S(It)||(fe=yield ae({activeCtx:fe,localCtx:It,propagate:!0,overrideProtected:!0,options:Oe})),"@context"in Ke&&(fe=yield ae({activeCtx:fe,localCtx:Ke["@context"],options:Oe})),ft=fe;let De=null;for(const Rt of Ye)if("@type"===J(fe,Rt,{vocab:!0},Oe)){De=De||Rt;const Dt=Ke[Rt],rr=Array.isArray(Dt)?Dt.length>1?Dt.slice().sort():Dt:[Dt];for(const pr of rr){const Pt=H(ft,pr,"@context");S(Pt)||(fe=yield ae({activeCtx:fe,localCtx:Pt,options:Oe,propagate:!1}))}}let Ae={};yield se({activeCtx:fe,activeProperty:ye,expandedActiveProperty:vt,element:Ke,expandedParent:Ae,options:Oe,insideList:pe,typeKey:De,typeScopedContext:ft}),Ye=Object.keys(Ae);let pt=Ye.length;if("@value"in Ae){if("@type"in Ae&&("@language"in Ae||"@direction"in Ae))throw new F('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:Ae});let Rt=pt-1;if("@type"in Ae&&(Rt-=1),"@index"in Ae&&(Rt-=1),"@language"in Ae&&(Rt-=1),"@direction"in Ae&&(Rt-=1),0!==Rt)throw new F('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:Ae});const ht=null===Ae["@value"]?[]:w(Ae["@value"]),Dt=D(Ae,"@type");if(!L(fe,1.1)||!Dt.includes("@json")||1!==Dt.length)if(0===ht.length)Oe.eventHandler&&te({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:Ae}},options:Oe}),Ae=null;else{if(!ht.every(rr=>T(rr)||j(rr))&&"@language"in Ae)throw new F("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:Ae});if(!Dt.every(rr=>Z(rr)&&!(T(rr)&&0===rr.indexOf("_:"))||j(rr)))throw new F('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:Ae})}}else if("@type"in Ae&&!k(Ae["@type"]))Ae["@type"]=[Ae["@type"]];else if("@set"in Ae||"@list"in Ae){if(pt>1&&(2!==pt||!("@index"in Ae)))throw new F('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:Ae});"@set"in Ae&&(Ae=Ae["@set"],Ye=Object.keys(Ae),pt=Ye.length)}else 1===pt&&"@language"in Ae&&(Oe.eventHandler&&te({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:Ae}},options:Oe}),Ae=null);return b(Ae)&&!Oe.keepFreeFloatingNodes&&!pe&&(null===ye||"@graph"===vt||(H(fe,ye,"@container")||[]).includes("@graph"))&&(Ae=ge({value:Ae,count:pt,options:Oe})),Ae});return function(fe){return Ee.apply(this,arguments)}}()},9392(wt,Ve,oe){"use strict";const{isSubjectReference:O}=oe(4209),{createMergedNodeMap:F}=oe(5096),k={};wt.exports=k,k.flatten=b=>{const j=F(b),T=[],S=Object.keys(j).sort();for(let x=0;x<S.length;++x){const G=j[S[x]];O(G)||T.push(G)}return T}},7031(wt,Ve,oe){"use strict";const{isKeyword:O}=oe(429),F=oe(4209),k=oe(2831),b=oe(9420),j=oe(2051),T=oe(262),{createNodeMap:S,mergeNodeMapGraphs:x}=oe(5096),G={};function E(w){const D={};for(const V in w)void 0!==w[V]&&(D["@"+V]=[w[V]]);return[D]}function N(w,D,V){for(let te=V.length-1;te>=0;--te){const he=V[te];if(he.graph===D&&he.subject["@id"]===w["@id"])return!0}return!1}function J(w,D,V){const te="@"+V;let he=te in w?w[te][0]:D[V];if("embed"===V)if(!0===he)he="@once";else if(!1===he)he="@never";else if("@always"!==he&&"@never"!==he&&"@link"!==he&&"@first"!==he&&"@last"!==he&&"@once"!==he)throw new T("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:w});return he}function H(w){if(!k.isArray(w)||1!==w.length||!k.isObject(w[0]))throw new T("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:w});if("@id"in w[0])for(const D of b.asArray(w[0]["@id"]))if(!k.isObject(D)&&!j.isAbsolute(D)||k.isString(D)&&0===D.indexOf("_:"))throw new T("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:w});if("@type"in w[0])for(const D of b.asArray(w[0]["@type"]))if(!k.isObject(D)&&!j.isAbsolute(D)&&"@json"!==D||k.isString(D)&&0===D.indexOf("_:"))throw new T("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:w})}function ae(w,D,V,te){let he=!0,ge=!1;for(const se in V){let de=!1;const Ce=b.getValues(D,se),Ie=0===b.getValues(V,se).length;if("@id"===se){if(k.isEmptyObject(V["@id"][0]||{})?de=!0:V["@id"].length>=0&&(de=V["@id"].includes(Ce[0])),!te.requireAll)return de}else if("@type"===se){if(he=!1,Ie){if(Ce.length>0)return!1;de=!0}else if(1===V["@type"].length&&k.isEmptyObject(V["@type"][0]))de=Ce.length>0;else for(const Ne of V["@type"])de=!(!k.isObject(Ne)||!("@default"in Ne))||de||Ce.some(tt=>tt===Ne);if(!te.requireAll)return de}else{if(O(se))continue;{const Ne=b.getValues(V,se)[0];let tt=!1;if(Ne&&(H([Ne]),tt="@default"in Ne),he=!1,0===Ce.length&&tt)continue;if(Ce.length>0&&Ie)return!1;if(void 0===Ne){if(Ce.length>0)return!1;de=!0}else if(F.isList(Ne)){const Ee=Ne["@list"][0];if(F.isList(Ce[0])){const fe=Ce[0]["@list"];F.isValue(Ee)?de=fe.some(ye=>Q(Ee,ye)):(F.isSubject(Ee)||F.isSubjectReference(Ee))&&(de=fe.some(ye=>ie(w,Ee,ye,te)))}}else de=F.isValue(Ne)?Ce.some(Ee=>Q(Ne,Ee)):F.isSubjectReference(Ne)?Ce.some(Ee=>ie(w,Ne,Ee,te)):!!k.isObject(Ne)&&Ce.length>0}}if(!de&&te.requireAll)return!1;ge=ge||de}return he||ge}function L(w,D){const V=w.uniqueEmbeds[w.graph],te=V[D],he=te.parent,ge=te.property,se={"@id":D};if(k.isArray(he)){for(let Ce=0;Ce<he.length;++Ce)if(b.compareValues(he[Ce],se)){he[Ce]=se;break}}else{const Ce=k.isArray(he[ge]);b.removeValue(he,ge,se,{propertyIsArray:Ce}),b.addValue(he,ge,se,{propertyIsArray:Ce})}const de=Ce=>{const Ie=Object.keys(V);for(const Ne of Ie)Ne in V&&k.isObject(V[Ne].parent)&&V[Ne].parent["@id"]===Ce&&(delete V[Ne],de(Ne))};de(D)}function Z(w,D){if(k.isArray(w))return w.map(V=>Z(V,D));if(k.isObject(w)){if("@preserve"in w)return w["@preserve"][0];if(F.isValue(w))return w;if(F.isList(w))return w["@list"]=Z(w["@list"],D),w;if("@id"in w){const V=w["@id"];if(D.link.hasOwnProperty(V)){const te=D.link[V].indexOf(w);if(-1!==te)return D.link[V][te];D.link[V].push(w)}else D.link[V]=[w]}for(const V in w)"@id"===V&&D.bnodesToClear.includes(w[V])?delete w["@id"]:w[V]=Z(w[V],D)}return w}function P(w,D,V){k.isObject(w)?b.addValue(w,D,V,{propertyIsArray:!0}):w.push(V)}function ie(w,D,V,te){if(!("@id"in V))return!1;const he=w.subjects[V["@id"]];return he&&ae(w,he,D,te)}function Q(w,D){const V=D["@value"],te=D["@type"],he=D["@language"],ge=w["@value"]?k.isArray(w["@value"])?w["@value"]:[w["@value"]]:[],se=w["@type"]?k.isArray(w["@type"])?w["@type"]:[w["@type"]]:[],de=w["@language"]?k.isArray(w["@language"])?w["@language"]:[w["@language"]]:[];return 0===ge.length&&0===se.length&&0===de.length||!(!ge.includes(V)&&!k.isEmptyObject(ge[0])||!(!te&&0===se.length||se.includes(te)||te&&k.isEmptyObject(se[0]))||!(!he&&0===de.length||de.includes(he)||he&&k.isEmptyObject(de[0])))}wt.exports=G,G.frameMergedOrDefault=(w,D,V)=>{const te={options:V,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},he=new b.IdentifierIssuer("_:b");S(w,te.graphMap,"@default",he),V.merged&&(te.graphMap["@merged"]=x(te.graphMap),te.graph="@merged"),te.subjects=te.graphMap[te.graph];const ge=[];return G.frame(te,Object.keys(te.subjects).sort(),D,ge),V.pruneBlankNodeIdentifiers&&(V.bnodesToClear=Object.keys(te.bnodeMap).filter(se=>1===te.bnodeMap[se].length)),V.link={},Z(ge,V)},G.frame=(w,D,V,te,he=null)=>{H(V);const ge=w.options,se={embed:J(V=V[0],ge,"embed"),explicit:J(V,ge,"explicit"),requireAll:J(V,ge,"requireAll")};w.link.hasOwnProperty(w.graph)||(w.link[w.graph]={});const de=w.link[w.graph],Ce=function W(w,D,V,te){const he={};for(const ge of D){const se=w.graphMap[w.graph][ge];ae(w,se,V,te)&&(he[ge]=se)}return he}(w,D,V,se),Ie=Object.keys(Ce).sort();for(const Ne of Ie){const tt=Ce[Ne];if(null===he?w.uniqueEmbeds={[w.graph]:{}}:w.uniqueEmbeds[w.graph]=w.uniqueEmbeds[w.graph]||{},"@link"===se.embed&&Ne in de){P(te,he,de[Ne]);continue}const Ee={"@id":Ne};if(0===Ne.indexOf("_:")&&b.addValue(w.bnodeMap,Ne,Ee,{propertyIsArray:!0}),de[Ne]=Ee,("@first"===se.embed||"@last"===se.embed)&&w.is11)throw new T("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:V});if(w.embedded||!w.uniqueEmbeds[w.graph].hasOwnProperty(Ne)){if(w.embedded&&("@never"===se.embed||N(tt,w.graph,w.subjectStack))){P(te,he,Ee);continue}if(w.embedded&&("@first"==se.embed||"@once"==se.embed)&&w.uniqueEmbeds[w.graph].hasOwnProperty(Ne)){P(te,he,Ee);continue}if("@last"===se.embed&&Ne in w.uniqueEmbeds[w.graph]&&L(w,Ne),w.uniqueEmbeds[w.graph][Ne]={parent:te,property:he},w.subjectStack.push({subject:tt,graph:w.graph}),Ne in w.graphMap){let fe=!1,ye=null;"@graph"in V?(ye=V["@graph"][0],fe=!("@merged"===Ne||"@default"===Ne),k.isObject(ye)||(ye={})):(fe="@merged"!==w.graph,ye={}),fe&&G.frame({...w,graph:Ne,embedded:!1},Object.keys(w.graphMap[Ne]).sort(),[ye],Ee,"@graph")}"@included"in V&&G.frame({...w,embedded:!1},D,V["@included"],Ee,"@included");for(const fe of Object.keys(tt).sort())if(O(fe)){if(Ee[fe]=b.clone(tt[fe]),"@type"===fe)for(const ye of tt["@type"])0===ye.indexOf("_:")&&b.addValue(w.bnodeMap,ye,Ee,{propertyIsArray:!0})}else if(!se.explicit||fe in V)for(const ye of tt[fe]){const Ke=fe in V?V[fe]:E(se);if(F.isList(ye)){const Oe=V[fe]&&V[fe][0]&&V[fe][0]["@list"]?V[fe][0]["@list"]:E(se),pe={"@list":[]};P(Ee,fe,pe);const Ze=ye["@list"];for(const ft of Ze)F.isSubjectReference(ft)?G.frame({...w,embedded:!0},[ft["@id"]],Oe,pe,"@list"):P(pe,"@list",b.clone(ft))}else F.isSubjectReference(ye)?G.frame({...w,embedded:!0},[ye["@id"]],Ke,Ee,fe):Q(Ke[0],ye)&&P(Ee,fe,b.clone(ye))}for(const fe of Object.keys(V).sort()){if("@type"===fe){if(!k.isObject(V[fe][0])||!("@default"in V[fe][0]))continue}else if(O(fe))continue;const ye=V[fe][0]||{};if(!J(ye,ge,"omitDefault")&&!(fe in Ee)){let Oe="@null";"@default"in ye&&(Oe=b.clone(ye["@default"])),k.isArray(Oe)||(Oe=[Oe]),Ee[fe]=[{"@preserve":Oe}]}}for(const fe of Object.keys(V["@reverse"]||{}).sort()){const ye=V["@reverse"][fe];for(const Ke of Object.keys(w.subjects))b.getValues(w.subjects[Ke],fe).some(pe=>pe["@id"]===Ne)&&(Ee["@reverse"]=Ee["@reverse"]||{},b.addValue(Ee["@reverse"],fe,[],{propertyIsArray:!0}),G.frame({...w,embedded:!0},[Ke],ye,Ee["@reverse"][fe],he))}P(te,he,Ee),w.subjectStack.pop()}}},G.cleanupNull=(w,D)=>{if(k.isArray(w))return w.map(te=>G.cleanupNull(te,D)).filter(te=>te);if("@null"===w)return null;if(k.isObject(w)){if("@id"in w){const V=w["@id"];if(D.link.hasOwnProperty(V)){const te=D.link[V].indexOf(w);if(-1!==te)return D.link[V][te];D.link[V].push(w)}else D.link[V]=[w]}for(const V in w)w[V]=G.cleanupNull(w[V],D)}return w}},4814(wt,Ve,oe){"use strict";var O=oe(9293).default;const F=oe(262),k=oe(4209),b=oe(2831),{REGEX_BCP47:j,addValue:T}=oe(9420),{handleEvent:S}=oe(2585),{RDF_LIST:x,RDF_FIRST:G,RDF_REST:E,RDF_NIL:N,RDF_TYPE:J,RDF_JSON_LITERAL:H,XSD_BOOLEAN:W,XSD_DOUBLE:ae,XSD_INTEGER:L,XSD_STRING:Z}=oe(5315),P={};function ie(Q,w,D,V){if(Q.termType.endsWith("Node"))return{"@id":Q.value};const te={"@value":Q.value};if(Q.language)Q.language.match(j)||V.eventHandler&&S({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:Q.language}},options:V}),te["@language"]=Q.language;else{let he=Q.datatype.value;if(he||(he=Z),he===H){he="@json";try{te["@value"]=JSON.parse(te["@value"])}catch(ge){throw new F("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:te["@value"],cause:ge})}}if(w){if(he===W)"true"===te["@value"]?te["@value"]=!0:"false"===te["@value"]&&(te["@value"]=!1);else if(b.isNumeric(te["@value"]))if(he===L){const ge=parseInt(te["@value"],10);ge.toFixed(0)===te["@value"]&&(te["@value"]=ge)}else he===ae&&(te["@value"]=parseFloat(te["@value"]));[W,L,ae,Z].includes(he)||(te["@type"]=he)}else if("i18n-datatype"===D&&he.startsWith("https://www.w3.org/ns/i18n#")){const[,ge,se]=he.split(/[#_]/);ge.length>0&&(te["@language"]=ge,ge.match(j)||V.eventHandler&&S({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:ge}},options:V})),te["@direction"]=se}else he!==Z&&(te["@type"]=he)}return te}wt.exports=P,P.fromRDF=function(){var Q=O(function*(w,D){const{useRdfType:V=!1,useNativeTypes:te=!1,rdfDirection:he=null}=D,ge={},se={"@default":ge},de={};if(he){if("compound-literal"===he)throw new F("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:he});if("i18n-datatype"!==he)throw new F("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:he})}for(const Ne of w){const tt="DefaultGraph"===Ne.graph.termType?"@default":Ne.graph.value;tt in se||(se[tt]={}),"@default"!==tt&&!(tt in ge)&&(ge[tt]={"@id":tt});const Ee=se[tt],fe=Ne.subject.value,ye=Ne.predicate.value,Ke=Ne.object;fe in Ee||(Ee[fe]={"@id":fe});const Oe=Ee[fe],pe=Ke.termType.endsWith("Node");if(pe&&!(Ke.value in Ee)&&(Ee[Ke.value]={"@id":Ke.value}),ye===J&&!V&&pe){T(Oe,"@type",Ke.value,{propertyIsArray:!0});continue}const Ze=ie(Ke,te,he,D);if(T(Oe,ye,Ze,{propertyIsArray:!0}),pe)if(Ke.value===N){const ft=Ee[Ke.value];"usages"in ft||(ft.usages=[]),ft.usages.push({node:Oe,property:ye,value:Ze})}else de[Ke.value]=!(Ke.value in de)&&{node:Oe,property:ye,value:Ze}}for(const Ne in se){const tt=se[Ne];if(!(N in tt))continue;const Ee=tt[N];if(Ee.usages){for(let fe of Ee.usages){let ye=fe.node,Ke=fe.property,Oe=fe.value;const pe=[],Ze=[];let ft=Object.keys(ye).length;for(;Ke===E&&b.isObject(de[ye["@id"]])&&b.isArray(ye[G])&&1===ye[G].length&&b.isArray(ye[E])&&1===ye[E].length&&(3===ft||4===ft&&b.isArray(ye["@type"])&&1===ye["@type"].length&&ye["@type"][0]===x)&&(pe.push(ye[G][0]),Ze.push(ye["@id"]),fe=de[ye["@id"]],ye=fe.node,Ke=fe.property,Oe=fe.value,ft=Object.keys(ye).length,k.isBlankNode(ye)););delete Oe["@id"],Oe["@list"]=pe.reverse();for(const vt of Ze)delete tt[vt]}delete Ee.usages}}const Ce=[],Ie=Object.keys(ge).sort();for(const Ne of Ie){const tt=ge[Ne];if(Ne in se){const Ee=tt["@graph"]=[],fe=se[Ne],ye=Object.keys(fe).sort();for(const Ke of ye){const Oe=fe[Ke];k.isSubjectReference(Oe)||Ee.push(Oe)}}k.isSubjectReference(tt)||Ce.push(tt)}return Ce});return function(w,D){return Q.apply(this,arguments)}}()},4209(wt,Ve,oe){"use strict";const O=oe(2831),F={};wt.exports=F,F.isSubject=k=>!(!O.isObject(k)||"@value"in k||"@set"in k||"@list"in k)&&(Object.keys(k).length>1||!("@id"in k)),F.isSubjectReference=k=>O.isObject(k)&&1===Object.keys(k).length&&"@id"in k,F.isValue=k=>O.isObject(k)&&"@value"in k,F.isList=k=>O.isObject(k)&&"@list"in k,F.isGraph=k=>O.isObject(k)&&"@graph"in k&&1===Object.keys(k).filter(b=>"@id"!==b&&"@index"!==b).length,F.isSimpleGraph=k=>F.isGraph(k)&&!("@id"in k),F.isBlankNode=k=>{if(O.isObject(k)){if("@id"in k){const b=k["@id"];return!O.isString(b)||0===b.indexOf("_:")}return 0===Object.keys(k).length||!("@value"in k||"@set"in k||"@list"in k)}return!1}},2130(wt,Ve,oe){var O=oe(9293).default;const F=oe(1224),k=oe(8666),b=oe(9420),j=oe(7839),T=b.IdentifierIssuer,S=oe(262),x=oe(3052),G=oe(5426),{expand:E}=oe(7336),{flatten:N}=oe(9392),{fromRDF:J}=oe(4814),{toRDF:H}=oe(6397),{frameMergedOrDefault:W,cleanupNull:ae}=oe(7031),{isArray:L,isObject:Z,isString:P}=oe(2831),{isSubjectReference:ie}=oe(4209),{expandIri:Q,getInitialContext:w,process:D,processingMode:V}=oe(429),{compact:te,compactIri:he}=oe(3763),{createNodeMap:ge,createMergedNodeMap:se,mergeNodeMaps:de}=oe(5096),{logEventHandler:Ce,logWarningEventHandler:Ie,safeEventHandler:Ne,setDefaultEventHandler:tt,setupEventHandler:Ee,strictEventHandler:fe,unhandledEventHandler:ye}=oe(2585),Ke=function(pe){const Ze={},vt=new x({max:100});function It(Ye,{documentLoader:st=pe.documentLoader,...De}){if(Ye&&"compactionMap"in Ye)throw new S('"compactionMap" not supported.',"jsonld.OptionsError");if(Ye&&"expansionMap"in Ye)throw new S('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:st},De,Ye,{eventHandler:Ee({options:Ye})})}return pe.compact=function(){var Ye=O(function*(st,De,Ae){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(null===De)throw new S("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(null===st)return null;let pt;(Ae=It(Ae,{base:P(st)?st:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new T("_:b"),contextResolver:new j({sharedCache:vt})})).link&&(Ae.skipExpansion=!0),Ae.compactToRelative||delete Ae.base,pt=Ae.skipExpansion?st:yield pe.expand(st,Ae);const Rt=yield pe.processContext(w(Ae),De,Ae);let ht=yield te({activeCtx:Rt,element:pt,options:Ae});Ae.compactArrays&&!Ae.graph&&L(ht)?1===ht.length?ht=ht[0]:0===ht.length&&(ht={}):Ae.graph&&Z(ht)&&(ht=[ht]),Z(De)&&"@context"in De&&(De=De["@context"]),De=b.clone(De),L(De)||(De=[De]);const Dt=De;De=[];for(let pr=0;pr<Dt.length;++pr)(!Z(Dt[pr])||Object.keys(Dt[pr]).length>0)&&De.push(Dt[pr]);const rr=De.length>0;if(1===De.length&&(De=De[0]),L(ht)){const pr=he({activeCtx:Rt,iri:"@graph",relativeTo:{vocab:!0}}),Pt=ht;ht={},rr&&(ht["@context"]=De),ht[pr]=Pt}else if(Z(ht)&&rr){const pr=ht;ht={"@context":De};for(const Pt in pr)ht[Pt]=pr[Pt]}return ht});return function(st,De,Ae){return Ye.apply(this,arguments)}}(),pe.expand=function(){var Ye=O(function*(st,De){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");const Ae={},pt=[];if("expandContext"in(De=It(De,{keepFreeFloatingNodes:!1,contextResolver:new j({sharedCache:vt})}))){const rr=b.clone(De.expandContext);Ae.expandContext=Z(rr)&&"@context"in rr?rr:{"@context":rr},pt.push(Ae.expandContext)}let Rt;if(P(st)){const rr=yield pe.get(st,De);Rt=rr.documentUrl,Ae.input=rr.document,rr.contextUrl&&(Ae.remoteContext={"@context":rr.contextUrl},pt.push(Ae.remoteContext))}else Ae.input=b.clone(st);"base"in De||(De.base=Rt||"");let ht=w(De);for(const rr of pt)ht=yield D({activeCtx:ht,localCtx:rr,options:De});let Dt=yield E({activeCtx:ht,element:Ae.input,options:De});return Z(Dt)&&"@graph"in Dt&&1===Object.keys(Dt).length?Dt=Dt["@graph"]:null===Dt&&(Dt=[]),L(Dt)||(Dt=[Dt]),Dt});return function(st,De){return Ye.apply(this,arguments)}}(),pe.flatten=function(){var Ye=O(function*(st,De,Ae){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");De="function"==typeof De?null:De||null,Ae=It(Ae,{base:P(st)?st:"",contextResolver:new j({sharedCache:vt})});const pt=yield pe.expand(st,Ae),Rt=N(pt);return null===De?Rt:(Ae.graph=!0,Ae.skipExpansion=!0,yield pe.compact(Rt,De,Ae))});return function(st,De,Ae){return Ye.apply(this,arguments)}}(),pe.frame=function(){var Ye=O(function*(st,De,Ae){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(Ae=It(Ae,{base:P(st)?st:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new j({sharedCache:vt})}),P(De)){const Ar=yield pe.get(De,Ae);if(De=Ar.document,Ar.contextUrl){let nn=De["@context"];nn?L(nn)?nn.push(Ar.contextUrl):nn=[nn,Ar.contextUrl]:nn=Ar.contextUrl,De["@context"]=nn}}const pt=De&&De["@context"]||{},Rt=yield pe.processContext(w(Ae),pt,Ae);Ae.hasOwnProperty("omitGraph")||(Ae.omitGraph=V(Rt,1.1)),Ae.hasOwnProperty("pruneBlankNodeIdentifiers")||(Ae.pruneBlankNodeIdentifiers=V(Rt,1.1));const ht=yield pe.expand(st,Ae),Dt={...Ae};Dt.isFrame=!0,Dt.keepFreeFloatingNodes=!0;const rr=yield pe.expand(De,Dt),pr=Object.keys(De).map(Ar=>Q(Rt,Ar,{vocab:!0}));Dt.merged=!pr.includes("@graph"),Dt.is11=V(Rt,1.1);const Pt=W(ht,rr,Dt);Dt.graph=!Ae.omitGraph,Dt.skipExpansion=!0,Dt.link={},Dt.framing=!0;let dr=yield pe.compact(Pt,pt,Dt);return Dt.link={},dr=ae(dr,Dt),dr});return function(st,De,Ae){return Ye.apply(this,arguments)}}(),pe.link=function(){var Ye=O(function*(st,De,Ae){const pt={};return De&&(pt["@context"]=De),pt["@embed"]="@link",pe.frame(st,pt,Ae)});return function(st,De,Ae){return Ye.apply(this,arguments)}}(),pe.normalize=pe.canonize=function(){var Ye=O(function*(st,De){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if("inputFormat"in(De=It(De,{base:P(st)?st:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new j({sharedCache:vt})}))){if("application/n-quads"!==De.inputFormat&&"application/nquads"!==De.inputFormat)throw new S("Unknown canonicalization input format.","jsonld.CanonizeError");const Rt=G.parse(st);return F.canonize(Rt,De)}const Ae={...De};delete Ae.format,Ae.produceGeneralizedRdf=!1;const pt=yield pe.toRDF(st,Ae);return F.canonize(pt,De)});return function(st,De){return Ye.apply(this,arguments)}}(),pe.fromRDF=function(){var Ye=O(function*(st,De){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");De=It(De,{format:P(st)?"application/n-quads":void 0});const{format:Ae}=De;let{rdfParser:pt}=De;if(Ae){if(pt=pt||Ze[Ae],!pt)throw new S("Unknown input format.","jsonld.UnknownFormat",{format:Ae})}else pt=()=>st;const Rt=yield pt(st);return J(Rt,De)});return function(st,De){return Ye.apply(this,arguments)}}(),pe.toRDF=function(){var Ye=O(function*(st,De){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");let Ae;Ae=(De=It(De,{base:P(st)?st:"",skipExpansion:!1,contextResolver:new j({sharedCache:vt})})).skipExpansion?st:yield pe.expand(st,De);const pt=H(Ae,De);if(De.format){if("application/n-quads"===De.format||"application/nquads"===De.format)return G.serialize(pt);throw new S("Unknown output format.","jsonld.UnknownFormat",{format:De.format})}return pt});return function(st,De){return Ye.apply(this,arguments)}}(),pe.createNodeMap=function(){var Ye=O(function*(st,De){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");De=It(De,{base:P(st)?st:"",contextResolver:new j({sharedCache:vt})});const Ae=yield pe.expand(st,De);return se(Ae,De)});return function(st,De){return Ye.apply(this,arguments)}}(),pe.merge=function(){var Ye=O(function*(st,De,Ae){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!L(st))throw new TypeError('Could not merge, "docs" must be an array.');De="function"==typeof De?null:De||null,Ae=It(Ae,{contextResolver:new j({sharedCache:vt})});const pt=yield Promise.all(st.map(Ar=>{const nn={...Ae};return pe.expand(Ar,nn)}));let Rt=!0;"mergeNodes"in Ae&&(Rt=Ae.mergeNodes);const ht=Ae.issuer||new T("_:b"),Dt={"@default":{}};for(let Ar=0;Ar<pt.length;++Ar){const nn=b.relabelBlankNodes(pt[Ar],{issuer:new T("_:b"+Ar+"-")}),Yn=Rt||0===Ar?Dt:{"@default":{}};if(ge(nn,Yn,"@default",ht),Yn!==Dt)for(const qi in Yn){const fn=Yn[qi];if(!(qi in Dt)){Dt[qi]=fn;continue}const Si=Dt[qi];for(const lo in fn)lo in Si||(Si[lo]=fn[lo])}}const rr=de(Dt),pr=[],Pt=Object.keys(rr).sort();for(let Ar=0;Ar<Pt.length;++Ar){const nn=rr[Pt[Ar]];ie(nn)||pr.push(nn)}return null===De?pr:(Ae.graph=!0,Ae.skipExpansion=!0,yield pe.compact(pr,De,Ae))});return function(st,De,Ae){return Ye.apply(this,arguments)}}(),Object.defineProperty(pe,"documentLoader",{get:()=>pe._documentLoader,set:Ye=>pe._documentLoader=Ye}),pe.documentLoader=function(){var Ye=O(function*(st){throw new S("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:st})});return function(st){return Ye.apply(this,arguments)}}(),pe.get=function(){var Ye=O(function*(st,De){let Ae;Ae="function"==typeof De.documentLoader?De.documentLoader:pe.documentLoader;const pt=yield Ae(st);try{if(!pt.document)throw new S("No remote document found at the given URL.","jsonld.NullRemoteDocument");P(pt.document)&&(pt.document=JSON.parse(pt.document))}catch(Rt){throw new S("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:Rt,remoteDoc:pt})}return pt});return function(st,De){return Ye.apply(this,arguments)}}(),pe.processContext=function(){var Ye=O(function*(st,De,Ae){return Ae=It(Ae,{base:"",contextResolver:new j({sharedCache:vt})}),null===De?w(Ae):(De=b.clone(De),Z(De)&&"@context"in De||(De={"@context":De}),D({activeCtx:st,localCtx:De,options:Ae}))});return function(st,De,Ae){return Ye.apply(this,arguments)}}(),pe.getContextValue=oe(429).getContextValue,pe.documentLoaders={},pe.useDocumentLoader=function(Ye){if(!(Ye in pe.documentLoaders))throw new S('Unknown document loader type: "'+Ye+'"',"jsonld.UnknownDocumentLoader",{type:Ye});pe.documentLoader=pe.documentLoaders[Ye].apply(pe,Array.prototype.slice.call(arguments,1))},pe.registerRDFParser=function(Ye,st){Ze[Ye]=st},pe.unregisterRDFParser=function(Ye){delete Ze[Ye]},pe.registerRDFParser("application/n-quads",G.parse),pe.registerRDFParser("application/nquads",G.parse),pe.url=oe(2051),pe.logEventHandler=Ce,pe.logWarningEventHandler=Ie,pe.safeEventHandler=Ne,pe.setDefaultEventHandler=tt,pe.strictEventHandler=fe,pe.unhandledEventHandler=ye,pe.util=b,Object.assign(pe,b),pe.promises=pe,pe.RequestQueue=oe(4808),pe.JsonLdProcessor=oe(1328)(pe),k.setupGlobals(pe),k.setupDocumentLoaders(pe),pe},Oe=function(){return Ke(function(){return Oe()})};Ke(Oe),wt.exports=Oe},5096(wt,Ve,oe){"use strict";const{isKeyword:O}=oe(429),F=oe(4209),k=oe(2831),b=oe(9420),j=oe(262),T={};wt.exports=T,T.createMergedNodeMap=(S,x)=>{const G=(x=x||{}).issuer||new b.IdentifierIssuer("_:b"),E={"@default":{}};return T.createNodeMap(S,E,"@default",G),T.mergeNodeMaps(E)},T.createNodeMap=(S,x,G,E,N,J)=>{if(k.isArray(S)){for(const L of S)T.createNodeMap(L,x,G,E,void 0,J);return}if(!k.isObject(S))return void(J&&J.push(S));if(F.isValue(S)){if("@type"in S){let L=S["@type"];0===L.indexOf("_:")&&(S["@type"]=L=E.getId(L))}return void(J&&J.push(S))}if(J&&F.isList(S)){const L=[];return T.createNodeMap(S["@list"],x,G,E,N,L),void J.push({"@list":L})}if("@type"in S){const L=S["@type"];for(const Z of L)0===Z.indexOf("_:")&&E.getId(Z)}k.isUndefined(N)&&(N=F.isBlankNode(S)?E.getId(S["@id"]):S["@id"]),J&&J.push({"@id":N});const H=x[G],W=H[N]=H[N]||{};W["@id"]=N;const ae=Object.keys(S).sort();for(let L of ae){if("@id"===L)continue;if("@reverse"===L){const P={"@id":N},ie=S["@reverse"];for(const Q in ie){const w=ie[Q];for(const D of w){let V=D["@id"];F.isBlankNode(D)&&(V=E.getId(V)),T.createNodeMap(D,x,G,E,V),b.addValue(H[V],Q,P,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if("@graph"===L){N in x||(x[N]={}),T.createNodeMap(S[L],x,N,E);continue}if("@included"===L){T.createNodeMap(S[L],x,G,E);continue}if("@type"!==L&&O(L)){if("@index"===L&&L in W&&(S[L]!==W[L]||S[L]["@id"]!==W[L]["@id"]))throw new j("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:W});W[L]=S[L];continue}const Z=S[L];if(0===L.indexOf("_:")&&(L=E.getId(L)),0!==Z.length)for(let P of Z)if("@type"===L&&(P=0===P.indexOf("_:")?E.getId(P):P),F.isSubject(P)||F.isSubjectReference(P)){if("@id"in P&&!P["@id"])continue;const ie=F.isBlankNode(P)?E.getId(P["@id"]):P["@id"];b.addValue(W,L,{"@id":ie},{propertyIsArray:!0,allowDuplicate:!1}),T.createNodeMap(P,x,G,E,ie)}else if(F.isValue(P))b.addValue(W,L,P,{propertyIsArray:!0,allowDuplicate:!1});else if(F.isList(P)){const ie=[];T.createNodeMap(P["@list"],x,G,E,N,ie),P={"@list":ie},b.addValue(W,L,P,{propertyIsArray:!0,allowDuplicate:!1})}else T.createNodeMap(P,x,G,E,N),b.addValue(W,L,P,{propertyIsArray:!0,allowDuplicate:!1});else b.addValue(W,L,[],{propertyIsArray:!0})}},T.mergeNodeMapGraphs=S=>{const x={};for(const G of Object.keys(S).sort())for(const E of Object.keys(S[G]).sort()){const N=S[G][E];E in x||(x[E]={"@id":E});const J=x[E];for(const H of Object.keys(N).sort())if(O(H)&&"@type"!==H)J[H]=b.clone(N[H]);else for(const W of N[H])b.addValue(J,H,b.clone(W),{propertyIsArray:!0,allowDuplicate:!1})}return x},T.mergeNodeMaps=S=>{const x=S["@default"],G=Object.keys(S).sort();for(const E of G){if("@default"===E)continue;const N=S[E];let J=x[E];J?"@graph"in J||(J["@graph"]=[]):x[E]=J={"@id":E,"@graph":[]};const H=J["@graph"];for(const W of Object.keys(N).sort()){const ae=N[W];F.isSubjectReference(ae)||H.push(ae)}}return x}},8666(wt,Ve,oe){"use strict";const O=oe(3120),F={};wt.exports=F,F.setupDocumentLoaders=function(k){typeof XMLHttpRequest<"u"&&(k.documentLoaders.xhr=O,k.useDocumentLoader("xhr"))},F.setupGlobals=function(k){typeof globalThis.JsonLdProcessor>"u"&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:k.JsonLdProcessor})}},6397(wt,Ve,oe){"use strict";const{createNodeMap:O}=oe(5096),{isKeyword:F}=oe(429),k=oe(4209),b=oe(8846),j=oe(262),T=oe(2831),S=oe(9420),{handleEvent:x}=oe(2585),{RDF_FIRST:G,RDF_REST:E,RDF_NIL:N,RDF_TYPE:J,RDF_JSON_LITERAL:H,RDF_LANGSTRING:W,XSD_BOOLEAN:ae,XSD_DOUBLE:L,XSD_INTEGER:Z,XSD_STRING:P}=oe(5315),{isAbsolute:ie}=oe(2051),Q={};function w(te,he,ge,se,de){const Ce=Object.keys(he).sort();for(const Ie of Ce){const Ne=he[Ie],tt=Object.keys(Ne).sort();for(let Ee of tt){const fe=Ne[Ee];if("@type"===Ee)Ee=J;else if(F(Ee))continue;for(const ye of fe){const Ke={termType:Ie.startsWith("_:")?"BlankNode":"NamedNode",value:Ie};if(!ie(Ie)){de.eventHandler&&x({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:Ie}},options:de});continue}const Oe={termType:Ee.startsWith("_:")?"BlankNode":"NamedNode",value:Ee};if(!ie(Ee)){de.eventHandler&&x({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:Ee}},options:de});continue}if("BlankNode"===Oe.termType&&!de.produceGeneralizedRdf){de.eventHandler&&x({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:se.getOldIds().find(Ze=>se.getId(Ze)===Ee)}},options:de});continue}const pe=V(ye,se,te,ge,de.rdfDirection,de);pe&&te.push({subject:Ke,predicate:Oe,object:pe,graph:ge})}}}}function V(te,he,ge,se,de,Ce){const Ie={};if(k.isValue(te)){Ie.termType="Literal",Ie.value=void 0,Ie.datatype={termType:"NamedNode"};let Ne=te["@value"];const tt=te["@type"]||null;if("@json"===tt)Ie.value=b(Ne),Ie.datatype.value=H;else if(T.isBoolean(Ne))Ie.value=Ne.toString(),Ie.datatype.value=tt||ae;else if(T.isDouble(Ne)||tt===L)T.isDouble(Ne)||(Ne=parseFloat(Ne)),Ie.value=Ne.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),Ie.datatype.value=tt||L;else if(T.isNumber(Ne))Ie.value=Ne.toFixed(0),Ie.datatype.value=tt||Z;else if("@direction"in te&&"i18n-datatype"===de){const Ee=(te["@language"]||"").toLowerCase();Ie.datatype.value=`https://www.w3.org/ns/i18n#${Ee}_${te["@direction"]}`,Ie.value=Ne}else{if("@direction"in te&&"compound-literal"===de)throw new j("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:de});if("@direction"in te&&de)throw new j("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:de});"@language"in te?("@direction"in te&&!de&&Ce.eventHandler&&x({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:Ie.value}},options:Ce}),Ie.value=Ne,Ie.datatype.value=tt||W,Ie.language=te["@language"]):("@direction"in te&&!de&&Ce.eventHandler&&x({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:Ie.value}},options:Ce}),Ie.value=Ne,Ie.datatype.value=tt||P)}}else if(k.isList(te)){const Ne=function D(te,he,ge,se,de,Ce){const Ie={termType:"NamedNode",value:G},Ne={termType:"NamedNode",value:E},tt={termType:"NamedNode",value:N},Ee=te.pop(),fe=Ee?{termType:"BlankNode",value:he.getId()}:tt;let ye=fe;for(const Ke of te){const Oe=V(Ke,he,ge,se,de,Ce),pe={termType:"BlankNode",value:he.getId()};ge.push({subject:ye,predicate:Ie,object:Oe,graph:se}),ge.push({subject:ye,predicate:Ne,object:pe,graph:se}),ye=pe}if(Ee){const Ke=V(Ee,he,ge,se,de,Ce);ge.push({subject:ye,predicate:Ie,object:Ke,graph:se}),ge.push({subject:ye,predicate:Ne,object:tt,graph:se})}return fe}(te["@list"],he,ge,se,de,Ce);Ie.termType=Ne.termType,Ie.value=Ne.value}else{const Ne=T.isObject(te)?te["@id"]:te;Ie.termType=Ne.startsWith("_:")?"BlankNode":"NamedNode",Ie.value=Ne}return"NamedNode"!==Ie.termType||ie(Ie.value)?Ie:(Ce.eventHandler&&x({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:Ie.value}},options:Ce}),null)}wt.exports=Q,Q.toRDF=(te,he)=>{const ge=new S.IdentifierIssuer("_:b"),se={"@default":{}};O(te,se,"@default",ge);const de=[],Ce=Object.keys(se).sort();for(const Ie of Ce){let Ne;if("@default"===Ie)Ne={termType:"DefaultGraph",value:""};else{if(!ie(Ie)){he.eventHandler&&x({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:Ie}},options:he});continue}Ne=Ie.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},Ne.value=Ie}w(de,se[Ie],Ne,ge,he)}return de}},2831(wt){"use strict";const Ve={};wt.exports=Ve,Ve.isArray=Array.isArray,Ve.isBoolean=oe=>"boolean"==typeof oe||"[object Boolean]"===Object.prototype.toString.call(oe),Ve.isDouble=oe=>Ve.isNumber(oe)&&(-1!==String(oe).indexOf(".")||Math.abs(oe)>=1e21),Ve.isEmptyObject=oe=>Ve.isObject(oe)&&0===Object.keys(oe).length,Ve.isNumber=oe=>"number"==typeof oe||"[object Number]"===Object.prototype.toString.call(oe),Ve.isNumeric=oe=>!isNaN(parseFloat(oe))&&isFinite(oe),Ve.isObject=oe=>"[object Object]"===Object.prototype.toString.call(oe),Ve.isString=oe=>"string"==typeof oe||"[object String]"===Object.prototype.toString.call(oe),Ve.isUndefined=oe=>typeof oe>"u"},2051(wt,Ve,oe){"use strict";const O=oe(2831),F={};wt.exports=F,F.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([a-zA-Z][a-zA-Z0-9+-.]*):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},F.parse=(b,j)=>{const T={},S=F.parsers[j||"full"],x=S.regex.exec(b);let G=S.keys.length;for(;G--;)T[S.keys[G]]=void 0===x[G]?null:x[G];return("https"===T.scheme&&"443"===T.port||"http"===T.scheme&&"80"===T.port)&&(T.href=T.href.replace(":"+T.port,""),T.authority=T.authority.replace(":"+T.port,""),T.port=null),T.normalizedPath=F.removeDotSegments(T.path),T},F.prependBase=(b,j)=>{if(null===b||F.isAbsolute(j))return j;(!b||O.isString(b))&&(b=F.parse(b||""));const T=F.parse(j),S={protocol:b.protocol||""};if(null!==T.authority)S.authority=T.authority,S.path=T.path,S.query=T.query;else if(S.authority=b.authority,""===T.path)S.path=b.path,S.query=null!==T.query?T.query:b.query;else{if(0===T.path.indexOf("/"))S.path=T.path;else{let G=b.path;G=G.substr(0,G.lastIndexOf("/")+1),(G.length>0||b.authority)&&"/"!==G.substr(-1)&&(G+="/"),G+=T.path,S.path=G}S.query=T.query}""!==T.path&&(S.path=F.removeDotSegments(S.path));let x=S.protocol;return null!==S.authority&&(x+="//"+S.authority),x+=S.path,null!==S.query&&(x+="?"+S.query),null!==T.fragment&&(x+="#"+T.fragment),""===x&&(x="./"),x},F.removeBase=(b,j)=>{if(null===b)return j;(!b||O.isString(b))&&(b=F.parse(b||""));let T="";if(""!==b.href?T+=(b.protocol||"")+"//"+(b.authority||""):j.indexOf("//")&&(T+="//"),0!==j.indexOf(T))return j;const S=F.parse(j.substr(T.length)),x=b.normalizedPath.split("/"),G=S.normalizedPath.split("/"),E=S.fragment||S.query?0:1;for(;x.length>0&&G.length>E&&x[0]===G[0];)x.shift(),G.shift();let N="";if(x.length>0){x.pop();for(let J=0;J<x.length;++J)N+="../"}return N+=G.join("/"),null!==S.query&&(N+="?"+S.query),null!==S.fragment&&(N+="#"+S.fragment),""===N&&(N="./"),N},F.removeDotSegments=b=>{if(0===b.length)return"";const j=b.split("/"),T=[];for(;j.length>0;){const S=j.shift(),x=0===j.length;"."!==S?".."!==S?T.push(S):(T.pop(),x&&T.push("")):x&&T.push("")}return"/"===b[0]&&T.length>0&&""!==T[0]&&T.unshift(""),1===T.length&&""===T[0]?"/":T.join("/")};const k=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;F.isAbsolute=b=>O.isString(b)&&k.test(b),F.isRelative=b=>O.isString(b)},9420(wt,Ve,oe){"use strict";const O=oe(4209),F=oe(2831),k=oe(1224).IdentifierIssuer,b=oe(262),T=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,S=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,x=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,E_headers_accept="application/ld+json, application/json",N={};function J(H,W){if(F.isArray(W))for(let ae=0;ae<W.length;++ae)W[ae]=J(H,W[ae]);else if(O.isList(W))W["@list"]=J(H,W["@list"]);else if(F.isObject(W)){O.isBlankNode(W)&&(W["@id"]=H.getId(W["@id"]));const ae=Object.keys(W).sort();for(let L=0;L<ae.length;++L){const Z=ae[L];"@id"!==Z&&(W[Z]=J(H,W[Z]))}}return W}wt.exports=N,N.IdentifierIssuer=k,N.REGEX_BCP47=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,N.REGEX_KEYWORD=/^@[a-zA-Z]+$/,N.clone=function(H){if(H&&"object"==typeof H){let W;if(F.isArray(H)){W=[];for(let ae=0;ae<H.length;++ae)W[ae]=N.clone(H[ae])}else if(H instanceof Map){W=new Map;for(const[ae,L]of H)W.set(ae,N.clone(L))}else if(H instanceof Set){W=new Set;for(const ae of H)W.add(N.clone(ae))}else if(F.isObject(H)){W={};for(const ae in H)W[ae]=N.clone(H[ae])}else W=H.toString();return W}return H},N.asArray=function(H){return Array.isArray(H)?H:[H]},N.buildHeaders=(H={})=>{if(Object.keys(H).some(ae=>"accept"===ae.toLowerCase()))throw new RangeError('Accept header may not be specified; only "'+E_headers_accept+'" is supported.');return Object.assign({Accept:E_headers_accept},H)},N.parseLinkHeader=H=>{const W={},ae=H.match(T);for(let L=0;L<ae.length;++L){let Z=ae[L].match(S);if(!Z)continue;const P={target:Z[1]},ie=Z[2];for(;Z=x.exec(ie);)P[Z[1]]=void 0===Z[2]?Z[3]:Z[2];const Q=P.rel||"";Array.isArray(W[Q])?W[Q].push(P):W[Q]=W.hasOwnProperty(Q)?[W[Q],P]:P}return W},N.validateTypeValue=(H,W)=>{if(!(F.isString(H)||F.isArray(H)&&H.every(ae=>F.isString(ae)))){if(W&&F.isObject(H))switch(Object.keys(H).length){case 0:return;case 1:if("@default"in H&&N.asArray(H["@default"]).every(ae=>F.isString(ae)))return}throw new b('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:H})}},N.hasProperty=(H,W)=>{if(H.hasOwnProperty(W)){const ae=H[W];return!F.isArray(ae)||ae.length>0}return!1},N.hasValue=(H,W,ae)=>{if(N.hasProperty(H,W)){let L=H[W];const Z=O.isList(L);if(F.isArray(L)||Z){Z&&(L=L["@list"]);for(let P=0;P<L.length;++P)if(N.compareValues(ae,L[P]))return!0}else if(!F.isArray(ae))return N.compareValues(ae,L)}return!1},N.addValue=(H,W,ae,L)=>{if("propertyIsArray"in(L=L||{})||(L.propertyIsArray=!1),"valueIsArray"in L||(L.valueIsArray=!1),"allowDuplicate"in L||(L.allowDuplicate=!0),"prependValue"in L||(L.prependValue=!1),L.valueIsArray)H[W]=ae;else if(F.isArray(ae)){0===ae.length&&L.propertyIsArray&&!H.hasOwnProperty(W)&&(H[W]=[]),L.prependValue&&(ae=ae.concat(H[W]),H[W]=[]);for(let Z=0;Z<ae.length;++Z)N.addValue(H,W,ae[Z],L)}else if(H.hasOwnProperty(W)){const Z=!L.allowDuplicate&&N.hasValue(H,W,ae);!F.isArray(H[W])&&(!Z||L.propertyIsArray)&&(H[W]=[H[W]]),Z||(L.prependValue?H[W].unshift(ae):H[W].push(ae))}else H[W]=L.propertyIsArray?[ae]:ae},N.getValues=(H,W)=>[].concat(H[W]||[]),N.removeProperty=(H,W)=>{delete H[W]},N.removeValue=(H,W,ae,L)=>{"propertyIsArray"in(L=L||{})||(L.propertyIsArray=!1);const Z=N.getValues(H,W).filter(P=>!N.compareValues(P,ae));0===Z.length?N.removeProperty(H,W):H[W]=1!==Z.length||L.propertyIsArray?Z:Z[0]},N.relabelBlankNodes=(H,W)=>J((W=W||{}).issuer||new k("_:b"),H),N.compareValues=(H,W)=>!!(H===W||O.isValue(H)&&O.isValue(W)&&H["@value"]===W["@value"]&&H["@type"]===W["@type"]&&H["@language"]===W["@language"]&&H["@index"]===W["@index"])||!!(F.isObject(H)&&"@id"in H&&F.isObject(W)&&"@id"in W)&&H["@id"]===W["@id"],N.compareShortestLeast=(H,W)=>H.length<W.length?-1:W.length<H.length?1:H===W?0:H<W?-1:1},3052(wt,Ve,oe){"use strict";const O=oe(4842),F=Symbol("max"),k=Symbol("length"),b=Symbol("lengthCalculator"),j=Symbol("allowStale"),T=Symbol("maxAge"),S=Symbol("dispose"),x=Symbol("noDisposeOnSet"),G=Symbol("lruList"),E=Symbol("cache"),N=Symbol("updateAgeOnGet"),J=()=>1,W=(Q,w,D)=>{const V=Q[E].get(w);if(V){const te=V.value;if(ae(Q,te)){if(Z(Q,V),!Q[j])return}else D&&(Q[N]&&(V.value.now=Date.now()),Q[G].unshiftNode(V));return te.value}},ae=(Q,w)=>{if(!w||!w.maxAge&&!Q[T])return!1;const D=Date.now()-w.now;return w.maxAge?D>w.maxAge:Q[T]&&D>Q[T]},L=Q=>{if(Q[k]>Q[F])for(let w=Q[G].tail;Q[k]>Q[F]&&null!==w;){const D=w.prev;Z(Q,w),w=D}},Z=(Q,w)=>{if(w){const D=w.value;Q[S]&&Q[S](D.key,D.value),Q[k]-=D.length,Q[E].delete(D.key),Q[G].removeNode(w)}};class P{constructor(w,D,V,te,he){this.key=w,this.value=D,this.length=V,this.now=te,this.maxAge=he||0}}const ie=(Q,w,D,V)=>{let te=D.value;ae(Q,te)&&(Z(Q,D),Q[j]||(te=void 0)),te&&w.call(V,te.value,te.key,Q)};wt.exports=class H{constructor(w){if("number"==typeof w&&(w={max:w}),w||(w={}),w.max&&("number"!=typeof w.max||w.max<0))throw new TypeError("max must be a non-negative number");this[F]=w.max||1/0;const V=w.length||J;if(this[b]="function"!=typeof V?J:V,this[j]=w.stale||!1,w.maxAge&&"number"!=typeof w.maxAge)throw new TypeError("maxAge must be a number");this[T]=w.maxAge||0,this[S]=w.dispose,this[x]=w.noDisposeOnSet||!1,this[N]=w.updateAgeOnGet||!1,this.reset()}set max(w){if("number"!=typeof w||w<0)throw new TypeError("max must be a non-negative number");this[F]=w||1/0,L(this)}get max(){return this[F]}set allowStale(w){this[j]=!!w}get allowStale(){return this[j]}set maxAge(w){if("number"!=typeof w)throw new TypeError("maxAge must be a non-negative number");this[T]=w,L(this)}get maxAge(){return this[T]}set lengthCalculator(w){"function"!=typeof w&&(w=J),w!==this[b]&&(this[b]=w,this[k]=0,this[G].forEach(D=>{D.length=this[b](D.value,D.key),this[k]+=D.length})),L(this)}get lengthCalculator(){return this[b]}get length(){return this[k]}get itemCount(){return this[G].length}rforEach(w,D){D=D||this;for(let V=this[G].tail;null!==V;){const te=V.prev;ie(this,w,V,D),V=te}}forEach(w,D){D=D||this;for(let V=this[G].head;null!==V;){const te=V.next;ie(this,w,V,D),V=te}}keys(){return this[G].toArray().map(w=>w.key)}values(){return this[G].toArray().map(w=>w.value)}reset(){this[S]&&this[G]&&this[G].length&&this[G].forEach(w=>this[S](w.key,w.value)),this[E]=new Map,this[G]=new O,this[k]=0}dump(){return this[G].map(w=>!ae(this,w)&&{k:w.key,v:w.value,e:w.now+(w.maxAge||0)}).toArray().filter(w=>w)}dumpLru(){return this[G]}set(w,D,V){if((V=V||this[T])&&"number"!=typeof V)throw new TypeError("maxAge must be a number");const te=V?Date.now():0,he=this[b](D,w);if(this[E].has(w)){if(he>this[F])return Z(this,this[E].get(w)),!1;const de=this[E].get(w).value;return this[S]&&(this[x]||this[S](w,de.value)),de.now=te,de.maxAge=V,de.value=D,this[k]+=he-de.length,de.length=he,this.get(w),L(this),!0}const ge=new P(w,D,he,te,V);return ge.length>this[F]?(this[S]&&this[S](w,D),!1):(this[k]+=ge.length,this[G].unshift(ge),this[E].set(w,this[G].head),L(this),!0)}has(w){if(!this[E].has(w))return!1;const D=this[E].get(w).value;return!ae(this,D)}get(w){return W(this,w,!0)}peek(w){return W(this,w,!1)}pop(){const w=this[G].tail;return w?(Z(this,w),w.value):null}del(w){Z(this,this[E].get(w))}load(w){this.reset();const D=Date.now();for(let V=w.length-1;V>=0;V--){const te=w[V],he=te.e||0;if(0===he)this.set(te.k,te.v);else{const ge=he-D;ge>0&&this.set(te.k,te.v,ge)}}}prune(){this[E].forEach((w,D)=>W(this,D,!1))}}},7568(wt){"use strict";wt.exports=function(Ve){Ve.prototype[Symbol.iterator]=function*(){for(let oe=this.head;oe;oe=oe.next)yield oe.value}}},4842(wt,Ve,oe){"use strict";function O(T){var S=this;if(S instanceof O||(S=new O),S.tail=null,S.head=null,S.length=0,T&&"function"==typeof T.forEach)T.forEach(function(E){S.push(E)});else if(arguments.length>0)for(var x=0,G=arguments.length;x<G;x++)S.push(arguments[x]);return S}function F(T,S,x){var G=S===T.head?new j(x,null,S,T):new j(x,S,S.next,T);return null===G.next&&(T.tail=G),null===G.prev&&(T.head=G),T.length++,G}function k(T,S){T.tail=new j(S,T.tail,null,T),T.head||(T.head=T.tail),T.length++}function b(T,S){T.head=new j(S,null,T.head,T),T.tail||(T.tail=T.head),T.length++}function j(T,S,x,G){if(!(this instanceof j))return new j(T,S,x,G);this.list=G,this.value=T,S?(S.next=this,this.prev=S):this.prev=null,x?(x.prev=this,this.next=x):this.next=null}wt.exports=O,O.Node=j,O.create=O,O.prototype.removeNode=function(T){if(T.list!==this)throw new Error("removing node which does not belong to this list");var S=T.next,x=T.prev;return S&&(S.prev=x),x&&(x.next=S),T===this.head&&(this.head=S),T===this.tail&&(this.tail=x),T.list.length--,T.next=null,T.prev=null,T.list=null,S},O.prototype.unshiftNode=function(T){if(T!==this.head){T.list&&T.list.removeNode(T);var S=this.head;T.list=this,T.next=S,S&&(S.prev=T),this.head=T,this.tail||(this.tail=T),this.length++}},O.prototype.pushNode=function(T){if(T!==this.tail){T.list&&T.list.removeNode(T);var S=this.tail;T.list=this,T.prev=S,S&&(S.next=T),this.tail=T,this.head||(this.head=T),this.length++}},O.prototype.push=function(){for(var T=0,S=arguments.length;T<S;T++)k(this,arguments[T]);return this.length},O.prototype.unshift=function(){for(var T=0,S=arguments.length;T<S;T++)b(this,arguments[T]);return this.length},O.prototype.pop=function(){if(this.tail){var T=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,T}},O.prototype.shift=function(){if(this.head){var T=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,T}},O.prototype.forEach=function(T,S){S=S||this;for(var x=this.head,G=0;null!==x;G++)T.call(S,x.value,G,this),x=x.next},O.prototype.forEachReverse=function(T,S){S=S||this;for(var x=this.tail,G=this.length-1;null!==x;G--)T.call(S,x.value,G,this),x=x.prev},O.prototype.get=function(T){for(var S=0,x=this.head;null!==x&&S<T;S++)x=x.next;if(S===T&&null!==x)return x.value},O.prototype.getReverse=function(T){for(var S=0,x=this.tail;null!==x&&S<T;S++)x=x.prev;if(S===T&&null!==x)return x.value},O.prototype.map=function(T,S){S=S||this;for(var x=new O,G=this.head;null!==G;)x.push(T.call(S,G.value,this)),G=G.next;return x},O.prototype.mapReverse=function(T,S){S=S||this;for(var x=new O,G=this.tail;null!==G;)x.push(T.call(S,G.value,this)),G=G.prev;return x},O.prototype.reduce=function(T,S){var x,G=this.head;if(arguments.length>1)x=S;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");G=this.head.next,x=this.head.value}for(var E=0;null!==G;E++)x=T(x,G.value,E),G=G.next;return x},O.prototype.reduceReverse=function(T,S){var x,G=this.tail;if(arguments.length>1)x=S;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");G=this.tail.prev,x=this.tail.value}for(var E=this.length-1;null!==G;E--)x=T(x,G.value,E),G=G.prev;return x},O.prototype.toArray=function(){for(var T=new Array(this.length),S=0,x=this.head;null!==x;S++)T[S]=x.value,x=x.next;return T},O.prototype.toArrayReverse=function(){for(var T=new Array(this.length),S=0,x=this.tail;null!==x;S++)T[S]=x.value,x=x.prev;return T},O.prototype.slice=function(T,S){(S=S||this.length)<0&&(S+=this.length),(T=T||0)<0&&(T+=this.length);var x=new O;if(S<T||S<0)return x;T<0&&(T=0),S>this.length&&(S=this.length);for(var G=0,E=this.head;null!==E&&G<T;G++)E=E.next;for(;null!==E&&G<S;G++,E=E.next)x.push(E.value);return x},O.prototype.sliceReverse=function(T,S){(S=S||this.length)<0&&(S+=this.length),(T=T||0)<0&&(T+=this.length);var x=new O;if(S<T||S<0)return x;T<0&&(T=0),S>this.length&&(S=this.length);for(var G=this.length,E=this.tail;null!==E&&G>S;G--)E=E.prev;for(;null!==E&&G>T;G--,E=E.prev)x.push(E.value);return x},O.prototype.splice=function(T,S,...x){T>this.length&&(T=this.length-1),T<0&&(T=this.length+T);for(var G=0,E=this.head;null!==E&&G<T;G++)E=E.next;var N=[];for(G=0;E&&G<S;G++)N.push(E.value),E=this.removeNode(E);for(null===E&&(E=this.tail),E!==this.head&&E!==this.tail&&(E=E.prev),G=0;G<x.length;G++)E=F(this,E,x[G]);return N},O.prototype.reverse=function(){for(var T=this.head,S=this.tail,x=T;null!==x;x=x.prev){var G=x.prev;x.prev=x.next,x.next=G}return this.head=S,this.tail=T,this};try{oe(7568)(O)}catch{}},6556(wt){wt.exports=function(Ve){var oe={};function O(F){if(oe[F])return oe[F].exports;var k=oe[F]={i:F,l:!1,exports:{}};return Ve[F].call(k.exports,k,k.exports,O),k.l=!0,k.exports}return O.m=Ve,O.c=oe,O.i=function(F){return F},O.d=function(F,k,b){O.o(F,k)||Object.defineProperty(F,k,{configurable:!1,enumerable:!0,get:b})},O.n=function(F){var k=F&&F.__esModule?function(){return F.default}:function(){return F};return O.d(k,"a",k),k},O.o=function(F,k){return Object.prototype.hasOwnProperty.call(F,k)},O.p="",O(O.s=26)}([function(Ve,oe,O){"use strict";function F(){}F.QUALITY=1,F.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,F.DEFAULT_INCREMENTAL=!1,F.DEFAULT_ANIMATION_ON_LAYOUT=!0,F.DEFAULT_ANIMATION_DURING_LAYOUT=!1,F.DEFAULT_ANIMATION_PERIOD=50,F.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,F.DEFAULT_GRAPH_MARGIN=15,F.NODE_DIMENSIONS_INCLUDE_LABELS=!1,F.SIMPLE_NODE_HALF_SIZE=(F.SIMPLE_NODE_SIZE=40)/2,F.EMPTY_COMPOUND_NODE_SIZE=40,F.MIN_EDGE_LENGTH=1,F.INITIAL_WORLD_BOUNDARY=(F.WORLD_BOUNDARY=1e6)/1e3,F.WORLD_CENTER_X=1200,F.WORLD_CENTER_Y=900,Ve.exports=F},function(Ve,oe,O){"use strict";var F=O(2),k=O(8),b=O(9);function j(S,x,G){F.call(this,G),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=G,this.bendpoints=[],this.source=S,this.target=x}for(var T in j.prototype=Object.create(F.prototype),F)j[T]=F[T];j.prototype.getSource=function(){return this.source},j.prototype.getTarget=function(){return this.target},j.prototype.isInterGraph=function(){return this.isInterGraph},j.prototype.getLength=function(){return this.length},j.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},j.prototype.getBendpoints=function(){return this.bendpoints},j.prototype.getLca=function(){return this.lca},j.prototype.getSourceInLca=function(){return this.sourceInLca},j.prototype.getTargetInLca=function(){return this.targetInLca},j.prototype.getOtherEnd=function(S){if(this.source===S)return this.target;if(this.target===S)return this.source;throw"Node is not incident with this edge"},j.prototype.getOtherEndInGraph=function(S,x){for(var G=this.getOtherEnd(S),E=x.getGraphManager().getRoot();;){if(G.getOwner()==x)return G;if(G.getOwner()==E)break;G=G.getOwner().getParent()}return null},j.prototype.updateLength=function(){var S=new Array(4);this.isOverlapingSourceAndTarget=k.getIntersection(this.target.getRect(),this.source.getRect(),S),this.isOverlapingSourceAndTarget||(this.lengthX=S[0]-S[2],this.lengthY=S[1]-S[3],Math.abs(this.lengthX)<1&&(this.lengthX=b.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=b.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},j.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=b.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=b.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},Ve.exports=j},function(Ve,oe,O){"use strict";Ve.exports=function F(k){this.vGraphObject=k}},function(Ve,oe,O){"use strict";var F=O(2),k=O(10),b=O(13),j=O(0),T=O(16),S=O(4);function x(E,N,J,H){null==J&&null==H&&(H=N),F.call(this,H),null!=E.graphManager&&(E=E.graphManager),this.estimatedSize=k.MIN_VALUE,this.inclusionTreeDepth=k.MAX_VALUE,this.vGraphObject=H,this.edges=[],this.graphManager=E,this.rect=null!=J&&null!=N?new b(N.x,N.y,J.width,J.height):new b}for(var G in x.prototype=Object.create(F.prototype),F)x[G]=F[G];x.prototype.getEdges=function(){return this.edges},x.prototype.getChild=function(){return this.child},x.prototype.getOwner=function(){return this.owner},x.prototype.getWidth=function(){return this.rect.width},x.prototype.setWidth=function(E){this.rect.width=E},x.prototype.getHeight=function(){return this.rect.height},x.prototype.setHeight=function(E){this.rect.height=E},x.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},x.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},x.prototype.getCenter=function(){return new S(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},x.prototype.getLocation=function(){return new S(this.rect.x,this.rect.y)},x.prototype.getRect=function(){return this.rect},x.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},x.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},x.prototype.setRect=function(E,N){this.rect.x=E.x,this.rect.y=E.y,this.rect.width=N.width,this.rect.height=N.height},x.prototype.setCenter=function(E,N){this.rect.x=E-this.rect.width/2,this.rect.y=N-this.rect.height/2},x.prototype.setLocation=function(E,N){this.rect.x=E,this.rect.y=N},x.prototype.moveBy=function(E,N){this.rect.x+=E,this.rect.y+=N},x.prototype.getEdgeListToNode=function(E){var N=[],H=this;return H.edges.forEach(function(W){if(W.target==E){if(W.source!=H)throw"Incorrect edge source!";N.push(W)}}),N},x.prototype.getEdgesBetween=function(E){var N=[],H=this;return H.edges.forEach(function(W){if(W.source!=H&&W.target!=H)throw"Incorrect edge source and/or target";(W.target==E||W.source==E)&&N.push(W)}),N},x.prototype.getNeighborsList=function(){var E=new Set,N=this;return N.edges.forEach(function(J){if(J.source==N)E.add(J.target);else{if(J.target!=N)throw"Incorrect incidency!";E.add(J.source)}}),E},x.prototype.withChildren=function(){var E=new Set;if(E.add(this),null!=this.child)for(var H=this.child.getNodes(),W=0;W<H.length;W++)H[W].withChildren().forEach(function(ae){E.add(ae)});return E},x.prototype.getNoOfChildren=function(){var E=0;if(null==this.child)E=1;else for(var J=this.child.getNodes(),H=0;H<J.length;H++)E+=J[H].getNoOfChildren();return 0==E&&(E=1),E},x.prototype.getEstimatedSize=function(){if(this.estimatedSize==k.MIN_VALUE)throw"assert failed";return this.estimatedSize},x.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},x.prototype.scatter=function(){var E,N,J=-j.INITIAL_WORLD_BOUNDARY,H=j.INITIAL_WORLD_BOUNDARY;E=j.WORLD_CENTER_X+T.nextDouble()*(H-J)+J;var W=-j.INITIAL_WORLD_BOUNDARY,ae=j.INITIAL_WORLD_BOUNDARY;N=j.WORLD_CENTER_Y+T.nextDouble()*(ae-W)+W,this.rect.x=E,this.rect.y=N},x.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var E=this.getChild();if(E.updateBounds(!0),this.rect.x=E.getLeft(),this.rect.y=E.getTop(),this.setWidth(E.getRight()-E.getLeft()),this.setHeight(E.getBottom()-E.getTop()),j.NODE_DIMENSIONS_INCLUDE_LABELS){var N=E.getRight()-E.getLeft(),J=E.getBottom()-E.getTop();this.labelWidth>N&&(this.rect.x-=(this.labelWidth-N)/2,this.setWidth(this.labelWidth)),this.labelHeight>J&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-J)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-J),this.setHeight(this.labelHeight))}}},x.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==k.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},x.prototype.transform=function(E){var N=this.rect.x;N>j.WORLD_BOUNDARY?N=j.WORLD_BOUNDARY:N<-j.WORLD_BOUNDARY&&(N=-j.WORLD_BOUNDARY);var J=this.rect.y;J>j.WORLD_BOUNDARY?J=j.WORLD_BOUNDARY:J<-j.WORLD_BOUNDARY&&(J=-j.WORLD_BOUNDARY);var H=new S(N,J),W=E.inverseTransformPoint(H);this.setLocation(W.x,W.y)},x.prototype.getLeft=function(){return this.rect.x},x.prototype.getRight=function(){return this.rect.x+this.rect.width},x.prototype.getTop=function(){return this.rect.y},x.prototype.getBottom=function(){return this.rect.y+this.rect.height},x.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},Ve.exports=x},function(Ve,oe,O){"use strict";function F(k,b){null==k&&null==b?(this.x=0,this.y=0):(this.x=k,this.y=b)}F.prototype.getX=function(){return this.x},F.prototype.getY=function(){return this.y},F.prototype.setX=function(k){this.x=k},F.prototype.setY=function(k){this.y=k},F.prototype.getDifference=function(k){return new DimensionD(this.x-k.x,this.y-k.y)},F.prototype.getCopy=function(){return new F(this.x,this.y)},F.prototype.translate=function(k){return this.x+=k.width,this.y+=k.height,this},Ve.exports=F},function(Ve,oe,O){"use strict";var F=O(2),k=O(10),b=O(0),j=O(6),T=O(3),S=O(1),x=O(13),G=O(12),E=O(11);function N(H,W,ae){F.call(this,ae),this.estimatedSize=k.MIN_VALUE,this.margin=b.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=H,null!=W&&W instanceof j?this.graphManager=W:null!=W&&W instanceof Layout&&(this.graphManager=W.graphManager)}for(var J in N.prototype=Object.create(F.prototype),F)N[J]=F[J];N.prototype.getNodes=function(){return this.nodes},N.prototype.getEdges=function(){return this.edges},N.prototype.getGraphManager=function(){return this.graphManager},N.prototype.getParent=function(){return this.parent},N.prototype.getLeft=function(){return this.left},N.prototype.getRight=function(){return this.right},N.prototype.getTop=function(){return this.top},N.prototype.getBottom=function(){return this.bottom},N.prototype.isConnected=function(){return this.isConnected},N.prototype.add=function(H,W,ae){if(null==W&&null==ae){var L=H;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(L)>-1)throw"Node already in graph!";return L.owner=this,this.getNodes().push(L),L}var Z=H;if(!(this.getNodes().indexOf(W)>-1&&this.getNodes().indexOf(ae)>-1))throw"Source or target not in graph!";if(W.owner!=ae.owner||W.owner!=this)throw"Both owners must be this graph!";return W.owner!=ae.owner?null:(Z.source=W,Z.target=ae,Z.isInterGraph=!1,this.getEdges().push(Z),W.edges.push(Z),ae!=W&&ae.edges.push(Z),Z)},N.prototype.remove=function(H){var W=H;if(H instanceof T){if(null==W)throw"Node is null!";if(null==W.owner||W.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var ae=W.edges.slice(),Z=ae.length,P=0;P<Z;P++)(L=ae[P]).isInterGraph?this.graphManager.remove(L):L.source.owner.remove(L);if(-1==(ie=this.nodes.indexOf(W)))throw"Node not in owner node list!";this.nodes.splice(ie,1)}else if(H instanceof S){var L;if(null==(L=H))throw"Edge is null!";if(null==L.source||null==L.target)throw"Source and/or target is null!";if(null==L.source.owner||null==L.target.owner||L.source.owner!=this||L.target.owner!=this)throw"Source and/or target owner is invalid!";var ie,Q=L.source.edges.indexOf(L),w=L.target.edges.indexOf(L);if(!(Q>-1&&w>-1))throw"Source and/or target doesn't know this edge!";if(L.source.edges.splice(Q,1),L.target!=L.source&&L.target.edges.splice(w,1),-1==(ie=L.source.owner.getEdges().indexOf(L)))throw"Not in owner's edge list!";L.source.owner.getEdges().splice(ie,1)}},N.prototype.updateLeftTop=function(){for(var ae,L,Z,H=k.MAX_VALUE,W=k.MAX_VALUE,P=this.getNodes(),ie=P.length,Q=0;Q<ie;Q++){var w=P[Q];H>(ae=w.getTop())&&(H=ae),W>(L=w.getLeft())&&(W=L)}return H==k.MAX_VALUE?null:(Z=null!=P[0].getParent().paddingLeft?P[0].getParent().paddingLeft:this.margin,this.left=W-Z,this.top=H-Z,new G(this.left,this.top))},N.prototype.updateBounds=function(H){for(var P,ie,Q,w,D,W=k.MAX_VALUE,ae=-k.MAX_VALUE,L=k.MAX_VALUE,Z=-k.MAX_VALUE,V=this.nodes,te=V.length,he=0;he<te;he++){var ge=V[he];H&&null!=ge.child&&ge.updateBounds(),W>(P=ge.getLeft())&&(W=P),ae<(ie=ge.getRight())&&(ae=ie),L>(Q=ge.getTop())&&(L=Q),Z<(w=ge.getBottom())&&(Z=w)}var se=new x(W,L,ae-W,Z-L);W==k.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),D=null!=V[0].getParent().paddingLeft?V[0].getParent().paddingLeft:this.margin,this.left=se.x-D,this.right=se.x+se.width+D,this.top=se.y-D,this.bottom=se.y+se.height+D},N.calculateBounds=function(H){for(var P,ie,Q,w,W=k.MAX_VALUE,ae=-k.MAX_VALUE,L=k.MAX_VALUE,Z=-k.MAX_VALUE,D=H.length,V=0;V<D;V++){var te=H[V];W>(P=te.getLeft())&&(W=P),ae<(ie=te.getRight())&&(ae=ie),L>(Q=te.getTop())&&(L=Q),Z<(w=te.getBottom())&&(Z=w)}return new x(W,L,ae-W,Z-L)},N.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},N.prototype.getEstimatedSize=function(){if(this.estimatedSize==k.MIN_VALUE)throw"assert failed";return this.estimatedSize},N.prototype.calcEstimatedSize=function(){for(var H=0,W=this.nodes,ae=W.length,L=0;L<ae;L++)H+=W[L].calcEstimatedSize();return this.estimatedSize=0==H?b.EMPTY_COMPOUND_NODE_SIZE:H/Math.sqrt(this.nodes.length),this.estimatedSize},N.prototype.updateConnected=function(){var H=this;if(0!=this.nodes.length){var Z,P,W=new E,ae=new Set,L=this.nodes[0];for(L.withChildren().forEach(function(he){W.push(he),ae.add(he)});0!==W.length;)for(var Q=(Z=(L=W.shift()).getEdges()).length,w=0;w<Q;w++)null==(P=Z[w].getOtherEndInGraph(L,this))||ae.has(P)||P.withChildren().forEach(function(he){W.push(he),ae.add(he)});if(this.isConnected=!1,ae.size>=this.nodes.length){var te=0;ae.forEach(function(he){he.owner==H&&te++}),te==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},Ve.exports=N},function(Ve,oe,O){"use strict";var F,k=O(1);function b(j){F=O(5),this.layout=j,this.graphs=[],this.edges=[]}b.prototype.addRoot=function(){var j=this.layout.newGraph(),T=this.layout.newNode(null),S=this.add(j,T);return this.setRootGraph(S),this.rootGraph},b.prototype.add=function(j,T,S,x,G){if(null==S&&null==x&&null==G){if(null==j)throw"Graph is null!";if(null==T)throw"Parent node is null!";if(this.graphs.indexOf(j)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(j),null!=j.parent)throw"Already has a parent!";if(null!=T.child)throw"Already has a child!";return j.parent=T,T.child=j,j}G=S,S=j;var E=(x=T).getOwner(),N=G.getOwner();if(null==E||E.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==N||N.getGraphManager()!=this)throw"Target not in this graph mgr!";if(E==N)return S.isInterGraph=!1,E.add(S,x,G);if(S.isInterGraph=!0,S.source=x,S.target=G,this.edges.indexOf(S)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(S),null==S.source||null==S.target)throw"Edge source and/or target is null!";if(-1!=S.source.edges.indexOf(S)||-1!=S.target.edges.indexOf(S))throw"Edge already in source and/or target incidency list!";return S.source.edges.push(S),S.target.edges.push(S),S},b.prototype.remove=function(j){if(j instanceof F){var T=j;if(T.getGraphManager()!=this)throw"Graph not in this graph mgr";if(T!=this.rootGraph&&(null==T.parent||T.parent.graphManager!=this))throw"Invalid parent node!";for(var x,S=[],G=(S=S.concat(T.getEdges())).length,E=0;E<G;E++)T.remove(x=S[E]);var N=[];for(G=(N=N.concat(T.getNodes())).length,E=0;E<G;E++)T.remove(N[E]);T==this.rootGraph&&this.setRootGraph(null);var H=this.graphs.indexOf(T);this.graphs.splice(H,1),T.parent=null}else if(j instanceof k){if(null==(x=j))throw"Edge is null!";if(!x.isInterGraph)throw"Not an inter-graph edge!";if(null==x.source||null==x.target)throw"Source and/or target is null!";if(-1==x.source.edges.indexOf(x)||-1==x.target.edges.indexOf(x))throw"Source and/or target doesn't know this edge!";if(H=x.source.edges.indexOf(x),x.source.edges.splice(H,1),H=x.target.edges.indexOf(x),x.target.edges.splice(H,1),null==x.source.owner||null==x.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==x.source.owner.getGraphManager().edges.indexOf(x))throw"Not in owner graph manager's edge list!";H=x.source.owner.getGraphManager().edges.indexOf(x),x.source.owner.getGraphManager().edges.splice(H,1)}},b.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},b.prototype.getGraphs=function(){return this.graphs},b.prototype.getAllNodes=function(){if(null==this.allNodes){for(var j=[],T=this.getGraphs(),S=T.length,x=0;x<S;x++)j=j.concat(T[x].getNodes());this.allNodes=j}return this.allNodes},b.prototype.resetAllNodes=function(){this.allNodes=null},b.prototype.resetAllEdges=function(){this.allEdges=null},b.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},b.prototype.getAllEdges=function(){if(null==this.allEdges){for(var j=[],T=this.getGraphs(),x=0;x<T.length;x++)j=j.concat(T[x].getEdges());j=j.concat(this.edges),this.allEdges=j}return this.allEdges},b.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},b.prototype.setAllNodesToApplyGravitation=function(j){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=j},b.prototype.getRoot=function(){return this.rootGraph},b.prototype.setRootGraph=function(j){if(j.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=j,null==j.parent&&(j.parent=this.layout.newNode("Root node"))},b.prototype.getLayout=function(){return this.layout},b.prototype.isOneAncestorOfOther=function(j,T){if(null==j||null==T)throw"assert failed";if(j==T)return!0;for(var x,S=j.getOwner();null!=(x=S.getParent());){if(x==T)return!0;if(null==(S=x.getOwner()))break}for(S=T.getOwner();null!=(x=S.getParent());){if(x==j)return!0;if(null==(S=x.getOwner()))break}return!1},b.prototype.calcLowestCommonAncestors=function(){for(var j,T,S,x,G,E=this.getAllEdges(),N=E.length,J=0;J<N;J++)if(T=(j=E[J]).source,S=j.target,j.lca=null,j.sourceInLca=T,j.targetInLca=S,T!=S){for(x=T.getOwner();null==j.lca;){for(j.targetInLca=S,G=S.getOwner();null==j.lca;){if(G==x){j.lca=G;break}if(G==this.rootGraph)break;if(null!=j.lca)throw"assert failed";j.targetInLca=G.getParent(),G=j.targetInLca.getOwner()}if(x==this.rootGraph)break;null==j.lca&&(j.sourceInLca=x.getParent(),x=j.sourceInLca.getOwner())}if(null==j.lca)throw"assert failed"}else j.lca=T.getOwner()},b.prototype.calcLowestCommonAncestor=function(j,T){if(j==T)return j.getOwner();for(var S=j.getOwner();null!=S;){for(var x=T.getOwner();null!=x;){if(x==S)return x;x=x.getParent().getOwner()}S=S.getParent().getOwner()}return S},b.prototype.calcInclusionTreeDepths=function(j,T){null==j&&null==T&&(j=this.rootGraph,T=1);for(var S,x=j.getNodes(),G=x.length,E=0;E<G;E++)(S=x[E]).inclusionTreeDepth=T,null!=S.child&&this.calcInclusionTreeDepths(S.child,T+1)},b.prototype.includesInvalidEdge=function(){for(var j,T=this.edges.length,S=0;S<T;S++)if(this.isOneAncestorOfOther((j=this.edges[S]).source,j.target))return!0;return!1},Ve.exports=b},function(Ve,oe,O){"use strict";var F=O(0);function k(){}for(var b in F)k[b]=F[b];k.MAX_ITERATIONS=2500,k.DEFAULT_EDGE_LENGTH=50,k.DEFAULT_SPRING_STRENGTH=.45,k.DEFAULT_REPULSION_STRENGTH=4500,k.DEFAULT_GRAVITY_STRENGTH=.4,k.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,k.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,k.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,k.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,k.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,k.COOLING_ADAPTATION_FACTOR=.33,k.ADAPTATION_LOWER_NODE_LIMIT=1e3,k.ADAPTATION_UPPER_NODE_LIMIT=5e3,k.MAX_NODE_DISPLACEMENT=3*(k.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),k.MIN_REPULSION_DIST=k.DEFAULT_EDGE_LENGTH/10,k.CONVERGENCE_CHECK_PERIOD=100,k.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,k.MIN_EDGE_LENGTH=1,k.GRID_CALCULATION_CHECK_PERIOD=10,Ve.exports=k},function(Ve,oe,O){"use strict";var F=O(12);function k(){}k.calcSeparationAmount=function(b,j,T,S){if(!b.intersects(j))throw"assert failed";var x=new Array(2);this.decideDirectionsForOverlappingNodes(b,j,x),T[0]=Math.min(b.getRight(),j.getRight())-Math.max(b.x,j.x),T[1]=Math.min(b.getBottom(),j.getBottom())-Math.max(b.y,j.y),b.getX()<=j.getX()&&b.getRight()>=j.getRight()?T[0]+=Math.min(j.getX()-b.getX(),b.getRight()-j.getRight()):j.getX()<=b.getX()&&j.getRight()>=b.getRight()&&(T[0]+=Math.min(b.getX()-j.getX(),j.getRight()-b.getRight())),b.getY()<=j.getY()&&b.getBottom()>=j.getBottom()?T[1]+=Math.min(j.getY()-b.getY(),b.getBottom()-j.getBottom()):j.getY()<=b.getY()&&j.getBottom()>=b.getBottom()&&(T[1]+=Math.min(b.getY()-j.getY(),j.getBottom()-b.getBottom()));var G=Math.abs((j.getCenterY()-b.getCenterY())/(j.getCenterX()-b.getCenterX()));j.getCenterY()===b.getCenterY()&&j.getCenterX()===b.getCenterX()&&(G=1);var E=G*T[0],N=T[1]/G;T[0]<N?N=T[0]:E=T[1],T[0]=-1*x[0]*(N/2+S),T[1]=-1*x[1]*(E/2+S)},k.decideDirectionsForOverlappingNodes=function(b,j,T){T[0]=b.getCenterX()<j.getCenterX()?-1:1,T[1]=b.getCenterY()<j.getCenterY()?-1:1},k.getIntersection2=function(b,j,T){var S=b.getCenterX(),x=b.getCenterY(),G=j.getCenterX(),E=j.getCenterY();if(b.intersects(j))return T[0]=S,T[1]=x,T[2]=G,T[3]=E,!0;var N=b.getX(),J=b.getY(),H=b.getRight(),W=b.getX(),ae=b.getBottom(),L=b.getRight(),Z=b.getWidthHalf(),P=b.getHeightHalf(),ie=j.getX(),Q=j.getY(),w=j.getRight(),D=j.getX(),V=j.getBottom(),te=j.getRight(),he=j.getWidthHalf(),ge=j.getHeightHalf(),se=!1,de=!1;if(S===G){if(x>E)return T[0]=S,T[1]=J,T[2]=G,T[3]=V,!1;if(x<E)return T[0]=S,T[1]=ae,T[2]=G,T[3]=Q,!1}else if(x===E){if(S>G)return T[0]=N,T[1]=x,T[2]=w,T[3]=E,!1;if(S<G)return T[0]=H,T[1]=x,T[2]=ie,T[3]=E,!1}else{var Ce=b.height/b.width,Ie=j.height/j.width,Ne=(E-x)/(G-S),tt=void 0,Ee=void 0,ye=void 0,Oe=void 0;if(-Ce===Ne?S>G?(T[0]=W,T[1]=ae,se=!0):(T[0]=H,T[1]=J,se=!0):Ce===Ne&&(S>G?(T[0]=N,T[1]=J,se=!0):(T[0]=L,T[1]=ae,se=!0)),-Ie===Ne?G>S?(T[2]=D,T[3]=V,de=!0):(T[2]=w,T[3]=Q,de=!0):Ie===Ne&&(G>S?(T[2]=ie,T[3]=Q,de=!0):(T[2]=te,T[3]=V,de=!0)),se&&de)return!1;if(S>G?x>E?(tt=this.getCardinalDirection(Ce,Ne,4),Ee=this.getCardinalDirection(Ie,Ne,2)):(tt=this.getCardinalDirection(-Ce,Ne,3),Ee=this.getCardinalDirection(-Ie,Ne,1)):x>E?(tt=this.getCardinalDirection(-Ce,Ne,1),Ee=this.getCardinalDirection(-Ie,Ne,3)):(tt=this.getCardinalDirection(Ce,Ne,2),Ee=this.getCardinalDirection(Ie,Ne,4)),!se)switch(tt){case 1:ye=J,T[0]=S+-P/Ne,T[1]=ye;break;case 2:ye=x+Z*Ne,T[0]=L,T[1]=ye;break;case 3:ye=ae,T[0]=S+P/Ne,T[1]=ye;break;case 4:ye=x+-Z*Ne,T[0]=W,T[1]=ye}if(!de)switch(Ee){case 1:Oe=Q,T[2]=G+-ge/Ne,T[3]=Oe;break;case 2:Oe=E+he*Ne,T[2]=te,T[3]=Oe;break;case 3:Oe=V,T[2]=G+ge/Ne,T[3]=Oe;break;case 4:Oe=E+-he*Ne,T[2]=D,T[3]=Oe}}return!1},k.getCardinalDirection=function(b,j,T){return b>j?T:1+T%4},k.getIntersection=function(b,j,T,S){if(null==S)return this.getIntersection2(b,j,T);var P,ie,Q,w,D,V,te,x=b.x,G=b.y,E=j.x,N=j.y,J=T.x,H=T.y,W=S.x,ae=S.y;return D=E*G-x*N,V=W*H-J*ae,0===(te=(P=N-G)*(w=J-W)-(ie=ae-H)*(Q=x-E))?null:new F((Q*V-w*D)/te,(ie*D-P*V)/te)},k.angleOfVector=function(b,j,T,S){var x=void 0;return b!==T?(x=Math.atan((S-j)/(T-b)),T<b?x+=Math.PI:S<j&&(x+=this.TWO_PI)):x=S<j?this.ONE_AND_HALF_PI:this.HALF_PI,x},k.doIntersect=function(b,j,T,S){var x=b.x,G=b.y,E=j.x,N=j.y,J=T.x,H=T.y,W=S.x,ae=S.y,L=(E-x)*(ae-H)-(W-J)*(N-G);if(0===L)return!1;var Z=((ae-H)*(W-x)+(J-W)*(ae-G))/L,P=((G-N)*(W-x)+(E-x)*(ae-G))/L;return 0<Z&&Z<1&&0<P&&P<1},k.HALF_PI=.5*Math.PI,k.ONE_AND_HALF_PI=1.5*Math.PI,k.TWO_PI=2*Math.PI,k.THREE_PI=3*Math.PI,Ve.exports=k},function(Ve,oe,O){"use strict";function F(){}F.sign=function(k){return k>0?1:k<0?-1:0},F.floor=function(k){return k<0?Math.ceil(k):Math.floor(k)},F.ceil=function(k){return k<0?Math.floor(k):Math.ceil(k)},Ve.exports=F},function(Ve,oe,O){"use strict";function F(){}F.MAX_VALUE=2147483647,F.MIN_VALUE=-2147483648,Ve.exports=F},function(Ve,oe,O){"use strict";var F=function(){function x(G,E){for(var N=0;N<E.length;N++){var J=E[N];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(G,J.key,J)}}return function(G,E,N){return E&&x(G.prototype,E),N&&x(G,N),G}}();var b=function(G){return{value:G,next:null,prev:null}},j=function(G,E,N,J){return null!==G?G.next=E:J.head=E,null!==N?N.prev=E:J.tail=E,E.prev=G,E.next=N,J.length++,E},T=function(G,E){var N=G.prev,J=G.next;return null!==N?N.next=J:E.head=J,null!==J?J.prev=N:E.tail=N,G.prev=G.next=null,E.length--,G},S=function(){function x(G){var E=this;(function k(x,G){if(!(x instanceof G))throw new TypeError("Cannot call a class as a function")})(this,x),this.length=0,this.head=null,this.tail=null,G?.forEach(function(N){return E.push(N)})}return F(x,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(E,N){return j(N.prev,b(E),N,this)}},{key:"insertAfter",value:function(E,N){return j(N,b(E),N.next,this)}},{key:"insertNodeBefore",value:function(E,N){return j(N.prev,E,N,this)}},{key:"insertNodeAfter",value:function(E,N){return j(N,E,N.next,this)}},{key:"push",value:function(E){return j(this.tail,b(E),null,this)}},{key:"unshift",value:function(E){return j(null,b(E),this.head,this)}},{key:"remove",value:function(E){return T(E,this)}},{key:"pop",value:function(){return T(this.tail,this).value}},{key:"popNode",value:function(){return T(this.tail,this)}},{key:"shift",value:function(){return T(this.head,this).value}},{key:"shiftNode",value:function(){return T(this.head,this)}},{key:"get_object_at",value:function(E){if(E<=this.length()){for(var N=1,J=this.head;N<E;)J=J.next,N++;return J.value}}},{key:"set_object_at",value:function(E,N){if(E<=this.length()){for(var J=1,H=this.head;J<E;)H=H.next,J++;H.value=N}}}]),x}();Ve.exports=S},function(Ve,oe,O){"use strict";function F(k,b,j){this.x=null,this.y=null,null==k&&null==b&&null==j?(this.x=0,this.y=0):"number"==typeof k&&"number"==typeof b&&null==j?(this.x=k,this.y=b):"Point"==k.constructor.name&&null==b&&null==j&&(this.x=(j=k).x,this.y=j.y)}F.prototype.getX=function(){return this.x},F.prototype.getY=function(){return this.y},F.prototype.getLocation=function(){return new F(this.x,this.y)},F.prototype.setLocation=function(k,b,j){"Point"==k.constructor.name&&null==b&&null==j?this.setLocation((j=k).x,j.y):"number"==typeof k&&"number"==typeof b&&null==j&&(parseInt(k)==k&&parseInt(b)==b?this.move(k,b):(this.x=Math.floor(k+.5),this.y=Math.floor(b+.5)))},F.prototype.move=function(k,b){this.x=k,this.y=b},F.prototype.translate=function(k,b){this.x+=k,this.y+=b},F.prototype.equals=function(k){return"Point"==k.constructor.name?this.x==k.x&&this.y==k.y:this==k},F.prototype.toString=function(){return(new F).constructor.name+"[x="+this.x+",y="+this.y+"]"},Ve.exports=F},function(Ve,oe,O){"use strict";function F(k,b,j,T){this.x=0,this.y=0,this.width=0,this.height=0,null!=k&&null!=b&&null!=j&&null!=T&&(this.x=k,this.y=b,this.width=j,this.height=T)}F.prototype.getX=function(){return this.x},F.prototype.setX=function(k){this.x=k},F.prototype.getY=function(){return this.y},F.prototype.setY=function(k){this.y=k},F.prototype.getWidth=function(){return this.width},F.prototype.setWidth=function(k){this.width=k},F.prototype.getHeight=function(){return this.height},F.prototype.setHeight=function(k){this.height=k},F.prototype.getRight=function(){return this.x+this.width},F.prototype.getBottom=function(){return this.y+this.height},F.prototype.intersects=function(k){return!(this.getRight()<k.x||this.getBottom()<k.y||k.getRight()<this.x||k.getBottom()<this.y)},F.prototype.getCenterX=function(){return this.x+this.width/2},F.prototype.getMinX=function(){return this.getX()},F.prototype.getMaxX=function(){return this.getX()+this.width},F.prototype.getCenterY=function(){return this.y+this.height/2},F.prototype.getMinY=function(){return this.getY()},F.prototype.getMaxY=function(){return this.getY()+this.height},F.prototype.getWidthHalf=function(){return this.width/2},F.prototype.getHeightHalf=function(){return this.height/2},Ve.exports=F},function(Ve,oe,O){"use strict";var F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"==typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b};function k(){}k.lastID=0,k.createID=function(b){return k.isPrimitive(b)?b:(null!=b.uniqueID||(b.uniqueID=k.getString(),k.lastID++),b.uniqueID)},k.getString=function(b){return null==b&&(b=k.lastID),"Object#"+b},k.isPrimitive=function(b){var j=typeof b>"u"?"undefined":F(b);return null==b||"object"!=j&&"function"!=j},Ve.exports=k},function(Ve,oe,O){"use strict";function F(J){if(Array.isArray(J)){for(var H=0,W=Array(J.length);H<J.length;H++)W[H]=J[H];return W}return Array.from(J)}var k=O(0),b=O(6),j=O(3),T=O(1),S=O(5),x=O(4),G=O(17),E=O(27);function N(J){E.call(this),this.layoutQuality=k.QUALITY,this.createBendsAsNeeded=k.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=k.DEFAULT_INCREMENTAL,this.animationOnLayout=k.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=k.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=k.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=k.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new b(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=J&&(this.isRemoteUse=J)}N.RANDOM_SEED=1,(N.prototype=Object.create(E.prototype)).getGraphManager=function(){return this.graphManager},N.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},N.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},N.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},N.prototype.newGraphManager=function(){var J=new b(this);return this.graphManager=J,J},N.prototype.newGraph=function(J){return new S(null,this.graphManager,J)},N.prototype.newNode=function(J){return new j(this.graphManager,J)},N.prototype.newEdge=function(J){return new T(null,null,J)},N.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},N.prototype.runLayout=function(){var J;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),J=!this.checkLayoutSuccess()&&this.layout(),"during"!==k.ANIMATE&&(J&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,J)},N.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},N.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var H=this.graphManager.getAllEdges(),W=0;W<H.length;W++);var L=this.graphManager.getRoot().getNodes();for(W=0;W<L.length;W++);this.update(this.graphManager.getRoot())}},N.prototype.update=function(J){if(null==J)this.update2();else if(J instanceof j){var H=J;if(null!=H.getChild())for(var W=H.getChild().getNodes(),ae=0;ae<W.length;ae++)update(W[ae]);null!=H.vGraphObject&&H.vGraphObject.update(H)}else J instanceof T?null!=J.vGraphObject&&J.vGraphObject.update(J):J instanceof S&&null!=J.vGraphObject&&J.vGraphObject.update(J)},N.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=k.QUALITY,this.animationDuringLayout=k.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=k.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=k.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=k.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=k.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=k.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},N.prototype.transform=function(J){if(null==J)this.transform(new x(0,0));else{var H=new G,W=this.graphManager.getRoot().updateLeftTop();if(null!=W){H.setWorldOrgX(J.x),H.setWorldOrgY(J.y),H.setDeviceOrgX(W.x),H.setDeviceOrgY(W.y);for(var ae=this.getAllNodes(),Z=0;Z<ae.length;Z++)ae[Z].transform(H)}}},N.prototype.positionNodesRandomly=function(J){if(null==J)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var H,W,ae=J.getNodes(),L=0;L<ae.length;L++)null==(W=(H=ae[L]).getChild())||0==W.getNodes().length?H.scatter():(this.positionNodesRandomly(W),H.updateBounds())},N.prototype.getFlatForest=function(){for(var J=[],H=!0,W=this.graphManager.getRoot().getNodes(),ae=!0,L=0;L<W.length;L++)null!=W[L].getChild()&&(ae=!1);if(!ae)return J;var Z=new Set,P=[],ie=new Map,Q=[];for(Q=Q.concat(W);Q.length>0&&H;){for(P.push(Q[0]);P.length>0&&H;){var w=P[0];P.splice(0,1),Z.add(w);var D=w.getEdges();for(L=0;L<D.length;L++){var V=D[L].getOtherEnd(w);if(ie.get(w)!=V){if(Z.has(V)){H=!1;break}P.push(V),ie.set(V,w)}}}if(H){var te=[].concat(F(Z));for(J.push(te),L=0;L<te.length;L++){var ge=Q.indexOf(te[L]);ge>-1&&Q.splice(ge,1)}Z=new Set,ie=new Map}else J=[]}return J},N.prototype.createDummyNodesForBendpoints=function(J){for(var H=[],W=J.source,ae=this.graphManager.calcLowestCommonAncestor(J.source,J.target),L=0;L<J.bendpoints.length;L++){var Z=this.newNode(null);Z.setRect(new Point(0,0),new Dimension(1,1)),ae.add(Z);var P=this.newEdge(null);this.graphManager.add(P,W,Z),H.add(Z),W=Z}return P=this.newEdge(null),this.graphManager.add(P,W,J.target),this.edgeToDummyNodes.set(J,H),J.isInterGraph()?this.graphManager.remove(J):ae.remove(J),H},N.prototype.createBendpointsFromDummyNodes=function(){var J=[];J=J.concat(this.graphManager.getAllEdges()),J=[].concat(F(this.edgeToDummyNodes.keys())).concat(J);for(var H=0;H<J.length;H++){var W=J[H];if(W.bendpoints.length>0){for(var ae=this.edgeToDummyNodes.get(W),L=0;L<ae.length;L++){var Z=ae[L],P=new x(Z.getCenterX(),Z.getCenterY()),ie=W.bendpoints.get(L);ie.x=P.x,ie.y=P.y,Z.getOwner().remove(Z)}this.graphManager.add(W,W.source,W.target)}}},N.transform=function(J,H,W,ae){if(null!=W&&null!=ae){var L=H;return J<=50?L-=(H-H/W)/50*(50-J):L+=(H*ae-H)/50*(J-50),L}var ie,Q;return J<=50?(ie=9*H/500,Q=H/10):(ie=9*H/50,Q=-8*H),ie*J+Q},N.findCenterOfTree=function(J){var H=[];H=H.concat(J);var W=[],ae=new Map,L=!1,Z=null;(1==H.length||2==H.length)&&(L=!0,Z=H[0]);for(var P=0;P<H.length;P++){var Q=(ie=H[P]).getNeighborsList().size;ae.set(ie,ie.getNeighborsList().size),1==Q&&W.push(ie)}var w=[];for(w=w.concat(W);!L;){var D=[];for(D=D.concat(w),w=[],P=0;P<H.length;P++){var ie,V=H.indexOf(ie=H[P]);V>=0&&H.splice(V,1),ie.getNeighborsList().forEach(function(se){if(W.indexOf(se)<0){var Ce=ae.get(se)-1;1==Ce&&w.push(se),ae.set(se,Ce)}})}W=W.concat(w),(1==H.length||2==H.length)&&(L=!0,Z=H[0])}return Z},N.prototype.setGraphManager=function(J){this.graphManager=J},Ve.exports=N},function(Ve,oe,O){"use strict";function F(){}F.seed=1,F.x=0,F.nextDouble=function(){return(F.x=1e4*Math.sin(F.seed++))-Math.floor(F.x)},Ve.exports=F},function(Ve,oe,O){"use strict";var F=O(4);function k(b,j){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}k.prototype.getWorldOrgX=function(){return this.lworldOrgX},k.prototype.setWorldOrgX=function(b){this.lworldOrgX=b},k.prototype.getWorldOrgY=function(){return this.lworldOrgY},k.prototype.setWorldOrgY=function(b){this.lworldOrgY=b},k.prototype.getWorldExtX=function(){return this.lworldExtX},k.prototype.setWorldExtX=function(b){this.lworldExtX=b},k.prototype.getWorldExtY=function(){return this.lworldExtY},k.prototype.setWorldExtY=function(b){this.lworldExtY=b},k.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},k.prototype.setDeviceOrgX=function(b){this.ldeviceOrgX=b},k.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},k.prototype.setDeviceOrgY=function(b){this.ldeviceOrgY=b},k.prototype.getDeviceExtX=function(){return this.ldeviceExtX},k.prototype.setDeviceExtX=function(b){this.ldeviceExtX=b},k.prototype.getDeviceExtY=function(){return this.ldeviceExtY},k.prototype.setDeviceExtY=function(b){this.ldeviceExtY=b},k.prototype.transformX=function(b){var j=0,T=this.lworldExtX;return 0!=T&&(j=this.ldeviceOrgX+(b-this.lworldOrgX)*this.ldeviceExtX/T),j},k.prototype.transformY=function(b){var j=0,T=this.lworldExtY;return 0!=T&&(j=this.ldeviceOrgY+(b-this.lworldOrgY)*this.ldeviceExtY/T),j},k.prototype.inverseTransformX=function(b){var j=0,T=this.ldeviceExtX;return 0!=T&&(j=this.lworldOrgX+(b-this.ldeviceOrgX)*this.lworldExtX/T),j},k.prototype.inverseTransformY=function(b){var j=0,T=this.ldeviceExtY;return 0!=T&&(j=this.lworldOrgY+(b-this.ldeviceOrgY)*this.lworldExtY/T),j},k.prototype.inverseTransformPoint=function(b){return new F(this.inverseTransformX(b.x),this.inverseTransformY(b.y))},Ve.exports=k},function(Ve,oe,O){"use strict";var k=O(15),b=O(7),j=O(0),T=O(8),S=O(9);function x(){k.call(this),this.useSmartIdealEdgeLengthCalculation=b.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=b.DEFAULT_EDGE_LENGTH,this.springConstant=b.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=b.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=b.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=b.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=b.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=b.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*b.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=b.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=b.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=b.MAX_ITERATIONS}for(var G in x.prototype=Object.create(k.prototype),k)x[G]=k[G];x.prototype.initParameters=function(){k.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=b.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},x.prototype.calcIdealEdgeLengths=function(){for(var E,N,J,H,W,ae,L=this.getGraphManager().getAllEdges(),Z=0;Z<L.length;Z++)(E=L[Z]).idealLength=this.idealEdgeLength,E.isInterGraph&&(J=E.getSource(),H=E.getTarget(),W=E.getSourceInLca().getEstimatedSize(),ae=E.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(E.idealLength+=W+ae-2*j.SIMPLE_NODE_SIZE),N=E.getLca().getInclusionTreeDepth(),E.idealLength+=b.DEFAULT_EDGE_LENGTH*b.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(J.getInclusionTreeDepth()+H.getInclusionTreeDepth()-2*N))},x.prototype.initSpringEmbedder=function(){var E=this.getAllNodes().length;this.incremental?(E>b.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*b.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(E-b.ADAPTATION_LOWER_NODE_LIMIT)/(b.ADAPTATION_UPPER_NODE_LIMIT-b.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-b.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=b.MAX_NODE_DISPLACEMENT_INCREMENTAL):(this.coolingFactor=E>b.ADAPTATION_LOWER_NODE_LIMIT?Math.max(b.COOLING_ADAPTATION_FACTOR,1-(E-b.ADAPTATION_LOWER_NODE_LIMIT)/(b.ADAPTATION_UPPER_NODE_LIMIT-b.ADAPTATION_LOWER_NODE_LIMIT)*(1-b.COOLING_ADAPTATION_FACTOR)):1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=b.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},x.prototype.calcSpringForces=function(){for(var N,E=this.getAllEdges(),J=0;J<E.length;J++)this.calcSpringForce(N=E[J],N.idealLength)},x.prototype.calcRepulsionForces=function(){var J,H,W,ae,Z,E=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],N=arguments.length>1&&void 0!==arguments[1]&&arguments[1],L=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%b.GRID_CALCULATION_CHECK_PERIOD==1&&E&&this.updateGrid(),Z=new Set,J=0;J<L.length;J++)this.calculateRepulsionForceOfANode(W=L[J],Z,E,N),Z.add(W);else for(J=0;J<L.length;J++)for(W=L[J],H=J+1;H<L.length;H++)ae=L[H],W.getOwner()==ae.getOwner()&&this.calcRepulsionForce(W,ae)},x.prototype.calcGravitationalForces=function(){for(var N=this.getAllNodesToApplyGravitation(),J=0;J<N.length;J++)this.calcGravitationalForce(N[J])},x.prototype.moveNodes=function(){for(var E=this.getAllNodes(),J=0;J<E.length;J++)E[J].move()},x.prototype.calcSpringForce=function(E,N){var W,ae,L,Z,J=E.getSource(),H=E.getTarget();if(this.uniformLeafNodeSizes&&null==J.getChild()&&null==H.getChild())E.updateLengthSimple();else if(E.updateLength(),E.isOverlapingSourceAndTarget)return;0!=(W=E.getLength())&&(Z=(ae=this.springConstant*(W-N))*(E.lengthY/W),J.springForceX+=L=ae*(E.lengthX/W),J.springForceY+=Z,H.springForceX-=L,H.springForceY-=Z)},x.prototype.calcRepulsionForce=function(E,N){var L,Z,P,ie,Q,w,D,J=E.getRect(),H=N.getRect(),W=new Array(2),ae=new Array(4);if(J.intersects(H)){T.calcSeparationAmount(J,H,W,b.DEFAULT_EDGE_LENGTH/2),D=2*W[1];var V=E.noOfChildren*N.noOfChildren/(E.noOfChildren+N.noOfChildren);E.repulsionForceX-=V*(w=2*W[0]),E.repulsionForceY-=V*D,N.repulsionForceX+=V*w,N.repulsionForceY+=V*D}else this.uniformLeafNodeSizes&&null==E.getChild()&&null==N.getChild()?(L=H.getCenterX()-J.getCenterX(),Z=H.getCenterY()-J.getCenterY()):(T.getIntersection(J,H,ae),L=ae[2]-ae[0],Z=ae[3]-ae[1]),Math.abs(L)<b.MIN_REPULSION_DIST&&(L=S.sign(L)*b.MIN_REPULSION_DIST),Math.abs(Z)<b.MIN_REPULSION_DIST&&(Z=S.sign(Z)*b.MIN_REPULSION_DIST),P=L*L+Z*Z,ie=Math.sqrt(P),D=(Q=this.repulsionConstant*E.noOfChildren*N.noOfChildren/P)*Z/ie,E.repulsionForceX-=w=Q*L/ie,E.repulsionForceY-=D,N.repulsionForceX+=w,N.repulsionForceY+=D},x.prototype.calcGravitationalForce=function(E){var N,J,H,W,ae,L,Z,P;J=((N=E.getOwner()).getRight()+N.getLeft())/2,H=(N.getTop()+N.getBottom())/2,W=E.getCenterX()-J,ae=E.getCenterY()-H,L=Math.abs(W)+E.getWidth()/2,Z=Math.abs(ae)+E.getHeight()/2,E.getOwner()==this.graphManager.getRoot()?(L>(P=N.getEstimatedSize()*this.gravityRangeFactor)||Z>P)&&(E.gravitationForceX=-this.gravityConstant*W,E.gravitationForceY=-this.gravityConstant*ae):(L>(P=N.getEstimatedSize()*this.compoundGravityRangeFactor)||Z>P)&&(E.gravitationForceX=-this.gravityConstant*W*this.compoundGravityConstant,E.gravitationForceY=-this.gravityConstant*ae*this.compoundGravityConstant)},x.prototype.isConverged=function(){var E,N=!1;return this.totalIterations>this.maxIterations/3&&(N=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),E=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,E||N},x.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},x.prototype.calcNoOfChildrenForAllNodes=function(){for(var E,N=this.graphManager.getAllNodes(),J=0;J<N.length;J++)(E=N[J]).noOfChildren=E.getNoOfChildren()},x.prototype.calcGrid=function(E){var N,J;N=parseInt(Math.ceil((E.getRight()-E.getLeft())/this.repulsionRange)),J=parseInt(Math.ceil((E.getBottom()-E.getTop())/this.repulsionRange));for(var H=new Array(N),W=0;W<N;W++)H[W]=new Array(J);for(W=0;W<N;W++)for(var ae=0;ae<J;ae++)H[W][ae]=new Array;return H},x.prototype.addNodeToGrid=function(E,N,J){var H,W,ae,L;H=parseInt(Math.floor((E.getRect().x-N)/this.repulsionRange)),W=parseInt(Math.floor((E.getRect().width+E.getRect().x-N)/this.repulsionRange)),ae=parseInt(Math.floor((E.getRect().y-J)/this.repulsionRange)),L=parseInt(Math.floor((E.getRect().height+E.getRect().y-J)/this.repulsionRange));for(var Z=H;Z<=W;Z++)for(var P=ae;P<=L;P++)this.grid[Z][P].push(E),E.setGridCoordinates(H,W,ae,L)},x.prototype.updateGrid=function(){var E,J=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),E=0;E<J.length;E++)this.addNodeToGrid(J[E],this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},x.prototype.calculateRepulsionForceOfANode=function(E,N,J,H){if(this.totalIterations%b.GRID_CALCULATION_CHECK_PERIOD==1&&J||H){var W=new Set;E.surrounding=new Array;for(var ae,L=this.grid,Z=E.startX-1;Z<E.finishX+2;Z++)for(var P=E.startY-1;P<E.finishY+2;P++)if(!(Z<0||P<0||Z>=L.length||P>=L[0].length))for(var ie=0;ie<L[Z][P].length;ie++)if(ae=L[Z][P][ie],E.getOwner()==ae.getOwner()&&E!=ae&&!N.has(ae)&&!W.has(ae)){var Q=Math.abs(E.getCenterX()-ae.getCenterX())-(E.getWidth()/2+ae.getWidth()/2),w=Math.abs(E.getCenterY()-ae.getCenterY())-(E.getHeight()/2+ae.getHeight()/2);Q<=this.repulsionRange&&w<=this.repulsionRange&&W.add(ae)}E.surrounding=[].concat(function F(E){if(Array.isArray(E)){for(var N=0,J=Array(E.length);N<E.length;N++)J[N]=E[N];return J}return Array.from(E)}(W))}for(Z=0;Z<E.surrounding.length;Z++)this.calcRepulsionForce(E,E.surrounding[Z])},x.prototype.calcRepulsionRange=function(){return 0},Ve.exports=x},function(Ve,oe,O){"use strict";var F=O(1),k=O(7);function b(T,S,x){F.call(this,T,S,x),this.idealLength=k.DEFAULT_EDGE_LENGTH}for(var j in b.prototype=Object.create(F.prototype),F)b[j]=F[j];Ve.exports=b},function(Ve,oe,O){"use strict";var F=O(3);function k(j,T,S,x){F.call(this,j,T,S,x),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var b in k.prototype=Object.create(F.prototype),F)k[b]=F[b];k.prototype.setGridCoordinates=function(j,T,S,x){this.startX=j,this.finishX=T,this.startY=S,this.finishY=x},Ve.exports=k},function(Ve,oe,O){"use strict";function F(k,b){this.width=0,this.height=0,null!==k&&null!==b&&(this.height=b,this.width=k)}F.prototype.getWidth=function(){return this.width},F.prototype.setWidth=function(k){this.width=k},F.prototype.getHeight=function(){return this.height},F.prototype.setHeight=function(k){this.height=k},Ve.exports=F},function(Ve,oe,O){"use strict";var F=O(14);function k(){this.map={},this.keys=[]}k.prototype.put=function(b,j){var T=F.createID(b);this.contains(T)||(this.map[T]=j,this.keys.push(b))},k.prototype.contains=function(b){return F.createID(b),null!=this.map[b]},k.prototype.get=function(b){var j=F.createID(b);return this.map[j]},k.prototype.keySet=function(){return this.keys},Ve.exports=k},function(Ve,oe,O){"use strict";var F=O(14);function k(){this.set={}}k.prototype.add=function(b){var j=F.createID(b);this.contains(j)||(this.set[j]=b)},k.prototype.remove=function(b){delete this.set[F.createID(b)]},k.prototype.clear=function(){this.set={}},k.prototype.contains=function(b){return this.set[F.createID(b)]==b},k.prototype.isEmpty=function(){return 0===this.size()},k.prototype.size=function(){return Object.keys(this.set).length},k.prototype.addAllTo=function(b){for(var j=Object.keys(this.set),T=j.length,S=0;S<T;S++)b.push(this.set[j[S]])},k.prototype.size=function(){return Object.keys(this.set).length},k.prototype.addAll=function(b){for(var j=b.length,T=0;T<j;T++)this.add(b[T])},Ve.exports=k},function(Ve,oe,O){"use strict";var F=function(){function T(S,x){for(var G=0;G<x.length;G++){var E=x[G];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(S,E.key,E)}}return function(S,x,G){return x&&T(S.prototype,x),G&&T(S,G),S}}();var b=O(11),j=function(){function T(S,x){(function k(T,S){if(!(T instanceof S))throw new TypeError("Cannot call a class as a function")})(this,T),(null!==x||void 0!==x)&&(this.compareFunction=this._defaultCompareFunction);var G;G=S instanceof b?S.size():S.length,this._quicksort(S,0,G-1)}return F(T,[{key:"_quicksort",value:function(x,G,E){if(G<E){var N=this._partition(x,G,E);this._quicksort(x,G,N),this._quicksort(x,N+1,E)}}},{key:"_partition",value:function(x,G,E){for(var N=this._get(x,G),J=G,H=E;;){for(;this.compareFunction(N,this._get(x,H));)H--;for(;this.compareFunction(this._get(x,J),N);)J++;if(!(J<H))return H;this._swap(x,J,H),J++,H--}}},{key:"_get",value:function(x,G){return x instanceof b?x.get_object_at(G):x[G]}},{key:"_set",value:function(x,G,E){x instanceof b?x.set_object_at(G,E):x[G]=E}},{key:"_swap",value:function(x,G,E){var N=this._get(x,G);this._set(x,G,this._get(x,E)),this._set(x,E,N)}},{key:"_defaultCompareFunction",value:function(x,G){return G>x}}]),T}();Ve.exports=j},function(Ve,oe,O){"use strict";var F=function(){function j(T,S){for(var x=0;x<S.length;x++){var G=S[x];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(T,G.key,G)}}return function(T,S,x){return S&&j(T.prototype,S),x&&j(T,x),T}}();var b=function(){function j(T,S){var x=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,G=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,E=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;(function k(j,T){if(!(j instanceof T))throw new TypeError("Cannot call a class as a function")})(this,j),this.sequence1=T,this.sequence2=S,this.match_score=x,this.mismatch_penalty=G,this.gap_penalty=E,this.iMax=T.length+1,this.jMax=S.length+1,this.grid=new Array(this.iMax);for(var N=0;N<this.iMax;N++){this.grid[N]=new Array(this.jMax);for(var J=0;J<this.jMax;J++)this.grid[N][J]=0}this.tracebackGrid=new Array(this.iMax);for(var H=0;H<this.iMax;H++){this.tracebackGrid[H]=new Array(this.jMax);for(var W=0;W<this.jMax;W++)this.tracebackGrid[H][W]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return F(j,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var S=1;S<this.jMax;S++)this.grid[0][S]=this.grid[0][S-1]+this.gap_penalty,this.tracebackGrid[0][S]=[!1,!1,!0];for(var x=1;x<this.iMax;x++)this.grid[x][0]=this.grid[x-1][0]+this.gap_penalty,this.tracebackGrid[x][0]=[!1,!0,!1];for(var G=1;G<this.iMax;G++)for(var E=1;E<this.jMax;E++){var W=[this.sequence1[G-1]===this.sequence2[E-1]?this.grid[G-1][E-1]+this.match_score:this.grid[G-1][E-1]+this.mismatch_penalty,this.grid[G-1][E]+this.gap_penalty,this.grid[G][E-1]+this.gap_penalty],ae=this.arrayAllMaxIndexes(W);this.grid[G][E]=W[ae[0]],this.tracebackGrid[G][E]=[ae.includes(0),ae.includes(1),ae.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var S=[];for(S.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});S[0];){var x=S[0],G=this.tracebackGrid[x.pos[0]][x.pos[1]];G[0]&&S.push({pos:[x.pos[0]-1,x.pos[1]-1],seq1:this.sequence1[x.pos[0]-1]+x.seq1,seq2:this.sequence2[x.pos[1]-1]+x.seq2}),G[1]&&S.push({pos:[x.pos[0]-1,x.pos[1]],seq1:this.sequence1[x.pos[0]-1]+x.seq1,seq2:"-"+x.seq2}),G[2]&&S.push({pos:[x.pos[0],x.pos[1]-1],seq1:"-"+x.seq1,seq2:this.sequence2[x.pos[1]-1]+x.seq2}),0===x.pos[0]&&0===x.pos[1]&&this.alignments.push({sequence1:x.seq1,sequence2:x.seq2}),S.shift()}return this.alignments}},{key:"getAllIndexes",value:function(S,x){for(var G=[],E=-1;-1!==(E=S.indexOf(x,E+1));)G.push(E);return G}},{key:"arrayAllMaxIndexes",value:function(S){return this.getAllIndexes(S,Math.max.apply(null,S))}}]),j}();Ve.exports=b},function(Ve,oe,O){"use strict";var F=function(){};F.FDLayout=O(18),F.FDLayoutConstants=O(7),F.FDLayoutEdge=O(19),F.FDLayoutNode=O(20),F.DimensionD=O(21),F.HashMap=O(22),F.HashSet=O(23),F.IGeometry=O(8),F.IMath=O(9),F.Integer=O(10),F.Point=O(12),F.PointD=O(4),F.RandomSeed=O(16),F.RectangleD=O(13),F.Transform=O(17),F.UniqueIDGeneretor=O(14),F.Quicksort=O(24),F.LinkedList=O(11),F.LGraphObject=O(2),F.LGraph=O(5),F.LEdge=O(1),F.LGraphManager=O(6),F.LNode=O(3),F.Layout=O(15),F.LayoutConstants=O(0),F.NeedlemanWunsch=O(25),Ve.exports=F},function(Ve,oe,O){"use strict";function F(){this.listeners=[]}var k=F.prototype;k.addListener=function(b,j){this.listeners.push({event:b,callback:j})},k.removeListener=function(b,j){for(var T=this.listeners.length;T>=0;T--){var S=this.listeners[T];S.event===b&&S.callback===j&&this.listeners.splice(T,1)}},k.emit=function(b,j){for(var T=0;T<this.listeners.length;T++){var S=this.listeners[T];b===S.event&&S.callback(j)}},Ve.exports=F}])},1224(wt,Ve,oe){wt.exports=oe(4548)},250(wt){"use strict";wt.exports=class u2{constructor(oe,O=new Map,F=0){this.prefix=oe,this._existing=O,this.counter=F}clone(){const{prefix:oe,_existing:O,counter:F}=this;return new u2(oe,new Map(O),F)}getId(oe){const O=oe&&this._existing.get(oe);if(O)return O;const F=this.prefix+this.counter;return this.counter++,oe&&this._existing.set(oe,F),F}hasId(oe){return this._existing.has(oe)}getOldIds(){return[...this._existing.keys()]}}},1126(wt,Ve,oe){"use strict";var O=oe(9293).default;oe(7140);const F=self.crypto||self.msCrypto;wt.exports=class{constructor(b){if(!F||!F.subtle)throw new Error("crypto.subtle not found.");if("sha256"===b)this.algorithm={name:"SHA-256"};else{if("sha1"!==b)throw new Error(`Unsupported algorithm "${b}".`);this.algorithm={name:"SHA-1"}}this._content=""}update(b){this._content+=b}digest(){var b=this;return O(function*(){const j=(new TextEncoder).encode(b._content),T=new Uint8Array(yield F.subtle.digest(b.algorithm,j));let S="";for(let x=0;x<T.length;++x)S+=T[x].toString(16).padStart(2,"0");return S})()}}},8276(wt){"use strict";const O="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",F="http://www.w3.org/2001/XMLSchema#string",k="NamedNode",b="BlankNode",j="Literal",T="DefaultGraph",S={};function x(H,W){return H.subject.termType===W.subject.termType&&H.object.termType===W.object.termType&&H.subject.value===W.subject.value&&H.predicate.value===W.predicate.value&&H.object.value===W.object.value&&(H.object.termType!==j||H.object.datatype.termType===W.object.datatype.termType&&H.object.language===W.object.language&&H.object.datatype.value===W.object.datatype.value)}(()=>{const H="(?:<([^:]+:[^>]*)>)",ae="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd_",L=ae+"0-9-\xb7\u0300-\u036f\u203f-\u2040",P="(_:(?:["+ae+"0-9])(?:(?:["+L+".])*(?:["+L+"]))?)",V="[ \\t]+",te="[ \\t]*",he="(?:"+H+"|"+P+")"+V,ge=H+V,se="(?:"+H+"|"+P+'|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^'+H+")|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))"+te,de="(?:\\.|(?:(?:"+H+"|"+P+")"+te+"\\.))";S.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,S.empty=new RegExp("^[ \\t]*$"),S.quad=new RegExp("^"+te+he+ge+se+de+te+"$")})(),wt.exports=class xg{static parse(W){const ae=[],L={},Z=W.split(S.eoln);let P=0;for(const ie of Z){if(P++,S.empty.test(ie))continue;const Q=ie.match(S.quad);if(null===Q)throw new Error("N-Quads parse error on line "+P+".");const w={subject:null,predicate:null,object:null,graph:null};if(w.subject=void 0!==Q[1]?{termType:k,value:Q[1]}:{termType:b,value:Q[2]},w.predicate={termType:k,value:Q[3]},void 0!==Q[4]?w.object={termType:k,value:Q[4]}:void 0!==Q[5]?w.object={termType:b,value:Q[5]}:(w.object={termType:j,value:void 0,datatype:{termType:k}},void 0!==Q[7]?w.object.datatype.value=Q[7]:void 0!==Q[8]?(w.object.datatype.value=O,w.object.language=Q[8]):w.object.datatype.value=F,w.object.value=J(Q[6])),w.graph=void 0!==Q[9]?{termType:k,value:Q[9]}:void 0!==Q[10]?{termType:b,value:Q[10]}:{termType:T,value:""},w.graph.value in L){let D=!0;const V=L[w.graph.value];for(const te of V)if(x(te,w)){D=!1;break}D&&(V.push(w),ae.push(w))}else L[w.graph.value]=[w],ae.push(w)}return ae}static serialize(W){Array.isArray(W)||(W=xg.legacyDatasetToQuads(W));const ae=[];for(const L of W)ae.push(xg.serializeQuad(L));return ae.sort().join("")}static serializeQuadComponents(W,ae,L,Z){let P="";return P+=W.termType===k?`<${W.value}>`:`${W.value}`,P+=` <${ae.value}> `,L.termType===k?P+=`<${L.value}>`:L.termType===b?P+=L.value:(P+=`"${function E(H){return H.replace(G,function(W){switch(W){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}})}(L.value)}"`,L.datatype.value===O?L.language&&(P+=`@${L.language}`):L.datatype.value!==F&&(P+=`^^<${L.datatype.value}>`)),Z.termType===k?P+=` <${Z.value}>`:Z.termType===b&&(P+=` ${Z.value}`),P+=" .\n",P}static serializeQuad(W){return xg.serializeQuadComponents(W.subject,W.predicate,W.object,W.graph)}static legacyDatasetToQuads(W){const ae=[],L={"blank node":b,IRI:k,literal:j};for(const Z in W)W[Z].forEach(ie=>{const Q={};for(const w in ie){const D=ie[w],V={termType:L[D.type],value:D.value};V.termType===j&&(V.datatype={termType:k},"datatype"in D&&(V.datatype.value=D.datatype),"language"in D?("datatype"in D||(V.datatype.value=O),V.language=D.language):"datatype"in D||(V.datatype.value=F)),Q[w]=V}Q.graph="@default"===Z?{termType:T,value:""}:{termType:Z.startsWith("_:")?b:k,value:Z},ae.push(Q)});return ae}};const G=/["\\\n\r]/g,N=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g;function J(H){return H.replace(N,function(W,ae,L,Z){if(ae)switch(ae){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(L)return String.fromCharCode(parseInt(L,16));if(Z)throw new Error("Unsupported U escape")})}},7794(wt){"use strict";wt.exports=class{constructor(oe){this.current=oe.sort(),this.done=!1,this.dir=new Map;for(let O=0;O<oe.length;++O)this.dir.set(oe[O],!0)}hasNext(){return!this.done}next(){const{current:oe,dir:O}=this,F=oe.slice();let k=null,b=0;const j=oe.length;for(let T=0;T<j;++T){const S=oe[T],x=O.get(S);(null===k||S>k)&&(x&&T>0&&S>oe[T-1]||!x&&T<j-1&&S>oe[T+1])&&(k=S,b=T)}if(null===k)this.done=!0;else{const T=O.get(k)?b-1:b+1;oe[b]=oe[T],oe[T]=k;for(const S of oe)S>k&&O.set(S,!O.get(S))}return F}}},624(wt,Ve,oe){"use strict";var O=oe(9293).default;const F=oe(250),k=oe(1126),b=oe(7794),j=oe(8276);function T(S,x){return S.hash<x.hash?-1:S.hash>x.hash?1:0}wt.exports=class{constructor({createMessageDigest:x=()=>new k("sha256"),canonicalIdMap:G=new Map,maxDeepIterations:E=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new F("_:c14n",G),this.createMessageDigest=x,this.maxDeepIterations=E,this.quads=null,this.deepIterations=null}main(x){var G=this;return O(function*(){G.deepIterations=new Map,G.quads=x;for(const L of x)G._addBlankNodeQuadInfo({quad:L,component:L.subject}),G._addBlankNodeQuadInfo({quad:L,component:L.object}),G._addBlankNodeQuadInfo({quad:L,component:L.graph});const E=new Map,N=[...G.blankNodeInfo.keys()];let J=0;for(const L of N)++J%100==0&&(yield G._yield()),yield G._hashAndTrackBlankNode({id:L,hashToBlankNodes:E});const H=[...E.keys()].sort(),W=[];for(const L of H){const Z=E.get(L);Z.length>1?W.push(Z):G.canonicalIssuer.getId(Z[0])}for(const L of W){const Z=[];for(const P of L){if(G.canonicalIssuer.hasId(P))continue;const ie=new F("_:b");ie.getId(P);const Q=yield G.hashNDegreeQuads(P,ie);Z.push(Q)}Z.sort(T);for(const P of Z){const ie=P.issuer.getOldIds();for(const Q of ie)G.canonicalIssuer.getId(Q)}}const ae=[];for(const L of G.quads){const Z=j.serializeQuadComponents(G._componentWithCanonicalId(L.subject),L.predicate,G._componentWithCanonicalId(L.object),G._componentWithCanonicalId(L.graph));ae.push(Z)}return ae.sort(),ae.join("")})()}hashFirstDegreeQuads(x){var G=this;return O(function*(){const E=[],N=G.blankNodeInfo.get(x),J=N.quads;for(const W of J){const ae={subject:null,predicate:W.predicate,object:null,graph:null};ae.subject=G.modifyFirstDegreeComponent(x,W.subject,"subject"),ae.object=G.modifyFirstDegreeComponent(x,W.object,"object"),ae.graph=G.modifyFirstDegreeComponent(x,W.graph,"graph"),E.push(j.serializeQuad(ae))}E.sort();const H=G.createMessageDigest();for(const W of E)H.update(W);return N.hash=yield H.digest(),N.hash})()}hashRelatedBlankNode(x,G,E,N){var J=this;return O(function*(){let H;H=J.canonicalIssuer.hasId(x)?J.canonicalIssuer.getId(x):E.hasId(x)?E.getId(x):J.blankNodeInfo.get(x).hash;const W=J.createMessageDigest();return W.update(N),"g"!==N&&W.update(J.getRelatedPredicate(G)),W.update(H),W.digest()})()}hashNDegreeQuads(x,G){var E=this;return O(function*(){const N=E.deepIterations.get(x)||0;if(N>E.maxDeepIterations)throw new Error(`Maximum deep iterations (${E.maxDeepIterations}) exceeded.`);E.deepIterations.set(x,N+1);const J=E.createMessageDigest(),H=yield E.createHashToRelated(x,G),W=[...H.keys()].sort();for(const ae of W){J.update(ae);let Z,L="";const P=new b(H.get(ae));let ie=0;for(;P.hasNext();){const Q=P.next();++ie%3==0&&(yield E._yield());let w=G.clone(),D="";const V=[];let te=!1;for(const he of Q)if(E.canonicalIssuer.hasId(he)?D+=E.canonicalIssuer.getId(he):(w.hasId(he)||V.push(he),D+=w.getId(he)),0!==L.length&&D>L){te=!0;break}if(!te){for(const he of V){const ge=yield E.hashNDegreeQuads(he,w);if(D+=w.getId(he),D+=`<${ge.hash}>`,w=ge.issuer,0!==L.length&&D>L){te=!0;break}}te||(0===L.length||D<L)&&(L=D,Z=w)}}J.update(L),G=Z}return{hash:yield J.digest(),issuer:G}})()}modifyFirstDegreeComponent(x,G){return"BlankNode"!==G.termType?G:{termType:"BlankNode",value:G.value===x?"_:a":"_:z"}}getRelatedPredicate(x){return`<${x.predicate.value}>`}createHashToRelated(x,G){var E=this;return O(function*(){const N=new Map,J=E.blankNodeInfo.get(x).quads;let H=0;for(const W of J)++H%100==0&&(yield E._yield()),yield Promise.all([E._addRelatedBlankNodeHash({quad:W,component:W.subject,position:"s",id:x,issuer:G,hashToRelated:N}),E._addRelatedBlankNodeHash({quad:W,component:W.object,position:"o",id:x,issuer:G,hashToRelated:N}),E._addRelatedBlankNodeHash({quad:W,component:W.graph,position:"g",id:x,issuer:G,hashToRelated:N})]);return N})()}_hashAndTrackBlankNode(x){var G=this;return O(function*({id:E,hashToBlankNodes:N}){const J=yield G.hashFirstDegreeQuads(E),H=N.get(J);H?H.push(E):N.set(J,[E])}).apply(this,arguments)}_addBlankNodeQuadInfo({quad:x,component:G}){if("BlankNode"!==G.termType)return;const E=G.value,N=this.blankNodeInfo.get(E);N?N.quads.add(x):this.blankNodeInfo.set(E,{quads:new Set([x]),hash:null})}_addRelatedBlankNodeHash(x){var G=this;return O(function*({quad:E,component:N,position:J,id:H,issuer:W,hashToRelated:ae}){if("BlankNode"!==N.termType||N.value===H)return;const L=N.value,Z=yield G.hashRelatedBlankNode(L,E,W,J),P=ae.get(Z);P?P.push(L):ae.set(Z,[L])}).apply(this,arguments)}_componentWithCanonicalId(x){return"BlankNode"!==x.termType||x.value.startsWith(this.canonicalIssuer.prefix)?x:{termType:"BlankNode",value:this.canonicalIssuer.getId(x.value)}}_yield(){return O(function*(){return new Promise(x=>setImmediate(x))})()}}},203(wt,Ve,oe){"use strict";const O=oe(250),F=oe(1126),k=oe(7794),b=oe(8276);function j(T,S){return T.hash<S.hash?-1:T.hash>S.hash?1:0}wt.exports=class{constructor({createMessageDigest:S=()=>new F("sha256"),canonicalIdMap:x=new Map,maxDeepIterations:G=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new O("_:c14n",x),this.createMessageDigest=S,this.maxDeepIterations=G,this.quads=null,this.deepIterations=null}main(S){this.deepIterations=new Map,this.quads=S;for(const H of S)this._addBlankNodeQuadInfo({quad:H,component:H.subject}),this._addBlankNodeQuadInfo({quad:H,component:H.object}),this._addBlankNodeQuadInfo({quad:H,component:H.graph});const x=new Map,G=[...this.blankNodeInfo.keys()];for(const H of G)this._hashAndTrackBlankNode({id:H,hashToBlankNodes:x});const E=[...x.keys()].sort(),N=[];for(const H of E){const W=x.get(H);W.length>1?N.push(W):this.canonicalIssuer.getId(W[0])}for(const H of N){const W=[];for(const ae of H){if(this.canonicalIssuer.hasId(ae))continue;const L=new O("_:b");L.getId(ae);const Z=this.hashNDegreeQuads(ae,L);W.push(Z)}W.sort(j);for(const ae of W){const L=ae.issuer.getOldIds();for(const Z of L)this.canonicalIssuer.getId(Z)}}const J=[];for(const H of this.quads){const W=b.serializeQuadComponents(this._componentWithCanonicalId({component:H.subject}),H.predicate,this._componentWithCanonicalId({component:H.object}),this._componentWithCanonicalId({component:H.graph}));J.push(W)}return J.sort(),J.join("")}hashFirstDegreeQuads(S){const x=[],G=this.blankNodeInfo.get(S),E=G.quads;for(const J of E){const H={subject:null,predicate:J.predicate,object:null,graph:null};H.subject=this.modifyFirstDegreeComponent(S,J.subject,"subject"),H.object=this.modifyFirstDegreeComponent(S,J.object,"object"),H.graph=this.modifyFirstDegreeComponent(S,J.graph,"graph"),x.push(b.serializeQuad(H))}x.sort();const N=this.createMessageDigest();for(const J of x)N.update(J);return G.hash=N.digest(),G.hash}hashRelatedBlankNode(S,x,G,E){let N;N=this.canonicalIssuer.hasId(S)?this.canonicalIssuer.getId(S):G.hasId(S)?G.getId(S):this.blankNodeInfo.get(S).hash;const J=this.createMessageDigest();return J.update(E),"g"!==E&&J.update(this.getRelatedPredicate(x)),J.update(N),J.digest()}hashNDegreeQuads(S,x){const G=this.deepIterations.get(S)||0;if(G>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(S,G+1);const E=this.createMessageDigest(),N=this.createHashToRelated(S,x),J=[...N.keys()].sort();for(const H of J){E.update(H);let ae,W="";const L=new k(N.get(H));for(;L.hasNext();){const Z=L.next();let P=x.clone(),ie="";const Q=[];let w=!1;for(const D of Z)if(this.canonicalIssuer.hasId(D)?ie+=this.canonicalIssuer.getId(D):(P.hasId(D)||Q.push(D),ie+=P.getId(D)),0!==W.length&&ie>W){w=!0;break}if(!w){for(const D of Q){const V=this.hashNDegreeQuads(D,P);if(ie+=P.getId(D),ie+=`<${V.hash}>`,P=V.issuer,0!==W.length&&ie>W){w=!0;break}}w||(0===W.length||ie<W)&&(W=ie,ae=P)}}E.update(W),x=ae}return{hash:E.digest(),issuer:x}}modifyFirstDegreeComponent(S,x){return"BlankNode"!==x.termType?x:{termType:"BlankNode",value:x.value===S?"_:a":"_:z"}}getRelatedPredicate(S){return`<${S.predicate.value}>`}createHashToRelated(S,x){const G=new Map,E=this.blankNodeInfo.get(S).quads;for(const N of E)this._addRelatedBlankNodeHash({quad:N,component:N.subject,position:"s",id:S,issuer:x,hashToRelated:G}),this._addRelatedBlankNodeHash({quad:N,component:N.object,position:"o",id:S,issuer:x,hashToRelated:G}),this._addRelatedBlankNodeHash({quad:N,component:N.graph,position:"g",id:S,issuer:x,hashToRelated:G});return G}_hashAndTrackBlankNode({id:S,hashToBlankNodes:x}){const G=this.hashFirstDegreeQuads(S),E=x.get(G);E?E.push(S):x.set(G,[S])}_addBlankNodeQuadInfo({quad:S,component:x}){if("BlankNode"!==x.termType)return;const G=x.value,E=this.blankNodeInfo.get(G);E?E.quads.add(S):this.blankNodeInfo.set(G,{quads:new Set([S]),hash:null})}_addRelatedBlankNodeHash({quad:S,component:x,position:G,id:E,issuer:N,hashToRelated:J}){if("BlankNode"!==x.termType||x.value===E)return;const H=x.value,W=this.hashRelatedBlankNode(H,S,N,G),ae=J.get(W);ae?ae.push(H):J.set(W,[H])}_componentWithCanonicalId({component:S}){return"BlankNode"!==S.termType||S.value.startsWith(this.canonicalIssuer.prefix)?S:{termType:"BlankNode",value:this.canonicalIssuer.getId(S.value)}}}},6268(wt,Ve,oe){"use strict";var O=oe(9293).default;const F=oe(1126),k=oe(624);wt.exports=class extends k{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new F("sha1")}modifyFirstDegreeComponent(j,T,S){return"BlankNode"!==T.termType?T:"graph"===S?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:T.value===j?"_:a":"_:z"}}getRelatedPredicate(j){return j.predicate.value}createHashToRelated(j,T){var S=this;return O(function*(){const x=new Map,G=S.blankNodeInfo.get(j).quads;let E=0;for(const N of G){let J,H;if("BlankNode"===N.subject.termType&&N.subject.value!==j)H=N.subject.value,J="p";else{if("BlankNode"!==N.object.termType||N.object.value===j)continue;H=N.object.value,J="r"}++E%100==0&&(yield S._yield());const W=yield S.hashRelatedBlankNode(H,N,T,J),ae=x.get(W);ae?ae.push(H):x.set(W,[H])}return x})()}}},8911(wt,Ve,oe){"use strict";const O=oe(1126),F=oe(203);wt.exports=class extends F{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new O("sha1")}modifyFirstDegreeComponent(b,j,T){return"BlankNode"!==j.termType?j:"graph"===T?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:j.value===b?"_:a":"_:z"}}getRelatedPredicate(b){return b.predicate.value}createHashToRelated(b,j){const T=new Map,S=this.blankNodeInfo.get(b).quads;for(const x of S){let G,E;if("BlankNode"===x.subject.termType&&x.subject.value!==b)E=x.subject.value,G="p";else{if("BlankNode"!==x.object.termType||x.object.value===b)continue;E=x.object.value,G="r"}const N=this.hashRelatedBlankNode(E,x,j,G),J=T.get(N);J?J.push(E):T.set(N,[E])}return T}}},4548(wt,Ve,oe){"use strict";var O=oe(9293).default;const F=oe(624),k=oe(6268),b=oe(203),j=oe(8911);let T;try{T=oe(7789)}catch{}function S(x){return Array.isArray(x)?x:Ve.NQuads.legacyDatasetToQuads(x)}Ve.NQuads=oe(8276),Ve.IdentifierIssuer=oe(250),Ve._rdfCanonizeNative=function(x){return x&&(T=x),T},Ve.canonize=function(){var x=O(function*(G,E){const N=S(G);if(E.useNative){if(!T)throw new Error("rdf-canonize-native not available");if(E.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return new Promise((J,H)=>T.canonize(N,E,(W,ae)=>W?H(W):J(ae)))}if("URDNA2015"===E.algorithm)return new F(E).main(N);if("URGNA2012"===E.algorithm){if(E.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new k(E).main(N)}throw"algorithm"in E?new Error("Invalid RDF Dataset Canonicalization algorithm: "+E.algorithm):new Error("No RDF Dataset Canonicalization algorithm specified.")});return function(G,E){return x.apply(this,arguments)}}(),Ve._canonizeSync=function(x,G){const E=S(x);if(G.useNative){if(!T)throw new Error("rdf-canonize-native not available");if(G.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return T.canonizeSync(E,G)}if("URDNA2015"===G.algorithm)return new b(G).main(E);if("URGNA2012"===G.algorithm){if(G.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new j(G).main(E)}throw"algorithm"in G?new Error("Invalid RDF Dataset Canonicalization algorithm: "+G.algorithm):new Error("No RDF Dataset Canonicalization algorithm specified.")}},7140(){!function(wt){"use strict";if(!wt.setImmediate){var b,oe=1,O={},F=!1,k=wt.document,ae=Object.getPrototypeOf&&Object.getPrototypeOf(wt);ae=ae&&ae.setTimeout?ae:wt,"[object process]"==={}.toString.call(wt.process)?function G(){b=function(L){process.nextTick(function(){x(L)})}}():function E(){if(wt.postMessage&&!wt.importScripts){var L=!0,Z=wt.onmessage;return wt.onmessage=function(){L=!1},wt.postMessage("","*"),wt.onmessage=Z,L}}()?function N(){var L="setImmediate$"+Math.random()+"$",Z=function(P){P.source===wt&&"string"==typeof P.data&&0===P.data.indexOf(L)&&x(+P.data.slice(L.length))};wt.addEventListener?wt.addEventListener("message",Z,!1):wt.attachEvent("onmessage",Z),b=function(P){wt.postMessage(L+P,"*")}}():wt.MessageChannel?function J(){var L=new MessageChannel;L.port1.onmessage=function(Z){x(Z.data)},b=function(Z){L.port2.postMessage(Z)}}():k&&"onreadystatechange"in k.createElement("script")?function H(){var L=k.documentElement;b=function(Z){var P=k.createElement("script");P.onreadystatechange=function(){x(Z),P.onreadystatechange=null,L.removeChild(P),P=null},L.appendChild(P)}}():function W(){b=function(L){setTimeout(x,0,L)}}(),ae.setImmediate=function j(L){"function"!=typeof L&&(L=new Function(""+L));for(var Z=new Array(arguments.length-1),P=0;P<Z.length;P++)Z[P]=arguments[P+1];return O[oe]={callback:L,args:Z},b(oe),oe++},ae.clearImmediate=T}function T(L){delete O[L]}function x(L){if(F)setTimeout(x,0,L);else{var Z=O[L];if(Z){F=!0;try{!function S(L){var Z=L.callback,P=L.args;switch(P.length){case 0:Z();break;case 1:Z(P[0]);break;case 2:Z(P[0],P[1]);break;case 3:Z(P[0],P[1],P[2]);break;default:Z.apply(void 0,P)}}(Z)}finally{T(L),F=!1}}}}}(typeof self>"u"?typeof global>"u"?this:global:self)},7789(){},9293(wt){function Ve(O,F,k,b,j,T,S){try{var x=O[T](S),G=x.value}catch(E){return void k(E)}x.done?F(G):Promise.resolve(G).then(b,j)}wt.exports=function oe(O){return function(){var F=this,k=arguments;return new Promise(function(b,j){var T=O.apply(F,k);function S(G){Ve(T,b,j,S,x,"next",G)}function x(G){Ve(T,b,j,S,x,"throw",G)}S(void 0)})}},wt.exports.__esModule=!0,wt.exports.default=wt.exports},3659(wt,Ve,oe){"use strict";oe.d(Ve,{MF:()=>Bs,j6:()=>wo,xZ:()=>ca,om:()=>jr,Sx:()=>Do,KO:()=>qn});var O=oe(467),F=oe(2040),k=oe(1919),b=oe(7814);let T,S;const E=new WeakMap,N=new WeakMap,J=new WeakMap,H=new WeakMap,W=new WeakMap;let Z={get(ze,Le,et){if(ze instanceof IDBTransaction){if("done"===Le)return N.get(ze);if("objectStoreNames"===Le)return ze.objectStoreNames||J.get(ze);if("store"===Le)return et.objectStoreNames[1]?void 0:et.objectStore(et.objectStoreNames[0])}return w(ze[Le])},set:(ze,Le,et)=>(ze[Le]=et,!0),has:(ze,Le)=>ze instanceof IDBTransaction&&("done"===Le||"store"===Le)||Le in ze};function Q(ze){return"function"==typeof ze?function ie(ze){return ze!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function G(){return S||(S=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(ze)?function(...Le){return ze.apply(D(this),Le),w(E.get(this))}:function(...Le){return w(ze.apply(D(this),Le))}:function(Le,...et){const Vt=ze.call(D(this),Le,...et);return J.set(Vt,Le.sort?Le.sort():[Le]),w(Vt)}}(ze):(ze instanceof IDBTransaction&&function L(ze){if(N.has(ze))return;const Le=new Promise((et,Vt)=>{const or=()=>{ze.removeEventListener("complete",Ir),ze.removeEventListener("error",Nr),ze.removeEventListener("abort",Nr)},Ir=()=>{et(),or()},Nr=()=>{Vt(ze.error||new DOMException("AbortError","AbortError")),or()};ze.addEventListener("complete",Ir),ze.addEventListener("error",Nr),ze.addEventListener("abort",Nr)});N.set(ze,Le)}(ze),((ze,Le)=>Le.some(et=>ze instanceof et))(ze,function x(){return T||(T=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(ze,Z):ze)}function w(ze){if(ze instanceof IDBRequest)return function ae(ze){const Le=new Promise((et,Vt)=>{const or=()=>{ze.removeEventListener("success",Ir),ze.removeEventListener("error",Nr)},Ir=()=>{et(w(ze.result)),or()},Nr=()=>{Vt(ze.error),or()};ze.addEventListener("success",Ir),ze.addEventListener("error",Nr)});return Le.then(et=>{et instanceof IDBCursor&&E.set(et,ze)}).catch(()=>{}),W.set(Le,ze),Le}(ze);if(H.has(ze))return H.get(ze);const Le=Q(ze);return Le!==ze&&(H.set(ze,Le),W.set(Le,ze)),Le}const D=ze=>W.get(ze),ge=["get","getKey","getAll","getAllKeys","count"],se=["put","add","delete","clear"],de=new Map;function Ce(ze,Le){if(!(ze instanceof IDBDatabase)||Le in ze||"string"!=typeof Le)return;if(de.get(Le))return de.get(Le);const et=Le.replace(/FromIndex$/,""),Vt=Le!==et,or=se.includes(et);if(!(et in(Vt?IDBIndex:IDBObjectStore).prototype)||!or&&!ge.includes(et))return;const Ir=function(){var Nr=(0,O.A)(function*(Qn,...Hr){const Jt=this.transaction(Qn,or?"readwrite":"readonly");let uo=Jt.store;return Vt&&(uo=uo.index(Hr.shift())),(yield Promise.all([uo[et](...Hr),or&&Jt.done]))[0]});return function(Hr){return Nr.apply(this,arguments)}}();return de.set(Le,Ir),Ir}!function P(ze){Z=ze(Z)}(ze=>({...ze,get:(Le,et,Vt)=>Ce(Le,et)||ze.get(Le,et,Vt),has:(Le,et)=>!!Ce(Le,et)||ze.has(Le,et)}));class Ke{constructor(Le){this.container=Le}getPlatformInfoString(){return this.container.getProviders().map(et=>{if(function Oe(ze){return"VERSION"===ze.getComponent()?.type}(et)){const Vt=et.getImmediate();return`${Vt.library}/${Vt.version}`}return null}).filter(et=>et).join(" ")}}const pe="@firebase/app",ft=new k.Vy("@firebase/app"),vt="@firebase/app-compat",It="@firebase/analytics-compat",Ye="@firebase/analytics",st="@firebase/app-check-compat",De="@firebase/app-check",Ae="@firebase/auth",pt="@firebase/auth-compat",Rt="@firebase/database",ht="@firebase/data-connect",Dt="@firebase/database-compat",rr="@firebase/functions",pr="@firebase/functions-compat",Pt="@firebase/installations",dr="@firebase/installations-compat",Ar="@firebase/messaging",nn="@firebase/messaging-compat",Yn="@firebase/performance",qi="@firebase/performance-compat",fn="@firebase/remote-config",Si="@firebase/remote-config-compat",lo="@firebase/storage",Fa="@firebase/storage-compat",Ol="@firebase/firestore",Co="@firebase/ai",Ls="@firebase/firestore-compat",Ms="firebase",Xt="[DEFAULT]",ai={[pe]:"fire-core",[vt]:"fire-core-compat",[Ye]:"fire-analytics",[It]:"fire-analytics-compat",[De]:"fire-app-check",[st]:"fire-app-check-compat",[Ae]:"fire-auth",[pt]:"fire-auth-compat",[Rt]:"fire-rtdb",[ht]:"fire-data-connect",[Dt]:"fire-rtdb-compat",[rr]:"fire-fn",[pr]:"fire-fn-compat",[Pt]:"fire-iid",[dr]:"fire-iid-compat",[Ar]:"fire-fcm",[nn]:"fire-fcm-compat",[Yn]:"fire-perf",[qi]:"fire-perf-compat",[fn]:"fire-rc",[Si]:"fire-rc-compat",[lo]:"fire-gcs",[Fa]:"fire-gcs-compat",[Ol]:"fire-fst",[Ls]:"fire-fst-compat",[Co]:"fire-vertex","fire-js":"fire-js",[Ms]:"fire-js-all"},ji=new Map,si=new Map,Po=new Map;function Gn(ze,Le){try{ze.container.addComponent(Le)}catch(et){ft.debug(`Component ${Le.name} failed to register with FirebaseApp ${ze.name}`,et)}}function jr(ze){const Le=ze.name;if(Po.has(Le))return ft.debug(`There were multiple attempts to register component ${Le}.`),!1;Po.set(Le,ze);for(const et of ji.values())Gn(et,ze);for(const et of si.values())Gn(et,ze);return!0}function wo(ze,Le){const et=ze.container.getProvider("heartbeat").getImmediate({optional:!0});return et&&et.triggerHeartbeat(),ze.container.getProvider(Le)}function ca(ze){return null!=ze&&void 0!==ze.settings}const Fn=new b.FA("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class ha{constructor(Le,et,Vt){this._isDeleted=!1,this._options={...Le},this._config={...et},this._name=et.name,this._automaticDataCollectionEnabled=et.automaticDataCollectionEnabled,this._container=Vt,this.container.addComponent(new F.uA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(Le){this.checkDestroyed(),this._automaticDataCollectionEnabled=Le}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(Le){this._isDeleted=Le}checkDestroyed(){if(this.isDeleted)throw Fn.create("app-deleted",{appName:this._name})}}const Bs="12.8.0";function Do(ze=Xt){const Le=ji.get(ze);if(!Le&&ze===Xt&&(0,b.T9)())return function Pi(ze,Le={}){let et=ze;"object"!=typeof Le&&(Le={name:Le});const Vt={name:Xt,automaticDataCollectionEnabled:!0,...Le},or=Vt.name;if("string"!=typeof or||!or)throw Fn.create("bad-app-name",{appName:String(or)});if(et||(et=(0,b.T9)()),!et)throw Fn.create("no-options");const Ir=ji.get(or);if(Ir){if((0,b.bD)(et,Ir.options)&&(0,b.bD)(Vt,Ir.config))return Ir;throw Fn.create("duplicate-app",{appName:or})}const Nr=new F.h1(or);for(const Hr of Po.values())Nr.addComponent(Hr);const Qn=new ha(et,Vt,Nr);return ji.set(or,Qn),Qn}();if(!Le)throw Fn.create("no-app",{appName:ze});return Le}function qn(ze,Le,et){let Vt=ai[ze]??ze;et&&(Vt+=`-${et}`);const or=Vt.match(/\s|\//),Ir=Le.match(/\s|\//);if(or||Ir){const Nr=[`Unable to register library "${Vt}" with version "${Le}":`];return or&&Nr.push(`library name "${Vt}" contains illegal characters (whitespace or "/")`),or&&Ir&&Nr.push("and"),Ir&&Nr.push(`version name "${Le}" contains illegal characters (whitespace or "/")`),void ft.warn(Nr.join(" "))}jr(new F.uA(`${Vt}-version`,()=>({library:Vt,version:Le}),"VERSION"))}const qe="firebase-heartbeat-store";let qt=null;function yr(){return qt||(qt=function te(ze,Le,{blocked:et,upgrade:Vt,blocking:or,terminated:Ir}={}){const Nr=indexedDB.open(ze,Le),Qn=w(Nr);return Vt&&Nr.addEventListener("upgradeneeded",Hr=>{Vt(w(Nr.result),Hr.oldVersion,Hr.newVersion,w(Nr.transaction),Hr)}),et&&Nr.addEventListener("blocked",Hr=>et(Hr.oldVersion,Hr.newVersion,Hr)),Qn.then(Hr=>{Ir&&Hr.addEventListener("close",()=>Ir()),or&&Hr.addEventListener("versionchange",Jt=>or(Jt.oldVersion,Jt.newVersion,Jt))}).catch(()=>{}),Qn}("firebase-heartbeat-database",1,{upgrade:(ze,Le)=>{if(0===Le)try{ze.createObjectStore(qe)}catch(et){console.warn(et)}}}).catch(ze=>{throw Fn.create("idb-open",{originalErrorMessage:ze.message})})),qt}function Er(){return(Er=(0,O.A)(function*(ze){try{const et=(yield yr()).transaction(qe),Vt=yield et.objectStore(qe).get(Tt(ze));return yield et.done,Vt}catch(Le){if(Le instanceof b.g)ft.warn(Le.message);else{const et=Fn.create("idb-get",{originalErrorMessage:Le?.message});ft.warn(et.message)}}})).apply(this,arguments)}function Br(ze,Le){return Rn.apply(this,arguments)}function Rn(){return(Rn=(0,O.A)(function*(ze,Le){try{const Vt=(yield yr()).transaction(qe,"readwrite");yield Vt.objectStore(qe).put(Le,Tt(ze)),yield Vt.done}catch(et){if(et instanceof b.g)ft.warn(et.message);else{const Vt=Fn.create("idb-set",{originalErrorMessage:et?.message});ft.warn(Vt.message)}}})).apply(this,arguments)}function Tt(ze){return`${ze.name}!${ze.options.appId}`}class No{constructor(Le){this.container=Le,this._heartbeatsCache=null;const et=this.container.getProvider("app").getImmediate();this._storage=new yt(et),this._heartbeatsCachePromise=this._storage.read().then(Vt=>(this._heartbeatsCache=Vt,Vt))}triggerHeartbeat(){var Le=this;return(0,O.A)(function*(){try{const Vt=Le.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),or=St();if(null==Le._heartbeatsCache?.heartbeats&&(Le._heartbeatsCache=yield Le._heartbeatsCachePromise,null==Le._heartbeatsCache?.heartbeats)||Le._heartbeatsCache.lastSentHeartbeatDate===or||Le._heartbeatsCache.heartbeats.some(Ir=>Ir.date===or))return;if(Le._heartbeatsCache.heartbeats.push({date:or,agent:Vt}),Le._heartbeatsCache.heartbeats.length>30){const Ir=function Hi(ze){if(0===ze.length)return-1;let Le=0,et=ze[0].date;for(let Vt=1;Vt<ze.length;Vt++)ze[Vt].date<et&&(et=ze[Vt].date,Le=Vt);return Le}(Le._heartbeatsCache.heartbeats);Le._heartbeatsCache.heartbeats.splice(Ir,1)}return Le._storage.overwrite(Le._heartbeatsCache)}catch(et){ft.warn(et)}})()}getHeartbeatsHeader(){var Le=this;return(0,O.A)(function*(){try{if(null===Le._heartbeatsCache&&(yield Le._heartbeatsCachePromise),null==Le._heartbeatsCache?.heartbeats||0===Le._heartbeatsCache.heartbeats.length)return"";const et=St(),{heartbeatsToSend:Vt,unsentEntries:or}=function Be(ze,Le=1024){const et=[];let Vt=ze.slice();for(const or of ze){const Ir=et.find(Nr=>Nr.agent===or.agent);if(Ir){if(Ir.dates.push(or.date),Yr(et)>Le){Ir.dates.pop();break}}else if(et.push({agent:or.agent,dates:[or.date]}),Yr(et)>Le){et.pop();break}Vt=Vt.slice(1)}return{heartbeatsToSend:et,unsentEntries:Vt}}(Le._heartbeatsCache.heartbeats),Ir=(0,b.Uj)(JSON.stringify({version:2,heartbeats:Vt}));return Le._heartbeatsCache.lastSentHeartbeatDate=et,or.length>0?(Le._heartbeatsCache.heartbeats=or,yield Le._storage.overwrite(Le._heartbeatsCache)):(Le._heartbeatsCache.heartbeats=[],Le._storage.overwrite(Le._heartbeatsCache)),Ir}catch(et){return ft.warn(et),""}})()}}function St(){return(new Date).toISOString().substring(0,10)}class yt{constructor(Le){this.app=Le,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return(0,O.A)(function*(){return!!(0,b.zW)()&&(0,b.eX)().then(()=>!0).catch(()=>!1)})()}read(){var Le=this;return(0,O.A)(function*(){if(yield Le._canUseIndexedDBPromise){const Vt=yield function it(ze){return Er.apply(this,arguments)}(Le.app);return Vt?.heartbeats?Vt:{heartbeats:[]}}return{heartbeats:[]}})()}overwrite(Le){var et=this;return(0,O.A)(function*(){if(yield et._canUseIndexedDBPromise){const or=yield et.read();return Br(et.app,{lastSentHeartbeatDate:Le.lastSentHeartbeatDate??or.lastSentHeartbeatDate,heartbeats:Le.heartbeats})}})()}add(Le){var et=this;return(0,O.A)(function*(){if(yield et._canUseIndexedDBPromise){const or=yield et.read();return Br(et.app,{lastSentHeartbeatDate:Le.lastSentHeartbeatDate??or.lastSentHeartbeatDate,heartbeats:[...or.heartbeats,...Le.heartbeats]})}})()}}function Yr(ze){return(0,b.Uj)(JSON.stringify({version:2,heartbeats:ze})).length}!function Ba(ze){jr(new F.uA("platform-logger",Le=>new Ke(Le),"PRIVATE")),jr(new F.uA("heartbeat",Le=>new No(Le),"PRIVATE")),qn(pe,"0.14.7",ze),qn(pe,"0.14.7","esm2020"),qn("fire-js","")}("")},2040(wt,Ve,oe){"use strict";oe.d(Ve,{h1:()=>x,uA:()=>k});var O=oe(467),F=oe(7814);class k{constructor(E,N,J){this.name=E,this.instanceFactory=N,this.type=J,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(E){return this.instantiationMode=E,this}setMultipleInstances(E){return this.multipleInstances=E,this}setServiceProps(E){return this.serviceProps=E,this}setInstanceCreatedCallback(E){return this.onInstanceCreated=E,this}}const b="[DEFAULT]";class j{constructor(E,N){this.name=E,this.container=N,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(E){const N=this.normalizeInstanceIdentifier(E);if(!this.instancesDeferred.has(N)){const J=new F.cY;if(this.instancesDeferred.set(N,J),this.isInitialized(N)||this.shouldAutoInitialize())try{const H=this.getOrInitializeService({instanceIdentifier:N});H&&J.resolve(H)}catch{}}return this.instancesDeferred.get(N).promise}getImmediate(E){const N=this.normalizeInstanceIdentifier(E?.identifier),J=E?.optional??!1;if(!this.isInitialized(N)&&!this.shouldAutoInitialize()){if(J)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:N})}catch(H){if(J)return null;throw H}}getComponent(){return this.component}setComponent(E){if(E.name!==this.name)throw Error(`Mismatching Component ${E.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=E,this.shouldAutoInitialize()){if(function S(G){return"EAGER"===G.instantiationMode}(E))try{this.getOrInitializeService({instanceIdentifier:b})}catch{}for(const[N,J]of this.instancesDeferred.entries()){const H=this.normalizeInstanceIdentifier(N);try{const W=this.getOrInitializeService({instanceIdentifier:H});J.resolve(W)}catch{}}}}clearInstance(E=b){this.instancesDeferred.delete(E),this.instancesOptions.delete(E),this.instances.delete(E)}delete(){var E=this;return(0,O.A)(function*(){const N=Array.from(E.instances.values());yield Promise.all([...N.filter(J=>"INTERNAL"in J).map(J=>J.INTERNAL.delete()),...N.filter(J=>"_delete"in J).map(J=>J._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(E=b){return this.instances.has(E)}getOptions(E=b){return this.instancesOptions.get(E)||{}}initialize(E={}){const{options:N={}}=E,J=this.normalizeInstanceIdentifier(E.instanceIdentifier);if(this.isInitialized(J))throw Error(`${this.name}(${J}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const H=this.getOrInitializeService({instanceIdentifier:J,options:N});for(const[W,ae]of this.instancesDeferred.entries())J===this.normalizeInstanceIdentifier(W)&&ae.resolve(H);return H}onInit(E,N){const J=this.normalizeInstanceIdentifier(N),H=this.onInitCallbacks.get(J)??new Set;H.add(E),this.onInitCallbacks.set(J,H);const W=this.instances.get(J);return W&&E(W,J),()=>{H.delete(E)}}invokeOnInitCallbacks(E,N){const J=this.onInitCallbacks.get(N);if(J)for(const H of J)try{H(E,N)}catch{}}getOrInitializeService({instanceIdentifier:E,options:N={}}){let J=this.instances.get(E);if(!J&&this.component&&(J=this.component.instanceFactory(this.container,{instanceIdentifier:(G=E,G===b?void 0:G),options:N}),this.instances.set(E,J),this.instancesOptions.set(E,N),this.invokeOnInitCallbacks(J,E),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,E,J)}catch{}var G;return J||null}normalizeInstanceIdentifier(E=b){return this.component?this.component.multipleInstances?E:b:E}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class x{constructor(E){this.name=E,this.providers=new Map}addComponent(E){const N=this.getProvider(E.name);if(N.isComponentSet())throw new Error(`Component ${E.name} has already been registered with ${this.name}`);N.setComponent(E)}addOrOverwriteComponent(E){this.getProvider(E.name).isComponentSet()&&this.providers.delete(E.name),this.addComponent(E)}getProvider(E){if(this.providers.has(E))return this.providers.get(E);const N=new j(E,this);return this.providers.set(E,N),N}getProviders(){return Array.from(this.providers.values())}}},1919(wt,Ve,oe){"use strict";oe.d(Ve,{$b:()=>F,Vy:()=>S});const O=[];var F=function(E){return E[E.DEBUG=0]="DEBUG",E[E.VERBOSE=1]="VERBOSE",E[E.INFO=2]="INFO",E[E.WARN=3]="WARN",E[E.ERROR=4]="ERROR",E[E.SILENT=5]="SILENT",E}(F||{});const k={debug:F.DEBUG,verbose:F.VERBOSE,info:F.INFO,warn:F.WARN,error:F.ERROR,silent:F.SILENT},b=F.INFO,j={[F.DEBUG]:"log",[F.VERBOSE]:"log",[F.INFO]:"info",[F.WARN]:"warn",[F.ERROR]:"error"},T=(E,N,...J)=>{if(N<E.logLevel)return;const H=(new Date).toISOString(),W=j[N];if(!W)throw new Error(`Attempted to log a message with an invalid logType (value: ${N})`);console[W](`[${H}] ${E.name}:`,...J)};class S{constructor(N){this.name=N,this._logLevel=b,this._logHandler=T,this._userLogHandler=null,O.push(this)}get logLevel(){return this._logLevel}set logLevel(N){if(!(N in F))throw new TypeError(`Invalid value "${N}" assigned to \`logLevel\``);this._logLevel=N}setLogLevel(N){this._logLevel="string"==typeof N?k[N]:N}get logHandler(){return this._logHandler}set logHandler(N){if("function"!=typeof N)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=N}get userLogHandler(){return this._userLogHandler}set userLogHandler(N){this._userLogHandler=N}debug(...N){this._userLogHandler&&this._userLogHandler(this,F.DEBUG,...N),this._logHandler(this,F.DEBUG,...N)}log(...N){this._userLogHandler&&this._userLogHandler(this,F.VERBOSE,...N),this._logHandler(this,F.VERBOSE,...N)}info(...N){this._userLogHandler&&this._userLogHandler(this,F.INFO,...N),this._logHandler(this,F.INFO,...N)}warn(...N){this._userLogHandler&&this._userLogHandler(this,F.WARN,...N),this._logHandler(this,F.WARN,...N)}error(...N){this._userLogHandler&&this._userLogHandler(this,F.ERROR,...N),this._logHandler(this,F.ERROR,...N)}}},6702(wt,Ve,oe){"use strict";oe.r(Ve),oe.d(Ve,{StorageError:()=>E,StorageErrorCode:()=>N,StringFormat:()=>fn,_FbsBlob:()=>ai,_Location:()=>Ee,_TaskEvent:()=>St,_TaskState:()=>Be,_UploadTask:()=>Qn,_dataFromString:()=>lo,_getChild:()=>zs,_invalidArgument:()=>de,_invalidRootOperation:()=>Ie,connectStorageEmulator:()=>dc,deleteObject:()=>zl,getBlob:()=>Wi,getBytes:()=>Id,getDownloadURL:()=>Pg,getMetadata:()=>Ga,getStorage:()=>Ad,getStream:()=>fc,list:()=>hc,listAll:()=>da,ref:()=>kg,updateMetadata:()=>Ul,uploadBytes:()=>xd,uploadBytesResumable:()=>Zt,uploadString:()=>Wr});var O=oe(467),F=oe(3659),k=oe(7814),b=oe(2040);const j="firebasestorage.googleapis.com",T="storageBucket";class E extends k.g{constructor(Y,ee,_e=0){super(J(Y),`Firebase Storage: ${ee} (${J(Y)})`),this.status_=_e,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,E.prototype)}get status(){return this.status_}set status(Y){this.status_=Y}_codeEquals(Y){return J(Y)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(Y){this.customData.serverResponse=Y,this.message=this.customData.serverResponse?`${this._baseMessage}\n${this.customData.serverResponse}`:this._baseMessage}}var N=function(X){return X.UNKNOWN="unknown",X.OBJECT_NOT_FOUND="object-not-found",X.BUCKET_NOT_FOUND="bucket-not-found",X.PROJECT_NOT_FOUND="project-not-found",X.QUOTA_EXCEEDED="quota-exceeded",X.UNAUTHENTICATED="unauthenticated",X.UNAUTHORIZED="unauthorized",X.UNAUTHORIZED_APP="unauthorized-app",X.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",X.INVALID_CHECKSUM="invalid-checksum",X.CANCELED="canceled",X.INVALID_EVENT_NAME="invalid-event-name",X.INVALID_URL="invalid-url",X.INVALID_DEFAULT_BUCKET="invalid-default-bucket",X.NO_DEFAULT_BUCKET="no-default-bucket",X.CANNOT_SLICE_BLOB="cannot-slice-blob",X.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",X.NO_DOWNLOAD_URL="no-download-url",X.INVALID_ARGUMENT="invalid-argument",X.INVALID_ARGUMENT_COUNT="invalid-argument-count",X.APP_DELETED="app-deleted",X.INVALID_ROOT_OPERATION="invalid-root-operation",X.INVALID_FORMAT="invalid-format",X.INTERNAL_ERROR="internal-error",X.UNSUPPORTED_ENVIRONMENT="unsupported-environment",X}(N||{});function J(X){return"storage/"+X}function H(){return new E(N.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function ie(){return new E(N.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function Q(){return new E(N.CANCELED,"User canceled the upload/download.")}function te(){return new E(N.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function de(X){return new E(N.INVALID_ARGUMENT,X)}function Ce(){return new E(N.APP_DELETED,"The Firebase app was deleted.")}function Ie(X){return new E(N.INVALID_ROOT_OPERATION,"The operation '"+X+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function Ne(X,Y){return new E(N.INVALID_FORMAT,"String does not match format '"+X+"': "+Y)}function tt(X){throw new E(N.INTERNAL_ERROR,"Internal error: "+X)}class Ee{constructor(Y,ee){this.bucket=Y,this.path_=ee}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){const Y=encodeURIComponent;return"/b/"+Y(this.bucket)+"/o/"+Y(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(Y,ee){let _e;try{_e=Ee.makeFromUrl(Y,ee)}catch{return new Ee(Y,"")}if(""===_e.path)return _e;throw function D(X){return new E(N.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+X+"'.")}(Y)}static makeFromUrl(Y,ee){let _e=null;const ke="([A-Za-z0-9.\\-_]+)",nr=new RegExp("^gs://"+ke+"(/(.*))?$","i");function wr(In){In.path_=decodeURIComponent(In.path)}const tn=ee.replace(/[.]/g,"\\."),kn=[{regex:nr,indices:{bucket:1,path:3},postModify:function Je(In){"/"===In.path.charAt(In.path.length-1)&&(In.path_=In.path_.slice(0,-1))}},{regex:new RegExp(`^https?://${tn}/v[A-Za-z0-9_]+/b/${ke}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:wr},{regex:new RegExp(`^https?://${ee===j?"(?:storage.googleapis.com|storage.cloud.google.com)":ee}/${ke}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:wr}];for(let In=0;In<kn.length;In++){const Gs=kn[In],fa=Gs.regex.exec(Y);if(fa){let $o=fa[Gs.indices.path];$o||($o=""),_e=new Ee(fa[Gs.indices.bucket],$o),Gs.postModify(_e);break}}if(null==_e)throw function w(X){return new E(N.INVALID_URL,"Invalid URL '"+X+"'.")}(Y);return _e}}class fe{constructor(Y){this.promise_=Promise.reject(Y)}getPromise(){return this.promise_}cancel(Y=!1){}}function ft(X){return"string"==typeof X||X instanceof String}function vt(X){return It()&&X instanceof Blob}function It(){return typeof Blob<"u"}function Ye(X,Y,ee,_e){if(_e<Y)throw de(`Invalid value for '${X}'. Expected ${Y} or greater.`);if(_e>ee)throw de(`Invalid value for '${X}'. Expected ${ee} or less.`)}function st(X,Y,ee){let _e=Y;return null==ee&&(_e=`https://${Y}`),`${ee}://${_e}/v0${X}`}function De(X){const Y=encodeURIComponent;let ee="?";for(const _e in X)X.hasOwnProperty(_e)&&(ee=ee+(Y(_e)+"=")+Y(X[_e])+"&");return ee=ee.slice(0,-1),ee}var Ae=function(X){return X[X.NO_ERROR=0]="NO_ERROR",X[X.NETWORK_ERROR=1]="NETWORK_ERROR",X[X.ABORT=2]="ABORT",X}(Ae||{});function pt(X,Y){const ee=X>=500&&X<600,ke=-1!==[408,429].indexOf(X),Je=-1!==Y.indexOf(X);return ee||ke||Je}class Rt{constructor(Y,ee,_e,ke,Je,At,nr,$t,wr,Sr,tn,Sn=!0,Cn=!1){this.url_=Y,this.method_=ee,this.headers_=_e,this.body_=ke,this.successCodes_=Je,this.additionalRetryCodes_=At,this.callback_=nr,this.errorCallback_=$t,this.timeout_=wr,this.progressCallback_=Sr,this.connectionFactory_=tn,this.retry=Sn,this.isUsingEmulator=Cn,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((yn,Di)=>{this.resolve_=yn,this.reject_=Di,this.start_()})}start_(){const ee=(_e,ke)=>{const Je=this.resolve_,At=this.reject_,nr=ke.connection;if(ke.wasSuccessCode)try{const $t=this.callback_(nr,nr.getResponse());!function Oe(X){return void 0!==X}($t)?Je():Je($t)}catch($t){At($t)}else if(null!==nr){const $t=H();$t.serverResponse=nr.getErrorText(),At(this.errorCallback_?this.errorCallback_(nr,$t):$t)}else At(ke.canceled?this.appDelete_?Ce():Q():ie())};this.canceled_?ee(0,new ht(!1,null,!0)):this.backoffId_=function ye(X,Y,ee){let _e=1,ke=null,Je=null,At=!1,nr=0;function $t(){return 2===nr}let wr=!1;function Sr(...Pn){wr||(wr=!0,Y.apply(null,Pn))}function tn(Pn){ke=setTimeout(()=>{ke=null,X(Cn,$t())},Pn)}function Sn(){Je&&clearTimeout(Je)}function Cn(Pn,...Tn){if(wr)return void Sn();if(Pn)return Sn(),void Sr.call(null,Pn,...Tn);if($t()||At)return Sn(),void Sr.call(null,Pn,...Tn);let kn;_e<64&&(_e*=2),1===nr?(nr=2,kn=0):kn=1e3*(_e+Math.random()),tn(kn)}let yn=!1;function Di(Pn){yn||(yn=!0,Sn(),!wr&&(null!==ke?(Pn||(nr=2),clearTimeout(ke),tn(0)):Pn||(nr=1)))}return tn(0),Je=setTimeout(()=>{At=!0,Di(!0)},ee),Di}((_e,ke)=>{if(ke)return void _e(!1,new ht(!1,null,!0));const Je=this.connectionFactory_();this.pendingConnection_=Je;const At=nr=>{null!==this.progressCallback_&&this.progressCallback_(nr.loaded,nr.lengthComputable?nr.total:-1)};null!==this.progressCallback_&&Je.addUploadProgressListener(At),Je.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&Je.removeUploadProgressListener(At),this.pendingConnection_=null;const nr=Je.getErrorCode()===Ae.NO_ERROR,$t=Je.getStatus();if(!nr||pt($t,this.additionalRetryCodes_)&&this.retry){const Sr=Je.getErrorCode()===Ae.ABORT;return void _e(!1,new ht(!1,null,Sr))}const wr=-1!==this.successCodes_.indexOf($t);_e(!0,new ht(wr,Je))})},ee,this.timeout_)}getPromise(){return this.promise_}cancel(Y){this.canceled_=!0,this.appDelete_=Y||!1,null!==this.backoffId_&&function Ke(X){X(!1)}(this.backoffId_),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class ht{constructor(Y,ee,_e){this.wasSuccessCode=Y,this.connection=ee,this.canceled=!!_e}}function nn(...X){const Y=function Ar(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}();if(void 0!==Y){const ee=new Y;for(let _e=0;_e<X.length;_e++)ee.append(X[_e]);return ee.getBlob()}if(It())return new Blob(X);throw new E(N.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}const fn={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class Si{constructor(Y,ee){this.data=Y,this.contentType=ee||null}}function lo(X,Y){switch(X){case fn.RAW:return new Si(Fa(Y));case fn.BASE64:case fn.BASE64URL:return new Si(Co(X,Y));case fn.DATA_URL:return new Si(function Ms(X){const Y=new Ls(X);return Y.base64?Co(fn.BASE64,Y.rest):function Ol(X){let Y;try{Y=decodeURIComponent(X)}catch{throw Ne(fn.DATA_URL,"Malformed data URL.")}return Fa(Y)}(Y.rest)}(Y),function ua(X){return new Ls(X).contentType}(Y))}throw H()}function Fa(X){const Y=[];for(let ee=0;ee<X.length;ee++){let _e=X.charCodeAt(ee);_e<=127?Y.push(_e):_e<=2047?Y.push(192|_e>>6,128|63&_e):55296==(64512&_e)?ee<X.length-1&&56320==(64512&X.charCodeAt(ee+1))?(_e=65536|(1023&_e)<<10|1023&X.charCodeAt(++ee),Y.push(240|_e>>18,128|_e>>12&63,128|_e>>6&63,128|63&_e)):Y.push(239,191,189):56320==(64512&_e)?Y.push(239,191,189):Y.push(224|_e>>12,128|_e>>6&63,128|63&_e)}return new Uint8Array(Y)}function Co(X,Y){switch(X){case fn.BASE64:{const ke=-1!==Y.indexOf("-"),Je=-1!==Y.indexOf("_");if(ke||Je)throw Ne(X,"Invalid character '"+(ke?"-":"_")+"' found: is it base64url encoded?");break}case fn.BASE64URL:{const ke=-1!==Y.indexOf("+"),Je=-1!==Y.indexOf("/");if(ke||Je)throw Ne(X,"Invalid character '"+(ke?"+":"/")+"' found: is it base64 encoded?");Y=Y.replace(/-/g,"+").replace(/_/g,"/");break}}let ee;try{ee=function qi(X){if(typeof atob>"u")throw function se(X){return new E(N.UNSUPPORTED_ENVIRONMENT,`${X} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}("base-64");return atob(X)}(Y)}catch(ke){throw ke.message.includes("polyfill")?ke:Ne(X,"Invalid character found")}const _e=new Uint8Array(ee.length);for(let ke=0;ke<ee.length;ke++)_e[ke]=ee.charCodeAt(ke);return _e}class Ls{constructor(Y){this.base64=!1,this.contentType=null;const ee=Y.match(/^data:([^,]+)?,/);if(null===ee)throw Ne(fn.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const _e=ee[1]||null;null!=_e&&(this.base64=function Xt(X,Y){return X.length>=Y.length&&X.substring(X.length-Y.length)===Y}(_e,";base64"),this.contentType=this.base64?_e.substring(0,_e.length-7):_e),this.rest=Y.substring(Y.indexOf(",")+1)}}class ai{constructor(Y,ee){let _e=0,ke="";vt(Y)?(this.data_=Y,_e=Y.size,ke=Y.type):Y instanceof ArrayBuffer?(ee?this.data_=new Uint8Array(Y):(this.data_=new Uint8Array(Y.byteLength),this.data_.set(new Uint8Array(Y))),_e=this.data_.length):Y instanceof Uint8Array&&(ee?this.data_=Y:(this.data_=new Uint8Array(Y.length),this.data_.set(Y)),_e=Y.length),this.size_=_e,this.type_=ke}size(){return this.size_}type(){return this.type_}slice(Y,ee){if(vt(this.data_)){const ke=function Yn(X,Y,ee){return X.webkitSlice?X.webkitSlice(Y,ee):X.mozSlice?X.mozSlice(Y,ee):X.slice?X.slice(Y,ee):null}(this.data_,Y,ee);return null===ke?null:new ai(ke)}{const _e=new Uint8Array(this.data_.buffer,Y,ee-Y);return new ai(_e,!0)}}static getBlob(...Y){if(It()){const ee=Y.map(_e=>_e instanceof ai?_e.data_:_e);return new ai(nn.apply(null,ee))}{const ee=Y.map(At=>ft(At)?lo(fn.RAW,At).data:At.data_);let _e=0;ee.forEach(At=>{_e+=At.byteLength});const ke=new Uint8Array(_e);let Je=0;return ee.forEach(At=>{for(let nr=0;nr<At.length;nr++)ke[Je++]=At[nr]}),new ai(ke,!0)}}uploadData(){return this.data_}}function ji(X){let Y;try{Y=JSON.parse(X)}catch{return null}return function Ze(X){return"object"==typeof X&&!Array.isArray(X)}(Y)?Y:null}function Gn(X){const Y=X.lastIndexOf("/",X.length-2);return-1===Y?X:X.slice(Y+1)}function Va(X,Y){return Y}class jr{constructor(Y,ee,_e,ke){this.server=Y,this.local=ee||Y,this.writable=!!_e,this.xform=ke||Va}}let wo=null;function Ci(){if(wo)return wo;const X=[];X.push(new jr("bucket")),X.push(new jr("generation")),X.push(new jr("metageneration")),X.push(new jr("name","fullPath",!0));const ee=new jr("name");ee.xform=function Y(Je,At){return function oc(X){return!ft(X)||X.length<2?X:Gn(X)}(At)},X.push(ee);const ke=new jr("size");return ke.xform=function _e(Je,At){return void 0!==At?Number(At):At},X.push(ke),X.push(new jr("timeCreated")),X.push(new jr("updated")),X.push(new jr("md5Hash",null,!0)),X.push(new jr("cacheControl",null,!0)),X.push(new jr("contentDisposition",null,!0)),X.push(new jr("contentEncoding",null,!0)),X.push(new jr("contentLanguage",null,!0)),X.push(new jr("contentType",null,!0)),X.push(new jr("metadata","customMetadata",!0)),wo=X,wo}function ko(X,Y,ee){const _e=ji(Y);return null===_e?null:function ca(X,Y,ee){const _e={type:"file"},ke=ee.length;for(let Je=0;Je<ke;Je++){const At=ee[Je];_e[At.local]=At.xform(_e,Y[At.server])}return function Ho(X,Y){Object.defineProperty(X,"ref",{get:function ee(){const Je=new Ee(X.bucket,X.fullPath);return Y._makeStorageReference(Je)}})}(_e,X),_e}(X,_e,ee)}function Fn(X,Y){const ee={},_e=Y.length;for(let ke=0;ke<_e;ke++){const Je=Y[ke];Je.writable&&(ee[Je.server]=X[Je.local])}return JSON.stringify(ee)}const ha="prefixes";class Pi{constructor(Y,ee,_e,ke){this.url=Y,this.method=ee,this.handler=_e,this.timeout=ke,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}function ki(X){if(!X)throw H()}function Do(X,Y){return function ee(_e,ke){const Je=ko(X,ke,Y);return ki(null!==Je),Je}}function Qi(X){return function Y(ee,_e){let ke;return ke=401===ee.getStatus()?ee.getErrorText().includes("Firebase App Check token is invalid")?function Z(){return new E(N.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}():function L(){return new E(N.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again.")}():402===ee.getStatus()?function ae(X){return new E(N.QUOTA_EXCEEDED,"Quota for bucket '"+X+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}(X.bucket):403===ee.getStatus()?function P(X){return new E(N.UNAUTHORIZED,"User does not have permission to access '"+X+"'.")}(X.path):_e,ke.status=ee.getStatus(),ke.serverResponse=_e.serverResponse,ke}}function qn(X){const Y=Qi(X);return function ee(_e,ke){let Je=Y(_e,ke);return 404===_e.getStatus()&&(Je=function W(X){return new E(N.OBJECT_NOT_FOUND,"Object '"+X+"' does not exist.")}(X.path)),Je.serverResponse=ke.serverResponse,Je}}function Te(X,Y,ee){const ke=st(Y.fullServerUrl(),X.host,X._protocol),At=X.maxOperationRetryTime,nr=new Pi(ke,"GET",Do(X,ee),At);return nr.errorHandler=qn(Y),nr}function ve(X,Y,ee,_e,ke){const Je={};Je.prefix=Y.isRoot?"":Y.path+"/",ee&&ee.length>0&&(Je.delimiter=ee),_e&&(Je.pageToken=_e),ke&&(Je.maxResults=ke);const nr=st(Y.bucketOnlyServerUrl(),X.host,X._protocol),wr=X.maxOperationRetryTime,Sr=new Pi(nr,"GET",function ac(X,Y){return function ee(_e,ke){const Je=function Bs(X,Y,ee){const _e=ji(ee);return null===_e?null:function Vs(X,Y,ee){const _e={prefixes:[],items:[],nextPageToken:ee.nextPageToken};if(ee[ha])for(const ke of ee[ha]){const Je=ke.replace(/\/$/,""),At=X._makeStorageReference(new Ee(Y,Je));_e.prefixes.push(At)}if(ee.items)for(const ke of ee.items){const Je=X._makeStorageReference(new Ee(Y,ke.name));_e.items.push(Je)}return _e}(X,Y,_e)}(X,Y,ke);return ki(null!==Je),Je}}(X,Y.bucket),wr);return Sr.urlParams=Je,Sr.errorHandler=Qi(Y),Sr}function Se(X,Y,ee){const ke=st(Y.fullServerUrl(),X.host,X._protocol)+"?alt=media",nr=new Pi(ke,"GET",($t,wr)=>wr,X.maxOperationRetryTime);return nr.errorHandler=qn(Y),void 0!==ee&&(nr.headers.Range=`bytes=0-${ee}`,nr.successCodes=[200,206]),nr}function it(X,Y,ee){const _e=Object.assign({},ee);return _e.fullPath=X.path,_e.size=Y.size(),_e.contentType||(_e.contentType=function yr(X,Y){return X&&X.contentType||Y&&Y.type()||"application/octet-stream"}(null,Y)),_e}function Er(X,Y,ee,_e,ke){const Je=Y.bucketOnlyServerUrl(),At={"X-Goog-Upload-Protocol":"multipart"},$t=function nr(){let kn="";for(let In=0;In<2;In++)kn+=Math.random().toString().slice(2);return kn}();At["Content-Type"]="multipart/related; boundary="+$t;const wr=it(Y,_e,ke),Sr=Fn(wr,ee),Cn=ai.getBlob("--"+$t+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+Sr+"\r\n--"+$t+"\r\nContent-Type: "+wr.contentType+"\r\n\r\n",_e,"\r\n--"+$t+"--");if(null===Cn)throw te();const yn={name:wr.fullPath},Di=st(Je,X.host,X._protocol),Tn=X.maxUploadRetryTime,li=new Pi(Di,"POST",Do(X,ee),Tn);return li.urlParams=yn,li.headers=At,li.body=Cn.uploadData(),li.errorHandler=Qi(Y),li}class Br{constructor(Y,ee,_e,ke){this.current=Y,this.total=ee,this.finalized=!!_e,this.metadata=ke||null}}function Rn(X,Y){let ee=null;try{ee=X.getResponseHeader("X-Goog-Upload-Status")}catch{ki(!1)}return ki(!!ee&&-1!==(Y||["active"]).indexOf(ee)),ee}const St={STATE_CHANGED:"state_changed"},Be={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function yt(X){switch(X){case"running":case"pausing":case"canceling":return Be.RUNNING;case"paused":return Be.PAUSED;case"success":return Be.SUCCESS;case"canceled":return Be.CANCELED;default:return Be.ERROR}}class Yr{constructor(Y,ee,_e){if(function pe(X){return"function"==typeof X}(Y)||null!=ee||null!=_e)this.next=Y,this.error=ee??void 0,this.complete=_e??void 0;else{const Je=Y;this.next=Je.next,this.error=Je.error,this.complete=Je.complete}}}function Hi(X){return(...Y)=>{Promise.resolve().then(()=>X(...Y))}}class ze{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=Ae.NO_ERROR,this.sendPromise_=new Promise(Y=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=Ae.ABORT,Y()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=Ae.NETWORK_ERROR,Y()}),this.xhr_.addEventListener("load",()=>{Y()})})}send(Y,ee,_e,ke,Je){if(this.sent_)throw tt("cannot .send() more than once");if((0,k.zJ)(Y)&&_e&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(ee,Y,!0),void 0!==Je)for(const At in Je)Je.hasOwnProperty(At)&&this.xhr_.setRequestHeader(At,Je[At].toString());return void 0!==ke?this.xhr_.send(ke):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw tt("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw tt("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw tt("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw tt("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(Y){return this.xhr_.getResponseHeader(Y)}addUploadProgressListener(Y){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",Y)}removeUploadProgressListener(Y){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",Y)}}class Le extends ze{initXhr(){this.xhr_.responseType="text"}}function et(){return new Le}class Vt extends ze{initXhr(){this.xhr_.responseType="arraybuffer"}}function or(){return new Vt}class Ir extends ze{initXhr(){this.xhr_.responseType="blob"}}function Nr(){return new Ir}class Qn{isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}constructor(Y,ee,_e=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=Y,this._blob=ee,this._metadata=_e,this._mappings=Ci(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=ke=>{if(this._request=void 0,this._chunkMultiplier=1,ke._codeEquals(N.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{const Je=this.isExponentialBackoffExpired();if(pt(ke.status,[])){if(!Je)return this.sleepTime=Math.max(2*this.sleepTime,1e3),this._needToFetchStatus=!0,void this.completeTransitions_();ke=ie()}this._error=ke,this._transition("error")}},this._metadataErrorHandler=ke=>{this._request=void 0,ke._codeEquals(N.CANCELED)?this.completeTransitions_():(this._error=ke,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((ke,Je)=>{this._resolve=ke,this._reject=Je,this._start()}),this._promise.then(null,()=>{})}_makeProgressCallback(){const Y=this._transferred;return ee=>this._updateProgress(Y+ee)}_shouldDoResumable(Y){return Y.size()>262144}_start(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(Y){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([ee,_e])=>{switch(this._state){case"running":Y(ee,_e);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused")}})}_createResumable(){this._resolveToken((Y,ee)=>{const _e=function Tt(X,Y,ee,_e,ke){const Je=Y.bucketOnlyServerUrl(),At=it(Y,_e,ke),nr={name:At.fullPath},$t=st(Je,X.host,X._protocol),Sr={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${_e.size()}`,"X-Goog-Upload-Header-Content-Type":At.contentType,"Content-Type":"application/json; charset=utf-8"},tn=Fn(At,ee),yn=new Pi($t,"POST",function Cn(Di){let Pn;Rn(Di);try{Pn=Di.getResponseHeader("X-Goog-Upload-URL")}catch{ki(!1)}return ki(ft(Pn)),Pn},X.maxUploadRetryTime);return yn.urlParams=nr,yn.headers=Sr,yn.body=tn,yn.errorHandler=Qi(Y),yn}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),ke=this._ref.storage._makeRequest(_e,et,Y,ee);this._request=ke,ke.getPromise().then(Je=>{this._request=void 0,this._uploadUrl=Je,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){const Y=this._uploadUrl;this._resolveToken((ee,_e)=>{const ke=function cr(X,Y,ee,_e){const $t=new Pi(ee,"POST",function Je(wr){const Sr=Rn(wr,["active","final"]);let tn=null;try{tn=wr.getResponseHeader("X-Goog-Upload-Size-Received")}catch{ki(!1)}tn||ki(!1);const Sn=Number(tn);return ki(!isNaN(Sn)),new Br(Sn,_e.size(),"final"===Sr)},X.maxUploadRetryTime);return $t.headers={"X-Goog-Upload-Command":"query"},$t.errorHandler=Qi(Y),$t}(this._ref.storage,this._ref._location,Y,this._blob),Je=this._ref.storage._makeRequest(ke,et,ee,_e);this._request=Je,Je.getPromise().then(At=>{this._request=void 0,this._updateProgress(At.current),this._needToFetchStatus=!1,At.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){const Y=262144*this._chunkMultiplier,ee=new Br(this._transferred,this._blob.size()),_e=this._uploadUrl;this._resolveToken((ke,Je)=>{let At;try{At=function No(X,Y,ee,_e,ke,Je,At,nr){const $t=new Br(0,0);if(At?($t.current=At.current,$t.total=At.total):($t.current=0,$t.total=_e.size()),_e.size()!==$t.total)throw function he(){return new E(N.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}();const wr=$t.total-$t.current;let Sr=wr;ke>0&&(Sr=Math.min(Sr,ke));const tn=$t.current;let Cn="";Cn=0===Sr?"finalize":wr===Sr?"upload, finalize":"upload";const yn={"X-Goog-Upload-Command":Cn,"X-Goog-Upload-Offset":`${$t.current}`},Di=_e.slice(tn,tn+Sr);if(null===Di)throw te();const kn=new Pi(ee,"POST",function Pn(In,Gs){const fa=Rn(In,["active","final"]),Cd=$t.current+Sr,$o=_e.size();let jn;return jn="final"===fa?Do(Y,Je)(In,Gs):null,new Br(Cd,$o,"final"===fa,jn)},Y.maxUploadRetryTime);return kn.headers=yn,kn.body=Di.uploadData(),kn.progressCallback=nr||null,kn.errorHandler=Qi(X),kn}(this._ref._location,this._ref.storage,_e,this._blob,Y,this._mappings,ee,this._makeProgressCallback())}catch($t){return this._error=$t,void this._transition("error")}const nr=this._ref.storage._makeRequest(At,et,ke,Je,!1);this._request=nr,nr.getPromise().then($t=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress($t.current),$t.finalized?(this._metadata=$t.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){262144*this._chunkMultiplier*2<33554432&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((Y,ee)=>{const _e=Te(this._ref.storage,this._ref._location,this._mappings),ke=this._ref.storage._makeRequest(_e,et,Y,ee);this._request=ke,ke.getPromise().then(Je=>{this._request=void 0,this._metadata=Je,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((Y,ee)=>{const _e=Er(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),ke=this._ref.storage._makeRequest(_e,et,Y,ee);this._request=ke,ke.getPromise().then(Je=>{this._request=void 0,this._metadata=Je,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(Y){const ee=this._transferred;this._transferred=Y,this._transferred!==ee&&this._notifyObservers()}_transition(Y){if(this._state!==Y)switch(Y){case"canceling":case"pausing":this._state=Y,void 0!==this._request?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":const ee="paused"===this._state;this._state=Y,ee&&(this._notifyObservers(),this._start());break;case"paused":case"error":case"success":this._state=Y,this._notifyObservers();break;case"canceled":this._error=Q(),this._state=Y,this._notifyObservers()}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}}get snapshot(){const Y=yt(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:Y,metadata:this._metadata,task:this,ref:this._ref}}on(Y,ee,_e,ke){const Je=new Yr(ee||void 0,_e||void 0,ke||void 0);return this._addObserver(Je),()=>{this._removeObserver(Je)}}then(Y,ee){return this._promise.then(Y,ee)}catch(Y){return this.then(null,Y)}_addObserver(Y){this._observers.push(Y),this._notifyObserver(Y)}_removeObserver(Y){const ee=this._observers.indexOf(Y);-1!==ee&&this._observers.splice(ee,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(ee=>{this._notifyObserver(ee)})}_finishPromise(){if(void 0!==this._resolve){let Y=!0;switch(yt(this._state)){case Be.SUCCESS:Hi(this._resolve.bind(null,this.snapshot))();break;case Be.CANCELED:case Be.ERROR:Hi(this._reject.bind(null,this._error))();break;default:Y=!1}Y&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(Y){switch(yt(this._state)){case Be.RUNNING:case Be.PAUSED:Y.next&&Hi(Y.next.bind(Y,this.snapshot))();break;case Be.SUCCESS:Y.complete&&Hi(Y.complete.bind(Y))();break;default:Y.error&&Hi(Y.error.bind(Y,this._error))()}}resume(){const Y="paused"===this._state||"pausing"===this._state;return Y&&this._transition("running"),Y}pause(){const Y="running"===this._state;return Y&&this._transition("pausing"),Y}cancel(){const Y="running"===this._state||"pausing"===this._state;return Y&&this._transition("canceling"),Y}}class Hr{constructor(Y,ee){this._service=Y,this._location=ee instanceof Ee?ee:Ee.makeFromUrl(ee,Y.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(Y,ee){return new Hr(Y,ee)}get root(){const Y=new Ee(this._location.bucket,"");return this._newRef(this._service,Y)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return Gn(this._location.path)}get storage(){return this._service}get parent(){const Y=function si(X){if(0===X.length)return null;const Y=X.lastIndexOf("/");return-1===Y?"":X.slice(0,Y)}(this._location.path);if(null===Y)return null;const ee=new Ee(this._location.bucket,Y);return new Hr(this._service,ee)}_throwIfRoot(Y){if(""===this._location.path)throw Ie(Y)}}function Ll(X,Y,ee){X._throwIfRoot("uploadBytes");const _e=Er(X.storage,X._location,Ci(),new ai(Y,!0),ee);return X.storage.makeRequestWithTokens(_e,et).then(ke=>({metadata:ke,ref:X}))}function Ag(X,Y,ee){return Ml.apply(this,arguments)}function Ml(){return(Ml=(0,O.A)(function*(X,Y,ee){const ke=yield Fl(X,{pageToken:ee});Y.prefixes.push(...ke.prefixes),Y.items.push(...ke.items),null!=ke.nextPageToken&&(yield Ag(X,Y,ke.nextPageToken))})).apply(this,arguments)}function Fl(X,Y){null!=Y&&"number"==typeof Y.maxResults&&Ye("options.maxResults",1,1e3,Y.maxResults);const ee=Y||{},_e=ve(X.storage,X._location,"/",ee.pageToken,ee.maxResults);return X.storage.makeRequestWithTokens(_e,et)}function Rg(X){X._throwIfRoot("getDownloadURL");const Y=function gt(X,Y,ee){const ke=st(Y.fullServerUrl(),X.host,X._protocol),At=X.maxOperationRetryTime,nr=new Pi(ke,"GET",function Us(X,Y){return function ee(_e,ke){const Je=ko(X,ke,Y);return ki(null!==Je),function Fs(X,Y,ee,_e){const ke=ji(Y);if(null===ke||!ft(ke.downloadTokens))return null;const Je=ke.downloadTokens;if(0===Je.length)return null;const At=encodeURIComponent;return Je.split(",").map(wr=>{const tn=X.fullPath;return st("/b/"+At(X.bucket)+"/o/"+At(tn),ee,_e)+De({alt:"media",token:wr})})[0]}(Je,ke,X.host,X._protocol)}}(X,ee),At);return nr.errorHandler=qn(Y),nr}(X.storage,X._location,Ci());return X.storage.makeRequestWithTokens(Y,et).then(ee=>{if(null===ee)throw function ge(){return new E(N.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}();return ee})}function Ot(X,Y){const ee=function Po(X,Y){const ee=Y.split("/").filter(_e=>_e.length>0).join("/");return 0===X.length?ee:X+"/"+ee}(X._location.path,Y),_e=new Ee(X._location.bucket,ee);return new Hr(X.storage,_e)}function cc(X,Y){if(X instanceof $i){const ee=X;if(null==ee._bucket)throw function V(){return new E(N.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+T+"' property when initializing the app?")}();const _e=new Hr(ee,ee._bucket);return null!=Y?cc(_e,Y):_e}return void 0!==Y?Ot(X,Y):X}function Td(X,Y){if(Y&&function uc(X){return/^[A-Za-z]+:\/\//.test(X)}(Y)){if(X instanceof $i)return function Sg(X,Y){return new Hr(X,Y)}(X,Y);throw de("To use ref(service, url), the first argument must be a Storage instance.")}return cc(X,Y)}function Vl(X,Y){const ee=Y?.[T];return null==ee?null:Ee.makeFromBucketSpec(ee,X)}class $i{constructor(Y,ee,_e,ke,Je,At=!1){this.app=Y,this._authProvider=ee,this._appCheckProvider=_e,this._url=ke,this._firebaseVersion=Je,this._isUsingEmulator=At,this._bucket=null,this._host=j,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=ke?Ee.makeFromBucketSpec(ke,this._host):Vl(this._host,this.app.options)}get host(){return this._host}set host(Y){this._host=Y,this._bucket=null!=this._url?Ee.makeFromBucketSpec(this._url,Y):Vl(Y,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(Y){Ye("time",0,Number.POSITIVE_INFINITY,Y),this._maxUploadRetryTime=Y}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(Y){Ye("time",0,Number.POSITIVE_INFINITY,Y),this._maxOperationRetryTime=Y}_getAuthToken(){var Y=this;return(0,O.A)(function*(){if(Y._overrideAuthToken)return Y._overrideAuthToken;const ee=Y._authProvider.getImmediate({optional:!0});if(ee){const _e=yield ee.getToken();if(null!==_e)return _e.accessToken}return null})()}_getAppCheckToken(){var Y=this;return(0,O.A)(function*(){if((0,F.xZ)(Y.app)&&Y.app.settings.appCheckToken)return Y.app.settings.appCheckToken;const ee=Y._appCheckProvider.getImmediate({optional:!0});return ee?(yield ee.getToken()).token:null})()}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(Y=>Y.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(Y){return new Hr(this,Y)}_makeRequest(Y,ee,_e,ke,Je=!0){if(this._deleted)return new fe(Ce());{const At=function dr(X,Y,ee,_e,ke,Je,At=!0,nr=!1){const $t=De(X.urlParams),wr=X.url+$t,Sr=Object.assign({},X.headers);return function pr(X,Y){Y&&(X["X-Firebase-GMPID"]=Y)}(Sr,Y),function Dt(X,Y){null!==Y&&Y.length>0&&(X.Authorization="Firebase "+Y)}(Sr,ee),function rr(X,Y){X["X-Firebase-Storage-Version"]="webjs/"+(Y??"AppManager")}(Sr,Je),function Pt(X,Y){null!==Y&&(X["X-Firebase-AppCheck"]=Y)}(Sr,_e),new Rt(wr,X.method,Sr,X.body,X.successCodes,X.additionalRetryCodes,X.handler,X.errorHandler,X.timeout,X.progressCallback,ke,At,nr)}(Y,this._appId,_e,ke,ee,this._firebaseVersion,Je,this._isUsingEmulator);return this._requests.add(At),At.getPromise().then(()=>this._requests.delete(At),()=>this._requests.delete(At)),At}}makeRequestWithTokens(Y,ee){var _e=this;return(0,O.A)(function*(){const[ke,Je]=yield Promise.all([_e._getAuthToken(),_e._getAppCheckToken()]);return _e._makeRequest(Y,ee,ke,Je).getPromise()})()}}const Cg="@firebase/storage",za="storage";function Id(X,Y){return function Jt(X,Y){X._throwIfRoot("getBytes");const ee=Se(X.storage,X._location,Y);return X.storage.makeRequestWithTokens(ee,or).then(_e=>void 0!==Y?_e.slice(0,Y):_e)}(X=(0,k.Ku)(X),Y)}function xd(X,Y,ee){return Ll(X=(0,k.Ku)(X),Y,ee)}function Wr(X,Y,ee,_e){return function lc(X,Y,ee=fn.RAW,_e){X._throwIfRoot("uploadString");const ke=lo(ee,Y),Je={..._e};return null==Je.contentType&&null!=ke.contentType&&(Je.contentType=ke.contentType),Ll(X,ke.data,Je)}(X=(0,k.Ku)(X),Y,ee,_e)}function Zt(X,Y,ee){return function sc(X,Y,ee){return X._throwIfRoot("uploadBytesResumable"),new Qn(X,new ai(Y),ee)}(X=(0,k.Ku)(X),Y,ee)}function Ga(X){return function _o(X){X._throwIfRoot("getMetadata");const Y=Te(X.storage,X._location,Ci());return X.storage.makeRequestWithTokens(Y,et)}(X=(0,k.Ku)(X))}function Ul(X,Y){return function Rr(X,Y){X._throwIfRoot("updateMetadata");const ee=function qe(X,Y,ee,_e){const Je=st(Y.fullServerUrl(),X.host,X._protocol),nr=Fn(ee,_e),wr=X.maxOperationRetryTime,Sr=new Pi(Je,"PATCH",Do(X,_e),wr);return Sr.headers={"Content-Type":"application/json; charset=utf-8"},Sr.body=nr,Sr.errorHandler=qn(Y),Sr}(X.storage,X._location,Y,Ci());return X.storage.makeRequestWithTokens(ee,et)}(X=(0,k.Ku)(X),Y)}function hc(X,Y){return Fl(X=(0,k.Ku)(X),Y)}function da(X){return function Ua(X){const Y={prefixes:[],items:[]};return Ag(X,Y).then(()=>Y)}(X=(0,k.Ku)(X))}function Pg(X){return Rg(X=(0,k.Ku)(X))}function zl(X){return function en(X){X._throwIfRoot("deleteObject");const Y=function qt(X,Y){const _e=st(Y.fullServerUrl(),X.host,X._protocol),nr=new Pi(_e,"DELETE",function At($t,wr){},X.maxOperationRetryTime);return nr.successCodes=[200,204],nr.errorHandler=qn(Y),nr}(X.storage,X._location);return X.storage.makeRequestWithTokens(Y,et)}(X=(0,k.Ku)(X))}function kg(X,Y){return Td(X=(0,k.Ku)(X),Y)}function zs(X,Y){return Ot(X,Y)}function Ad(X=(0,F.Sx)(),Y){X=(0,k.Ku)(X);const _e=(0,F.j6)(X,za).getImmediate({identifier:Y}),ke=(0,k.yU)("storage");return ke&&dc(_e,...ke),_e}function dc(X,Y,ee,_e={}){!function Bl(X,Y,ee,_e={}){X.host=`${Y}:${ee}`;const ke=(0,k.zJ)(Y);ke&&((0,k.gE)(`https://${X.host}/b`),(0,k.P1)("Storage",!0)),X._isUsingEmulator=!0,X._protocol=ke?"https":"http";const{mockUserToken:Je}=_e;Je&&(X._overrideAuthToken="string"==typeof Je?Je:(0,k.Fy)(Je,X.app.options.projectId))}(X,Y,ee,_e)}function Wi(X,Y){return function uo(X,Y){X._throwIfRoot("getBlob");const ee=Se(X.storage,X._location,Y);return X.storage.makeRequestWithTokens(ee,Nr).then(_e=>void 0!==Y?_e.slice(0,Y):_e)}(X=(0,k.Ku)(X),Y)}function fc(X,Y){throw new Error("getStream() is only supported by NodeJS builds")}function Rd(X,{instanceIdentifier:Y}){const ee=X.getProvider("app").getImmediate(),_e=X.getProvider("auth-internal"),ke=X.getProvider("app-check-internal");return new $i(ee,_e,ke,Y,F.MF)}!function Sd(){(0,F.om)(new b.uA(za,Rd,"PUBLIC").setMultipleInstances(!0)),(0,F.KO)(Cg,"0.14.0",""),(0,F.KO)(Cg,"0.14.0","esm2020")}()}}]);