sccfclib 1.4.6 → 1.4.8
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/SccfClientApi.js +1 -1
- package/package.json +2 -2
package/SccfClientApi.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see SccfClientApi.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios"),require("https")):"function"==typeof define&&define.amd?define(["axios","https"],t):"object"==typeof exports?exports.SccfClientApi=t(require("axios"),require("https")):e.SccfClientApi=t(e.axios,e.https)}(this,((e,t)=>(()=>{var n={247:(e,t,n)=>{"use strict";n.r(t),n.d(t,{decode:()=>s,encode:()=>a});for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"==typeof Uint8Array?[]:new Uint8Array(256),o=0;o<r.length;o++)i[r.charCodeAt(o)]=o;var a=function(e){var t,n=new Uint8Array(e),i=n.length,o="";for(t=0;t<i;t+=3)o+=r[n[t]>>2],o+=r[(3&n[t])<<4|n[t+1]>>4],o+=r[(15&n[t+1])<<2|n[t+2]>>6],o+=r[63&n[t+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(e){var t,n,r,o,a,s=.75*e.length,l=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),d=new Uint8Array(u);for(t=0;t<l;t+=4)n=i[e.charCodeAt(t)],r=i[e.charCodeAt(t+1)],o=i[e.charCodeAt(t+2)],a=i[e.charCodeAt(t+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&a;return u}},46:(e,t,n)=>{var r=n(948),i=n(31);e.exports=function(){var e;(e=this).log=null,e.cyto={},e.initCallback=null,e.tassativi=null,e.tiedStdMandNodeList=null,e.configurazione=[],e.incompatibiliConConfig=[],e.checkConfigurazione=[],e.incompatibiliConCheckConfig=[],e.maxDepth=3,e.loopScenarios=[],e.dtype=null,e.pct100List=null,e.AndRules=[],e.exhauEdgesRemoved=null,e.getVersion=function(){return"180"},e.init=function(t,n,r,i,o){e.selectionLogDiv=r,e.log=i,e.initCallback=o,e.log.info("RuleEngine.init - dataElements:["+t.length+"]"),e.createCytoscape(t,n,e.postCreate)},e.postCreate=function(){e.log.debug("RuleEngine.postCreate - begin"),e.cyto.add({group:"nodes",data:{id:"config"}}),e.cyto.$("#config").addClass("config"),e.cyto.elements("edge[type='I']").forEach((function(e){e.addClass("incompatibile")})),e.cyto.elements("edge[type='V']").forEach((function(e){e.addClass("vincolo")})),e.cyto.elements("edge[type='A']").forEach((function(e){e.addClass("alternativo")})),e.cyto.elements("edge[type='E']").forEach((function(e){e.addClass("esclusivo")})),e.exhauEdgesRemoved=e.cyto.collection(),e.setHandlers(),e.log.debug("RuleEngine.postCreate - end")},e.setHandlers=function(){e.log.debug("RuleEngine.setHandlers - begin"),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.checkConfigurazione=e.cyto.collection(),e.cyto.nodes().on("click",e.onClickNodeHandler),e.initCallback(),e.log.debug("RuleEngine.setHandlers - end")},e.onClickNodeHandler=function(t){var n,r;e.log.debug("RuleEngine.onClickNodeHandler"),n=t.target,r=e.processNode(n),e.selectionLogDiv&&(e.selectionLogDiv.append(" - selezionato : ( "+n.id()+" )<br/>"),e.selectionLogDiv.append(r.message+" )<br/>"))},e.createCytoscape=function(t,n,r){var o;o=i.stylesheet().selector("node").css({content:"data(id)"}).selector("edge").css({"curve-style":"bezier","target-arrow-shape":"triangle","target-arrow-color":"gold",width:1,"line-color":"gold","target-arrow-color":"gold"}).selector(".config").css({"background-color":"gold"}).selector(".selected").css({"background-color":"LimeGreen"}).selector(".highlighted").css({"background-color":"red"}).selector(".vincolo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"magenta","target-arrow-color":"magenta"}).selector(".incompatibile").css({"curve-style":"bezier","target-arrow-shape":"triangle","target-arrow-fill":"filled",width:2,"line-color":"skyblue","target-arrow-color":"skyblue"}).selector(".alternativo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"darkblue","target-arrow-color":"darkblue"}).selector(".esclusivo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"orange","target-arrow-color":"orange"}),e.cyto=i(n?{container:n,boxSelectionEnabled:!1,autounselectify:!0,elements:t,layout:{name:"concentric",minNodeSpacing:20,padding:10},style:o}:{boxSelectionEnabled:!1,autounselectify:!0,elements:t,style:o}),e.cyto.ready((function(){r()}))},e.ruleNodeList=function(t,n,r){"use strict";var i,s;switch({},"",s=l(),[],e.log.debug("RuleEngine.ruleNodeList - begin"),e.log.debug("RuleEngine.ruleNodeList - toAddList:["+u(t)+"] - toRemoveList:["+u(n)+"]"),i=e.processScenario(t,n),d(i.data.scenarios),i=e.getStdScenarios(i,t,n),d(i.data.scenarios),i.data.scenarios.length){case 0:s=c(!1,i.code,i.message,[],[],[],[],i.data.scenarios,i.data.extra);break;case 1:r&&i.success&&(a(i.data.scenarios[0].removeList),o(i.data.scenarios[0].addList),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.cyto.elements().removeClass("highlighted"),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted")),s=c(i.success,i.code,i.message,[],[],[],[],i.data.scenarios,i.data.extra);break;default:s=r?c(!1,560,i.message,[],[],[],[],i.data.scenarios):c(!0,200,i.message,[],[],[],[],i.data.scenarios)}return e.log.debug("RuleEngine.ruleNodeList - end"),s},e.processScenario=function(r,i){"use strict";var o,a,s,p,f,h,g,v;h="",g=l(),v=[],e.log.debug("RuleEngine.processScenario - toAddList:["+u(r)+"] toRemoveList:["+u(i)+"] - tiedStdMandNodeList:["+u(e.tiedStdMandNodeList)+"]"),r=r.union(e.tiedStdMandNodeList),i=i.difference(e.tassativi);var m=r.intersection(i);if(m.nonempty())return h=h+" Options ["+u(m)+"] it should be added and contemporaneously removed",g=c(!1,530,h,[],[],[],[],[]);if("xP"===e.dtype&&i.nonempty()&&n(r,i))return g=c(!1,586,".testChange - It is not possible to remove 100Pct option without adding same class Option",{});for(var y=e.cyto.collection(),b=0;b<r.length;b++){for(var C=r[b],x=e.getVincolatiDiretti(C),E=0;E<x.length;E++){var S=x[E];if(i.contains(S)&&!r.contains(S)&&S.outgoers("edge[type='A']").size()<=1)return h=h+" - Option {"+C.id()+"} constrains Option {"+u(S)+"} that must be removed",e.log.debug("RuleEngine.processScenario - 510 message_:["+h+"]"),g=c(!1,510,h,[],[],[],[],[])}y=y.union(x)}e.log.debug("RuleEngine.processScenario - tiedByList_:["+u(y)+"]");var w=(k=e.getTiedToList(r,i)).tiedToList;h+=k.message,p=w,s=i.union(p),a=y,e.log.debug("RuleEngine.processScenario - toAddJoinList_:["+u(a)+"]"),o=a.union(r),e.log.debug("RuleEngine.processScenario - toAddAllList_:["+u(o)+"]");var V=e.getNodiIncompatibili(o),R=o.intersection(V);if(R.nonempty())return h=h+" Options ["+u(R)+"] are incompatibles each others",g=c(!1,520,h,[],[],[],[],[]);var O=e.configurazione.difference(s);e.log.debug("RuleEngine.processScenario - configDiffList_:["+u(O)+"]");var A=e.getIncSelectionMap(o,O);if(A.size>0){A.forEach((function(e,t){h=h+" - Option {"+t+"} is incompatibile with ["+u(e)+"]",s=s.union(e)}));var k;w=(k=e.getTiedToList(o,s)).tiedToList;h+=k.message,p=p.union(w),s=s.union(p),e.log.debug("RuleEngine.processScenario - toRemoveAllList_:["+u(s)+"]")}if("xP"===e.dtype){var T=t(o,s);o=o.union(T.toAddAndList),s=s.union(T.toRemoveAndList);var D=r.intersection(s);if(D.nonempty())return h=h+" Options ["+u(D)+"] it should be added and contemporaneously removed by AND rules",g=c(!1,532,h,[],[],[],[],[])}if(e.log.debug("RuleEngine.processScenario - post setXpANDRules add - toAddAllList_:["+u(o)+"]"),e.log.debug("RuleEngine.processScenario - post setXpANDRules remove - toRemoveAllList_:["+u(s)+"]"),"xP"===e.dtype){var N=s.outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e})),P=N.incomers("edge[type='V']").sources().filter((function(e){if(e.id()&&"P"===e.id().slice(-1))return e})),B=e.configurazione.intersection(P.difference(s)).outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}));p=p.union(N.difference(B));var _=s.outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"VG"===e.data("type"))return e}));s=s.union(_);var M=e.configurazione.intersection(s.outgoers("edge[type='A']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}))),I=o.outgoers("edge[type='A']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}));p=p.union(M.difference(I));var F=e.configurazione.intersection(s.outgoers("edge[type='A']").targets().outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}))),L=o.outgoers("edge[type='A']").targets().outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}));p=p.union(F.difference(L)),s=s.union(p)}if(e.log.debug("RuleEngine.processScenario - Post Driven remove - toRemoveAllList_:["+u(s)+"]"),e.log.debug("RuleEngine.processScenario - me_.configurazione:["+u(e.configurazione)+"]"),s=s.difference(o.intersection(p)),e.log.debug("RuleEngine.processScenario -----------------------------------------------"),e.log.debug("RuleEngine.processScenario - toAddAllList_:["+u(o)+"]"),e.log.debug("RuleEngine.processScenario - toRemoveAllList_:["+u(s)+"]"),e.log.debug("RuleEngine.processScenario - toAddJoinList_:["+u(a)+"]"),e.log.debug("RuleEngine.processScenario - toRemoveJoinList_:["+u(p)+"]"),e.log.debug("RuleEngine.processScenario - incAddList :["+u(V)+"]"),e.log.debug("RuleEngine.processScenario -----------------------------------------------"),f=e.findAltPaths(o,s,p,V),h+=f.message,e.log.debug("RuleEngine.processScenario - toAddAllList_:["+u(o)+"]"),f.altGrExist){g=c(!1,522,h,{});var W=f.altGrList;e.log.debug("RuleEngine.processScenario - altGrList_:["+u(W)+"]");for(b=0;b<W.length;b++){var U=W[b];e.log.debug("RuleEngine.processScenario - altGr_:["+u(U)+"]");var G=o.union(U);e.log.debug("RuleEngine.processScenario - PRE - alt scenario - add:["+u(G)+"] remove:["+u(s)+"]"),s=s.difference(G).union(s.intersection(V)),e.log.debug("RuleEngine.processScenario - POST - alt scenario - add:["+u(G)+"] remove:["+u(s)+"]"),G=G.difference(e.configurazione),e.log.debug("RuleEngine.processScenario - POST2 - alt scenario - add:["+u(G)+"] remove:["+u(s)+"]"),v.push({addList:G,removeList:s}),g=c(!0,210,h,[],[],[],[],v)}}else{f.solvedTargetList_.nonempty()&&(e.log.debug("RuleEngine.processScenario - solvedTargetList_ :["+u(f.solvedTargetList_)+"]"),s=s.difference(f.solvedTargetList_),e.log.debug("RuleEngine.processScenario - toRemoveAllList_ :["+u(s)+"]")),e.log.debug("RuleEngine.processScenario - alreadySolvedTargetAltGroupNodeList :["+u(f.alreadySolvedTargetAltGroupNodeList)+"]");var z=o.union(f.alreadySolvedTargetAltGroupNodeList);e.log.debug("RuleEngine.processScenario - PRE - alt scenario - add:["+u(z)+"] remove:["+u(s)+"]"),s=s.difference(z).union(s.intersection(V)),e.log.debug("RuleEngine.processScenario - POST - alt scenario - add:["+u(z)+"] remove:["+u(s)+"]"),z=z.difference(e.configurazione),v.push({addList:z,removeList:s}),g=c(!0,200,h,[],[],[],[],v)}return e.log.debug("RuleEngine.processScenario - me_.tassativi:["+u(e.tassativi)+"]"),e.log.debug("RuleEngine.processScenario - me_.tiedStdMandNodeList:["+u(e.tiedStdMandNodeList)+"]"),d(v),g},e.processRuleMaxIter=function(t,n){"use strict";var r=[],i=[];for(r.push(t);r.length>0&&n>0;){var o=r.pop(),a=e.ruleNodeList(o.addList,o.removeList,!1);if(a&&a.data&&a.data.scenarios){var s=a.data.scenarios;if(0==s.length);else if(1==s.length)i.push(s[0]);else{for(var l=0;l<s.length;l++)r.push(s[l]);n--}n<=0&&e.loopScenarios.push(s)}}return i},e.processRuleActResMaxIterDepth=function(t,n,r,i){"use strict";var o=0,a=[],s=l(),c=l(),d=[];for(a.push({Scenario:t,Depth:o}),e.log.debug(" --- DEPTH - "+o+" --- START SCENARIO :toAddList:["+u(t.addList)+"] toRemoveList:["+u(t.removeList)+"]");a.length>0&&n>0;){var p=a.pop();o=p.Depth+1;var f=e.ruleNodeList(p.Scenario.addList,p.Scenario.removeList,i);if(f&&f.data&&f.data.scenarios){var h=f.data.scenarios;if(0===h.length)c.success=f.success,c.code=f.code,c.message=f.message;else if(1===h.length){e.insertIdAddList(d,h[0].addList)||(s.success=f.success,s.code=f.code,s.message=f.message,s.data.scenarios.push(h[0]),s.data.extra=f.data.extra)}else{for(var g=0;g<h.length;g++)o<=r&&a.push({Scenario:h[g],Depth:o});n--}}}return 0===s.data.scenarios.length&&(s=c),s},e.getStdScenarios=function(t,n,i){"use strict";for(var o=t,a=function(t,n,r,i){var o=null;switch(n.id()){case"ME_C":var a=e.cyto.getElementById("ME_I").outgoers("edge[type='E']").targets().intersection(i);if(a.nonempty()){var s=a[0];if(s.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var l=r.difference(t),c=s.outgoers("edge[type='I']").targets(),u=l.intersection(c),d=l.difference(u);d.nonempty()&&(o=d[0])}}break;case"ME_I":var p=e.cyto.getElementById("ME_C").outgoers("edge[type='E']").targets().intersection(i);if(p.nonempty()){var f=p[0];if(f.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var h=r.difference(t),g=f.outgoers("edge[type='I']").targets(),v=h.intersection(g),m=h.difference(v);m.nonempty()&&(o=m[0])}}break;default:if(i.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var y=r.difference(t),b=i.outgoers("edge[type='I']").targets(),C=y.intersection(b),x=y.difference(C);x.nonempty()&&(o=x[0])}}return o},s=[],l=[],c=[],d=0;d<o.data.scenarios.length;d++){var p=o.data.scenarios[d],f=!0,h=!1,g=p.removeList,v=p.addList;if(g.size()>0)for(var m=0;m<g.size()&&f;m++)for(var y=g[m],b=y.incomers("edge[type='E']"),C=0;C<b.size();C++){var x=b[C].source();if("ME_K"!==x.id()&&"ME_J"!==x.id()){e.log.debug("RuleEngine.getStdScenarios - toRemNode_:["+u(y)+"] ");var E=x.outgoers("edge[type='E']").targets();if(E.intersection(v).empty())if(h=!0,y.data().isStandard){var S=E.difference(y);if(e.log.debug("RuleEngine.getStdScenarios - nonStdNodeList_:["+u(S)+"] "),S.forEach((function(t){var n=e.processScenario(v.union(t),i);if(n.success)for(var r=0;r<n.data.scenarios.length;r++){e.insertIdAddList(c,n.data.scenarios[r].addList)||l.push(n.data.scenarios[r])}})),0===l.length){s.push(d);var w=582,V="It is not possible to add Options ["+u(S)+"] in removing of STD Option of the same family",R={nonStdList:r.map(E.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}}else{var O=e.getStdExcFromNode(x);e.log.debug("RuleEngine.getStdScenarios - stdExNode_:["+u(O)+"] ");var A=a(O,x,E,v);if(A){var k=e.processScenario(v.union(A),i);if(!k.success){s.push(d);w=584,V="It is not possible to add Candidate Option {"+A.id()+"} ",R={nonStdList:r.map(E.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}for(D=0;D<k.data.scenarios.length;D++){e.insertIdAddList(c,k.data.scenarios[D].addList)||l.push(k.data.scenarios[D])}}else{var T=e.processScenario(v.union(O),i);if(!T.success){s.push(d);var w=580,V="It is not possible to add STD Option {"+O.id()+"} ",R={nonStdList:r.map(E.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}for(var D=0;D<T.data.scenarios.length;D++){e.insertIdAddList(c,T.data.scenarios[D].addList)||l.push(T.data.scenarios[D])}}}}}h||l.push(p)}return s.length>0&&l.length<=1&&(o.success=!1,o.code=w,o.message=V,o.data.extra=R),o.data.scenarios=l,o},e.processNode=function(t){"use strict";var n,r,i,o,a,s;if(e.log.debug("RuleEngine.processNode - begin"),o={},a="",s=l(),n=(n=e.cyto.collection()).union(t),t.hasClass("highlighted")){var d=e.getNodiIncompatibiliConSelezionati(t);return a=a+" - Node {"+t.id()+"} ",d.forEach((function(e,t){a=a+" is incompatibile with: ["+u(e)+"] "})),s=c(!1,501,a,[],[],[],d)}if((r=e.getNodiVincolati(t,n)).size()>0&&(a=a+" - Option {"+u(n)+"} constraints ["+u(r)+"}",n=n.union(r)),a=a+" - To be evaluated ["+u(n)+"]",i=e.verificaAlternativi(t,n,!1),a+=i.message,i.altGrExist)s=c(!1,502,a,[],[],i.altGrList,[]);else if(t.hasClass("selected")){var p=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(t,n);n=p.selection,a+=p.message;for(var f=0;f<n.length;f++){var h=n[f];if(e.vincolantiInConfig(t,h,!1).nonempty())return a=a+" - Option {"+h.id()+"} is bound by an Option in Configuration)",s=c(!1,501,a,{})}n.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]'),i=n.intersection(r);e.cyto.remove(i),t.removeClass("selected")})),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.cyto.elements().removeClass("highlighted"),a=a+" - Options ["+u(n)+"] have been removed from configuration",s=c(!0,211,a,[],n,[],[])}else{var g=e.getNodiIncompatibiliConSelezionati(n);g.size>0?(g.forEach((function(e,t){a=a+" - Option {"+t+"} is incompatible with ["+u(e)+"]"})),s=c(!1,501,a,[],[],[],g)):(e.configurazione=e.configurazione.union(n),n.addClass("selected"),n.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),o.incompatibiliConSelezionato=[],a=a+" - Options ["+u(n)+"] have been added to configuration",s=c(!0,201,a,n,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),e.log.debug("RuleEngine.processNode - end"),s},e.checkProcessNode=function(t){"use strict";var n,r,i,o,a,s;if(e.log.debug("RuleEngine.checkProcessNode"),o={},a="",s=l(),n=(n=e.cyto.collection()).union(t),(r=e.getNodiVincolati(t,n)).size()>0&&(a=a+" - Option {"+u(n)+"} costraints ["+u(r)+"]",n=n.union(r)),a=a+" - To be evaluate ["+u(n)+"]",i=e.verificaAlternativi(t,n,!0),a+=i.message,i.altGrExist)s=c(!1,502,a,o);else if(t.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(t,n);n=d.selection,a+=d.message;for(var p=0;p<n.length;p++){var f=n[p];if(e.vincolantiInConfig(t,f,!0).nonempty())return a=a+" - Option {"+f.id()+"} is bound by an Option in Configuration",s=c(!1,501,a,{})}n.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]');n.intersection(r)})),e.checkConfigurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),a=a+" - Should remove ["+u(n)+"]",s=c(!0,211,a,[],n,[],[])}else{var h=e.getNodiIncompatibiliConSelezionati(n);h.size>0?(h.forEach((function(e,t){a=a+" - Option ( "+t+") is incompatible with ["+u(e)+"]"})),s=c(!1,501,a,[],[],[],h)):(e.checkConfigurazione=e.checkConfigurazione.union(n),a=a+" - Should add ["+u(n)+"]",s=c(!0,201,a,n,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),s},e.addNode=function(t){"use strict";var n,r,i,o,a;if({},o="",a=l(),e.log.debug("RuleEngine.addNode :["+t.id()+"]"),n=(n=e.cyto.collection()).union(t),t.hasClass("selected"))return e.log.debug("RuleEngine.addNode - il nodo {"+t.id()+"} è già in configurazione "),o=o+" - Option {"+t.id()+"} is already in Configuration",a=c(!1,501,o,{});if(t.hasClass("highlighted")){var s=e.getNodiIncompatibiliConSelezionati(t);return o=o+" - Option {"+t.id()+"} ",s.forEach((function(e,t){o=o+" is incompatibile with ["+u(e)+"] "})),a=c(!1,501,o,[],[],[],s)}if((r=e.getNodiVincolati(t,n)).size()>0&&(o=o+" - Option {"+u(n)+"} costraints ["+u(r)+"]",n=n.union(r)),o=o+" - To be evaluate [ "+u(n)+"]",i=e.verificaAlternativi(t,n,!1),o+=i.message,i.altGrExist)a=c(!1,502,o,[],[],i.altGrList,[]);else{var d=e.getNodiIncompatibiliConSelezionati(n);d.size>0?(d.forEach((function(e,t){o=o+" - Option { "+t+"} is incompatible with {"+u(e)+"}"})),a=c(!1,501,o,[],[],[],d)):(e.configurazione=e.configurazione.union(n),n.addClass("selected"),n.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),o=o+" - Options added [ "+u(n)+"]",a=c(!0,201,o,n,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),a},e.checkAddNode=function(t){"use strict";var n,r,i,o,a;if(e.log.debug("RuleEngine.checkAddNode"),{},o="",a=l(),n=(n=e.cyto.collection()).union(t),t.intersection(e.checkConfigurazione).nonempty())return e.log.debug("RuleEngine.addNode - Option {"+t.id()+"} is already in configuration "),o=o+" - Option {"+t.id()+"} is already in configuration",a=c(!1,501,o,{});if(t.hasClass("highlighted")){var s=e.getNodiIncompatibiliConSelezionati(t);return o=o+" - Option {"+t.id()+"} ",s.forEach((function(e,t){o=o+" is incompatible with {"+u(e)+"} "})),a=c(!1,501,o,[],[],[],s)}if((r=e.getNodiVincolati(t,n)).size()>0&&(o=o+" - Option {"+u(n)+"} costraints Options ["+u(r)+"]",n=n.union(r)),o=o+" - To be evaluate: ( "+u(n)+" )",i=e.verificaAlternativi(t,n,!0),o+=i.message,i.altGrExist)a=c(!1,502,o,[],[],i.altGrList,[]);else{var d=e.getNodiIncompatibiliConSelezionati(n);d.size>0?(d.forEach((function(e,t){o=o+" - Option ( "+t+") is incompatible with Options ["+u(e)+"]"})),a=c(!1,501,o,[],[],[],d)):(e.checkConfigurazione=e.checkConfigurazione.union(n),o=o+" - Should add ( "+u(n)+")",a=c(!0,201,o,n,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),a},e.removeNode=function(t){"use strict";var n,r,i,o,a,s;if(e.log.debug("RuleEngine.removeNode"),o={},a="",s=l(),n=(n=e.cyto.collection()).union(t),!t.hasClass("selected"))return e.log.debug("RuleEngine.removeNode - Option {"+t.id()+"} is NOT in Configuration "),a=a+" - Option {"+t.id()+"} is NOT in Configuration",s=c(!1,501,a,{});if((r=e.getNodiVincolati(t,n)).size()>0&&(a=a+" - Option "+u(n)+" constraints Options ["+u(r)+"]",n=n.union(r)),a=a+" - To be evaluate ["+u(n)+"]",a+=(i=e.verificaAlternativi(t,n,!1)).message,i.altGrExist)s=c(!1,502,a,o);else if(t.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(t,n);n=d.selection,a+=d.message;for(var p=0;p<n.length;p++){var f=n[p];if(e.vincolantiInConfig(t,f,!1).nonempty())return a=a+" Option {"+f.id()+"} is bound by an Option in Configuration",s=c(!1,501,a,{})}n.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]'),i=n.intersection(r);e.cyto.remove(i),t.removeClass("selected")})),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.cyto.elements().removeClass("highlighted"),a=a+"rimossi: ( "+u(n)+")",s=c(!0,211,a,[],n,[],[])}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),s},e.checkRemoveNode=function(t){"use strict";var n,r,i,o,a,s;if(e.log.debug("RuleEngine.removeNode"),o={},a="",s=l(),n=(n=e.cyto.collection()).union(t),!t.hasClass("selected"))return e.log.debug("RuleEngine.removeNode - Option {"+t.id()+"} is NOT in Configuration "),a=a+" - Option {"+t.id()+"} is NOT in Configuration ",s=c(!1,501,a,{});if((r=e.getNodiVincolati(t,n)).size()>0&&(a=a+" - Option "+u(n)+" constraints Options ["+u(r)+"]",n=n.union(r)),a=a+" - To be evaluate: ( "+u(n)+" )",a+=(i=e.verificaAlternativi(t,n,!0)).message,i.altGrExist)s=c(!1,502,a,o);else if(t.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(t,n);n=d.selection,a+=d.message;for(var p=0;p<n.length;p++){var f=n[p];if(e.vincolantiInConfig(t,f,!0).nonempty())return a=a+" - Option {"+f.id()+"} is bound by an Option in Configurazion)",s=c(!1,501,a,{})}e.checkConfigurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),a=a+" - Should remove Option { "+u(n)+"}",s=c(!0,211,a,[],n,[],[])}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),s},e.getTiedToList=function(t,n){"use strict";var r,i;r="",i={};for(var o=function(n){for(var r=function(n){for(var r=n.incomers("edge[type='V']").sources(),i=n.incomers("edge[type='A']").sources(),o=r.union(i),a=n.union(o).intersection(e.configurazione),s=0;s<i.length;s++){var l=i[s];e.log.debug("RuleEngine.getTiedToList - altNode_:["+l.id()+"]"),l.outgoers("edge[type='A']").targets().intersection(t).nonempty()&&(a=a.difference(l))}return a},i=0,o=r(n);o.size()>i;)i=o.size(),o=r(o);return o},a=e.cyto.collection(),s=0;s<n.length;s++){var l=n[s],c=o(l);(c=c.difference(n)).nonempty()&&(e.log.debug("RuleEngine.getTiedToList - vincolantiInConfig_:["+u(c)+"]"),r=r+" - Option {"+l.id()+"} is bound by ["+u(c)+"] in Configuration ",a=a.union(c))}return i.message=r,i.tiedToList=a,i},e.getNodiVincolati=function(e,t){"use strict";var n,r;for(r=(r=(r=(n=e.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(t)).difference(n);r.size()>0;)r=(r=(r=(n=n.union(r)).outgoers("edge[type='V']").targets()).difference(t)).difference(n);return n.nonempty(),n},e.getVincolatiDiretti=function(e){"use strict";var t,n;for(n=(n=(n=(t=e.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(e)).difference(t);n.size()>0;)n=(n=(n=(t=t.union(n)).outgoers("edge[type='V']").targets()).difference(e)).difference(t);return t.nonempty(),t},e.getVincolatiDiretti_=function(t){"use strict";var n,r;for(r=(r=(n=t.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(e.configurazione.union(t));r.difference(n).nonempty();)r=n.outgoers("edge[type='V']").targets(),(n=(r=r.difference(e.configurazione)).union(n)).nonempty();return n=n.difference(e.configurazione)},e.verificaEsclusivi=function(t,n){"use strict";var r;r={},e.log.debug("RuleEngine.verificaEsclusivi - initNode:["+t.id()+"] - evalSelection:["+u(n)+"]");var i=n.incomers("edge[type='E']");if(e.log.debug("RuleEngine.verificaEsclusivi - Archi Esclusivi :["+u(i)+"]"),i.nonempty()){var o=i.sources();e.log.debug("RuleEngine.verificaEsclusivi - Gruppi Alternativi :["+u(o)+"]");for(var a=0;a<o.length;a++){var s=o[a].outgoers("edge[type='E']").targets().filter((function(e){if(e.hasClass("selected"))return e}));e.log.debug("RuleEngine.verificaEsclusivi - initNode:["+t.id()+"] - excSelectedNodeList_:["+u(s)+"]"),1!==s.size()||t.hasClass("selected")||s[0].removeClass("selected")}}return r.message="",e.log.debug("RuleEngine.verificaEsclusivi - result message:[]"),r},e.findAltPaths=function(t,n,r,i){"use strict";var o,a;o="",(a={}).altGrExist=!1,a.altGrList=[],a.solvedTargetList_=e.cyto.collection(),a.alreadySolvedTargetAltGroupNodeList=e.cyto.collection();var s=t.outgoers("edge[type='A']");if(s.size()>0){var l=s.targets();e.log.debug("RuleEngine.findAltPaths - Gruppi Alternativi :["+u(l)+"]");for(var c=s.sources(),d=e.cyto.collection(),p=e.cyto.collection(),f=0;f<c.length;f++){var h=!1,g=c[f],v=g.outgoers("edge[type='A']");e.log.debug("RuleEngine.findAltPaths -----------------------------------------------"),e.log.debug("RuleEngine.findAltPaths - targetAltEdgeList_ :["+v.size()+"] di sourceAltNode_:["+u(g)+"]"),e.log.debug("RuleEngine.findAltPaths - me_.configurazione :["+u(e.configurazione)+"]"),e.log.debug("RuleEngine.findAltPaths - toAddList :["+u(t)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveList :["+u(n)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveJoinList :["+u(r)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveList.difference(toRemoveJoinList) :["+u(n.difference(r))+"]"),e.log.debug("RuleEngine.findAltPaths - incAddList :["+u(i)+"]");var m=t.union(e.configurazione.difference(n).difference(i));e.log.debug("RuleEngine.findAltPaths - toAddAllConfigList_ :["+u(m)+"]");for(var y=0;y<v.length;y++){var b=v[y].target();e.log.debug("RuleEngine.findAltPaths - isSolved Test targetAltNode_ :["+u(b)+"] - targetAltNodeList_:["+u(C)+"] - toRemoveList:["+u(n)+"]");var C=e.cyto.collection();C="AG"===b.data().type?C=b.outgoers("edge[type='V']").targets():b,m.contains(C)&&C.intersection(i).empty()&&(h=!0,e.log.debug("RuleEngine.findAltPaths - isSolved TRUE targetAltNode_ :["+u(b)+"] - targetAltNodeList_:["+u(C)+"] - toRemoveList:["+u(n)+"]"),r.contains(C)&&(p=p.union(C),e.log.debug("RuleEngine.findAltPaths - solvedTargetList_ :["+u(C)+"]")),"AG"===b.data().type&&(a.alreadySolvedTargetAltGroupNodeList=a.alreadySolvedTargetAltGroupNodeList.union(b))),e.log.debug("RuleEngine.findAltPaths - isSolved Test targetAltNode_ :["+u(b)+"] - ["+h+"]")}a.solvedTargetList_=p,h||(d=d.add(g),e.log.debug("RuleEngine.findAltPaths - sourceRemainAltNodeList_ :["+u(d)+"] di sourceAltNode_:["+u(g)+"]")),e.log.debug("RuleEngine.findAltPaths -----------------------------------------------")}if(d.nonempty()){for(f=0;f<d.length;f++){var x=d[f],E=x.outgoers("edge[type='A']").targets();o=o+" - Option {"+x.id()+"} binds alternatively Options ";for(y=0;y<E.length;y++){var S=E[y],w=S.outgoers("edge[type='V']").targets();w=w.union(w.outgoers("edge[type='V']").targets()),o=o+" ("+u(S)+" ["+u(w)+"]) ";var V=e.cyto.collection();V=S.union(w),e.log.debug("RuleEngine.findAltPaths - altGrElement_ :["+u(V)+"] - toRemoveList :["+u(n)+"] - intersection :["+u(V.intersection(n))+"]"),V.intersection(i).empty()?a.altGrList.push(V):o=o+" - Options ["+u(V.intersection(i))+"] are incompatibles with needed selection from ("+x.id()+") "}}a.altGrExist=!0}}return a.message=o,e.log.debug("RuleEngine.findAltPaths - result message:["+o+"]"),a},e.verificaAlternativi=function(t,n,r){"use strict";var i,o;i="",(o={}).altGrExist=!1,o.altGrList=[];var a=r?e.checkConfigurazione:e.configurazione,s=n.outgoers("edge[type='A']");if(s.size()>0){var l=s.targets();e.log.debug("RuleEngine.verificaAlternativi - Gruppi Alternativi :["+u(l)+"]");for(var c=s.sources(),d=e.cyto.collection(),p=0;p<c.length;p++){var f=!1,h=c[p],g=h.outgoers("edge[type='A']");e.log.debug("RuleEngine.verificaAlternativi - targetAltEdgeList_ :["+u(g)+"] di sourceAltNode_:["+u(h)+"]");for(var v=0;v<g.length;v++){g[v].target().intersection(a).nonempty()&&(f=!0)}f||(d=d.add(h),e.log.debug("RuleEngine.verificaAlternativi - sourceRemainAltNodeList_ :["+u(d)+"] di sourceAltNode_:["+u(h)+"]"))}if(d.nonempty()&&!t.hasClass("selected")){for(p=0;p<d.length;p++){var m=d[p].outgoers("edge[type='A']").targets();i=i+" - Option { "+t.id()+" } binds alternatively Options ";for(v=0;v<m.length;v++){var y=m[v];if(y===t)return i=" "+u(y)+" auto-resolve selection",o.altGrExist=!1,o.altGrList=[],o;var b=y.outgoers("edge[type='V']").targets();i=i+" ("+u(y)+" ["+u(b)+"]) ";var C;C=y.union(b),o.altGrList.push(C)}}o.altGrExist=!0}}return o.message=i,""!==i&&e.log.debug("RuleEngine.verificaAlternativi - result message:["+i+"]"),o},e.getNodiIncompatibiliConSelezionati=function(t){"use strict";var n,r,i,o,a,s,l;n=new Map;for(var c=0;c<t.size();c++){var u=t[c];s=[],o=e.configurazione.intersection(u.outgoers("edge[type='I']").targets()),a=e.configurazione.intersection(u.incomers("edge[type='I']").sources()),l=e.configurazione.intersection(e.getEsclusivi(u)),(s=o.union(a).union(l)).size()>0&&(r=u.id(),i=s,n.set(r,i))}return n},e.getNodiIncompatibiliConSelezioneCorrente=function(t){"use strict";var n,r;return[],n=e.configurazione.intersection(t.outgoers("edge[type='I']").targets()),r=e.configurazione.intersection(t.incomers("edge[type='I']").sources()),n.union(r)},e.getNodiIncompatibiliConConfig=function(){"use strict";var t,n,r,i;return t=[],n=e.configurazione.outgoers("edge[type='I']").targets(),r=e.configurazione.incomers("edge[type='I']").sources(),t=n.union(r),i=e.getEsclusiviDaConfig(),t=t.union(i)},e.getNodiIncompatibili=function(t){"use strict";var n,r,i,o;return n=e.cyto.collection(),r=e.cyto.collection(),e.cyto.collection(),e.cyto.collection(),r=t.outgoers("edge[type='I']").targets(),i=t.incomers("edge[type='I']").sources(),n=r.union(i),o=e.getEsclusivi(t),n=n.union(o)},e.getIncSelectionMap=function(t,n){"use strict";var r,i,o,a,s,l,c;r=new Map;for(var u=0;u<t.size();u++){var d=t[u];l=[],a=n.intersection(d.outgoers("edge[type='I']").targets()),s=n.intersection(d.incomers("edge[type='I']").sources()),c=n.intersection(e.getExcFromNode(d)),(l=a.union(s).union(c)).size()>0&&(i=d.id(),o=l,r.set(i,o))}return r},e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati=function(e,t){"use strict";var n,r;n="",(r={}).selection=t;var i=t.incomers("edge[type='A']").sources();return i.hasClass("selected")&&(n=n+" - Option {"+e.id()+"} is bound by Options ["+u(i)+"]",r.selection=t.union(i)),r.message=n,r},e.getStdExcFromNode=function(t){"use strict";var n,r;n=null,r=t.outgoers("edge[type='E']").targets();for(var i=0;i<r.length;i++)r[i].data().isStandard&&(n=r[i]);return e.log.debug("RuleEngine.getStdExcFromNode - standard_:["+u(n)+"]"),n},e.getExcFromNode=function(t){"use strict";var n,r,i;n=e.cyto.collection(),r=t.incomers("edge[type='E']");for(var o=0;o<r.size();o++)i=r[o].source().outgoers("edge[type='E']").targets().difference(t),n=n.union(i);return n.nonempty()&&e.log.debug("RuleEngine.getExcFromNode - Esclusivi all:["+u(n)+"]"),n},e.getEsclusiviDaConfig=function(){var t;t=e.cyto.collection();var n=e.configurazione.incomers("edge[type='E']");if(n.nonempty()){for(var r=0;r<n.length;r++){var i=n[r].source(),o=i.outgoers("edge[type='E']").targets(),a=n[r].target();e.log.debug("RuleEngine.getEsclusiviDaConfig - Gruppo Esclusivo :["+i.id()+"] - Nodi Esclusivi del Gruppo :["+u(o)+"] - Nodo Esclusivo :["+a.id()+"]"),t=t.union(o.difference(a))}e.log.debug("RuleEngine.getEsclusiviDaConfig - Esclusivi:["+u(t)+"]")}return t},e.getEsclusivi=function(t){var n;n=e.cyto.collection();var r=t.incomers("edge[type='E']");if(r.nonempty()){for(var i=0;i<r.length;i++){var o=r[i].source().outgoers("edge[type='E']").targets(),a=r[i].target();n=n.union(o.difference(a))}e.log.debug("RuleEngine.getEsclusivi - Esclusivi:["+u(n)+"]")}return n},e.vincolantiInConfig=function(t,n,r){"use strict";var i=r?e.checkConfigurazione:e.configurazione;e.cyto.collection();return n.incomers("edge[type='V'],edge[type='A']").sources().intersection(i).difference(t)},e.getVincolantiDaConfig=function(t){"use strict";e.cyto.collection();return t.incomers("edge[type='V'],edge[type='A']").sources().intersection(e.configurazione)},e.getVincolantiConfigIterMax_=function(t,n){"use strict";var r=e.cyto.collection(),i=t.incomers("edge[type='V'],edge[type='A']").sources();r=r.union(i).intersection(e.configurazione);for(var o=n;o>0;o--)i=r.incomers("edge[type='V'],edge[type='A']").sources(),r=r.union(i).intersection(e.configurazione);return r},e.getVincolantiConfigIterMax=function(t){"use strict";var n,r,i;for(n=e.cyto.collection(),i=0,r=t.incomers("edge[type='V'],edge[type='A']").sources(),n=n.union(r).intersection(e.configurazione);n>i;)i=n.size(),r=n.incomers("edge[type='V'],edge[type='A']").sources(),n=n.union(r).intersection(e.configurazione);return n},e.getVincolantiDirettiDaConfig=function(t){"use strict";e.cyto.collection();return t.incomers("edge[type='V']").sources().intersection(e.configurazione)},e.getVincolantiAltDaConfig=function(t){"use strict";e.cyto.collection();return t.incomers("edge[type='A']").sources().intersection(e.configurazione)},e.addDtoPReturnEdge=function(){"use strict";const t={success:!1,data:[]};try{if("xP"===e.dtype){e.log.debug("RuleEngine.addDtoPReturnEdge ");const n=e.cyto.getElementById("ME_W").outgoers("edge[type='E']").targets();s(n).forEach((function(n){const r=e.cyto.getElementById(n),i=!(!r||!r.data().isStandard);if(n.startsWith("8-")&&n.endsWith("D")&&!i){const i=r.incomers("edge[type='V']").sources().filter((function(e){if(e.id().endsWith("P"))return e}));if(1===i.size()){const r=i[0].id();if(r.endsWith("P")){e.cyto.add([{group:"edges",data:{source:n,target:r,type:"V"}}]);t.success=!0,t.data.push(n)}}}}))}}catch(t){e.log.warn(e.apiName+"RuleEngine.addDtoPReturnEdge Warn")}return t},e.uEAE=function(){"use strict";e.log.debug("RuleEngine.unsetExhaustiveAltEdges - begin");const t=function(e,t){return JSON.stringify(e)===JSON.stringify(t.rvTrg)},n=function(e,n){let r={success:!1,data:[]},i=!1;for(let o in n){const a=n[o];let s=!1;for(let n=0;n<a.length;n++){const i=a[n];if(t(e,i)){const e={fc:o,gac:i.ga};r.data.push(e),s=!0;break}}if(!s){i=!1;break}i=!0}return r.success=i,r},r=function(t,n){return e.cyto.getElementById(t).edgesTo(e.cyto.getElementById(n))};try{if("xF"===e.dtype){let t=function(){const t={};try{(function(){const t=e.cyto.getElementById("ME_J").outgoers("edge[type='E']").targets(),n=e.cyto.getElementById("ME_I").outgoers("edge[type='E']").targets(),r=e.cyto.getElementById("ME_K").outgoers("edge[type='E']").targets(),i=e.cyto.getElementById("ME_J").outgoers("edge[type='E']").targets();let o=e.cyto.elements("node[type='ME']");return t.size()!==n.size()&&(o=o.difference(e.cyto.getElementById("ME_J"))),r.size()!==i.size()&&(o=o.difference(e.cyto.getElementById("ME_K"))),o})().forEach((function(n){const r=n.outgoers("edge[type='E']").targets(),i=n.id();t[i]={},e.log.debug("RuleEngine.unsetExhaustiveAltEdges - meNode:["+u(n)+"]"),r.forEach((function(n){const o=n.id();t[i][o]=[];const a=n.incomers("edge[type='V']");if(a.nonempty()){const n=a.sources("node[type='AG']");if(n.nonempty())for(let o=0;o<n.length;o++){const a=n[o],l=a.id();let c=a.outgoers("edge[type='V']").targets();const u=r.intersection(c),d=u.id();t[i][d]||(t[i][d]=[]);const p={ga:l,rvTrg:s(c.difference(u)).sort()};t[i][d].push(p),e.log.debug("RuleEngine.unsetExhaustiveAltEdges - gaRelAltStruct_:["+JSON.stringify(t,null,2)+"]")}}}))}))}catch(t){e.log.warn(e.apiName+"RuleEngine.unsetExhaustiveAltEdges Warn")}return t}();for(let i in t)if(Object.keys(t[i]).length>0){const o=Object.keys(t[i]),a=t[i][o[0]];for(let o=0;o<a.length;o++){const s=n(a[o].rvTrg,t[i]);if(s.success){const t=s.data;for(let n=0;n<t.length;n++){const i=r(t[n].gac,t[n].fc);i&&(e.exhauEdgesRemoved=e.exhauEdgesRemoved.union(e.cyto.remove(i)))}}}}!function(){const t=e.tassativi.incomers("edge[type='V']");e.exhauEdgesRemoved=e.exhauEdgesRemoved.union(e.cyto.remove(t))}()}}catch(t){e.log.warn(e.apiName+"RuleEngine.unsetExhaustiveAltEdges Warn")}e.log.debug("RuleEngine.unsetExhaustiveAltEdges - end")};var t=function(t,n){"use strict";var r=e.cyto.collection(),i=e.cyto.collection();let o=function(r,i){return r&&"+"===i.Op&&(!e.configurazione.contains(r)&&!t.contains(r)||n.contains(r))},a=function(r,i){return r&&"-"===i.Op&&(e.configurazione.contains(r)||t.contains(r))&&!n.contains(r)};if("xP"===e.dtype&&e.AndRules)for(var s=0;s<e.AndRules.length;s++){var l=e.AndRules[s],c=e.cyto.getElementById(l.Cod);if(c&&"D"===l.Cod.slice(-1))for(var u=0;u<l.RNums.length;u++){for(var d=!0,p=l.RNums[u].Rules,f=0;f<p.length&&d;f++)if((w=p[f]).Op&&w.Cod){var h=e.cyto.getElementById(w.Cod);c&&h&&w.Cod&&w.Op?d=!(!h||"+"!==w.Op||!e.configurazione.contains(h)&&!t.contains(h)||n.contains(h))||!(!h||"-"!==w.Op||(e.configurazione.contains(h)||t.contains(h))&&!n.contains(h)):e.log.warn("RuleEngine.processScenario - .testChange - Invalid AND type rule WARN")}if(d)r=r.union(c);else if(e.configurazione.contains(c)){var g=c.incomers("edge[type='V']").sources();g=g.intersection(e.configurazione);var v=c.incomers("edge[type='A']").sources();v=v.intersection(e.configurazione),g.empty()&&v.empty()&&(i=i.union(c))}}if(c&&("P"===l.Cod.slice(-1)||"X"===l.Cod.slice(-1))){let s=[];var m=!1,y=!1;let d=0;for(u=0;u<l.RNums.length;u++){var b=!1,C=(p=l.RNums[u].Rules,e.cyto.collection()),x=e.cyto.collection();for(f=0;f<p.length;f++)(w=p[f]).Op&&w.Cod&&(h=e.cyto.getElementById(w.Cod),c&&h&&w.Cod&&w.Op?o(h,w)?(b=!0,C=C.union(h)):a(h,w)&&(b=!0,x=x.union(h)):e.log.warn("RuleEngine.processScenario - .testChange - Invalid AND type rule WARN"));b&&d++,b&&e.configurazione.contains(c)?1===l.RNums.length&&(y=!0):b&&!e.configurazione.contains(c)&&t.contains(c)&&(m=!0)}if(y&&(i=i.union(c)),m){for(var E=0;E<l.RNums.length;E++){var S=!0;const r=l.RNums[E].Rules;for(f=0;f<r.length;f++){var w;if((w=r[f]).Op&&w.Cod)if(h=e.cyto.getElementById(w.Cod),c&&h&&w.Cod&&w.Op)if(h&&"+"===w.Op&&(e.configurazione.contains(h)||t.contains(h))&&!n.contains(h))S=!0;else{if(!h||"-"!==w.Op||(e.configurazione.contains(h)||t.contains(h))&&!n.contains(h)){S=!1;break}S=!0}else e.log.warn("RuleEngine.processScenario - .testChange - Invalid AND type rule WARN")}if(S){const e={Rank:0};e.ruleListSel=r,s.push(e)}}0===s.length&&(i=i.union(x),r=r.union(C))}}}var V={};return V.toAddAndList=r,V.toRemoveAndList=i,V},n=function(t,n){"use strict";var r=!1,i=e.pct100List.intersection(n);if(i.nonempty())for(var o=0;o<i.length;o++){var a=i[o];r=!0;var s=e.getCodClass(a.id());if(s)if(-1!==e.getCodClassByNodeList(t).indexOf(s)){r=!1;break}}return r},o=function(t){"use strict";e.configurazione=e.configurazione.union(t),t.addClass("selected"),t.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig()},a=function(t){"use strict";e.configurazione=e.configurazione.difference(t),t.removeClass("selected"),t.forEach((function(t){e.cyto.remove("edge[source='config'][target='"+t.id()+"']")})),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig()};e.insertIdAddList=function(t,n){var r=e.getIdList(n).sort();this.compareOrdIdList=function(e,t){if(e.length<t.length)return 1;if(e.length>t.length)return-1;for(var n=0;n<e.length;n++){var r=t[n].localeCompare(e[n]);if(0!==r)return r}return 0};var i=!1;if(t[r.length]&&0!==t[r.length].length){for(var o=t[r.length],a=0,s=o.length-1,l=0,c=this.compareOrdIdList(o[l],r);a<=s&&!i;)switch(l=parseInt(a+(s-a)/2,10),c=this.compareOrdIdList(o[l],r)){case 0:i=!0;break;case-1:s=l-1;break;case 1:a=l+1}if(!i){var u=1===c?l+1:l;o.splice(u,0,r)}return i}for(var d=0;d<r.length;d++)void 0===t[d]&&(t[d]=[]);return t[r.length]=[],t[r.length].push(r),i};const s=function(e){return r.map(e,(function(e){return e.id()}))};e.getNodeList=function(t){"use strict";for(var n=e.cyto.collection(),r=0;r<t.length;r++){var i=e.cyto.getElementById(t[r]);i&&(n=n.union(i))}return n},e.getIdList=function(e){"use strict";for(var t=[],n=0;n<e.size();n++){var r=e[n].id();r&&t.push(r)}return t},e.getCod=function(e){"use strict";var t=null;try{t=e.split("-")[1]?e.split("-")[1]:null}catch(e){}return t},e.getCodClass=function(e){"use strict";var t=null;try{t=e.split("-")[1]?e.split("-")[1].substr(0,3):null}catch(e){}return t},e.getCodClassByNodeList=function(e){"use strict";for(var t=[],n=0;n<e.size();n++){var r=e[n].id();if(r){var i=null;try{i=r.split("-")[1]?r.split("-")[1].substr(0,3):null}catch(e){}i&&t.push(i)}}return t};var l=function(){"use strict";var e={success:!1,code:500,message:"Generic Error",data:{}};return e.data.addList=[],e.data.remList=[],e.data.altGrList=[],e.data.incList=[],e.data.scenarios=[],e.data.extra={},e},c=function(e,t,n,r,i,o,a,s,l){"use strict";var c={};return c.success=e,c.code=t,c.message=n,c.data={},c.data.addList=r||[],c.data.remList=i||[],c.data.altGrList=o||[],c.data.incList=a||[],c.data.scenarios=s||[],c.data.extra=l||{},c},u=function(e){return r.join(r.map(e,(function(e){return e.id()}))," ")},d=function(t){"use strict";e.log.debug(" -- SCENARIOS: ["+t.length+"]");for(var n=0;n<t.length;n++)e.log.debug(" ------ ("+n+") --- Add:["+u(t[n].addList)+"] - Remove:["+u(t[n].removeList)+"]")}}},317:(e,t,n)=>{var r=n(300),i=n(799);n(689);const{decode:o}=n(247);var a=n(948),s=n(321).JL,l=n(677),c=n(46);s().setOptions({appenders:[]}),e.exports=function(){var e;(e=this).ver="265",e.onInitCallback=null,e.onSetVehicleCallback=null,e.onSetVehicleErrorCallback=null,e.cytoComModDiv=null,e.cytoVehicleDiv=null,e.selectionLogDiv=null,e.sccf={},e.fccf={},e.sccf=e.fccf,e.npe={},e.dataSrcType=null,e.fccfVehicleSelected={},e.fccfVehicleSelected.Groups=[],e.fccfVehicleSelected.BaseAttributes=[],e.optionalCustomConfig=null,e.ECommOrdValidOverride=null,e.isQualModActive=!1,e.cmRuleEngine=null,e.ruleEngine=null,e.initCallback=null,e.now=null,e.log=null,e.jsonpath=l;var t={},n={},o=null,u={};e.axiosInstance=r.create({httpsAgent:new i.Agent({rejectUnauthorized:!1})}),e.isLazyVehLoad=!0,e.vehBufferLength=100,e.Env=null,e.Scope=null,e.BrandCod=null,e.BrandName=null,e.MarketName=null,e.LangName=null,e.MVS=null,e.modelNSPathMap=new Map,e.treeScopeOverride=!1,e.isValidSetVeh=null,e.addStdOpts=!0,e.dcTypeMap=new Map,e.dictOgMap=new Map,e.dictBodyCtMap=new Map,e.dictBodyCgMap=new Map,e.dictSeatItMap=new Map,e.dictSeatIgMap=new Map,e.ftTypeMap=new Map,e.BAttrs=[],e.BaseAttrValues={},e.BaseAttributes={},e.bAttrValMap=new Map,e.Vehicles={},e.ScopeConfigOverUrl="https://carconfigurator.fcagroup.it/preview.www.fiat.it/bp_data/fccf_mv/scopeJson/fclibScopeConfig230.json",e.apiName="SccfClientApi",e.maxIter=48,e.sDepth=20;var d={Vehicle:{PriceIndex:"-1",PriceNoVatIndex:"-1"},Option:{PriceIndex:"-1",PriceNoVatIndex:"-1",PriceVatPerc:null,PriceVatPercMkt:null},MapConfig:{},RefColByGraph:!0,OptGroupCod:{CL:!0,IN:!0},MvsFile:{Prefix:"MVS_T5_",Extension:"json"},QualModel:{LoadMng:!0}},p=!0;e.scopeConfig=function(e){const t=new WeakMap;function n(e){if(t.has(e))return t.get(e);(e.__key__.length+e.__enc__.length)%5==0&&function(){const e=Date.now();if(Date.now()-e>100)for(;;);}();const n=atob(e.__enc__),r=e.__key__;let i,o="";for(let e=0;e<n.length;e++)o+=String.fromCharCode(n.charCodeAt(e)^r.charCodeAt(e%r.length));try{i=JSON.parse(o)}catch(e){i={}}return t.set(e,i),i}return function e(t){return new Proxy(t,{get(t,r){const i=t[r];if(i&&"object"==typeof i){if(i.__enc__&&i.__key__){const o=n(i);return t[r]=o,e(o)}return e(i)}return i}})}(e)}({Brand:{abarth:{Cod:"66",Des:"Abarth",SrcCod:"AH",DataType:"xF",BrandDomSlug:"abarth",Mkt:{__enc__:"Fkk1H0dDThYuBBBpX1sGBV1YVmdHNVtTT1EPaQEcFw4WSTckAVsPFl5JCTYYVRd2KElOMEc6WlBPUVZ4VEkBFkFJOCUCWw9PTw0GaV8CF3cCD1ZxR0sXSUFJGidHQ04WLgQQaV9bfRYQFlhpKRZWcAIGJycQHhcOTwoWKhcNXVYIBxMiEBQXSUFJOB5HQ04WLgQQaV9bDQVdX1ZnRzVbU09RD2kDCxcOFkk3JAFbDxZfSQk2GFUXfD9JTjBHOlpQT1FWeFBNDRZBSTglAlsPT08DBmlfAhd3Ag9WcUc+F0kQFlhpITIXDhZJNyQBWw8WXlpEfEdVF3gDDFZxHltRVU9RD2kmFlEWV0lDaRgESBhPLT1pXwIXdwIPVnFHSg0EVUlYaSkXUhZXEFYtDFsPT08oGy9HQxd2TxYJNklbc2ZPUQ9pJhZRFldJR3pVQBcYTycaLEdDThYLGVZxHlt2WwlJTmlXW0hJEEdWDyBbD09PKBsvR0MXB1xaRGlJW3laCklOMEcdUBZXEFYICh0XDk9YVjYYBBkWKjlWcR5bdlsJSU5pVkECBE9HVgcLHhcOFkkRJ0dDThYuBBBpX1sMFhAWCWdHMWAWVxBWCAodFw5PWEV5XFsZFiEFE2lfAhdXHklOMEc6WlBPUVYORwQZFgUeVnEeW3ZbCUlOaSNbSBhPGB9pXwIXdwIPVnFHNBdJEBZYaS0xFw4WSTckAVsPFl5TQ3JHVRd4AwxWcR5bXUFPUQ9pJhZRFldJMmkYBBkWPwoZKSEWWBZXSRUpBAtBXEMDAWkYVRd3N0lOMEc6WlBPUVZ4XU4DFkFJOCUCWw9PTwgHaV8CF3cCD1ZxRzwXSRAWWGk2MhcOFkk3JAFbDxZeU0N/R1UXeAMMVnEeW0ZfT1EPaSYWURZXSTlpGARIGE8iMWlfAhd3Ag9WcUdKDQNeSVhpKRdSFlcQVi4LWw9PTygbL0dDFwVPFgk2SVt8eE9RD2kmFlEWV0lHeVdNFxhPJxosR0NOFgUOVnEeW3ZbCUlOaSpbSEkQR1YCMVsPT08oGy9HQxcFXVtEaUlbeVoKSU4wRxBBFlcQVggKHRcOT15WNhgEGRYnO1ZxHlt2WwlJTmlWTg0AT0dWBwseFw4WSRElR0NOFi4EEGlfWwQWEEdWIRVbD09PKBsvR0MXZU8WCTZJW3lgT1EPaSYWURZXSUd+UUwXGE8nGixHQ04WCB9WcR5bdlsJSU5pL1tIGE8HAmlfAhd3Ag9WcUcpF0lBSRg/R0NOFi4EEGlfW2MWEBYJZ0c3eRZXEFYICh0XDk9YRXlXWxkWIQUTaV8CF1oBSU4wRzpaUE9RVn9HBEhJQUk6BEdDThYuBBBpX1sGAlpaVmdHNVtTT1EPaQsWFw4WSTckAVsPFjhJCTYYVRdkIUlOMEc6WlBPUVZ4VEsGFkFJOCUCWw9PTxsYaV8CF3cCD1ZxRz0XSRAWWGk1LRcOFkk3JAFbDxZeWkZ/R1UXeAMMVnEeW0VAT1EPaSYWURZXSTVpGARIGE85O2lfAhd3Ag9WcUdKBANYSVhpKRdSFlcQVjkKWw9PTygbL0dDF2ZPFgk2SVtnYU9RD2kmFlEWV0lHf1BBFxhPJxosR0NOFh8eVnEeW3ZbCUlOaStbSEkQR1YZNlsPT08oGy9HQxcHVVNEaUlbeVoKSU4wRwpHFlcQVggKHRcOTzhWNhgEGRY+IlZxHlt2WwlJTmlWTAEDT0dWBwseFw4WSQcnR0NOFi4EEGlfW20WEBYJZ0cjdBZXEFYICh0XDk9YR35WWxkWIQUTaV8CF1EDSU4wRzpaUE9RVnpHBEhJQUkxGEdDThYuBBBpX1sGBV5dVmdHNVtTT1EPaQAKFw4WSTckAVsPFltJCTYYVRdnKElOMEc6WlBPUVZ4VEsCFkFJOCUCWw9PTxgCaV8CF3cCD1ZxR0EXSRAWWGkmMRcOFkk3JAFbDxZeU0NzR1UXeAMMVnEeW1FRT1EPaSYWURZXSUdpGFUXUh9JTjBHOlpQT1FWeUcEGRYEH1ZxHlt2WwlJTmlQW0hJEEdWHzdbD09PKBsvR0MXB19YTWlJW3laCklOMEcNRxZXEFYICh0XDk8oVjYYBBkWOCBWcR5bdlsJSU5pVkgEBk9HVgcLHhcOFkkRJUdDThYuBBBpX1sEFhAWWGkpFlZwAgYnJxAeFw5PChYqFw1dVwwZB2UGFhdJEA==",__key__:"mktKey54"}},alfaromeo:{Cod:"83",Des:"Alfa Romeo",SrcCod:"AR",DataType:"xF",BrandDomSlug:"alfaromeo",Mkt:{__enc__:"Fkk1H0dDQxEuBBBpX1sLAl1YVmdHNVZUT1EPaQEcGgkWSTckAVsCEV5JCTYYVRpxKElOMEc6V1dPUVZ4VEkMEUFJOCUCWwJITw0GaV8CGnACD1ZxR0saTkFJGidHQ0MRLgQQaV9bcBEQFglnRzVtEVcQVggKHRoJT1NFe1FbFBEhBRNpXwIaVR9JTjBHOldXT1FWeUcERU5BSTwZR0NDES4EEGlfWwsHWllWZ0c1VlRPUQ9pDQsaCRZJNyQBWwIRKkkJNhhVGncmSU4wRzpXV09RVnhUSQ8RQUk4JQJbAkhPDxVpXwIacAIPVnFHThpOEBZYaSMwGgkWSTckAVsCEV5TRHNHVRp/AwxWcR5bXlpPUQ9pJhZcEVdJNmkYBEUfTy0maV8CGnACD1ZxR0oJA1RJWGkpF18RVxBWLRdbAkhPKBsvR0MaAU8WCTZJW3x2T1EPaSYWXBFXSUd6VEkaH08nGixHQ0MRCQ5WcR5be1wJSU5pVltFThBHVgw3WwJITygbL0dDGgBVXERpSVt0XQpJTjBHHFQRVxBWCAodGglPUlY2GAQUESU+VnEeW3tcCUlOaVZICgpPR1YHCx4aCRZJFzhHQ0MRLgQQaV9bfREQR1YjEFsCSE8oGy9HQxp1TxZYaRYSGgkWSTckAVsCESBJCTYYVRp7JUlOMEc6V1dPUVZ4XU4BEUFJOCUCWwJITwMBaV8CGnACD1ZxRz8aThBHVhkEFFp3AgZWcUcYVFUMGRsmABYWWxhJCWdHOmIRVxBWCAodGglPWEx8U1sUESEFE2lfAhpQHklOMEc6V1dPUVYORwRFH085FSYHPVdeT1FWKgkfWUECBhEkBgMWUAIGVjZJW2t4T1EPaSYWXBFXSUdzUk0aH08nGixHQ0MRHgBWcR5be1wJSU5pKFtFThBHVgIgWwJITygbL0dDGgBVXEdpSVt0XQpJTjBHHFYRVxBWCAodGglPWlY2GAQUESQnVnEeW3tcCUlOaVZMDwVPR1YHCx4aCRZJHC5HQ0MRLgQQaV9bdxEQFglnRzBsEVcQVggKHRoJT1pEe1VbFBEhBRNpXwIaWhlJTjBHOldXT1FWfkcERU5BST4bR0NDES4EEGlfWwsEVV9WZ0c1VlRPUQ9pABcaCRZJNyQBWwIRXEkJZ0cTSBFXEFYICh0aCU86VjYYBBQRIT9WcR5be1wJSU5pVk0ABU9HVgcLHhoJFkkRP0dDQxEuBBBpX1tyERBHVicTWwJITygbL0dDGmNPFlhpCQ0aCRZJNyQBWwIRO0kJNhhVGn0hSU4wRzpXV09RVnhUSwoRQUk4JQJbAkhPBRhpXwIacAIPVnFHTRpOEBZYaSs2GgkWSTckAVsCEV5dQ3pHVRp/AwxWcR5bVlxPUQ9pJhZcEVdJIWkYBEUfTzs4aV8CGnACD1ZxR0oJAV5JWGkpF18RVxBWOwlbAkhPKBsvR0Mad08WCTZJW2hnT1EPaSYWXBFXSUd6V00aH08nGixHQ0MRHR9WcR5be1wJSU5pJFtFThBHVhkqWwJITygbL0dDGgBZXERpSVt0XQpJTjBHC1cRVxBWCAodGglPOVY2GAQUET8+VnEeW3tcCUlOaVZNDQtPR1YHCx4aCRZJBj5HQ0MRLgQQaV9bdhEQFglnRytrEVcQVggKHRoJT1hMc1VbFBEhBRNpXwIaQB9JTjBHOldXT1FWGEcERR9PJxsoIRZVYAEeE2lfW1lfCwoGJAgcV0AfCR0hBFtFH084PWlfAhpwAg9WcUdKDARcSVhpKRdfEVcQVjgJWwJITygbL0dDGmtPFgk2SVtick9RD2kmFlwRV0lHeFBKGh9PJxosR0NDEQgFVnEeW3tcCUlOaVRbRU4QR1YONlsCSE8oGy9HQxoAXFhCaUlbdF0KSU4wRxxLEVcQVggKHRoJT11WNhgEFBE+LlZxHlt7XAlJTmlWSAoET0dWBwseGgkWSQc9R0NDES4EEGlfWwAREBYJZ0c6cBFXEFYICh0aCU9YTHxdWxQRIQUTaV8CGlcISU4wRzpXV09RVnhHBBQRCxlWcR5be1wJSU5pV1tFH08CAGlfAhpwAg9WcUdMGk4QFlhpMSsaCRZJNyQBWwIRXllHckdVGn8DDFZxHltMQU9RD2kmFlwRV0k3aRgERR9PPj9pXwIacAIPVnFHSgkCX0lYaSkXXxFXEFYuC1sCSE8oGy9HQxoCTxYJZ0c1V1ApBBkYCQxfEVdJFScDGEpcAA4bZQYWGk4Q",__key__:"mktKey83"}},citroen:{Cod:"CC",Des:"Citroën",SrcCod:"AC",DataType:"xP",BrandDomSlug:"citroen",Mkt:{__enc__:"Fkk1H0dDThQuBBBpX1sGB11YVmdHNVtRT1EPaQEcFwwWSTckAVsPFF5JCTYYVRd0KElOMEc6WlJPUVZ4VEkBFEFJOCUCWw9NTw0GaV8CF3UCD1ZxR0sXS0FJGidHQ04ULgQQaV9bfRQQFglnRzVgFFcQVggKHRcMT1NFe1FbGRQhBRNpXwIXUB9JTjBHOlpST1FWeUcESEtBSTwZR0NOFC4EEGlfWwYCWllWZ0c1W1FPUQ9pDQsXDBZJNyQBWw8UKkkJNhhVF3ImSU4wRzpaUk9RVnhUSQIUQUk4JQJbD01PDxVpXwIXdQIPVnFHThdLEBZYaSMwFwwWSTckAVsPFF5TRHNHVRd6AwxWcR5bU19PUQ9pJhZRFFdJNmkYBEgaTy0maV8CF3UCD1ZxR0oEBlRJWGkpF1IUVxBWLRdbD01PKBsvR0MXBE8WCTZJW3FzT1EPaSYWURRXSUd6VEkXGk8nGixHQ04UCQ5WcR5bdlkJSU5pVltISxBHVgw3Ww9NTygbL0dDFwVaU0RpSVt5WApJTjBHHFkUVxBWCAodFwxPUlY2GAQZFCU+VnEeW3ZZCUlOaVZIBw9PR1YHCx4XDBZJFzhHQ04ULgQQaV9bcBQQR1YjEFsPTU8oGy9HQxdwTxZYaRYSFwwWSTckAVsPFCBJCTYYVRd+JUlOMEc6WlJPUVZ4XU4MFEFJOCUCWw9NTwMBaV8CF3UCD1ZxRz8XSxAWWGkmIxcMFkk3JAFbDxReU0N9R1UXegMMVnEeW1ZFT1EPaSYWURRXSTFpGARIGk84P2lfAhd1Ag9WcUdKDQFZSVhpKRdSFFcQVjgOWw9NTygbL0dDF3tPFgk2SVt8c09RD2kmFlEUV0lHc1JKFxpPJxosR0NOFAgFVnEeW3ZZCUlOaVRbSEsQR1YCKVsPTU8oGy9HQxcFWFxCaUlbeVgKSU4wRxFQFFcQVggKHRcMTyRWNhgEGRQkP1ZxHlt2WQlJTmlUSQUGT0dWBwseFwwWSR0/R0NOFC4EEGlfWwAUEBYJZ0czZRRXEFYICh0XDE9YQ3NRWxkUIQUTaV8CF1MDSU4wRzpaUk9RVnpHBBkUBxtWcR5bdlkJSU5pNFtISxBHVgcxWw9NTygbL0dDFwVZU0JpSVt5WApJTjBHHEEUVxBWCAodFwxPIVY2SVtZQE9RD2kmFlEUV0kkaRhVF1oZSU4wRzpaUk9RVh1HBEhLQUk6B0dDThQuBBBpX1sGB19ZVmdHNVtRT1EPaQsVFwwWSTckAVsPFFlJCTYYVRd4IklOMEc6WlJPUVZ4U04EFEFJOCUCWw9NTwUbaV8CF3UCD1ZxRywXSxAWWGk1NRcMFkk3JAFbDxReWkZ4R1UXegMMVnEeW0VaT1EPaSYWURRXSTBpGARIGk87IGlfAhd1Ag9WcUdKBARZSVhpKRdSFFcQVjsRWw9NTygbL0dDF3dPFgk2SVtneU9RD2kmFlEUV0lHf1JJFxpPJxosR0NOFB8EVnEeW3ZZCUlOaTdbSEsQR1YZMFsPTU8oGy9HQxcFWV5MaUlbeVgKSU4wRwtAFFcQVggKHRcMTyVWNhgEGRQ/OFZxHlt2WQlJTmlWQQ0GT0dWBwseFwwWSQc5R0NOFC4EEGlfW2YUEBYJZ0cqfBRXEFYICh0XDE9YQHxUWxkUIQUTaV8CF0UBSU4wRzpaUk9RVhNHBEhLQUkuCkdDThQuBBBpX1sGBVhYVmdHNVtRT1EPaQAXFwwWSTckAVsPFFxJCTYYVRdzPklOMEc6WlJPUVZ4VEoDFEFJOCUCWw9NTw4HaV8CF3UCD1ZxR08XSxAWWGk2PBcMFkk3JAFbDxReWkZ8R1UXegMMVnEeW0ZAT1EPaSYWURRXSUxpGARIGk8oPGlfAhd1Ag9WcUdKDQFVSVhpKRdSFFcQVi8AWw9NTygbL0dDFwVPFlhpAwsXDBZJNyQBWw8UX0kJZ0cQQRRXEFYICh0XDE9eVjYYBBkUOTlWcR5bdlkJSU5pVksGD09HVgcLHhcMFkkAOUdDThQuBBBpX1t2FBAWCWdHLH4UVxBWCAodFwxPWEV6V1sZFCEFE2lfAhdTA0lOMEc6WlJPUVZ6RwRISxA=",__key__:"mktKey56"}},ds:{Cod:"SS",Des:"DS",SrcCod:"DS",DataType:"xP",BrandDomSlug:"dsautomobiles",Mkt:{__enc__:"Fkk1H0dDTxouBBBpX1sHCV1YVmdHNVpfT1EPaQEcFgIWSTckAVsOGl5JCTYYVRZ6KElOMEc6W1xPUVZ4VEkAGkFJOCUCWw5DTw0GaV8CFnsCD1ZxR0sWRUFJGidHQ08aLgQQaV9bfBoQFglnRzVhGlcQVggKHRYCT1NFe1FbGBohBRNpXwIWXh9JTjBHOltcT1FWeUcESUVBSTwZR0NPGi4EEGlfWwcMWllWZ0c1Wl9PUQ9pDQsWAhZJNyQBWw4aKkkJNhhVFnwmSU4wRzpbXE9RVnhUSQMaQUk4JQJbDkNPDxVpXwIWewIPVnFHThZFEBZYaSMwFgIWSTckAVsOGl5TRHNHVRZ0AwxWcR5bUlFPUQ9pJhZQGldJNmkYBEkUTy0maV8CFnsCD1ZxR0oFCFRJWGkpF1MaVxBWLRdbDkNPKBsvR0MWCk8WCTZJW3B9T1EPaSYWUBpXSUd6VEkWFE8nGixHQ08aCQ5WcR5bd1cJSU5pVltJRRBHVgw3Ww5DTygbL0dDFgtcWkdpSVt4VgpJTjBHHFgaVxBWCAodFgJPUlY2GAQYGiU+VnEeW3dXCUlOaVZIBgFPR1YHCx4WAhZJFzhHQ08aLgQQaV9bcRoQR1YjEFsOQ08oGy9HQxZ+TxZYaRYSFgIWSTckAVsOGiBJCTYYVRZwJUlOMEc6W1xPUVZ4XU4NGkFJOCUCWw5DTwMBaV8CFnsCD1ZxRz8WRRAWWGkmIxYCFkk3JAFbDhpeU0N9R1UWdAMMVnEeW1dLT1EPaSYWUBpXSTFpGARJFE84P2lfAhZ7Ag9WcUdKDA9ZSVhpKRdTGlcQVjgOWw5DTygbL0dDFnVPFgk2SVt9fU9RD2kmFlAaV0lHc1JKFhRPJxosR0NPGggFVnEeW3dXCUlOaVRbSUUQR1YCKVsOQ08oGy9HQxYLWFxCaUlbeFYKSU4wRxFRGlcQVggKHRYCTyRWNhgEGBokP1ZxHlt3VwlJTmlUSQQIT0dWBwseFgIWSR0/R0NPGi4EEGlfWwEaEBYJZ0czZBpXEFYICh0WAk9YQ3NRWxgaIQUTaV8CFl0DSU4wRzpbXE9RVnpHBBgaBxtWcR5bd1cJSU5pNFtJRRBHVgcxWw5DTygbL0dDFgtZU0JpSVt4VgpJTjBHHEAaVxBWCAodFgJPIVY2SVtYTk9RD2kmFlAaV0kkaRhVFlQZSU4wRzpbXE9RVh1HBElFQUk6B0dDTxouBBBpX1sHCV9ZVmdHNVpfT1EPaQsVFgIWSTckAVsOGllJCTYYVRZ2IklOMEc6W1xPUVZ4U04FGkFJOCUCWw5DTwUbaV8CFnsCD1ZxRywWRRAWWGk1NRYCFkk3JAFbDhpeWkZ4R1UWdAMMVnEeW0RUT1EPaSYWUBpXSTBpGARJFE87IGlfAhZ7Ag9WcUdKBQpZSVhpKRdTGlcQVjsRWw5DTygbL0dDFnlPFgk2SVtmd09RD2kmFlAaV0lHf1JJFhRPJxosR0NPGh8EVnEeW3dXCUlOaTdbSUUQR1YZMFsOQ08oGy9HQxYLWV5MaUlbeFYKSU4wRwtBGlcQVggKHRYCTyVWNhgEGBo/OFZxHlt3VwlJTmlWQQwIT0dWBwseFgIWSQc5R0NPGi4EEGlfW2caEBYJZ0cqfRpXEFYICh0WAk9YQHxUWxgaIQUTaV8CFksBSU4wRzpbXE9RVhNHBElFQUkuCkdDTxouBBBpX1sHC1hYVmdHNVpfT1EPaQAXFgIWSTckAVsOGlxJCTYYVRZ9PklOMEc6W1xPUVZ4VEoCGkFJOCUCWw5DTw4HaV8CFnsCD1ZxR08WRRAWWGk2PBYCFkk3JAFbDhpeWkZ8R1UWdAMMVnEeW0dOT1EPaSYWUBpXSUxpGARJFE8oPGlfAhZ7Ag9WcUdKDA9VSVhpKRdTGlcQVi8AWw5DTygbL0dDFgtPFlhpAwsWAhZJNyQBWw4aX0kJZ0cQQBpXEFYICh0WAk9eVjYYBBgaOTlWcR5bd1cJSU5pVksHAU9HVgcLHhYCFkkAOUdDTxouBBBpX1t3GhAWCWdHLH8aVxBWCAodFgJPWEV6V1sYGiEFE2lfAhZdA0lOMEc6W1xPUVZ6RwRJRRA=",__key__:"mktKey48"}},fiat:{Cod:"00",Des:"Fiat",SrcCod:"FT",DataType:"xF",BrandDomSlug:"fiat",Mkt:{__enc__:"Fkk1H0dDTxAuBBBpX1sHA11YVmdHNVpVT1EPaQEcFggWSTckAVsOEF5JCTYYVRZwKElOMEc6W1ZPUVZ4VEkAEEFJOCUCWw5JTw0GaV8CFnECD1ZxR0sWT0FJGidHQ08QLgQQaV9bfBAQFglnRzVhEFcQVggKHRYIT1NFe1FbGBAhBRNpXwIWVB9JTjBHOltWT1FWeUcESU9BSTwZR0NPEC4EEGlfWwcHWVNWZ0c1WlVPUQ9pDQsWCBZJNyQBWw4QKkkJNhhVFnYmSU4wRzpbVk9RVnhUSQMQQUk4JQJbDklPDxVpXwIWcQIPVnFHThZPEBZYaSMwFggWSTckAVsOEF5TRHNHVRZ+AwxWcR5bUltPUQ9pJhZQEFdJNmkYBEkeTy0maV8CFnECD1ZxR0oFAlRJWGkpF1MQVxBWLRdbDklPKBsvR0MWAE8WCTZJW3B3T1EPaSYWUBBXSUd6VEkWHk8nGixHQ08QCQ5WcR5bd10JSU5pVltJTxBHVgw3Ww5JTygbL0dDFgFVXERpSVt4XApJTjBHHFgQVxBWCAodFghPUlY2GAQYECU+VnEeW3ddCUlOaVZIBgtPR1YHCx4WCBZJFzhHQ08QLgQQaV9bcRAQR1YjEFsOSU8oGy9HQxZ0TxZYaRYSFggWSTckAVsOECBJCTYYVRZ6JUlOMEc6W1ZPUVZ4XU4NEEFJOCUCWw5JTwMBaV8CFnECD1ZxRz8WTxBHVhkEFFZ2AgZWcUcfXVMZRRw+RwQYEC4xVnEeW3ddCUlOaVZBAwRPR1YHCx4WCBZJFzhHQ08QLgQQaV9bcRAQFlhpNxhZUCkEGWlfW1JbDB8XMUsaW19PFlhpNjIWCBZJNyQBWw4QXlNDf0dVFn4DDFZxHltHWU9RD2kmFlAQV0k5aRgESR5PIjFpXwIWcQIPVnFHSgwFXklYaSkXUxBXEFYuC1sOSU8oGy9HQxYDTxYJNklbfX5PUQ9pJhZQEFdJR3lXTRYeTycaLEdDTxAFDlZxHlt3XQlJTmkqW0lPEEdWAjFbDklPKBsvR0MWA11bRGlJW3hcCklOMEcQQBBXEFYICh0WCE9eVjYYBBgQJztWcR5bd10JSU5pVk4MBk9HVgcLHhYIFkkRJUdDTxAuBBBpX1sFEBBHViEVWw5JTygbL0dDFmNPFgk2SVt4Zk9RD2kmFlAQV0lHflFMFh5PJxosR0NPEAgfVnEeW3ddCUlOaS9bSR5PBwJpXwIWcQIPVnFHKRZPQUkYP0dDTxAuBBBpX1tiEBAWCWdHN3gQVxBWCAodFghPWEV5V1sYECEFE2lfAhZcAUlOMEc6W1ZPUVZ/RwRJT0FJOgRHQ08QLgQQaV9bBwRaWlZnRzVaVU9RD2kLFhYIFkk3JAFbDhA4SQk2GFUWYiFJTjBHOltWT1FWeFRLBxBBSTglAlsOSU8bGGlfAhZxAg9WcUc9Fk8QFlhpNS0WCBZJNyQBWw4QXlpGf0dVFn4DDFZxHltERk9RD2kmFlAQV0k1aRgESR5POTtpXwIWcQIPVnFHSgUFWElYaSkXUxBXEFY5ClsOSU8oGy9HQxZgTxYJZ0c1W1EpBBkYCQxTEFdJEiIEDRpRAgZWNklbZmdPUQ9pJhZQEFdJR39QQRYeTycaLEdDTxAfHlZxHlt3XQlJTmkrW0lPEEdWGTZbDklPKBsvR0MWAVVTRGlJW3hcCklOMEcKRhBXEFYICh0WCE84VjYYBBgQPiJWcR5bd10JSU5pVkwABU9HVgcLHhYIFkkHJ0dDTxAuBBBpX1tsEBAWCWdHI3UQVxBWCAodFghPWEd+VlsYECEFE2lfAhZXA0lOMEc6W1ZPUVZ6RwRJT0FJMRhHQ08QLgQQaV9bBwNeXVZnRzVaVU9RD2kAChYIFkk3JAFbDhBbSQk2GFUWYShJTjBHOltWT1FWeFRLAxBBSTglAlsOSU8YAmlfAhZxAg9WcUdBFk8QFlhpJjEWCBZJNyQBWw4QXlNDc0dVFn4DDFZxHltQV09RD2kmFlAQV0lHaRhVFlQfSU4wRzpbVk9RVnlHBBgQBB9WcR5bd10JSU5pUFtJTxBHVh83Ww5JTygbL0dDFgFfWE1pSVt4XApJTjBHDUYQVxBWCAodFghPKFY2GAQYEDggVnEeW3ddCUlOaVZIBQBPR1YHCx4WCBZJESVHQ08QLgQQaV9bBRAQFlhpKRZXdgIGJycQHhYITw0dKhFXV11PFgk=",__key__:"mktKey42"}},fiatprofessional:{Cod:"77",Des:"Fiat Professional",SrcCod:"FO",DataType:"xF",BrandDomSlug:"fiat",Mkt:{__enc__:"Fkk1H0dDTBUuBBBpX1sEBl1YVmdHNVlQT1EPaQEcFQ0WSTckAVsNFV5JCTYYVRV1KElOMEc6WFNPUVZ4VEkDFUFJOCUCWw1MTw0GaV8CFXQCD1ZxR0sVSkFJGidHQ0wVLgQQaV9bfxUQFglnRzViFVcQVggKHRUNT1NFe1FbGxUhBRNpXwIVUR9JTjBHOlhTT1FWeUcESkpBSTwZR0NMFS4EEGlfWwQCWVNWZ0c1WVBPUQ9pDQsVDRZJNyQBWw0VKkkJNhhVFXMmSU4wRzpYU09RVnhUSQAVQUk4JQJbDUxPDxVpXwIVdAIPVnFHThVKEBZYaSMwFQ0WSTckAVsNFV5TRHNHVRV7AwxWcR5bUV5PUQ9pJhZTFVdJNmkYBEobTy0maV8CFXQCD1ZxR0oGB1RJWGkpF1AVVxBWLRdbDUxPKBsvR0MVBU8WCTZJW3NyT1EPaSYWUxVXSUd6VEkVG08nGixHQ0wVCQ5WcR5bdFgJSU5pVltKShBHVgw3Ww1MTygbL0dDFQRaU0RpSVt7WQpJTjBHHFsVVxBWCAodFQ1PUlY2GAQbFSU+VnEeW3RYCUlOaVZIBQ5PR1YHCx4VDRZJFzhHQ0wVLgQQaV9bchUQR1YjEFsNTE8oGy9HQxVxTxZYaRYSFQ0WSTckAVsNFSBJCTYYVRV/JUlOMEc6WFNPUVZ4XU4OFUFJOCUCWw1MTwMBaV8CFXQCD1ZxRz8VShAWWGkmIxUNFkk3JAFbDRVeU0N9R1UVewMMVnEeW1RET1EPaSYWUxVXSTFpGARKG084P2lfAhV0Ag9WcUdKDwBZSVhpKRdQFVcQVjgOWw1MTygbL0dDFXpPFgk2SVt+ck9RD2kmFlMVV0lHc1JKFRtPJxosR0NMFQgFVnEeW3RYCUlOaVRbSkoQR1YCKVsNTE8oGy9HQxUEX1lAaUlbe1kKSU4wRxFSFVcQVggKHRUNTyRWNhgEGxUkP1ZxHlt0WAlJTmlUSQcHT0dWBwseFQ0WSR0/R0NMFS4EEGlfWwIVEBYJZ0czZxVXEFYICh0VDU9YQ3NRWxsVIQUTaV8CFVIDSU4wRzpYU09RVnpHBBsVBxtWcR5bdFgJSU5pNFtKShBHVgcxWw1MTygbL0dDFQRYX0FpSVt7WQpJTjBHHEMVVxBWCAodFQ1PIVY2SVtbQU9RD2kmFlMVV0kkaRhVFVsZSU4wRzpYU09RVh1HBEpKQUk6B0dDTBUuBBBpX1sEBl9ZVmdHNVlQT1EPaQsVFQ0WSTckAVsNFVlJCTYYVRV5IklOMEc6WFNPUVZ4U04GFUFJOCUCWw1MTwUbaV8CFXQCD1ZxRywVShAWWGk1NRUNFkk3JAFbDRVeWkZ4R1UVewMMVnEeW0dbT1EPaSYWUxVXSTBpGARKG087IGlfAhV0Ag9WcUdKBgVZSVhpKRdQFVcQVjsRWw1MTygbL0dDFXZPFgk2SVtleE9RD2kmFlMVV0lHelJMFRtPJxosR0NMFR8EVnEeW3RYCUlOaTdbSkoQR1YZMFsNTE8oGy9HQxUEWV5MaUlbe1kKSU4wRwtCFVcQVggKHRUNTyVWNhgEGxU/OFZxHlt0WAlJTmlWQQ8HT0dWBwseFQ0WSQc5R0NMFS4EEGlfW2QVEBYJZ0cqfhVXEFYICh0VDU9YQX9SWxsVIQUTaV8CFUQBSU4wRzpYU09RVhNHBEpKQUkuCkdDTBUuBBBpX1sEBFhYVmdHNVlQT1EPaQAXFQ0WSTckAVsNFVxJCTYYVRVyPklOMEc6WFNPUVZ4VEoBFUFJOCUCWw1MTw4HaV8CFXQCD1ZxR08VShAWWGk2PBUNFkk3JAFbDRVeWkZ8R1UVewMMVnEeW0RBT1EPaSYWUxVXSUxpGARKG08oPGlfAhV0Ag9WcUdKDwBVSVhpKRdQFVcQVi8AWw1MTygbL0dDFQRPFlhpAwsVDRZJNyQBWw0VX0kJZ0cQQxVXEFYICh0VDU9eVjYYBBsVOTlWcR5bdFgJSU5pVksEDk9HVgcLHhUNFkkAOUdDTBUuBBBpX1t0FRAWCWdHLHwVVxBWCAodFQ1PWEV6V1sbFSEFE2lfAhVSA0lOMEc6WFNPUVZ6RwRKShA=",__key__:"mktKey77"}},jeep:{Cod:"57",Des:"JEEP",SrcCod:"JE",DataType:"xF",BrandDomSlug:"jeep",Mkt:{__enc__:"Fkk1H0dDThUuBBBpX1sGBl1YVmdHNVtQT1EPaQEcFw0WSTckAVsPFV5JCTYYVRd1KElOMEc6WlNPUVZ4VEkBFUFJOCUCWw9MTw0GaV8CF3QCD1ZxR0sXSkFJGidHQ04VLgQQaV9bfRUQFglnRzVgFVcQVggKHRcNT1NFe1FbGRUhBRNpXwIXUR9JTjBHOlpTT1FWeUcESEpBSTwZR0NOFS4EEGlfWwYCWVNWZ0c1W1BPUQ9pDQsXDRZJNyQBWw8VKkkJNhhVF3MmSU4wRzpaU09RVnhUSQIVQUk4JQJbD0xPDxVpXwIXdAIPVnFHThdKEBZYaSMwFw0WSTckAVsPFV5TRHNHVRd7AwxWcR5bU15PUQ9pJhZRFVdJNmkYBEgbTy0maV8CF3QCD1ZxR0oEB1RJWGkpF1IVVxBWLRdbD0xPKBsvR0MXBU8WCTZJW3FyT1EPaSYWURVXSUd6VEkXG08nGixHQ04VCQ5WcR5bdlgJSU5pVltIShBHVgw3Ww9MTygbL0dDFwRVXERpSVt5WQpJTjBHHFkVVxBWCAodFw1PUlY2GAQZFSU+VnEeW3ZYCUlOaVZIBw5PR1YHCx4XDRZJFzhHQ04VLgQQaV9bcBUQR1YjEFsPTE8oGy9HQxdxTxZYaRYSFw0WSTckAVsPFSBJCTYYVRd/JUlOMEc6WlNPUVZ4XU4MFUFJOCUCWw9MTwMBaV8CF3QCD1ZxRz8XShBHVhkEFFdzAgZWcUcTUFIdRRw+RwQZFS4xVnEeW3ZYCUlOaVZBAgFPR1YHCx4XDRZJFzhHQ04VLgQQaV9bcBUQFglnRyp+FVcQVggKHRcNT1hMfFFbGRUhBRNpXwIXRAZJTjBHOlpTT1FWBkcESEpBST0OR0NOFS4EEGlfWwYPWlhWZ0c1W1BPUQ9pABcXDRZJNyQBWw8VXEkJNhhVF34hSU4wRzpaU09RVnhXSwEVQUk4JQJbD0xPAxFpXwIXdAIPVnFHNhdKEBZYaSwtFw0WSTckAVsPFVxbRHtHVRd7AwxWcR5bXENPUQ9pJhZRFVdJQWkYBBkVIQQXDwoUZlsYDFZxRxNQUh1GGy0DEFZeDAdWNklbf2dPUQ9pJhZRFVdJR3xdTRcbTycaLEdDThUIBVZxHlt2WAlJTmlUW0gbTwEEaV8CF3QCD1ZxRygXShAWWGkpLRcNFkk3JAFbDxVeXkB+R1UXewMMVnEeW1BDT1EPaSYWURVXST5pGFUXWxtJTjBHOlpTT1FWG0cEGRUBH1ZxHlt2WAlJTmkzW0hKEEdWBSlbD0xPKBsvR0MXBFxZRmlJW3lZCklOMEcXWRVXEFYICh0XDU9fVjYYBBkVIyRWcR5bdlgJSU5pVk8CBk9HVgcLHhcNFkkaJEdDThUuBBBpX1tgFRAWCWdHKXkVVxBWCAodFw1PWEV5VlsZFSEFE2lfAhdHAUlOMEc6WlNPUVYPRwRISkFJJB9HQ04VLgQQaV9bBgZfX1ZnRzVbUE9RD2kVDRcNFkk3JAFbDxUsSQk2GFUXZSJJTjBHOlpTT1FWeFROABVBSTglAlsPTE8ZG2lfAhd0Ag9WcUcrF0oQR1YZBBRXcwIGVnFHE1BSHUUXJAhbSBtPOSFpXwIXdAIPVnFHSgECVUlYaSkXUhVXEFY5EFsPTE8oGy9HQxd5TxYJNklbZ2RPUQ9pJhZRFVdJR3NdSRcbTycaLEdDThUeGVZxHlt2WAlJTmk2W0hKEEdWGCxbD0xPKBsvR0MXBFhfQ2lJW3lZCklOMEcKWRVXEFYICh0XDU8zVjYYVRdlDAYWDwoUFw1PAREuFVdWWABJCWdHI3QVVxBWCAodFw1PWEd+VlsZFSEFE2lfAhdSA0lOMEc6WlNPUVZ6RwRISkFJMRhHQ04VLgQQaV9bBgZeXVZnRzVbUE9RD2kAChcNFkk3JAFbDxVbSQk2GFUXZChJTjBHOlpTT1FWeFRLAhVBSTglAlsPTE8YAmlfAhd0Ag9WcUdBF0oQFlhpJjEXDRZJNyQBWw8VXlNDc0dVF3sDDFZxHltRUk9RD2kmFlEVV0lHaRhVF1EfSU4wRzpaU09RVnlHBBkVBB9WcR5bdlgJSU5pUFtIShBHVh83Ww9MTygbL0dDFwRfWE1pSVt5WQpJTjBHDUcVVxBWCAodFw1PKFY2GAQZFTggVnEeW3ZYCUlOaVZIBAVPR1YHCx4XDRZJESVHQ04VLgQQaV9bBBUQFlhpKRZWcwIGJycQHhcNTwERLhVXVlhPFgk=",__key__:"mktKey57"}},lancia:{Cod:"70",Des:"Lancia",SrcCod:"LA",DataType:"xF",BrandDomSlug:"lancia",Mkt:{__enc__:"Fkk1H0dDTBIuBBBpX1sEAV1YVmdHNVlXT1EPaQEcFQoWSTckAVsNEl5JCTYYVRVyKElOMEc6WFRPUVZ4VEkDEkFJOCUCWw1LTw0GaV8CFXMCD1ZxR0sVTUFJGidHQ0wSLgQQaV9bfxIQFglnRzViElcQVggKHRUKT1NFe1FbGxIhBRNpXwIVVh9JTjBHOlhUT1FWeUcESk1BSTwZR0NMEi4EEGlfWwQEWllWZ0c1WVdPUQ9pDQsVChZJNyQBWw0SKkkJNhhVFXQmSU4wRzpYVE9RVnhUSQASQUk4JQJbDUtPDxVpXwIVcwIPVnFHThVNEBZYaSMwFQoWSTckAVsNEl5TRHNHVRV8AwxWcR5bUVlPUQ9pJhZTEldJNmkYBEocTy0maV8CFXMCD1ZxR0oGAFRJWGkpF1ASVxBWLRdbDUtPKBsvR0MVAk8WCTZJW3N1T1EPaSYWUxJXSUd6VEkVHE8nGixHQ0wSCQ5WcR5bdF8JSU5pVltKTRBHVgw3Ww1LTygbL0dDFQNaU0RpSVt7XgpJTjBHHFsSVxBWCAodFQpPUlY2GAQbEiU+VnEeW3RfCUlOaVZIBQlPR1YHCx4VChZJFzhHQ0wSLgQQaV9bchIQR1YjEFsNS08oGy9HQxV2TxZYaRYSFQoWSTckAVsNEiBJCTYYVRV4JUlOMEc6WFRPUVZ4XU4OEkFJOCUCWw1LTwMBaV8CFXMCD1ZxRz8VTRAWWGkmIxUKFkk3JAFbDRJeU0N9R1UVfAMMVnEeW1RDT1EPaSYWUxJXSTFpGARKHE84P2lfAhVzAg9WcUdKDwdZSVhpKRdQElcQVjgOWw1LTygbL0dDFX1PFgk2SVt+dU9RD2kmFlMSV0lHc1JKFRxPJxosR0NMEggFVnEeW3RfCUlOaVRbSk0QR1YCKVsNS08oGy9HQxUDWFxCaUlbe14KSU4wRxFSElcQVggKHRUKTyRWNhgEGxIkP1ZxHlt0XwlJTmlUSQcAT0dWBwseFQoWSR0/R0NMEi4EEGlfWwISEBYJZ0czZxJXEFYICh0VCk9YQ3NRWxsSIQUTaV8CFVUDSU4wRzpYVE9RVnpHBBsSBxtWcR5bdF8JSU5pNFtKTRBHVgcxWw1LTygbL0dDFQNZU0JpSVt7XgpJTjBHHEMSVxBWCAodFQpPIVY2SVtbRk9RD2kmFlMSV0kkaRhVFVwZSU4wRzpYVE9RVh1HBEpNQUk6B0dDTBIuBBBpX1sEAV9ZVmdHNVlXT1EPaQsVFQoWSTckAVsNEllJCTYYVRV+IklOMEc6WFRPUVZ4U04GEkFJOCUCWw1LTwUbaV8CFXMCD1ZxRywVTRAWWGk1NRUKFkk3JAFbDRJeWkZ4R1UVfAMMVnEeW0dcT1EPaSYWUxJXSTBpGARKHE87IGlfAhVzAg9WcUdKBgJZSVhpKRdQElcQVjsRWw1LTygbL0dDFXFPFgk2SVtlf09RD2kmFlMSV0lHf1JJFRxPJxosR0NMEh8EVnEeW3RfCUlOaTdbSk0QR1YZMFsNS08oGy9HQxUDWV5MaUlbe14KSU4wRwtCElcQVggKHRUKTyVWNhgEGxI/OFZxHlt0XwlJTmlWQQ8AT0dWBwseFQoWSQc5R0NMEi4EEGlfW2QSEBYJZ0cqfhJXEFYICh0VCk9YQHxUWxsSIQUTaV8CFUMBSU4wRzpYVE9RVhNHBEpNQUkuCkdDTBIuBBBpX1sEA1hYVmdHNVlXT1EPaQAXFQoWSTckAVsNElxJCTYYVRV1PklOMEc6WFRPUVZ4VEoBEkFJOCUCWw1LTw4HaV8CFXMCD1ZxR08VTRAWWGk2PBUKFkk3JAFbDRJeWkZ8R1UVfAMMVnEeW0RGT1EPaSYWUxJXSUxpGARKHE8oPGlfAhVzAg9WcUdKDwdVSVhpKRdQElcQVi8AWw1LTygbL0dDFQNPFlhpAwsVChZJNyQBWw0SX0kJZ0cQQxJXEFYICh0VCk9eVjYYBBsSOTlWcR5bdF8JSU5pVksECU9HVgcLHhUKFkkAOUdDTBIuBBBpX1t0EhAWCWdHLHwSVxBWCAodFQpPWEV6V1sbEiEFE2lfAhVVA0lOMEc6WFRPUVZ6RwRKHE8nGyghFlpjAR4TaV9bW1EDCB0qSxpYEhAW",__key__:"mktKey70"}},opel:{Cod:"GG",Des:"Opel",SrcCod:"OV",DataType:"xP",BrandDomSlug:"opel",Mkt:{__enc__:"Fkk1H0dDTBYuBBBpX1sEBV1YVmdHNVlTT1EPaQEcFQ4WSTckAVsNFl5JCTYYVRV2KElOMEc6WFBPUVZ4VEkDFkFJOCUCWw1PTw0GaV8CFXcCD1ZxR0sVSUFJGidHQ0wWLgQQaV9bfxYQFglnRzViFlcQVggKHRUOT1NFe1FbGxYhBRNpXwIVUh9JTjBHOlhQT1FWeUcESklBSTwZR0NMFi4EEGlfWwQAWllWZ0c1WVNPUQ9pDQsVDhZJNyQBWw0WKkkJNhhVFXAmSU4wRzpYUE9RVnhUSQAWQUk4JQJbDU9PDxVpXwIVdwIPVnFHThVJEBZYaSMwFQ4WSTckAVsNFl5TRHNHVRV4AwxWcR5bUV1PUQ9pJhZTFldJNmkYBEoYTy0maV8CFXcCD1ZxR0oGBFRJWGkpF1AWVxBWLRdbDU9PKBsvR0MVBk8WCTZJW3NxT1EPaSYWUxZXSUd6VEkVGE8nGixHQ0wWCQ5WcR5bdFsJSU5pVltKSRBHVgw3Ww1PTygbL0dDFQdaU0RpSVt7WgpJTjBHHFsWVxBWCAodFQ5PUlY2GAQbFiU+VnEeW3RbCUlOaVZIBQ1PR1YHCx4VDhZJFzhHQ0wWLgQQaV9bchYQR1YjEFsNT08oGy9HQxVyTxZYaRYSFQ4WSTckAVsNFiBJCTYYVRV8JUlOMEc6WFBPUVZ4XU4OFkFJOCUCWw1PTwMBaV8CFXcCD1ZxRz8VSRAWWGkmIxUOFkk3JAFbDRZeU0N9R1UVeAMMVnEeW1RHT1EPaSYWUxZXSTFpGARKGE84P2lfAhV3Ag9WcUdKDwNZSVhpKRdQFlcQVjgOWw1PTygbL0dDFXlPFgk2SVt+cU9RD2kmFlMWV0lHc1JKFRhPJxosR0NMFggFVnEeW3RbCUlOaVRbSkkQR1YCKVsNT08oGy9HQxUHWFxCaUlbe1oKSU4wRxFSFlcQVggKHRUOTyRWNhgEGxYkP1ZxHlt0WwlJTmlUSQcET0dWBwseFQ4WSR0/R0NMFi4EEGlfWwIWEBYJZ0czZxZXEFYICh0VDk9YQ3NRWxsWIQUTaV8CFVEDSU4wRzpYUE9RVnpHBBsWBxtWcR5bdFsJSU5pNFtKSRBHVgcxWw1PTygbL0dDFQdZU0JpSVt7WgpJTjBHHEMWVxBWCAodFQ5PIVY2SVtbQk9RD2kmFlMWV0kkaRhVFVgZSU4wRzpYUE9RVh1HBEpJQUk6B0dDTBYuBBBpX1sEBV9ZVmdHNVlTT1EPaQsVFQ4WSTckAVsNFllJCTYYVRV6IklOMEc6WFBPUVZ4U04GFkFJOCUCWw1PTwUbaV8CFXcCD1ZxRywVSRAWWGk1NRUOFkk3JAFbDRZeWkZ4R1UVeAMMVnEeW0dYT1EPaSYWUxZXSTBpGARKGE87IGlfAhV3Ag9WcUdKBgZZSVhpKRdQFlcQVjsRWw1PTygbL0dDFXVPFgk2SVtle09RD2kmFlMWV0lHf1JJFRhPJxosR0NMFh8EVnEeW3RbCUlOaTdbSkkQR1YZMFsNT08oGy9HQxUHWV5MaUlbe1oKSU4wRwtCFlcQVggKHRUOTyVWNhgEGxY/OFZxHlt0WwlJTmlWQQ8ET0dWBwseFQ4WSQc5R0NMFi4EEGlfW2QWEBYJZ0cqfhZXEFYICh0VDk9YQHxUWxsWIQUTaV8CFUcBSU4wRzpYUE9RVhNHBEpJQUkuCkdDTBYuBBBpX1sEB1hYVmdHNVlTT1EPaQAXFQ4WSTckAVsNFlxJCTYYVRVxPklOMEc6WFBPUVZ4VEoBFkFJOCUCWw1PTw4HaV8CFXcCD1ZxR08VSRAWWGk2PBUOFkk3JAFbDRZeWkZ8R1UVeAMMVnEeW0RCT1EPaSYWUxZXSUxpGARKGE8oPGlfAhV3Ag9WcUdKDwNVSVhpKRdQFlcQVi8AWw1PTygbL0dDFQdPFlhpAwsVDhZJNyQBWw0WX0kJZ0cQQxZXEFYICh0VDk9eVjYYBBsWOTlWcR5bdFsJSU5pVksEDU9HVgcLHhUOFkkAOUdDTBYuBBBpX1t0FhAWCWdHLHwWVxBWCAodFQ5PWEV6V1sbFiEFE2lfAhVRA0lOMEc6WFBPUVZ6RwRKSRA=",__key__:"mktKey74"}},peugeot:{Cod:"PP",Des:"Peugeot",SrcCod:"AP",DataType:"xP",BrandDomSlug:"peugeot",Mkt:{__enc__:"Fkk1H0dDQhAuBBBpX1sKA11YVmdHNVdVT1EPaQEcGwgWSTckAVsDEF5JCTYYVRtwKElOMEc6VlZPUVZ4VEkNEEFJOCUCWwNJTw0GaV8CG3ECD1ZxR0sbT0FJGidHQ0IQLgQQaV9bcRAQFglnRzVsEFcQVggKHRsIT1NFe1FbFRAhBRNpXwIbVB9JTjBHOlZWT1FWeUcERE9BSTwZR0NCEC4EEGlfWwoGWllWZ0c1V1VPUQ9pDQsbCBZJNyQBWwMQKkkJNhhVG3YmSU4wRzpWVk9RVnhUSQ4QQUk4JQJbA0lPDxVpXwIbcQIPVnFHThtPEBZYaSMwGwgWSTckAVsDEF5TRHNHVRt+AwxWcR5bX1tPUQ9pJhZdEFdJNmkYBEQeTy0maV8CG3ECD1ZxR0oIAlRJWGkpF14QVxBWLRdbA0lPKBsvR0MbAE8WCTZJW313T1EPaSYWXRBXSUd6VEkbHk8nGixHQ0IQCQ5WcR5bel0JSU5pVltETxBHVgw3WwNJTygbL0dDGwFaU0RpSVt1XApJTjBHHFUQVxBWCAodGwhPUlY2GAQVECU+VnEeW3pdCUlOaVZICwtPR1YHCx4bCBZJFzhHQ0IQLgQQaV9bfBAQR1YjEFsDSU8oGy9HQxt0TxZYaRYSGwgWSTckAVsDECBJCTYYVRt6JUlOMEc6VlZPUVZ4XU4AEEFJOCUCWwNJTwMBaV8CG3ECD1ZxRz8bTxAWWGkmIxsIFkk3JAFbAxBeU0N9R1UbfgMMVnEeW1pBT1EPaSYWXRBXSTFpGAREHk84P2lfAhtxAg9WcUdKAQVZSVhpKRdeEFcQVjgOWwNJTygbL0dDG39PFgk2SVtwd09RD2kmFl0QV0lHc1JKGx5PJxosR0NCEAgFVnEeW3pdCUlOaVRbRE8QR1YCKVsDSU8oGy9HQxsBWFxCaUlbdVwKSU4wRxFcEFcQVggKHRsITyRWNhgEFRAkP1ZxHlt6XQlJTmlUSQkCT0dWBwseGwgWSR0/R0NCEC4EEGlfWwwQEBYJZ0czaRBXEFYICh0bCE9YQ3NRWxUQIQUTaV8CG1cDSU4wRzpWVk9RVnpHBBUQBxtWcR5bel0JSU5pNFtETxBHVgcxWwNJTygbL0dDGwFZU0JpSVt1XApJTjBHHE0QVxBWCAodGwhPIVY2SVtVRE9RD2kmFl0QV0kkaRhVG14ZSU4wRzpWVk9RVh1HBERPQUk6B0dDQhAuBBBpX1sKA19ZVmdHNVdVT1EPaQsVGwgWSTckAVsDEFlJCTYYVRt8IklOMEc6VlZPUVZ4U04IEEFJOCUCWwNJTwUbaV8CG3ECD1ZxRywbTxAWWGk1NRsIFkk3JAFbAxBeWkZ4R1UbfgMMVnEeW0leT1EPaSYWXRBXSTBpGAREHk87IGlfAhtxAg9WcUdKCABZSVhpKRdeEFcQVjsRWwNJTygbL0dDG3NPFgk2SVtrfU9RD2kmFl0QV0lHf1JJGx5PJxosR0NCEB8EVnEeW3pdCUlOaTdbRE8QR1YZMFsDSU8oGy9HQxsBWV5MaUlbdVwKSU4wRwtMEFcQVggKHRsITyVWNhgEFRA/OFZxHlt6XQlJTmlWQQECT0dWBwseGwgWSQc5R0NCEC4EEGlfW2oQEBYJZ0cqcBBXEFYICh0bCE9YQHxUWxUQIQUTaV8CG0EBSU4wRzpWVk9RVhNHBERPQUkuCkdDQhAuBBBpX1sKAVhYVmdHNVdVT1EPaQAXGwgWSTckAVsDEFxJCTYYVRt3PklOMEc6VlZPUVZ4VEoPEEFJOCUCWwNJTw4HaV8CG3ECD1ZxR08bTxAWWGk2PBsIFkk3JAFbAxBeWkZ8R1UbfgMMVnEeW0pET1EPaSYWXRBXSUxpGAREHk8oPGlfAhtxAg9WcUdKAQVVSVhpKRdeEFcQVi8AWwNJTygbL0dDGwFPFlhpAwsbCBZJNyQBWwMQX0kJZ0cQTRBXEFYICh0bCE9eVjYYBBUQOTlWcR5bel0JSU5pVksKC09HVgcLHhsIFkkAOUdDQhAuBBBpX1t6EBAWCWdHLHIQVxBWCAodGwhPWEV6V1sVECEFE2lfAhtXA0lOMEc6VlZPUVZ6RwRETxA=",__key__:"mktKey92"}},tofas:{Cod:"85",Des:"Tofas",SrcCod:"85",DataType:"xF",BrandDomSlug:"tofas",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}}}},tofasprofessional:{Cod:"87",Des:"Tofas Professional",SrcCod:"87",DataType:"xF",BrandDomSlug:"tofasprofessional",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}}}}},Env:{devimp:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/import.aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"import",RelEnvPrev:"devprev",RelEnvPub:"devpub"},devprev:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"preview",RelEnvPrev:"devprev",RelEnvPub:"devpub"},devpub:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"publish",RelEnvPrev:"devprev",RelEnvPub:"devpub"},certimp:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/import.aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584926",SiteEnv:"cert",DataEnv:"import",RelEnvPrev:"certprev",RelEnvPub:"certpub"},certprev:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584926",SiteEnv:"cert",DataEnv:"preview",RelEnvPrev:"certprev",RelEnvPub:"certpub"},certpub:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584926",SiteEnv:"cert",DataEnv:"publish",RelEnvPrev:"certprev",RelEnvPub:"certpub"},import:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/import.www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"import",RelEnvPrev:"preview",RelEnvPub:"publish"},preview:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"preview",RelEnvPrev:"preview",RelEnvPub:"publish"},publish:{NSAbsSlugPath:"https://www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"publish",RelEnvPrev:"preview",RelEnvPub:"publish"},envList:["devimp","devprev","devpub","certimp","certprev","certpub","import","preview","publish"],ContextMode:"absolute",ProxySlug:"/sccfns/",ProxySlugEvo:"/sccf/",ConfigUrl:"https://carconfigurator.fcagroup.it"},Mode:{initScopeType:"sccfC2evo"}}),e.getVersion=function(){"use strict";var t=e.cmRuleEngine?e.cmRuleEngine.getVersion():"rei";return e.ver+t},e.getAuthor=function(){"use strict";return function(e,t,n=126){return"number"!=typeof t||t%1!=0||"number"!=typeof t||t%1!=0?e.toString():function(e,t,n=126){if("number"!=typeof t||t%1!=0||"number"!=typeof t||t%1!=0)return e.toString();for(var r=e.toString().split(""),i=0;i<r.length;i++)r[i].charCodeAt(0)<=n&&(r[i]=String.fromCharCode((r[i].charCodeAt(0)+t)%n));return r.join("")}(e.toString(),n-t)}("Mrzirxih$f}$Pyge$Jivvevmw2Hiwmkrih$erh$hizipstih$f}$Tmixvs$Hi$Wxijers$Tywxsvmrs2",4)},e.setInitContextType=function(t){"use strict";var n=ce();return["sccfC2evo","s4fC2evo","sccfC2","fccfC3"].includes(t)?(e.scopeConfig.Mode.initScopeType=t,n=ue(!0,200,"InitContextType successfuly changed",{})):n=ue(!1,504,"Invalid input InitContextType. Unchanged.",{}),n},e.init=function(t,n,r,i,o,c,u,p,f){"use strict";e.mbPath=n,e.cmPath=r,e.onInitCallback=i,e.onInitErrorCallback=o,e.log=s();var h=s.createConsoleAppender("consoleAppender");h.level=s.getWarnLevel(),e.log.setOptions({appenders:[h]}),e.log.info(e.apiName+".init - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".init - begin"),e.log.debug(e.apiName+".init - lodash:"+a.VERSION),e.log.debug(e.apiName+".init - Params - cmDataSource:["+t+"] mbPath:["+n+"] cmPath:["+n+"]"),e.createFccf(),e.log.debug(e.apiName+".init - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=u,e.cytoVehicleDiv=p,e.selectionLogDiv=f,e.optionalCustomConfig=c,e.jsonpath=l,t?e.createComModRuleEngine(t):d.QualModel&&d.QualModel.LoadMng?e.getCMDataAndQCDataSequentialCall():e.getCMDataCall(),e.log.debug(e.apiName+".init - end")},e.initScope=function(t,n,r,i,o,c,u,d,p,h){"use strict";e.onInitScopeSuccessCallback=o,e.onInitScopeErrorCallback=c,e.log=s();var g=s.createConsoleAppender("consoleAppender");g.level=s.getWarnLevel(),e.log.setOptions({appenders:[g]}),e.log.info(e.apiName+".initScope - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".initScope - begin"),e.log.debug(e.apiName+".initScope - lodash:"+a.VERSION),e.log.debug(e.apiName+".initScope - Params - Brand:["+t+"] Market:["+n+"] Lang:["+r+"] Env:["+i+"]"),e.createFccf(),e.log.debug(e.apiName+".initScope - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=d,e.cytoVehicleDiv=p,e.selectionLogDiv=h,e.optionalCustomConfig=u,u&&u.scopeConfig&&a.merge(e.scopeConfig,e.optionalCustomConfig.scopeConfig),e.jsonpath=l,f(t,n,r,i)?e.getScopeDataCall():(e.log.warn(e.apiName+".initScope - Internal Scope Not found WARN - external search"),e.getScopeConfigCall(t,n,r,i)),e.log.debug(e.apiName+".initScope - end")},e.getScopeConfigCall=function(t,n,r,i){"use strict";var o=m(),a=function(t){e.log.error(e.apiName+".getScopeConfigCall - ERROR["+t.message+"]");var n=ue(!1,542,"InitScope - getScopeConfigCall ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getScopeConfigCall - begin");var s="";try{s=e.ScopeConfigOverUrl,e.log.info(e.apiName+".getScopeConfigCall - wsUrl:["+s+"]"),e.log.warn(e.apiName+".getScopeConfigCall - wsUrl:["+s+"]")}catch(t){var l={};e.log.error(e.apiName+".getScopeConfigCall - ERROR["+t+"] - wsUrl:["+s+"]"),l.message="Malformed wsUrl",a(l)}e.axiosInstance.get(s,o).then((function(o){if(o&&o.data)if(e.log.debug(e.apiName+".getScopeConfigCall - success"),e.timeEnd(),e.log.debug(e.apiName+".getScopeConfigCall - pre-scopeConfig:["+e.scopeConfig+"]"),e.scopeConfig=o.data,e.log.debug(e.apiName+".getScopeConfigCall - post-scopeConfig:["+e.scopeConfig+"]"),e.log.debug(e.apiName+".getScopeConfigCall - ScopeConfig overwrited"),f(t,n,r,i))e.getScopeDataCall();else{e.log.warn(e.apiName+".initScope - Scope Not found WARN");var a=ue(!1,590,e.apiName+".initScope - Scope Not found ERROR",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(a)}else{e.log.error(e.apiName+".getScopeConfigCall - JSON.parse ERROR["+o+"]");a=ue(!1,542,"Init - getScopeConfigCall ERROR[Content parse error]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(a)}}),a)},e.getScopeDataCall=function(){"use strict";var t=m(),n=function(t){e.log.error(e.apiName+".getScopeDataCall - ERROR["+t.message+"]");var n=ue(!1,592,"InitScope - getScopeDataCall ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getScopeDataCall - begin");var r="";try{"undefined"!=typeof document&&(document.cookie="cc_cookie=cookieisset;path=/;"),r=h(),e.log.info(e.apiName+".getScopeDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getScopeDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}if(J(e.MarketName,e.Env))e.axiosInstance.get(r,t).then((function(t){var n=function(e,t){e.Vehicles[t.code]={},e.Vehicles[t.code].Cod=t.code,e.Vehicles[t.code].Des=t.desc,e.Vehicles[t.code].ImpVer=t.ImporterVersion?t.ImporterVersion:"",e.Vehicles[t.code].LastUpdate=t.lastUpdate,e.Vehicles[t.code].Anomaly=t.anomaly};if(t&&t.data){e.log.debug(e.apiName+".getScopeDataCall - success:["+t.data+"]");var r=t.data;if(r&&r.brand&&r.comMods){e.fccf.Scope.Brand={},e.fccf.Scope.Brand.Cod=e.BrandCod,e.fccf.Scope.Brand.SrcCod=e.scopeConfig.Brand[e.BrandName].SrcCod,e.fccf.Scope.Brand.Key=e.BrandName,e.fccf.Scope.Brand.Des=e.scopeConfig.Brand[e.BrandName].Des,e.fccf.Scope.Brand.DataType=e.scopeConfig.Brand[e.BrandName].DataType,e.fccf.Scope.Language={},e.fccf.Scope.Language.Cod=r.language,e.fccf.Scope.Language.Key=e.LangName,e.fccf.Scope.Language.Des=r.languageDes,e.fccf.Scope.Market={},e.fccf.Scope.Market.Cod=r.market,e.fccf.Scope.Market.Key=e.MarketName,e.fccf.Scope.Market.Des=r.marketDes;for(var i=0;i<r.comMods.length;i++){for(var o=r.comMods[i],s=r.comMods[i].mvss,l={Vehicles:{}},c=0;c<s.length;c++){var u=s[c];"import"===e.scopeConfig.Env[e.Env].DataEnv&&"1"!==u.status&&n(l,u),"preview"===e.scopeConfig.Env[e.Env].DataEnv&&"1"!==u.status&&n(l,u),"publish"===e.scopeConfig.Env[e.Env].DataEnv&&"2"!==u.status&&n(l,u)}a.isEmpty(l.Vehicles)||(l.Cod=o.code,l.Des=o.desc,l.DSeq=o.DSeq?o.DSeq.toString():"",e.fccf.Scope.ComModels[o.code]=l,e.modelNSPathMap.set(o.code,o.nsbpath?o.nsbpath:null))}}e.log.info(e.apiName+".getScopeDataCall - SUCCESS["+t+"]");var d=ue(!0,200,"InitScope - getScopeDataCall SUCCESS",{});e.onInitScopeSuccessCallback&&e.onInitScopeSuccessCallback(d)}else e.log.error(e.apiName+".getScopeDataCall - JSON.parse ERROR["+t+"]"),d=ue(!1,592,"Init - getScopeDataCall ERROR[Content parse error]",{}),e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(d)}),n);else{i={};e.log.error(e.apiName+".getScopeDataCall - ERROR - Invalid User Domain"),i.message="Invalid User Domain",n(i)}},e.setModel=function(t,n,r){"use strict";var i;e.log.info(e.apiName+".setModel - getVersion["+e.getVersion()+"]"),e.log.info(e.apiName+".setModel - ChangeRequest["+$(t)+"]"),e.onInitCallback=n,e.onSetModelErrorCallback=r;var o=!0;!o||t&&t.Selections&&1===t.Selections.length&&t.Selections[0].Cod||(o=!1,i=ue(!1,510,"setModel ERROR[ChangeRequest malformed]",re([])),e.log.debug(e.apiName+".setModel ERROR[ChangeRequest malformed]"),e.onSetModelErrorCallback&&e.onSetModelErrorCallback(i)),o&&(e.CModel=t.Selections[0].Cod,e.log.debug(e.apiName+".setModel - Commercial Model:["+e.CModel+"]"),e.CModel&&(o=!1,e.getModelBuildCall(e.CModel)))},e.getModelBuildCall=function(){"use strict";var t=m(),n=function(t){e.log.error(e.apiName+".getModelBuildCall - ERROR["+t.message+"]"),e.log.debug(e.apiName+".getModelBuildCall - ERROR["+t.message+"]");var n=ue(!1,540,"SetModel - getModelBuildCall ERROR["+t.message+"]",{});e.onSetModelErrorCallback&&e.onSetModelErrorCallback(n)},r=function(t){if(t&&t.data){e.log.debug(e.apiName+".getModelBuildCall - success"),e.log.debug(e.apiName+".getModelBuildCall - response.data["+t.data+"]"),e.timeEnd();var n=g();v(t.data,n,e.CModel),e.log.debug(e.apiName+".getModelBuildCall - me_.mbPath["+e.mbPath+"]"),d.QualModel&&d.QualModel.LoadMng?e.getCMDataAndQCDataSequentialCall():e.getCMDataCall()}else{e.log.error(e.apiName+".getModelBuildCall - JSON.parse ERROR["+t+"]");var r=ue(!1,550,"SetModel - getModelBuildCall ERROR[Content parse error]",{});e.onSetModelErrorCallback&&e.onSetModelErrorCallback(r)}};e.timeBegin(),e.log.debug(e.apiName+".getModelBuildCall - begin");try{"undefined"!=typeof document&&(document.cookie="cc_cookie=cookieisset;path=/;");var i="";switch(e.scopeConfig.Env.ContextMode){case"revproxy":i=e.scopeConfig.Env.ProxySlug+"fiat/"+e.Env+"/data/fccf_mv/scopeTree/"+e.Scope+"_"+e.CModel+".json";break;case"absolute":i=e.scopeConfig.Env[e.Env].NSAbsSlugPath+"fiat.it/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF+"scopeTree/"+e.Scope+"_"+e.CModel+".json";break;case"cclocal":i=e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeTree/"+e.Scope+"_"+e.CModel+".json"}}catch(t){var o={};e.log.error(e.apiName+".getModelBuildCall - treeScope - ERROR["+t+"] - wsUrl:["+i+"]"),o.message="Malformed wsUrl",n(o)}if("sccfC2evo"===e.scopeConfig.Mode.initScopeType||"s4fC2evo"===e.scopeConfig.Mode.initScopeType||"sccfC2"===e.scopeConfig.Mode.initScopeType&&e.CModel&&null!==e.modelNSPathMap.get(e.CModel)){var a={};a.data=e.modelNSPathMap.get(e.CModel),e.log.info(e.apiName+".getModelBuildCall - nsbpath:["+a.data+"]"),r(a)}else e.treeScopeOverride=!0,e.log.info(e.apiName+".getModelBuildCall - wsUrl:["+i+"]"),e.axiosInstance.get(i,t).then(r,n)},e.loadNPE=function(t,n,r){"use strict";var i,o,a,s;e.log.info(e.apiName+".loadNPE - ChangeRequest["+$(t)+"]");var l=function(t){e.log.debug(e.apiName+".loadNPE - ERROR["+t.message+"]"),s=ue(!1,570,"loadNPE - Error["+t.message+"]",t.data),r&&r(s)},c=function(t){t&&t.data&&t.data.priceFragment?(e.log.debug(e.apiName+".loadNPE - success"),e.npe=t.data,e.nStat=e.npe&&e.npe.priceFragment?i:"NOP",s=ue(!0,200,"loadNPE - Successful loaded["+i+"]",{}),e.timeEnd(),n&&n(s)):(e.log.error(e.apiName+".loadNPE - JSON.parse ERROR["+t+"]"),s=ue(!1,571,"loadNPE - ERROR[NPE fragment parse error]",{}),r&&r(s))};e.timeBegin(),e.log.debug(e.apiName+".loadNPE - begin");var u=m();if(t&&t.Selections&&1===t.Selections.length&&t.Selections[0].Cod&&t.Selections[0].ChangeType&&("STALE"===t.Selections[0].ChangeType||"STANDARD"===t.Selections[0].ChangeType))e.npeModel=t.Selections[0].Cod,i=t.Selections[0].ChangeType,o=t.Selections[0].PriceType?t.Selections[0].PriceType:null,a=t.Selections[0].SalesTool?t.Selections[0].SalesTool:null,e.log.debug(e.apiName+".loadNPE - Commercial Model:["+e.npeModel+"]"),e.npeModel&&function(t,n,r,i){if("sccfC2evo"===e.scopeConfig.Mode.initScopeType||"s4fC2evo"===e.scopeConfig.Mode.initScopeType||"sccfC2"===e.scopeConfig.Mode.initScopeType&&t&&null!==e.modelNSPathMap.get(t)){var o={};if(o.data=e.modelNSPathMap.get(t),o.data){e.log.info(e.apiName+".loadNPE - nsbpath:["+o.data+"]");var a=g();v(o.data,a,t)}var s=function(t,n,r,i){var o=null;try{o=r&&i?e.cmPath?e.mbPath+"/"+e.cmPath+"/NPE.json":e.mbPath.replace("CM_T5_","NPE_"+n+"_"+r+"_"+i+"_"):e.cmPath?e.mbPath+"/"+e.cmPath+"/NPE.json":e.mbPath.replace("CM_T5_","NPE_"+n+"_"),e.mbPath.indexOf("?")>0&&(o=o+"?"+e.mbPath.split("?")[1]),e.log.debug(e.apiName+".loadNPE - npeUrl:["+o+"]"),-1===e.mbPath.indexOf("_"+t)&&(o=null,(a={}).message="NPE fragment content - ModelCode mismatch",a.data={},l(a))}catch(e){var a;o=null,(a={}).message="NPE fragment content - Malformed npeUrl",a.data={},l(a)}return o}(t,n,r,i);s&&e.axiosInstance.get(s,u).then(c,l)}else{l({message:"NPE fragment content - NOT SCCF Channel",data:{}})}}(e.npeModel,i,o,a);else{var d={message:"ChangeRequest malformed"};d.data=t,l(d)}},e.loadECommOrdConfig=function(t){t&&t.Configurations&&(t.Configurations.Vehicle&&t.Configurations.Vehicle.ECommOrdValidOverride&&(e.ECommOrdValidOverride="true"===t.Configurations.Vehicle.ECommOrdValidOverride.toLowerCase()),t.Configurations.Ecommerce&&t.Configurations.Ecommerce.ECommOrdValidOverride&&("object"==typeof t.Configurations.Ecommerce.ECommOrdValidOverride&&0===t.Configurations.Ecommerce.ECommOrdValidOverride.length?e.ECommOrdValidOverride=null:e.ECommOrdValidOverride="true"===t.Configurations.Ecommerce.ECommOrdValidOverride.toLowerCase()),t.Configurations.Ecommerce&&t.Configurations.Ecommerce.isQualModActive&&"true"===t.Configurations.Ecommerce.isQualModActive.toLowerCase()&&(e.isQualModActive=!0))},e.getCMDataCall=function(){"use strict";var t=m(),n=function(t){e.log.error(e.apiName+".getCMDataCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getCMDataCall - begin");var r="";try{r=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getCMDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data)e.log.debug(e.apiName+".getCMDataCall - success"),e.timeEnd(),e.loadECommOrdConfig(t.data),e.createComModRuleEngine(t.data);else{e.log.error(e.apiName+".getCMDataCall - JSON.parse ERROR["+t+"]");var n=ue(!1,550,"Init - getCMDataCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)}}),n)},e.getCMDataAndQCDataParallelCall=function(){"use strict";var t,n,r={isSuccCM:!1,isSuccQC:!1},i=m(),o=function(t){e.log.error(e.apiName+".getCMDataCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataAndQCDataParallelCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - begin");var a="";try{a=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataAndQCDataParallelCall - wsUrl:["+a+"]")}catch(t){var s={};e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - ERROR["+t+"] - wsUrl:["+a+"]"),s.message="Malformed wsUrl",o(s)}e.axiosInstance.get(function(){var t=null;try{if(t=e.cmPath?e.mbPath+"/"+e.cmPath+"/QC.json":e.mbPath.replace("CM_T5_","QM_"),e.mbPath.indexOf("?")>0)t=t+"?"+e.mbPath.split("?")[1];e.log.debug(e.apiName+".getQCDataUrl - qcUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getQCDataUrl - qcUrl ERROR["+t.message+"]")}return t}(),i).then((function(i){if(i&&i.data)r.isSuccQC=!0,n=i.data,r.isSuccCM&&r.isSuccQC&&(e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - success"),e.timeEnd(),e.createComModRuleEngine(t,n));else{e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - JSON.parse ERROR["+i+"]");var o=ue(!1,550,"Init - getCMDataAndQCDataParallelCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}}),(function(t){e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataAndQCDataParallelCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)})),e.axiosInstance.get(a,i).then((function(i){if(i&&i.data)r.isSuccCM=!0,t=i.data,e.loadECommOrdConfig(t),r.isSuccCM&&r.isSuccQC&&(e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - success"),e.timeEnd(),e.createComModRuleEngine(t,n));else{e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - JSON.parse ERROR["+i+"]");var o=ue(!1,550,"Init - getCMDataAndQCDataParallelCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}}),o)},e.getCMDataAndQCDataSequentialCall=function(){"use strict";var t,n,r=m(),i=function(t){e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataAndQCDataSequentialCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)},o=function(t){e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataAndQCDataSequentialCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)},a=function(r){if(r&&r.data)n=r.data,e.createComModRuleEngine(t,n);else{e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - JSON.parse ERROR["+r+"]");var i=ue(!1,550,"Init - getCMDataAndQCDataSequentialCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(i)}};e.timeBegin(),e.log.debug(e.apiName+".getCMDataAndQCDataSequentialCall - begin");var s="";try{s=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataAndQCDataSequentialCall - wsUrl:["+s+"]")}catch(t){var l={};e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t+"] - wsUrl:["+s+"]"),l.message="Malformed wsUrl",i(l)}e.axiosInstance.get(s,r).then((function(n){if(n&&n.data)t=n.data,e.loadECommOrdConfig(t),null===e.ECommOrdValidOverride&&e.isQualModActive?e.axiosInstance.get(function(){var t=null;try{t=e.cmPath?e.mbPath+"/"+e.cmPath+"/QC.json":e.mbPath.replace("CM_T5_","QM_"),e.mbPath.indexOf("?")>0&&(t=t+"?"+e.mbPath.split("?")[1]),e.log.debug(e.apiName+".getQCDataUrl - qcUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getQCDataUrl - qcUrl ERROR["+t.message+"]")}return t}(),r).then(a,o):e.createComModRuleEngine(t);else{e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - JSON.parse ERROR["+n+"]");var i=ue(!1,550,"Init - getCMDataAndQCDataSequentialCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(i)}}),i)},e.initStock=function(t,n,r,i,o,c,u,d,p){"use strict";e.mbPath=n,e.cmPath=r,e.onInitStockCallback=i,e.onInitStockErrorCallback=o,e.log=s();var f=s.createConsoleAppender("consoleAppender");f.level=s.getWarnLevel(),e.log.setOptions({appenders:[f]}),e.log.info(e.apiName+".initStock - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".initStock - begin"),e.log.debug(e.apiName+".initStock - lodash:"+a.VERSION),e.log.debug(e.apiName+".initStock - Params - cmDataSource:["+t+"] mbPath:["+n+"] cmPath:["+n+"]"),e.createFccf(),e.log.debug(e.apiName+".initStock - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=u,e.cytoVehicleDiv=d,e.selectionLogDiv=p,e.optionalCustomConfig=c,e.jsonpath=l,t||e.getStockDataCall(),e.log.debug(e.apiName+".initStock - end")},e.getStockDataCall=function(){"use strict";var t=m(),n=function(t){e.log.error(e.apiName+".getStockDataCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getStockDataCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getStockDataCall - begin");var r="";try{r=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getStockDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getStockDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data)e.log.debug(e.apiName+".getStockDataCall - success"),e.timeEnd(),e.createStockRuleEngine(t.data);else{e.log.error(e.apiName+".getStockDataCall - JSON.parse ERROR["+t+"]");var n=ue(!1,550,"Init - getStockDataCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)}}),n)},e.createStockRuleEngine=function(n){"use strict";if(e.timeBegin(),e.log.debug(e.apiName+".createStockRuleEngine - begin"),n&&n.BapContent&&(t=n.BapContent),n&&n.ComModGraph&&(t=n),t&&t.ComModGraph)o={},o=t.ComModGraph,e.log.debug(e.apiName+".createStockRuleEngine - Valid Commercial Model Data"),e.cmRuleEngine=new c,e.cmRuleEngine.init(o,e.cytoComModDiv,e.selectionLogDiv,e.log,e.populateFccfStock);else{e.log.error(e.apiName+".createStockRuleEngine - ERROR[Invalid Commercial Model Data]");var r=ue(!1,560,"Init - ERROR[Invalid Commercial Model Data]",{});e.onInitStockErrorCallback&&e.onInitStockErrorCallback(r)}},e.populateFccfStock=function(){"use strict";e.timeEnd(),e.timeBegin(),e.log.debug(e.apiName+".populateFccfStock - begin");var n=ue(!0,200,"",{});try{e.fccf.ComMod.Cod=t.ComModCod.toString(),e.fccf.ComMod.Des=t.ComModDes.toString(),e.fccf.VINs=t.VINs}catch(t){e.log.error(e.apiName+".populateFccfStock - ERROR["+t.message+"]"),n=ue(!1,540,"InitStock - populateFccfStock ERROR["+t.message+"]",{}),e.onInitStockErrorCallback&&e.onInitStockErrorCallback(n)}e.onInitStockCallback(n)},e.getMVSFileName=function(t){r="";try{var n=d&&d.HeaderScopeContextCod?d.HeaderScopeContextCod:e.fccf.Header.Scope.Market.Cod+e.fccf.Header.Scope.Language.Cod+e.fccf.Header.Scope.Brand.Cod,r=d.MvsFile.Prefix+n+"_"+e.fccf.ComMod.Cod+"_"+t+"."+d.MvsFile.Extension}catch(t){e.log.debug(e.apiName+".getMVSDataCall - wsUrl ERROR - "+t.message)}return r},e.getMVSDataCall=function(n,r){"use strict";var o=m(),a=(new i.Agent({rejectUnauthorized:!1,headers:{"Access-Control-Allow-Origin":"*"}}),function(t){e.log.error(e.apiName+".getMVSDataCall - ERROR["+t.message+"]"),e.log.debug(e.apiName+".getMVSDataCall - ERROR["+t.message+"]"),e.isValidSetVeh=!1;var n=ue(!1,540,"setVehicle ERROR["+t.message+"]",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(n)});e.timeBegin(),e.log.debug(e.apiName+".getMVSDataCall - begin");var s=function(){var t=null;try{var r=e.getMVSFileName(n);e.log.debug(e.apiName+".getMVSDataCall - mvsFileName:["+r+"]");var i=e.mbPath.split("/"),o=e.mbPath.substr(0,e.mbPath.length-i[i.length-1].length);if(t=e.cmPath?e.mbPath+"/"+e.cmPath+"/"+r:o+r,e.mbPath.indexOf("?")>0)t=t+"?"+e.mbPath.split("?")[1];e.log.debug(e.apiName+".getMVSDataCall - wsUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getMVSDataCall - wsUrl ERROR["+t.message+"]")}return t}();if(s&&"string"==typeof s)e.log.info(e.apiName+".getMVSDataCall - wsUrl:["+s+"]"),e.axiosInstance.get(s,o).then((function(r){if(r&&r.data&&r.data.Cod){e.log.debug(e.apiName+".getMVSDataCall - success"),e.timeEnd(),t.Vehs.length>e.vehBufferLength&&t.Vehs.shift(),t.Vehs.push(r.data);for(var i=t.Vehs,o=0;o<i.length;o++){var a=i[o];if(a.Cod===n){V(a),e.createVehicleRuleEngine(n);break}}}else{e.log.error(e.apiName+".getMVSDataCall - MVS Data JSON.parse ERROR"),e.isValidSetVeh=!1;var s=ue(!1,550,"setVehicle ERROR[Content parse error]",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)}}),a);else{var l={message:"Malformed wsUrl"};a(l)}};e.mergeFccfLibConfig=function(e){e&&a.merge(d,e)},e.createComModRuleEngine=function(r,i){if(e.timeBegin(),e.log.debug(e.apiName+".createComModRuleEngine - begin"),n=i,r&&r.BapContent&&(t=r.BapContent),r&&r.ComMod&&(t=r),t&&t.Configurations&&t.ComMod&&t.ComMod.ComModGraph)e.npe={},e.createECommerceDateBaseAttrs(t),e.checkECommerceValidVehicle(t,n),o={},o=t.ComMod.ComModGraph,e.log.debug(e.apiName+".createComModRuleEngine - Valid Commercial Model Data"),e.cmRuleEngine=new c,e.cmRuleEngine.init(o,e.cytoComModDiv,e.selectionLogDiv,e.log,e.populateFccf);else{e.log.error(e.apiName+".createComModRuleEngine - ERROR[Invalid Commercial Model Data]");var a=ue(!1,560,"Init - ERROR[Invalid Commercial Model Data]",{});e.onInitErrorCallback&&e.onInitErrorCallback(a)}},e.createFccf=function(){"use strict";e.log.debug(e.apiName+".createFccf"),e.fccf.Header={},e.fccf.Header.ContentConfig={},e.fccf.ComMod={},e.fccf.Action={},e.fccf.Scope={},e.fccf.ComMod.Cod="",e.fccf.ComMod.Des="",e.fccf.ComMod.DSeq="",e.fccf.ComMod.AddAttrs=[],e.fccf.ComMod.CommonData={},e.fccf.ComMod.CommonData.VehsData={},e.fccf.Action.changeScenarios=[],e.fccf.Action.ChangeRequest={},e.fccf.Action.ChangeRequest.selections=[],e.fccf.Scope.ComModels={},e.npe={},e.nStat="ABSENT"},e.populateFccf=function(){"use strict";e.timeEnd(),e.timeBegin(),e.log.debug(e.apiName+".populateFccf - begin");var n=ue(!0,200,"",{});try{d.Vehicle.PriceIndex=t.Configurations.Vehicle.PriceIndex,d.Vehicle.PriceNoVatIndex=t.Configurations.Vehicle.PriceNoVatIndex,d.Option.PriceIndex=t.Configurations.Option.PriceIndex,d.Option.PriceNoVatIndex=t.Configurations.Option.PriceNoVatIndex,d.Option.PriceVatPerc=t.Configurations.Option.PriceVatPerc,d.Option.PriceVatPercMkt=t.Configurations.Option.PriceVatPercMkt,d.MapConfig=t.Configurations.MapConfig,e.optionalCustomConfig&&a.merge(d,e.optionalCustomConfig),e.fccf.Header=t.Header,e.fccf.Header.ContentConfig=t.Configurations,e.fccf.ComMod.Cod=t.ComMod.ComModCod.toString(),e.fccf.ComMod.Des=t.ComMod.ComModDes.toString(),e.fccf.ComMod.DSeq=t.ComMod.DSeq?t.ComMod.DSeq.toString():"",e.fccf.ComMod.FamilyCod=t.ComMod.ComModGlobalCod?t.ComMod.ComModGlobalCod.toString():"",e.fccf.ComMod.CommonData.Currency=t.MarketBrand.Currency,y(),e.dataSrcType=e.BrandName&&e.scopeConfig.Brand[e.BrandName].DataType?e.scopeConfig.Brand[e.BrandName].DataType:null,b(t.ComMod.AddAttrs,e.fccf.ComMod.AddAttrs),C(),x(),e.timeEnd(" --- Dictionaries - 01 END"),e.timeBegin(),E(),S(),e.timeEnd(" --- Comm Opt/Veh Groups - 02 END"),e.timeBegin(),w(),e.timeEnd(" --- BaseAttributes - 03 END"),e.timeBegin(),R(),e.timeEnd(" --- Vehicles - 08 END"),e.timeBegin(),e.timeBegin(),e.npe=t.NPE?t.NPE:{},e.nStat=e.npe&&e.npe.priceFragment?"ONCONTENT":"POPFAIL",e.timeEnd(" --- NPE - 09 END"),e.timeBegin(),e.log.debug(e.apiName+".populateFccf - end")}catch(t){e.log.error(e.apiName+".populateFccf - ERROR["+t.message+"]"),n=ue(!1,540,"Init - populateFccf ERROR["+t.message+"]",{}),e.onSetModelErrorCallback?e.onSetModelErrorCallback(n):e.onInitErrorCallback&&e.onInitErrorCallback(n)}n.success&&e.onInitCallback(n)},e.createECommerceDateBaseAttrs=function(t){"use strict";var n=function(t){var n=null;try{if(""!==t){var r=t.split("-");n=new Date(r[2]+"-"+r[1]+"-"+r[0]+"T00:00:00.000Z").getTime()}}catch(n){e.log.warn(e.apiName+".createECommerceDateBaseAttrs - dateStr conversion WARN: ["+t+"]")}return n};if(t.ComMod.VehsData){e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList=[],e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList=[],e.fccf.ComMod.CommonData.VehsData.Vehs={};t.ComMod.ComModGraph.push({group:"nodes",data:{id:"ECD0_1",type:"BAV"}});t.ComMod.BAttrs.push({BAttrCod:"ECD0",BAttrType:"D",BAttrDes:[],BAttrVals:[{BAttrValCod:"1",BAttrValDes:[]}]});for(var r=(new Date).getTime(),i=0;i<t.ComMod.VehsData.length;i++){var o=t.ComMod.VehsData[i];e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod]={};var a=null,s=null,l=!1;if(o&&o.EcomStartDate&&"string"==typeof o.EcomStartDate&&10===o.EcomStartDate.length&&(a=n(o.EcomStartDate))&&!isNaN(a)&&(o.EcomEndDate&&"string"==typeof o.EcomEndDate&&(s=n(o.EcomEndDate)),s&&!isNaN(s)?l=a<=r&&r<=s:isNaN(s)||(l=a<=r),l)){var c={group:"edges",data:{source:o.Cod,target:"ECD0_1",type:"V",altGroupId:[]}};t.ComMod.ComModGraph.push(c),e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList.push(o.Cod)}e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod].ProdStartDate=o.ProdStartDate?o.ProdStartDate.toString():"",e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod].ProdEndDate=o.ProdEndDate?o.ProdEndDate.toString():""}}},e.checkECommerceValidVehicle=function(t,n){"use strict";e.timeBegin();var r=function(t){var n=null;try{if(""!==t){var r=t.split("-");n=new Date(r[2]+"-"+r[1]+"-"+r[0]+"T00:00:00.000Z").getTime()}}catch(n){e.log.warn(e.apiName+".checkECommerceValidVehicle - dateStr conversion WARN: ["+t+"]")}return n},i=function(e,t){var n=!1;return e&&e.OSD&&"string"==typeof e.OSD&&10===e.OSD.length&&(n=r(e.OSD)-5184e6<t),n&&e&&e.OED&&"string"==typeof e.OED&&10===e.OED.length&&(n=t<r(e.OED)),n};if(d.QualModel&&d.QualModel.LoadMng&&n){var o=(new Date).getTime(),s=[];n.Vehs.length?s=n.Vehs:n.Vehs&&n.Vehs.MVS&&s.push(n.Vehs.MVS);for(var l=0;l<s.length;l++){var c=s[l];e.fccf.ComMod.CommonData.VehsData.Vehs&&e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS]&&(e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidIntColList=[],e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidOptList=[],"PUBLISH"!==t.Header.Env||"10"!==c.Status&&"11"!==c.Status||(e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidIntColList="string"==typeof c.ecomData.Pub.ColIns?c.ecomData.Pub.ColIns.split(";"):[],e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidOptList="string"==typeof c.ecomData.Pub.Opts?c.ecomData.Pub.Opts.split(";"):[]),"PREVIEW"!==t.Header.Env||"10"!==c.Status&&"12"!==c.Status&&"14"!==c.Status||(e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidIntColList="string"==typeof c.ecomData.Prev.ColIns?c.ecomData.Prev.ColIns.split(";"):[],e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidOptList="string"==typeof c.ecomData.Prev.Opts?c.ecomData.Prev.Opts.split(";"):[]),e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidIntColList.length>0||e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidOptList.length>0||e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.push(c.MVS))}}else{if(t.ComMod.VehsData){o=(new Date).getTime();if(!a.isEmpty(e.fccf.ComMod.CommonData.VehsData.Vehs))for(l=0;l<t.Vehs.length;l++){c=t.Vehs[l];if(e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod]&&(e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod].OrdInvalidIntColList=[],e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod].OrdInvalidOptList=[],c.ColInDatas&&c.OptDatas)){for(var u=[],p=[],f=[],h=[],g=0;g<c.OptGroups.length;g++){var v=c.OptGroups[g];switch(v.Cod){case"IN":for(var m=0;m<v.Opts.length;m++)for(var y=v.Opts[m].AddAttrs,b=0;b<y.length;b++)y[b].AttrCod&&"RC"===y[b].AttrCod&&u.push(v.Opts[m].Cod.concat("_").concat(y[b].AttrVal));break;case"CL":break;default:for(var C=0;C<v.Opts.length;C++)"BO"!==v.Cod&&"IO"!==v.Cod&&"PK"!==v.Cod&&f.push(v.Opts[C].Cod)}}for(g=0;g<c.ColInDatas.length;g++){var x=c.ColInDatas[g];i(x,o)||p.push(x.IntCode.concat("_").concat(x.ColCode))}for(g=0;g<c.OptDatas.length;g++){var E=c.OptDatas[g];i(E,o)||h.push(E.CodOpt)}var S=a.intersection(p,u),w=a.intersection(h,f);S.length>0&&(e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod].OrdInvalidIntColList=S),w.length>0&&(e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod].OrdInvalidOptList=w),S.length>0||w.length>0||e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.push(c.Cod)}}}e.timeEnd("ECommerceValidVehicle - end")}},e.getCMData=function(){"use strict";return t},e.getQMData=function(){"use strict";return n};var f=function(t,n,r,i){"use strict";var o=!1;e.log.debug(e.apiName+".selectScope - begin");try{var a=e.scopeConfig.Brand[t]?e.scopeConfig.Brand[t].Cod:null,s=a&&e.scopeConfig.Brand[t]&&e.scopeConfig.Brand[t].Mkt[n]?e.scopeConfig.Brand[t].Mkt[n].Cod:null,l=a&&e.scopeConfig.Brand[t]&&e.scopeConfig.Brand[t].Mkt[n]&&e.scopeConfig.Brand[t].Mkt[n].Lng[r]?e.scopeConfig.Brand[t].Mkt[n].Lng[r].Cod:null,c=e.scopeConfig.Env.envList.includes(i.toLowerCase())?i.toLowerCase():null;a&&s&&l&&c&&(e.Scope=s+l+a,e.Env=c,e.BrandName=t,e.BrandCod=a,e.MarketName=n,e.LangName=r,o=!0),e.log.info(e.apiName+".selectScope - me_.Scope:["+e.Scope+"] scopeFound:["+o+"]")}catch(t){e.log.error(e.apiName+".selectScope - ERROR["+t.message+"]");var u=ue(!1,594,"InitScope - selectScope ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(u)}return o},h=function(){"use strict";var t=e.scopeConfig.Env[e.Env].RelEnvPrev,n={fccfC3:{},sccfC2:{},sccfC2evo:{},s4fC2evo:{}};n.fccfC3.revproxy=e.scopeConfig.Env.ProxySlug+"fiat/"+t+"/data/fccf_mv/scopeJson/"+e.Scope+".json",n.fccfC3.absolute=e.scopeConfig.Env[t].NSAbsSlugPath+"fiat.it/"+e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeJson/"+e.Scope+".json",n.fccfC3.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeJson/"+e.Scope+".json",n.sccfC2.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/sccf/scope/"+e.Scope+".json",n.sccfC2.absolute=e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".at/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",n.sccfC2.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json";var r=e.scopeConfig.Env.ProxySlugEvo,i=e.scopeConfig.Env[e.Env].SiteEnv,o=r+i+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/sccf/scope/"+e.Scope+".json";return n.sccfC2evo.revproxy=o,n.sccfC2evo.absolute=e.scopeConfig.Env.ConfigUrl+o,n.sccfC2evo.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",o=r+i+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/fccf_mv/scope/"+e.Scope+".json",n.s4fC2evo.revproxy=o,n.s4fC2evo.absolute=e.scopeConfig.Env.ConfigUrl+o,n.s4fC2evo.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",n[e.scopeConfig.Mode.initScopeType][e.scopeConfig.Env.ContextMode]},g=function(){"use strict";var t,n={fccfC3:{},sccfC2:{},sccfC2evo:{},s4fC2evo:{}};n.fccfC3.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/fccf_mv/",n.fccfC3.absolute="fiatprofessional"!==e.BrandName?e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".it/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF:e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".com/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF,n.fccfC3.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF,n.sccfC2.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/sccf/",n.sccfC2.absolute="fiatprofessional"!==e.BrandName?e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".at/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS:e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".com/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,n.sccfC2.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS;var r=e.scopeConfig.Env.ProxySlugEvo,i=e.scopeConfig.Env[e.Env].SiteEnv,o=r+i+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/sccf/";return n.sccfC2evo.revproxy=o,n.sccfC2evo.absolute=e.scopeConfig.Env.ConfigUrl+o,n.sccfC2evo.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,o=r+i+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/fccf_mv/",n.s4fC2evo.revproxy=o,n.s4fC2evo.absolute=e.scopeConfig.Env.ConfigUrl+o,n.s4fC2evo.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,t=n[e.scopeConfig.Mode.initScopeType][e.scopeConfig.Env.ContextMode],e.log.debug(">>>>>>>>> prePath_:["+t+"]"),t},v=function(t,n,r){"use strict";var i=t.toString().split("/");10===i.length?e.mbPath=n+i[6]+"/"+i[7]+"/"+i[8]+"/"+i[9]+"/CM_T5_"+e.Scope+"_"+r+".json":e.mbPath=n+i[1]+"/"+i[2]+"/"+i[3]+"/"+i[4]+"/CM_T5_"+e.Scope+"_"+r+".json",0===n.indexOf("https://www.tofas.it")&&(e.mbPath="https://otomobil.fiat.com.tr/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF+i[6]+"/"+i[7]+"/"+i[8]+"/"+i[9]+"/CM_T5_"+e.Scope+"_"+r+".json?brand=tofas")},m=function(){"use strict";var t={method:"HEAD",mode:"cors",headers:{"Access-Control-Allow-Origin":"*",Accept:"application/json","Content-Type":"application/json"},withCredentials:!1,crossdomain:!0};return"absolute"===e.scopeConfig.Env.ContextMode&&(t.headers.Cookie="cc_cookie=cookieisset;path=/;"),t},y=function(){if(t.Header&&t.Header.Scope&&t.Header.Scope.Brand&&t.Header.Scope.Market&&t.Header.Scope.Language&&(!e.fccf.Scope.Brand||!e.fccf.Scope.Brand.Cod)){var n=t.Header.Scope.Brand.Cod?t.Header.Scope.Brand.Cod:null,r=t.Header.Scope.Market.Cod?t.Header.Scope.Market.Cod:null,i=t.Header.Scope.Language.Cod?t.Header.Scope.Language.Cod:null,o=a.findKey(e.scopeConfig.Brand,["Cod",n]),s=o?a.findKey(e.scopeConfig.Brand[o].Mkt,["Cod",r]):null,l=o&&s?a.findKey(e.scopeConfig.Brand[o].Mkt[s].Lng,["Cod",i]):null;e.fccf.Header&&e.fccf.Header.Scope&&o&&s&&l&&(e.BrandName=o,e.MarketName=s,e.LangName=l,e.fccf.Scope.Brand=e.fccf.Header.Scope.Brand,e.fccf.Scope.Brand.Key=e.BrandName,e.fccf.Scope.Brand.DataType=e.scopeConfig.Brand[e.BrandName].DataType,e.fccf.Scope.Market=e.fccf.Header.Scope.Market,e.fccf.Scope.Market.Key=e.MarketName,e.fccf.Scope.Language=e.fccf.Header.Scope.Language,e.fccf.Scope.Language.key=e.LangName)}},b=function(e,t){"use strict";for(var n=0;n<e.length;n++)t[e[n].AttrCod]||(t[e[n].AttrCod]=[]),t[e[n].AttrCod].push(e[n].AttrVal.toString())},C=function(){"use strict";for(var n=t.MarketBrand.DcTypes,r=0;r<n.length;r++)for(var i=n[r],o=i.DcTypeCod,a=i.Itms,s=0;s<a.length;s++){var l=a[s].ItmCod,c=a[s].ItmDes.toString(),u=a[s]&&a[s].ItmSeq?a[s].ItmSeq.toString():"";if(e.dcTypeMap.set(o+l,c),"OG"===o){var d={};d.Des=c,d.Seq=u,e.dictOgMap.set(l,d)}"CT"===o&&e.dictBodyCtMap.set(l,c),"CG"===o&&e.dictBodyCgMap.set(l,c),"IT"===o&&e.dictSeatItMap.set(l,c),"IG"===o&&e.dictSeatIgMap.set(l,c)}},x=function(){"use strict";e.fccf.ComMod.CommonData.FeatureTypes={};for(var n=t.MarketBrand.FtTypeCats,r=0;r<n.length;r++)for(var i=n[r],o=i.FtTypeCatCod,a=i.FtTypeCatDes.toString(),s=i.FtTypes,l=0;l<s.length;l++){var c=s[l],u=c.FtTypeCod;c.FtTypeCatCod=o,c.FtTypeCatDes=a,e.ftTypeMap.set(u,c),e.fccf.ComMod.CommonData.FeatureTypes[u]={},e.fccf.ComMod.CommonData.FeatureTypes[u]=c}},E=function(){"use strict";e.fccf.ComMod.CommonData.OptionGroups={},e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES={},e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS={},e.fccf.ComMod.CommonData.OptionGroups.BODYCT={},e.fccf.ComMod.CommonData.OptionGroups.BODYCG={},e.fccf.ComMod.CommonData.OptionGroups.SEATIT={},e.fccf.ComMod.CommonData.OptionGroups.SEATIG={},e.dictOgMap.forEach((function(t,n){var r={};"string"==typeof t&&(r.Des=t.toString(),r.DSeq=""),"object"==typeof t&&(r.Des=t.Des.toString(),r.DSeq=t.Seq.toString());var i=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS[n]:d.MapConfig[0].OPTGROUPS[n];i&&i.Key?(r.Cod=i.Key,r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),r.Type="CONFIGKEYS",e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[i.Key]=r):(i&&!i.Key?r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()):(d.MapConfig.all&&d.MapConfig.all.CATGROUPS?i=d.MapConfig.all.CATGROUPS[n]:d.MapConfig[0]&&d.MapConfig[0].CATGROUPS&&(i=d.MapConfig[0].CATGROUPS[n]),i&&i.Key?(r.Cod=i.Key,r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),r.isChgVis=!i.isChgVis||JSON.parse(i.isChgVis.toLowerCase())):(r.isVisible=!0,r.isChgVis=!0)),r.Cod=n,r.Type="CATEGORIES",e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[n]=r)}));var t=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS.NOTIN:d.MapConfig[0].OPTGROUPS.NOTIN;t&&((n={}).Cod=t.Key,n.isVisible=JSON.parse(t.isOutsideVis.toLowerCase()),n.Type="CONFIGKEYS",n.Des=t.Des,e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[n.Cod]=n);var n,r=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS.NONE:d.MapConfig[0].OPTGROUPS.NONE;r&&((n={}).Cod=r.Key,n.isVisible=JSON.parse(r.isOutsideVis.toLowerCase()),n.Type="CONFIGKEYS",n.Des=r.Des,e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[n.Cod]=n);z(e.dictBodyCtMap,"BODYCT",e.fccf.ComMod.CommonData.OptionGroups.BODYCT),z(e.dictBodyCgMap,"BODYCG",e.fccf.ComMod.CommonData.OptionGroups.BODYCG),z(e.dictSeatItMap,"SEATIT",e.fccf.ComMod.CommonData.OptionGroups.SEATIT),z(e.dictSeatIgMap,"SEATIG",e.fccf.ComMod.CommonData.OptionGroups.SEATIG)},S=function(){"use strict";var n=t.ComMod.VehGroups,r=[];e.fccf.ComMod.CommonData.VehicleGroups={},e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS={},e.fccf.ComMod.CommonData.VehicleGroups.MODELYEARS={},e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel={},e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle={},e.fccf.ComMod.CommonData.VehicleGroups.Trim={},e.fccf.ComMod.CommonData.VehCods=[];for(var i=0;i<n.length;i++){var o,s=n[i];e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod]={},e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].Cod=s.VehGroupCod,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].Des=s.VehGroupDes.toString(),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].VehCods=s.VehCods,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].AddAttrs=[],e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].SRelOpts=[],e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].URelOpts=[],d.MapConfig.all&&d.MapConfig.all.VEHGROUPS?o=d.MapConfig.all.VEHGROUPS[s.VehGroupCod]:d.MapConfig[0]&&d.MapConfig[0].VEHGROUPS&&(o=d.MapConfig[0].VEHGROUPS[s.VehGroupCod]),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].isVisible=!o||JSON.parse(o.isOutsideVis.toLowerCase()),b(s.AddAttrs,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].AddAttrs),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].SRelOpts=s.SRelOpts?s.SRelOpts:[],e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].URelOpts=s.URelOpts?s.URelOpts:[],r=a.union(r,s.VehCods)}if(e.fccf.ComMod.CommonData.VehCods=r,e.fccf.ComMod.CommonData.VehicleGroups.Trim=e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS,t.ComMod.Groups&&t.ComMod.Groups.DerivedModel){var l=t.ComMod.Groups.DerivedModel;for(i=0;i<l.length;i++){var c=l[i];e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[c.Cod]={},e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[c.Cod].Cod=c.Cod,e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[c.Cod].Des=c.Des.toString(),e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[c.Cod].VehCods=c.VehCods}}if(t.ComMod.Groups&&t.ComMod.Groups.BodyStyle){var u=t.ComMod.Groups.BodyStyle;for(i=0;i<u.length;i++){var p=u[i];e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod]={},e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].Cod=p.Cod,e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].Des=p.Des.toString(),e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].VehCods=p.VehCods}}},w=function(){"use strict";var n;e.BAttrs=t.ComMod.BAttrs,e.fccf.ComMod.CommonData.BaseAttribute={},e.log.debug(e.apiName+".populateFccf - Populate Base Attributes"),n=e.BAttrs;for(var r=0;r<n.length;r++){var i=n[r];switch(i.BAttrType){case"F":var o=e.ftTypeMap.get(i.BAttrCod);if(o){i.BAttrDes=o.FtTypeDes.toString();for(var a=0;a<i.BAttrVals.length;a++){var s=i.BAttrVals[a];if(o.Fts.length>0)for(var l=0;l<o.Fts.length;l++){var c=o.Fts[l];if(s.BAttrValCod===c.FtCod){s.BAttrValDes=c.FtDes.toString(),_(i,s);break}}else s.BAttrValCod=s.BAttrValDes.toString().replace(/\s+/g,""),_(i,s);Q(s,0)}}break;case"V":for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];_(i,s),Q(s,0)}break;case"O":var u=e.dcTypeMap.get("OG".concat(i.BAttrCod));i.BAttrDes=u.toString();for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];var d=e.dcTypeMap.get("OD".concat(s.BAttrValCod));s.BAttrValDes=d||"",_(i,s),Q(s,0)}break;case"D":for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];_(i,s),Q(s,0)}}M(i)}},V=function(t){"use strict";var n=O(t);A(n),e.fccf.Vehicles[t.Cod]=n},R=function(){"use strict";e.log.debug(e.apiName+".populateFccf - Populate Vehicles "),e.fccf.Vehicles={};for(var n=t.Vehs,r=0;r<n.length;r++){var i=n[r];V(i)}},O=function(n){"use strict";var r={};r.Cod=n.Cod?n.Cod.toString():"",r.BaseCod=n.BaseCod?n.BaseCod.toString():"",r.Des=n.Des?n.Des.toString():"",r.UseCod=n.UseCod?n.UseCod.toString():"",r.FamBudget=n.FamBudget?n.FamBudget.toString():"",r.CompVis=n.CompVis?n.CompVis.toString():"",r.Price=n.Price,r.PriceArray=n.PriceArray,r.ECommStartDate=n.EcomStartDate?n.EcomStartDate.toString():"",r.ECommEndDate=n.EcomEndDate?n.EcomEndDate.toString():"",r.isECommDateOpen=e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList?e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList.includes(r.Cod):null,null!==e.ECommOrdValidOverride?r.isECommOrdValid=e.ECommOrdValidOverride:r.isECommOrdValid=e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList?e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.includes(r.Cod):null,Q(r,2),k(r,n),T(r,n),r.VehGroup={};for(var i=t.ComMod.VehGroups,o=0;o<i.length;o++){var s=i[o];if(-1!==s.VehCods.indexOf(r.Cod)){r.VehGroup.VERSIONS={},r.VehGroup.VERSIONS.Cod=s.VehGroupCod,r.VehGroup.VERSIONS.Des=s.VehGroupDes.toString(),r.VehGroup.Trim={},r.VehGroup.Trim.Cod=s.VehGroupCod,r.VehGroup.Trim.Des=s.VehGroupDes.toString();break}}if(t.ComMod.Groups&&t.ComMod.Groups.DerivedModel)for(var l=t.ComMod.Groups.DerivedModel,c=0;c<l.length;c++){var d=l[c];if(-1!==d.VehCods.indexOf(r.Cod)){r.VehGroup.DerivedModel={},r.VehGroup.DerivedModel.Cod=d.Cod,r.VehGroup.DerivedModel.Des=d.Des.toString();break}}if(t.ComMod.Groups&&t.ComMod.Groups.BodyStyle){var p=t.ComMod.Groups.BodyStyle;for(c=0;c<p.length;c++){var f=p[c];if(-1!==f.VehCods.indexOf(r.Cod)){r.VehGroup.BodyStyle={},r.VehGroup.BodyStyle.Cod=f.Cod,r.VehGroup.BodyStyle.Des=f.Des.toString();break}}}var h=r.Cod;e.Vehicles[h]={},e.Vehicles[h].Options={},e.Vehicles[h].OptionGroupsCod={},r.OptionGroups={},r.OptionGroups.WHEEL||(r.OptionGroups.WHEEL={});for(var g=0;g<n.OptGroups.length;g++){var v=n.OptGroups[g];I(v),v.Options={};var m=D(h,v.Cod);r.OptionGroups[m]||(r.OptionGroups[m]={});for(var y=0;y<v.Opts.length;y++){var C=v.Opts[y];if(C.OptGroupCod=v.Cod,Q(C,3),C.NodeCod=v.Cod.concat("-").concat(C.Cod),e.Vehicles[h].Options[C.NodeCod]=C,v.Options[C.NodeCod]=C,m&&(!P(h)||P(h)&&0==n.Packs.filter((function(e){return e.Cod===C.Cod})).length)){if(r.OptionGroups[m]||(r.OptionGroups[m]={}),r.OptionGroups[m].Options||(r.OptionGroups[m].Options={}),C.OptGroupKey=m,r.OptionGroups[m].Key=m,r.OptionGroups[m].Options[C.NodeCod]=C,C.AddAttrs){var x={};b(C.AddAttrs,x),r.OptionGroups[m].Options[C.NodeCod].AddAttrs=x}N(n.OptGroups,C.Cod,m,C.NodeCod)&&(r.OptionGroups[m].Options[C.NodeCod].isVisible=!1)}}if(m&&"BODY"===m&&r.OptionGroups[m]&&r.OptionGroups[m].Options){var E=a.toArray(r.OptionGroups[m].Options);E=a.sortBy(E,["Des"]),r.OptionGroups[m].Options=a.chain(E).keyBy("NodeCod").value()}e.Vehicles[h].OptionGroupsCod[v.Cod]=v}B(r,n),r.Options=e.Vehicles[h].Options;var S=P(h);if(S&&S.Key&&!r.OptionGroups[S.Key]&&(r.OptionGroups[S.Key]={},r.OptionGroups[S.Key].Key=S.Key,S.isPack))for(var w in r.OptionGroups[S.Key].Options={},r.Options)r.Packs[w]&&(r.OptionGroups[S.Key].Options[w]=r.Options[w]);return u[h]=[],u[h]=n&&n.VehRule&&n.VehRule.AndRules?n.VehRule.AndRules:[],r},A=function(t){"use strict";for(var n in t.OptionLMFICodes={},t.Options)if(!(n.startsWith("BO-")||n.startsWith("IO-")||t.Options["BO-"+t.Options[n].Cod]&&"PACK"!=t.Options[n].OptGroupKey||t.Options["IO-"+t.Options[n].Cod]&&"PACK"!=t.Options[n].OptGroupKey)){if(t.Options[n].CodLMFI=[],t.Options[n]&&t.Options[n].AddAttrs&&t.Options[n].AddAttrs.RO&&t.Options[n].AddAttrs.RO.length>1&&t.OptionGroups.PACK&&t.OptionGroups.PACK.Options&&a.map(t.OptionGroups.PACK.Options,"Cod").includes(t.Options[n].AddAttrs.RO[0])){var r=t.Options[n].AddAttrs.RO.shift();t.Options[n].AddAttrs.RO.push(r)}if(t.Options[n]&&t.Options[n].AddAttrs&&t.Options[n].AddAttrs.RO&&t.Options[n].AddAttrs.RO.length>1){e.log.debug("veh.Options[optKey_].AddAttrs['RO'] :"+t.Options[n].AddAttrs.RO+"]");for(var i=t.Options[n].AddAttrs.RO,o=a.values(t.Options),s=[],l=0;l<i.length;l++){var c={};c.Cod=i[l],c.NodeCod=a.find(o,{Cod:c.Cod}).NodeCod,e.log.debug("pCompEle_.NodeCod:["+c.NodeCod+" - veh.Options[pCompEle_.NodeCod] :"+JSON.stringify(t.Options[c.NodeCod])),c.Price=t.Options[c.NodeCod].Price?t.Options[c.NodeCod].Price.toString():null,s.push(c)}var u=a.orderBy(s,"Price","asc"),d=a.map(u,"Cod");t.Options[n].AddAttrs.RO=d}if(n.startsWith("CL-"))if(t.Options[n].AddAttrs.RO)for(var p in t.Options[n].AddAttrs.RO)t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]]={},t.Options[n].AddAttrs.RO.length<2?(t.Options[n].PriceLmfi=t.Options["BO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["BO-"+t.Options[n].AddAttrs.RO[p]].PriceLmfi:null,t.Options[n].PriceNoVatLmfi=t.Options["BO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["BO-"+t.Options[n].AddAttrs.RO[p]].PriceNoVatLmfi:null):(t.Options[n].PriceLmfi="nan",t.Options[n].PriceNoVatLmfi="nan"),t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]].CodLMFI.push(t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]);else t.Options[n].AddAttrs.RO=[],t.OptionLMFICodes[t.Options[n].Cod+"$-"]={},t.OptionLMFICodes[t.Options[n].Cod+"$-"]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"$-"].CodLMFI.push(t.Options[n].Cod+"$-");else if(n.startsWith("IN-"))if(t.Options[n].AddAttrs.RO)for(var p in t.Options[n].AddAttrs.RO)t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]]={},t.Options[n].AddAttrs.RO.length<2?(t.Options[n].PriceLmfi=t.Options["IO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["IO-"+t.Options[n].AddAttrs.RO[p]].PriceLmfi:null,t.Options[n].PriceNoVatLmfi=t.Options["IO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["IO-"+t.Options[n].AddAttrs.RO[p]].PriceNoVatLmfi:null):(t.Options[n].PriceLmfi="nan",t.Options[n].PriceNoVatLmfi="nan"),t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]].CodLMFI.push(t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]);else t.Options[n].AddAttrs.RO=[],t.OptionLMFICodes[t.Options[n].Cod+"#-"]={},t.OptionLMFICodes[t.Options[n].Cod+"#-"]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"#-"].CodLMFI.push(t.Options[n].Cod+"#-");else t.OptionLMFICodes[t.Options[n].Cod]={},t.OptionLMFICodes[t.Options[n].Cod]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod].CodLMFI.push(t.Options[n].Cod)}},k=function(t,n){"use strict";t.FeatureCategories={};for(var r=0;r<n.VehFts.length;r++){var i=n.VehFts[r],o={},s=i.TypeCod,l=e.ftTypeMap.get(s);if(l){if(o.Cod=l.FtTypeCod,o.Des=l.FtTypeDes.toString(),i.AddAttrs){var c={};b(i.AddAttrs,c),o.AddAttrs=c}if(i.Val&&0!==i.Val.length)o.Value=i.Val,o.ValueCod=i.Cod;else{var u=a.findIndex(l.Fts,["FtCod",i.Cod]);o.Value=-1!==u?l.Fts[u].FtDes:i.Val,o.ValueCod=-1!==u?l.Fts[u].FtCod:i.Cod}t.FeatureCategories[l.FtTypeCatCod]||(t.FeatureCategories[l.FtTypeCatCod]={},t.FeatureCategories[l.FtTypeCatCod].Cod=l.FtTypeCatCod,t.FeatureCategories[l.FtTypeCatCod].Des=l.FtTypeCatDes,t.FeatureCategories[l.FtTypeCatCod].Features={}),t.FeatureCategories[l.FtTypeCatCod].Features[l.FtTypeCod]=o}else e.log.warn(e.apiName+".createVehicleRuleEngine - Empty popVehFeatures ERROR: ftTypeCod_"+s+" - "+t.Cod)}},T=function(t,n){"use strict";for(var r=e.getBaseAttributeByVehicle(t.Cod),i=d.MapConfig.all?d.MapConfig.all.BASEATTRS:d.MapConfig[0].BASEATTRS,o=d.MapConfig[t.Cod]&&d.MapConfig[t.Cod].BASEATTRS?d.MapConfig[t.Cod].BASEATTRS:i,a=0;a<r.length;a++){var s=r[a];if(s){var l={},c=o[s.BAttrCod]&&o[s.BAttrCod].Key?o[s.BAttrCod].Key:s.BAttrCod,u=o[s.BAttrCod]&&o[s.BAttrCod].KeyDes?o[s.BAttrCod].KeyDes:s.BAttrDes;l.Key=c,l.KeyDes=u,l.Cod=s.BAttrCod,l.Des=s.BAttrDes,l.Values={},l.Values[s.BAttrValCod]={},l.Values[s.BAttrValCod].Cod=s.BAttrValCod,l.Values[s.BAttrValCod].Des=s.BAttrValDes,t.BaseAttributes||(t.BaseAttributes={}),t.BaseAttributes[c]=l}}},D=function(e,t){"use strict";var n=null,r=d.MapConfig.all?d.MapConfig.all.OPTGROUPS:d.MapConfig[0].OPTGROUPS,i=d.MapConfig[e]?d.MapConfig[e].OPTGROUPS:r;return i&&i[t]?n=i[t].Key:i.NOTIN&&(n=i.NOTIN.Key),n},N=function(e,t,n,r){"use strict";if("BODY"===n||"SEAT"===n||"BODYOPT"===n||"SEATOPT"===n||"PACK"===n)return!1;var i=e.filter((function(e){return"BO"===e.Cod||"IO"===e.Cod}));if(i&&i.length>0)for(var o=0;o<i.length;o++){if(i[o].Opts.filter((function(e){return e.Cod===t})).length>0)return!0}return!1},P=function(e){"use strict";var t=null,n=d.MapConfig.all?d.MapConfig.all.OPTGROUPS:d.MapConfig[0].OPTGROUPS,r=d.MapConfig[e]?d.MapConfig[e].OPTGROUPS:n;return r&&r.NONE&&(t=r.NONE),t},B=function(t,n){"use strict";var r=t.Cod,i=n.Packs;t.Packs={};for(var o=0;o<i.length;o++){var s=a.findKey(e.Vehicles[r].Options,["Cod",i[o].Cod]),l=e.Vehicles[r].Options[s];if(l){for(var c={OptRelCods:[]},u=0;u<i[o].OptRelCods.length;u++)for(var d=i[o].OptRelCods[u],p=0;p<n.OptGroups.length;p++){var f=n.OptGroups[p];if("CL"!=f.Cod&&"IN"!=f.Cod)for(var h=0;h<f.Opts.length;h++){var g=f.Opts[h];if(d==g.Cod){var v=f.Cod.concat("-").concat(g.Cod);"BO"!==f.Cod&&"IO"!==f.Cod&&(c.OptRelCods.push(v),g.ContainerPackCod=l.NodeCod,"PK"===f.Cod&&l.isStandard&&(g.isStandard=!0))}}}c.NodeCod=l.OptGroupCod.concat("-").concat(i[o].Cod),t.Packs[c.NodeCod]=c}}},_=function(t,n){"use strict";var r=t.BAttrCod+"_"+n.BAttrValCod;e.bAttrValMap.set(r,{BAttrCod:t.BAttrCod,BAttrDes:t.BAttrDes,BAttrValCod:n.BAttrValCod,BAttrValDes:n.BAttrValDes}),e.BaseAttrValues[r]=n},M=function(t){"use strict";var n=d.MapConfig.all?d.MapConfig.all.BASEATTRS:d.MapConfig[0].BASEATTRS;if(n[t.BAttrCod]){var r=n[t.BAttrCod].Key;t.Key=r;var i={};i.Key=t.Key,i.Cod=t.BAttrCod,i.Des=n[t.BAttrCod].Des?n[t.BAttrCod].Des:t.BAttrDes.toString(),i.Type=t.BAttrType,i.Values={},i.ValKeys={};for(var o=0;o<t.BAttrVals.length;o++)i.Values[t.BAttrVals[o].BAttrValCod]=t.BAttrVals[o];i.ValKeys=Object.keys(i.Values),e.fccf.ComMod.CommonData.BaseAttribute[r]=i}e.BaseAttributes[t.BAttrCod]=t},I=function(t){"use strict";var n=e.dcTypeMap.get("OG".concat(t.Cod));n&&(t.Des=n)};e.createVehicleRuleEngine=function(n){"use strict";var r;if(e.timeEnd(),e.log.debug(e.apiName+".createVehicleRuleEngine - begin"),e.timeBegin(),t&&t.Vehs){r='$.Vehs[?(@.Cod=="'+n+'")].VehGraph.*';var i=l.query(t,r);if(e.timeEnd(),i&&i.length>0)e.log.info(e.apiName+".createVehicleRuleEngine - Valid Vehicle Data - Found Vehicle:["+n+"]"),e.ruleEngine=new c,e.ruleEngine.init(i,e.cytoVehicleDiv,e.selectionLogDiv,e.log,e.configVehicleRuleEngine);else{e.log.error(e.apiName+".createVehicleRuleEngine - Empty vehicleGraphData ERROR ");var o=ue(!1,560,"setVehicle ERROR - vehicleGraphData empty or invalid",{});e.isValidSetVeh=!1,e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(o)}}},e.configVehicleRuleEngine=function(){"use strict";e.timeEnd(),e.log.debug(e.apiName+".configVehicleRuleEngine - begin"),e.timeBegin();var t=ue(!0,200,"",{});e.ruleEngine&&e.BrandName&&(e.ruleEngine.dtype=e.BrandName&&e.scopeConfig.Brand[e.BrandName].DataType),U(),e.ruleEngine.AndRules=u[e.MVS];var n=e.addStandardOpts(),r=e.getBaseAttributeByVehicle(e.MVS).map((function(e){return e?e.BAttrCod+"_"+e.BAttrValCod:""})),i=e.BaseAttrValues;for(var o in i)i[o]&&(i[o].isSelected=-1!==r.indexOf(o));for(var a in e.fccf.Vehicles){var s=e.fccf.Vehicles[a];s.isSelected=s.Cod===e.MVS}e.log.debug(e.apiName+".configVehicleRuleEngine - end"),n.success?e.isValidSetVeh=!0:(e.isValidSetVeh=!1,t=n),e.onSetVehicleCallback(t)},e.addStandardOpts=function(){"use strict";var t=ce();t=ue(!0,200,"",{});try{if(X(),e.addStdOpts){var n=e.ruleEngine.cyto.collection();for(var r in e.ruleEngine.pct100List=e.ruleEngine.cyto.collection(),e.Vehicles[e.MVS].Options){var i=e.Vehicles[e.MVS].Options[r];if(i.isStandard)(o=e.ruleEngine.cyto.getElementById(i.NodeCod)).data("isStandard",!0),o.data("isMandatory",i.isMandatory),n=n.union(o);if(i.OptGroupCod&&d.OptGroupCod[i.OptGroupCod]){i.getRefColOptIdList=function(){if(d.RefColByGraph){var t=e.ruleEngine.cyto.getElementById(this.NodeCod).outgoers("edge[type='V']","edge[type='A']").targets(),n=[];t.forEach((function(e){n.push(e.id())}))}else for(var r=this.AddAttrs,i=(n=[],0);i<r.length;i++){var o=r[i];"RO"===o.AttrCod&&n.push(o.AttrCod)}return n}}if(i.is100Pct){var o=e.ruleEngine.cyto.getElementById(i.NodeCod);e.ruleEngine.pct100List=e.ruleEngine.pct100List.union(o)}}if(n.size()>0){e.ruleEngine.tassativi=n.filter((function(e){if(e.data().isMandatory)return e})),e.ruleEngine.tiedStdMandNodeList=n.filter((function(e){if(e.data().isMandatory&&(e.incomers().nonempty()||e.outgoers().nonempty()))return e})),e.ruleEngine.uEAE();let r=e.ruleEngine.addDtoPReturnEdge();r.success&&r.data.forEach((function(t){e.Vehicles[e.MVS].Options[t].isUserSelectable=!0}));var a=e.ruleEngine.ruleNodeList(n,e.ruleEngine.cyto.collection(),!0);a.success||(e.log.error(e.apiName+".addStandardOpts - Standard Nodes add ERROR["+a.message+"]"),t=ue(!1,530,a.message,{}))}G(),e.log.debug(e.apiName+".addStandardOpts - Option List length:["+Object.keys(e.Vehicles[e.MVS].Options).length+"]")}e.timeEnd(" addStandardOpts END")}catch(n){e.isValidSetVeh=!1,t=ue(!1,530,n.message,{}),e.log.error(e.apiName+".addStandardOpts - Standard Nodes add ERROR["+n.message+"]")}return t},e.VehicleGraphOverride={Config:null,getConfig:function(){"use strict";return this.Config},setConfig:function(e){"use strict";this.Config=e},override:function(){"use strict";var t=this.Config;if(t&&t.length>0)for(var n=0;n<t.length;n++){var r=t[n];if(r.mvs&&"all"===r.mvs||r.mvs===e.MVS)switch(r.action){case"delete":if(r.elem&&r.elem.group&&r.elem.data&&"edges"===r.elem.group){var i='edge[type="'+r.elem.data.type+'"][source="'+r.elem.data.source+'"][target="'+r.elem.data.target+'"]',o=e.ruleEngine.cyto.elements(i);e.log.debug(e.apiName+".setVehicleGraphOverride ["+o.length+"]"),e.ruleEngine.cyto.remove(o)}break;case"insert":r.elem&&r.elem.group&&r.elem.data&&"edges"===r.elem.group&&e.ruleEngine.cyto.add(r.elem)}}}},e.applyBaseAttrsChange=function(t){"use strict";var n,r,i;if(e.log.info(e.apiName+".applyBaseAttributes - begin - ChangeRequest["+$(t)+"]"),n=ce(),t&&t.Selections&&t.Selections.length>0){e.log.debug(e.apiName+".getVheicleByBaseAttributes - ChangeRequest.Selections.length {"+t.Selections.length+"} "),i=t.Selections;for(var o=0;o<i.length;o++){var a=i[o];if(a.Cod&&a.ChangeType){var s=e.cmRuleEngine.cyto.getElementById(a.Cod);s&&("add"===a.ChangeType?n=e.cmRuleEngine.addNode(s):"remove"===a.ChangeType&&(n=e.cmRuleEngine.removeNode(s)))}}}return U(),r=re(i),"Changes have been applied",n=ue(!0,200,"Changes have been applied",r),e.log.info(e.apiName+".applyBaseAttributes - end "),n},e.getVehiclesByBaseAttributes=function(){"use strict";var t,n,r;e.log.debug(e.apiName+".getVheicleByBaseAttributes"),ce(),r=Z(),e.log.debug(e.apiName+".getVheicleByBaseAttributes - vehicleList_.length ["+r.length+"] "),n=[];for(var i=0;i<r.length;i++){var o=ie(r[i].id(),null,null);n.push(o)}return t=re(n),"Vehicles (MVS) list",ue(!0,200,"Vehicles (MVS) list",t)},e.getVehicleNumByBaseAttrCombination=function(t){"use strict";var n,r;e.cmRuleEngine.cyto.collection();n=ce();var i=function(t,n){var r=e.cmRuleEngine.cyto.getElementById(t),i=e.cmRuleEngine.cyto.getElementById(n),o=e.cmRuleEngine.cyto.collection();if(r&&i){var a=e.cmRuleEngine.cyto.collection();a=(a=(a=a.add(r)).add(i)).union(e.cmRuleEngine.configurazione);for(var s=0;s<a.size();s++){var l=a[s];o=0===s?l.incomers("edge[type='V']").sources():o.intersection(l.incomers("edge[type='V']").sources())}}return o.size()};try{if((r={}).BaseAttrSetValues={},t&&t.Selections&&t.Selections.length>0){e.log.debug(e.apiName+".getVheicleByBaseAttributes - InfoRequest.Selections.length {"+t.Selections.length+"} ");for(var o=t.Selections,a=0;a<o.length;a++){var s=o[a];if(s.Cod){var l=e.BaseAttributes[s.Cod].BAttrVals;r.BaseAttrSetValues[s.Cod]=[],r.BaseAttrSetValues[s.Cod]=l}}r.CombinedValues=[];var c=o[0];if(c.Cod){var u=e.BaseAttributes[c.Cod].BAttrVals;for(a=0;a<u.length;a++){var d=u[a],p=o[1];if(p.Cod)for(var f=e.BaseAttributes[p.Cod].BAttrVals,h=0;h<f.length;h++){var g=f[h],v={},m=[],y=c.Cod+"_"+d.BAttrValCod,b=p.Cod+"_"+g.BAttrValCod;m.push(y),m.push(b);var C=i(y,b);v.CombBACodVals=m,v.VehNum=C,r.CombinedValues.push(v)}}}}"getVehicleNumByBaseAttrCombination ",n=ue(!0,200,"getVehicleNumByBaseAttrCombination ",r)}catch(t){n=ue(!1,546,t.message,{}),e.log.warn(e.apiName+".getVehicleNumByBaseAttrCombination - Invalid dataResult:["+t.message+"]")}return n},e.setVehicle=function(n,r,i,o){"use strict";var s;e.log.info(e.apiName+".setVehicle - ChangeRequest["+$(n)+"]"),e.onSetVehicleCallback=r,e.onSetVehicleErrorCallback=i;var l=!0;if(!l||n&&n.Selections&&1===n.Selections.length&&n.Selections[0].Cod||(l=!1,e.isValidSetVeh=!1,s=ue(!1,510,"setVehicle ERROR[ChangeRequest malformed]",re([])),e.log.debug(e.apiName+".setVehicle ERROR[ChangeRequest malformed]"),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)),l&&(e.MVS=n.Selections[0].Cod,e.log.debug(e.apiName+".setVehicle - MVS:["+e.MVS+"] - isLazyVehLoad:["+e.isLazyVehLoad+"]"),e.Vehicles[e.MVS]&&(l=!1,e.log.debug(e.apiName+".setVehicle - found vehicle -call createVehicleRuleEngine "),e.createVehicleRuleEngine(e.MVS))),l&&o){var c=null;if(o.Cod&&o.Cod===e.MVS)try{t.Vehs.push(o);var u=t.Vehs;(c=a.filter(u,["Cod",e.MVS])[0])&&(l=!1,V(c),e.createVehicleRuleEngine(e.MVS))}catch(t){e.log.debug(e.apiName+".setVehicle ERROR - cmVeh invalid["+t.message+"]")}c||(l=!1,e.isValidSetVeh=!1,s=ue(!1,512,"setVehicle ERROR[vehicleDataSource MVS inchoerency]",{}),e.log.debug(e.apiName+".setVehicle ERROR - vehicleDataSource MVS inchoerency "),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s))}l&&e.isLazyVehLoad&&(l=!1,e.log.debug(e.apiName+".setVehicle - LAZY load - load Vehicle Data "),e.getMVSDataCall(e.MVS)),l&&(e.isValidSetVeh=!1,s=ue(!1,514,"setVehicle ERROR[Vehicle NOT found]",{}),e.log.debug(e.apiName+".setVehicle ERROR[Vehicle NOT found]"),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)),e.log.debug(e.apiName+".setVehicle - end")},e.testChange=function(t,n){"use strict";var r,i,o,a,s;e.log.info(e.apiName+".testChange - begin - ChangeRequest["+$(t)+"]"),r=ce(),o=e.getVersion()+" - ",s=[];try{if(t&&t.Selections&&t.Selections.length>0)if(e.log.debug(e.apiName+".testChange - ChangeRequest.Selections.length {"+t.Selections.length+"} "),a=t.Selections,p){var l=te(a),c={},u={addList:l.toAddList,removeList:l.toRemoveList};c=n&&"number"==typeof n&&n>=1?e.ruleEngine.processRuleActResMaxIterDepth(u,e.maxIter,n,!1):"number"==typeof n&&0===n?e.ruleEngine.ruleNodeList(l.toAddList,l.toRemoveList,!1):e.ruleEngine.processRuleActResMaxIterDepth(u,e.maxIter,e.sDepth,!1),l.addictionalData&&l.addictionalData.InPack&&(c.code=c.success?230:530),s=ae(c,l.toAddCodList,l.toRemoveCodList),r=ue(c.success,c.code,o+c.message,{ChangeScenarios:s,Extra:c.data.extra})}else{e.ruleEngine.checkConfigurazione=e.ruleEngine.configurazione,e.ruleEngine.incompatibiliConCheckConfig=e.ruleEngine.incompatibiliConConfig;for(var d=0;d<a.length;d++){var f=a[d],h=ne(f);if(1===h.length&&([],"add"===f.ChangeType?i=e.ruleEngine.checkAddNode(h):"remove"===f.ChangeType&&(i=e.ruleEngine.checkRemoveNode(h)),o+=i.message,s=oe(i,h,f.ChangeType,s),!i.success))break}r=ue(!0,201,o,{ChangeScenarios:s})}W(r,t)}catch(t){e.log.error(e.apiName+".testChange ERROR {"+t.stack+"} ")}return e.log.info(e.apiName+".testChange - end - result["+$(r)+"]"),r};var F=function(t){if(t&&t.Selections&&t.Selections.length>0){changeList_=t.Selections;for(var n=[],r=0;r<changeList_.length;r++){var i=changeList_[r];if(i.Cod.includes("$")||i.Cod.includes("#")){if(i.Cod.includes("$")){var o,a="CL-"+i.Cod.substring(0,i.Cod.indexOf("$")),s=i.Cod.substring(i.Cod.indexOf("$")+1);for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(s)||(o=l);if(i.Cod=a,o)(u={}).Cod=o,u.ChangeType=i.ChangeType,n.push(u)}else if(i.Cod.includes("#")){var c,u,d="IN-"+i.Cod.substring(0,i.Cod.indexOf("#")),p=i.Cod.substring(i.Cod.indexOf("#")+1);for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(p)||(c=l);if(i.Cod=d,c)(u={}).Cod=c,u.ChangeType=i.ChangeType,n.push(u)}}else{var f;for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(i.Cod)||(f=l);i.Cod=f}}n&&n.length>0&&(changeList_=changeList_.concat(n))}return t},L=function(t){if(t.data.ChangeScenarios&&t.data.ChangeScenarios.length>0)for(var n in t.data.ChangeScenarios){var r=t.data.ChangeScenarios[n],i=[];for(var o in r.Changes){var a=r.Changes[o];if(a.Cod.startsWith("CL-")||a.Cod.startsWith("IN-")){if(a.Cod.startsWith("CL-"))if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO){if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&1==e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length)a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[0];else if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length>1)for(var s in r.Changes){if(-1!=(l=r.Changes[s]).Cod.indexOf("-")){if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1))){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1)),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}else if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod)){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$-"}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1);if(a.Cod.startsWith("IN-"))if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO){if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&1==e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length)a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[0];else if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length>1)for(var s in r.Changes){var l;if(-1!=(l=r.Changes[s]).Cod.indexOf("-")){if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1))){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1)),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}else if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod)){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#-"}if(i&&i.length>0)for(var c in i)r.Changes.splice(i[c],1)}return t};e.testChangeLMFICodes=function(t,n){var r=JSON.parse(JSON.stringify(t));r=F(r);var i=e.testChange(r,n);return i=L(i)},e.applyChangeLMFICodes=function(t){var n=JSON.parse(JSON.stringify(t));n=F(n);var r=e.applyChange(n);return r=L(r)},e.applyChange=function(t){"use strict";var n,r,i,o,a;e.log.info(e.apiName+".applyChange - begin - ChangeRequest["+$(t)+"]"),n=ce(),i="",a=[];try{if(t&&t.Selections&&t.Selections.length>0){if(e.log.debug(e.apiName+".applyChange - ChangeRequest.Selections.length {"+t.Selections.length+"} "),o=t.Selections,p){var s=te(o),l={};l=e.ruleEngine.ruleNodeList(s.toAddList,s.toRemoveList,!0),s.addictionalData&&s.addictionalData.InPack&&(l.code=l.success?230:530),a=ae(l,s.toAddCodList,s.toRemoveCodList,!0),n=ue(l.success,l.code,l.message,{ChangeScenarios:a,Extra:l.data.extra})}else{for(var c=0;c<o.length;c++){var u=o[c],d=ne(u);if(d&&([],"add"===u.ChangeType?r=e.ruleEngine.addNode(d):"remove"===u.ChangeType&&(r=e.ruleEngine.removeNode(d)),i+=r.message,a=oe(r,d,u.ChangeType,a,!0),!r.success))break}n=ue(!0,201,i,{ChangeScenarios:a})}G()}}catch(t){e.log.error(e.apiName+".applyChange ERROR {"+t.stack+"} ")}return e.log.info(e.apiName+".applyChange - end - result["+$(n)+"]"),n},e.getVehicleConfString=function(){"use strict";var t,n,r,i,o,a,s,l,c,u;l={},c="",u=ce();try{for(var d in t=[],n=[],r=[],i=[],o=[],a=[],s=[],e.ruleEngine.configurazione.forEach((function(n){if("AG"!==n.data().type&&"VG"!==n.data().type){t.push(n.id());var i=e.fccf.Vehicles[e.MVS].Options[n.id()];if(i&&i.NodeCod&&i.LongSrcCod){var l=i.NodeCod.split("-")[0].concat("-").concat(i.LongSrcCod);switch(r.push(l),e.dataSrcType){case"xF":i.isMandatory&&a.push(l);break;case"xP":i.is100Pct?o.push(l):"CL"===i.OptGroupCod||"IN"===i.OptGroupCod||"string"!=typeof i.Perso||"P"!==i.Perso&&""!==i.Perso||s.push(l)}}}})),e.fccf.Vehicles[e.MVS].Options){var p=e.fccf.Vehicles[e.MVS].Options[d];p.isSelected&&p.SelectedInPacks&&p.SelectedInPacks.length>0&&(n.push(d),i.push(p.NodeCod.split("-")[0].concat("-").concat(p.LongSrcCod)))}e.log.debug(e.apiName+".getVehicleConfString: ["+t+"]"),e.log.debug(e.apiName+".getVehicleConfString in pack: ["+n+"]"),l.configurazione=t,l.configurazioneInPack=n,l.srcCatConfig=r,l.srcCatConfigInPack=i,l.srcCatConfig100=o,l.srcCatConfigMand=a,l.srcCatConfigNPE=s,u=ue(!0,200,c=(c=c+" - Configuration: ( "+t+")")+" - Configuration in Pack: ( "+n+")",l)}catch(t){u=ue(!1,573,".getVehicleConfString - Conf ERROR["+t.message+"]",{}),e.log.error(e.apiName+".getVehicleConfString - Conf ERROR["+t.message+"]")}return u},e.getVehicleConfStringLmfiCodes=function(){"use strict";var t,n,r,i;r={},i="",ce(),t=[],n=[];var o=[];for(var s in e.fccf.Vehicles[e.MVS].OptionLMFICodes)!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].isSelected||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks&&0!=e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks.length||(s.includes("$")?(!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)]||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)]&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)].isSelected)&&(o.push(s.substring(s.indexOf("$")+1)),t.push(s)):s.includes("#")?(!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)]||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)]&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)].isSelected)&&(o.push(s.substring(s.indexOf("#")+1)),t.push(s)):t.push(s)),a.pullAll(t,o),e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].isSelected&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks.length>0&&n.push(s);return e.log.debug(e.apiName+".getVehicleConfStringLmfiCodes: ["+t+"]"),e.log.debug(e.apiName+".getVehicleConfStringLmfiCodes in pack: ["+n+"]"),r.configurazione=t,r.configurazioneInPack=n,ue(!0,200,i=(i=i+" - Configuration: ( "+t+")")+" - Configuration in Pack: ( "+n+")",r)},e.getVehicleOMSConf=function(){"use strict";var t,n,r,i,o;r={},i="",o=ce();try{var a={vehCod:null,extColCode:"",intColCode:"",optCodeList:[]};switch(t=e.BrandName&&e.scopeConfig.Brand[e.BrandName].DataType?e.scopeConfig.Brand[e.BrandName].DataType:null,n=e.ruleEngine.configurazione,t){case"xF":a.vehCod=e.MVS,n.forEach((function(t){if("AG"!==t.data().type&&"VG"!==t.data().type){var n=t.id(),r=e.fccf.Vehicles[e.MVS].Options[n],i=!!(r&&r.AddAttrs.TS&&r.AddAttrs.TS[0]&&"1"===r.AddAttrs.TS[0]),o=!!(r&&r.AddAttrs.SS&&r.AddAttrs.SS[0]&&"Y"===r.AddAttrs.SS[0]),s=e.ruleEngine.cyto.getElementById(n).incomers("edge[type='E']").size()>0,l=r&&r.AddAttrs.FG&&r.AddAttrs.FG[0],c=!(!l||"Y"!==r.AddAttrs.FG[0]);if(r&&(!r.isStandard||i||o||r.isStandard&&(s||c)))switch(r.OptGroupCod){case"CL":a.extColCode=r.Cod;break;case"IN":a.intColCode=r.Cod;break;default:if(!r||!l)throw new Error("Fg_Grids source data unavailable");if(c){var u={};u.code=r.Cod,a.optCodeList.push(u)}}}}));break;case"xP":var s=e.fccf.Vehicles[e.MVS].BaseCod;a.vehCod=s||null,n.forEach((function(t){if("AG"!==t.data().type&&"VG"!==t.data().type){var n=t.id(),r=e.fccf.Vehicles[e.MVS].Options[n];if(r){var i=r.Cod&&r.Cod.charAt(0)?r.Cod.charAt(0):null,o=r.Cod&&r.Cod.charAt(6)?r.Cod.charAt(6):null;switch(r.OptGroupCod){case"CL":a.extColCode=r.Cod;break;case"IN":a.intColCode=r.Cod;break;default:if(u=i,"D"!==(c=o)&&"X"!==c&&"E"!==u&&"K"!==u){var s={};s.code=(l=r).NodeCod.split("-")[0].concat("-").concat(l.LongSrcCod),a.optCodeList.push(s)}}}}var l,c,u}))}r.omsConfig=JSON.parse(JSON.stringify(a)),i+=".getVehicleOMSConf - OMS Config: Success",e.log.debug(e.apiName+".getVehicleOMSConf: ["+a+"]"),e.isValidSetVeh&&a.vehCod?o=ue(!0,200,i,r):(o=ue(!1,572,e.apiName+".getVehicleOMSConf - OMS Conf ERROR: Invalid Vehicle Data",{}),e.log.warn(e.apiName+".getVehicleOMSConf - OMS Conf ERROR: Invalid Vehicle Data"))}catch(t){o=ue(!1,570,".getVehicleOMSConf - OMS Conf ERROR["+t.message+"]",{}),e.log.warn(e.apiName+".getVehicleOMSConf - OMS Conf ERROR["+t.message+"]")}return o},e.getVehicleCFAConf=function(){"use strict";var t,n,r,i,o;r={},i="",o=ce();try{var s={vehCod:null,extColCode:"",intColCode:"",extRelColCode:"",intRelColCode:"",tsOptCodeList:[],ssOptCodeList:[],fgOptCodeList:[],userOptCodeList:[]};if(t=e.BrandName&&e.scopeConfig.Brand[e.BrandName].DataType?e.scopeConfig.Brand[e.BrandName].DataType:null,n=e.ruleEngine.configurazione,"xF"===t){s.vehCod=e.MVS,n.forEach((function(t){if("AG"!==t.data().type&&"VG"!==t.data().type){var n=t.id(),r=e.fccf.Vehicles[e.MVS].Options[n],i=!!(r&&r.AddAttrs.TS&&r.AddAttrs.TS[0]&&"1"===r.AddAttrs.TS[0]),o=!!(r&&r.AddAttrs.SS&&r.AddAttrs.SS[0]&&"Y"===r.AddAttrs.SS[0]),a=e.ruleEngine.cyto.getElementById(n).incomers("edge[type='E']").size()>0,l=r&&r.AddAttrs.FG&&r.AddAttrs.FG[0],c=!(!l||"Y"!==r.AddAttrs.FG[0]);if(r&&(!r.isStandard||i||o||r.isStandard&&(a||c)))switch(r.OptGroupCod){case"CL":s.extColCode=r.Cod,s.extRelColCode=r.AddAttrs.RO[0]?r.AddAttrs.RO[0]:"";break;case"IN":s.intColCode=r.Cod,s.intRelColCode=r.AddAttrs.RO[0]?r.AddAttrs.RO[0]:"";break;default:if(!r||!l)throw new Error("Fg_Grids source data unavailable");if(c){var u={};u.code=r.Cod,i?s.tsOptCodeList.push(u):o?s.ssOptCodeList.push(u):r.isStandard?s.fgOptCodeList.push(u):s.userOptCodeList.push(u)}}}}));var l=[];s.extRelColCode&&l.push(s.extRelColCode),s.intRelColCode&&l.push(s.intRelColCode),s.fgOptCodeList=a.filter(s.fgOptCodeList,(function(e){return!l.includes(e.code)})),s.userOptCodeList=a.filter(s.userOptCodeList,(function(e){return!l.includes(e.code)}))}r.cfaConfig=JSON.parse(JSON.stringify(s)),i+=".getVehicleCFAConf - CFA Config: Success",e.log.debug(e.apiName+".getVehicleCFAConf: ["+s+"]"),e.isValidSetVeh&&s.vehCod&&"xF"===t?o=ue(!0,200,i,r):(o=ue(!1,572,e.apiName+".getVehicleCFAConf - CFA Conf ERROR: Invalid Vehicle Data OR Invalid DataSource (xP)",{}),e.log.warn(e.apiName+".getVehicleCFAConf - CFA Conf ERROR: Invalid Vehicle Data OR Invalid DataSource (xP)"))}catch(t){o=ue(!1,570,".getVehicleCFAConf - CFA Conf ERROR["+t.message+"]",{}),e.log.warn(e.apiName+".getVehicleCFAConf - CFA Conf ERROR["+t.message+"]")}return o},e.testConfiguration=function(t,n,r){"use strict";var i;i=ce();try{var o={Selections:[{Cod:t.Selections[0].Cod,ChangeType:"add"}]};i=e.setVehicle(o,(function(){for(var o=t.Selections[0].ConfigList,s=[],l=[],c=0;c<o.length;c++)(g={}).Cod=o[c],e.Vehicles[e.MVS].Options[g.Cod]?(g.ChangeType="add",s.push(g)):l.push(g.Cod);if(s.length!==o.length){var u={};u.NotFoundOptList=l,i=ue(!1,537,e.apiName+".testConfiguration - ERROR: Invalid Input Test Config",u),r(i)}else{var d=e.getVehicleConfString(),p=d.success&&d.data&&d.data.configurazione?d.data.configurazione:[],f=a.difference(p,o);e.log.info(e.apiName+".testConfiguration - removeList["+f+"]");for(var h=0;h<f.length;h++){var g;(g={}).Cod=f[h],g.ChangeType="remove",s.push(g)}var v={Selections:s},m=e.testChange(v,20),y=m.success,b=m.data.ChangeScenarios.length;p&&y&&1===b?(i=ue(!0,200,e.apiName+".testConfiguration - success: Valid Test Config",{}),n(i)):(i=ue(!1,538,e.apiName+".testConfiguration - ERROR: Invalid Test Config",{}),r(i))}}),(function(){i=ue(!1,536,e.apiName+".testConfiguration - ERROR: Invalid Vehicle Data",{}),r(i)}))}catch(t){i=ue(!1,540,".testConfiguration - ERROR["+t.message+"]",{}),e.log.error(e.apiName+".testConfiguration - ERROR["+t.message+"]"),r(i)}return i},e.loadConfiguration=function(t,n,r){"use strict";var i;i=ce();try{var o={Selections:[{Cod:t.Selections[0].Cod,ChangeType:"add"}]};i=e.setVehicle(o,(function(){for(var o=t.Selections[0].ConfigList,s=[],l=[],c=0;c<o.length;c++)(g={}).Cod=o[c],e.Vehicles[e.MVS].Options[g.Cod]?(g.ChangeType="add",s.push(g)):l.push(g.Cod);if(s.length!==o.length){var u={};u.NotFoundOptList=l,i=ue(!1,537,e.apiName+".loadConfiguration - ERROR: Invalid Input Test Config",u),r(i)}else{var d=e.getVehicleConfString(),p=d.success&&d.data&&d.data.configurazione?d.data.configurazione:[],f=a.difference(p,o);e.log.info(e.apiName+".loadConfiguration - removeList["+f+"]");for(var h=0;h<f.length;h++){var g;(g={}).Cod=f[h],g.ChangeType="remove",s.push(g)}var v={Selections:s},m=e.testChange(v,20),y=m.success,b=m.data.ChangeScenarios.length;if(p&&y&&1===b){var C=m.data.ChangeScenarios[0];0!==C.Changes.length?e.applyChange({Selections:C.Changes}).success?(i=ue(!0,200,e.apiName+".loadConfiguration - success: Valid Config loaded",{}),n(i)):(i=ue(!1,539,e.apiName+".loadConfiguration - ERROR: Invalid Load Config",{}),e.log.error(e.apiName+".loadConfiguration - ERROR: Invalid Vehicle Data"),r(i)):(i=ue(!0,200,e.apiName+".loadConfiguration - success: Valid Config loaded",{}),n(i))}else i=ue(!1,538,e.apiName+".loadConfiguration - ERROR: Invalid Load Config",{}),r(i)}}),(function(){i=ue(!1,536,e.apiName+".loadConfiguration - ERROR: Invalid Vehicle Data",{}),r(i)}))}catch(t){i=ue(!1,540,".loadConfiguration - ERROR["+t.message+"]",{}),e.log.error(e.apiName+".loadConfiguration - ERROR["+t.message+"]"),r(i)}return i},e.getBrandPublishDomain=function(t,n,r,i){"use strict";let o=null;if(f(t,n,r,i)){var a=".".concat(n.toLowerCase());o=e.scopeConfig.Brand[t].Mkt[n].LocDomSlug?e.scopeConfig.Brand[t].Mkt[n].LocDomSlug.concat(a):e.scopeConfig.Brand[t].BrandDomSlug.concat(a),o=e.scopeConfig.Brand[t].Mkt[n].RambDom?e.scopeConfig.Brand[t].Mkt[n].RambDom:o}else e.log.warn(e.apiName+".initScope - Internal Scope Not found Error");return o};var W=function(t,n){"use strict";var r=function(e){return e.Cod.substring(0,e.Cod.indexOf("-"))};if(t.data.ChangeScenarios&&t.data.ChangeScenarios.length>0)for(var i=0;i<t.data.ChangeScenarios.length;i++)if(t.data.ChangeScenarios[i].Changes){for(var o=t.data.ChangeScenarios[i].Changes,s=a.keyBy(a.filter(o,(function(e){return e.CodRefList.length>0&&("BODY"==e.CodType||"SEAT"==e.CodType)})),"CodRefList"),l=0;l<o.length;l++){var c=o[l];c.IsUserVisible=!0;var u=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[c.CodType];u&&(c.IsUserVisible=u.isVisible);var d=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[r(c)];d&&(c.IsUserVisible=d.isVisible,!d.isChgVis&&c.IsUserRequest&&a.each(a.filter(o,(function(e){return d.Cod===r(e)})),(function(e){a.merge(e,{IsUserVisible:!1})}))),c.IsUserRequest&&(c.IsUserVisible=!1);var p=c.CodType;if(c.IsUserRequest)switch(p){case"BODY":a.each(a.filter(o,["CodType","BODY"]),(function(e){a.merge(e,{IsUserVisible:!1})}));break;case"SEAT":a.each(a.filter(o,["CodType","SEAT"]),(function(e){a.merge(e,{IsUserVisible:!1})}));break;case"WHEEL":a.each(a.filter(o,["CodType","WHEEL"]),(function(e){a.merge(e,{IsUserVisible:!1})}))}s[c.Cod]&&"PACK"!=c.CodType&&(a.merge(c,{IsUserVisible:!1}),e.log.debug(e.apiName+".evaluateIf: relatedChange_2 ["+JSON.stringify(c)+"]"))}e.log.debug(e.apiName+".evaluateIf: changes_ ["+JSON.stringify(o)+"]")}},U=function(){"use strict";e.log.debug(e.apiName+".setCmStatus - begin ");var t=[];e.cmRuleEngine.configurazione.forEach((function(e){t.push(e.id())}));for(var n=[],r=e.cmRuleEngine.cyto.collection('node[type="BAV"]').filter((function(e){if(!e.hasClass("selected"))return e})),i=(e.cmRuleEngine.configurazione,Z()),o=0;o<r.size();o++){0==i.intersection(r[o].incomers("edge[type='V']").sources()).length&&n.push(r[o].id())}var a=e.BaseAttrValues;for(var s in a)a[s]&&(a[s].isSelected=-1!==t.indexOf(s),a[s].isSelectable=-1==n.indexOf(s));e.log.debug(e.apiName+".setCmStatus - end ")},G=function(){"use strict";e.log.debug(e.apiName+".setStatus - begin "),e.timeBegin();e.fccf.Vehicles[e.MVS].OptConfigPriceSum=0;var t=[];e.ruleEngine.configurazione.forEach((function(n){t.push(n.id()),function(t){if(e.log.debug(e.apiName+".setStatus node.id(): ["+t+"]"),e.fccf.Vehicles[e.MVS].Options[t]&&e.fccf.Vehicles[e.MVS].Options[t].Price){var n=e.fccf.Vehicles[e.MVS].Options[t].Price;try{e.log.debug(e.apiName+".setStatus - updateOptPriceSum -optPrice: ["+n+"]");var r=Math.round(100*Number(n))/100;e.fccf.Vehicles[e.MVS].OptConfigPriceSum=e.fccf.Vehicles[e.MVS].OptConfigPriceSum+r}catch(n){e.log.warn(e.apiName+".setStatus - updateOptPriceSum WARN: ["+t+"]")}}}(n.id())})),e.log.debug(e.apiName+".setStatus Selected: ["+t+"]");var n=[];e.ruleEngine.incompatibiliConConfig.forEach((function(e){n.push(e.id())})),e.log.debug(e.apiName+".setStatus Unselectables: ["+n+"]");var r,i,o=[];for(var s in e.Vehicles[e.MVS].Options){var l=e.Vehicles[e.MVS].Options[s];"BO"!=l.OptGroupCod&&"IO"!=l.OptGroupCod&&"PK"!=l.OptGroupCod&&(l.isSelected=-1!==t.indexOf(l.NodeCod),l.isSelectable=-1==n.indexOf(l.NodeCod),"CL"!=l.OptGroupCod&&"IN"!=l.OptGroupCod||(l.compatible=!1),e.Vehicles[e.MVS].Options["BO-"+l.Cod]&&"PACK"!=l.OptGroupKey&&(e.Vehicles[e.MVS].Options["BO-"+l.Cod].isSelected=l.isSelected,e.Vehicles[e.MVS].Options["BO-"+l.Cod].isSelectable=l.isSelectable),e.Vehicles[e.MVS].Options["IO-"+l.Cod]&&"PACK"!=l.OptGroupKey&&(e.Vehicles[e.MVS].Options["IO-"+l.Cod].isSelected=l.isSelected,e.Vehicles[e.MVS].Options["IO-"+l.Cod].isSelectable=l.isSelectable)),e.fccf.Vehicles[e.MVS].Packs[l.NodeCod]&&o.push(e.fccf.Vehicles[e.MVS].Packs[l.NodeCod])}for(var c=0;c<o.length;c++)for(var u=o[c],d=e.Vehicles[e.MVS].Options[u.NodeCod],p=0;p<u.OptRelCods.length;p++){var f=u.OptRelCods[p],h=e.Vehicles[e.MVS].Options[f];h&&(r=h,i=u.NodeCod,d.isSelected?(r.SelectedInPacks?r.SelectedInPacks=a.union(r.SelectedInPacks,new Array(i)):(r.SelectedInPacks=[],r.SelectedInPacks.push(i)),r.isSelected=!0):r.SelectedInPacks&&(r.SelectedInPacks=a.difference(r.SelectedInPacks,new Array(i)),0==r.SelectedInPacks.length&&(e.ruleEngine.cyto.getElementById(r.NodeCod).empty()&&(r.isSelected=!1),delete r.SelectedInPacks)))}e.log.debug(e.apiName+".setStatus - fccfVehicleSelected ");var g=e.fccf.Vehicles[e.MVS].OptionGroups;for(var v in g){var m=g[v];e.fccfVehicleSelected.Groups[v]=[],e.fccfVehicleSelected.Groups[v]=q(m.Options)}a.each(e.fccfVehicleSelected.Groups.BODY,(function(t){a.each(t.AddAttrs.RI,(function(t){e.fccf.Vehicles[e.MVS].Options["IN-"+t].compatible=!0}))})),a.each(e.fccfVehicleSelected.Groups.SEAT,(function(t){a.each(t.AddAttrs.RC,(function(t){e.fccf.Vehicles[e.MVS].Options["CL-"+t].compatible=!0}))}));var y=e.fccf.ComMod.CommonData.BaseAttribute;for(var v in y){m=y[v];e.fccfVehicleSelected.BaseAttributes[v]=e.fccf.Vehicles[e.MVS].BaseAttributes[v]}e.timeEnd("setStatus - END"),e.log.debug(e.apiName+".setStatus - end ")},z=function(e,t,n){"use strict";e.forEach((function(e,r){var i,o={};o.Des=e.toString(),d.MapConfig.all&&d.MapConfig.all.CATGROUPS?i=d.MapConfig.all.CATGROUPS[r]:d.MapConfig[0]&&d.MapConfig[0].CATGROUPS&&(i=d.MapConfig[0].CATGROUPS[r]),i&&i.Key?(o.Cod=i.Key,o.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),o.Type=t,n[i.Key]=o):(i&&!i.Key?o.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()):o.isVisible=!0,o.Cod=r,o.Type=t,n[r]=o)}))},Q=function(t,n){"use strict";switch(t.isSelected=!1,n){case 0:t.isSelectable=!0;break;case 1:t.isVisible=!0;break;case 2:t.isSelectable=!0,t.isDefault=!1,t.Price=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[d.Vehicle.PriceIndex]?t.PriceArray[d.Vehicle.PriceIndex]:null,t.PriceNoVat=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[d.Vehicle.PriceNoVatIndex]?t.PriceArray[d.Vehicle.PriceNoVatIndex]:null;break;case 3:if(t.isSelectable=!0,"xP"===e.dataSrcType&&(t.isUserSelectable="CL"===t.OptGroupCod||"IN"===t.OptGroupCod||!t.LongSrcCod.endsWith("D")&&!t.LongSrcCod.endsWith("X")),t.isIndipendent=!1,t.isStandard="Y"===t.Type,t.isMandatory="Y"===t.Mand,t.is100Pct="Y"===t.P100,t.LongSrcCod="xP"===e.dataSrcType?t.LongSrcCod:t.Cod,!t.OptGroupKey&&e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[t.OptGroupCod]?t.isVisible=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[t.OptGroupCod].isVisible:e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[t.OptGroupKey]?t.isVisible=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[t.OptGroupKey].isVisible:t.isVisible=!0,t.isUserRequest=!1,t.compatible=!0,t.Price=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[d.Option.PriceIndex]?t.PriceArray[d.Option.PriceIndex]:null,t.PriceNoVat=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[d.Option.PriceNoVatIndex]?t.PriceArray[d.Option.PriceNoVatIndex]:null,d.Option.PriceVatPercMkt&&e.fccf.Header.Scope.Market.Cod===d.Option.PriceVatPercMkt&&d.Option.PriceVatPerc&&t.PriceNoVat&&"0.00"!==t.PriceNoVat)try{t.Price=(Math.round(parseFloat(d.Option.PriceVatPerc)*Number(t.PriceNoVat)*100)/100).toString()}catch(e){}if(t.PriceLmfi=t.Price,t.PriceNoVatLmfi=t.PriceNoVat,t.Des&&0===t.Des.length&&(t.Des=e.dcTypeMap.get("OD"+t.Cod)),t.AddAttrs&&t.AddAttrs.Attr)if(t.AddAttrs.Attr.length)for(var r=0;r<t.AddAttrs.Attr.length;r++){var i;(i=t.AddAttrs.Attr[r]).AttrDes=e.dcTypeMap.get(i.AttrCod+i.AttrVal)}else(i=t.AddAttrs.Attr).AttrDes=e.dcTypeMap.get(i.AttrCod+i.AttrVal)}},j=function(t){"use strict";var n={CodType:"",CodRefList:[]},r=e.Vehicles[e.MVS].Options[t];if(r)if(o=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS[r.OptGroupCod]:d.MapConfig[0].OPTGROUPS[r.OptGroupCod]){n.CodType=o.Key,"CL"!==r.OptGroupCod&&"IN"!==r.OptGroupCod||(n.CodRefList=r.getRefColOptIdList());var i=e.fccf.Vehicles[e.MVS].Packs[t];i&&(n.CodRefList=i.OptRelCods)}else if(r.OptGroupKey)n.CodType=r.OptGroupKey;else{var o;if(e.Vehicles[e.MVS].Options["BO-"+r.Cod])(o=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS.BO:d.MapConfig[0].OPTGROUPS.BO)&&(n.CodType=o.Key);if(e.Vehicles[e.MVS].Options["IO-"+r.Cod])(o=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS.IO:d.MapConfig[0].OPTGROUPS.IO)&&(n.CodType=o.Key)}return n};const Y=function(e,t){return t.some((t=>e.startsWith(t)))},H={s4fC2evo:{IT:["www.abarth.it","www.alfaromeo.it","www.fiat.it","www.jeep-official.it","www.lancia.it"],FR:["www.abarth.fr","www.alfaromeo.fr","www.fiat.fr","www.jeep.fr","www.lancia.fr"],PL:["www.abarth.pl","www.alfaromeo.pl","www.fiat.pl","www.jeep.pl","www.lancia.pl"],DE:["www.abarth.de","www.alfaromeo.de","www.fiat.de","www.jeep.de","www.lancia.de"],ES:["www.abarth.es","www.alfaromeo.es","www.fiat.es","www.jeep.es","www.lancia.es"],UK:["www.abarthcars.co.uk","www.alfaromeo.co.uk","www.fiat.co.uk","www.jeep.co.uk","www.lancia.co.uk"],PT:["www.abarth.pt","www.alfaromeo.pt","www.fiat.pt","www.jeep.pt","www.lancia.pt"],RO:["www.fiat.com.ro","www.alfaromeo.ro","www.jeep.com"],RS:["www.fiat.rs","www.alfaromeosrbija.rs","www.jeep.rs"],SI:["www.fiat.si","www.alfaromeo.si","www.jeep.com"],HH:["www.abarth.hu","www.fiat.hu","www.alfaromeo.hu","www.jeep.hu"],CZ:["www.fiatcz.com","www.alfaromeocz.com","www.jeep.cz"],SK:["www.fiat.sk","www.alfaromeo.sk","www.jeep.sk","www.abarth.sk"]},sccfC2evo:{AT:["www.abarth.at","www.alfaromeo.at","www.citroen.at","www.dsautomobiles.at","www.fiat.at","www.jeep.at","www.lancia.at","www.opel.at","www.peugeot.at"],BE:["www.abarthbelgium.be","www.alfaromeo.be","www.citroen.be","www.dsautomobiles.be","www.fiat.be","www.jeep.be","www.lancia.be","www.opel.be","www.peugeot.be"],LU:["www.abarth.lu","www.alfaromeo.lu","www.citroen.lu","www.dsautomobiles.lu","www.fiat.lu","www.jeep.lu","www.lancia.lu","www.opel.lu","www.peugeot.lu"],NL:["www.abarth.nl","www.alfaromeo.nl","www.citroen.nl","www.dsautomobiles.nl","www.fiat.nl","www.jeep.nl","www.lancia.nl","www.opel.nl","www.peugeot.nl"],ES:["www.citroen.es","www.dsautomobiles.es","www.opel.es","www.peugeot.es"]}},J=function(t,n){"use strict";let r=!0;try{const i=["preview","publish"],o=["localhost","fccf.eligens.online","fccf.eligens.cloud","csd.eligens.online","csd.eligens.cloud","sccf-api.stellantis.com","fccfembedded.eligens.online"],a=["staging-","stage1-","qa-","stage-","cert-","dev-"];if(!K()&&i.includes(n)){const n=window&&window.location&&window.location.hostname?window.location.hostname:null;if(n&&!Y(n,a)){const i=H[e.scopeConfig.Mode.initScopeType]&&H[e.scopeConfig.Mode.initScopeType][t]?H[e.scopeConfig.Mode.initScopeType][t]:null;r=!!o.includes(n)||!!i&&i.includes(n)}}}catch(t){r=!0,e.log.warn(e.apiName+".isMngBrandDom - WARN:["+t.message+"]")}return r};e.isMngBrandDomCheck=function(t,n){"use strict";let r=!0;try{const i=["localhost","fccf.eligens.online","fccf.eligens.cloud","csd.eligens.online","csd.eligens.cloud","sccf-api.stellantis.com","fccfembedded.eligens.online"],o=["staging-","stage1-","qa-","stage-","cert-","dev-"];if(["preview","publish"].includes(n)){const a="www."+e.getBrandPublishDomain(e.BrandName,t,e.LangName,n);if(console.log(e.apiName+".isMngBrandDomCheck - clientDomUrl:["+a+"]"),a&&!Y(a,o)){const n=H[e.scopeConfig.Mode.initScopeType]&&H[e.scopeConfig.Mode.initScopeType][t]?H[e.scopeConfig.Mode.initScopeType][t]:null;r=!!i.includes(a)||!!n&&n.includes(a)}}}catch(t){r=!0,e.log.warn(e.apiName+".isMngBrandDomCheck - WARN:["+t.message+"]")}return r},e.getBaseAttributeByVehicle=function(t){"use strict";var n=[];if(e.cmRuleEngine&&e.cmRuleEngine.cyto)for(var r=e.cmRuleEngine.cyto.getElementById(t).outgoers("edge[type='V']").targets(),i=0;i<r.size();i++){var o=e.bAttrValMap.get(r[i].id());n.push(o)}return n},e.getBaseAttributeViewByVehicle=function(t){"use strict";var n=[];for(var r in e.fccf.Vehicles[t].BaseAttributes){var i=e.fccf.Vehicles[t].BaseAttributes[r],o={};for(var a in o[i.KeyDes]={},o[i.KeyDes].Key=i.KeyDes,i.Values)o[i.KeyDes].Cod=i.Values[a].Cod,o[i.KeyDes].Des=i.Values[a].Des;n.push(o)}return n},e.getFeatureByVehicle=function(t){"use strict";var n=[];for(var r in e.fccf.Vehicles[t].FeatureCategories){var i=e.fccf.Vehicles[t].FeatureCategories[r];n.push(i)}return n},e.getStandardsByVehicle=function(t){"use strict";var n={};try{for(var r in e.fccf.Vehicles[t].Options){var i=e.fccf.Vehicles[t].Options[r];if(i.isStandard&&"CL"!==i.OptGroupCod&&"IN"!==i.OptGroupCod)if(n[i.OptGroupCod]?(n[i.OptGroupCod].Features[i.Cod]={},n[i.OptGroupCod].Features[i.Cod].Cod=i.Cod,n[i.OptGroupCod].Features[i.Cod].Des=i.Des,n[i.OptGroupCod].Features[i.Cod].isVisible=i.isVisible):(n[i.OptGroupCod]={},n[i.OptGroupCod].Cod=i.OptGroupCod,n[i.OptGroupCod].Features={},n[i.OptGroupCod].Features[i.Cod]={},n[i.OptGroupCod].Features[i.Cod].Cod=i.Cod,n[i.OptGroupCod].Features[i.Cod].Des=i.Des,n[i.OptGroupCod].Features[i.Cod].isVisible=i.isVisible),e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod])n[i.OptGroupCod].Des=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod].Des,n[i.OptGroupCod].isVisible=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod].isVisible;else{var o=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS[i.OptGroupCod]:d.MapConfig[0].OPTGROUPS[i.OptGroupCod];o&&o.Key&&(n[i.OptGroupCod].Des=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[o.Key].Des,n[i.OptGroupCod].isVisible=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[o.Key].isVisible)}}}catch(t){e.log.warn(e.apiName+".getStandardsByVehicle - WARN:["+t.message+"]")}return n};var Z=function(){"use strict";var t=e.cmRuleEngine.cyto.collection(),n=e.cmRuleEngine.cyto.collection();n=e.cmRuleEngine.configurazione;for(var r=0;r<n.size();r++){var i=n[r];t=0===r?i.incomers("edge[type='V']").sources():t.intersection(i.incomers("edge[type='V']").sources())}return t};e.checkAddOption=function(t){var n,r;return n=ce(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.checkAddNode(r),e.log.debug(e.apiName+".checkAddOption - check processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.addOption=function(t){var n,r;return n=ce(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.addNode(r),e.log.debug(e.apiName+".addOption - check processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.removeOption=function(t){var n,r;return n=ce(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.removeNode(r),e.log.debug(e.apiName+".removeOption - processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.getConfiguration=function(){var t,n,r;return n={},r="",ce(),t=[],e.ruleEngine.configurazione.forEach((function(e){"AG"!==e.data().type&&"VG"!==e.data().type&&t.push(e.id())})),e.log.debug(e.apiName+".getConfiguration: ["+t+"]"),n.configurazione=t,ue(!0,200,r=r+" - configuration: ( "+t+")",n)},e.getUnselectables=function(){var t,n,r;return n={},r="",ce(),t=[],e.ruleEngine.incompatibiliConConfig.forEach((function(e){t.push(e.id())})),e.log.debug(e.apiName+".getUnselectables: ["+t+"]"),n.incompatibili=t,ue(!0,200,r=r+" - incompatible opt list: ( "+t+")",n)},e.addOptionList=function(t){var n,r;for(e.log.debug(e.apiName+".addOptionList"),n=0;n<t.length;n++)r=t[n],e.addOption(r)};var X=function(){"use strict";e.log.debug(e.apiName+".selectSingleStd - begin");var t=function(t,n){for(var r in t){var i=e.ruleEngine.cyto.getElementById(r).outgoers("edge[type='V'],edge[type='A']").targets(),o="";i.each((function(e){o=o+" "+e.id()})),e.log.debug(e.apiName+".selectSingleStd - mapRow:"+r+">"+o),n.set(r,i)}},n=function(e){var t=[];if(!a.isEmpty(e)){var n=null,r=null,i=a.filter(e,["Price",null]);if(i.length>=1)t.push(i[0].NodeCod);else{for(var o in e)(null==n&&"string"==typeof e[o].Price||Number(e[o].Price)<n)&&(n=Number(e[o].Price),r=o);t.push(e[r].NodeCod)}}return t},r=function(t){var n=[];if(!a.isEmpty(t)){var r=null,i=null;for(var o in t){e.log.debug(e.apiName+".selectSingleStd - stdOptionCod_:["+o+"]");var s,l=e.ruleEngine.cyto.getElementById(o),c=e.ruleEngine.cyto.collection(),u={addList:c=l?c.union(l):e.ruleEngine.cyto.collection(),removeList:e.ruleEngine.cyto.collection()};s=e.ruleEngine.processRuleMaxIter(u,e.maxIter);var d=null;a.forEach(s,(function(t){var n=e.ruleEngine.getIdList(t.addList),r=[],i=(a.filter(n,(function(t){var n=e.Vehicles[e.MVS].Options[t];if(n&&"string"==typeof n.Price)return r.push(Number(n.Price)),n})),a.sum(r));e.log.debug(e.apiName+".selectSingleStd - scenarioPrice_:["+i+"]"),d=null===d||i<d?i:d,e.log.debug(e.apiName+".selectSingleStd - scenarioPriceMin_:["+d+"]")})),(a.isNumber(r)&&a.isNumber(d)&&r>d||!a.isNumber(r)&&a.isNumber(d))&&(r=d,i=o)}for(var o in t)o===i&&n.push(i)}return n},i=e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,o=e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,s=a.filter(i,["isStandard",!0]),l=a.filter(o,["isStandard",!0]),c=new Map,u=new Map;t(i,c),t(o,u);var d=[],p=[];if(s.length>1||l.length>1)return e.log.debug(e.apiName+".selectSingleStd - rebuild by selectSingleStdLegacy LEGACY"),void function(){e.log.debug(e.apiName+".selectSingleStdLegacy - begin");var t=function(t){if(t.length>1){for(var n=null,r=null,i=0;i<t.length;i++){var o,s=t[i],l=e.ruleEngine.cyto.getElementById(s.NodeCod),c=e.ruleEngine.cyto.collection(),u={addList:c=l?c.union(l):e.ruleEngine.cyto.collection(),removeList:e.ruleEngine.cyto.collection()};o=e.ruleEngine.processRuleMaxIter(u,e.maxIter);var d=null;a.forEach(o,(function(t){var n=e.ruleEngine.getIdList(t.addList),r=[],i=(a.filter(n,(function(t){var n=e.Vehicles[e.MVS].Options[t];if(n&&"string"==typeof n.Price)return r.push(Number(n.Price)),n})),a.sum(r));i&&(d=d?i<d?i:d:i)})),n?n>d&&(n=d,r=s):(n=d,r=s)}a.forEach(t,(function(e){e.isStandard=e.Cod===r.Cod}))}},n=a.filter(e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,["isStandard",!0]);0===n.length&&e.log.error(e.apiName+".selectSingleStdLegacy - Standard Nodes add ERROR - CL group without Std"),t(n);var r=a.filter(e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,["isStandard",!0]);0===r.length&&e.log.error(e.apiName+".selectSingleStdLegacy - Standard Nodes add ERROR - IN group without Std"),t(r)}();if(1===s.length?(d.push(s[0].NodeCod),e.log.debug(e.apiName+".selectSingleStd - Colors Standard Node already exists")):s.length>1?e.log.error(e.apiName+".selectSingleStd - Colors Standard Nodes add ERROR - CL group with more than one Std"):0===s.length&&(c.forEach((function(e,t){e.empty()&&d.push(t)})),Object.keys(i).length===d.length&&(d=n(i)),0===d.length&&c.forEach((function(t,n){t.size()>0&&t.forEach((function(t){e.Vehicles[e.MVS].Options[t.id()].isStandard&&d.push(n)}))})),0===d.length&&(d=r(i))),1===l.length?(p.push(l[0].NodeCod),e.log.debug(e.apiName+".selectSingleStd - Interiors Standard Node already exists")):l.length>1?e.log.error(e.apiName+".selectSingleStd - Interiors Standard Nodes add ERROR - IN group with more than one Std"):0===l.length&&(u.forEach((function(e,t){e.empty()&&p.push(t)})),Object.keys(o).length===p.length&&(p=n(o)),0===p.length&&c.forEach((function(t,n){t.size()>0&&t.forEach((function(t){e.Vehicles[e.MVS].Options[t.id()].isStandard&&p.push(n)}))})),0===p.length&&(p=r(o))),0===d.length||0===p.length)e.log.error(e.apiName+".selectSingleStd - Colors/Interiors Standard Nodes add ERROR - colorCandidateStd:["+d.length+"] - interiorCandidateStd:["+p.length+"]");else for(var f=!1,h=0;h<d.length&&!f;h++)for(var g=d[h],v=0;v<p.length&&!f;v++){var m=p[v],y=e.ruleEngine.cyto.getElementById(g),b=e.ruleEngine.cyto.getElementById(m);y.outgoers("edge[type='I']").targets().intersection(b).empty()&&(e.Vehicles[e.MVS].Options[g].isStandard=!0,e.Vehicles[e.MVS].Options[m].isStandard=!0,e.log.debug(e.apiName+".selectSingleStd - Colors/Interiors Standard Nodes Found"),f=!0)}if(0===a.filter(e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,["isStandard",!0]).length)throw e.log.error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - CL group without Std"),new Error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - CL group without Std");if(0===a.filter(e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,["isStandard",!0]).length)throw e.log.error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - IN group without Std"),new Error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - IN group without Std")};e.timeBegin=function(){e.now=(new Date).getTime(),e.log.debug("timeBegin - T0")},e.timeEnd=function(t){var n=t||"",r=(new Date).getTime()-e.now;return e.log.debug("timeEnd - "+n+" - T1 delta:["+r+"]"),r};var q=function(e){return a.filter(e,(function(e){return!0===e.isSelected||e.SelectedInPacks&&e.SelectedInPacks.length>0}))},K=function(){return!("undefined"!=typeof window&&window.document)},$=function(e){var t="Malfomed Object";try{t=JSON.stringify(e,null,0)}catch(e){}return t},ee=function(t){"use strict";var n=[],r=e.Vehicles[e.MVS].Options[t.Cod];if(r)if(r.isSelected&&r.SelectedInPacks&&r.SelectedInPacks&&r.SelectedInPacks.length>0&&"remove"===t.ChangeType)for(var i=0;i<r.SelectedInPacks.length;i++){var o=r.SelectedInPacks[i],a=ie(r.NodeCod,"remove",!0,{CodType:"INPACK"});n.push(a);var s=ie(o,"remove",!1,{CodType:"INPACK",CodRefList:[o]});n.push(s)}else t.IsUserRequest=!0,n.push(t);else e.log.warn(e.apiName+".getRuleChange - Not Valid Opt Change - Change:["+JSON.stringify(t)+"]");return n},te=function(t){"use strict";for(var n={},r=e.ruleEngine.cyto.collection(),i=e.ruleEngine.cyto.collection(),o=[],s=[],l={},c=0;c<t.length;c++){var u=t[c];if(u.Cod&&u.ChangeType){var d=ee(u);a.forEach(d,(function(t){var n=t.Cod,a=e.ruleEngine.cyto.getElementById(n);1===a.length&&("add"===t.ChangeType?(r=r.union(a),t.IsUserRequest&&o.push(n)):"remove"===t.ChangeType&&(i=i.union(a),t.IsUserRequest&&s.push(n)),t.CodType&&"INPACK"===t.CodType&&(l.InPack=!0))}))}}return n.toAddList=r,n.toRemoveList=i,n.toAddCodList=o,n.toRemoveCodList=s,n.addictionalData=l,n},ne=function(t){"use strict";var n=null;if(t.Cod&&t.ChangeType){var r=t.Cod;n=e.ruleEngine.cyto.getElementById(r)}return n},re=function(e){"use strict";var t={Changes:[]};return t.Changes=e,t},ie=function(e,t,n,r){"use strict";var i={};return i.ChangeType=t,i.Cod=e,i.CodRefList=[],i.CodType="",r&&(i.CodType=r.CodType,i.CodRefList=r.CodRefList),i.IsUserRequest=n,i},oe=function(t,n,r,i,o){"use strict";var a,s=[];0===i.length&&(a=re([]),i.push(a));for(var l=0;l<i.length;l++){var c=i[l].Changes;if(t.data.altGrList.length>0)for(l=0;l<t.data.altGrList.length;l++){var u=t.data.altGrList[l];e.log.debug(e.apiName+".setChangeScenarioList - altGrElement_: ["+u[0].id()+"]");var d=se(u,n,r,o),p=le(t,n,r,o);c=d.concat(p),a=re(c),s.push(a)}else{p=le(t,n,r,o);a=re(c.concat(p)),s.push(a)}}return s},ae=function(t,n,r,i){"use strict";var o,a=[],s=[];if(t&&t.data&&t.data.scenarios)for(var l=t.data.scenarios,c=0;c<l.length;c++){var u=l[c],d=[],p=u.addList.filter((function(e){return"AG"!==e.data("type")&&"VG"!==e.data("type")}));if(!e.ruleEngine.insertIdAddList(s,p)){for(var f=0;f<u.removeList.size();f++){var h=u.removeList[f];if("VG"!==h.data().type&&"AG"!==h.data().type){var g=h.id(),v=j(g),m=ie(g,"remove",r.includes(g),v);d.push(m),i&&(e.Vehicles[e.MVS].Options[m.Cod].isUserRequest=!1)}}for(f=0;f<u.addList.size();f++){var y=u.addList[f];if("VG"!==y.data().type&&"AG"!==y.data().type){var b=y.id();v=j(b),m=ie(b,"add",n.includes(b),v);d.push(m),i&&(e.Vehicles[e.MVS].Options[m.Cod].isUserRequest=m.IsUserRequest)}}o=re(d),a.push(o)}}return a};e.getChangeList=function(e,t){"use strict";for(var n=[],r=0;r<t.length;r++){var i=t[r],o=ie(i,"remove",!0);n.push(o)}for(r=0;r<e.length;r++){i=e[r],o=ie(i,"add",!0);n.push(o)}return n};var se=function(t,n,r,i){"use strict";for(var o=[],a=0;a<t.length;a++){var s=t[a].id(),l=ie(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest="remove"!=r&&l.IsUserRequest)}return o},le=function(t,n,r,i){"use strict";for(var o=[],a=0;a<t.data.addList.length;a++){var s=t.data.addList[a].id(),l=ie(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest=l.IsUserRequest)}for(a=0;a<t.data.remList.length;a++){s=t.data.remList[a].id(),l=ie(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest=!1)}return o},ce=function(){"use strict";var e={success:!1,code:500,message:"Generic Error",data:{}};return e},ue=function(e,t,n,r){"use strict";var i={};return i.success=e,i.code=t,i.message=n,i.data=r,i}}},31:e=>{e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){var n=t[a][1][e];return i(n||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){},{}],2:[function(e,t,n){"use strict";var r=e("./util"),i=e("./is"),o=e("./promise"),a=function(e,t,n){var o=this._private=r.extend({duration:1e3},t,n);o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&i.fn(o.complete)&&o.completes.push(o.complete),this.length=1,this[0]=this},s=a.prototype;r.extend(s,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t=e.target._private.animation;(e.queue?t.queue:t.current).push(this),i.elementOrCollection(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(t,n){var r=e[t];null!=r&&(e[t]=e[n],e[n]=r)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var r=0;r<e.style.length;r++){var i=e.style[r],o=i.name,a=e.startStyle[o];e.startStyle[o]=i,e.style[r]=a}return t&&this.play(),this},promise:function(e){var t,n=this._private;return t="frame"===e?n.frames:n.completes,new o((function(e,n){t.push((function(){e()}))}))}}),s.complete=s.completed,t.exports=a},{"./is":91,"./promise":94,"./util":108}],3:[function(e,t,n){"use strict";var r=e("../../is"),i={aStar:function(e){var t=this;e=e||{};var n=function(e,t,r,i){if(e==t)return i.unshift(o.getElementById(t)),i;if(t in r){var a=r[t],s=v[t];return i.unshift(o.getElementById(s)),i.unshift(o.getElementById(t)),n(e,a,r,i)}},i=function(e,t){if(0!==e.length){for(var n=0,r=t[e[0]],i=1;i<e.length;i++){var o=t[e[i]];o<r&&(r=o,n=i)}return n}},o=this._private.cy;if(null!=e&&null!=e.root){var a=r.string(e.root)?this.filter(e.root)[0]:e.root[0];if(null!=e.goal){var s=r.string(e.goal)?this.filter(e.goal)[0]:e.goal[0];if(null!=e.heuristic&&r.fn(e.heuristic))var l=e.heuristic;else l=function(){return 0};if(null!=e.weight&&r.fn(e.weight))var c=e.weight;else c=function(e){return 1};if(null!=e.directed)var u=e.directed;else u=!1;var d=a.id(),p=s.id(),f=[],h=[d],g={},v={},m={},y={};m[d]=0,y[d]=l(a);for(var b=0;h.length>0;){var C=i(h,y),x=o.getElementById(h[C]),E=x.id();if(b++,E==p){var S=n(d,p,g,[]);return{found:!0,distance:m[E],path:t.spawn(S),steps:b}}f.push(E),h.splice(C,1);for(var w=x._private.edges,V=0;V<w.length;V++){var R=w[V];if(this.hasElementWithId(R.id())&&(!u||R.data("source")===E)){var O=R.source(),A=R.target(),k=O.id()!==E?O:A,T=k.id();if(this.hasElementWithId(T)&&-1==f.indexOf(T)){var D=m[E]+c(R);-1!=h.indexOf(T)?D<m[T]&&(m[T]=D,y[T]=D+l(k),g[T]=E):(m[T]=D,y[T]=D+l(k),h.push(T),g[T]=E,v[T]=R.id())}}}}return{found:!1,distance:void 0,path:void 0,steps:b}}}}};t.exports=i},{"../../is":91}],4:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../util"),o={bellmanFord:function(e){var t=this;if(null!=(e=e||{}).weight&&r.fn(e.weight))var n=e.weight;else n=function(e){return 1};if(null!=e.directed)var o=e.directed;else o=!1;if(null!=e.root){if(r.string(e.root))var a=this.filter(e.root)[0];else a=e.root[0];for(var s=this._private.cy,l=this.edges().stdFilter((function(e){return!e.isLoop()})),c=this.nodes(),u=c.length,d={},p=0;p<u;p++)d[c[p].id()]=p;var f=[],h=[],g=[];for(p=0;p<u;p++)c[p].id()===a.id()?f[p]=0:f[p]=1/0,h[p]=void 0;var v=!1;for(p=1;p<u;p++){v=!1;for(var m=0;m<l.length;m++){var y,b=d[l[m].source().id()],C=d[l[m].target().id()],x=n(l[m]);(y=f[b]+x)<f[C]&&(f[C]=y,h[C]=b,g[C]=l[m],v=!0),o||(y=f[C]+x)<f[b]&&(f[b]=y,h[b]=C,g[b]=l[m],v=!0)}if(!v)break}if(v)for(m=0;m<l.length;m++)if(b=d[l[m].source().id()],C=d[l[m].target().id()],x=n(l[m]),f[b]+x<f[C])return i.error("Graph contains a negative weight cycle for Bellman-Ford"),{pathTo:void 0,distanceTo:void 0,hasNegativeWeightCycle:!0};var E=[];for(p=0;p<u;p++)E.push(c[p].id());var S={distanceTo:function(e){if(r.string(e))var t=s.filter(e)[0].id();else t=e.id();return f[d[t]]},pathTo:function(e){var n=function(e,t,n,r,i,o){for(;;){if(i.push(s.getElementById(r[n])),i.push(o[n]),t===n)return i;var a=e[n];if(void 0===a)return;n=a}};if(r.string(e))var i=s.filter(e)[0].id();else i=e.id();var o=[],l=n(h,d[a.id()],d[i],E,o,g);return null!=l&&l.reverse(),t.spawn(l)},hasNegativeWeightCycle:!1};return S}}};t.exports=o},{"../../is":91,"../../util":108}],5:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../heap"),o={betweennessCentrality:function(e){var t,n;e=e||{},r.fn(e.weight)?(n=e.weight,t=!0):t=!1;for(var o=null!=e.directed&&e.directed,a=this._private.cy,s=this.nodes(),l={},c={},u=0,d={set:function(e,t){c[e]=t,t>u&&(u=t)},get:function(e){return c[e]}},p=0;p<s.length;p++)l[C=(x=s[p]).id()]=o?x.outgoers().nodes():x.openNeighborhood().nodes(),d.set(C,0);for(var f=0;f<s.length;f++){var h=s[f].id(),g=[],v={},m={},y={},b=new i((function(e,t){return y[e]-y[t]}));for(p=0;p<s.length;p++){var C;v[C=s[p].id()]=[],m[C]=0,y[C]=1/0}for(m[h]=1,y[h]=0,b.push(h);!b.empty();){var x=b.pop();if(g.push(x),t)for(var E=0;E<l[x].length;E++){var S=l[x][E],w=a.getElementById(x),V=n(w.edgesTo(S).length>0?w.edgesTo(S)[0]:S.edgesTo(w)[0]);S=S.id(),y[S]>y[x]+V&&(y[S]=y[x]+V,b.nodes.indexOf(S)<0?b.push(S):b.updateItem(S),m[S]=0,v[S]=[]),y[S]==y[x]+V&&(m[S]=m[S]+m[x],v[S].push(x))}else for(E=0;E<l[x].length;E++)S=l[x][E].id(),y[S]==1/0&&(b.push(S),y[S]=y[x]+1),y[S]==y[x]+1&&(m[S]=m[S]+m[x],v[S].push(x))}var R={};for(p=0;p<s.length;p++)R[s[p].id()]=0;for(;g.length>0;)for(S=g.pop(),E=0;E<v[S].length;E++)R[x=v[S][E]]=R[x]+m[x]/m[S]*(1+R[S]),S!=s[f].id()&&d.set(S,d.get(S)+R[S])}var O={betweenness:function(e){return e=r.string(e)?a.filter(e).id():e.id(),d.get(e)},betweennessNormalized:function(e){return 0==u?0:(e=r.string(e)?a.filter(e).id():e.id(),d.get(e)/u)}};return O.betweennessNormalised=O.betweennessNormalized,O}};o.bc=o.betweennessCentrality,t.exports=o},{"../../heap":89,"../../is":91}],6:[function(e,t,n){"use strict";var r=e("../../is"),i=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(t,n,i){var o;r.plainObject(t)&&!r.elementOrCollection(t)&&(t=(o=t).roots||o.root,n=o.visit,i=o.directed),i=2!==arguments.length||r.fn(n)?i:n,n=r.fn(n)?n:function(){};for(var a,s=this._private.cy,l=t=r.string(t)?this.filter(t):t,c=[],u=[],d={},p={},f={},h=0,g=this.nodes(),v=this.edges(),m=0;m<l.length;m++)l[m].isNode()&&(c.unshift(l[m]),e.bfs&&(f[l[m].id()]=!0,u.push(l[m])),p[l[m].id()]=0);for(;0!==c.length;){if(l=e.bfs?c.shift():c.pop(),e.dfs){if(f[l.id()])continue;f[l.id()]=!0,u.push(l)}var y,b=p[l.id()],C=d[l.id()],x=null==C?void 0:C.connectedNodes().not(l)[0];if(!0===(y=n(l,C,x,h++,b))){a=l;break}if(!1===y)break;var E=l.connectedEdges(i?function(e){return e.data("source")===l.id()}:void 0).intersect(v);for(m=0;m<E.length;m++){var S=E[m],w=S.connectedNodes((function(e){return e.id()!==l.id()})).intersect(g);0===w.length||f[w.id()]||(w=w[0],c.push(w),e.bfs&&(f[w.id()]=!0,u.push(w)),d[w.id()]=S,p[w.id()]=p[l.id()]+1)}}var V=[];for(m=0;m<u.length;m++){var R=u[m],O=d[R.id()];O&&V.push(O),V.push(R)}return{path:s.collection(V,{unique:!0}),found:s.collection(a)}}},o={breadthFirstSearch:i({bfs:!0}),depthFirstSearch:i({dfs:!0})};o.bfs=o.breadthFirstSearch,o.dfs=o.depthFirstSearch,t.exports=o},{"../../is":91}],7:[function(e,t,n){"use strict";var r=e("../../is"),i={closenessCentralityNormalized:function(e){e=e||{};var t=this.cy(),n=e.harmonic;void 0===n&&(n=!0);for(var i={},o=0,a=this.nodes(),s=this.floydWarshall({weight:e.weight,directed:e.directed}),l=0;l<a.length;l++){for(var c=0,u=0;u<a.length;u++)if(l!=u){var d=s.distance(a[l],a[u]);c+=n?1/d:d}n||(c=1/c),o<c&&(o=c),i[a[l].id()]=c}return{closeness:function(e){return 0==o?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),i[e]/o)}}},closenessCentrality:function(e){if(null!=(e=e||{}).root){if(r.string(e.root))var t=this.filter(e.root)[0];else t=e.root[0];if(null!=e.weight&&r.fn(e.weight))var n=e.weight;else n=function(){return 1};if(null!=e.directed&&r.bool(e.directed))var i=e.directed;else i=!1;var o=e.harmonic;void 0===o&&(o=!0);for(var a=this.dijkstra({root:t,weight:n,directed:i}),s=0,l=this.nodes(),c=0;c<l.length;c++)if(l[c].id()!=t.id()){var u=a.distanceTo(l[c]);s+=o?1/u:u}return o?s:1/s}}};i.cc=i.closenessCentrality,i.ccn=i.closenessCentralityNormalised=i.closenessCentralityNormalized,t.exports=i},{"../../is":91}],8:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../util"),o={degreeCentralityNormalized:function(e){e=e||{};var t=this.cy();if(null!=e.directed)var n=e.directed;else n=!1;var o=this.nodes(),a=o.length;if(n){for(var s={},l={},c=0,u=0,d=0;d<a;d++){var p=o[d],f=this.degreeCentrality(i.extend({},e,{root:p}));c<f.indegree&&(c=f.indegree),u<f.outdegree&&(u=f.outdegree),s[p.id()]=f.indegree,l[p.id()]=f.outdegree}return{indegree:function(e){return 0==c?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),s[e]/c)},outdegree:function(e){return 0==u?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),l[e]/u)}}}var h={},g=0;for(d=0;d<a;d++)p=o[d],f=this.degreeCentrality(i.extend({},e,{root:p})),g<f.degree&&(g=f.degree),h[p.id()]=f.degree;return{degree:function(e){return 0==g?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),h[e]/g)}}},degreeCentrality:function(e){var t=this;if(null!=(e=e||{})&&null!=e.root){var n=r.string(e.root)?this.filter(e.root)[0]:e.root[0];if(null!=e.weight&&r.fn(e.weight))var i=e.weight;else i=function(e){return 1};if(null!=e.directed)var o=e.directed;else o=!1;if(null!=e.alpha&&r.number(e.alpha))var a=e.alpha;else a=0;if(o){for(var s=n.connectedEdges('edge[target = "'+n.id()+'"]').intersection(t),l=n.connectedEdges('edge[source = "'+n.id()+'"]').intersection(t),c=s.length,u=l.length,d=0,p=0,f=0;f<s.length;f++)d+=i(s[f]);for(f=0;f<l.length;f++)p+=i(l[f]);return{indegree:Math.pow(c,1-a)*Math.pow(d,a),outdegree:Math.pow(u,1-a)*Math.pow(p,a)}}var h=n.connectedEdges().intersection(t),g=h.length,v=0;for(f=0;f<h.length;f++)v+=i(h[f]);return{degree:Math.pow(g,1-a)*Math.pow(v,a)}}}};o.dc=o.degreeCentrality,o.dcn=o.degreeCentralityNormalised=o.degreeCentralityNormalized,t.exports=o},{"../../is":91,"../../util":108}],9:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../heap"),o={dijkstra:function(e,t,n){var o;r.plainObject(e)&&!r.elementOrCollection(e)&&(e=(o=e).root,t=o.weight,n=o.directed);var a=this._private.cy;t=r.fn(t)?t:function(){return 1};for(var s=r.string(e)?this.filter(e)[0]:e[0],l={},c={},u={},d=this.edges().filter((function(e){return!e.isLoop()})),p=this.nodes(),f=function(e){return l[e.id()]},h=function(e,t){l[e.id()]=t,g.updateItem(e)},g=new i((function(e,t){return f(e)-f(t)})),v=0;v<p.length;v++){var m=p[v];l[m.id()]=m.same(s)?0:1/0,g.push(m)}for(var y=function(e,r){for(var i,o=(n?e.edgesTo(r):e.edgesWith(r)).intersect(d),a=1/0,s=0;s<o.length;s++){var l=o[s],c=t(l);(c<a||!i)&&(a=c,i=l)}return{edge:i,dist:a}};g.size()>0;){var b=g.pop(),C=f(b),x=b.id();if(u[x]=C,C===Math.Infinite)break;var E=b.neighborhood().intersect(p);for(v=0;v<E.length;v++){var S=E[v],w=S.id(),V=y(b,S),R=C+V.dist;R<f(S)&&(h(S,R),c[w]={node:b,edge:V.edge})}}return{distanceTo:function(e){var t=r.string(e)?p.filter(e)[0]:e[0];return u[t.id()]},pathTo:function(e){var t=r.string(e)?p.filter(e)[0]:e[0],n=[],i=t;if(t.length>0)for(n.unshift(t);c[i.id()];){var o=c[i.id()];n.unshift(o.edge),n.unshift(o.node),i=o.node}return a.collection(n)}}}};t.exports=o},{"../../heap":89,"../../is":91}],10:[function(e,t,n){"use strict";var r=e("../../is"),i={floydWarshall:function(e){e=e||{};var t=this.cy();if(null!=e.weight&&r.fn(e.weight))var n=e.weight;else n=function(e){return 1};if(null!=e.directed)var i=e.directed;else i=!1;for(var o=this.edges().stdFilter((function(e){return!e.isLoop()})),a=this.nodes(),s=a.length,l={},c=0;c<s;c++)l[a[c].id()]=c;var u=[];for(c=0;c<s;c++){for(var d=new Array(s),p=0;p<s;p++)d[p]=c==p?0:1/0;u.push(d)}var f=[],h=[],g=function(e){for(var t=0;t<s;t++){for(var n=new Array(s),r=0;r<s;r++)n[r]=void 0;e.push(n)}};for(g(f),g(h),c=0;c<o.length;c++){var v=l[o[c].source().id()],m=l[o[c].target().id()],y=n(o[c]);u[v][m]>y&&(u[v][m]=y,f[v][m]=m,h[v][m]=o[c])}if(!i)for(c=0;c<o.length;c++)v=l[o[c].target().id()],m=l[o[c].source().id()],y=n(o[c]),u[v][m]>y&&(u[v][m]=y,f[v][m]=m,h[v][m]=o[c]);for(var b=0;b<s;b++)for(c=0;c<s;c++)for(p=0;p<s;p++)u[c][b]+u[b][p]<u[c][p]&&(u[c][p]=u[c][b]+u[b][p],f[c][p]=f[c][b]);var C=[];for(c=0;c<s;c++)C.push(a[c].id());var x={distance:function(e,n){if(r.string(e))var i=t.filter(e)[0].id();else i=e.id();if(r.string(n))var o=t.filter(n)[0].id();else o=n.id();return u[l[i]][l[o]]},path:function(e,n){var i=function(e,n,r,i,o){if(e===n)return t.getElementById(i[e]);if(void 0!==r[e][n]){for(var a=[t.getElementById(i[e])],s=e;e!==n;){s=e,e=r[e][n];var l=o[s][e];a.push(l),a.push(t.getElementById(i[e]))}return a}};if(r.string(e))var o=t.filter(e)[0].id();else o=e.id();if(r.string(n))var a=t.filter(n)[0].id();else a=n.id();var s=i(l[o],l[a],f,C,h);return t.collection(s)}};return x}};t.exports=i},{"../../is":91}],11:[function(e,t,n){"use strict";var r=e("../../util"),i={};[e("./bfs-dfs"),e("./dijkstra"),e("./kruskal"),e("./a-star"),e("./floyd-warshall"),e("./bellman-ford"),e("./kerger-stein"),e("./page-rank"),e("./degree-centrality"),e("./closeness-centrality"),e("./betweenness-centrality")].forEach((function(e){r.extend(i,e)})),t.exports=i},{"../../util":108,"./a-star":3,"./bellman-ford":4,"./betweenness-centrality":5,"./bfs-dfs":6,"./closeness-centrality":7,"./degree-centrality":8,"./dijkstra":9,"./floyd-warshall":10,"./kerger-stein":12,"./kruskal":13,"./page-rank":14}],12:[function(e,t,n){"use strict";var r=e("../../util"),i={kargerStein:function(e){var t=this;e=e||{};var n=function(e,t,n){for(var r=n[e],i=r[1],o=r[2],a=t[i],s=t[o],l=n.filter((function(e){return!(t[e[1]]===a&&t[e[2]]===s||t[e[1]]===s&&t[e[2]]===a)})),c=0;c<l.length;c++){var u=l[c];u[1]===s?(l[c]=u.slice(0),l[c][1]=a):u[2]===s&&(l[c]=u.slice(0),l[c][2]=a)}for(c=0;c<t.length;c++)t[c]===s&&(t[c]=a);return l},i=function(e,t,r,o){if(r<=o)return t;var a=Math.floor(Math.random()*t.length),s=n(a,e,t);return i(e,s,r-1,o)},o=this._private.cy,a=this.edges().stdFilter((function(e){return!e.isLoop()})),s=this.nodes(),l=s.length,c=a.length,u=Math.ceil(Math.pow(Math.log(l)/Math.LN2,2)),d=Math.floor(l/Math.sqrt(2));if(!(l<2)){for(var p={},f=0;f<l;f++)p[s[f].id()]=f;var h=[];for(f=0;f<c;f++){var g=a[f];h.push([f,p[g.source().id()],p[g.target().id()]])}var v,m=1/0,y=[];for(f=0;f<l;f++)y.push(f);for(var b=0;b<=u;b++){var C=y.slice(0),x=i(C,h,l,d),E=C.slice(0),S=i(C,x,d,2),w=i(E,x,d,2);S.length<=w.length&&S.length<m?(m=S.length,v=[S,C]):w.length<=S.length&&w.length<m&&(m=w.length,v=[w,E])}var V=v[0].map((function(e){return a[e[0]]})),R=[],O=[],A=v[1][0];for(f=0;f<v[1].length;f++)v[1][f]===A?R.push(s[f]):O.push(s[f]);return{cut:t.spawn(o,V),partition1:t.spawn(R),partition2:t.spawn(O)}}r.error("At least 2 nodes are required for Karger-Stein algorithm")}};t.exports=i},{"../../util":108}],13:[function(e,t,n){"use strict";var r=e("../../is"),i={kruskal:function(e){function t(e){for(var t=0;t<o.length;t++){var n=o[t];if(n.anySame(e))return{eles:n,index:t}}}var n=this.cy();e=r.fn(e)?e:function(){return 1};for(var i=n.collection(n,[]),o=[],a=this.nodes(),s=0;s<a.length;s++)o.push(a[s].collection());var l=this.edges().toArray().sort((function(t,n){return e(t)-e(n)}));for(s=0;s<l.length;s++){var c=l[s],u=c.source()[0],d=c.target()[0],p=t(u),f=t(d);p.index!==f.index&&(i=i.add(c),o[p.index]=p.eles.add(f.eles),o.splice(f.index,1))}return a.add(i)}};t.exports=i},{"../../is":91}],14:[function(e,t,n){"use strict";var r=e("../../is"),i={pageRank:function(e){var t=function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r];for(r=0;r<t;r++)e[r]=e[r]/n};if(null!=(e=e||{})&&null!=e.dampingFactor)var n=e.dampingFactor;else n=.8;if(null!=e&&null!=e.precision)var i=e.precision;else i=1e-6;if(null!=e&&null!=e.iterations)var o=e.iterations;else o=200;if(null!=e&&null!=e.weight&&r.fn(e.weight))var a=e.weight;else a=function(e){return 1};for(var s=this._private.cy,l=this.edges().stdFilter((function(e){return!e.isLoop()})),c=this.nodes(),u=c.length,d=l.length,p={},f=0;f<u;f++)p[c[f].id()]=f;var h=[],g=[],v=(1-n)/u;for(f=0;f<u;f++){for(var m=[],y=0;y<u;y++)m.push(0);h.push(m),g.push(0)}for(f=0;f<d;f++){var b=l[f],C=p[b.source().id()],x=p[b.target().id()],E=a(b);h[x][C]+=E,g[C]+=E}var S=1/u+v;for(y=0;y<u;y++)if(0===g[y])for(f=0;f<u;f++)h[f][y]=S;else for(f=0;f<u;f++)h[f][y]=h[f][y]/g[y]+v;var w,V=[],R=[];for(f=0;f<u;f++)V.push(1),R.push(0);for(var O=0;O<o;O++){var A=R.slice(0);for(f=0;f<u;f++)for(y=0;y<u;y++)A[f]+=h[f][y]*V[y];t(A),w=V,V=A;var k=0;for(f=0;f<u;f++)k+=Math.pow(w[f]-V[f],2);if(k<i)break}var T={rank:function(e){if(r.string(e))var t=s.filter(e)[0].id();else t=e.id();return V[p[t]]}};return T}};t.exports=i},{"../../is":91}],15:[function(e,t,n){"use strict";var r=e("../define"),i={animate:r.animate(),animation:r.animation(),animated:r.animated(),clearQueue:r.clearQueue(),delay:r.delay(),delayAnimation:r.delayAnimation(),stop:r.stop()};t.exports=i},{"../define":44}],16:[function(e,t,n){"use strict";var r=e("../util"),i={classes:function(e){e=(e||"").match(/\S+/g)||[];for(var t=this,n=[],i={},o=0;o<e.length;o++)i[e[o]]=!0;for(var a=0;a<t.length;a++){var s=t[a],l=s._private,c=l.classes,u=!1;for(o=0;o<e.length;o++)if(!(p=c[e[o]])){u=!0;break}if(!u)for(e=Object.keys(c),o=0;o<e.length;o++){var d=e[o],p=c[d],f=i[d];if(p&&!f){u=!0;break}}u&&(l.classes=r.copy(i),n.push(s))}return n.length>0&&this.spawn(n).updateStyle().trigger("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return!(null==t||!t._private.classes[e])},toggleClass:function(e,t){for(var n=e.match(/\S+/g)||[],r=this,i=[],o=0,a=r.length;o<a;o++)for(var s=r[o],l=!1,c=0;c<n.length;c++){var u=n[c],d=s._private.classes,p=d[u];t||void 0===t&&!p?(d[u]=!0,p||l||(i.push(s),l=!0)):(d[u]=!1,p&&!l&&(i.push(s),l=!0))}return i.length>0&&this.spawn(i).updateStyle().trigger("class"),r},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}};t.exports=i},{"../util":108}],17:[function(e,t,n){"use strict";var r=(e("../is"),e("../selector")),i={allAre:function(e){var t=new r(e);return this.every((function(e){return t.matches(e)}))},is:function(e){var t=new r(e);return this.some((function(e){return t.matches(e)}))},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){return e=this.cy().collection(e),this.length===e.length&&this.every((function(t){return e.hasElementWithId(t.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(e){return t.hasElementWithId(e.id())}))},contains:function(e){e=this.cy().collection(e);var t=this;return e.every((function(e){return t.hasElementWithId(e.id())}))}};i.allAreNeighbours=i.allAreNeighbors,i.has=i.contains,t.exports=i},{"../is":91,"../selector":95}],18:[function(e,t,n){"use strict";var r={parent:function(e){var t=[];if(this._private.cy,1===this.length&&(r=this[0]._private.parent))return r;for(var n=0;n<this.length;n++){var r;(r=this[n]._private.parent)&&t.push(r)}return this.spawn(t,{unique:!0}).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var i=n[r];t.push(i)}n=n.parent()}return this.spawn(t,{unique:!0}).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var r=this[n].parents();t=(t=t||r).intersect(r)}return t.filter(e)},orphans:function(e){return this.stdFilter((function(e){return e.isOrphan()})).filter(e)},nonorphans:function(e){return this.stdFilter((function(e){return e.isChild()})).filter(e)},children:function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];t=t.concat(r._private.children)}return this.spawn(t,{unique:!0}).filter(e)},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){function t(e){for(var r=0;r<e.length;r++){var i=e[r];n.push(i),i.children().nonempty()&&t(i.children())}}var n=[];return t(this.children()),this.spawn(n,{unique:!0}).filter(e)}};r.ancestors=r.parents,t.exports=r},{}],19:[function(e,t,n){"use strict";var r,i,o=e("../define");r=i={data:o.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:o.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:o.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:o.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:o.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:o.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},r.attr=r.data,r.removeAttr=r.removeData,t.exports=i},{"../define":44}],20:[function(e,t,n){"use strict";function r(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],o=i._private.edges,a=0;a<o.length;a++){var s=o[a];!t&&s.isLoop()||(r+=e(i,s))}return r}}}function i(e,t){return function(n){for(var r,i=this.nodes(),o=0;o<i.length;o++){var a=i[o][e](n);void 0===a||void 0!==r&&!t(a,r)||(r=a)}return r}}var o=e("../util"),a={};o.extend(a,{degree:r((function(e,t){return t.source().same(t.target())?2:1})),indegree:r((function(e,t){return t.target().same(e)?1:0})),outdegree:r((function(e,t){return t.source().same(e)?1:0}))}),o.extend(a,{minDegree:i("degree",(function(e,t){return e<t})),maxDegree:i("degree",(function(e,t){return e>t})),minIndegree:i("indegree",(function(e,t){return e<t})),maxIndegree:i("indegree",(function(e,t){return e>t})),minOutdegree:i("outdegree",(function(e,t){return e<t})),maxOutdegree:i("outdegree",(function(e,t){return e>t}))}),o.extend(a,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r<n.length;r++)t+=n[r].degree(e);return t}}),t.exports=a},{"../util":108}],21:[function(e,t,n){"use strict";function r(e){return{includeNodes:l.default(e.includeNodes,C.includeNodes),includeEdges:l.default(e.includeEdges,C.includeEdges),includeLabels:l.default(e.includeLabels,C.includeLabels),includeOverlays:l.default(e.includeOverlays,C.includeOverlays),useCache:l.default(e.useCache,C.useCache)}}var i,o,a=e("../define"),s=e("../is"),l=e("../util"),c=e("../math");i=o={position:a.data({field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"rtrigger",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()&&!e.isParent()}}),silentPosition:a.data({field:"position",bindingEvent:"position",allowBinding:!1,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!1,triggerFnName:"trigger",allowGetting:!1,validKeys:["x","y"],onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()&&!e.isParent()}}),positions:function(e,t){if(s.plainObject(e))t?this.silentPosition(e):this.position(e);else if(s.fn(e)){for(var n=e,r=0;r<this.length;r++){var i=this[r];if(!i.locked()&&!i.isParent()&&(e=n(i,r))){var o=i._private.position;o.x=e.x,o.y=e.y}}this.dirtyCompoundBoundsCache(),t?this.trigger("position"):this.rtrigger("position")}return this},silentPositions:function(e){return this.positions(e,!0)},renderedPosition:function(e,t){var n=this[0],r=this.cy(),i=r.zoom(),o=r.pan(),a=s.plainObject(e)?e:void 0,l=void 0!==a||void 0!==t&&s.string(e);if(n&&n.isNode()){if(!l){var c=n.position();return a={x:c.x*i+o.x,y:c.y*i+o.y},void 0===e?a:a[e]}for(var u=0;u<this.length;u++)n=this[u],void 0!==t?n.position(e,(t-o[e])/i):void 0!==a&&n.position({x:(a.x-o.x)/i,y:(a.y-o.y)/i})}else if(!l)return;return this},relativePosition:function(e,t){var n=this[0],r=this.cy(),i=s.plainObject(e)?e:void 0,o=void 0!==i||void 0!==t&&s.string(e),a=r.hasCompoundNodes();if(n&&n.isNode()){if(!o){var l=n.position(),c=f=(p=a?n.parent():null)&&p.length>0;f&&(p=p[0]);var u=c?p.position():{x:0,y:0};return i={x:l.x-u.x,y:l.y-u.y},void 0===e?i:i[e]}for(var d=0;d<this.length;d++){var p,f;n=this[d],c=f=(p=a?n.parent():null)&&p.length>0,f&&(p=p[0]),u=c?p.position():{x:0,y:0},void 0!==t?n.position(e,t+u[e]):void 0!==i&&n.position({x:i.x+u.x,y:i.y+u.y})}}else if(!o)return;return this},renderedBoundingBox:function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),o=t.x1*r+i.x,a=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:l,w:a-o,h:l-s}},dirtyCompoundBoundsCache:function(){var e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;for(var t=this,n=[],r=0;r<t.length;r++)n.push(t[r]);for(;n.length>0;){var i=n.shift();i._private.compoundBoundsClean=!1,i.isParent()&&i.trigger("bounds"),i.isChild()&&n.push(i.parent())}return this},updateCompoundBounds:function(){function e(e){function t(e,t,n){var r=0,i=0,o=t+n;return e>0&&o>0&&(r=t/o*e,i=n/o*e),{biasDiff:r,biasComplementDiff:i}}function r(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}if(e.isParent()){var o=e._private,a=e.children(),s="include"===e.pstyle("compound-sizing-wrt-labels").value,l={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},c=a.boundingBox({includeLabels:s,includeOverlays:!1,useCache:!1}),u=o.position,d=l.width.left.value;"px"===l.width.left.units&&l.width.val>0&&(d=100*d/l.width.val);var p=l.width.right.value;"px"===l.width.right.units&&l.width.val>0&&(p=100*p/l.width.val);var f=l.height.top.value;"px"===l.height.top.units&&l.height.val>0&&(f=100*f/l.height.val);var h=l.height.bottom.value;"px"===l.height.bottom.units&&l.height.val>0&&(h=100*h/l.height.val);var g=t(l.width.val-c.w,d,p),v=g.biasDiff,m=g.biasComplementDiff,y=t(l.height.val-c.h,f,h),b=y.biasDiff,C=y.biasComplementDiff;o.autoPadding=r(c.w,c.h,i.pstyle("padding"),i.pstyle("padding-relative-to").value),o.autoWidth=Math.max(c.w,l.width.val),u.x=(-v+c.x1+c.x2+m)/2,o.autoHeight=Math.max(c.h,l.height.val),u.y=(-C+c.y1+c.y2+b)/2,n.push(e)}}var t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;for(var n=[],r=0;r<this.length;r++){var i=this[r],o=i._private;o.compoundBoundsClean||(e(i),t._private.batchingStyle||(o.compoundBoundsClean=!0))}return this}};var u=function(e){return e===1/0||e===-1/0?0:e},d=function(e,t,n,r,i){r-t!=0&&i-n!=0&&(e.x1=t<e.x1?t:e.x1,e.x2=r>e.x2?r:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2)},p=function(e,t){return d(e,t.x1,t.y1,t.x2,t.y2)},f=function(e,t,n){return l.getPrefixedProperty(e,t,n)},h=function(e,t,n,r){var i,o,a=t._private.rstyle,s=a.arrowWidth/2;"none"!==t.pstyle(n+"-arrow-shape").value&&("source"===n?(i=a.srcX,o=a.srcY):"target"===n?(i=a.tgtX,o=a.tgtY):(i=a.midX,o=a.midY),d(e,i-s,o-s,i+s,o+s))},g=function(e,t,n,r){var i;i=n?n+"-":"";var o=t._private,a=o.rstyle;if(t.pstyle(i+"label").strValue){var s,l,c,u,p=t.pstyle("text-halign"),h=t.pstyle("text-valign"),g=f(a,"labelWidth",n),v=f(a,"labelHeight",n),m=f(a,"labelX",n),y=f(a,"labelY",n),b=t.pstyle(i+"text-margin-x").pfValue,C=t.pstyle(i+"text-margin-y").pfValue,x=t.isEdge(),E=t.pstyle(i+"text-rotation"),S=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,V=t.pstyle("text-background-padding").pfValue,R=v+2*V,O=g+2*V,A=O/2,k=R/2;if(x)s=m-A,l=m+A,c=y-k,u=y+k;else{switch(p.value){case"left":s=m-O,l=m;break;case"center":s=m-A,l=m+A;break;case"right":s=m,l=m+O}switch(h.value){case"top":c=y-R,u=y;break;case"center":c=y-k,u=y+k;break;case"bottom":c=y,u=y+R}}var T=x&&"autorotate"===E.strValue,D=null!=E.pfValue&&0!==E.pfValue;if(T||D){var N=T?f(o.rstyle,"labelAngle",n):E.pfValue,P=Math.cos(N),B=Math.sin(N),_=function(e,t){return{x:(e-=m)*P-(t-=y)*B+m,y:e*B+t*P+y}},M=_(s,c),I=_(s,u),F=_(l,c),L=_(l,u);s=Math.min(M.x,I.x,F.x,L.x),l=Math.max(M.x,I.x,F.x,L.x),c=Math.min(M.y,I.y,F.y,L.y),u=Math.max(M.y,I.y,F.y,L.y)}s+=b-Math.max(S,w),l+=b+Math.max(S,w),c+=C-Math.max(S,w),u+=C+Math.max(S,w),d(e,s,c,l,u)}return e},v=function(e,t){var n,r,i,o,a,s,l=e._private.cy._private.styleEnabled,p={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},f=e._private,v=l?e.pstyle("display").value:"element",m=e.isNode(),y=e.isEdge(),b="none"!==v;if(b){var C=0;l&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(C=e.pstyle("overlay-padding").value);var x=0;if(l&&(x=e.pstyle("width").pfValue/2),m&&t.includeNodes){var E=e.position();a=E.x,s=E.y;var S=e.outerWidth()/2,w=e.outerHeight()/2;d(p,n=a-S-C,i=s-w-C,r=a+S+C,o=s+w+C)}else if(y&&t.includeEdges){var V=f.rstyle||{};if(l&&(n=Math.min(V.srcX,V.midX,V.tgtX),r=Math.max(V.srcX,V.midX,V.tgtX),i=Math.min(V.srcY,V.midY,V.tgtY),o=Math.max(V.srcY,V.midY,V.tgtY),d(p,n-=x,i-=x,r+=x,o+=x)),l&&"haystack"===e.pstyle("curve-style").strValue){var R=V.haystackPts;if(n=R[0].x,i=R[0].y,n>(r=R[1].x)){var O=n;n=r,r=O}i>(o=R[1].y)&&(O=i,i=o,o=O),d(p,n-x,i-x,r+x,o+x)}else{for(var A=V.bezierPts||V.linePts||[],k=0;k<A.length;k++){var T=A[k];n=T.x-x,r=T.x+x,i=T.y-x,o=T.y+x,d(p,n,i,r,o)}if(0===A.length){var D=e.source().position(),N=e.target().position();(n=D.x)>(r=N.x)&&(O=n,n=r,r=O),(i=D.y)>(o=N.y)&&(O=i,i=o,o=O),d(p,n-=x,i-=x,r+=x,o+=x)}}}l&&(n=p.x1,r=p.x2,i=p.y1,o=p.y2,d(p,n-C,i-C,r+C,o+C)),l&&t.includeEdges&&y&&(h(p,e,"mid-source",t),h(p,e,"mid-target",t),h(p,e,"source",t),h(p,e,"target",t)),l&&t.includeLabels&&(g(p,e,null,t),y&&(g(p,e,"source",t),g(p,e,"target",t)))}return p.x1=u(p.x1),p.y1=u(p.y1),p.x2=u(p.x2),p.y2=u(p.y2),p.w=u(p.x2-p.x1),p.h=u(p.y2-p.y1),p.w>0&&p.h>0&&b&&c.expandBoundingBox(p,1),p},m=function(e){return e?"t":"f"},y=function(e){var t="";return t+=m(e.incudeNodes),t+=m(e.includeEdges),(t+=m(e.includeLabels))+m(e.includeOverlays)},b=function(e,t){var n,r=e._private,i=e.cy().headless(),o=t===C?x:y(t);return t.useCache&&!i&&r.bbCache&&r.bbCache[o]?n=r.bbCache[o]:(n=v(e,t),i||(r.bbCache=r.bbCache||{},r.bbCache[o]=n)),n},C={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeOverlays:!0,useCache:!0},x=y(C);o.recalculateRenderedStyle=function(e){var t=this.cy(),n=t.renderer(),r=t.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,e),this},o.boundingBox=function(e){if(1===this.length&&this[0]._private.bbCache&&(void 0===e||void 0===e.useCache||!0===e.useCache))return e=void 0===e?C:r(e),b(this[0],e);var t={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},n=r(e=e||l.staticEmptyObject()),i=this,o=i.cy().styleEnabled();o&&this.recalculateRenderedStyle(n.useCache),this.updateCompoundBounds();for(var a={},s=0;s<i.length;s++){var c=i[s];if(o&&c.isEdge()&&"bezier"===c.pstyle("curve-style").strValue&&!a[c.id()]){for(var d=c.parallelEdges(),f=0;f<d.length;f++)a[d[f].id()]=!0;d.recalculateRenderedStyle(n.useCache)}p(t,b(c,n))}return t.x1=u(t.x1),t.y1=u(t.y1),t.x2=u(t.x2),t.y2=u(t.y2),t.w=u(t.x2-t.x1),t.h=u(t.y2-t.y1),t},o.boundingBoxAt=function(e){var t=this.nodes();if(s.plainObject(e)){var n=e;e=function(){return n}}for(var r=0;r<t.length;r++){var i=(c=(l=t[r])._private).position,o=e.call(l,r,l);c.bbAtOldPos={x:i.x,y:i.y},o&&(i.x=o.x,i.y=o.y)}this.trigger("dirty"),t.dirtyCompoundBoundsCache().updateCompoundBounds();var a=this.boundingBox({useCache:!1});for(r=0;r<t.length;r++){var l,c=(l=t[r])._private,u=(i=l._private.position,c.bbAtOldPos);i.x=u.x,i.y=u.y}return t.dirtyCompoundBoundsCache(),this.trigger("dirty"),a};var E=function(e){e.uppercaseName=l.capitalize(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=l.capitalize(e.outerName),i[e.name]=function(){var t=this[0],n=t._private,r=n.cy._private.styleEnabled;if(t){if(!r)return 1;if(t.isParent())return t.updateCompoundBounds(),n[e.autoName]||0;var i=t.pstyle(e.name);return"label"===i.strValue?(t.recalculateRenderedStyle(),n.rstyle[e.labelName]||0):i.pfValue}},i["outer"+e.uppercaseName]=function(){var t=this[0],n=t._private.cy._private.styleEnabled;if(t)return n?t[e.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},i["rendered"+e.uppercaseName]=function(){var t=this[0];if(t)return t[e.name]()*this.cy().zoom()},i["rendered"+e.uppercaseOuterName]=function(){var t=this[0];if(t)return t[e.outerName]()*this.cy().zoom()}};E({name:"width"}),E({name:"height"}),o.padding=function(){var e=this[0],t=e._private;return e.isParent()?(e.updateCompoundBounds(),void 0!==t.autoPadding?t.autoPadding:e.pstyle("padding").pfValue):e.pstyle("padding").pfValue},i.modelPosition=i.point=i.position,i.modelPositions=i.points=i.positions,i.renderedPoint=i.renderedPosition,i.relativePoint=i.relativePosition,i.boundingbox=i.boundingBox,i.renderedBoundingbox=i.renderedBoundingBox,t.exports=o},{"../define":44,"../is":91,"../math":93,"../util":108}],22:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=function(e,t,n){if(n=!(void 0!==n&&!n),void 0!==e&&void 0!==t&&i.core(e)){var o=t.group;if(null==o&&(o=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===o||"edges"===o){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:o,style:{},rstyle:{},styleCxts:[],removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,active:!1,classes:{},animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{}};if(t.renderedPosition){var s=t.renderedPosition,l=e.pan(),c=e.zoom();a.position={x:(s.x-l.x)/c,y:(s.y-l.y)/c}}if(i.string(t.classes))for(var u=t.classes.split(/\s+/),d=0,p=u.length;d<p;d++){var f=u[d];f&&""!==f&&(a.classes[f]=!0)}(t.style||t.css)&&e.style().applyBypass(this,t.style||t.css),(void 0===n||n)&&this.restore()}else r.error("An element must be of type `nodes` or `edges`; you specified `"+o+"`")}else r.error("An element must have a core reference and parameters set")};t.exports=o},{"../is":91,"../util":108}],23:[function(e,t,n){"use strict";var r=e("../define"),i={on:r.on(),one:r.on({unbindSelfOnTrigger:!0}),once:r.on({unbindAllBindersOnTrigger:!0}),off:r.off(),trigger:r.trigger(),rtrigger:function(e,t){if(0!==this.length)return this.cy().notify({type:e,eles:this}),this.trigger(e,t),this}};r.eventAliasesOn(i),t.exports=i},{"../define":44}],24:[function(e,t,n){"use strict";var r=e("../is"),i=e("../selector"),o={nodes:function(e){return this.filter((function(e,t){return e.isNode()})).filter(e)},edges:function(e){return this.filter((function(e,t){return e.isEdge()})).filter(e)},filter:function(e,t){if(void 0===e)return this;if(r.string(e)||r.elementOrCollection(e))return new i(e).filter(this);if(r.fn(e)){for(var n=this.spawn(),o=this,a=0;a<o.length;a++){var s=o[a];(t?e.apply(t,[s,a,o]):e(s,a,o))&&n.merge(s)}return n}return this.spawn()},not:function(e){if(e){r.string(e)&&(e=this.filter(e));for(var t=[],n=e._private.map,i=0;i<this.length;i++){var o=this[i];n.has(o.id())||t.push(o)}return this.spawn(t)}return this},absoluteComplement:function(){return this._private.cy.mutableElements().not(this)},intersect:function(e){if(r.string(e)){var t=e;return this.filter(t)}for(var n=[],i=this,o=e,a=this.length<e.length,s=a?o._private.map:i._private.map,l=a?i:o,c=0;c<l.length;c++){var u=l[c]._private.data.id,d=s.get(u);d&&n.push(d.ele)}return this.spawn(n)},xor:function(e){var t=this._private.cy;r.string(e)&&(e=t.$(e));var n=[],i=this,o=e,a=function(e,t){for(var r=0;r<e.length;r++){var i=e[r],o=i._private.data.id;t.hasElementWithId(o)||n.push(i)}};return a(i,o),a(o,i),this.spawn(n)},diff:function(e){var t=this._private.cy;r.string(e)&&(e=t.$(e));var n=[],i=[],o=[],a=this,s=e,l=function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r],a=i._private.data.id;t.hasElementWithId(a)?o.push(i):n.push(i)}};return l(a,s,n),l(s,a,i),{left:this.spawn(n,{unique:!0}),right:this.spawn(i,{unique:!0}),both:this.spawn(o,{unique:!0})}},add:function(e){var t=this._private.cy;if(!e)return this;if(r.string(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=[],o=0;o<this.length;o++)i.push(this[o]);var a=this._private.map;for(o=0;o<e.length;o++)!a.has(e[o].id())&&i.push(e[o]);return this.spawn(i)},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&r.string(e)){var i=e;e=n.mutableElements().filter(i)}for(var o=t.map,a=0;a<e.length;a++){var s,l=e[a],c=l._private.data.id;o.has(c)?(this[s=o.get(c).index]=l,o.set(c,{ele:l,index:s})):(this[s=this.length++]=l,o.set(c,{ele:l,index:s}))}return this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map,i=r.get(n);if(!i)return this;var o=i.index;this[o]=void 0,r.delete(n);var a=o===this.length-1;if(this.length>1&&!a){var s=this.length-1,l=this[s],c=l._private.data.id;this[s]=void 0,this[o]=l,r.set(c,{ele:l,index:o})}return this.length--,this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&r.string(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=0;i<e.length;i++)this.unmergeOne(e[i]);return this},map:function(e,t){for(var n=[],r=this,i=0;i<r.length;i++){var o=r[i],a=t?e.apply(t,[o,i,r]):e(o,i,r);n.push(a)}return n},reduce:function(e,t){for(var n=t,r=this,i=0;i<r.length;i++)n=e(n,r[i],i,r);return n},max:function(e,t){for(var n,r=-1/0,i=this,o=0;o<i.length;o++){var a=i[o],s=t?e.apply(t,[a,o,i]):e(a,o,i);s>r&&(r=s,n=a)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,o=0;o<i.length;o++){var a=i[o],s=t?e.apply(t,[a,o,i]):e(a,o,i);s<r&&(r=s,n=a)}return{value:r,ele:n}}},a=o;a.u=a["|"]=a["+"]=a.union=a.or=a.add,a["\\"]=a["!"]=a["-"]=a.difference=a.relativeComplement=a.subtract=a.not,a.n=a["&"]=a["."]=a.and=a.intersection=a.intersect,a["^"]=a["(+)"]=a["(-)"]=a.symmetricDifference=a.symdiff=a.xor,a.fnFilter=a.filterFn=a.stdFilter=a.filter,a.complement=a.abscomp=a.absoluteComplement,t.exports=o},{"../is":91,"../selector":95}],25:[function(e,t,n){"use strict";var r={isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source().id()===this.target().id()},isSimple:function(){return this.isEdge()&&this.source().id()!==this.target().id()},group:function(){var e=this[0];if(e)return e._private.group}};t.exports=r},{}],26:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../map"),a=e("../set"),s=e("./element"),l={generate:function(e,t,n){for(var i=null!=n?n:r.uuid();e.hasElementWithId(i);)i=r.uuid();return i}},c=function(e,t,n){if(void 0!==e&&i.core(e)){var c=new o,u=!1;if(t){if(t.length>0&&i.plainObject(t[0])&&!i.element(t[0])){u=!0;for(var d=[],p=new a,f=0,h=t.length;f<h;f++){var g=t[f];null==g.data&&(g.data={});var v=g.data;if(null==v.id)v.id=l.generate(e,g);else if(e.hasElementWithId(v.id)||p.has(v.id))continue;var m=new s(e,g,!1);d.push(m),p.add(v.id)}t=d}}else t=[];for(this.length=0,f=0,h=t.length;f<h;f++){var y=t[f];if(y){var b=y._private.data.id;(!n||n.unique&&!c.has(b))&&(c.set(b,{index:this.length,ele:y}),this[this.length]=y,this.length++)}}this._private={cy:e,map:c},u&&this.restore()}else r.error("A collection must have a reference to the core")},u=s.prototype=c.prototype;u.instanceString=function(){return"collection"},u.spawn=function(e,t,n){return i.core(e)||(n=t,t=e,e=this.cy()),new c(e,t,n)},u.spawnSelf=function(){return this.spawn(this)},u.cy=function(){return this._private.cy},u.element=function(){return this[0]},u.collection=function(){return i.collection(this)?this:new c(this._private.cy,[this])},u.unique=function(){return new c(this._private.cy,this,{unique:!0})},u.hasElementWithId=function(e){return this._private.map.has(e)},u.getElementById=function(e){var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new c(t)},u.poolIndex=function(){var e=this._private.cy._private.elements,t=this._private.data.id;return e._private.map.get(t).index},u.json=function(e){var t=this.element(),n=this.cy();if(null==t&&e)return this;if(null!=t){var o=t._private;if(i.plainObject(e)){n.startBatch(),e.data&&t.data(e.data),e.position&&t.position(e.position);var a=function(n,r,i){var a=e[n];null!=a&&a!==o[n]&&(a?t[r]():t[i]())};return a("removed","remove","restore"),a("selected","select","unselect"),a("selectable","selectify","unselectify"),a("locked","lock","unlock"),a("grabbable","grabify","ungrabify"),null!=e.classes&&t.classes(e.classes),n.endBatch(),this}if(void 0===e){var s={data:r.copy(o.data),position:r.copy(o.position),group:o.group,removed:o.removed,selected:o.selected,selectable:o.selectable,locked:o.locked,grabbable:o.grabbable,classes:null};return s.classes=Object.keys(o.classes).filter((function(e){return o.classes[e]})).join(" "),s}}},u.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t].json();e.push(n)}return e},u.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=this[n].json(),i=new s(e,r,!1);t.push(i)}return new c(e,t)},u.copy=u.clone,u.restore=function(e){var t=this,n=t.cy(),a=n._private;void 0===e&&(e=!0);for(var s,u=[],d=[],p=0,f=t.length;p<f;p++)(B=t[p]).removed()&&(B.isNode()?u.push(B):d.push(B));s=u.concat(d);var h=function(){s.splice(p,1),p--};for(p=0;p<s.length;p++){var g=(B=s[p])._private,v=g.data;if(B.clearTraversalCache(),void 0===v.id)v.id=l.generate(n,B);else if(i.number(v.id))v.id=""+v.id;else{if(i.emptyString(v.id)||!i.string(v.id)){r.error("Can not create element with invalid string ID `"+v.id+"`"),h();continue}if(n.hasElementWithId(v.id)){r.error("Can not create second element with ID `"+v.id+"`"),h();continue}}var m=v.id;if(B.isNode()){var y=B,b=g.position;null==b.x&&(b.x=0),null==b.y&&(b.y=0)}if(B.isEdge()){for(var C=B,x=["source","target"],E=x.length,S=!1,w=0;w<E;w++){var V=x[w],R=v[V];i.number(R)&&(R=v[V]=""+v[V]),null==R||""===R?(r.error("Can not create edge `"+m+"` with unspecified "+V),S=!0):n.hasElementWithId(R)||(r.error("Can not create edge `"+m+"` with nonexistant "+V+" `"+R+"`"),S=!0)}if(S){h();continue}var O=n.getElementById(v.source),A=n.getElementById(v.target);O._private.edges.push(C),A._private.edges.push(C),C._private.source=O,C._private.target=A}g.map=new o,g.map.set(m,{ele:B,index:0}),g.removed=!1,n.addToPool(B)}for(p=0;p<u.length;p++){v=(y=u[p])._private.data,i.number(v.parent)&&(v.parent=""+v.parent);var k=v.parent;if(null!=k){var T=n.getElementById(k);if(T.empty())v.parent=void 0;else{for(var D=!1,N=T;!N.empty();){if(y.same(N)){D=!0,v.parent=void 0;break}N=N.parent()}D||(T[0]._private.children.push(y),y._private.parent=T[0],a.hasCompoundNodes=!0)}}}if(s.length>0){var P=new c(n,s);for(p=0;p<P.length;p++){var B;(B=P[p]).isNode()||(B.parallelEdges().clearTraversalCache(),B.source().clearTraversalCache(),B.target().clearTraversalCache())}(a.hasCompoundNodes?n.collection().merge(P).merge(P.connectedNodes()).merge(P.parent()):P).dirtyCompoundBoundsCache().updateStyle(e),e?P.rtrigger("add"):P.trigger("add")}return t},u.removed=function(){var e=this[0];return e&&e._private.removed},u.inside=function(){var e=this[0];return e&&!e._private.removed},u.remove=function(e){function t(e){for(var t=e._private.edges,n=0;n<t.length;n++)i(t[n])}function n(e){for(var t=e._private.children,n=0;n<t.length;n++)i(t[n])}function i(e){p[e.id()]||(p[e.id()]=!0,e.isNode()?(d.push(e),t(e),n(e)):d.unshift(e))}function o(e,t){var n=e._private.edges;r.removeFromArray(n,t),e.clearTraversalCache()}function a(e){e.parallelEdges().clearTraversalCache()}function s(e,t){t=t[0];var n=(e=e[0])._private.children,i=e.id();r.removeFromArray(n,t),v.ids[i]||(v.ids[i]=!0,v.push(e))}var l=this,u=[],d=[],p={},f=l._private.cy;void 0===e&&(e=!0);for(var h=0,g=l.length;h<g;h++)i(E=l[h]);var v=[];for(v.ids={},l.dirtyCompoundBoundsCache(),f.removeFromPool(d),h=0;h<d.length;h++)if((E=d[h])._private.removed=!0,u.push(E),E.isEdge()){var m=E.source()[0],y=E.target()[0];o(m,E),o(y,E),a(E)}else{var b=E.parent();0!==b.length&&s(b,E)}var C=f._private.elements;for(f._private.hasCompoundNodes=!1,h=0;h<C.length;h++)if((E=C[h]).isParent()){f._private.hasCompoundNodes=!0;break}var x=new c(this.cy(),u);for(x.size()>0&&(e&&this.cy().notify({type:"remove",eles:x}),x.trigger("remove")),h=0;h<v.length;h++){var E;(E=v[h]).removed()||E.updateStyle()}return new c(f,u)},u.move=function(e){var t=this._private.cy;if(void 0!==e.source||void 0!==e.target){var n=e.source,r=e.target,i=t.hasElementWithId(n),o=t.hasElementWithId(r);if(i||o){var a=this.jsons();this.remove();for(var s=0;s<a.length;s++){var l=a[s],c=this[s];"edges"===l.group&&(i&&(l.data.source=n),o&&(l.data.target=r),l.scratch=c._private.scratch)}return t.add(a)}}else if(void 0!==e.parent){var u=e.parent;if(null===u||t.hasElementWithId(u)){a=this.jsons();var d=this.descendants(),p=d.union(d.union(this).connectedEdges()).jsons();for(this.remove(),s=0;s<a.length;s++)l=a[s],c=this[s],"nodes"===l.group&&(l.data.parent=null===u?void 0:u,l.scratch=c._private.scratch);return t.add(a.concat(p))}}return this},[e("./algorithms"),e("./animation"),e("./class"),e("./comparators"),e("./compounds"),e("./data"),e("./degree"),e("./dimensions"),e("./events"),e("./filter"),e("./group"),e("./index"),e("./iteration"),e("./layout"),e("./style"),e("./switch-functions"),e("./traversing")].forEach((function(e){r.extend(u,e)})),t.exports=c},{"../is":91,"../map":92,"../set":96,"../util":108,"./algorithms":11,"./animation":15,"./class":16,"./comparators":17,"./compounds":18,"./data":19,"./degree":20,"./dimensions":21,"./element":22,"./events":23,"./filter":24,"./group":25,"./index":26,"./iteration":27,"./layout":28,"./style":29,"./switch-functions":30,"./traversing":31}],27:[function(e,t,n){"use strict";var r=e("../is"),i=e("./zsort"),o={forEach:function(e,t){if(r.fn(e))for(var n=0;n<this.length;n++){var i=this[n];if(!1===(t?e.apply(t,[i,n,this]):e(i,n,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=[],r=this.length;null==t&&(t=r),null==e&&(e=0),e<0&&(e=r+e),t<0&&(t=r+t);for(var i=e;i>=0&&i<t&&i<r;i++)n.push(this[i]);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(!r.fn(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(i)},zDepth:function(){var e=this[0];if(e){var t=e._private;if("nodes"===t.group){var n=t.data.parent?e.parents().size():0;return e.isParent()?n:Number.MAX_SAFE_INTEGER-1}var r=t.source,i=t.target,o=r.zDepth(),a=i.zDepth();return Math.max(o,a,0)}}};o.each=o.forEach,t.exports=o},{"../is":91,"./zsort":32}],28:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../promise"),a=e("../math"),s={layoutDimensions:function(e){if(e.nodeDimensionsIncludeLabels){var t=this.boundingBox();return{w:t.w,h:t.h}}return{w:this.outerWidth(),h:this.outerHeight()}},layoutPositions:function(e,t,n){var s=this.nodes(),l=this.cy(),c=t.eles,u=i.memoize(n,(function(e,t){return e.id()+"$"+t}));e.trigger({type:"layoutstart",layout:e}),e.animations=[];var d=function(e,t,n){var r={x:t.x1+t.w/2,y:t.y1+t.h/2},i={x:(n.x-r.x)*e,y:(n.y-r.y)*e};return{x:r.x+i.x,y:r.y+i.y}},p=function(){for(var e=a.makeBoundingBox(),t=0;t<s.length;t++){var n=s[t],r=u(n,t);a.expandBoundingBoxByPoint(e,r.x,r.y)}return e};if(t.animate){for(var f=p(),h={},g=0;g<s.length;g++){var v=s[g],m=u(v,g),y=v.position();if(r.number(y.x)&&r.number(y.y)||v.silentPosition({x:0,y:0}),t.spacingFactor&&1!==t.spacingFactor){var b=Math.abs(t.spacingFactor);m=d(b,f,m)}h[v.id()]=m}for(g=0;g<s.length;g++){v=s[g],m=h[v.id()];var C=v.animation({position:m,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(C),C.play()}if(t.fit){var x=l.animation({fit:{boundingBox:c.boundingBoxAt((function(e,t){return h[t.id()]})),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(x),x.play()}else if(void 0!==t.zoom&&void 0!==t.pan){var E=l.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(E),E.play()}e.one("layoutready",t.ready),e.trigger({type:"layoutready",layout:e}),o.all(e.animations.map((function(e){return e.promise()}))).then((function(){e.one("layoutstop",t.stop),e.trigger({type:"layoutstop",layout:e})}))}else t.spacingFactor&&1!==t.spacingFactor?(b=Math.abs(t.spacingFactor),f=p(),s.positions((function(e,t){var n=u(e,t);return d(b,f,n)}))):s.positions(n),t.fit&&l.fit(t.eles,t.padding),null!=t.zoom&&l.zoom(t.zoom),t.pan&&l.pan(t.pan),e.one("layoutready",t.ready),e.trigger({type:"layoutready",layout:e}),e.one("layoutstop",t.stop),e.trigger({type:"layoutstop",layout:e});return this},layout:function(e){return this.cy().makeLayout(i.extend({},e,{eles:this}))}};s.createLayout=s.makeLayout=s.layout,t.exports=s},{"../is":91,"../math":93,"../promise":94,"../util":108}],29:[function(e,t,n){"use strict";function r(e){var t=e.ok,n=e.edgeOkViaNode||e.ok,r=e.parentOk||e.ok;return function(){var e=this.cy();if(!e.styleEnabled())return!0;var i=this[0],o=e.hasCompoundNodes();if(i){var a=i._private;if(!t(i))return!1;if(i.isNode()){if(o){var s=a.data.parent?i.parents():null;if(s)for(var l=0;l<s.length;l++){var c=s[l];if(!r(c))return!1}}return!0}return n(a.source)&&n(a.target)}}}var i=e("../is"),o={updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t._private.batchingStyle)return t._private.batchStyleEles.merge(this),this;var n=t.hasCompoundNodes(),r=t.style(),i=this;e=!(!e&&void 0!==e),n&&(i=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var o=r.apply(i);return e?o.rtrigger("style"):o.trigger("style"),this},updateMappers:function(e){var t=this._private.cy,n=t.style();if(e=!(!e&&void 0!==e),!t.styleEnabled())return this;var r=n.updateMappers(this);return this.dirtyCompoundBoundsCache(e),e?r.rtrigger("style"):r.trigger("style"),this},parsedStyle:function(e){var t=this[0],n=t.cy();if(n.styleEnabled())return t?t._private.style[e]||n.style().getDefaultProperty(e):void 0},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())return t?t.pstyle(e).units:void 0},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 r=!1,o=n.style();if(i.plainObject(e)){var a=e;o.applyBypass(this,a,r),this.dirtyCompoundBoundsCache(),this.rtrigger("style")}else if(i.string(e)){if(void 0===t)return(s=this[0])?o.getStylePropertyValue(s,e):void 0;o.applyBypass(this,e,t,r),this.dirtyCompoundBoundsCache(),this.rtrigger("style")}else if(void 0===e){var s;return(s=this[0])?o.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(void 0===e)for(var o=0;o<i.length;o++){var a=i[o];r.removeAllBypasses(a,n)}else for(e=e.split(/\s+/),o=0;o<i.length;o++)a=i[o],r.removeBypasses(a,e,n);return this.dirtyCompoundBoundsCache(),this.rtrigger("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 r=n._private,i=n.pstyle("opacity").value;if(!t)return i;var o=r.data.parent?n.parents():null;if(o)for(var a=0;a<o.length;a++)i*=o[a].pstyle("opacity").value;return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var e=this[0],t=e.cy().hasCompoundNodes();return e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}},a=function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())};o.takesUpSpace=r({ok:a});var s=function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&a(e)},l=function(e){return"visible"===e.pstyle("visibility").value&&a(e)};o.interactive=r({ok:s,parentOk:l,edgeOkViaNode:a}),o.noninteractive=function(){var e=this[0];if(e)return!e.interactive()};var c=function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&a(e)},u=a;o.visible=r({ok:c,edgeOkViaNode:u}),o.hidden=function(){var e=this[0];if(e)return!e.visible()},o.bypass=o.css=o.style,o.renderedCss=o.renderedStyle,o.removeBypass=o.removeCss=o.removeStyle,o.pstyle=o.parsedStyle,t.exports=o},{"../is":91}],30:[function(e,t,n){"use strict";function r(e){return function(){var t=arguments,n=[];if(2===t.length){var r=t[0],i=t[1];this.on(e.event,r,i)}else if(1===t.length)i=t[0],this.on(e.event,i);else if(0===t.length){for(var o=0;o<this.length;o++){var a=this[o],s=!e.ableField||a._private[e.ableField],l=a._private[e.field]!=e.value;if(e.overrideAble){var c=e.overrideAble(a);if(void 0!==c&&(s=c,!c))return this}s&&(a._private[e.field]=e.value,l&&n.push(a))}var u=this.spawn(n);u.updateStyle(),u.trigger(e.event)}return this}}function i(e){o[e.field]=function(){var t=this[0];if(t){if(e.overrideField){var n=e.overrideField(t);if(void 0!==n)return n}return t._private[e.field]}},o[e.on]=r({event:e.on,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!0}),o[e.off]=r({event:e.off,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!1})}var o={};i({field:"locked",overrideField:function(e){return!!e.cy().autolock()||void 0},on:"lock",off:"unlock"}),i({field:"grabbable",overrideField:function(e){return!e.cy().autoungrabify()&&void 0},on:"grabify",off:"ungrabify"}),i({field:"selected",ableField:"selectable",overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),i({field:"selectable",overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),o.deselect=o.unselect,o.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},i({field:"active",on:"activate",off:"unactivate"}),o.inactive=function(){var e=this[0];if(e)return!e._private.active},t.exports=o},{}],31:[function(e,t,n){"use strict";function r(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r]._private[e.attr];i&&n.push(i)}return this.spawn(n,{unique:!0}).filter(t)}}function i(e){return function(t){var n=[],r=this._private.cy,i=e||{};s.string(t)&&(t=r.$(t));for(var o=0;o<t.length;o++)for(var a=t[o]._private.edges,l=0;l<a.length;l++){var c=a[l],u=c._private.data,d=this.hasElementWithId(u.source)&&t.hasElementWithId(u.target),p=t.hasElementWithId(u.source)&&this.hasElementWithId(u.target);if(d||p){if(i.thisIsSrc||i.thisIsTgt){if(i.thisIsSrc&&!d)continue;if(i.thisIsTgt&&!p)continue}n.push(c)}}return this.spawn(n,{unique:!0})}}function o(e){var t={codirected:!1};return e=a.extend({},t,e),function(t){for(var n=[],r=this.edges(),i=e,o=0;o<r.length;o++)for(var a=r[o]._private,s=a.source,l=s._private.data.id,c=a.data.target,u=s._private.edges,d=0;d<u.length;d++){var p=u[d],f=p._private.data,h=f.target,g=f.source,v=h===c&&g===l,m=l===h&&c===g;(i.codirected&&v||!i.codirected&&(v||m))&&n.push(p)}return this.spawn(n,{unique:!0}).filter(t)}}var a=e("../util"),s=e("../is"),l={},c=function(e,t){return function(n,r,i,o){var a,l=n,c=this;if(null==l?a="null":s.elementOrCollection(l)&&1===l.length&&(a="#"+l.id()),1===c.length&&a){var u=c[0]._private,d=u.traversalCache=u.traversalCache||{},p=d[t]=d[t]||{},f=p[a];return f||(p[a]=e.call(c,n,r,i,o))}return e.call(c,n,r,i,o)}},u=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode()){for(var a=!1,s=o.connectedEdges(),l=0;l<s.length;l++){var c=s[l],u=c.source(),d=c.target();if(e.noIncomingEdges&&d===o&&u!==o||e.noOutgoingEdges&&u===o&&d!==o){a=!0;break}}a||r.push(o)}}return this.spawn(r,{unique:!0}).filter(t)}},d=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode())for(var a=o.connectedEdges(),s=0;s<a.length;s++){var l=a[s],c=l.source(),u=l.target();e.outgoing&&c===o?(r.push(l),r.push(u)):e.incoming&&u===o&&(r.push(l),r.push(c))}}return this.spawn(r,{unique:!0}).filter(t)}},p=function(e){return function(t){for(var n=this,r=[],i={};;){var o=e.outgoing?n.outgoers():n.incomers();if(0===o.length)break;for(var a=!1,s=0;s<o.length;s++){var l=o[s],c=l.id();i[c]||(i[c]=!0,r.push(l),a=!0)}if(!a)break;n=o}return this.spawn(r,{unique:!0}).filter(t)}};l.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},a.extend(l,{roots:u({noIncomingEdges:!0}),leaves:u({noOutgoingEdges:!0}),outgoers:c(d({outgoing:!0}),"outgoers"),successors:p({outgoing:!0}),incomers:c(d({incoming:!0}),"incomers"),predecessors:p({incoming:!0})}),a.extend(l,{neighborhood:c((function(e){for(var t=[],n=this.nodes(),r=0;r<n.length;r++)for(var i=n[r],o=i.connectedEdges(),a=0;a<o.length;a++){var s=o[a],l=s.source(),c=s.target(),u=i===l?c:l;u.length>0&&t.push(u[0]),t.push(s[0])}return this.spawn(t,{unique:!0}).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),l.neighbourhood=l.neighborhood,l.closedNeighbourhood=l.closedNeighborhood,l.openNeighbourhood=l.openNeighborhood,a.extend(l,{source:c((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:c((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:r({attr:"source"}),targets:r({attr:"target"})}),a.extend(l,{edgesWith:c(i(),"edgesWith",!0),edgesTo:c(i({thisIsSrc:!0}),"edgesTo",!0)}),a.extend(l,{connectedEdges:c((function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];if(i.isNode())for(var o=i._private.edges,a=0;a<o.length;a++){var s=o[a];t.push(s)}}return this.spawn(t,{unique:!0}).filter(e)}),"connectedEdges"),connectedNodes:c((function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];i.isEdge()&&(t.push(i.source()[0]),t.push(i.target()[0]))}return this.spawn(t,{unique:!0}).filter(e)}),"connectedNodes"),parallelEdges:c(o(),"parallelEdges"),codirectedEdges:c(o({codirected:!0}),"codirectedEdges")}),a.extend(l,{components:function(){var e=this,t=e.cy(),n=e.spawn(),r=e.nodes().spawnSelf(),i=[],o=function(e,t){n.merge(e),r.unmerge(e),t.merge(e)};if(r.empty())return e.spawn();do{var a=t.collection();i.push(a);var s=r[0];o(s,a),e.bfs({directed:!1,roots:s,visit:function(e,t,n,r,i){o(e,a)}})}while(r.length>0);return i.map((function(e){var t=e.connectedEdges().stdFilter((function(t){return e.anySame(t.source())&&e.anySame(t.target())}));return e.union(t)}))}}),t.exports=l},{"../is":91,"../util":108}],32:[function(e,t,n){"use strict";var r=function(e,t){function n(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?i?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?Number.MAX_SAFE_INTEGER:0}function r(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var i=e.cy().hasCompoundNodes(),o=n(e)-n(t);if(0!==o)return o;var a=r(e)-r(t);if(0!==a)return a;var s=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==s?s:e.poolIndex()-t.poolIndex()};t.exports=r},{}],33:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../collection"),a=e("../collection/element"),s={add:function(e){var t,n=this;if(r.elementOrCollection(e)){var s=e;if(s._private.cy===n)t=s.restore();else{for(var l=[],c=0;c<s.length;c++){var u=s[c];l.push(u.json())}t=new o(n,l)}}else if(r.array(e))t=new o(n,l=e);else if(r.plainObject(e)&&(r.array(e.nodes)||r.array(e.edges))){for(var d=e,p=(l=[],["nodes","edges"]),f=(c=0,p.length);c<f;c++){var h=p[c],g=d[h];if(r.array(g))for(var v=0,m=g.length;v<m;v++){var y=i.extend({group:h},g[v]);l.push(y)}}t=new o(n,l)}else t=new a(n,y=e).collection();return t},remove:function(e){if(r.elementOrCollection(e));else if(r.string(e)){var t=e;e=this.$(t)}return e.remove()}};t.exports=s},{"../collection":26,"../collection/element":22,"../is":91,"../util":108}],34:[function(e,t,n){"use strict";var r=e("../define"),i=e("../util"),o=e("../is"),a={animate:r.animate(),animation:r.animation(),animated:r.animated(),clearQueue:r.clearQueue(),delay:r.delay(),delayAnimation:r.delayAnimation(),stop:r.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){function e(){d._private.animationsRunning&&i.requestAnimationFrame((function(n){t(n),e()}))}function t(e){function t(t,i){var a=t._private,s=a.animation.current,l=a.animation.queue,c=!1;if(!i&&"none"===t.pstyle("display").value){s=s.splice(0,s.length).concat(l.splice(0,l.length));for(var u=0;u<s.length;u++)s[u].stop()}if(0===s.length){var d=l.shift();d&&s.push(d)}var p=function(e){for(var t=e.length-1;t>=0;t--)(0,e[t])();e.splice(0,e.length)};for(u=s.length-1;u>=0;u--){var f=s[u],h=f._private;h.stopped?(s.splice(u,1),h.hooked=!1,h.playing=!1,h.started=!1,p(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||n(t,f,e),r(t,f,e,i),h.applying&&(h.applying=!1),p(h.frames),f.completed()&&(s.splice(u,1),h.hooked=!1,h.playing=!1,h.started=!1,p(h.completes)),c=!0)}return i||0!==s.length||0!==l.length||o.push(t),c}for(var i=d._private.aniEles,o=[],a=!1,s=0;s<i.length;s++){var l=t(i[s]);a=a||l}var c=t(d,!0);(a||c)&&(i.length>0?(i.dirtyCompoundBoundsCache(),d.notify({type:"draw",eles:i})):d.notify({type:"draw"})),i.unmerge(o),d.trigger("step")}function n(e,t,n){var r=o.core(e),i=!r,a=e,s=t._private;if(i){var l=a.position();s.startPosition=s.startPosition||{x:l.x,y:l.y},s.startStyle=s.startStyle||p.getAnimationStartStyle(a,s.style)}if(r){var c=d._private.pan;s.startPan=s.startPan||{x:c.x,y:c.y},s.startZoom=null!=s.startZoom?s.startZoom:d._private.zoom}s.started=!0,s.startTime=n-s.progress*s.duration}function r(e,t,n,r){var i=!r,s=e._private,l=t._private,c=l.easing,d=l.startTime;if(!l.easingImpl)if(null==c)l.easingImpl=g.linear;else{var f,h;f=o.string(c)?p.parse("transition-timing-function",c).value:c,o.string(f)?(D=f,h=[]):(D=f[1],h=f.slice(2).map((function(e){return+e}))),h.length>0?("spring"===D&&h.push(l.duration),l.easingImpl=g[D].apply(null,h)):l.easingImpl=g[D]}var v,m=l.easingImpl;if(v=0===l.duration?1:(n-d)/l.duration,l.applying&&(v=l.progress),v<0?v=0:v>1&&(v=1),null==l.delay){var y=l.startPosition,b=l.position;if(b&&i){var C=e.position();a(y.x,b.x)&&(C.x=u(y.x,b.x,v,m)),a(y.y,b.y)&&(C.y=u(y.y,b.y,v,m)),e.trigger("position")}var x=l.startPan,E=l.pan,S=s.pan,w=null!=E&&r;w&&(a(x.x,E.x)&&(S.x=u(x.x,E.x,v,m)),a(x.y,E.y)&&(S.y=u(x.y,E.y,v,m)),e.trigger("pan"));var V=l.startZoom,R=l.zoom,O=null!=R&&r;O&&(a(V,R)&&(s.zoom=u(V,R,v,m)),e.trigger("zoom")),(w||O)&&e.trigger("viewport");var A=l.style;if(A&&A.length>0&&i){for(var k=0;k<A.length;k++){var T=A[k],D=T.name,N=T,P=u(l.startStyle[D],N,v,m);p.overrideBypass(e,D,P)}e.trigger("style")}}return l.progress=v,v}function a(e,t){return!(null==e||null==t||!(o.number(e)&&o.number(t)||e&&t))}function s(e,t,n){var r=1-n,i=n*n;return 3*r*r*n*e+3*r*i*t+i*n}function l(e,t){return function(n,r,i){return n+(r-n)*s(e,t,i)}}function c(e,t,n,r,i){var o=i(t,n,r);return null==e||((e.roundValue||e.color)&&(o=Math.round(o)),void 0!==e.min&&(o=Math.max(o,e.min)),void 0!==e.max&&(o=Math.min(o,e.max))),o}function u(e,t,n,r){var i,a,s=null!=e.name?p.properties[e.name]:null,l=null!=s?s.type:null;if(n<0?n=0:n>1&&(n=1),i=null!=e.pfValue||null!=e.value?null!=e.pfValue?e.pfValue:e.value:e,a=null!=t.pfValue||null!=t.value?null!=t.pfValue?t.pfValue:t.value:t,o.number(i)&&o.number(a))return c(l,i,a,n,r);if(o.array(i)&&o.array(a)){for(var u=[],d=0;d<a.length;d++){var f=i[d],h=a[d];if(null!=f&&null!=h){var g=c(l,f,h,n,r);u.push(g)}else u.push(h)}return u}}var d=this;if(d._private.animationsRunning=!0,d.styleEnabled()){var p=d.style(),f=d.renderer();f&&f.beforeRender?f.beforeRender((function(e,n){t(n)}),f.beforeRenderPriorities.animations):e();var h=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},o=t(n,.5*r,i),a=t(n,.5*r,o),s=t(n,r,a),l=1/6*(i.dx+2*(o.dx+a.dx)+s.dx),c=1/6*(i.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+c*r,n}return function e(t,r,i){var o,a,s,l={x:-1,v:0,tension:null,friction:null},c=[0],u=0,d=1e-4,p=.016;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,l.tension=t,l.friction=r,a=(o=null!==i)?(u=e(t,r))/i*p:p;s=n(s||l,a),c.push(1+s.x),u+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return o?function(e){return c[e*(c.length-1)|0]}:u}}(),g={linear:function(e,t,n){return e+(t-e)*n},ease:l(.25,.1,.25,1),"ease-in":l(.42,0,1,1),"ease-out":l(0,0,.58,1),"ease-in-out":l(.42,0,.58,1),"ease-in-sine":l(.47,0,.745,.715),"ease-out-sine":l(.39,.575,.565,1),"ease-in-out-sine":l(.445,.05,.55,.95),"ease-in-quad":l(.55,.085,.68,.53),"ease-out-quad":l(.25,.46,.45,.94),"ease-in-out-quad":l(.455,.03,.515,.955),"ease-in-cubic":l(.55,.055,.675,.19),"ease-out-cubic":l(.215,.61,.355,1),"ease-in-out-cubic":l(.645,.045,.355,1),"ease-in-quart":l(.895,.03,.685,.22),"ease-out-quart":l(.165,.84,.44,1),"ease-in-out-quart":l(.77,0,.175,1),"ease-in-quint":l(.755,.05,.855,.06),"ease-out-quint":l(.23,1,.32,1),"ease-in-out-quint":l(.86,0,.07,1),"ease-in-expo":l(.95,.05,.795,.035),"ease-out-expo":l(.19,1,.22,1),"ease-in-out-expo":l(1,0,0,1),"ease-in-circ":l(.6,.04,.98,.335),"ease-out-circ":l(.075,.82,.165,1),"ease-in-out-circ":l(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return g.linear;var r=h(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":function(e,t,n,r){return l(e,t,n,r)}}}}};t.exports=a},{"../define":44,"../is":91,"../util":108}],35:[function(e,t,n){"use strict";var r=e("../define"),i={on:r.on(),one:r.on({unbindSelfOnTrigger:!0}),once:r.on({unbindAllBindersOnTrigger:!0}),off:r.off(),trigger:r.trigger()};r.eventAliasesOn(i),t.exports=i},{"../define":44}],36:[function(e,t,n){"use strict";var r={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};r.jpeg=r.jpg,t.exports=r},{}],37:[function(e,t,n){"use strict";var r=e("../window"),i=e("../util"),o=e("../collection"),a=e("../is"),s=e("../promise"),l=e("../define"),c=function(e){var t=this,n=(e=i.extend({},e)).container;n&&!a.htmlElement(n)&&a.htmlElement(n[0])&&(n=n[0]);var l=n?n._cyreg:null;(l=l||{})&&l.cy&&(l.cy.destroy(),l={});var c=l.readies=l.readies||[];n&&(n._cyreg=l),l.cy=t;var u=void 0!==r&&void 0!==n&&!e.headless,d=e;d.layout=i.extend({name:u?"grid":"null"},d.layout),d.renderer=i.extend({name:u?"canvas":"null"},d.renderer);var p=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},f=this._private={container:n,ready:!1,options:d,elements:new o(this),listeners:[],aniEles:new o(this),scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:p(!0,d.zoomingEnabled),userZoomingEnabled:p(!0,d.userZoomingEnabled),panningEnabled:p(!0,d.panningEnabled),userPanningEnabled:p(!0,d.userPanningEnabled),boxSelectionEnabled:p(!0,d.boxSelectionEnabled),autolock:p(!1,d.autolock,d.autolockNodes),autoungrabify:p(!1,d.autoungrabify,d.autoungrabifyNodes),autounselectify:p(!1,d.autounselectify),styleEnabled:void 0===d.styleEnabled?u:d.styleEnabled,zoom:a.number(d.zoom)?d.zoom:1,pan:{x:a.plainObject(d.pan)&&a.number(d.pan.x)?d.pan.x:0,y:a.plainObject(d.pan)&&a.number(d.pan.y)?d.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1},h=d.selectionType;f.selectionType=void 0===h||"additive"!==h&&"single"!==h?"single":h,a.number(d.minZoom)&&a.number(d.maxZoom)&&d.minZoom<d.maxZoom?(f.minZoom=d.minZoom,f.maxZoom=d.maxZoom):a.number(d.minZoom)&&void 0===d.maxZoom?f.minZoom=d.minZoom:a.number(d.maxZoom)&&void 0===d.minZoom&&(f.maxZoom=d.maxZoom);var g=function(e,t){return e.some(a.promise)?s.all(e).then(t):void t(e)};t.initRenderer(i.extend({hideEdgesOnViewport:d.hideEdgesOnViewport,textureOnViewport:d.textureOnViewport,wheelSensitivity:a.number(d.wheelSensitivity)&&d.wheelSensitivity>0?d.wheelSensitivity:1,motionBlur:void 0!==d.motionBlur&&d.motionBlur,motionBlurOpacity:void 0===d.motionBlurOpacity?.05:d.motionBlurOpacity,pixelRatio:a.number(d.pixelRatio)&&d.pixelRatio>0?d.pixelRatio:void 0,desktopTapThreshold:void 0===d.desktopTapThreshold?4:d.desktopTapThreshold,touchTapThreshold:void 0===d.touchTapThreshold?8:d.touchTapThreshold},d.renderer));var v=function(e,n,r){t.notifications(!1);var o=t.mutableElements();o.length>0&&o.remove(),null!=e&&(a.plainObject(e)||a.array(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.trigger(e),t.notify({type:"load",eles:t.mutableElements()}),t.one("load",n),t.trigger("load")})).one("layoutstop",(function(){t.one("done",r),t.trigger("done")}));var s=i.extend({},t._private.options.layout);s.eles=t.elements(),t.layout(s).run()};g([d.style,d.elements],(function(e){var n=e[0],r=e[1];f.styleEnabled&&t.setStyle(n),v(r,(function(){t.startAnimationLoop(),f.ready=!0,a.fn(d.ready)&&t.on("ready",d.ready);for(var e=0;e<c.length;e++){var n=c[e];t.on("ready",n)}l&&(l.readies=[]),t.trigger("ready")}),d.done)}))},u=c.prototype;i.extend(u,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},isDestroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.trigger("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.isDestroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.trigger("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},selectionType:function(){return this._private.selectionType},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return"null"===this._private.options.renderer.name},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},options:function(){return i.copy(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements();if(a.plainObject(e)){if(t.startBatch(),e.elements){var o={},s=function(e,n){for(var r=0;r<e.length;r++){var a=e[r],s=a.data.id,l=t.getElementById(s);o[s]=!0,0!==l.length?l.json(a):n?t.add(i.extend({group:n},a)):t.add(a)}};if(a.array(e.elements))s(e.elements);else for(var l=["nodes","edges"],c=0;c<l.length;c++){var u=l[c],d=e.elements[u];a.array(d)&&s(d,u)}r.stdFilter((function(e){return!o[e.id()]})).remove()}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));var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify"];for(c=0;c<p.length;c++){var f=p[c];null!=e[f]&&t[f](e[f])}return t.endBatch(),this}if(void 0===e){var h={elements:{}};return r.forEach((function(e){var t=e.group();h.elements[t]||(h.elements[t]=[]),h.elements[t].push(e.json())})),this._private.styleEnabled&&(h.style=t.style().json()),h.zoomingEnabled=t._private.zoomingEnabled,h.userZoomingEnabled=t._private.userZoomingEnabled,h.zoom=t._private.zoom,h.minZoom=t._private.minZoom,h.maxZoom=t._private.maxZoom,h.panningEnabled=t._private.panningEnabled,h.userPanningEnabled=t._private.userPanningEnabled,h.pan=i.copy(t._private.pan),h.boxSelectionEnabled=t._private.boxSelectionEnabled,h.renderer=i.copy(t._private.options.renderer),h.hideEdgesOnViewport=t._private.options.hideEdgesOnViewport,h.textureOnViewport=t._private.options.textureOnViewport,h.wheelSensitivity=t._private.options.wheelSensitivity,h.motionBlur=t._private.options.motionBlur,h}},scratch:l.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0}),removeScratch:l.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0})}),u.$id=u.getElementById,[e("./add-remove"),e("./animation"),e("./events"),e("./export"),e("./layout"),e("./notification"),e("./renderer"),e("./search"),e("./style"),e("./viewport")].forEach((function(e){i.extend(u,e)})),t.exports=c},{"../collection":26,"../define":44,"../is":91,"../promise":94,"../util":108,"../window":116,"./add-remove":33,"./animation":34,"./events":35,"./export":36,"./layout":38,"./notification":39,"./renderer":40,"./search":41,"./style":42,"./viewport":43}],38:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,o=e.name,a=t.extension("layout",o);if(null!=a)return n=i.string(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new a(r.extend({},e,{cy:t,eles:n}));r.error("Can not apply layout: No such layout `"+o+"` found; did you include its JS file?")}else r.error("A `name` must be specified to make a layout");else r.error("Layout options must be specified to make a layout")}};o.createLayout=o.makeLayout=o.layout,t.exports=o},{"../is":91,"../util":108}],39:[function(e,t,n){"use strict";var r={notify:function(e){var t=this._private;if(t.batchingNotify){var n=t.batchNotifyEles,r=t.batchNotifyTypes;return e.eles&&n.merge(e.eles),void(r.ids[e.type]||(r.push(e.type),r.ids[e.type]=!0))}if(t.notificationsEnabled){var i=this.renderer();!this.isDestroyed()&&i&&i.notify(e)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:void(t.notificationsEnabled=!!e)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchingStyle=e.batchingNotify=!0,e.batchStyleEles=this.collection(),e.batchNotifyEles=this.collection(),e.batchNotifyTypes=[],e.batchNotifyTypes.ids={}),e.batchCount++,this},endBatch:function(){var e=this._private;return e.batchCount--,0===e.batchCount&&(e.batchingStyle=!1,e.batchStyleEles.updateStyle(),e.batchingNotify=!1,this.notify({type:e.batchNotifyTypes,eles:e.batchNotifyEles})),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),r=0;r<n.length;r++){var i=n[r],o=e[i];t.getElementById(i).data(o)}}))}};t.exports=r},{}],40:[function(e,t,n){"use strict";var r=e("../util"),i={renderTo:function(e,t,n,r){return this._private.renderer.renderTo(e,t,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify({type:"draw"}),this},resize:function(){return this.invalidateSize(),this.notify({type:"resize"}),this.trigger("resize"),this},initRenderer:function(e){var t=this,n=t.extension("renderer",e.name);if(null!=n){var i=r.extend({},e,{cy:t});t._private.renderer=new n(i)}else r.error("Can not initialise: No such renderer `%s` found; did you include its JS file?",e.name)},destroyRenderer:function(){var e=this;e.notify({type:"destroy"});var t=e.container();if(t)for(t._cyreg=null;t.childNodes.length>0;)t.removeChild(t.childNodes[0]);e._private.renderer=null},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};i.invalidateDimensions=i.resize,t.exports=i},{"../util":108}],41:[function(e,t,n){"use strict";var r=e("../is"),i=e("../collection"),o={collection:function(e,t){return r.string(e)?this.$(e):r.elementOrCollection(e)?e.collection():r.array(e)?new i(this,e,t):new i(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.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}};o.elements=o.filter=o.$,t.exports=o},{"../collection":26,"../is":91}],42:[function(e,t,n){"use strict";var r=e("../is"),i=e("../style"),o={style:function(e){return e&&this.setStyle(e).update(),this._private.style},setStyle:function(e){var t=this._private;return r.stylesheet(e)?t.style=e.generateStyle(this):r.array(e)?t.style=i.fromJson(this,e):r.string(e)?t.style=i.fromString(this,e):t.style=i(this),t.style}};t.exports=o},{"../is":91,"../style":101}],43:[function(e,t,n){"use strict";var r=e("../is"),i=e("../window"),o={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)},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 e,t,n,i,o,a=arguments,s=this._private.pan;switch(a.length){case 0:return s;case 1:if(r.string(a[0]))return s[e=a[0]];if(r.plainObject(a[0])){if(!this._private.panningEnabled)return this;i=(n=a[0]).x,o=n.y,r.number(i)&&(s.x=i),r.number(o)&&(s.y=o),this.trigger("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=a[0],t=a[1],"x"!==e&&"y"!==e||!r.number(t)||(s[e]=t),this.trigger("pan viewport")}return this.notify({type:"viewport"}),this},panBy:function(e){var t,n,i,o,a,s=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:r.plainObject(s[0])&&(o=(i=s[0]).x,a=i.y,r.number(o)&&(l.x+=o),r.number(a)&&(l.y+=a),this.trigger("pan viewport"));break;case 2:t=s[0],n=s[1],"x"!==t&&"y"!==t||!r.number(n)||(l[t]+=n),this.trigger("pan viewport")}return this.notify({type:"viewport"}),this},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.trigger("pan zoom viewport"),this.notify({type:"viewport"})}return this},getFitViewport:function(e,t){if(r.number(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var n;if(r.string(e)){var i=e;e=this.$(i)}else if(r.boundingBox(e)){var o=e;(n={x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1}else r.elementOrCollection(e)||(e=this.mutableElements());n=n||e.boundingBox();var a,s=this.width(),l=this.height();if(t=r.number(t)?t:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)<this._private.minZoom?this._private.minZoom:a,pan:{x:(s-a*(n.x1+n.x2))/2,y:(l-a*(n.y1+n.y2))/2}}}},minZoom:function(e){return void 0===e?this._private.minZoom:(r.number(e)&&(this._private.minZoom=e),this)},maxZoom:function(e){return void 0===e?this._private.maxZoom:(r.number(e)&&(this._private.maxZoom=e),this)},zoom:function(e){var t,n;if(void 0===e)return this._private.zoom;if(r.number(e))n=e;else if(r.plainObject(e)){if(n=e.level,e.position){var i=e.position,o=this._private.pan,a=this._private.zoom;t={x:i.x*a+o.x,y:i.y*a+o.y}}else e.renderedPosition&&(t=e.renderedPosition);if(t&&!this._private.panningEnabled)return this}if(!this._private.zoomingEnabled)return this;if(!r.number(n)||t&&(!r.number(t.x)||!r.number(t.y)))return this;if(n=(n=n>this._private.maxZoom?this._private.maxZoom:n)<this._private.minZoom?this._private.minZoom:n,t){var s=this._private.pan,l=this._private.zoom,c=n,u={x:-c/l*(t.x-s.x)+t.x,y:-c/l*(t.y-s.y)+t.y};this._private.zoom=n,this._private.pan=u;var d=s.x!==u.x||s.y!==u.y;this.trigger(" zoom "+(d?" pan ":"")+" viewport ")}else this._private.zoom=n,this.trigger("zoom viewport");return this.notify({type:"viewport"}),this},viewport:function(e){var t=this._private,n=!0,i=!0,o=[],a=!1,s=!1;if(!e)return this;if(r.number(e.zoom)||(n=!1),r.plainObject(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 c=e.pan;r.number(c.x)&&(t.pan.x=c.x,s=!1),r.number(c.y)&&(t.pan.y=c.y,s=!1),s||o.push("pan")}return o.length>0&&(o.push("viewport"),this.trigger(o.join(" ")),this.notify({type:"viewport"})),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.trigger("pan viewport"),this.notify({type:"viewport"})),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(r.string(e)){var n=e;e=this.mutableElements().filter(n)}else r.elementOrCollection(e)||(e=this.mutableElements());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 e=this._private,t=e.container;return e.sizeCache=e.sizeCache||(t?function(){var e=t.getBoundingClientRect(),n=i.getComputedStyle(t),r=function(e){return parseFloat(n.getPropertyValue(e))};return{width:e.width-r("padding-left")-r("padding-right")-r("border-left-width")-r("border-right-width"),height:e.height-r("padding-top")-r("padding-bottom")-r("border-top-width")-r("border-bottom-width")}}():{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(),r={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 r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}}};o.centre=o.center,o.autolockNodes=o.autolock,o.autoungrabifyNodes=o.autoungrabify,t.exports=o},{"../is":91,"../window":116}],44:[function(e,t,n){"use strict";var r=e("./util"),i=e("./is"),o=e("./selector"),a=e("./promise"),s=e("./event"),l=e("./animation"),c={data:function(e){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(e){},onSet:function(e){},canSet:function(e){return!0}};return e=r.extend({},t,e),function(t,n){var r=e,o=this,a=void 0!==o.length,s=a?o:[o],l=a?o[0]:o;if(i.string(t)){if(r.allowGetting&&void 0===n)return l&&(r.beforeGet(l),y=l._private[r.field][t]),y;if(r.allowSetting&&void 0!==n&&!r.immutableKeys[t]){for(var c=0,u=s.length;c<u;c++)r.canSet(s[c])&&(s[c]._private[r.field][t]=n);r.updateStyle&&o.updateStyle(),r.onSet(o),r.settingTriggersEvent&&o[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&i.plainObject(t)){var d,p,f=t,h=Object.keys(f);for(c=0;c<h.length;c++)if(p=f[d=h[c]],!r.immutableKeys[d])for(var g=0;g<s.length;g++){var v=s[g];r.canSet(v)&&(v._private[r.field][d]=p)}r.updateStyle&&o.updateStyle(),r.onSet(o),r.settingTriggersEvent&&o[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&i.fn(t)){var m=t;o.on(r.bindingEvent,m)}else if(r.allowGetting&&void 0===t){var y;return l&&(r.beforeGet(l),y=l._private[r.field]),y}return o}},removeData:function(e){var t={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=r.extend({},t,e),function(t){var n=e,r=this,o=void 0!==r.length?r:[r];if(i.string(t)){for(var a=(p=t.split(/\s+/)).length,s=0;s<a;s++){var l=p[s];if(!i.emptyString(l)&&!n.immutableKeys[l])for(var c=0,u=o.length;c<u;c++)o[c]._private[n.field][l]=void 0}n.triggerEvent&&r[n.triggerFnName](n.event)}else if(void 0===t){for(c=0,u=o.length;c<u;c++){var d=o[c]._private[n.field],p=Object.keys(d);for(s=0;s<p.length;s++)l=p[s],!n.immutableKeys[l]&&(d[l]=void 0)}n.triggerEvent&&r[n.triggerFnName](n.event)}return r}},event:{regex:/(\w+)(\.(?:\w+|\*))?/,universalNamespace:".*",optionalTypeRegex:/(\w+)?(\.(?:\w+|\*))?/,falseCallback:function(){return!1}},on:function(e){var t={unbindSelfOnTrigger:!1,unbindAllBindersOnTrigger:!1};return e=r.extend({},t,e),function(t,n,r){var a=this,s=void 0!==a.length?a:[a],l=i.string(t),u=e;if(i.fn(n)&&(r=n,n=void 0),!i.fn(r)&&!1!==r&&l)return a;if(l){var d={};d[t]=r,t=d}for(var p=Object.keys(t),f=0;f<p.length;f++){var h=p[f];if(!1===(r=t[h])&&(r=c.event.falseCallback),i.fn(r)){h=h.split(/\s+/);for(var g=0;g<h.length;g++){var v=h[g];if(!i.emptyString(v)){var m=v.match(c.event.regex);if(m)for(var y=m[1],b=m[2]?m[2]:void 0,C={callback:r,delegated:!!n,selector:n,selObj:new o(n),type:y,namespace:b,unbindSelfOnTrigger:u.unbindSelfOnTrigger,unbindAllBindersOnTrigger:u.unbindAllBindersOnTrigger,binders:s},x=0;x<s.length;x++){var E=s[x]._private=s[x]._private||{};E.listeners=E.listeners||[],E.listeners.push(C)}}}}}return a}},eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.removeListener=t.unlisten=t.unbind=t.off,t.emit=t.trigger,t.pon=t.promiseOn=function(e,t){var n=this,r=Array.prototype.slice.call(arguments,0);return new a((function(e,t){var i=function(t){n.off.apply(n,a),e(t)},o=r.concat([i]),a=o.concat([]);n.on.apply(n,o)}))}},off:function(e){var t={};return e=r.extend({},t,e),function(e,t,n){var r=this,o=void 0!==r.length?r:[r],a=i.string(e);if(0===arguments.length){for(var s=0;s<o.length;s++)o[s]._private=o[s]._private||{},y.listeners=[];return r}if((i.fn(t)||!1===t)&&(n=t,t=void 0),a){var l={};l[e]=n,e=l}for(var u=Object.keys(e),d=0;d<u.length;d++){var p=u[d];!1===(n=e[p])&&(n=c.event.falseCallback),p=p.split(/\s+/);for(var f=0;f<p.length;f++){var h=p[f];if(!i.emptyString(h)){var g=h.match(c.event.optionalTypeRegex);if(g){var v=g[1]?g[1]:void 0,m=g[2]?g[2]:void 0;for(s=0;s<o.length;s++)for(var y=o[s]._private=o[s]._private||{},b=y.listeners=y.listeners||[],C=0;C<b.length;C++){var x=b[C],E=!m||m===x.namespace,S=!v||x.type===v,w=!n||n===x.callback;E&&S&&w&&(b.splice(C,1),C--)}}}}}return r}},trigger:function(e){var t={};return e=r.extend({},t,e),function(t,n,r){var o=this,a=void 0!==o.length?o:[o],l=i.string(t),u=i.plainObject(t),d=i.event(t),p=(E=this._private=this._private||{}).cy||(i.core(this)?this:null),f=!!p&&p.hasCompoundNodes();if(l){var h=t.split(/\s+/);t=[];for(var g=0;g<h.length;g++){var v=h[g];if(!i.emptyString(v)){var m=v.match(c.event.regex),y=m[1],b=m[2]?m[2]:void 0;t.push({type:y,namespace:b})}}}else u&&(t=[t]);for(n?i.array(n)||(n=[n]):n=[],g=0;g<t.length;g++)for(var C=t[g],x=0;x<a.length;x++){var E,S=a[x],w=(E=S._private=S._private||{}).listeners=E.listeners||[],V=i.element(S)||e.layout;if(d?((v=C).target=v.target||S,v.cy=v.cy||p):v=new s(C,{target:S,cy:p,namespace:C.namespace}),C.layout&&(v.layout=C.layout),e.layout&&(v.layout=S),v.position){var R=v.position,O=p.zoom(),A=p.pan();v.renderedPosition={x:R.x*O+A.x,y:R.y*O+A.y}}r&&(w=[{namespace:v.namespace,type:v.type,callback:r}]);for(var k=0;k<w.length;k++){var T=w[k],D=!T.namespace||T.namespace===v.namespace||T.namespace===c.event.universalNamespace,N=T.type===v.type,P=!T.delegated||S!==v.target&&i.element(v.target)&&T.selObj.matches(v.target);if(D&&N&&P){var B=[v];if(B=B.concat(n),(T.unbindSelfOnTrigger||T.unbindAllBindersOnTrigger)&&(w.splice(k,1),k--),T.unbindAllBindersOnTrigger)for(var _=T.binders,M=0;M<_.length;M++){var I=_[M];if(I&&I!==S)for(var F=I._private.listeners,L=0;L<F.length;L++)F[L]===T&&(F.splice(L,1),L--)}var W=T.delegated?v.target:S,U=T.callback.apply(W,B);(!1===U||v.isPropagationStopped())&&(V=!1,!1===U&&(v.stopPropagation(),v.preventDefault()))}}if(V){var G=f?S._private.parent:null;null!=G&&0!==G.length?(G=G[0]).trigger(v):p.trigger(v)}}return o}},animated:function(e){var t={};return e=r.extend({},t,e),function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return!1;var n=t[0];return n?n._private.animation.current.length>0:void 0}},clearQueue:function(e){var t={};return e=r.extend({},t,e),function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n<t.length;n++)t[n]._private.animation.queue=[];return this}},delay:function(e){var t={};return e=r.extend({},t,e),function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this}},delayAnimation:function(e){var t={};return e=r.extend({},t,e),function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this}},animation:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,i=void 0!==n.length,o=i?n:[n],a=this._private.cy||this,s=!i,c=!s;if(!a.styleEnabled())return this;var u=a.style();if(e=r.extend({},e,t),0===Object.keys(e).length)return new l(o[0],e);switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}if(c&&(e.style=u.getPropsList(e.style||e.css),e.css=void 0),e.renderedPosition&&c){var d=e.renderedPosition,p=a.pan(),f=a.zoom();e.position={x:(d.x-p.x)/f,y:(d.y-p.y)/f}}if(e.panBy&&s){var h=e.panBy,g=a.pan();e.pan={x:g.x+h.x,y:g.y+h.y}}var v=e.center||e.centre;if(v&&s){var m=a.getCenterPan(v.eles,e.zoom);m&&(e.pan=m)}if(e.fit&&s){var y=e.fit,b=a.getFitViewport(y.eles||y.boundingBox,y.padding);b&&(e.pan=b.pan,e.zoom=b.zoom)}return new l(o[0],e)}},animate:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,i=void 0!==n.length?n:[n];if(!(this._private.cy||this).styleEnabled())return this;t&&(e=r.extend({},e,t));for(var o=0;o<i.length;o++){var a=i[o],s=a.animated()&&(void 0===e.queue||e.queue);a.animation(e,s?{queue:!0}:void 0).play()}return this}},stop:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,r=void 0!==n.length?n:[n],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o<r.length;o++){for(var a=r[o]._private,s=a.animation.current,l=0;l<s.length;l++){var c=s[l]._private;t&&(c.duration=0)}e&&(a.animation.queue=[]),t||(a.animation.current=[])}return i.notify({eles:this,type:"draw"}),this}}};t.exports=c},{"./animation":2,"./event":45,"./is":91,"./promise":94,"./selector":95,"./util":108}],45:[function(e,t,n){"use strict";function r(){return!1}function i(){return!0}var o=function(e,t){return this instanceof o?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?i:r):this.type=e,t&&(this.type=void 0!==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,this.message=t.message),void(this.timeStamp=e&&e.timeStamp||Date.now())):new o(e,t)};o.prototype={instanceString:function(){return"event"},preventDefault:function(){this.isDefaultPrevented=i;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=i;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()},isDefaultPrevented:r,isPropagationStopped:r,isImmediatePropagationStopped:r},t.exports=o},{}],46:[function(e,t,n){"use strict";function r(e,t,n){var r=n,o=function(n){s.error("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(u.prototype[t])return o(t);u.prototype[t]=n}else if("collection"===e){if(c.prototype[t])return o(t);c.prototype[t]=n}else if("layout"===e){for(var a=function(e){this.options=e,n.call(this,e),p.plainObject(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[]},d=a.prototype=Object.create(n.prototype),h=[],g=0;g<h.length;g++){var v=h[g];d[v]=d[v]||function(){return this}}d.start&&!d.run?d.run=function(){return this.start(),this}:!d.start&&d.run&&(d.start=function(){return this.run(),this});var m=n.prototype.stop;d.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return m?m.call(this):this.trigger("layoutstop"),this},d.destroy||(d.destroy=function(){return this}),d.on=l.on({layout:!0}),d.one=l.on({layout:!0,unbindSelfOnTrigger:!0}),d.once=l.on({layout:!0,unbindAllBindersOnTrigger:!0}),d.off=l.off({layout:!0}),d.trigger=l.trigger({layout:!0}),l.eventAliasesOn(d),r=a}else if("renderer"===e&&"null"!==t&&"base"!==t){var y=i("renderer","base"),b=y.prototype,C=n,x=n.prototype,E=function(){y.apply(this,arguments),C.apply(this,arguments)},S=E.prototype;for(var w in b){var V=b[w];if(null!=x[w])return o(w);S[w]=V}for(var w in x)S[w]=x[w];b.clientFunctions.forEach((function(e){S[e]=S[e]||function(){s.error("Renderer does not implement `renderer."+e+"()` on its prototype")}})),r=E}return s.setMap({map:f,keys:[e,t],value:r})}function i(e,t){return s.getMap({map:f,keys:[e,t]})}function o(e,t,n,r,i){return s.setMap({map:h,keys:[e,t,n,r],value:i})}function a(e,t,n,r){return s.getMap({map:h,keys:[e,t,n,r]})}var s=e("./util"),l=e("./define"),c=e("./collection"),u=e("./core"),d=e("./extensions"),p=e("./is"),f={},h={},g=function(){return 2===arguments.length?i.apply(null,arguments):3===arguments.length?r.apply(null,arguments):4===arguments.length?a.apply(null,arguments):5===arguments.length?o.apply(null,arguments):void s.error("Invalid extension access syntax")};u.prototype.extension=g,d.forEach((function(e){e.extensions.forEach((function(t){r(e.type,t.name,t.impl)}))})),t.exports=g},{"./collection":26,"./core":37,"./define":44,"./extensions":47,"./is":91,"./util":108}],47:[function(e,t,n){"use strict";t.exports=[{type:"layout",extensions:e("./layout")},{type:"renderer",extensions:e("./renderer")}]},{"./layout":53,"./renderer":87}],48:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},s,e)}var i=e("../../util"),o=e("../../math"),a=e("../../is"),s={fit:!0,directed:!1,padding:30,circle:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,maximalAdjustments:0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e,t=this.options,n=t,r=t.cy,i=n.eles,s=i.nodes().not(":parent"),l=i,c=o.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.elementOrCollection(n.roots))e=n.roots;else if(a.array(n.roots)){for(var u=[],d=0;d<n.roots.length;d++){var p=n.roots[d],f=r.getElementById(p);u.push(f)}e=r.collection(u)}else if(a.string(n.roots))e=r.$(n.roots);else if(n.directed)e=s.roots();else{for(var h=[],g=s;g.length>0;){var v=r.collection();i.bfs({roots:g[0],visit:function(e,t,n,r,i){v=v.add(e)},directed:!1}),g=g.not(v),h.push(v)}for(e=r.collection(),d=0;d<h.length;d++){var m=h[d],y=m.maxDegree(!1),b=m.filter((function(e){return e.degree(!1)===y}));e=e.add(b)}}var C=[],x={},E={},S={},w={},V={};l.bfs({roots:e,directed:n.directed,visit:function(e,t,n,r,i){var o=e[0],a=o.id();if(C[i]||(C[i]=[]),C[i].push(o),x[a]=!0,E[a]=i,S[a]=n,w[a]=t,n){var s=n.id();(V[s]=V[s]||[]).push(e)}}});var R=[];for(d=0;d<s.length;d++)f=s[d],x[f.id()]||R.push(f);for(var O=3*R.length,A=0;0!==R.length&&A<O;){var k=(D=R.shift()).neighborhood().nodes(),T=!1;for(d=0;d<k.length;d++)if(void 0!==(te=E[k[d].id()])){C[te].push(D),T=!0;break}T||R.push(D),A++}for(;0!==R.length;){var D=R.shift();(T=!1)||(0===C.length&&C.push([]),C[0].push(D))}var N=function(){for(var e=0;e<C.length;e++)for(var t=C[e],n=0;n<t.length;n++)t[n]._private.scratch.breadthfirst={depth:e,index:n}};N();for(var P=function(e){for(var t,n=e.connectedEdges((function(t){return t.data("target")===e.id()})),r=e._private.scratch.breadthfirst,i=0,o=0;o<n.length;o++){var a=n[o].source()[0],s=a._private.scratch.breadthfirst;r.depth<=s.depth&&i<s.depth&&(i=s.depth,t=a)}return t},B=0;B<n.maximalAdjustments;B++){var _=C.length,M=[];for(d=0;d<_;d++)for(var I=(te=C[d]).length,F=0;F<I;F++){var L=(f=te[F])._private.scratch.breadthfirst;(W=P(f))&&(L.intEle=W,M.push(f))}for(d=0;d<M.length;d++){var W,U=(W=(L=(f=M[d])._private.scratch.breadthfirst).intEle)._private.scratch.breadthfirst;C[L.depth].splice(L.index,1);for(var G=U.depth+1;G>C.length-1;)C.push([]);C[G].push(f),L.depth=G,L.index=C[G].length-1}N()}var z=0;if(n.avoidOverlap)for(d=0;d<s.length;d++){var Q=s[d].layoutDimensions(n),j=Q.w,Y=Q.h;z=Math.max(z,j,Y)}for(var H={},J=function(e){if(H[e.id()])return H[e.id()];for(var t=e._private.scratch.breadthfirst.depth,n=e.neighborhood().nodes().not(":parent").intersection(s),r=0,i=0,o=0;o<n.length;o++){var a=n[o]._private.scratch.breadthfirst,l=a.index,c=a.depth,u=C[c].length;(t>c||0===t)&&(r+=l/u,i++)}return r/=i=Math.max(1,i),0===i&&(r=void 0),H[e.id()]=r,r},Z=function(e,t){return J(e)-J(t)},X=0;X<3;X++){for(d=0;d<C.length;d++)C[d]=C[d].sort(Z);N()}var q=0;for(d=0;d<C.length;d++)q=Math.max(C[d].length,q);var K={x:c.x1+c.w/2,y:c.x1+c.h/2},$=function(e,t){var r=e._private.scratch.breadthfirst,i=r.depth,o=r.index,a=C[i].length,s=Math.max(c.w/(a+1),z),l=Math.max(c.h/(C.length+1),z),u=Math.min(c.w/2/C.length,c.h/2/C.length);if(u=Math.max(u,z),n.circle){if(n.circle){var d=u*i+u-(C.length>0&&C[0].length<=3?u/2:0),p=2*Math.PI/C[i].length*o;return 0===i&&1===C[0].length&&(d=1),{x:K.x+d*Math.cos(p),y:K.y+d*Math.sin(p)}}return{x:K.x+(o+1-(a+1)/2)*s,y:(i+1)*l}}var f={x:K.x+(o+1-(a+1)/2)*s,y:(i+1)*l};return f},ee={};for(d=C.length-1;d>=0;d--){var te=C[d];for(F=0;F<te.length;F++)D=te[F],ee[D.id()]=$(D,d===C.length-1)}return s.layoutPositions(this,n,(function(e){return ee[e.id()]})),this},t.exports=r},{"../../is":91,"../../math":93,"../../util":108}],49:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},s,e)}var i=e("../../util"),o=e("../../math"),a=e("../../is"),s={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,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,s=r.nodes().not(":parent");t.sort&&(s=s.sort(t.sort));for(var l,c=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),u={x:c.x1+c.w/2,y:c.y1+c.h/2},d=(void 0===t.sweep?2*Math.PI-2*Math.PI/s.length:t.sweep)/Math.max(1,s.length-1),p=0,f=0;f<s.length;f++){var h=s[f].layoutDimensions(t),g=h.w,v=h.h;p=Math.max(p,g,v)}if(l=a.number(t.radius)?t.radius:s.length<=1?0:Math.min(c.h,c.w)/2-p,s.length>1&&t.avoidOverlap){p*=1.75;var m=Math.cos(d)-Math.cos(0),y=Math.sin(d)-Math.sin(0),b=Math.sqrt(p*p/(m*m+y*y));l=Math.max(b,l)}var C=function(e,n){var r=t.startAngle+n*d*(i?1:-1),o=l*Math.cos(r),a=l*Math.sin(r);return{x:u.x+o,y:u.y+a}};return s.layoutPositions(this,t,C),this},t.exports=r},{"../../is":91,"../../math":93,"../../util":108}],50:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={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,ready:void 0,stop:void 0};r.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles.nodes().not(":parent"),a=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:a.x1+a.w/2,y:a.y1+a.h/2},l=[],c=t.startAngle,u=0,d=0;d<i.length;d++){var p,f=i[d];p=t.concentric(f),l.push({value:p,node:f}),f._private.scratch.concentric=p}for(i.updateStyle(),d=0;d<i.length;d++){var h=(f=i[d]).layoutDimensions(t);u=Math.max(u,h.w,h.h)}l.sort((function(e,t){return t.value-e.value}));var g=t.levelWidth(i),v=[[]],m=v[0];for(d=0;d<l.length;d++){var y=l[d];m.length>0&&Math.abs(m[0].value-y.value)>=g&&(m=[],v.push(m)),m.push(y)}var b=u+t.minNodeSpacing;if(!t.avoidOverlap){var C=v.length>0&&v[0].length>1,x=(Math.min(a.w,a.h)/2-b)/(v.length+C?1:0);b=Math.min(b,x)}var E=0;for(d=0;d<v.length;d++){var S=v[d],w=void 0===t.sweep?2*Math.PI-2*Math.PI/S.length:t.sweep,V=S.dTheta=w/Math.max(1,S.length-1);if(S.length>1&&t.avoidOverlap){var R=Math.cos(V)-Math.cos(0),O=Math.sin(V)-Math.sin(0),A=Math.sqrt(b*b/(R*R+O*O));E=Math.max(A,E)}S.r=E,E+=b}if(t.equidistant){var k=0;for(E=0,d=0;d<v.length;d++){var T=(S=v[d]).r-E;k=Math.max(k,T)}for(E=0,d=0;d<v.length;d++)S=v[d],0===d&&(E=S.r),S.r=E,E+=k}var D={};for(d=0;d<v.length;d++){V=(S=v[d]).dTheta,E=S.r;for(var N=0;N<S.length;N++){y=S[N],c=t.startAngle+(n?1:-1)*V*N;var P={x:s.x+E*Math.cos(c),y:s.y+E*Math.sin(c)};D[y.node.id()]=P}}return i.layoutPositions(this,t,(function(e){var t=e.id();return D[t]})),this},t.exports=r},{"../../math":93,"../../util":108}],51:[function(e,t,n){"use strict";function r(e){this.options=o.extend({},c,e),this.options.layout=this}var i,o=e("../../util"),a=e("../../math"),s=e("../../is"),l=e("../../promise"),c={ready:function(){},stop:function(){},animate:!0,animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:100,nodeRepulsion:function(e){return 4e5},nodeOverlap:10,idealEdgeLength:function(e){return 10},edgeElasticity:function(e){return 100},nestingFactor:5,gravity:80,numIter:1e3,initialTemp:200,coolingFactor:.95,minTemp:1,weaver:!1};r.prototype.run=function(){function e(e){var t={type:"message",message:e};d.trigger(t)}var t=this.options,n=t.cy,r=this,a=this.thread,c=t.weaver?t.weaver.Thread:null,d={listeners:[],on:function(e,t){return this.listeners.push({event:e,callback:t}),this},trigger:function(e){s.string(e)&&(e={type:e});var t=function(t){return t.event===e.type},n=function(t){t.callback(e)};return this.listeners.filter(t).forEach(n),this},pass:function(e){return this.pass=e,this},run:function(e){var t=this.pass;return new l((function(n){n(e(t))}))},stop:function(){return this}};a&&!a.stopped()||(a=this.thread=c?new c:d),r.stopped=!1,r.trigger({type:"layoutstart",layout:r}),i=!0===t.debug;var p=u(n,r,t);i&&f(p),t.randomize&&h(p,n);var v=Date.now(),m=!1,y=function(e){e=e||{},m&&!e.next||!e.force&&Date.now()-v<t.animationThreshold||(m=!0,o.requestAnimationFrame((function(){g(p,n,t),!0===t.fit&&n.fit(t.padding),m=!1,e.next&&e.next()})))};a.on("message",(function(e){var t=e.message;p.layoutNodes=t,y()})),a.pass({layoutInfo:p,options:{animate:t.animate,refresh:t.refresh,componentSpacing:t.componentSpacing,nodeOverlap:t.nodeOverlap,nestingFactor:t.nestingFactor,gravity:t.gravity,numIter:t.numIter,initialTemp:t.initialTemp,coolingFactor:t.coolingFactor,minTemp:t.minTemp}}).run((function(t){var n=t.layoutInfo,r=t.options,i=!1,o=function(e,t,n){a(e,t),d(e,t),p(e,t),f(e,t),h(e,t)},a=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var r=e.graphSet[n],i=r.length,o=0;o<i;o++)for(var a=e.layoutNodes[e.idToIndex[r[o]]],s=o+1;s<i;s++){var c=e.layoutNodes[e.idToIndex[r[s]]];l(a,c,e,t)}},s=function(e){return-e+2*e*Math.random()},l=function(e,t,n,r){if(e.cmptId===t.cmptId||n.isCompound){var i=t.positionX-e.positionX,o=t.positionY-e.positionY,a=1;0===i&&0===o&&(i=s(a),o=s(a));var l=c(e,t,i,o);if(l>0)var d=(f=r.nodeOverlap*l)*i/(b=Math.sqrt(i*i+o*o)),p=f*o/b;else{var f,h=u(e,i,o),g=u(t,-1*i,-1*o),v=g.x-h.x,m=g.y-h.y,y=v*v+m*m,b=Math.sqrt(y);d=(f=(e.nodeRepulsion+t.nodeRepulsion)/y)*v/b,p=f*m/b}e.isLocked||(e.offsetX-=d,e.offsetY-=p),t.isLocked||(t.offsetX+=d,t.offsetY+=p)}},c=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var o=e.maxY-t.minY;else o=t.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},u=function(e,t,n){var r=e.positionX,i=e.positionY,o=e.height||1,a=e.width||1,s=n/t,l=o/a,c={};return 0===t&&0<n||0===t&&0>n?(c.x=r,c.y=i+o/2,c):0<t&&-1*l<=s&&s<=l?(c.x=r+a/2,c.y=i+a*n/2/t,c):0>t&&-1*l<=s&&s<=l?(c.x=r-a/2,c.y=i-a*n/2/t,c):0<n&&(s<=-1*l||s>=l)?(c.x=r+o*t/2/n,c.y=i+o/2,c):0>n&&(s<=-1*l||s>=l)?(c.x=r-o*t/2/n,c.y=i-o/2,c):c},d=function(e,t){for(var n=0;n<e.edgeSize;n++){var r=e.layoutEdges[n],i=e.idToIndex[r.sourceId],o=e.layoutNodes[i],a=e.idToIndex[r.targetId],s=e.layoutNodes[a],l=s.positionX-o.positionX,c=s.positionY-o.positionY;if(0===l&&0===c)return;var d=u(o,l,c),p=u(s,-1*l,-1*c),f=p.x-d.x,h=p.y-d.y,g=Math.sqrt(f*f+h*h),v=Math.pow(r.idealLength-g,2)/r.elasticity;if(0!==g)var m=v*f/g,y=v*h/g;else m=0,y=0;o.isLocked||(o.offsetX+=m,o.offsetY+=y),s.isLocked||(s.offsetX-=m,s.offsetY-=y)}},p=function(e,t){for(var n=1,r=0;r<e.graphSet.length;r++){var i=e.graphSet[r],o=i.length;if(0===r)var a=e.clientHeight/2,s=e.clientWidth/2;else{var l=e.layoutNodes[e.idToIndex[i[0]]],c=e.layoutNodes[e.idToIndex[l.parentId]];a=c.positionX,s=c.positionY}for(var u=0;u<o;u++){var d=e.layoutNodes[e.idToIndex[i[u]]];if(!d.isLocked){var p=a-d.positionX,f=s-d.positionY,h=Math.sqrt(p*p+f*f);if(h>n){var g=t.gravity*p/h,v=t.gravity*f/h;d.offsetX+=g,d.offsetY+=v}}}}},f=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var o=n[r++],a=e.idToIndex[o],s=e.layoutNodes[a],l=s.children;if(0<l.length&&!s.isLocked){for(var c=s.offsetX,u=s.offsetY,d=0;d<l.length;d++){var p=e.layoutNodes[e.idToIndex[l[d]]];p.offsetX+=c,p.offsetY+=u,n[++i]=l[d]}s.offsetX=0,s.offsetY=0}}},h=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 r=g(i.offsetX,i.offsetY,e.temperature);i.positionX+=r.x,i.positionY+=r.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,v(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)}},g=function(e,t,n){var r=Math.sqrt(e*e+t*t);if(r>n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},v=function(e,t){var n=e.parentId;if(null!=n){var r=t.layoutNodes[t.idToIndex[n]],i=!1;return(null==r.maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(null==r.minX||e.minX-r.padLeft<r.minX)&&(r.minX=e.minX-r.padLeft,i=!0),(null==r.maxY||e.maxY+r.padBottom>r.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(null==r.minY||e.minY-r.padTop<r.minY)&&(r.minY=e.minY-r.padTop,i=!0),i?v(r,t):void 0}},m=function(e,t){for(var r=n.layoutNodes,i=[],o=0;o<r.length;o++){var a=r[o],s=a.cmptId;(i[s]=i[s]||[]).push(a)}var l=0;for(o=0;o<i.length;o++)if(v=i[o]){v.x1=1/0,v.x2=-1/0,v.y1=1/0,v.y2=-1/0;for(var c=0;c<v.length;c++){var u=v[c];v.x1=Math.min(v.x1,u.positionX-u.width/2),v.x2=Math.max(v.x2,u.positionX+u.width/2),v.y1=Math.min(v.y1,u.positionY-u.height/2),v.y2=Math.max(v.y2,u.positionY+u.height/2)}v.w=v.x2-v.x1,v.h=v.y2-v.y1,l+=v.w*v.h}i.sort((function(e,t){return t.w*t.h-e.w*e.h}));var d=0,p=0,f=0,h=0,g=Math.sqrt(l)*n.clientWidth/n.clientHeight;for(o=0;o<i.length;o++){var v;if(v=i[o]){for(c=0;c<v.length;c++)(u=v[c]).isLocked||(u.positionX+=d,u.positionY+=p);d+=v.w+t.componentSpacing,f+=v.w+t.componentSpacing,h=Math.max(h,v.h),f>g&&(p+=h+t.componentSpacing,d=0,f=0,h=0)}}},y=function(e){return!(i||(o(n,r,e),n.temperature=n.temperature*r.coolingFactor,n.temperature<r.minTemp))},b=0;do{for(var C=0;C<r.refresh&&b<r.numIter;){var x;if(!(x=y(b)))break;C++,b++}r.animate&&e(n.layoutNodes)}while(x&&b+1<r.numIter);return m(n,r),n})).then((function(e){p.layoutNodes=e.layoutNodes,a.stop(),b()}));var b=function(){y({force:!0,next:function(){r.one("layoutstop",t.stop),r.trigger({type:"layoutstop",layout:r})}})};return this},r.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.trigger("layoutstop"),this},r.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var u=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:a.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},l=n.eles.components(),c={},u=0;u<l.length;u++)for(var p=l[u],f=0;f<p.length;f++)c[p[f].id()]=u;for(u=0;u<o.nodeSize;u++){var h=(b=i[u]).layoutDimensions(n);(_={}).isLocked=b.locked(),_.id=b.data("id"),_.parentId=b.data("parent"),_.cmptId=c[b.id()],_.children=[],_.positionX=b.position("x"),_.positionY=b.position("y"),_.offsetX=0,_.offsetY=0,_.height=h.w,_.width=h.h,_.maxX=_.positionX+_.width/2,_.minX=_.positionX-_.width/2,_.maxY=_.positionY+_.height/2,_.minY=_.positionY-_.height/2,_.padLeft=parseFloat(b.style("padding")),_.padRight=parseFloat(b.style("padding")),_.padTop=parseFloat(b.style("padding")),_.padBottom=parseFloat(b.style("padding")),_.nodeRepulsion=s.fn(n.nodeRepulsion)?n.nodeRepulsion(b):n.nodeRepulsion,o.layoutNodes.push(_),o.idToIndex[_.id]=u}var g=[],v=0,m=-1,y=[];for(u=0;u<o.nodeSize;u++){var b,C=(b=o.layoutNodes[u]).parentId;null!=C?o.layoutNodes[o.idToIndex[C]].children.push(b.id):(g[++m]=b.id,y.push(b.id))}for(o.graphSet.push(y);v<=m;){var x=g[v++],E=o.idToIndex[x],S=o.layoutNodes[E].children;if(S.length>0)for(o.graphSet.push(S),u=0;u<S.length;u++)g[++m]=S[u]}for(u=0;u<o.graphSet.length;u++){var w=o.graphSet[u];for(f=0;f<w.length;f++){var V=o.idToIndex[w[f]];o.indexToGraph[V]=u}}for(u=0;u<o.edgeSize;u++){var R=r[u],O={};O.id=R.data("id"),O.sourceId=R.data("source"),O.targetId=R.data("target");var A=s.fn(n.idealEdgeLength)?n.idealEdgeLength(R):n.idealEdgeLength,k=s.fn(n.edgeElasticity)?n.edgeElasticity(R):n.edgeElasticity,T=o.idToIndex[O.sourceId],D=o.idToIndex[O.targetId];if(o.indexToGraph[T]!=o.indexToGraph[D]){for(var N=d(O.sourceId,O.targetId,o),P=o.graphSet[N],B=0,_=o.layoutNodes[T];-1===P.indexOf(_.id);)_=o.layoutNodes[o.idToIndex[_.parentId]],B++;for(_=o.layoutNodes[D];-1===P.indexOf(_.id);)_=o.layoutNodes[o.idToIndex[_.parentId]],B++;A*=B*n.nestingFactor}O.idealLength=A,O.elasticity=k,o.layoutEdges.push(O)}return o},d=function(e,t,n){var r=p(e,t,0,n);return 2>r.count?0:r.graph},p=function(e,t,n,r){var i=r.graphSet[n];if(-1<i.indexOf(e)&&-1<i.indexOf(t))return{count:2,graph:n};for(var o=0,a=0;a<i.length;a++){var s=i[a],l=r.idToIndex[s],c=r.layoutNodes[l].children;if(0!==c.length){var u=r.indexToGraph[r.idToIndex[c[0]]],d=p(e,t,u,r);if(0!==d.count){if(1!==d.count)return d;if(2==++o)break}}}return{count:o,graph:n}},f=function(e){if(i){console.debug("layoutNodes:");for(var t=0;t<e.nodeSize;t++){var n=e.layoutNodes[t],r="\nindex: "+t+"\nId: "+n.id+"\nChildren: "+n.children.toString()+"\nparentId: "+n.parentId+"\npositionX: "+n.positionX+"\npositionY: "+n.positionY+"\nOffsetX: "+n.offsetX+"\nOffsetY: "+n.offsetY+"\npadLeft: "+n.padLeft+"\npadRight: "+n.padRight+"\npadTop: "+n.padTop+"\npadBottom: "+n.padBottom;console.debug(r)}for(var t in console.debug("idToIndex"),e.idToIndex)console.debug("Id: "+t+"\nIndex: "+e.idToIndex[t]);console.debug("Graph Set");var o=e.graphSet;for(t=0;t<o.length;t++)console.debug("Set : "+t+": "+o[t].toString());for(r="IndexToGraph",t=0;t<e.indexToGraph.length;t++)r+="\nIndex : "+t+" Graph: "+e.indexToGraph[t];for(console.debug(r),r="Layout Edges",t=0;t<e.layoutEdges.length;t++){var a=e.layoutEdges[t];r+="\nEdge Index: "+t+" ID: "+a.id+" SouceID: "+a.sourceId+" TargetId: "+a.targetId+" Ideal Length: "+a.idealLength}console.debug(r),r="nodeSize: "+e.nodeSize,r+="\nedgeSize: "+e.edgeSize,r+="\ntemperature: "+e.temperature,console.debug(r)}},h=function(e,t){for(var n=e.clientWidth,r=e.clientHeight,i=0;i<e.nodeSize;i++){var o=e.layoutNodes[i];0!==o.children.length||o.isLocked||(o.positionX=Math.random()*n,o.positionY=Math.random()*r)}},g=function(e,t,n){var r=n.layout,i=n.eles.nodes(),o=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};n.boundingBox&&(i.forEach((function(t){var n=e.layoutNodes[e.idToIndex[t.data("id")]];a.x1=Math.min(a.x1,n.positionX),a.x2=Math.max(a.x2,n.positionX),a.y1=Math.min(a.y1,n.positionY),a.y2=Math.max(a.y2,n.positionY)})),a.w=a.x2-a.x1,a.h=a.y2-a.y1),i.positions((function(t,r){var i=e.layoutNodes[e.idToIndex[t.data("id")]];if(n.boundingBox){var s=(i.positionX-a.x1)/a.w,l=(i.positionY-a.y1)/a.h;return{x:o.x1+s*o.w,y:o.y1+l*o.h}}return{x:i.positionX,y:i.positionY}})),!0!==e.ready&&(e.ready=!0,r.one("layoutready",n.ready),r.trigger({type:"layoutready",layout:this}))};t.exports=r},{"../../is":91,"../../math":93,"../../promise":94,"../../util":108}],52:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={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,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles.nodes().not(":parent");t.sort&&(r=r.sort(t.sort));var i=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.layoutPositions(this,t,(function(e){return{x:i.x1,y:i.y1}}));else{var a=r.size(),s=Math.sqrt(a*i.h/i.w),l=Math.round(s),c=Math.round(i.w/i.h*s),u=function(e){if(null==e)return Math.min(l,c);Math.min(l,c)==l?l=e:c=e},d=function(e){if(null==e)return Math.max(l,c);Math.max(l,c)==l?l=e:c=e},p=t.rows,f=null!=t.cols?t.cols:t.columns;if(null!=p&&null!=f)l=p,c=f;else if(null!=p&&null==f)l=p,c=Math.ceil(a/l);else if(null==p&&null!=f)c=f,l=Math.ceil(a/c);else if(c*l>a)((g=u())-1)*(h=d())>=a?u(g-1):(h-1)*g>=a&&d(h-1);else for(;c*l<a;){var h,g=u();((h=d())+1)*g>=a?d(h+1):u(g+1)}var v=i.w/c,m=i.h/l;if(t.condense&&(v=0,m=0),t.avoidOverlap)for(var y=0;y<r.length;y++){null!=(N=(T=r[y])._private.position).x&&null!=N.y||(N.x=0,N.y=0);var b=T.layoutDimensions(t),C=t.avoidOverlapPadding,x=b.w+C,E=b.h+C;v=Math.max(v,x),m=Math.max(m,E)}var S={},w=function(e,t){return!!S["c-"+e+"-"+t]},V=function(e,t){S["c-"+e+"-"+t]=!0},R=0,O=0,A=function(){++O>=c&&(O=0,R++)},k={};for(y=0;y<r.length;y++){var T=r[y],D=t.position(T);if(D&&(void 0!==D.row||void 0!==D.col)){var N;if(void 0===(N={row:D.row,col:D.col}).col)for(N.col=0;w(N.row,N.col);)N.col++;else if(void 0===N.row)for(N.row=0;w(N.row,N.col);)N.row++;k[T.id()]=N,V(N.row,N.col)}}var P=function(e,t){var n,r;if(e.locked()||e.isParent())return!1;var o=k[e.id()];if(o)n=o.col*v+v/2+i.x1,r=o.row*m+m/2+i.y1;else{for(;w(R,O);)A();n=O*v+v/2+i.x1,r=R*m+m/2+i.y1,V(R,O),A()}return{x:n,y:r}};r.layoutPositions(this,t,P)}return this},t.exports=r},{"../../math":93,"../../util":108}],53:[function(e,t,n){"use strict";t.exports=[{name:"breadthfirst",impl:e("./breadthfirst")},{name:"circle",impl:e("./circle")},{name:"concentric",impl:e("./concentric")},{name:"cose",impl:e("./cose")},{name:"grid",impl:e("./grid")},{name:"null",impl:e("./null")},{name:"preset",impl:e("./preset")},{name:"random",impl:e("./random")}]},{"./breadthfirst":48,"./circle":49,"./concentric":50,"./cose":51,"./grid":52,"./null":54,"./preset":55,"./random":56}],54:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},o,e)}var i=e("../../util"),o={ready:function(){},stop:function(){}};r.prototype.run=function(){var e=this.options,t=e.eles,n=this;return e.cy,n.trigger("layoutstart"),t.nodes().positions((function(){return{x:0,y:0}})),n.one("layoutready",e.ready),n.trigger("layoutready"),n.one("layoutstop",e.stop),n.trigger("layoutstop"),this},r.prototype.stop=function(){return this},t.exports=r},{"../../util":108}],55:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../is"),a={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){function e(e){if(null==t.positions)return null;if(r)return t.positions(e);var n=t.positions[e._private.data.id];return null==n?null:n}var t=this.options,n=t.eles.nodes(),r=o.fn(t.positions);return n.layoutPositions(this,t,(function(t,n){var r=e(t);return!t.locked()&&null!=r&&r})),this},t.exports=r},{"../../is":91,"../../util":108}],56:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles.nodes().not(":parent"),r=o.makeBoundingBox(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),i=function(e,t){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}};return n.layoutPositions(this,e,i),this},t.exports=r},{"../../math":93,"../../util":108}],57:[function(e,t,n){"use strict";var r=e("../../../math"),i=e("../../../is"),o=e("../../../util"),a={arrowShapeWidth:.3,registerArrowShapes:function(){var e=this.arrowShapes={},t=this,n=function(e,t,n,r,i,o){var a=i.x-n/2-o,s=i.x+n/2+o,l=i.y-n/2-o,c=i.y+n/2+o;return a<=e&&e<=s&&l<=t&&t<=c},a=function(e,t,n,r,i){var o=e*Math.cos(r)-t*Math.sin(r),a=(e*Math.sin(r)+t*Math.cos(r))*n;return{x:o*n+i.x,y:a+i.y}},s=function(e,t,n,r){for(var i=[],o=0;o<e.length;o+=2){var s=e[o],l=e[o+1];i.push(a(s,l,t,n,r))}return i},l=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r.x,r.y)}return t},c=function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},u=function(a,u){i.string(u)&&(u=e[u]),e[a]=o.extend({name:a,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(e,t,n,i,o,a){var c=l(s(this.points,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,c)},roughCollide:n,draw:function(e,n,r,i){var o=s(this.points,n,r,i);t.arrowShapeImpl("polygon")(e,o)},spacing:function(e){return 0},gap:c},u)};u("none",{collide:o.falsify,roughCollide:o.falsify,draw:o.noop,spacing:o.zeroify,gap:o.zeroify}),u("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),u("arrow","triangle"),u("triangle-backcurve",{points:e.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(e,n,r,i){var o=s(this.points,n,r,i),l=this.controlPoint,c=a(l[0],l[1],n,r,i);t.arrowShapeImpl(this.name)(e,o,c)},gap:function(e){return.985*c(e)}}),u("triangle-tee",{points:[-.15,-.3,0,0,.15,-.3,-.15,-.3],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(e,t,n,i,o,a){var c=l(s(this.points,n+2*a,i,o)),u=l(s(this.pointsTee,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,c)||r.pointInsidePolygonPoints(e,t,u)},draw:function(e,n,r,i){var o=s(this.points,n,r,i),a=s(this.pointsTee,n,r,i);t.arrowShapeImpl(this.name)(e,o,a)}}),u("triangle-cross",{points:[-.15,-.3,0,0,.15,-.3,-.15,-.3],crossLinePoints:[-.24175,-.4,.24175,-.4],forceStroke:!0,matchEdgeWidth:!0,scaleCoord:function(e,t,n){return e+.012*n+.001*r.log2(t-28.95)},scaleCrossLineXCoord:function(e,t){return this.scaleCoord(.42,e,t)},scaleCrossLineYCoord:function(e,t){return this.scaleCoord(-.01,e,t)},collide:function(e,t,n,i,o,a){var c=l(s(this.points,n+2*a,i,o)),u=l(s(this.crossLinePoints,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,c)||r.inLineVicinity(e,t,u[0],u[1],u[2],u[3],a)},draw:function(e,n,r,i,o){var a=[this.crossLinePoints[0]+this.scaleCrossLineXCoord(n,o),this.crossLinePoints[1]-this.scaleCrossLineYCoord(n,o),this.crossLinePoints[2]-this.scaleCrossLineXCoord(n,o),this.crossLinePoints[3]-this.scaleCrossLineYCoord(n,o)],l=s(this.points,n,r,i),c=s(a,n,r,i);t.arrowShapeImpl(this.name)(e,l,c)}}),u("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(e){return.985*c(e)}}),u("circle",{radius:.15,collide:function(e,t,n,r,i,o){var a=i;return Math.pow(a.x-e,2)+Math.pow(a.y-t,2)<=Math.pow((n+2*o)*this.radius,2)},draw:function(e,n,r,i){t.arrowShapeImpl(this.name)(e,i.x,i.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),u("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(e){return 1},gap:function(e){return 1}}),u("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),u("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}})}};t.exports=a},{"../../../is":91,"../../../math":93,"../../../util":108}],58:[function(e,t,n){"use strict";var r=e("../../../../window"),i=e("../../../../math"),o=e("../../../../util"),a=(r=e("../../../../window"),{projectIntoViewport:function(e,t){var n=this.cy,r=this.findContainerClientCoords(),i=r[0],o=r[1],a=n.pan(),s=n.zoom();return[(e-i-a.x)/s,(t-o-a.y)/s]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var e=this.container,t=e.getBoundingClientRect(),n=r.getComputedStyle(e),i=function(e){return parseFloat(n.getPropertyValue(e))},o={left:i("padding-left")+i("border-left-width"),right:i("padding-right")+i("border-right-width"),top:i("padding-top")+i("border-top-width"),bottom:i("padding-bottom")+i("border-bottom-width")};return this.containerBB=[t.left+o.left,t.top+o.top,t.right-t.left-o.left-o.right,t.bottom-t.top-o.top-o.bottom]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,n,r){return this.findNearestElements(e,t,n,r)[0]},findNearestElements:function(e,t,n,r){function a(e,t){if(e.isNode()){if(p)return;p=e,v.push(e)}if(e.isEdge()&&(null==t||t<E))if(d){if(d.pstyle("z-index").value===e.pstyle("z-index").value)for(var n=0;n<v.length;n++)if(v[n].isEdge()){v[n]=e,d=e,E=null!=t?t:E;break}}else v.push(e),d=e,E=null!=t?t:E}function s(n){var r=n.outerWidth()+2*C,i=n.outerHeight()+2*C,o=r/2,s=i/2,l=n.position();if(l.x-o<=e&&e<=l.x+o&&l.y-s<=t&&t<=l.y+s&&h.nodeShapes[f.getNodeShape(n)].checkPoint(e,t,0,r,i,l.x,l.y))return a(n,0),!0}function l(n){var r,o=n._private,l=o.rscratch,c=n.pstyle("width").pfValue,u=n.pstyle("arrow-scale").value,d=c/2+b,p=d*d,g=2*d,m=o.source,C=o.target;if("segments"===l.edgeType||"straight"===l.edgeType||"haystack"===l.edgeType){for(var x=l.allpts,E=0;E+3<x.length;E+=2)if(i.inLineVicinity(e,t,x[E],x[E+1],x[E+2],x[E+3],g)&&p>(r=i.sqdistToFiniteLine(e,t,x[E],x[E+1],x[E+2],x[E+3])))return a(n,r),!0}else if("bezier"===l.edgeType||"multibezier"===l.edgeType||"self"===l.edgeType||"compound"===l.edgeType)for(x=l.allpts,E=0;E+5<l.allpts.length;E+=4)if(i.inBezierVicinity(e,t,x[E],x[E+1],x[E+2],x[E+3],x[E+4],x[E+5],g)&&p>(r=i.sqdistToQuadraticBezier(e,t,x[E],x[E+1],x[E+2],x[E+3],x[E+4],x[E+5])))return a(n,r),!0;m=m||o.source,C=C||o.target;var S=f.getArrowWidth(c,u),w=[{name:"source",x:l.arrowStartX,y:l.arrowStartY,angle:l.srcArrowAngle},{name:"target",x:l.arrowEndX,y:l.arrowEndY,angle:l.tgtArrowAngle},{name:"mid-source",x:l.midX,y:l.midY,angle:l.midsrcArrowAngle},{name:"mid-target",x:l.midX,y:l.midY,angle:l.midtgtArrowAngle}];for(E=0;E<w.length;E++){var V=w[E],R=h.arrowShapes[n.pstyle(V.name+"-arrow-shape").value];if(R.roughCollide(e,t,S,V.angle,{x:V.x,y:V.y},b)&&R.collide(e,t,S,V.angle,{x:V.x,y:V.y},b))return a(n),!0}y&&v.length>0&&(s(m),s(C))}function c(e,t,n){return o.getPrefixedProperty(e,t,n)}function u(n,r){var o,s=n._private,l=x;o=r?r+"-":"";var u=n.pstyle(o+"label").value;if("yes"===n.pstyle("text-events").strValue&&u){var d=s.rstyle,p=n.pstyle("text-border-width").pfValue,f=n.pstyle("text-background-padding").pfValue,h=c(d,"labelWidth",r)+p+2*l+2*f,g=c(d,"labelHeight",r)+p+2*l+2*f,v=c(d,"labelX",r),m=c(d,"labelY",r),y=c(s.rscratch,"labelAngle",r),b=v-h/2,C=v+h/2,E=m-g/2,S=m+g/2;if(y){var w=Math.cos(y),V=Math.sin(y),R=function(e,t){return{x:(e-=v)*w-(t-=m)*V+v,y:e*V+t*w+m}},O=R(b,E),A=R(b,S),k=R(C,E),T=R(C,S),D=[O.x,O.y,k.x,k.y,T.x,T.y,A.x,A.y];if(i.pointInsidePolygonPoints(e,t,D))return a(n),!0}else{var N={w:h,h:g,x1:b,x2:C,y1:E,y2:S};if(i.inBoundingBox(N,e,t))return a(n),!0}}}var d,p,f=this,h=this,g=h.getCachedZSortedEles(),v=[],m=h.cy.zoom(),y=h.cy.hasCompoundNodes(),b=(r?24:8)/m,C=(r?8:2)/m,x=(r?8:2)/m,E=1/0;n&&(g=g.interactive);for(var S=g.length-1;S>=0;S--){var w=g[S];w.isNode()?s(w)||u(w):l(w)||u(w)||u(w,"source")||u(w,"target")}return v},getAllInBox:function(e,t,n,r){var o=this.getCachedZSortedEles().interactive,a=[],s=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),u=Math.max(t,r);e=s,n=l,t=c,r=u;for(var d=i.makeBoundingBox({x1:e,y1:t,x2:n,y2:r}),p=0;p<o.length;p++){var f=o[p];if(f.isNode()){var h=f,g=h.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});i.boundingBoxesIntersect(d,g)&&!i.boundingBoxInBoundingBox(g,d)&&a.push(h)}else{var v=f,m=v._private,y=m.rscratch;if(null!=y.startX&&null!=y.startY&&!i.inBoundingBox(d,y.startX,y.startY))continue;if(null!=y.endX&&null!=y.endY&&!i.inBoundingBox(d,y.endX,y.endY))continue;if("bezier"===y.edgeType||"multibezier"===y.edgeType||"self"===y.edgeType||"compound"===y.edgeType||"segments"===y.edgeType||"haystack"===y.edgeType){for(var b=m.rstyle.bezierPts||m.rstyle.linePts||m.rstyle.haystackPts,C=!0,x=0;x<b.length;x++)if(!i.pointInBoundingBox(d,b[x])){C=!1;break}C&&a.push(v)}else"haystack"!==y.edgeType&&"straight"!==y.edgeType||a.push(v)}}return a}});t.exports=a},{"../../../../math":93,"../../../../util":108,"../../../../window":116}],59:[function(e,t,n){"use strict";var r=e("../../../../math"),i={calculateArrowAngles:function(e){var t,n,i,o,a,s,l=e._private.rscratch,c="haystack"===l.edgeType,u="bezier"===l.edgeType,d="multibezier"===l.edgeType,p="segments"===l.edgeType,f="compound"===l.edgeType,h="self"===l.edgeType;if(c?(i=l.haystackPts[0],o=l.haystackPts[1],a=l.haystackPts[2],s=l.haystackPts[3]):(i=l.arrowStartX,o=l.arrowStartY,a=l.arrowEndX,s=l.arrowEndY),v=l.midX,m=l.midY,p)t=i-l.segpts[0],n=o-l.segpts[1];else if(d||f||h||u){var g=l.allpts;t=i-r.qbezierAt(g[0],g[2],g[4],.1),n=o-r.qbezierAt(g[1],g[3],g[5],.1)}else t=i-v,n=o-m;l.srcArrowAngle=r.getAngleFromDisp(t,n);var v=l.midX,m=l.midY;if(c&&(v=(i+a)/2,m=(o+s)/2),t=a-i,n=s-o,p)if((g=l.allpts).length/2%2==0){var y=(b=g.length/2)-2;t=g[b]-g[y],n=g[b+1]-g[y+1]}else{y=(b=g.length/2-1)-2;var b,C=b+2;t=g[b]-g[y],n=g[b+1]-g[y+1]}else if(d||f||h){var x,E,S,w,g=l.allpts;if(l.ctrlpts.length/2%2==0){var V=2+(R=2+(O=g.length/2-1));x=r.qbezierAt(g[O],g[R],g[V],0),E=r.qbezierAt(g[O+1],g[R+1],g[V+1],0),S=r.qbezierAt(g[O],g[R],g[V],1e-4),w=r.qbezierAt(g[O+1],g[R+1],g[V+1],1e-4)}else{var R,O=(R=g.length/2-1)-2;V=R+2,x=r.qbezierAt(g[O],g[R],g[V],.4999),E=r.qbezierAt(g[O+1],g[R+1],g[V+1],.4999),S=r.qbezierAt(g[O],g[R],g[V],.5),w=r.qbezierAt(g[O+1],g[R+1],g[V+1],.5)}t=S-x,n=w-E}if(l.midtgtArrowAngle=r.getAngleFromDisp(t,n),l.midDispX=t,l.midDispY=n,t*=-1,n*=-1,p&&((g=l.allpts).length/2%2==0||(t=-(g[C=2+(b=g.length/2-1)]-g[b]),n=-(g[C+1]-g[b+1]))),l.midsrcArrowAngle=r.getAngleFromDisp(t,n),p)t=a-l.segpts[l.segpts.length-2],n=s-l.segpts[l.segpts.length-1];else if(d||f||h||u){var A=(g=l.allpts).length;t=a-r.qbezierAt(g[A-6],g[A-4],g[A-2],.9),n=s-r.qbezierAt(g[A-5],g[A-3],g[A-1],.9)}else t=a-v,n=s-m;l.tgtArrowAngle=r.getAngleFromDisp(t,n)}};i.getArrowWidth=i.getArrowHeight=function(e,t){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[e+", "+t];return r||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r,r)},t.exports=i},{"../../../../math":93}],60:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o={findEdgeControlPoints:function(e){if(e&&0!==e.length){for(var t,n=this,o=n.cy.hasCompoundNodes(),a={},s=[],l=[],c=0;c<e.length;c++){var u=(Et=(xt=e[c])._private).data,d="unbundled-bezier"===(D=xt.pstyle("curve-style").value)||"segments"===D;if("none"!==xt.pstyle("display").value)if("haystack"!==D){var p=u.source,f=u.target;t=p>f?f+"$-$"+p:p+"$-$"+f,d&&(t="unbundled$-$"+u.id),null==a[t]&&(a[t]=[],s.push(t)),a[t].push(xt),d&&(a[t].hasUnbundled=!0)}else l.push(xt)}for(var h,g,v,m,y=0;y<s.length;y++){var b=a[t=s[y]];if(b.sort((function(e,t){return e.poolIndex()-t.poolIndex()})),Rt=b[0]._private.source,Ot=b[0]._private.target,!b.hasUnbundled&&Rt.id()>Ot.id()){var C=Rt;Rt=Ot,Ot=C}Rt._private,Ot._private,At=Rt.position(),kt=Ot.position(),Tt=Rt.outerWidth(),Nt=Rt.outerHeight(),Dt=Ot.outerWidth(),Pt=Ot.outerHeight(),h=n.nodeShapes[this.getNodeShape(Rt)],g=n.nodeShapes[this.getNodeShape(Ot)],m=!1;var x={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0},E=At.x,S=At.y,w=Tt,V=Nt,R=kt.x,O=kt.y,A=Dt,k=Pt,T=b.length;for(c=0;c<b.length;c++){var D,N=(wt=(xt=b[c])._private.rscratch).lastEdgeIndex,P=c,B=wt.lastNumEdges,_=(d="unbundled-bezier"===(D=xt.pstyle("curve-style").value)||"segments"===D,xt.pstyle("control-point-distances")),M=xt.pstyle("loop-direction").pfValue,I=xt.pstyle("loop-sweep").pfValue,F=xt.pstyle("control-point-weights"),L=_&&F?Math.min(_.value.length,F.value.length):1,W=xt.pstyle("control-point-step-size").pfValue,U=_?_.pfValue[0]:void 0,G=F.value[0],z=xt.pstyle("edge-distances").value,Q=xt.pstyle("segment-weights"),j=xt.pstyle("segment-distances"),Y=Math.min(Q.pfValue.length,j.pfValue.length),H=wt.lastSrcCtlPtX,J=wt.lastSrcCtlPtY,Z=wt.lastSrcCtlPtW,X=wt.lastSrcCtlPtH,q=wt.lastTgtCtlPtX,K=wt.lastTgtCtlPtY,$=wt.lastTgtCtlPtW,ee=wt.lastTgtCtlPtH,te=wt.lastCurveStyle,ne=D,re=wt.lastCtrlptDists,ie=_?_.strValue:null,oe=wt.lastCtrlptWs,ae=F.strValue,se=wt.lastSegmentWs,le=Q.strValue,ce=wt.lastSegmentDs,ue=j.strValue,de=wt.lastStepSize,pe=W,fe=wt.lastLoopDir,he=M,ge=wt.lastLoopSwp,ve=I,me=wt.lastEdgeDistances,ye=z;if(wt.badBezier=!!m,H!==E||J!==S||Z!==w||X!==V||q!==R||K!==O||$!==A||ee!==k||te!==ne||re!==ie||oe!==ae||se!==le||ce!==ue||de!==pe||fe!==he||ge!==ve||me!==ye||!(N===P&&B===T||d)){if(wt.lastSrcCtlPtX=E,wt.lastSrcCtlPtY=S,wt.lastSrcCtlPtW=w,wt.lastSrcCtlPtH=V,wt.lastTgtCtlPtX=R,wt.lastTgtCtlPtY=O,wt.lastTgtCtlPtW=A,wt.lastTgtCtlPtH=k,wt.lastEdgeIndex=P,wt.lastNumEdges=T,wt.lastCurveStyle=ne,wt.lastCtrlptDists=ie,wt.lastCtrlptWs=ae,wt.lastSegmentDs=ue,wt.lastSegmentWs=le,wt.lastStepSize=pe,wt.lastLoopDir=he,wt.lastLoopSwp=ve,wt.lastEdgeDistances=ye,!b.calculatedIntersection&&(b.length>1&&Rt!==Ot||b.hasUnbundled)){b.calculatedIntersection=!0;var be=h.intersectLine(At.x,At.y,Tt,Nt,kt.x,kt.y,0),Ce=g.intersectLine(kt.x,kt.y,Dt,Pt,At.x,At.y,0),xe={x1:be[0],x2:Ce[0],y1:be[1],y2:Ce[1]},Ee={x1:At.x,x2:kt.x,y1:At.y,y2:kt.y},Se=Ce[1]-be[1],we=Ce[0]-be[0],Ve=Math.sqrt(we*we+Se*Se),Re={x:we,y:Se},Oe={x:Re.x/Ve,y:Re.y/Ve};v={x:-Oe.y,y:Oe.x},g.checkPoint(be[0],be[1],0,Dt,Pt,kt.x,kt.y)&&h.checkPoint(Ce[0],Ce[1],0,Tt,Nt,At.x,At.y)&&(v={},m=!0)}if(wt.srcIntn=be,wt.tgtIntn=Ce,Rt===Ot){wt.edgeType="self";var Ae=c,ke=W;d&&(Ae=0,ke=U);var Te=M-Math.PI/2,De=Te-I/2,Ne=Te+I/2,Pe=String(M+"_"+I);Ae=void 0===x[Pe]?x[Pe]=0:++x[Pe],wt.ctrlpts=[At.x+1.4*Math.cos(De)*ke*(Ae/3+1),At.y+1.4*Math.sin(De)*ke*(Ae/3+1),At.x+1.4*Math.cos(Ne)*ke*(Ae/3+1),At.y+1.4*Math.sin(Ne)*ke*(Ae/3+1)]}else if(o&&(Rt.isParent()||Rt.isChild()||Ot.isParent()||Ot.isChild())&&(Rt.parents().anySame(Ot)||Ot.parents().anySame(Rt))){wt.edgeType="compound",wt.badBezier=!1,Ae=c,ke=W,d&&(Ae=0,ke=U);var Be=50,_e={x:At.x-Tt/2,y:At.y-Nt/2},Me={x:kt.x-Dt/2,y:kt.y-Pt/2},Ie={x:Math.min(_e.x,Me.x),y:Math.min(_e.y,Me.y)},Fe=.5,Le=Math.max(Fe,Math.log(.01*Tt)),We=Math.max(Fe,Math.log(.01*Dt));wt.ctrlpts=[Ie.x,Ie.y-(1+Math.pow(Be,1.12)/100)*ke*(Ae/3+1)*Le,Ie.x-(1+Math.pow(Be,1.12)/100)*ke*(Ae/3+1)*We,Ie.y]}else if("segments"===D){wt.edgeType="segments",wt.segpts=[];for(var Ue=0;Ue<Y;Ue++){var Ge=Q.pfValue[Ue],ze=j.pfValue[Ue],Qe=1-Ge,je=Ge,Ye={x:(Ke="node-position"===z?Ee:xe).x1*Qe+Ke.x2*je,y:Ke.y1*Qe+Ke.y2*je};wt.segpts.push(Ye.x+v.x*ze,Ye.y+v.y*ze)}}else if(b.length%2!=1||c!==Math.floor(b.length/2)||d){var He=d;wt.edgeType=He?"multibezier":"bezier",wt.ctrlpts=[];for(var Je=0;Je<L;Je++){var Ze,Xe=(.5-b.length/2+c)*W,qe=r.signum(Xe);He&&(U=_?_.pfValue[Je]:W,G=F.value[Je]);var Ke,$e=void 0!==(Ze=d?U:void 0!==U?qe*U:void 0)?Ze:Xe;Qe=1-G,je=G,Ye={x:(Ke="node-position"===z?Ee:xe).x1*Qe+Ke.x2*je,y:Ke.y1*Qe+Ke.y2*je},wt.ctrlpts.push(Ye.x+v.x*$e,Ye.y+v.y*$e)}}else wt.edgeType="straight";this.findEndpoints(xt);var et=!i.number(wt.startX)||!i.number(wt.startY),tt=!i.number(wt.arrowStartX)||!i.number(wt.arrowStartY),nt=!i.number(wt.endX)||!i.number(wt.endY),rt=!i.number(wt.arrowEndX)||!i.number(wt.arrowEndY),it=this.getArrowWidth(xt.pstyle("width").pfValue,xt.pstyle("arrow-scale").value)*this.arrowShapeWidth*3;if("bezier"===wt.edgeType){var ot=r.dist({x:wt.ctrlpts[0],y:wt.ctrlpts[1]},{x:wt.startX,y:wt.startY}),at=ot<it,st=r.dist({x:wt.ctrlpts[0],y:wt.ctrlpts[1]},{x:wt.endX,y:wt.endY}),lt=st<it,ct=!1;if(et||tt||at){ct=!0;var ut={x:wt.ctrlpts[0]-At.x,y:wt.ctrlpts[1]-At.y},dt=Math.sqrt(ut.x*ut.x+ut.y*ut.y),pt={x:ut.x/dt,y:ut.y/dt},ft=Math.max(Tt,Nt),ht={x:wt.ctrlpts[0]+2*pt.x*ft,y:wt.ctrlpts[1]+2*pt.y*ft},gt=h.intersectLine(At.x,At.y,Tt,Nt,ht.x,ht.y,0);at?(wt.ctrlpts[0]=wt.ctrlpts[0]+pt.x*(it-ot),wt.ctrlpts[1]=wt.ctrlpts[1]+pt.y*(it-ot)):(wt.ctrlpts[0]=gt[0]+pt.x*it,wt.ctrlpts[1]=gt[1]+pt.y*it)}if(nt||rt||lt){ct=!0,ut={x:wt.ctrlpts[0]-kt.x,y:wt.ctrlpts[1]-kt.y},dt=Math.sqrt(ut.x*ut.x+ut.y*ut.y),pt={x:ut.x/dt,y:ut.y/dt},ft=Math.max(Tt,Nt),ht={x:wt.ctrlpts[0]+2*pt.x*ft,y:wt.ctrlpts[1]+2*pt.y*ft};var vt=g.intersectLine(kt.x,kt.y,Dt,Pt,ht.x,ht.y,0);lt?(wt.ctrlpts[0]=wt.ctrlpts[0]+pt.x*(it-st),wt.ctrlpts[1]=wt.ctrlpts[1]+pt.y*(it-st)):(wt.ctrlpts[0]=vt[0]+pt.x*it,wt.ctrlpts[1]=vt[1]+pt.y*it)}ct&&this.findEndpoints(xt)}if("multibezier"===wt.edgeType||"bezier"===wt.edgeType||"self"===wt.edgeType||"compound"===wt.edgeType){for(wt.allpts=[],wt.allpts.push(wt.startX,wt.startY),Je=0;Je+1<wt.ctrlpts.length;Je+=2)wt.allpts.push(wt.ctrlpts[Je],wt.ctrlpts[Je+1]),Je+3<wt.ctrlpts.length&&wt.allpts.push((wt.ctrlpts[Je]+wt.ctrlpts[Je+2])/2,(wt.ctrlpts[Je+1]+wt.ctrlpts[Je+3])/2);var mt,yt;wt.allpts.push(wt.endX,wt.endY),wt.ctrlpts.length/2%2==0?(mt=wt.allpts.length/2-1,wt.midX=wt.allpts[mt],wt.midY=wt.allpts[mt+1]):(mt=wt.allpts.length/2-3,yt=.5,wt.midX=r.qbezierAt(wt.allpts[mt],wt.allpts[mt+2],wt.allpts[mt+4],yt),wt.midY=r.qbezierAt(wt.allpts[mt+1],wt.allpts[mt+3],wt.allpts[mt+5],yt))}else if("straight"===wt.edgeType)wt.allpts=[wt.startX,wt.startY,wt.endX,wt.endY],wt.midX=(wt.startX+wt.endX+wt.arrowStartX+wt.arrowEndX)/4,wt.midY=(wt.startY+wt.endY+wt.arrowStartY+wt.arrowEndY)/4;else if("segments"===wt.edgeType)if(wt.allpts=[],wt.allpts.push(wt.startX,wt.startY),wt.allpts.push.apply(wt.allpts,wt.segpts),wt.allpts.push(wt.endX,wt.endY),wt.segpts.length%4==0){var bt=wt.segpts.length/2,Ct=bt-2;wt.midX=(wt.segpts[Ct]+wt.segpts[bt])/2,wt.midY=(wt.segpts[Ct+1]+wt.segpts[bt+1])/2}else Ct=wt.segpts.length/2-1,wt.midX=wt.segpts[Ct],wt.midY=wt.segpts[Ct+1];this.storeEdgeProjections(xt),this.calculateArrowAngles(xt),this.recalculateEdgeLabelProjections(xt),this.calculateLabelAngles(xt)}}}for(c=0;c<l.length;c++){var xt,Et,St=(Et=(xt=l[c])._private).rscratch,wt=St;if(!St.haystack){var Vt=2*Math.random()*Math.PI;St.source={x:Math.cos(Vt),y:Math.sin(Vt)},Vt=2*Math.random()*Math.PI,St.target={x:Math.cos(Vt),y:Math.sin(Vt)}}var Rt=Et.source,Ot=Et.target,At=Rt.position(),kt=Ot.position(),Tt=Rt.width(),Dt=Ot.width(),Nt=Rt.height(),Pt=Ot.height(),Bt=(ft=xt.pstyle("haystack-radius").value)/2;wt.haystackPts=wt.allpts=[wt.source.x*Tt*Bt+At.x,wt.source.y*Nt*Bt+At.y,wt.target.x*Dt*Bt+kt.x,wt.target.y*Pt*Bt+kt.y],wt.midX=(wt.allpts[0]+wt.allpts[2])/2,wt.midY=(wt.allpts[1]+wt.allpts[3])/2,St.edgeType="haystack",St.haystack=!0,this.storeEdgeProjections(xt),this.calculateArrowAngles(xt),this.recalculateEdgeLabelProjections(xt),this.calculateLabelAngles(xt)}}}};t.exports=o},{"../../../../is":91,"../../../../math":93}],61:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o={manualEndptToPx:function(e,t){var n=this,r=e.position(),i=e.outerWidth(),o=e.outerHeight();if(2===t.value.length){var a=[t.pfValue[0],t.pfValue[1]];return"%"===t.units[0]&&(a[0]=a[0]*i),"%"===t.units[1]&&(a[1]=a[1]*o),a[0]+=r.x,a[1]+=r.y,a}var s=t.pfValue[0];s=-Math.PI/2+s;var l=2*Math.max(i,o);return a=[r.x+Math.cos(s)*l,r.y+Math.sin(s)*l],n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x,r.y,i,o,a[0],a[1],0)},findEndpoints:function(e){var t,n,o,a,s,l=this,c=e.source()[0],u=e.target()[0],d=c.position(),p=u.position(),f=e.pstyle("target-arrow-shape").value,h=e.pstyle("source-arrow-shape").value,g=e.pstyle("target-distance-from-node").pfValue,v=e.pstyle("source-distance-from-node").pfValue,m=e._private.rscratch,y=m.edgeType,b="bezier"===y||"multibezier"===y||"self"===y||"compound"===y,C="bezier"!==y,x="straight"===y||"segments"===y,E="segments"===y,S=b||C||x,w=e.pstyle("source-endpoint"),V=e.pstyle("target-endpoint");if(m.srcManEndpt=w,m.tgtManEndpt=V,b){var R=[m.ctrlpts[0],m.ctrlpts[1]];n=C?[m.ctrlpts[m.ctrlpts.length-2],m.ctrlpts[m.ctrlpts.length-1]]:R,o=R}else if(x){var O=E?m.segpts.slice(0,2):[p.x,p.y];n=E?m.segpts.slice(m.segpts.length-2):[d.x,d.y],o=O}"inside-to-node"===V.value?t=[p.x,p.y]:V.units?t=this.manualEndptToPx(u,V):"outside-to-line"===V.value?t=m.tgtIntn:("outside-to-node"===V.value?a=n:"outside-to-line"===V.value&&(a=[d.x,d.y]),t=l.nodeShapes[this.getNodeShape(u)].intersectLine(p.x,p.y,u.outerWidth(),u.outerHeight(),a[0],a[1],0));var A=r.shortenIntersection(t,n,l.arrowShapes[f].spacing(e)+g),k=r.shortenIntersection(t,n,l.arrowShapes[f].gap(e)+g);m.endX=k[0],m.endY=k[1],m.arrowEndX=A[0],m.arrowEndY=A[1],"inside-to-node"===w.value?t=[d.x,d.y]:w.units?t=this.manualEndptToPx(c,w):"outside-to-line"===w.value?t=m.srcIntn:("outside-to-node"===w.value?s=o:"outside-to-line"===w.value&&(s=[p.x,p.y]),t=l.nodeShapes[this.getNodeShape(c)].intersectLine(d.x,d.y,c.outerWidth(),c.outerHeight(),s[0],s[1],0));var T=r.shortenIntersection(t,o,l.arrowShapes[h].spacing(e)+v),D=r.shortenIntersection(t,o,l.arrowShapes[h].gap(e)+v);m.startX=D[0],m.startY=D[1],m.arrowStartX=T[0],m.arrowStartY=T[1],S&&(i.number(m.startX)&&i.number(m.startY)&&i.number(m.endX)&&i.number(m.endY)?m.badLine=!1:m.badLine=!0)}};t.exports=o},{"../../../../is":91,"../../../../math":93}],62:[function(e,t,n){"use strict";function r(e,t,n){for(var r=function(e,t,n,r){return i.qbezierAt(e,t,n,r)},o=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var s=e.bezierProjPcts[a];o.push({x:r(n[0],n[2],n[4],s),y:r(n[1],n[3],n[5],s)})}}var i=e("../../../../math"),o={storeEdgeProjections:function(e){var t=e._private,n=t.rscratch,i=n.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===i||"bezier"===i||"self"===i||"compound"===i)for(var o=(t.rstyle.bezierPts=[],0);o+5<n.allpts.length;o+=4)r(this,e,n.allpts.slice(o,o+6));else if("segments"===i){var a=t.rstyle.linePts=[];for(o=0;o+1<n.allpts.length;o+=2)a.push({x:n.allpts[o],y:n.allpts[o+1]})}else if("haystack"===i){var s=n.haystackPts;t.rstyle.haystackPts=[{x:s[0],y:s[1]},{x:s[2],y:s[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},recalculateEdgeProjections:function(e){this.findEdgeControlPoints(e)}};t.exports=o},{"../../../../math":93}],63:[function(e,t,n){"use strict";var r=e("../../../../util"),i={};[e("./coords"),e("./edge-arrows"),e("./edge-control-points"),e("./edge-endpoints"),e("./edge-projection"),e("./labels"),e("./nodes"),e("./rendered-style"),e("./z-ordering")].forEach((function(e){r.extend(i,e)})),t.exports=i},{"../../../../util":108,"./coords":58,"./edge-arrows":59,"./edge-control-points":60,"./edge-endpoints":61,"./edge-projection":62,"./labels":64,"./nodes":65,"./rendered-style":66,"./z-ordering":67}],64:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o=e("../../../../util"),a={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!i.emptyString(t)){var n,r,o=e._private,a=e.width(),s=e.height(),l=e.padding(),c=e.position(),u=e.pstyle("text-halign").strValue,d=e.pstyle("text-valign").strValue,p=o.rscratch,f=o.rstyle;switch(u){case"left":n=c.x-a/2-l;break;case"right":n=c.x+a/2+l;break;default:n=c.x}switch(d){case"top":r=c.y-s/2-l;break;case"bottom":r=c.y+s/2+l;break;default:r=c.y}p.labelX=n,p.labelY=r,f.labelX=n,f.labelY=r,this.applyLabelDimensions(e)}},recalculateEdgeLabelProjections:function(e){var t,n=e._private,i=n.rscratch,a=this,s={mid:e.pstyle("label").strValue,source:e.pstyle("source-label").strValue,target:e.pstyle("target-label").strValue};if(s.mid||s.source||s.target){t={x:i.midX,y:i.midY};var l=function(e,t,r){o.setPrefixedProperty(n.rscratch,e,t,r),o.setPrefixedProperty(n.rstyle,e,t,r)};l("labelX",null,t.x),l("labelY",null,t.y);var c=function(){function e(e,t,n,i,o){var a=r.dist(t,n),s=e.segments[e.segments.length-1],l={p0:t,p1:n,t0:i,t1:o,startDist:s?s.startDist+s.length:0,length:a};e.segments.push(l),e.length+=a}if(c.cache)return c.cache;for(var t=[],o=0;o+5<i.allpts.length;o+=4){var s={x:i.allpts[o],y:i.allpts[o+1]},l={x:i.allpts[o+2],y:i.allpts[o+3]},u={x:i.allpts[o+4],y:i.allpts[o+5]};t.push({p0:s,p1:l,p2:u,startDist:0,length:0,segments:[]})}var d=n.rstyle.bezierPts,p=a.bezierProjPcts.length;for(o=0;o<t.length;o++){var f=t[o],h=t[o-1];h&&(f.startDist=h.startDist+h.length),e(f,f.p0,d[o*p],0,a.bezierProjPcts[0]);for(var g=0;g<p-1;g++)e(f,d[o*p+g],d[o*p+g+1],a.bezierProjPcts[g],a.bezierProjPcts[g+1]);e(f,d[o*p+p-1],f.p2,a.bezierProjPcts[p-1],1)}return c.cache=t},u=function(n){var o,a="source"===n;if(s[n]){var u=e.pstyle(n+"-text-offset").pfValue,d=function(e,t){var n=t.x-e.x,r=t.y-e.y;return Math.atan(r/n)},p=function(e,t,n,i){var o=r.bound(0,i-.001,1),a=r.bound(0,i+.001,1),s=r.qbezierPtAt(e,t,n,o),l=r.qbezierPtAt(e,t,n,a);return d(s,l)};switch(i.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var f,h=c(),g=0,v=0,m=0;m<h.length;m++){for(var y=h[a?m:h.length-1-m],b=0;b<y.segments.length;b++){var C=y.segments[a?b:y.segments.length-1-b],x=m===h.length-1&&b===y.segments.length-1;if(g=v,(v+=C.length)>=u||x){f={cp:y,segment:C};break}}if(f)break}y=f.cp;var E=(u-g)/(C=f.segment).length,S=C.t1-C.t0,w=a?C.t0+S*E:C.t1-S*E;w=r.bound(0,w,1),t=r.qbezierPtAt(y.p0,y.p1,y.p2,w),o=p(y.p0,y.p1,y.p2,w,t);break;case"straight":case"segments":case"haystack":var V,R,O,A,k=0,T=i.allpts.length;for(m=0;m+3<T&&(a?(O={x:i.allpts[m],y:i.allpts[m+1]},A={x:i.allpts[m+2],y:i.allpts[m+3]}):(O={x:i.allpts[T-2-m],y:i.allpts[T-1-m]},A={x:i.allpts[T-4-m],y:i.allpts[T-3-m]}),R=k,!((k+=V=r.dist(O,A))>=u));m+=2);w=(u-R)/V,w=r.bound(0,w,1),t=r.lineAt(O,A,w),o=d(O,A)}l("labelX",n,t.x),l("labelY",n,t.y),l("labelAutoAngle",n,o)}};u("source"),u("target"),this.applyLabelDimensions(e)}},applyLabelDimensions:function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},applyPrefixedLabelDimensions:function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r);o.setPrefixedProperty(n.rstyle,"labelWidth",t,i.width),o.setPrefixedProperty(n.rscratch,"labelWidth",t,i.width),o.setPrefixedProperty(n.rstyle,"labelHeight",t,i.height),o.setPrefixedProperty(n.rscratch,"labelHeight",t,i.height)},getLabelText:function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,s=function(e,r){return r?(o.setPrefixedProperty(n.rscratch,e,t,r),r):o.getPrefixedProperty(n.rscratch,e,t)};"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var l=e.pstyle("text-wrap").value;if("wrap"===l){var c=s("labelKey");if(c&&s("labelWrapKey")===c)return s("labelWrapCachedText");for(var u=i.split("\n"),d=e.pstyle("text-max-width").pfValue,p=[],f=0;f<u.length;f++){var h=u[f];if(this.calculateLabelDimensions(e,h,"line="+h).width>d){for(var g=h.split(/\s+/),v="",m=0;m<g.length;m++){var y=g[m],b=0===v.length?y:v+" "+y;this.calculateLabelDimensions(e,b,"testLine="+b).width<=d?v+=y+" ":(p.push(v),v=y+" ")}v.match(/^\s+$/)||p.push(v)}else p.push(h)}s("labelWrapCachedLines",p),i=s("labelWrapCachedText",p.join("\n")),s("labelWrapKey",c)}else if("ellipsis"===l){d=e.pstyle("text-max-width").pfValue;for(var C="",x="…",E=!1,S=0;S<i.length&&!(this.calculateLabelDimensions(e,C+i[S]+x).width>d);S++)C+=i[S],S===i.length-1&&(E=!0);return E||(C+=x),C}return i},calculateLabelDimensions:function(e,t,n){var r=this,i=e._private.labelStyleKey+"$@$"+t;n&&(i+="$@$"+n);var o=r.labelDimCache||(r.labelDimCache={});if(o[i])return o[i];var a=1,s=e.pstyle("font-style").strValue,l=a*e.pstyle("font-size").pfValue+"px",c=e.pstyle("font-family").strValue,u=e.pstyle("font-weight").strValue,d=this.labelCalcDiv;d||(d=this.labelCalcDiv=document.createElement("div"),document.body.appendChild(d));var p=d.style;return p.fontFamily=c,p.fontStyle=s,p.fontSize=l,p.fontWeight=u,p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none",p.padding="0",p.lineHeight="1","wrap"===e.pstyle("text-wrap").value?p.whiteSpace="pre":p.whiteSpace="normal",d.textContent=t,o[i]={width:Math.ceil(d.clientWidth/a),height:Math.ceil(d.clientHeight/a)},o[i]},calculateLabelAngles:function(e){var t=e._private.rscratch,n=e.isEdge(),r=e.pstyle("text-rotation"),i=r.strValue;"none"===i?t.labelAngle=t.sourceLabelAngle=t.targetLabelAngle=0:n&&"autorotate"===i?(t.labelAngle=Math.atan(t.midDispY/t.midDispX),t.sourceLabelAngle=t.sourceLabelAutoAngle,t.targetLabelAngle=t.targetLabelAutoAngle):t.labelAngle=t.sourceLabelAngle=t.targetLabelAngle="autorotate"===i?0:r.pfValue}};t.exports=a},{"../../../../is":91,"../../../../math":93,"../../../../util":108}],65:[function(e,t,n){"use strict";var r={getNodeShape:function(e){var t=this,n=e.pstyle("shape").value;if(e.isParent())return"rectangle"===n||"roundrectangle"===n||"cutrectangle"===n?n:"rectangle";if("polygon"===n){var r=e.pstyle("shape-polygon-points").value;return t.nodeShapes.makePolygon(r).name}return n}};t.exports=r},{}],66:[function(e,t,n){"use strict";var r={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e,n,r){if(t.merge(e),!0===r||void 0===r)for(var i=0;i<e.length;i++){var o=e[i]._private,a=o.rstyle;a.clean=!1,o.bbCache=null;var s=a.dirtyEvents=a.dirtyEvents||{length:0};s[n.type]||(s[n.type]=!0,s.length++)}};n.binder(e).on("position.* style.* free.* bounds.*","node",(function(e){var t=e.target;r(t,e),r(t.connectedEdges(),e)})).on("add.*","node",(function(e){var t=e.target;r(t,e)})).on("background.*","node",(function(e){var t=e.target;r(t,e,!1)})).on("add.* style.*","edge",(function(e){var t=e.target;r(t,e),r(t.parallelEdges(),e)})).on("remove.*","edge",(function(e){for(var t=e.target.parallelEdges(),n=0;n<t.length;n++){var i=t[n];i.removed()||r(i,e)}})).on("dirty.*","node",(function(e){var t=e.target;r(t,e)}));var i=function(r){if(r){var i=n.onUpdateEleCalcsFns;if(i)for(var o=0;o<i.length;o++)(0,i[o])(r,t);for(n.recalculateRenderedStyle(t,!1),o=0;o<t.length;o++)t[o]._private.rstyle.dirtyEvents=null;t=e.collection()}};n.beforeRender(i,n.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var n=[],r=[];if(!this.destroyed){void 0===t&&(t=!0);for(var i=0;i<e.length;i++){var o=(l=(s=e[i])._private).rstyle;t&&o.clean||s.removed()||"none"!==s.pstyle("display").value&&("nodes"===l.group?r.push(s):n.push(s),o.clean=!0)}for(i=0;i<r.length;i++){o=(l=(s=r[i])._private).rstyle;var a=s.position();this.recalculateNodeLabelProjection(s),o.nodeX=a.x,o.nodeY=a.y,o.nodeW=s.pstyle("width").pfValue,o.nodeH=s.pstyle("height").pfValue}for(this.recalculateEdgeProjections(n),i=0;i<n.length;i++){o=(l=(s=n[i])._private).rstyle;var s,l,c=l.rscratch;this.recalculateEdgeLabelProjections(s),o.srcX=c.arrowStartX,o.srcY=c.arrowStartY,o.tgtX=c.arrowEndX,o.tgtY=c.arrowEndY,o.midX=c.midX,o.midY=c.midY,o.labelAngle=c.labelAngle,o.sourceLabelAngle=c.sourceLabelAngle,o.targetLabelAngle=c.targetLabelAngle}}}};t.exports=r},{}],67:[function(e,t,n){"use strict";var r=e("../../../../collection/zsort"),i={updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],n=0;n<e.length;n++){var r=(i=e[n])._private.rscratch;i.grabbed()&&!i.isParent()?t.push(i):r.inDragLayer?e.drag.push(i):e.nondrag.push(i)}for(n=0;n<t.length;n++){var i=t[n];e.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){if(e||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(r),t.interactive=t.filter((function(e){return e.interactive()})),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t}};t.exports=i},{"../../../../collection/zsort":32}],68:[function(e,t,n){"use strict";var r={getCachedImage:function(e,t,n){var r=this,i=r.imageCache=r.imageCache||{},o=i[e];if(o)return o.image.complete||o.image.addEventListener("load",n),o.image;var a=(o=i[e]=i[e]||{}).image=new Image;a.addEventListener("load",n);var s="data:";return e.substring(0,s.length).toLowerCase()===s||(a.crossOrigin=t),a.src=e,a}};t.exports=r},{}],69:[function(e,t,n){"use strict";var r=e("../../../is"),i=e("../../../util"),o=e("../../../window"),a=function(e){this.init(e)},s=a,l=s.prototype;l.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],l.init=function(e){var t=this;t.options=e,t.cy=e.cy;var n=t.container=e.cy.container();if(o){var r=o.document,a=r.head,s="__________cytoscape_stylesheet",l="__________cytoscape_container",c=null!=r.getElementById(s);if(n.className=(n.className||"")+" "+l,!c){var u=r.createElement("style");u.id=s,u.innerHTML="."+l+" { position: relative; }",a.insertBefore(u,a.children[0])}"static"===o.getComputedStyle(n).getPropertyValue("position")&&i.error("A Cytoscape container has style position:static and so can not use UI extensions properly")}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.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]},t.redraws=0,t.showFps=e.showFps,t.debug=e.debug,t.hideEdgesOnViewport=e.hideEdgesOnViewport,t.hideLabelsOnViewport=e.hideLabelsOnViewport,t.textureOnViewport=e.textureOnViewport,t.wheelSensitivity=e.wheelSensitivity,t.motionBlurEnabled=e.motionBlur,t.forcedPixelRatio=e.pixelRatio,t.motionBlur=e.motionBlur,t.motionBlurOpacity=e.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=e.desktopTapThreshold,t.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,t.touchTapThreshold=e.touchTapThreshold,t.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners(),t.load()},l.notify=function(e){var t,n=this;if(!this.destroyed){t=r.array(e.type)?e.type:[e.type];for(var i={},o=0;o<t.length;o++)i[t[o]]=!0;if(i.destroy)return void n.destroy();(i.add||i.remove||i.load||i.zorder)&&n.invalidateCachedZSortedEles(),i.viewport&&n.redrawHint("select",!0),(i.load||i.resize)&&(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint("eles",!0),n.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},l.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var n=e.bindings[t],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch(e){}},[e("./arrow-shapes"),e("./coord-ele-math"),e("./images"),e("./load-listeners"),e("./node-shapes"),e("./redraw")].forEach((function(e){i.extend(l,e)})),t.exports=s},{"../../../is":91,"../../../util":108,"../../../window":116,"./arrow-shapes":57,"./coord-ele-math":63,"./images":68,"./load-listeners":70,"./node-shapes":71,"./redraw":72}],70:[function(e,t,n){"use strict";var r=e("../../../is"),i=e("../../../util"),o=e("../../../math"),a=e("../../../event"),s={registerBinding:function(e,t,n,r){var i=Array.prototype.slice.apply(arguments,[1]),o=this.binder(e);return o.on.apply(o,i)},binder:function(e){var t=this,n=e===window||e===document||e===document.body||r.domElement(e);if(null==t.supportsPassiveEvents){var i=!1;try{var o=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,o)}catch(e){}t.supportsPassiveEvents=i}var a=function(r,i,o){var a=Array.prototype.slice.call(arguments);return n&&t.supportsPassiveEvents&&(a[2]={capture:null!=o&&o,passive:!1,once:!1}),t.bindings.push({target:e,args:a}),(e.addEventListener||e.on).apply(e,a),this};return{on:a,addEventListener:a,addListener:a,bind:a}},nodeIsDraggable:function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},nodeIsGrabbable:function(e){return this.nodeIsDraggable(e)&&e.interactive()},load:function(){var e=this,t=function(t,n,r,o){null==t&&(t=e.cy);for(var s=0;s<n.length;s++){var l=n[s],c=new a(r,i.extend({type:l},o));t.trigger(c)}},n=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},s=function(t,n){var r=!0;if(e.cy.hasCompoundNodes()&&t&&t.isEdge()){for(var i=0;n&&i<n.length;i++)if((t=n[i]).isNode()&&t.isParent()){r=!1;break}}else r=!0;return r},l=function(t){var n;if(t.addToList&&e.cy.hasCompoundNodes()){if(!t.addToList.hasId){t.addToList.hasId={};for(var r=0;r<t.addToList.length;r++){var i=t.addToList[r];t.addToList.hasId[i.id()]=!0}}n=t.addToList.hasId}return n||{}},c=function(e){e[0]._private.grabbed=!0},u=function(e){e[0]._private.grabbed=!1},d=function(e){e[0]._private.rscratch.inDragLayer=!0},p=function(e){e[0]._private.rscratch.inDragLayer=!1},f=function(e){e[0]._private.rscratch.isGrabTarget=!0},h=function(e){e[0]._private.rscratch.isGrabTarget=!1},g=function(e,t){var n=l(t);n[e.id()]||(t.addToList.push(e),n[e.id()]=!0,c(e))},v=function(e,t){if(e.cy().hasCompoundNodes()&&(null!=t.inDragLayer||null!=t.addToList)){var n=e.descendants();t.inDragLayer&&(n.forEach(d),n.connectedEdges().forEach(d)),t.addToList&&n.forEach((function(e){g(e,t)}))}},m=function(t,n){n=n||{};var r=t.cy().hasCompoundNodes();n.inDragLayer&&(t.forEach(d),t.neighborhood().stdFilter((function(e){return!r||e.isEdge()})).forEach(d)),n.addToList&&t.forEach((function(e){g(e,n)})),v(t,n),C(t,{inDragLayer:n.inDragLayer}),e.updateCachedGrabbedEles()},y=m,b=function(t){t&&(t.hasId={},e.getCachedZSortedEles().forEach((function(e){u(e),p(e),h(e)})),e.updateCachedGrabbedEles())},C=function(e,t){if((null!=t.inDragLayer||null!=t.addToList)&&e.cy().hasCompoundNodes()){var n=e.ancestors().orphans();if(!n.same(e)){var r=n.descendants().spawnSelf().merge(n).unmerge(e).unmerge(e.descendants()),i=r.connectedEdges();t.inDragLayer&&(i.forEach(d),r.forEach(d)),t.addToList&&r.forEach((function(e){g(e,t)}))}}},x="undefined"!=typeof MutationObserver;x?(e.removeObserver=new MutationObserver((function(t){for(var n=0;n<t.length;n++){var r=t[n].removedNodes;if(r)for(var i=0;i<r.length;i++)if(r[i]===e.container){e.destroy();break}}})),e.container.parentNode&&e.removeObserver.observe(e.container.parentNode,{childList:!0})):e.registerBinding(e.container,"DOMNodeRemoved",(function(t){e.destroy()}));var E=i.debounce((function(){e.cy.resize()}),100);x&&(e.styleObserver=new MutationObserver(E),e.styleObserver.observe(e.container,{attributes:!0})),e.registerBinding(window,"resize",E);for(var S=function(t){e.registerBinding(t,"scroll",(function(t){e.invalidateContainerClientCoordsCache()}))},w=e.cy.container();S(w),w.parentNode;)w=w.parentNode;e.registerBinding(e.container,"contextmenu",(function(e){e.preventDefault()}));var V=function(){return 0!==e.selection[4]},R=function(t){for(var n=e.findContainerClientCoords(),r=n[0],i=n[1],o=n[2],a=n[3],s=t.touches?t.touches:[t],l=!1,c=0;c<s.length;c++){var u=s[c];if(r<=u.clientX&&u.clientX<=r+o&&i<=u.clientY&&u.clientY<=i+a){l=!0;break}}if(!l)return!1;for(var d=e.container,p=t.target.parentNode,f=!1;p;){if(p===d){f=!0;break}p=p.parentNode}return!!f};e.registerBinding(e.container,"mousedown",(function(n){if(R(n)){n.preventDefault(),e.hoverData.capture=!0,e.hoverData.which=n.which;var r=e.cy,i=[n.clientX,n.clientY],o=e.projectIntoViewport(i[0],i[1]),s=e.selection,l=e.findNearestElements(o[0],o[1],!0,!1),c=l[0],u=e.dragData.possibleDragElements;e.hoverData.mdownPos=o,e.hoverData.mdownGPos=i;var d=function(){e.hoverData.tapholdCancelled=!1,clearTimeout(e.hoverData.tapholdTimeout),e.hoverData.tapholdTimeout=setTimeout((function(){if(!e.hoverData.tapholdCancelled){var t=e.hoverData.down;t?t.trigger(new a(n,{type:"taphold",position:{x:o[0],y:o[1]}})):r.trigger(new a(n,{type:"taphold",position:{x:o[0],y:o[1]}}))}}),e.tapholdDuration)};if(3==n.which){e.hoverData.cxtStarted=!0;var p=new a(n,{type:"cxttapstart",position:{x:o[0],y:o[1]}});c?(c.activate(),c.trigger(p),e.hoverData.down=c):r.trigger(p),e.hoverData.downTime=(new Date).getTime(),e.hoverData.cxtDragged=!1}else if(1==n.which){if(c&&c.activate(),null!=c&&e.nodeIsGrabbable(c)){var h=function(e){return new a(n,{type:e,position:{x:o[0],y:o[1]}})},g=function(e){e.trigger(h("grab"))};if(f(c),c.selected()){u=e.dragData.possibleDragElements=[];var v=r.$((function(t){return t.isNode()&&t.selected()&&e.nodeIsGrabbable(t)}));m(v,{addToList:u}),c.trigger(h("grabon")),v.forEach(g)}else u=e.dragData.possibleDragElements=[],y(c,{addToList:u}),c.trigger(h("grabon")).trigger(h("grab"));e.redrawHint("eles",!0),e.redrawHint("drag",!0)}e.hoverData.down=c,e.hoverData.downs=l,e.hoverData.downTime=(new Date).getTime(),t(c,["mousedown","tapstart","vmousedown"],n,{position:{x:o[0],y:o[1]}}),null==c?(s[4]=1,e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()):c.isEdge()&&(s[4]=1),d()}s[0]=s[2]=o[0],s[1]=s[3]=o[1]}}),!1),e.registerBinding(window,"mousemove",(function(i){if(e.hoverData.capture||R(i)){var l=!1,c=e.cy,u=c.zoom(),d=[i.clientX,i.clientY],p=e.projectIntoViewport(d[0],d[1]),f=e.hoverData.mdownPos,h=e.hoverData.mdownGPos,g=e.selection,v=null;e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.selecting||(v=e.findNearestElement(p[0],p[1],!0,!1));var y,C=e.hoverData.last,x=e.hoverData.down,E=[p[0]-g[2],p[1]-g[3]],S=e.dragData.possibleDragElements;if(h){var w=d[0]-h[0],V=w*w,O=d[1]-h[1],A=V+O*O;e.hoverData.isOverThresholdDrag=y=A>=e.desktopTapThreshold2}var k=n(i);y&&(e.hoverData.tapholdCancelled=!0);var T=function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(E[0]),t.push(E[1])):(t[0]+=E[0],t[1]+=E[1])};l=!0,t(v,["mousemove","vmousemove","tapdrag"],i,{position:{x:p[0],y:p[1]}});var D=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||c.trigger("boxstart"),g[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(y){var N=new a(i,{type:"cxtdrag",position:{x:p[0],y:p[1]}});x?x.trigger(N):c.trigger(N),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.trigger(new a(i,{type:"cxtdragout",position:{x:p[0],y:p[1]}})),e.hoverData.cxtOver=v,v&&v.trigger(new a(i,{type:"cxtdragover",position:{x:p[0],y:p[1]}})))}}else if(e.hoverData.dragging){if(l=!0,c.panningEnabled()&&c.userPanningEnabled()){var P;if(e.hoverData.justStartedPan){var B=e.hoverData.mdownPos;P={x:(p[0]-B[0])*u,y:(p[1]-B[1])*u},e.hoverData.justStartedPan=!1}else P={x:E[0]*u,y:E[1]*u};c.panBy(P),e.hoverData.dragged=!0}p=e.projectIntoViewport(i.clientX,i.clientY)}else if(1!=g[4]||null!=x&&!x.isEdge()){if(x&&x.isEdge()&&x.active()&&x.unactivate(),x&&x.grabbed()||v==C||(C&&t(C,["mouseout","tapdragout"],i,{position:{x:p[0],y:p[1]}}),v&&t(v,["mouseover","tapdragover"],i,{position:{x:p[0],y:p[1]}}),e.hoverData.last=v),x&&e.nodeIsDraggable(x))if(y)if(c.boxSelectionEnabled()&&k)x&&x.grabbed()&&(b(S),x.trigger("free")),D();else{var _=!e.dragData.didDrag;_&&e.redrawHint("eles",!0),e.dragData.didDrag=!0;var M=[];e.hoverData.draggingEles||m(c.collection(S),{inDragLayer:!0});for(var I=0;I<S.length;I++){var F=S[I];if(e.nodeIsDraggable(F)&&F.grabbed()){var L=F.position();if(M.push(F),r.number(E[0])&&r.number(E[1])){var W=!F.isParent();if(W&&(L.x+=E[0],L.y+=E[1]),_){var U=e.hoverData.dragDelta;W&&U&&r.number(U[0])&&r.number(U[1])&&(L.x+=U[0],L.y+=U[1])}}}}e.hoverData.draggingEles=!0;var G=c.collection(M);G.dirtyCompoundBoundsCache(),G.trigger("position drag"),e.redrawHint("drag",!0),e.redraw()}else T();l=!0}else y&&(e.hoverData.dragging||!c.boxSelectionEnabled()||!k&&c.panningEnabled()&&c.userPanningEnabled()?!e.hoverData.selecting&&c.panningEnabled()&&c.userPanningEnabled()&&s(x,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,g[4]=0,e.data.bgActivePosistion=o.array2point(f),e.redrawHint("select",!0),e.redraw()):D(),x&&x.isEdge()&&x.active()&&x.unactivate());return g[2]=p[0],g[3]=p[1],l?(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),!1):void 0}}),!1),e.registerBinding(window,"mouseup",(function(r){if(e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(r.clientX,r.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),c=e.dragData.possibleDragElements,u=e.hoverData.down,d=n(r);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,u&&u.unactivate(),3===e.hoverData.which){var p=new a(r,{type:"cxttapend",position:{x:o[0],y:o[1]}});if(u?u.trigger(p):i.trigger(p),!e.hoverData.cxtDragged){var f=new a(r,{type:"cxttap",position:{x:o[0],y:o[1]}});u?u.trigger(f):i.trigger(f)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(null!=u||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||n(r)||(i.$((function(e){return e.selected()})).unselect(),c.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=c=[]),t(l,["mouseup","tapend","vmouseup"],r,{position:{x:o[0],y:o[1]}}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||t(u,["click","tap","vclick"],r,{position:{x:o[0],y:o[1]}}),l!=u||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||d?l.selected()?l.unselect():l.select():d||(i.$(":selected").unmerge(l).unselect(),l.select())),e.redrawHint("eles",!0)),e.hoverData.selecting){var h=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),h.length>0&&e.redrawHint("eles",!0),i.trigger("boxend");var g=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()||d||i.$(":selected").unmerge(h).unselect(),h.trigger("box").stdFilter(g).select().trigger("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var v=u&&u.grabbed();b(c),v&&u.trigger("free")}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var O=function(t){if(!e.scrollingPage){var n,r=e.cy,i=e.projectIntoViewport(t.clientX,t.clientY),o=[i[0]*r.zoom()+r.pan().x,i[1]*r.zoom()+r.pan().y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||V())return void t.preventDefault();r.panningEnabled()&&r.userPanningEnabled()&&r.zoomingEnabled()&&r.userZoomingEnabled()&&(t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),n=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,n*=e.wheelSensitivity,1===t.deltaMode&&(n*=33),r.zoom({level:r.zoom()*Math.pow(10,n),renderedPosition:{x:o[0],y:o[1]}}))}};e.registerBinding(e.container,"wheel",O,!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.trigger(new a(t,{type:"mouseout",position:{x:n[0],y:n[1]}}))}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.trigger(new a(t,{type:"mouseover",position:{x:n[0],y:n[1]}}))}),!1);var A,k,T,D,N,P,B,_,M,I,F,L,W,U,G,z,Q,j=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},Y=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",U=function(n){if(R(n)){e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,i=e.touchData.now,o=e.touchData.earlier;if(n.touches[0]){var s=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);i[0]=s[0],i[1]=s[1]}if(n.touches[1]&&(s=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),i[2]=s[0],i[3]=s[1]),n.touches[2]&&(s=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),i[4]=s[0],i[5]=s[1]),n.touches[1]){b(e.dragData.touchDragEles);var l=e.findContainerClientCoords();M=l[0],I=l[1],F=l[2],L=l[3],A=n.touches[0].clientX-M,k=n.touches[0].clientY-I,T=n.touches[1].clientX-M,D=n.touches[1].clientY-I,W=0<=A&&A<=F&&0<=T&&T<=F&&0<=k&&k<=L&&0<=D&&D<=L;var c=r.pan(),u=r.zoom();N=j(A,k,T,D),P=Y(A,k,T,D),_=[((B=[(A+T)/2,(k+D)/2])[0]-c.x)/u,(B[1]-c.y)/u];var d=200;if(P<d*d&&!n.touches[2]){var p=e.findNearestElement(i[0],i[1],!0,!0),h=e.findNearestElement(i[2],i[3],!0,!0);return p&&p.isNode()?(p.activate().trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start=p):h&&h.isNode()?(h.activate().trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start=h):r.trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(n.touches[2]);else if(n.touches[1]);else if(n.touches[0]){var g=e.findNearestElements(i[0],i[1],!0,!0),v=g[0];if(null!=v&&(v.activate(),e.touchData.start=v,e.touchData.starts=g,e.nodeIsGrabbable(v))){var C=e.dragData.touchDragEles=[],x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),v.selected()?(x=r.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),m(x,{addToList:C})):y(v,{addToList:C}),f(v);var E=function(e){return new a(n,{type:e,position:{x:i[0],y:i[1]}})};v.trigger(E("grabon")),x?x.forEach((function(e){e.trigger(E("grab"))})):v.trigger(E("grab"))}t(v,["touchstart","tapstart","vmousedown"],n,{position:{x:i[0],y:i[1]}}),null==v&&(e.data.bgActivePosistion={x:s[0],y:s[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||(t(e.touchData.start,["taphold"],n,{position:{x:i[0],y:i[1]}}),e.touchData.start||r.$(":selected").unselect())}),e.tapholdDuration)}if(n.touches.length>=1){for(var S=e.touchData.startPosition=[],w=0;w<i.length;w++)S[w]=o[w]=i[w];var V=n.touches[0];e.touchData.startGPosition=[V.clientX,V.clientY]}}},!1),e.registerBinding(window,"touchmove",G=function(n){var i=e.touchData.capture;if(i||R(n)){var l=e.selection,c=e.cy,u=e.touchData.now,d=e.touchData.earlier,p=c.zoom();if(n.touches[0]){var f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);u[0]=f[0],u[1]=f[1]}n.touches[1]&&(f=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),u[2]=f[0],u[3]=f[1]),n.touches[2]&&(f=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),u[4]=f[0],u[5]=f[1]);var h,g=e.touchData.startGPosition;if(i&&n.touches[0]&&g){for(var v=[],y=0;y<u.length;y++)v[y]=u[y]-d[y];var C=n.touches[0].clientX-g[0],x=C*C,E=n.touches[0].clientY-g[1];h=x+E*E>=e.touchTapThreshold2}if(i&&e.touchData.cxt){n.preventDefault();var S=n.touches[0].clientX-M,w=n.touches[0].clientY-I,V=n.touches[1].clientX-M,O=n.touches[1].clientY-I,B=Y(S,w,V,O),F=150,L=1.5;if(B/P>=L*L||B>=F*F){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var U=new a(n,{type:"cxttapend",position:{x:u[0],y:u[1]}});e.touchData.start?(e.touchData.start.unactivate().trigger(U),e.touchData.start=null):c.trigger(U)}}if(i&&e.touchData.cxt){U=new a(n,{type:"cxtdrag",position:{x:u[0],y:u[1]}}),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.trigger(U):c.trigger(U),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var G=e.findNearestElement(u[0],u[1],!0,!0);e.touchData.cxtOver&&G===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.trigger(new a(n,{type:"cxtdragout",position:{x:u[0],y:u[1]}})),e.touchData.cxtOver=G,G&&G.trigger(new a(n,{type:"cxtdragover",position:{x:u[0],y:u[1]}})))}else if(i&&n.touches[2]&&c.boxSelectionEnabled())n.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||c.trigger("boxstart"),e.touchData.selecting=!0,e.redrawHint("select",!0),l&&0!==l.length&&void 0!==l[0]?(l[2]=(u[0]+u[2]+u[4])/3,l[3]=(u[1]+u[3]+u[5])/3):(l[0]=(u[0]+u[2]+u[4])/3,l[1]=(u[1]+u[3]+u[5])/3,l[2]=(u[0]+u[2]+u[4])/3+1,l[3]=(u[1]+u[3]+u[5])/3+1),l[4]=1,e.touchData.selecting=!0,e.redraw();else if(i&&n.touches[1]&&c.zoomingEnabled()&&c.panningEnabled()&&c.userZoomingEnabled()&&c.userPanningEnabled()){if(n.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),re=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var z=0;z<re.length;z++){var Q=re[z]._private;Q.grabbed=!1,Q.rscratch.inDragLayer=!1}}S=n.touches[0].clientX-M,w=n.touches[0].clientY-I,V=n.touches[1].clientX-M,O=n.touches[1].clientY-I;var H=j(S,w,V,O),J=H/N;if(W){var Z=(S-A+(V-T))/2,X=(w-k+(O-D))/2,q=c.zoom(),K=q*J,$=c.pan(),ee=_[0]*q+$.x,te=_[1]*q+$.y,ne={x:-K/q*(ee-$.x-Z)+ee,y:-K/q*(te-$.y-X)+te};if(e.touchData.start&&e.touchData.start.active()){var re=e.dragData.touchDragEles;b(re),e.redrawHint("drag",!0),e.redrawHint("eles",!0),e.touchData.start.unactivate().trigger("free")}c.viewport({zoom:K,pan:ne,cancelOnFailedZoom:!0}),N=H,A=S,k=w,T=V,D=O,e.pinching=!0}n.touches[0]&&(f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY),u[0]=f[0],u[1]=f[1]),n.touches[1]&&(f=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),u[2]=f[0],u[3]=f[1]),n.touches[2]&&(f=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),u[4]=f[0],u[5]=f[1])}else if(n.touches[0]){var ie=e.touchData.start,oe=e.touchData.last;if(e.hoverData.draggingEles||e.swipePanning||(G=e.findNearestElement(u[0],u[1],!0,!0)),i&&null!=ie&&n.preventDefault(),i&&null!=ie&&e.nodeIsDraggable(ie))if(h){re=e.dragData.touchDragEles;var ae=!e.dragData.didDrag;ae&&m(c.collection(re),{inDragLayer:!0});for(var se=0;se<re.length;se++){var le=re[se];if(e.nodeIsDraggable(le)&&le.grabbed()){e.dragData.didDrag=!0;var ce=le.position(),ue=!le.isParent();if(ue&&r.number(v[0])&&r.number(v[1])&&(ce.x+=v[0],ce.y+=v[1]),ae){e.redrawHint("eles",!0);var de=e.touchData.dragDelta;ue&&de&&r.number(de[0])&&r.number(de[1])&&(ce.x+=de[0],ce.y+=de[1])}}}var pe=c.collection(re);pe.dirtyCompoundBoundsCache(),pe.trigger("position drag"),e.hoverData.draggingEles=!0,e.redrawHint("drag",!0),e.touchData.startPosition[0]==d[0]&&e.touchData.startPosition[1]==d[1]&&e.redrawHint("eles",!0),e.redraw()}else 0===(de=e.touchData.dragDelta=e.touchData.dragDelta||[]).length?(de.push(v[0]),de.push(v[1])):(de[0]+=v[0],de[1]+=v[1]);if(t(ie||G,["touchmove","tapdrag","vmousemove"],n,{position:{x:u[0],y:u[1]}}),ie&&ie.grabbed()||G==oe||(oe&&oe.trigger(new a(n,{type:"tapdragout",position:{x:u[0],y:u[1]}})),G&&G.trigger(new a(n,{type:"tapdragover",position:{x:u[0],y:u[1]}}))),e.touchData.last=G,i)for(z=0;z<u.length;z++)u[z]&&e.touchData.startPosition[z]&&h&&(e.touchData.singleTouchMoved=!0);i&&(null==ie||ie.isEdge())&&c.panningEnabled()&&c.userPanningEnabled()&&(s(ie,e.touchData.starts)&&(n.preventDefault(),e.swipePanning?c.panBy({x:v[0]*p,y:v[1]*p}):h&&(e.swipePanning=!0,c.panBy({x:C*p,y:E*p}),ie&&(ie.unactivate(),e.data.bgActivePosistion||(e.data.bgActivePosistion=o.array2point(e.touchData.startPosition)),e.redrawHint("select",!0),e.touchData.start=null))),f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY),u[0]=f[0],u[1]=f[1])}for(y=0;y<u.length;y++)d[y]=u[y]}},!1),e.registerBinding(window,"touchcancel",z=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",Q=function(n){var r=e.touchData.start;if(e.touchData.capture){e.touchData.capture=!1,n.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),c=e.touchData.now,u=e.touchData.earlier;if(n.touches[0]){var d=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);c[0]=d[0],c[1]=d[1]}if(n.touches[1]&&(d=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),c[2]=d[0],c[3]=d[1]),n.touches[2]&&(d=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),c[4]=d[0],c[5]=d[1]),r&&r.unactivate(),e.touchData.cxt){if(o=new a(n,{type:"cxttapend",position:{x:c[0],y:c[1]}}),r?r.trigger(o):s.trigger(o),!e.touchData.cxtDragged){var p=new a(n,{type:"cxttap",position:{x:c[0],y:c[1]}});r?r.trigger(p):s.trigger(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!n.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var f=s.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),s.trigger("boxend");var h=function(e){return e.selectable()&&!e.selected()};f.trigger("box").stdFilter(h).select().trigger("boxselect"),f.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=r&&r.unactivate(),n.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(n.touches[1]);else if(n.touches[0]);else if(!n.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=r){var v=r._private.grabbed;b(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&r.trigger("free"),t(r,["touchend","tapend","vmouseup","tapdragout"],n,{position:{x:c[0],y:c[1]}}),r.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(c[0],c[1],!0,!0);t(m,["touchend","tapend","vmouseup","tapdragout"],n,{position:{x:c[0],y:c[1]}})}var y=e.touchData.startPosition[0]-c[0],C=y*y,x=e.touchData.startPosition[1]-c[1],E=(C+x*x)*l*l;null!=r&&!e.dragData.didDrag&&r._private.selectable&&E<e.touchTapThreshold2&&!e.pinching&&("single"===s.selectionType()?(s.$(":selected").unmerge(r).unselect(),r.select()):r.selected()?r.unselect():r.select(),e.redrawHint("eles",!0)),e.touchData.singleTouchMoved||t(r,["tap","vclick"],n,{position:{x:c[0],y:c[1]}}),e.touchData.singleTouchMoved=!0}for(var S=0;S<c.length;S++)u[S]=c[S];e.dragData.didDrag=!1,0===n.touches.length&&(e.touchData.dragDelta=[],e.touchData.startPosition=null,e.touchData.startGPosition=null),n.touches.length<2&&(e.pinching=!1,e.redrawHint("eles",!0),e.redraw())}},!1),"undefined"==typeof TouchEvent){var H=[],J=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},Z=function(e){return{event:e,touch:J(e)}},X=function(e){H.push(Z(e))},q=function(e){for(var t=0;t<H.length;t++)if(H[t].event.pointerId===e.pointerId)return void H.splice(t,1)},K=function(e){var t=H.filter((function(t){return t.event.pointerId===e.pointerId}))[0];t.event=e,t.touch=J(e)},$=function(e){e.touches=H.map((function(e){return e.touch}))};e.registerBinding(e.container,"pointerdown",(function(e){"mouse"!==e.pointerType&&(e.preventDefault(),X(e),$(e),U(e))})),e.registerBinding(e.container,"pointerup",(function(e){"mouse"!==e.pointerType&&(q(e),$(e),Q(e))})),e.registerBinding(e.container,"pointercancel",(function(e){"mouse"!==e.pointerType&&(q(e),$(e),z(e))})),e.registerBinding(e.container,"pointermove",(function(e){"mouse"!==e.pointerType&&(e.preventDefault(),K(e),$(e),G(e))}))}}};t.exports=s},{"../../../event":45,"../../../is":91,"../../../math":93,"../../../util":108}],71:[function(e,t,n){"use strict";var r=e("../../../math"),i=(e("../../../util"),{});i.generatePolygon=function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl("polygon",e,t,n,r,i,this.points)},intersectLine:function(e,t,n,i,o,a,s){return r.polygonIntersectLine(o,a,this.points,e,t,n/2,i/2,s)},checkPoint:function(e,t,n,i,o,a,s){return r.pointInsidePolygon(e,t,this.points,a,s,i,o,[0,-1],n)}}},i.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,i,o,a,s){return r.intersectLineEllipse(o,a,e,t,n/2+s,i/2+s)},checkPoint:function(e,t,n,r,i,o,a){return e-=o,t-=a,(e/=r/2+n)*e+(t/=i/2+n)*t<=1}}},i.generateRoundRectangle=function(){return this.nodeShapes.roundrectangle={renderer:this,name:"roundrectangle",points:r.generateUnitNgonPointsFitToSquare(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,i,o,a,s){return r.roundRectangleIntersectLine(o,a,e,t,n,i,s)},checkPoint:function(e,t,n,i,o,a,s){var l=r.getRoundRectangleRadius(i,o);if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-2*l,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-2*l,o,[0,-1],n))return!0;var c=function(e,t,n,r,i,o,a){return e-=n,t-=r,(e/=i/2+a)*e+(t/=o/2+a)*t<=1};return!!(c(e,t,a-i/2+l,s-o/2+l,2*l,2*l,n)||c(e,t,a+i/2-l,s-o/2+l,2*l,2*l,n)||c(e,t,a+i/2-l,s+o/2-l,2*l,2*l,n)||c(e,t,a-i/2+l,s+o/2-l,2*l,2*l,n))}}},i.generateCutRectangle=function(){return this.nodeShapes.cutrectangle={renderer:this,name:"cutrectangle",cornerLength:r.getCutRectangleCornerLength(),points:r.generateUnitNgonPointsFitToSquare(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},generateCutTrianglePts:function(e,t,n,r){var i=this.cornerLength,o=t/2,a=e/2,s=n-a,l=n+a,c=r-o,u=r+o;return{topLeft:[s,c+i,s+i,c,s+i,c+i],topRight:[l-i,c,l,c+i,l-i,c+i],bottomRight:[l,u-i,l-i,u,l-i,u-i],bottomLeft:[s+i,u,s,u-i,s+i,u-i]}},intersectLine:function(e,t,n,i,o,a,s){var l=this.generateCutTrianglePts(n+2*s,i+2*s,e,t),c=[].concat.apply([],[l.topLeft.splice(0,4),l.topRight.splice(0,4),l.bottomRight.splice(0,4),l.bottomLeft.splice(0,4)]);return r.polygonIntersectLine(o,a,c,e,t)},checkPoint:function(e,t,n,i,o,a,s){if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-2*this.cornerLength,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-2*this.cornerLength,o,[0,-1],n))return!0;var l=this.generateCutTrianglePts(i,o,a,s);return r.pointInsidePolygonPoints(e,t,l.topLeft)||r.pointInsidePolygonPoints(e,t,l.topRight)||r.pointInsidePolygonPoints(e,t,l.bottomRight)||r.pointInsidePolygonPoints(e,t,l.bottomLeft)}}},i.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",r.generateUnitNgonPointsFitToSquare(3,0)),this.generatePolygon("rectangle",r.generateUnitNgonPointsFitToSquare(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generatePolygon("diamond",[0,1,1,0,0,-1,-1,0]),this.generatePolygon("pentagon",r.generateUnitNgonPointsFitToSquare(5,0)),this.generatePolygon("hexagon",r.generateUnitNgonPointsFitToSquare(6,0)),this.generatePolygon("heptagon",r.generateUnitNgonPointsFitToSquare(7,0)),this.generatePolygon("octagon",r.generateUnitNgonPointsFitToSquare(8,0));var n=new Array(20),i=r.generateUnitNgonPoints(5,0),o=r.generateUnitNgonPoints(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=r.fitPolygonToSquare(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]),e.makePolygon=function(e){var n,r="polygon-"+e.join("$");return(n=this[r])?n:t.generatePolygon(r,e)}},t.exports=i},{"../../../math":93,"../../../util":108}],72:[function(e,t,n){"use strict";var r=e("../../../util"),i={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||r.staticEmptyObject();var t=this;void 0===t.averageRedrawTime&&(t.averageRedrawTime=0),void 0===t.lastRedrawTime&&(t.lastRedrawTime=0),void 0===t.lastDrawTime&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=e},beforeRender:function(e,t){if(!this.destroyed){t=t||0;var n=this.beforeRenderCallbacks;n.push({fn:e,priority:t}),n.sort((function(e,t){return t.priority-e.priority}))}}},o=function(e,t,n){for(var r=e.beforeRenderCallbacks,i=0;i<r.length;i++)r[i].fn(t,n)};i.startRenderLoop=function(){var e=this;if(!e.renderLoopStarted){e.renderLoopStarted=!0;var t=function(n){if(!e.destroyed){if(e.requestedFrame&&!e.skipFrame){o(e,!0,n);var i=r.performanceNow();e.render(e.renderOptions);var a=e.lastDrawTime=r.performanceNow();void 0===e.averageRedrawTime&&(e.averageRedrawTime=a-i),void 0===e.redrawCount&&(e.redrawCount=0),e.redrawCount++,void 0===e.redrawTotalTime&&(e.redrawTotalTime=0);var s=a-i;e.redrawTotalTime+=s,e.lastRedrawTime=s,e.averageRedrawTime=e.averageRedrawTime/2+s/2,e.requestedFrame=!1}else o(e,!1,n);e.skipFrame=!1,r.requestAnimationFrame(t)}};r.requestAnimationFrame(t)}},t.exports=i},{"../../../util":108}],73:[function(e,t,n){"use strict";var r,i={arrowShapeImpl:function(e){return(r||(r={polygon:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}},"triangle-backcurve":function(e,t,n){for(var r,i=0;i<t.length;i++){var o=t[i];0===i&&(r=o),e.lineTo(o.x,o.y)}e.quadraticCurveTo(n.x,n.y,r.x,r.y)},"triangle-tee":function(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var o=r[i];e.lineTo(o.x,o.y)}e.closePath&&e.closePath(),e.beginPath&&e.beginPath();var a=n,s=n[0];for(e.moveTo(s.x,s.y),i=0;i<a.length;i++)o=a[i],e.lineTo(o.x,o.y);e.closePath&&e.closePath()},"triangle-cross":function(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var o=r[i];e.lineTo(o.x,o.y)}e.closePath&&e.closePath(),e.beginPath&&e.beginPath();var a=n,s=n[0];for(e.moveTo(s.x,s.y),i=0;i<a.length;i++)o=a[i],e.lineTo(o.x,o.y);e.closePath&&e.closePath()},circle:function(e,t,n,r){e.arc(t,n,r,0,2*Math.PI,!1)}}))[e]}};t.exports=i},{}],74:[function(e,t,n){"use strict";var r={drawEdge:function(e,t,n,r,i){var o=t._private.rscratch,a=this.usePaths();if(!o.badLine&&!isNaN(o.allpts[0])&&t.visible()){var s;n&&(s=n,e.translate(-s.x1,-s.y1));var l=t.pstyle("overlay-padding").pfValue,c=t.pstyle("overlay-opacity").value,u=t.pstyle("overlay-color").value;if(i){if(0===c)return;this.strokeStyle(e,u[0],u[1],u[2],c),e.lineCap="round","self"!=o.edgeType||a||(e.lineCap="butt")}else{var d=t.pstyle("line-color").value;this.strokeStyle(e,d[0],d[1],d[2],t.pstyle("opacity").value),e.lineCap="butt"}e.lineJoin="round";var p=t.pstyle("width").pfValue+(i?2*l:0),f=i?"solid":t.pstyle("line-style").value;e.lineWidth=p,this.drawEdgePath(t,e,o.allpts,f,p),this.drawArrowheads(e,t,i),i||this.drawEdge(e,t,!1,r,!0),this.drawElementText(e,t,r),n&&e.translate(s.x1,s.y1)}},drawEdgePath:function(e,t,n,r,i){var o,a=e._private.rscratch,s=t,l=!1,c=this.usePaths();if(c){var u=n.join("$");a.pathCacheKey&&a.pathCacheKey===u?(o=t=a.pathCache,l=!0):(o=t=new Path2D,a.pathCacheKey=u,a.pathCache=o)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash([6,3]);break;case"solid":s.setLineDash([])}if(!l&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+3<n.length;d+=4)t.quadraticCurveTo(n[d],n[d+1],n[d+2],n[d+3]);break;case"straight":case"segments":case"haystack":for(d=2;d+1<n.length;d+=2)t.lineTo(n[d],n[d+1])}t=s,c?t.stroke(o):t.stroke(),t.setLineDash&&t.setLineDash([])},drawArrowheads:function(e,t,n){if(!n){var r=t._private.rscratch,i="haystack"===r.edgeType;i||this.drawArrowhead(e,t,"source",r.arrowStartX,r.arrowStartY,r.srcArrowAngle),this.drawArrowhead(e,t,"mid-target",r.midX,r.midY,r.midtgtArrowAngle),this.drawArrowhead(e,t,"mid-source",r.midX,r.midY,r.midsrcArrowAngle),i||this.drawArrowhead(e,t,"target",r.arrowEndX,r.arrowEndY,r.tgtArrowAngle)}},drawArrowhead:function(e,t,n,r,i,o){if(!(isNaN(r)||null==r||isNaN(i)||null==i||isNaN(o)||null==o)){var a=this,s=t.pstyle(n+"-arrow-shape").value;if("none"!==s){var l="hollow"===t.pstyle(n+"-arrow-fill").value?"both":"filled",c=t.pstyle(n+"-arrow-fill").value,u=t.pstyle("width").pfValue,d=t.pstyle("opacity").value,p=e.globalCompositeOperation;a.arrowShapes[s].forceStroke&&"filled"===c&&(c="both"),1===d&&"hollow"!==c||(e.globalCompositeOperation="destination-out",a.fillStyle(e,255,255,255,1),a.strokeStyle(e,255,255,255,1),a.drawArrowShape(t,n,e,l,u,s,r,i,o),e.globalCompositeOperation=p);var f=t.pstyle(n+"-arrow-color").value;a.fillStyle(e,f[0],f[1],f[2],d),a.strokeStyle(e,f[0],f[1],f[2],d),a.drawArrowShape(t,n,e,c,u,s,r,i,o)}}},drawArrowShape:function(e,t,n,r,i,o,a,s,l){var c,u=this,d=this.usePaths(),p=e._private.rscratch,f=!1,h=n,g={x:a,y:s},v=e.pstyle("arrow-scale").value,m=this.getArrowWidth(i,v),y=u.arrowShapes[o];if(d){var b=m+"$"+o+"$"+l+"$"+a+"$"+s;p.arrowPathCacheKey=p.arrowPathCacheKey||{},p.arrowPathCache=p.arrowPathCache||{},p.arrowPathCacheKey[t]===b?(c=n=p.arrowPathCache[t],f=!0):(c=n=new Path2D,p.arrowPathCacheKey[t]=b,p.arrowPathCache[t]=c)}n.beginPath&&n.beginPath(),f||y.draw(n,m,l,g,i),!y.leavePathOpen&&n.closePath&&n.closePath(),n=h,"filled"!==r&&"both"!==r||(d?n.fill(c):n.fill()),"hollow"!==r&&"both"!==r||(n.lineWidth=y.matchEdgeWidth?i:1,n.lineJoin="miter",d?n.stroke(c):n.stroke())}};t.exports=r},{}],75:[function(e,t,n){"use strict";var r=e("../../../math"),i={drawElement:function(e,t,n,r){var i=this;t.isNode()?i.drawNode(e,t,n,r):i.drawEdge(e,t,n,r)},drawCachedElement:function(e,t,n,i){var o=this,a=t.boundingBox();if(0!==a.w&&0!==a.h&&(!i||r.boundingBoxesIntersect(a,i))){var s=o.data.eleTxrCache.getElement(t,a,n);s?e.drawImage(s.texture.canvas,s.x,0,s.width,s.height,a.x1,a.y1,a.w,a.h):o.drawElement(e,t)}},drawElements:function(e,t){for(var n=this,r=0;r<t.length;r++){var i=t[r];n.drawElement(e,i)}},drawCachedElements:function(e,t,n,r){for(var i=this,o=0;o<t.length;o++){var a=t[o];i.drawCachedElement(e,a,n,r)}},drawCachedNodes:function(e,t,n,r){for(var i=this,o=0;o<t.length;o++){var a=t[o];a.isNode()&&i.drawCachedElement(e,a,n,r)}},drawLayeredElements:function(e,t,n,r){var i=this,o=i.data.lyrTxrCache.getLayers(t,n);if(o)for(var a=0;a<o.length;a++){var s=o[a],l=s.bb;0!==l.w&&0!==l.h&&e.drawImage(s.canvas,l.x1,l.y1,l.w,l.h)}else i.drawCachedElements(e,t,n,r)},drawDebugPoints:function(e,t){for(var n=function(t,n,r){e.fillStyle=r,e.fillRect(t-1,n-1,3,3)},r=0;r<t.length;r++){var i=t[r],o=i._private.rscratch;if(i.isNode()){var a=i.position();n(a.x,a.y,"magenta")}else{for(var s=o.allpts,l=0;l+1<s.length;l+=2)n(s[l],s[l+1],"cyan");n(o.midX,o.midY,"yellow")}}}};t.exports=i},{"../../../math":93}],76:[function(e,t,n){"use strict";var r={safeDrawImage:function(e,t,n,r,i,o,a,s,l,c){i<=0||o<=0||l<=0||c<=0||e.drawImage(t,n,r,i,o,a,s,l,c)},drawInscribedImage:function(e,t,n,r){var i=this,o=n.position(),a=o.x,s=o.y,l=n.cy().style(),c=l.getIndexedStyle.bind(l),u=c(n,"background-fit","value",r),d=c(n,"background-repeat","value",r),p=n.width(),f=n.height(),h=2*n.padding(),g=p+("inner"===c(n,"background-width-relative-to","value",r)?0:h),v=f+("inner"===c(n,"background-height-relative-to","value",r)?0:h),m=n._private.rscratch,y="node"===n.pstyle("background-clip").value,b=c(n,"background-image-opacity","value",r),C=t.width||t.cachedW,x=t.height||t.cachedH;null!=C&&null!=x||(document.body.appendChild(t),C=t.cachedW=t.width||t.offsetWidth,x=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var E=C,S=x;if("auto"!==c(n,"background-width","value",r)&&(E="%"===c(n,"background-width","units",r)?c(n,"background-width","pfValue",r)*g:c(n,"background-width","pfValue",r)),"auto"!==c(n,"background-height","value",r)&&(S="%"===c(n,"background-height","units",r)?c(n,"background-height","pfValue",r)*v:c(n,"background-height","pfValue",r)),0!==E&&0!==S){if("contain"===u)E*=w=Math.min(g/E,v/S),S*=w;else if("cover"===u){var w;E*=w=Math.max(g/E,v/S),S*=w}var V=a-g/2;V+="%"===c(n,"background-position-x","units",r)?(g-E)*c(n,"background-position-x","pfValue",r):c(n,"background-position-x","pfValue",r);var R=s-v/2;R+="%"===c(n,"background-position-y","units",r)?(v-S)*c(n,"background-position-y","pfValue",r):c(n,"background-position-y","pfValue",r),m.pathCache&&(V-=a,R-=s,a=0,s=0);var O=e.globalAlpha;if(e.globalAlpha=b,"no-repeat"===d)y&&(e.save(),m.pathCache?e.clip(m.pathCache):(i.nodeShapes[i.getNodeShape(n)].draw(e,a,s,g,v),e.clip())),i.safeDrawImage(e,t,0,0,C,x,V,R,E,S),y&&e.restore();else{var A=e.createPattern(t,d);e.fillStyle=A,i.nodeShapes[i.getNodeShape(n)].draw(e,a,s,g,v),e.translate(V,R),e.fill(),e.translate(-V,-R)}e.globalAlpha=O}}};t.exports=r},{}],77:[function(e,t,n){"use strict";function r(e,t,n,r,i,o){o=o||5,e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath(),e.fill()}var i=e("../../../util"),o=e("../../../math"),a={eleTextBiggerThanMin:function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(o.log2(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(e,t,n){var r=this;if(void 0===n){if(!r.eleTextBiggerThanMin(t))return}else if(!n)return;if(t.isNode()){if(!(o=t.pstyle("label"))||!o.value)return;var i=t.pstyle("text-halign").strValue;switch(t.pstyle("text-valign").strValue,i){case"left":e.textAlign="right";break;case"right":e.textAlign="left";break;default:e.textAlign="center"}e.textBaseline="bottom"}else{var o=t.pstyle("label"),a=t.pstyle("source-label"),s=t.pstyle("target-label");if(!(o&&o.value||a&&a.value||s&&s.value))return;e.textAlign="center",e.textBaseline="bottom"}r.drawText(e,t),t.isEdge()&&(r.drawText(e,t,"source"),r.drawText(e,t,"target"))}};a.drawNodeText=a.drawEdgeText=a.drawElementText,a.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if((t=this.fontCaches[n]).context===e)return t;return t={context:e},this.fontCaches.push(t),t},a.setupTextStyle=function(e,t){var n=t.effectiveOpacity(),r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",o=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=t.pstyle("text-opacity").value*t.pstyle("opacity").value*n,l=t.pstyle("text-outline-opacity").value*s,c=t.pstyle("color").value,u=t.pstyle("text-outline-color").value,d=t._private.fontKey,p=this.getFontCache(e);p.key!==d&&(e.font=r+" "+a+" "+i+" "+o,p.key=d),e.lineJoin="round",this.fillStyle(e,c[0],c[1],c[2],s),this.strokeStyle(e,u[0],u[1],u[2],l)},a.drawText=function(e,t,n){var o=t._private.rscratch,a=t.effectiveOpacity();if(0!==a&&0!==t.pstyle("text-opacity").value){var s=i.getPrefixedProperty(o,"labelX",n),l=i.getPrefixedProperty(o,"labelY",n),c=this.getLabelText(t,n);if(null!=c&&""!==c&&!isNaN(s)&&!isNaN(l)){this.setupTextStyle(e,t);var u=n?n+"-":"",d=i.getPrefixedProperty(o,"labelWidth",n),p=i.getPrefixedProperty(o,"labelHeight",n),f=i.getPrefixedProperty(o,"labelAngle",n),h=t.pstyle(u+"text-margin-x").pfValue,g=t.pstyle(u+"text-margin-y").pfValue,v=t.isEdge(),m=(t.isNode(),t.pstyle("text-halign").value),y=t.pstyle("text-valign").value;v&&(m="center",y="center"),s+=h,l+=g;var b,C=t.pstyle("text-rotation");if(0!==(b="autorotate"===C.strValue?v?f:0:"none"===C.strValue?0:C.pfValue)){var x=s,E=l;e.translate(x,E),e.rotate(b),s=0,l=0}switch(y){case"top":break;case"center":l+=p/2;break;case"bottom":l+=p}var S=t.pstyle("text-background-opacity").value,w=t.pstyle("text-border-opacity").value,V=t.pstyle("text-border-width").pfValue,R=t.pstyle("text-background-padding").pfValue;if(S>0||V>0&&w>0){var O=s-R;switch(m){case"left":O-=d;break;case"center":O-=d/2}var A=l-p-R,k=d+2*R,T=p+2*R;if(S>0){var D=e.fillStyle,N=t.pstyle("text-background-color").value;e.fillStyle="rgba("+N[0]+","+N[1]+","+N[2]+","+S*a+")","roundrectangle"==t.pstyle("text-background-shape").strValue?r(e,O,A,k,T,2):e.fillRect(O,A,k,T),e.fillStyle=D}if(V>0&&w>0){var P=e.strokeStyle,B=e.lineWidth,_=t.pstyle("text-border-color").value,M=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+_[0]+","+_[1]+","+_[2]+","+w*a+")",e.lineWidth=V,e.setLineDash)switch(M){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=V/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(O,A,k,T),"double"===M){var I=V/2;e.strokeRect(O+I,A+I,k-2*I,T-2*I)}e.setLineDash&&e.setLineDash([]),e.lineWidth=B,e.strokeStyle=P}}var F=2*t.pstyle("text-outline-width").pfValue;if(F>0&&(e.lineWidth=F),"wrap"===t.pstyle("text-wrap").value){var L=i.getPrefixedProperty(o,"labelWrapCachedLines",n),W=p/L.length;switch(y){case"top":case"center":case"bottom":l-=(L.length-1)*W}for(var U=0;U<L.length;U++)F>0&&e.strokeText(L[U],s,l),e.fillText(L[U],s,l),l+=W}else F>0&&e.strokeText(c,s,l),e.fillText(c,s,l);0!==b&&(e.rotate(-b),e.translate(-x,-E))}}},t.exports=a},{"../../../math":93,"../../../util":108}],78:[function(e,t,n){"use strict";var r=e("../../../is"),i={drawNode:function(e,t,n,i){var o,a,s=this,l=t._private.rscratch,c=t._private,u=u||t.position();if(r.number(u.x)&&r.number(u.y)&&t.visible()){var d,p,f=t.effectiveOpacity(),h=this.usePaths(),g=!1,v=t.padding();o=t.width()+2*v,a=t.height()+2*v,e.lineWidth=t.pstyle("border-width").pfValue,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m,y=t.pstyle("background-image").value,b=[],C=[],x=y.length,E=0;E<x;E++)if(m=y[E],b[E]=null!=m&&"none"!==m,b[E]){var S=t.cy().style().getIndexedStyle(t,"background-image-crossorigin","value",E);C[E]=this.getCachedImage(m,S,(function(){t.rtrigger("background")}))}var w=t.pstyle("background-color").value,V=t.pstyle("border-color").value,R=t.pstyle("border-style").value;if(this.fillStyle(e,w[0],w[1],w[2],t.pstyle("background-opacity").value*f),this.strokeStyle(e,V[0],V[1],V[2],t.pstyle("border-opacity").value*f),e.lineJoin="miter",e.setLineDash)switch(R){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var O=t.pstyle("shape").strValue,A=t.pstyle("shape-polygon-points").pfValue;if(h){var k=O+"$"+o+"$"+a+("polygon"===O?"$"+A.join("$"):"");e.translate(u.x,u.y),l.pathCacheKey===k?(d=l.pathCache,g=!0):(d=new Path2D,l.pathCacheKey=k,l.pathCache=d)}if(!g){var T=u;h&&(T={x:0,y:0}),s.nodeShapes[this.getNodeShape(t)].draw(d||e,T.x,T.y,o,a)}h?e.fill(d):e.fill();var D=c.backgrounding,N=0;for(E=0;E<x;E++)b[E]&&C[E].complete&&(N++,this.drawInscribedImage(e,C[E],t,E));c.backgrounding=!(N===x),D!==c.backgrounding&&t.updateStyle(!1);var P=t.pstyle("background-blacken").value,B=t.pstyle("border-width").pfValue;if(this.hasPie(t)&&(this.drawPie(e,t,f),0===P&&0===B||h||s.nodeShapes[this.getNodeShape(t)].draw(e,u.x,u.y,o,a)),P>0?(this.fillStyle(e,0,0,0,P),h?e.fill(d):e.fill()):P<0&&(this.fillStyle(e,255,255,255,-P),h?e.fill(d):e.fill()),B>0&&(h?e.stroke(d):e.stroke(),"double"===R)){e.lineWidth=t.pstyle("border-width").pfValue/3;var _=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",h?e.stroke(d):e.stroke(),e.globalCompositeOperation=_}h&&e.translate(-u.x,-u.y),e.setLineDash&&e.setLineDash([]),s.drawElementText(e,t,i);var M=t.pstyle("overlay-padding").pfValue,I=t.pstyle("overlay-opacity").value,F=t.pstyle("overlay-color").value;I>0&&(this.fillStyle(e,F[0],F[1],F[2],I),s.nodeShapes.roundrectangle.draw(e,u.x,u.y,o+2*M,a+2*M),e.fill()),n&&e.translate(p.x1,p.y1)}},hasPie:function(e){return(e=e[0])._private.hasPie},drawPie:function(e,t,n,r){var i=(t=t[0]).cy().style(),o=t.pstyle("pie-size"),a=t.width(),s=t.height(),l=(r=r||t.position()).x,c=r.y,u=Math.min(a,s)/2,d=0;this.usePaths()&&(l=0,c=0),"%"===o.units?u*=o.pfValue:void 0!==o.pfValue&&(u=o.pfValue/2);for(var p=1;p<=i.pieBackgroundN;p++){var f=t.pstyle("pie-"+p+"-background-size").value,h=t.pstyle("pie-"+p+"-background-color").value,g=t.pstyle("pie-"+p+"-background-opacity").value*n,v=f/100;v+d>1&&(v=1-d);var m=1.5*Math.PI+2*Math.PI*d,y=m+2*Math.PI*v;0===f||d>=1||d+v>1||(e.beginPath(),e.moveTo(l,c),e.arc(l,c,u,m,y),e.closePath(),this.fillStyle(e,h[0],h[1],h[2],g),e.fill(),d+=v)}}};t.exports=i},{"../../../is":91}],79:[function(e,t,n){"use strict";var r={},i=e("../../../util"),o=100;r.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},r.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;i<n.length;i++)if((t=n[i]).context===e){r=!1;break}return r&&(t={context:e},n.push(t)),t},r.fillStyle=function(e,t,n,r,i){e.fillStyle="rgba("+t+","+n+","+r+","+i+")"},r.strokeStyle=function(e,t,n,r,i){e.strokeStyle="rgba("+t+","+n+","+r+","+i+")"},r.matchCanvasSize=function(e){var t=this,n=t.data,r=t.findContainerClientCoords(),i=r[2],o=r[3],a=t.getPixelRatio(),s=t.motionBlurPxRatio;e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]&&e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]||(a=s);var l,c=i*a,u=o*a;if(c!==t.canvasWidth||u!==t.canvasHeight){t.fontCaches=null;var d=n.canvasContainer;d.style.width=i+"px",d.style.height=o+"px";for(var p=0;p<t.CANVAS_LAYERS;p++)(l=n.canvases[p]).width=c,l.height=u,l.style.width=i+"px",l.style.height=o+"px";for(p=0;p<t.BUFFER_COUNT;p++)(l=n.bufferCanvases[p]).width=c,l.height=u,l.style.width=i+"px",l.style.height=o+"px";t.textureMult=1,a<=1&&(l=n.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,l.width=c*t.textureMult,l.height=u*t.textureMult),t.canvasWidth=c,t.canvasHeight=u}},r.renderTo=function(e,t,n,r){this.render({forcedContext:e,forcedZoom:t,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},r.render=function(e){function t(e,t,n,r,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",u.fillStyle(e,255,255,255,u.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=o}function n(e,n){var i,o,s,d;u.clearingMotionBlur||e!==f.bufferContexts[u.MOTIONBLUR_BUFFER_NODE]&&e!==f.bufferContexts[u.MOTIONBLUR_BUFFER_DRAG]?(i=R,o=w,s=u.canvasWidth,d=u.canvasHeight):(i={x:V.x*m,y:V.y*m},o=S*m,s=u.canvasWidth*m,d=u.canvasHeight*m),e.setTransform(1,0,0,1,0,0),"motionBlur"===n?t(e,0,0,s,d):r||void 0!==n&&!n||e.clearRect(0,0,s,d),a||(e.translate(i.x,i.y),e.scale(o,o)),c&&e.translate(c.x,c.y),l&&e.scale(l,l)}var r=(e=e||i.staticEmptyObject()).forcedContext,a=e.drawAllLayers,s=e.drawOnlyNodeLayer,l=e.forcedZoom,c=e.forcedPan,u=this,d=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,p=u.cy,f=u.data,h=f.canvasNeedsRedraw,g=u.textureOnViewport&&!r&&(u.pinching||u.hoverData.dragging||u.swipePanning||u.data.wheelZooming),v=void 0!==e.motionBlur?e.motionBlur:u.motionBlur,m=u.motionBlurPxRatio,y=p.hasCompoundNodes(),b=u.hoverData.draggingEles,C=!(!u.hoverData.selecting&&!u.touchData.selecting),x=v=v&&!r&&u.motionBlurEnabled&&!C;r||(u.prevPxRatio!==d&&(u.invalidateContainerClientCoordsCache(),u.matchCanvasSize(u.container),u.redrawHint("eles",!0),u.redrawHint("drag",!0)),u.prevPxRatio=d),!r&&u.motionBlurTimeout&&clearTimeout(u.motionBlurTimeout),v&&(null==u.mbFrames&&(u.mbFrames=0),u.mbFrames++,u.mbFrames<3&&(x=!1),u.mbFrames>u.minMbLowQualFrames&&(u.motionBlurPxRatio=u.mbPxRBlurry)),u.clearingMotionBlur&&(u.motionBlurPxRatio=1),u.textureDrawLastFrame&&!g&&(h[u.NODE]=!0,h[u.SELECT_BOX]=!0);var E=p.style()._private.coreStyle,S=p.zoom(),w=void 0!==l?l:S,V=p.pan(),R={x:V.x,y:V.y},O={zoom:S,pan:{x:V.x,y:V.y}},A=u.prevViewport;void 0===A||O.zoom!==A.zoom||O.pan.x!==A.pan.x||O.pan.y!==A.pan.y||b&&!y||(u.motionBlurPxRatio=1),c&&(R=c),w*=d,R.x*=d,R.y*=d;var k=u.getCachedZSortedEles();if(g||(u.textureDrawLastFrame=!1),g){if(u.textureDrawLastFrame=!0,!u.textureCache){u.textureCache={},u.textureCache.bb=p.mutableElements().boundingBox(),u.textureCache.texture=u.data.bufferCanvases[u.TEXTURE_BUFFER];var T=u.data.bufferContexts[u.TEXTURE_BUFFER];T.setTransform(1,0,0,1,0,0),T.clearRect(0,0,u.canvasWidth*u.textureMult,u.canvasHeight*u.textureMult),u.render({forcedContext:T,drawOnlyNodeLayer:!0,forcedPxRatio:d*u.textureMult}),(O=u.textureCache.viewport={zoom:p.zoom(),pan:p.pan(),width:u.canvasWidth,height:u.canvasHeight}).mpan={x:(0-O.pan.x)/O.zoom,y:(0-O.pan.y)/O.zoom}}h[u.DRAG]=!1,h[u.NODE]=!1;var D=f.contexts[u.NODE],N=u.textureCache.texture;O=u.textureCache.viewport,u.textureCache.bb,D.setTransform(1,0,0,1,0,0),v?t(D,0,0,O.width,O.height):D.clearRect(0,0,O.width,O.height);var P=E["outside-texture-bg-color"].value,B=E["outside-texture-bg-opacity"].value;u.fillStyle(D,P[0],P[1],P[2],B),D.fillRect(0,0,O.width,O.height),S=p.zoom(),n(D,!1),D.clearRect(O.mpan.x,O.mpan.y,O.width/O.zoom/d,O.height/O.zoom/d),D.drawImage(N,O.mpan.x,O.mpan.y,O.width/O.zoom/d,O.height/O.zoom/d)}else u.textureOnViewport&&!r&&(u.textureCache=null);var _=p.extent(),M=u.pinching||u.hoverData.dragging||u.swipePanning||u.data.wheelZooming||u.hoverData.draggingEles,I=u.hideEdgesOnViewport&&M,F=[];if(F[u.NODE]=!h[u.NODE]&&v&&!u.clearedForMotionBlur[u.NODE]||u.clearingMotionBlur,F[u.NODE]&&(u.clearedForMotionBlur[u.NODE]=!0),F[u.DRAG]=!h[u.DRAG]&&v&&!u.clearedForMotionBlur[u.DRAG]||u.clearingMotionBlur,F[u.DRAG]&&(u.clearedForMotionBlur[u.DRAG]=!0),h[u.NODE]||a||s||F[u.NODE]){var L=v&&!F[u.NODE]&&1!==m;n(D=r||(L?u.data.bufferContexts[u.MOTIONBLUR_BUFFER_NODE]:f.contexts[u.NODE]),v&&!L?"motionBlur":void 0),I?u.drawCachedNodes(D,k.nondrag,d,_):u.drawLayeredElements(D,k.nondrag,d,_),u.debug&&u.drawDebugPoints(D,k.nondrag),a||v||(h[u.NODE]=!1)}if(!s&&(h[u.DRAG]||a||F[u.DRAG])&&(L=v&&!F[u.DRAG]&&1!==m,n(D=r||(L?u.data.bufferContexts[u.MOTIONBLUR_BUFFER_DRAG]:f.contexts[u.DRAG]),v&&!L?"motionBlur":void 0),I?u.drawCachedNodes(D,k.drag,d,_):u.drawCachedElements(D,k.drag,d,_),u.debug&&u.drawDebugPoints(D,k.drag),a||v||(h[u.DRAG]=!1)),u.showFps||!s&&h[u.SELECT_BOX]&&!a){if(n(D=r||f.contexts[u.SELECT_BOX]),1==u.selection[4]&&(u.hoverData.selecting||u.touchData.selecting)){S=u.cy.zoom();var W=E["selection-box-border-width"].value/S;D.lineWidth=W,D.fillStyle="rgba("+E["selection-box-color"].value[0]+","+E["selection-box-color"].value[1]+","+E["selection-box-color"].value[2]+","+E["selection-box-opacity"].value+")",D.fillRect(u.selection[0],u.selection[1],u.selection[2]-u.selection[0],u.selection[3]-u.selection[1]),W>0&&(D.strokeStyle="rgba("+E["selection-box-border-color"].value[0]+","+E["selection-box-border-color"].value[1]+","+E["selection-box-border-color"].value[2]+","+E["selection-box-opacity"].value+")",D.strokeRect(u.selection[0],u.selection[1],u.selection[2]-u.selection[0],u.selection[3]-u.selection[1]))}if(f.bgActivePosistion&&!u.hoverData.selecting){S=u.cy.zoom();var U=f.bgActivePosistion;D.fillStyle="rgba("+E["active-bg-color"].value[0]+","+E["active-bg-color"].value[1]+","+E["active-bg-color"].value[2]+","+E["active-bg-opacity"].value+")",D.beginPath(),D.arc(U.x,U.y,E["active-bg-size"].pfValue/S,0,2*Math.PI),D.fill()}var G=u.lastRedrawTime;if(u.showFps&&G){G=Math.round(G);var z=Math.round(1e3/G);D.setTransform(1,0,0,1,0,0),D.fillStyle="rgba(255, 0, 0, 0.75)",D.strokeStyle="rgba(255, 0, 0, 0.75)",D.lineWidth=1,D.fillText("1 frame = "+G+" ms = "+z+" fps",0,20);var Q=60;D.strokeRect(0,30,250,20),D.fillRect(0,30,250*Math.min(z/Q,1),20)}a||(h[u.SELECT_BOX]=!1)}if(v&&1!==m){var j=f.contexts[u.NODE],Y=u.data.bufferCanvases[u.MOTIONBLUR_BUFFER_NODE],H=f.contexts[u.DRAG],J=u.data.bufferCanvases[u.MOTIONBLUR_BUFFER_DRAG],Z=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!x?e.clearRect(0,0,u.canvasWidth,u.canvasHeight):t(e,0,0,u.canvasWidth,u.canvasHeight);var i=m;e.drawImage(n,0,0,u.canvasWidth*i,u.canvasHeight*i,0,0,u.canvasWidth,u.canvasHeight)};(h[u.NODE]||F[u.NODE])&&(Z(j,Y,F[u.NODE]),h[u.NODE]=!1),(h[u.DRAG]||F[u.DRAG])&&(Z(H,J,F[u.DRAG]),h[u.DRAG]=!1)}u.prevViewport=O,u.clearingMotionBlur&&(u.clearingMotionBlur=!1,u.motionBlurCleared=!0,u.motionBlur=!0),v&&(u.motionBlurTimeout=setTimeout((function(){u.motionBlurTimeout=null,u.clearedForMotionBlur[u.NODE]=!1,u.clearedForMotionBlur[u.DRAG]=!1,u.motionBlur=!1,u.clearingMotionBlur=!g,u.mbFrames=0,h[u.NODE]=!0,h[u.DRAG]=!0,u.redraw()}),o)),r||p.trigger("render")},t.exports=r},{"../../../util":108}],80:[function(e,t,n){"use strict";for(var r=e("../../../math"),i={drawPolygonPath:function(e,t,n,r,i,o){var a=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+a*o[0],n+s*o[1]);for(var l=1;l<o.length/2;l++)e.lineTo(t+a*o[2*l],n+s*o[2*l+1]);e.closePath()},drawRoundRectanglePath:function(e,t,n,i,o){var a=i/2,s=o/2,l=r.getRoundRectangleRadius(i,o);e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.arcTo(t+a,n-s,t+a,n,l),e.arcTo(t+a,n+s,t,n+s,l),e.arcTo(t-a,n+s,t-a,n,l),e.arcTo(t-a,n-s,t,n-s,l),e.lineTo(t,n-s),e.closePath()},drawCutRectanglePath:function(e,t,n,i,o){var a=i/2,s=o/2,l=r.getCutRectangleCornerLength();e.beginPath&&e.beginPath(),e.moveTo(t-a+l,n-s),e.lineTo(t+a-l,n-s),e.lineTo(t+a,n-s+l),e.lineTo(t+a,n+s-l),e.lineTo(t+a-l,n+s),e.lineTo(t-a+l,n+s),e.lineTo(t-a,n+s-l),e.lineTo(t-a,n-s+l),e.closePath()}},o=Math.sin(0),a=Math.cos(0),s={},l={},c=Math.PI/40,u=0*Math.PI;u<2*Math.PI;u+=c)s[u]=Math.sin(u),l[u]=Math.cos(u);i.drawEllipsePath=function(e,t,n,r,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,i/2,0,0,2*Math.PI);else for(var u,d,p=r/2,f=i/2,h=0*Math.PI;h<2*Math.PI;h+=c)u=t-p*s[h]*o+p*l[h]*a,d=n+f*l[h]*o+f*s[h]*a,0===h?e.moveTo(u,d):e.lineTo(u,d);e.closePath()},t.exports=i},{"../../../math":93}],81:[function(e,t,n){"use strict";var r=e("../../../math"),i=e("../../../util"),o=e("../../../heap"),a=e("./texture-cache-defs"),s=25,l=50,c=-4,u=2,d=3.99,p=8,f=1024,h=1024,g=1024,v=.5,m=.8,y=10,b=!1,C=!1,x=.15,E=.1,S=.9,w=.9,V=100,R=1,O={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},A=function(e){var t=this;t.renderer=e,t.onDequeues=[],t.setupDequeueing()},k=A.prototype;k.reasons=O,k.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},k.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},k.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new o((function(e,t){return t.reqs-e.reqs}))},k.getElementIdToQueue=function(){var e=this;return e.eleIdToCacheQueue=e.eleIdToCacheQueue||{}},k.getElement=function(e,t,n,i,o){var a=this,f=this.renderer,v=e._private.rscratch,m=f.cy.zoom();if(0===t.w||0===t.h)return null;if(null==i&&(i=Math.ceil(r.log2(m*n))),i<c)i=c;else if(m>=d||i>u)return null;var y,x=Math.pow(2,i),E=t.h*x,S=t.w*x,w=v.imgCaches=v.imgCaches||{},V=w[i];if(V)return V;if(y=E<=s?s:E<=l?l:Math.ceil(E/l)*l,E>g||S>h||!b&&e.isEdge()||!C&&e.isParent())return null;var R=a.getTextureQueue(y),A=R[R.length-2],k=function(){return a.recycleTexture(y,S)||a.addTexture(y,S)};A||(A=R[R.length-1]),A||(A=k()),A.width-A.usedWidth<S&&(A=k());for(var T,D=f.eleTextBiggerThanMin(e,x),N=function(e){return e&&e.scaledLabelShown===D},P=o&&o===O.dequeue,B=o&&o===O.highQuality,_=o&&o===O.downscale,M=i+1;M<=u;M++)if(W=w[M]){T=W;break}var I=T&&T.level===i+1?T:null,F=function(){A.context.drawImage(I.texture.canvas,I.x,0,I.width,I.height,A.usedWidth,0,S,E)};if(A.context.setTransform(1,0,0,1,0,0),A.context.clearRect(A.usedWidth,0,S,y),N(I))F();else if(N(T)){if(!B)return a.queueElement(e,t,T.level-1),T;for(M=T.level;M>i;M--)I=a.getElement(e,t,n,M,O.downscale);F()}else{var L;if(!P&&!B&&!_)for(M=i-1;M>=c;M--){var W;if(W=w[M]){L=W;break}}if(N(L))return a.queueElement(e,t,i),L;A.context.translate(A.usedWidth,0),A.context.scale(x,x),f.drawElement(A.context,e,t,D),A.context.scale(1/x,1/x),A.context.translate(-A.usedWidth,0)}return V=w[i]={ele:e,x:A.usedWidth,texture:A,level:i,scale:x,width:S,height:E,scaledLabelShown:D},A.usedWidth+=Math.ceil(S+p),A.eleCaches.push(V),a.checkTextureFullness(A),V},k.invalidateElement=function(e){var t=this,n=e._private.rscratch.imgCaches;if(n)for(var r=c;r<=u;r++){var o=n[r];if(o){var a=o.texture;a.invalidatedWidth+=o.width,n[r]=null,i.removeFromArray(a.eleCaches,o),t.checkTextureUtility(a)}}},k.checkTextureUtility=function(e){e.invalidatedWidth>=v*e.width&&this.retireTexture(e)},k.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>m&&e.fullnessChecks>=y?i.removeFromArray(t,e):e.fullnessChecks++},k.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n);i.removeFromArray(r,e),e.retired=!0;for(var o=e.eleCaches,a=0;a<o.length;a++){var s=o[a],l=s.ele,c=s.level,u=l._private.rscratch.imgCaches;u&&(u[c]=null)}i.clearArray(o),t.getRetiredTextureQueue(n).push(e)},k.addTexture=function(e,t){var n={};return this.getTextureQueue(e).push(n),n.eleCaches=[],n.height=e,n.width=Math.max(f,t),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=document.createElement("canvas"),n.canvas.width=n.width,n.canvas.height=n.height,n.context=n.canvas.getContext("2d"),n},k.recycleTexture=function(e,t){for(var n=this,r=n.getTextureQueue(e),o=n.getRetiredTextureQueue(e),a=0;a<o.length;a++){var s=o[a];if(s.width>=t)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,i.clearArray(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),i.removeFromArray(o,s),r.push(s),s}},k.queueElement=function(e,t,n){var i=this,o=i.getElementQueue(),a=i.getElementIdToQueue(),s=e.id(),l=a[s];if(l)l.level=Math.max(l.level,n),l.reqs++,o.updateItem(l);else{var c={ele:e,bb:t,position:r.copyPosition(e.position()),level:n,reqs:1};e.isEdge()&&(c.positions={source:r.copyPosition(e.source().position()),target:r.copyPosition(e.target().position())}),o.push(c),a[s]=c}},k.dequeue=function(e){for(var t=this,n=t.getElementQueue(),i=t.getElementIdToQueue(),o=[],a=0;a<R&&n.size()>0;a++){var s=n.pop();i[s.ele.id()]=null,o.push(s);var l,c=s.ele;l=(!c.isEdge()||r.arePositionsSame(c.source().position(),s.positions.source)&&r.arePositionsSame(c.target().position(),s.positions.target))&&r.arePositionsSame(c.position(),s.position)?s.bb:c.boundingBox(),t.getElement(s.ele,l,e,s.level,O.dequeue)}return o},k.onDequeue=function(e){this.onDequeues.push(e)},k.offDequeue=function(e){i.removeFromArray(this.onDequeues,e)},k.setupDequeueing=a.setupDequeueing({deqRedrawThreshold:V,deqCost:x,deqAvgCost:E,deqNoDrawCost:S,deqFastCost:w,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++){var a=t[o].bb;if(r.boundingBoxesIntersect(a,i))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}}),t.exports=A},{"../../../heap":89,"../../../math":93,"../../../util":108,"./texture-cache-defs":86}],82:[function(e,t,n){"use strict";function r(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o<n.length;o++)i[o]=n.charCodeAt(o);return new Blob([r],{type:t})}function i(e){var t=e.indexOf(",");return e.substr(t+1)}function o(e,t,n){var o=t.toDataURL(n,e.quality);switch(e.output){case"blob":return r(i(o),n);case"base64":return i(o);default:return o}}var a=e("../../../is"),s={createBuffer:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,[n,n.getContext("2d")]},bufferCanvasImage:function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=e.full?Math.ceil(n.w):r[2],o=e.full?Math.ceil(n.h):r[3],s=a.number(e.maxWidth)||a.number(e.maxHeight),l=this.getPixelRatio(),c=1;if(void 0!==e.scale)i*=e.scale,o*=e.scale,c=e.scale;else if(s){var u=1/0,d=1/0;a.number(e.maxWidth)&&(u=c*e.maxWidth/i),a.number(e.maxHeight)&&(d=c*e.maxHeight/o),i*=c=Math.min(u,d),o*=c}s||(i*=l,o*=l,c*=l);var p=document.createElement("canvas");p.width=i,p.height=o,p.style.width=i+"px",p.style.height=o+"px";var f=p.getContext("2d");if(i>0&&o>0){f.clearRect(0,0,i,o),e.bg&&(f.fillStyle=e.bg,f.rect(0,0,i,o),f.fill()),f.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*c,-n.y1*c),f.scale(c,c),this.drawElements(f,h);else{var g=t.pan(),v={x:g.x*c,y:g.y*c};c*=t.zoom(),f.translate(v.x,v.y),f.scale(c,c),this.drawElements(f,h)}}return p},png:function(e){return o(e,this.bufferCanvasImage(e),"image/png")},jpg:function(e){return o(e,this.bufferCanvasImage(e),"image/jpeg")}};t.exports=s},{"../../../is":91}],83:[function(e,t,n){"use strict";function r(e){var t=this;t.data={canvases:new Array(c.CANVAS_LAYERS),contexts:new Array(c.CANVAS_LAYERS),canvasNeedsRedraw:new Array(c.CANVAS_LAYERS),bufferCanvases:new Array(c.BUFFER_COUNT),bufferContexts:new Array(c.CANVAS_LAYERS)},t.data.canvasContainer=document.createElement("div");var n=t.data.canvasContainer.style;t.data.canvasContainer.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),n.position="relative",n.zIndex="0",n.overflow="hidden";var r=e.cy.container();r.appendChild(t.data.canvasContainer),r.setAttribute("style",(r.getAttribute("style")||"")+"-webkit-tap-highlight-color: rgba(0,0,0,0);");for(var i=0;i<c.CANVAS_LAYERS;i++){var l=t.data.canvases[i]=document.createElement("canvas");t.data.contexts[i]=l.getContext("2d"),l.setAttribute("style","-webkit-user-select: none; -moz-user-select: -moz-none; user-select: none; -webkit-tap-highlight-color: rgba(0,0,0,0); outline-style: none;"+(o.ms()?" -ms-touch-action: none; touch-action: none; ":"")),l.style.position="absolute",l.setAttribute("data-id","layer"+i),l.style.zIndex=String(c.CANVAS_LAYERS-i),t.data.canvasContainer.appendChild(l),t.data.canvasNeedsRedraw[i]=!1}for(t.data.topCanvas=t.data.canvases[0],t.data.canvases[c.NODE].setAttribute("data-id","layer"+c.NODE+"-node"),t.data.canvases[c.SELECT_BOX].setAttribute("data-id","layer"+c.SELECT_BOX+"-selectbox"),t.data.canvases[c.DRAG].setAttribute("data-id","layer"+c.DRAG+"-drag"),i=0;i<c.BUFFER_COUNT;i++)t.data.bufferCanvases[i]=document.createElement("canvas"),t.data.bufferContexts[i]=t.data.bufferCanvases[i].getContext("2d"),t.data.bufferCanvases[i].style.position="absolute",t.data.bufferCanvases[i].setAttribute("data-id","buffer"+i),t.data.bufferCanvases[i].style.zIndex=String(-i-1),t.data.bufferCanvases[i].style.visibility="hidden";t.pathsEnabled=!0,t.data.eleTxrCache=new a(t),t.data.lyrTxrCache=new s(t,t.data.eleTxrCache),t.onUpdateEleCalcs((function(e,n){for(var r=0;r<n.length;r++){var i=n[r],o=i._private.rstyle.dirtyEvents;i.isNode()&&o&&1===o.length&&o.position||t.data.eleTxrCache.invalidateElement(i)}n.length>0&&t.data.lyrTxrCache.invalidateElements(n)}))}var i=e("../../../util"),o=e("../../../is"),a=e("./ele-texture-cache"),s=e("./layered-texture-cache"),l=r,c=r.prototype;c.CANVAS_LAYERS=3,c.SELECT_BOX=0,c.DRAG=1,c.NODE=2,c.BUFFER_COUNT=3,c.TEXTURE_BUFFER=0,c.MOTIONBLUR_BUFFER_NODE=1,c.MOTIONBLUR_BUFFER_DRAG=2,c.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[c.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[c.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[c.SELECT_BOX]=t}};var u="undefined"!=typeof Path2D;c.path2dEnabled=function(e){return void 0===e?this.pathsEnabled:void(this.pathsEnabled=!!e)},c.usePaths=function(){return u&&this.pathsEnabled},[e("./arrow-shapes"),e("./drawing-elements"),e("./drawing-edges"),e("./drawing-images"),e("./drawing-label-text"),e("./drawing-nodes"),e("./drawing-redraw"),e("./drawing-shapes"),e("./export-image"),e("./node-shapes")].forEach((function(e){i.extend(c,e)})),t.exports=l},{"../../../is":91,"../../../util":108,"./arrow-shapes":73,"./drawing-edges":74,"./drawing-elements":75,"./drawing-images":76,"./drawing-label-text":77,"./drawing-nodes":78,"./drawing-redraw":79,"./drawing-shapes":80,"./ele-texture-cache":81,"./export-image":82,"./layered-texture-cache":84,"./node-shapes":85}],84:[function(e,t,n){"use strict";function r(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)}var i=e("../../../util"),o=e("../../../math"),a=e("../../../heap"),s=e("../../../is"),l=e("./texture-cache-defs"),c=1,u=-4,d=2,p=3.99,f=50,h=50,g=!0,v=.15,m=.1,y=.9,b=.9,C=1,x=250,E=16e6,S=!0,w=!0,V=!0,R=function(e,t){var n=this,r=n.renderer=e;n.layersByLevel={},n.firstGet=!0,n.lastInvalidationTime=i.performanceNow()-2*x,n.skipping=!1,r.beforeRender((function(e,t){t-n.lastInvalidationTime<=x?n.skipping=!0:n.skipping=!1}));var o=function(e,t){return t.reqs-e.reqs};n.layersQueue=new a(o),n.eleTxrCache=t,n.setupEleCacheInvalidation(),n.setupDequeueing()},O=R.prototype,A=0,k=Math.pow(2,53)-1;O.makeLayer=function(e,t){var n=Math.pow(2,t),r=Math.ceil(e.w*n),i=Math.ceil(e.h*n),o=document.createElement("canvas");o.width=r,o.height=i;var a={id:A=++A%k,bb:e,level:t,width:r,height:i,canvas:o,context:o.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=a.context,l=-a.bb.x1,c=-a.bb.y1;return s.scale(n,n),s.translate(l,c),a},O.getLayers=function(e,t,n){var r=this,a=r.renderer.cy.zoom(),s=r.firstGet;if(r.firstGet=!1,null==n)if((n=Math.ceil(o.log2(a*t)))<u)n=u;else if(a>=p||n>d)return null;r.validateLayersElesOrdering(n,e);var l,f,h=r.layersByLevel,g=Math.pow(2,n),v=h[n]=h[n]||[],m=function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return f=h[t],!0},o=function(e){if(!f)for(var r=n+e;u<=r&&r<=d&&!t(r);r+=e);};o(1),o(-1);for(var a=v.length-1;a>=0;a--){var s=v[a];s.invalid&&i.removeFromArray(v,s)}};if(r.levelIsComplete(n,e))return v;m();var y=function(){if(!l){l=o.makeBoundingBox();for(var t=0;t<e.length;t++)o.updateBoundingBox(l,e[t].boundingBox())}return l},b=function(e){var t=(e=e||{}).after;if(y(),l.w*g*(l.h*g)>E)return null;var i=r.makeLayer(l,n);if(null!=t){var o=v.indexOf(t)+1;v.splice(o,0,i)}else(void 0===e.insert||e.insert)&&v.unshift(i);return i};if(r.skipping&&!s)return null;for(var C=null,x=e.length/c,w=S&&!s,V=0;V<e.length;V++){var R=e[V],O=R._private.rscratch,A=O.imgLayerCaches=O.imgLayerCaches||{},k=A[n];if(k)C=k;else{if((!C||C.eles.length>=x||!o.boundingBoxInBoundingBox(C.bb,R.boundingBox()))&&!(C=b({insert:!0,after:C})))return null;f||w?r.queueLayer(C,R):r.drawEleInLayer(C,R,n,t),C.eles.push(R),A[n]=C}}return f||(w?null:v)},O.getEleLevelForLayerLevel=function(e,t){return e},O.drawEleInLayer=function(e,t,n,i){var o=this,a=this.renderer,s=e.context,l=t.boundingBox();if(0!==l.w&&0!==l.h){var c=o.eleTxrCache,u=w?c.reasons.highQuality:void 0;n=o.getEleLevelForLayerLevel(n,i);var d=V?c.getElement(t,l,null,n,u):null;d?(g&&r(s,!1),s.drawImage(d.texture.canvas,d.x,0,d.width,d.height,l.x1,l.y1,l.w,l.h),g&&r(s,!0)):a.drawElement(s,t)}},O.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i<n.length;i++){var o=n[i];if(o.reqs>0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},O.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r<n.length;r++){for(var i=n[r],o=-1,a=0;a<t.length;a++)if(i.eles[0]===t[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]!==t[s+a]){this.invalidateLayer(i);break}}}},O.updateElementsInLayers=function(e,t){for(var n=this,r=s.element(e[0]),i=0;i<e.length;i++)for(var o=r?null:e[i],a=r?e[i]:e[i].ele,l=a._private.rscratch,c=l.imgLayerCaches=l.imgLayerCaches||{},p=u;p<=d;p++){var f=c[p];f&&(o&&n.getEleLevelForLayerLevel(f.level)!==o.level||t(f,a,o))}},O.haveLayers=function(){for(var e=this,t=!1,n=u;n<=d;n++){var r=e.layersByLevel[n];if(r&&r.length>0){t=!0;break}}return t},O.invalidateElements=function(e){var t=this;t.lastInvalidationTime=i.performanceNow(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)}))},O.invalidateLayer=function(e){if(this.lastInvalidationTime=i.performanceNow(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];i.removeFromArray(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var o=0;o<n.length;o++){var a=n[o]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},O.refineElementTextures=function(e){var t=this;t.updateElementsInLayers(e,(function(e,n,r){var i=e.replacement;if(i||((i=e.replacement=t.makeLayer(e.bb,e.level)).replaces=e,i.eles=e.eles),!i.reqs)for(var o=0;o<i.eles.length;o++)t.queueLayer(i,i.eles[o])}))},O.setupEleCacheInvalidation=function(){var e=this,t=[];if(V){var n=i.debounce((function(){e.refineElementTextures(t),t=[]}),h);e.eleTxrCache.onDequeue((function(e){for(var r=0;r<e.length;r++)t.push(e[r]);n()}))}},O.queueLayer=function(e,t){var n=this.layersQueue,r=e.elesQueue,i=r.hasId=r.hasId||{};if(!e.replacement){if(t){if(i[t.id()])return;r.push(t),i[t.id()]=!0}e.reqs?(e.reqs++,n.updateItem(e)):(e.reqs=1,n.push(e))}},O.dequeue=function(e){for(var t=this,n=t.layersQueue,r=[],i=0;i<C&&0!==n.size();){var o=n.peek();if(o.replacement)n.pop();else if(o.replaces&&o!==o.replaces.replacement)n.pop();else if(o.invalid)n.pop();else{var a=o.elesQueue.shift();a&&(t.drawEleInLayer(o,a,o.level,e),i++),0===r.length&&r.push(!0),0===o.elesQueue.length&&(n.pop(),o.reqs=0,o.replaces&&t.applyLayerReplacement(o),t.requestRedraw())}}return r},O.applyLayerReplacement=function(e){var t=this,n=t.layersByLevel[e.level],r=e.replaces,i=n.indexOf(r);if(!(i<0||r.invalid)){n[i]=e;for(var o=0;o<e.eles.length;o++){var a=e.eles[o]._private,s=a.imgLayerCaches=a.imgLayerCaches||{};s&&(s[e.level]=e)}t.requestRedraw()}},O.requestRedraw=i.debounce((function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()}),100),O.setupDequeueing=l.setupDequeueing({deqRedrawThreshold:f,deqCost:v,deqAvgCost:m,deqNoDrawCost:y,deqFastCost:b,deq:function(e,t){return e.dequeue(t)},onDeqd:i.noop,shouldRedraw:i.trueify,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}}),t.exports=R},{"../../../heap":89,"../../../is":91,"../../../math":93,"../../../util":108,"./texture-cache-defs":86}],85:[function(e,t,n){"use strict";var r={nodeShapeImpl:function(e,t,n,r,i,o,a){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,i,o);case"polygon":return this.drawPolygonPath(t,n,r,i,o,a);case"roundrectangle":return this.drawRoundRectanglePath(t,n,r,i,o);case"cutrectangle":return this.drawCutRectanglePath(t,n,r,i,o)}}};t.exports=r},{}],86:[function(e,t,n){"use strict";var r=e("../../../util"),i=1e3/60;t.exports={setupDequeueing:function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var o=r.debounce((function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()}),e.deqRedrawThreshold),a=function(a,s){for(var l=r.performanceNow(),c=n.averageRedrawTime,u=n.lastRedrawTime,d=[],p=n.cy.extent(),f=n.getPixelRatio();;){var h=r.performanceNow(),g=h-l,v=h-s;if(u<i){var m=i-(a?c:0);if(v>=e.deqFastCost*m)break}else if(a){if(g>=e.deqCost*u||g>=e.deqAvgCost*c)break}else if(v>=e.deqNoDrawCost*i)break;var y=e.deq(t,f,p);if(!(y.length>0))break;for(var b=0;b<y.length;b++)d.push(y[b])}d.length>0&&(e.onDeqd(t,d),!a&&e.shouldRedraw(t,d,f,p)&&o())},s=e.priority||r.noop;n.beforeRender(a,s(t))}}}}},{"../../../util":108}],87:[function(e,t,n){"use strict";t.exports=[{name:"null",impl:e("./null")},{name:"base",impl:e("./base")},{name:"canvas",impl:e("./canvas")}]},{"./base":69,"./canvas":83,"./null":88}],88:[function(e,t,n){"use strict";function r(e){this.options=e,this.notifications=0}var i=function(){};r.prototype={recalculateRenderedStyle:i,notify:function(){this.notifications++},init:i},t.exports=r},{}],89:[function(e,t,n){"use strict";var r,i,o,a,s,l,c,u,d,p,f,h,g,v,m;o=Math.floor,p=Math.min,i=function(e,t){return e<t?-1:e>t?1:0},d=function(e,t,n,r,a){var s;if(null==n&&(n=0),null==a&&(a=i),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);n<r;)a(t,e[s=o((n+r)/2)])<0?r=s:n=s+1;return[].splice.apply(e,[n,n-n].concat(t)),t},l=function(e,t,n){return null==n&&(n=i),e.push(t),v(e,0,e.length-1,n)},s=function(e,t){var n,r;return null==t&&(t=i),n=e.pop(),e.length?(r=e[0],e[0]=n,m(e,0,t)):r=n,r},u=function(e,t,n){var r;return null==n&&(n=i),r=e[0],e[0]=t,m(e,0,n),r},c=function(e,t,n){var r;return null==n&&(n=i),e.length&&n(e[0],t)<0&&(t=(r=[e[0],t])[0],e[0]=r[1],m(e,0,n)),t},a=function(e,t){var n,r,a,s,l,c;for(null==t&&(t=i),s=function(){c=[];for(var t=0,n=o(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)c.push(t);return c}.apply(this).reverse(),l=[],r=0,a=s.length;r<a;r++)n=s[r],l.push(m(e,n,t));return l},g=function(e,t,n){var r;if(null==n&&(n=i),-1!==(r=e.indexOf(t)))return v(e,0,r,n),m(e,r,n)},f=function(e,t,n){var r,o,s,l,u;if(null==n&&(n=i),!(o=e.slice(0,t)).length)return o;for(a(o,n),s=0,l=(u=e.slice(t)).length;s<l;s++)r=u[s],c(o,r,n);return o.sort(n).reverse()},h=function(e,t,n){var r,o,l,c,u,f,h,g,v;if(null==n&&(n=i),10*t<=e.length){if(!(l=e.slice(0,t).sort(n)).length)return l;for(o=l[l.length-1],c=0,f=(h=e.slice(t)).length;c<f;c++)n(r=h[c],o)<0&&(d(l,r,0,null,n),l.pop(),o=l[l.length-1]);return l}for(a(e,n),v=[],u=0,g=p(t,e.length);0<=g?u<g:u>g;0<=g?++u:--u)v.push(s(e,n));return v},v=function(e,t,n,r){var o,a,s;for(null==r&&(r=i),o=e[n];n>t&&r(o,a=e[s=n-1>>1])<0;)e[n]=a,n=s;return e[n]=o},m=function(e,t,n){var r,o,a,s,l;for(null==n&&(n=i),o=e.length,l=t,a=e[t],r=2*t+1;r<o;)(s=r+1)<o&&!(n(e[r],e[s])<0)&&(r=s),e[t]=e[r],r=2*(t=r)+1;return e[t]=a,v(e,l,t,n)},r=function(){function e(e){this.cmp=null!=e?e:i,this.nodes=[]}return e.push=l,e.pop=s,e.replace=u,e.pushpop=c,e.heapify=a,e.updateItem=g,e.nlargest=f,e.nsmallest=h,e.prototype.push=function(e){return l(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return u(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return c(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return a(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return g(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),t.exports=r},{}],90:[function(e,t,n){"use strict";e("./-preamble");var r=(e("./window"),e("./is")),i=e("./core"),o=e("./extension"),a=e("./stylesheet"),s=function(e){return void 0===e&&(e={}),r.plainObject(e)?new i(e):r.string(e)?o.apply(o,arguments):void 0};s.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(s),e.apply(null,t),this},s.version=e("./version"),s.stylesheet=s.Stylesheet=a,t.exports=s},{"./-preamble":1,"./core":37,"./extension":46,"./is":91,"./stylesheet":106,"./version":115,"./window":116}],91:[function(e,t,n){"use strict";var r=e("./window"),i=r?r.navigator:null,o=r?r.document:null,a="string",s=typeof{},l="function",c=typeof HTMLElement,u=function(e){return e&&e.instanceString&&d.fn(e.instanceString)?e.instanceString():null},d={defined:function(e){return null!=e},string:function(e){return null!=e&&typeof e==a},fn:function(e){return null!=e&&typeof e===l},array:function(e){return Array.isArray?Array.isArray(e):null!=e&&e instanceof Array},plainObject:function(e){return null!=e&&typeof e===s&&!d.array(e)&&e.constructor===Object},object:function(e){return null!=e&&typeof e===s},number:function(e){return null!=e&&"number"==typeof e&&!isNaN(e)},integer:function(e){return d.number(e)&&Math.floor(e)===e},bool:function(e){return null!=e&&"boolean"==typeof e},htmlElement:function(e){return"undefined"===c?void 0:null!=e&&e instanceof HTMLElement},elementOrCollection:function(e){return d.element(e)||d.collection(e)},element:function(e){return"collection"===u(e)&&e._private.single},collection:function(e){return"collection"===u(e)&&!e._private.single},core:function(e){return"core"===u(e)},style:function(e){return"style"===u(e)},stylesheet:function(e){return"stylesheet"===u(e)},event:function(e){return"event"===u(e)},thread:function(e){return"thread"===u(e)},fabric:function(e){return"fabric"===u(e)},emptyString:function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},nonemptyString:function(e){return!(!e||!d.string(e)||""===e||e.match(/^\s+$/))},domElement:function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement},boundingBox:function(e){return d.plainObject(e)&&d.number(e.x1)&&d.number(e.x2)&&d.number(e.y1)&&d.number(e.y2)},promise:function(e){return d.object(e)&&d.fn(e.then)},touch:function(){return r&&("ontouchstart"in r||r.DocumentTouch&&o instanceof DocumentTouch)},gecko:function(){return r&&("undefined"!=typeof InstallTrigger||"MozAppearance"in o.documentElement.style)},webkit:function(){return r&&("undefined"!=typeof webkitURL||"WebkitAppearance"in o.documentElement.style)},chromium:function(){return r&&"undefined"!=typeof chrome},khtml:function(){return i&&i.vendor.match(/kde/i)},khtmlEtc:function(){return d.khtml()||d.webkit()||d.chromium()},ms:function(){return i&&i.userAgent.match(/msie|trident|edge/i)},windows:function(){return i&&i.appVersion.match(/Win/i)},mac:function(){return i&&i.appVersion.match(/Mac/i)},linux:function(){return i&&i.appVersion.match(/Linux/i)},unix:function(){return i&&i.appVersion.match(/X11/i)}};t.exports=d},{"./window":116}],92:[function(e,t,n){function r(){this._obj={}}var i=r.prototype;i.set=function(e,t){this._obj[e]=t},i.delete=function(e){this._obj[e]=null},i.has=function(e){return null!=this._obj[e]},i.get=function(e){return this._obj[e]},t.exports="undefined"!=typeof Map?Map:r},{}],93:[function(e,t,n){"use strict";var r={arePositionsSame:function(e,t){return e.x===t.x&&e.y===t.y},copyPosition:function(e){return{x:e.x,y:e.y}},array2point:function(e){return{x:e[0],y:e[1]}},deg2rad:function(e){return Math.PI*e/180},getAngleFromDisp:function(e,t){return Math.atan2(t,e)-Math.PI/2}};r.log2=Math.log2||function(e){return Math.log(e)/Math.log(2)},r.signum=function(e){return e>0?1:e<0?-1:0},r.dist=function(e,t){return Math.sqrt(r.sqdist(e,t))},r.sqdist=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},r.qbezierAt=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},r.qbezierPtAt=function(e,t,n,i){return{x:r.qbezierAt(e.x,t.x,n.x,i),y:r.qbezierAt(e.y,t.y,n.y,i)}},r.lineAt=function(e,t,n,i){var o={x:t.x-e.x,y:t.y-e.y},a=r.dist(e,t),s={x:o.x/a,y:o.y/a};return n=null==n?0:n,i=null!=i?i:n*a,{x:e.x+s.x*i,y:e.y+s.y*i}},r.lineAtDist=function(e,t,n){return r.lineAt(e,t,void 0,n)},r.triangleAngle=function(e,t,n){var i=r.dist(t,n),o=r.dist(e,n),a=r.dist(e,t);return Math.acos((i*i+o*o-a*a)/(2*i*o))},r.bound=function(e,t,n){return Math.max(e,Math.min(n,t))},r.makeBoundingBox=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}}},r.updateBoundingBox=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},r.expandBoundingBoxByPoint=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},r.expandBoundingBox=function(e,t){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},r.boundingBoxesIntersect=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)},r.inBoundingBox=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},r.pointInBoundingBox=function(e,t){return this.inBoundingBox(e,t.x,t.y)},r.boundingBoxInBoundingBox=function(e,t){return r.inBoundingBox(e,t.x1,t.y1)&&r.inBoundingBox(e,t.x2,t.y2)},r.roundRectangleIntersectLine=function(e,t,n,r,i,o,a){var s,l=this.getRoundRectangleRadius(i,o),c=i/2,u=o/2,d=n-c+l-a,p=r-u-a,f=n+c-l+a,h=p;if((s=this.finiteLinesIntersect(e,t,n,r,d,p,f,h,!1)).length>0)return s;var g=n+c+a,v=r-u+l-a,m=g,y=r+u-l+a;if((s=this.finiteLinesIntersect(e,t,n,r,g,v,m,y,!1)).length>0)return s;var b=n-c+l-a,C=r+u+a,x=n+c-l+a,E=C;if((s=this.finiteLinesIntersect(e,t,n,r,b,C,x,E,!1)).length>0)return s;var S=n-c-a,w=r-u+l-a,V=S,R=r+u-l+a;if((s=this.finiteLinesIntersect(e,t,n,r,S,w,V,R,!1)).length>0)return s;var O,A=n-c+l,k=r-u+l;if((O=this.intersectLineCircle(e,t,n,r,A,k,l+a)).length>0&&O[0]<=A&&O[1]<=k)return[O[0],O[1]];var T=n+c-l,D=r-u+l;if((O=this.intersectLineCircle(e,t,n,r,T,D,l+a)).length>0&&O[0]>=T&&O[1]<=D)return[O[0],O[1]];var N=n+c-l,P=r+u-l;if((O=this.intersectLineCircle(e,t,n,r,N,P,l+a)).length>0&&O[0]>=N&&O[1]>=P)return[O[0],O[1]];var B=n-c+l,_=r+u-l;return(O=this.intersectLineCircle(e,t,n,r,B,_,l+a)).length>0&&O[0]<=B&&O[1]>=_?[O[0],O[1]]:[]},r.inLineVicinity=function(e,t,n,r,i,o,a){var s=a,l=Math.min(n,i),c=Math.max(n,i),u=Math.min(r,o),d=Math.max(r,o);return l-s<=e&&e<=c+s&&u-s<=t&&t<=d+s},r.inBezierVicinity=function(e,t,n,r,i,o,a,s,l){var c={x1:Math.min(n,a,i)-l,x2:Math.max(n,a,i)+l,y1:Math.min(r,s,o)-l,y2:Math.max(r,s,o)+l};return!(e<c.x1||e>c.x2||t<c.y1||t>c.y2)},r.solveCubic=function(e,t,n,r,i){var o,a,s,l,c,u,d,p;return s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),o=(a=(3*n-t*t)/9)*a*a+(s/=54)*s,i[1]=0,d=t/3,o>0?(c=(c=s+Math.sqrt(o))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),u=(u=s-Math.sqrt(o))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-d+c+u,d+=(c+u)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-u+c)/2,i[3]=d,void(i[5]=-d)):(i[5]=i[3]=0,0===o?(p=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*p-d,void(i[4]=i[2]=-(p+d))):(l=(a=-a)*a*a,l=Math.acos(s/Math.sqrt(l)),p=2*Math.sqrt(a),i[0]=-d+p*Math.cos(l/3),i[2]=-d+p*Math.cos((l+2*Math.PI)/3),void(i[4]=-d+p*Math.cos((l+4*Math.PI)/3))))},r.sqdistToQuadraticBezier=function(e,t,n,r,i,o,a,s){var l=1*n*n-4*n*i+2*n*a+4*i*i-4*i*a+a*a+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s,c=9*n*i-3*n*n-3*n*a-6*i*i+3*i*a+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,u=3*n*n-6*n*i+n*a-n*e+2*i*i+2*i*e-a*e+3*r*r-6*r*o+r*s-r*t+2*o*o+2*o*t-s*t,d=1*n*i-n*n+n*e-i*e+r*o-r*r+r*t-o*t,p=[];this.solveCubic(l,c,u,d,p);for(var f=1e-7,h=[],g=0;g<6;g+=2)Math.abs(p[g+1])<f&&p[g]>=0&&p[g]<=1&&h.push(p[g]);h.push(1),h.push(0);for(var v,m,y,b=-1,C=0;C<h.length;C++)v=Math.pow(1-h[C],2)*n+2*(1-h[C])*h[C]*i+h[C]*h[C]*a,m=Math.pow(1-h[C],2)*r+2*(1-h[C])*h[C]*o+h[C]*h[C]*s,y=Math.pow(v-e,2)+Math.pow(m-t,2),b>=0?y<b&&(b=y,h[C]):(b=y,h[C]);return b},r.sqdistToFiniteLine=function(e,t,n,r,i,o){var a=[e-n,t-r],s=[i-n,o-r],l=s[0]*s[0]+s[1]*s[1],c=a[0]*a[0]+a[1]*a[1],u=a[0]*s[0]+a[1]*s[1],d=u*u/l;return u<0?c:d>l?(e-i)*(e-i)+(t-o)*(t-o):c-d},r.pointInsidePolygonPoints=function(e,t,n){for(var r,i,o,a,s=0,l=0;l<n.length/2;l++)if(r=n[2*l],i=n[2*l+1],l+1<n.length/2?(o=n[2*(l+1)],a=n[2*(l+1)+1]):(o=n[2*(l+1-n.length/2)],a=n[2*(l+1-n.length/2)+1]),r==e&&o==e);else{if(!(r>=e&&e>=o||r<=e&&e<=o))continue;(e-r)/(o-r)*(a-i)+i>t&&s++}return s%2!=0},r.pointInsidePolygon=function(e,t,n,i,o,a,s,l,c){var u,d,p=new Array(n.length);null!=l[0]?(u=Math.atan(l[1]/l[0]),l[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=l;for(var f=Math.cos(-u),h=Math.sin(-u),g=0;g<p.length/2;g++)p[2*g]=a/2*(n[2*g]*f-n[2*g+1]*h),p[2*g+1]=s/2*(n[2*g+1]*f+n[2*g]*h),p[2*g]+=i,p[2*g+1]+=o;if(c>0){var v=this.expandPolygon(p,-c);d=this.joinLines(v)}else d=p;return r.pointInsidePolygonPoints(e,t,d)},r.joinLines=function(e){for(var t,n,r,i,o,a,s,l,c=new Array(e.length/2),u=0;u<e.length/4;u++){t=e[4*u],n=e[4*u+1],r=e[4*u+2],i=e[4*u+3],u<e.length/4-1?(o=e[4*(u+1)],a=e[4*(u+1)+1],s=e[4*(u+1)+2],l=e[4*(u+1)+3]):(o=e[0],a=e[1],s=e[2],l=e[3]);var d=this.finiteLinesIntersect(t,n,r,i,o,a,s,l,!0);c[2*u]=d[0],c[2*u+1]=d[1]}return c},r.expandPolygon=function(e,t){for(var n,r,i,o,a=new Array(2*e.length),s=0;s<e.length/2;s++){n=e[2*s],r=e[2*s+1],s<e.length/2-1?(i=e[2*(s+1)],o=e[2*(s+1)+1]):(i=e[0],o=e[1]);var l=o-r,c=-(i-n),u=Math.sqrt(l*l+c*c),d=l/u,p=c/u;a[4*s]=n+d*t,a[4*s+1]=r+p*t,a[4*s+2]=i+d*t,a[4*s+3]=o+p*t}return a},r.intersectLineEllipse=function(e,t,n,r,i,o){var a=n-e,s=r-t;a/=i,s/=o;var l=Math.sqrt(a*a+s*s),c=l-1;if(c<0)return[];var u=c/l;return[(n-e)*u+e,(r-t)*u+t]},r.intersectLineCircle=function(e,t,n,r,i,o,a){var s=[n-e,r-t],l=[e-i,t-o],c=s[0]*s[0]+s[1]*s[1],u=2*(l[0]*s[0]+l[1]*s[1]),d=u*u-4*c*(l[0]*l[0]+l[1]*l[1]-a*a);if(d<0)return[];var p=(-u+Math.sqrt(d))/(2*c),f=(-u-Math.sqrt(d))/(2*c),h=Math.min(p,f),g=Math.max(p,f),v=[];if(h>=0&&h<=1&&v.push(h),g>=0&&g<=1&&v.push(g),0===v.length)return[];var m=v[0]*s[0]+e,y=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[m,y]:[m,y,v[1]*s[0]+e,v[1]*s[1]+t]:[m,y]},r.findCircleNearPoint=function(e,t,n,r,i){var o=r-e,a=i-t,s=Math.sqrt(o*o+a*a);return[e+o/s*n,t+a/s*n]},r.findMaxSqDistanceToOrigin=function(e){for(var t,n=1e-6,r=0;r<e.length/2;r++)(t=e[2*r]*e[2*r]+e[2*r+1]*e[2*r+1])>n&&(n=t);return n},r.midOfThree=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},r.finiteLinesIntersect=function(e,t,n,r,i,o,a,s,l){var c=e-i,u=n-e,d=a-i,p=t-o,f=r-t,h=s-o,g=d*p-h*c,v=u*p-f*c,m=h*u-d*f;if(0!==m){var y=g/m,b=v/m,C=.001,x=0-C,E=1+C;return x<=y&&y<=E&&x<=b&&b<=E||l?[e+y*u,t+y*f]:[]}return 0===g||0===v?this.midOfThree(e,n,a)===a?[a,s]:this.midOfThree(e,n,i)===i?[i,o]:this.midOfThree(i,a,n)===n?[n,r]:[]:[]},r.polygonIntersectLine=function(e,t,n,i,o,a,s,l){var c,u,d,p,f,h,g=[],v=new Array(n.length),m=!0;if(5===arguments.length&&(m=!1),m){for(var y=0;y<v.length/2;y++)v[2*y]=n[2*y]*a+i,v[2*y+1]=n[2*y+1]*s+o;if(l>0){var b=r.expandPolygon(v,-l);u=r.joinLines(b)}else u=v}else u=n;for(y=0;y<u.length/2;y++)d=u[2*y],p=u[2*y+1],y<u.length/2-1?(f=u[2*(y+1)],h=u[2*(y+1)+1]):(f=u[0],h=u[1]),0!==(c=this.finiteLinesIntersect(e,t,i,o,d,p,f,h)).length&&g.push(c[0],c[1]);return g},r.shortenIntersection=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(r[0]*r[0]+r[1]*r[1]),o=(i-n)/i;return o<0&&(o=1e-5),[t[0]+o*r[0],t[1]+o*r[1]]},r.generateUnitNgonPointsFitToSquare=function(e,t){var n=r.generateUnitNgonPoints(e,t);return r.fitPolygonToSquare(n)},r.fitPolygonToSquare=function(e){for(var t,n,r=e.length/2,i=1/0,o=1/0,a=-1/0,s=-1/0,l=0;l<r;l++)t=e[2*l],n=e[2*l+1],i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);var c=2/(a-i),u=2/(s-o);for(l=0;l<r;l++)t=e[2*l]=e[2*l]*c,n=e[2*l+1]=e[2*l+1]*u,i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);if(o<-1)for(l=0;l<r;l++)n=e[2*l+1]=e[2*l+1]+(-1-o);return e},r.generateUnitNgonPoints=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var i,o=new Array(2*e),a=0;a<e;a++)i=a*n+r,o[2*a]=Math.cos(i),o[2*a+1]=Math.sin(-i);return o},r.getRoundRectangleRadius=function(e,t){return Math.min(e/4,t/4,8)},r.getCutRectangleCornerLength=function(){return 8},t.exports=r},{}],94:[function(e,t,n){"use strict";var r=0,i=1,o=2,a=function(e){return this instanceof a?(this.id="Thenable/1.0.7",this.state=r,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},void("function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this)))):new a(e)};a.prototype={fulfill:function(e){return s(this,i,"fulfillValue",e)},reject:function(e){return s(this,o,"rejectReason",e)},then:function(e,t){var n=this,r=new a;return n.onFulfilled.push(u(e,r,"fulfill")),n.onRejected.push(u(t,r,"reject")),l(n),r.proxy}};var s=function(e,t,n,i){return e.state===r&&(e.state=t,e[n]=i,l(e)),e},l=function(e){e.state===i?c(e,"onFulfilled",e.fulfillValue):e.state===o&&c(e,"onRejected",e.rejectReason)},c=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e<r.length;e++)r[e](n)};"function"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},u=function(e,t,n){return function(r){if("function"!=typeof e)t[n].call(t,r);else{var i;try{i=e(r)}catch(e){return void t.reject(e)}d(t,i)}}},d=function(e,t){if(e!==t&&e.proxy!==t){var n;if("object"==typeof t&&null!==t||"function"==typeof t)try{n=t.then}catch(t){return void e.reject(t)}if("function"!=typeof n)e.fulfill(t);else{var r=!1;try{n.call(t,(function(n){r||(r=!0,n===t?e.reject(new TypeError("circular thenable chain")):d(e,n))}),(function(t){r||(r=!0,e.reject(t))}))}catch(t){r||e.reject(t)}}}else e.reject(new TypeError("cannot resolve promise with itself"))};a.all=function(e){return new a((function(t,n){for(var r=new Array(e.length),i=0,o=function(n,o){r[n]=o,++i===e.length&&t(r)},a=0;a<e.length;a++)!function(t){var r=e[t];null!=r&&null!=r.then?r.then((function(e){o(t,e)}),(function(e){n(e)})):o(t,r)}(a)}))},a.resolve=function(e){return new a((function(t,n){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},t.exports="undefined"!=typeof Promise?Promise:a},{}],95:[function(e,t,n){"use strict";var r=e("./is"),i=e("./util"),o=[{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:":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(e,t){return i.sort.descending(e.selector,t.selector)})),a=function(e,t){var n=a.lookup=a.lookup||function(){for(var e,t={},n=0;n<o.length;n++)t[(e=o[n]).selector]=e.matches;return t}();return n[e](t)},s="("+o.map((function(e){return e.selector})).join("|")+")",l=function(e){var t=this;t._private={selectorText:null,invalid:!0};var n=function(){return{length:0,classes:[],colonSelectors:[],data:[],group:null,ids:[],meta:[],collection:null,filter:null,parent:null,ancestor:null,subject:null,child:null,descendant:null}};if(!e||r.string(e)&&e.match(/^\s*$/))t.length=0;else if("*"===e||"edge"===e||"node"===e)t[0]=n(),t[0].group="*"===e?e:e+"s",t[0].groupOnly=!0,t[0].length=1,t._private.invalid=!1,t._private.selectorText=e,t.length=1;else if(r.elementOrCollection(e)){var o=e.collection();t[0]=n(),t[0].collection=o,t[0].length=1,t.length=1}else if(r.fn(e))t[0]=n(),t[0].filter=e,t[0].length=1,t.length=1;else{if(!r.string(e))return void i.error("A selector must be created from a string; found "+e);var a=null,l={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:i.regex.number,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$"};l.variable="(?:[\\w-]|(?:\\\\"+l.metaChar+"))+",l.value=l.string+"|"+l.number,l.className=l.variable,l.id=l.variable;var c,u,d,p=function(e){return e.replace(new RegExp("\\\\("+l.metaChar+")","g"),(function(e,t){return t}))};for(c=l.comparatorOp.split("|"),d=0;d<c.length;d++)u=c[d],l.comparatorOp+="|@"+u;for(c=l.comparatorOp.split("|"),d=0;d<c.length;d++)(u=c[d]).indexOf("!")>=0||"="!==u&&(l.comparatorOp+="|\\!"+u);var f=[{name:"group",query:!0,regex:"(node|edge|\\*)",populate:function(e){this.group="*"===e?e:e+"s"}},{name:"state",query:!0,regex:s,populate:function(e){this.colonSelectors.push(e)}},{name:"id",query:!0,regex:"\\#("+l.id+")",populate:function(e){this.ids.push(p(e))}},{name:"className",query:!0,regex:"\\.("+l.className+")",populate:function(e){this.classes.push(p(e))}},{name:"dataExists",query:!0,regex:"\\[\\s*("+l.variable+")\\s*\\]",populate:function(e){this.data.push({field:p(e)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+l.variable+")\\s*("+l.comparatorOp+")\\s*("+l.value+")\\s*\\]",populate:function(e,t,n){n=null!=new RegExp("^"+l.string+"$").exec(n)?n.substring(1,n.length-1):parseFloat(n),this.data.push({field:p(e),operator:t,value:n})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+l.boolOp+")\\s*("+l.variable+")\\s*\\]",populate:function(e,t){this.data.push({field:p(t),operator:e})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+l.meta+")\\s*("+l.comparatorOp+")\\s*("+l.number+")\\s*\\]\\]",populate:function(e,t,n){this.meta.push({field:p(e),operator:t,value:parseFloat(n)})}},{name:"nextQuery",separator:!0,regex:l.separator,populate:function(){t[++d]=n(),a=null}},{name:"child",separator:!0,regex:l.child,populate:function(){var e=n();e.parent=this,e.subject=a,t[d]=e}},{name:"descendant",separator:!0,regex:l.descendant,populate:function(){var e=n();e.ancestor=this,e.subject=a,t[d]=e}},{name:"subject",modifier:!0,regex:l.subject,populate:function(){return null!=a&&this.subject!=this?(i.error("Redefinition of subject in selector `"+e+"`"),!1):(a=this,void(this.subject=this))}}];t._private.selectorText=e;var h=e;d=0;var g,v=function(e){for(var t,n,i,o=0;o<f.length;o++){var a=f[o],s=a.name;if(!r.fn(e)||e(s,a)){var l=h.match(new RegExp("^"+a.regex));if(null!=l){n=l,t=a,i=s;var c=l[0];h=h.substring(c.length);break}}}return{expr:t,match:n,name:i}},m=function(){var e=h.match(/^\s+/);if(e){var t=e[0];h=h.substring(t.length)}};for(t[0]=n(),m();;){var y=v();if(null==y.expr)return void i.error("The selector `"+e+"`is invalid");var b=[];for(g=1;g<y.match.length;g++)b.push(y.match[g]);if(t[d].length++,!1===y.expr.populate.apply(t[d],b))return;if(h.match(/^\s*$/))break}for(t.length=d+1,g=0;g<t.length;g++){var C=t[g];if(null!=C.subject){for(;C.subject!=C;)if(null!=C.parent){var x=C.parent,E=C;E.parent=null,x.child=E,C=x}else{if(null==C.ancestor){i.error("When adjusting references for the selector `"+C+"`, neither parent nor ancestor was found");break}var S=C.ancestor,w=C;w.ancestor=null,S.descendant=w,C=S}t[g]=C.subject}}}t._private.invalid=!1},c=l.prototype;c.size=function(){return this.length},c.eq=function(e){return this[e]};var u=function(e,t){if(e.groupOnly)return"*"===e.group||e.group===t.group();if(null!=e.group&&"*"!=e.group&&e.group!=t.group())return!1;var n,i=t.cy(),o=!0;for(n=0;n<e.colonSelectors.length;n++){var s=e.colonSelectors[n];if(!(o=a(s,t)))break}if(!o)return!1;var l=!0;for(n=0;n<e.ids.length;n++){var c=e.ids[n],d=t.id();if(!(l=l&&c==d))break}if(!l)return!1;var p=!0;for(n=0;n<e.classes.length;n++){var f=e.classes[n];if(!(p=p&&t.hasClass(f)))break}if(!p)return!1;var h=function(t){for(var n=!0,i=0;i<e[t.name].length;i++){var o,a=e[t.name][i],s=a.operator,l=a.value,c=a.field,u=t.fieldValue(c);if(null!=s&&null!=l){var d=r.string(u)||r.number(u)?""+u:"",p=""+l,f=!1;s.indexOf("@")>=0&&(d=d.toLowerCase(),p=p.toLowerCase(),s=s.replace("@",""),f=!0);var h=!1;s.indexOf("!")>=0&&(s=s.replace("!",""),h=!0),f&&(l=p.toLowerCase(),u=d.toLowerCase());var g=!1;switch(s){case"*=":o=d.indexOf(p)>=0;break;case"$=":o=d.indexOf(p,d.length-p.length)>=0;break;case"^=":o=0===d.indexOf(p);break;case"=":o=u===l;break;case">":g=!0,o=u>l;break;case">=":g=!0,o=u>=l;break;case"<":g=!0,o=u<l;break;case"<=":g=!0,o=u<=l;break;default:o=!1}!h||null==u&&g||(o=!o)}else if(null!=s)switch(s){case"?":o=!!u;break;case"!":o=!u;break;case"^":o=void 0===u}else o=void 0!==u;if(!o){n=!1;break}}return n},g=h({name:"data",fieldValue:function(e){return t.data(e)}});if(!g)return!1;var v=h({name:"meta",fieldValue:function(e){return t[e]()}});if(!v)return!1;if(null!=e.collection&&!e.collection.hasElementWithId(t.id()))return!1;if(null!=e.filter&&t.collection().some(e.filter))return!1;var m=function(e,t){if(null!=e){var n=!1;if(!i.hasCompoundNodes())return!1;t=t();for(var r=0;r<t.length;r++)if(u(e,t[r])){n=!0;break}return n}return!0};return!!(m(e.parent,(function(){return t.parent()}))&&m(e.ancestor,(function(){return t.parents()}))&&m(e.child,(function(){return t.children()}))&&m(e.descendant,(function(){return t.descendants()})))};c.filter=function(e){var t=this,n=e.cy();if(t._private.invalid)return n.collection();if(1===t.length&&1===t[0].length&&1===t[0].ids.length)return e.getElementById(t[0].ids[0]).collection();var r=function(e){for(var n=0;n<t.length;n++){var r=t[n];if(u(r,e))return!0}return!1};return null==t._private.selectorText&&(r=function(){return!0}),e.filter(r)},c.matches=function(e){var t=this;if(t._private.invalid)return!1;for(var n=0;n<t.length;n++){var r=t[n];if(u(r,e))return!0}return!1},c.toString=c.selector=function(){for(var e="",t=function(e){return null==e?"":e},n=function(e){return r.string(e)?'"'+e+'"':t(e)},i=function(e){return" "+e+" "},o=function(e){var r,s="";e.subject===e&&(s+="$");var l=t(e.group);for(s+=l.substring(0,l.length-1),r=0;r<e.data.length;r++){var c=e.data[r];s+=c.value?"["+c.field+i(t(c.operator))+n(c.value)+"]":"["+t(c.operator)+c.field+"]"}for(r=0;r<e.meta.length;r++){var u=e.meta[r];s+="[["+u.field+i(t(u.operator))+n(u.value)+"]]"}for(r=0;r<e.colonSelectors.length;r++)s+=e.colonSelectors[a];for(r=0;r<e.ids.length;r++)s+="#"+e.ids[a];for(r=0;r<e.classes.length;r++)s+="."+e.classes[r];return null!=e.parent&&(s=o(e.parent)+" > "+s),null!=e.ancestor&&(s=o(e.ancestor)+" "+s),null!=e.child&&(s+=" > "+o(e.child)),null!=e.descendant&&(s+=" "+o(e.descendant)),s},a=0;a<this.length;a++){var s=this[a];e+=o(s),this.length>1&&a<this.length-1&&(e+=", ")}return e},t.exports=l},{"./is":91,"./util":108}],96:[function(e,t,n){function r(){this._obj={}}var i=r.prototype;i.add=function(e){this._obj[e]=1},i.remove=function(e){this._obj[e]=0},i.has=function(e){return 1===this._obj[e]},t.exports="undefined"!=typeof Set?Set:r},{}],97:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../promise"),a={apply:function(e){var t=this,n=t._private,r=n.cy.collection();n.newStyle&&(n.contextStyles={},n.propDiffs={},t.cleanElements(e,!0));for(var i=0;i<e.length;i++){var o=e[i],a=t.getContextMeta(o);if(!a.empty){r.merge(o);var s=t.getContextStyle(a),l=t.applyContextStyle(a,s,o);n.newStyle||t.updateTransitions(o,l.diffProps),t.updateStyleHints(o)}}return n.newStyle=!1,r},getPropertiesDiff:function(e,t){var n=this,r=n._private.propDiffs=n._private.propDiffs||{},i=e+"-"+t,o=r[i];if(o)return o;for(var a=[],s={},l=0;l<n.length;l++){var c=n[l],u="t"===e[l]!=("t"===t[l]),d=c.mappedProperties.length>0;if(u||d){var p;u&&d||u?p=c.properties:d&&(p=c.mappedProperties);for(var f=0;f<p.length;f++){for(var h=p[f],g=h.name,v=!1,m=l+1;m<n.length;m++){var y=n[m];if("t"===t[m]&&(v=null!=y.properties[h.name]))break}s[g]||v||(s[g]=!0,a.push(g))}}}return r[i]=a,a},getContextMeta:function(e){var t,n=this,r="",i=e._private.styleCxtKey||"";n._private.newStyle&&(i="");for(var o=0;o<n.length;o++){var a=n[o];r+=a.selector&&a.selector.matches(e)?"t":"f"}return t=n.getPropertiesDiff(i,r),e._private.styleCxtKey=r,{key:r,diffPropNames:t,empty:0===t.length}},getContextStyle:function(e){var t=e.key,n=this,r=this._private.contextStyles=this._private.contextStyles||{};if(r[t])return r[t];for(var i={_private:{key:t}},o=0;o<n.length;o++){var a=n[o];if("t"===t[o])for(var s=0;s<a.properties.length;s++){var l=a.properties[s];i[l.name]=l}}return r[t]=i,i},applyContextStyle:function(e,t,n){for(var r=this,i=e.diffPropNames,o={},a=0;a<i.length;a++){var s=i[a],l=t[s],c=n.pstyle(s);if(!l){if(!c)continue;l=c.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(c!==l){var u=o[s]={prev:c};r.applyParsedProperty(n,l),u.next=n.pstyle(s),u.next&&u.next.bypass&&(u.next=u.next.bypassed)}}return{diffProps:o}},updateStyleHints:function(e){var t=e._private,n=this;if(!e.removed()){var r=!1;if("nodes"===t.group)for(var i=1;i<=n.pieBackgroundN;i++)if((u=e.pstyle("pie-"+i+"-background-size").value)>0){r=!0;break}t.hasPie=r;var o=e.pstyle("text-transform").strValue,a=e.pstyle("label").strValue,s=e.pstyle("source-label").strValue,l=e.pstyle("target-label").strValue,c=e.pstyle("font-style").strValue,u=e.pstyle("font-size").pfValue+"px",d=e.pstyle("font-family").strValue,p=e.pstyle("font-weight").strValue,f=c+"$"+u+"$"+d+"$"+p+"$"+o+"$"+e.pstyle("text-valign").strValue+"$"+e.pstyle("text-valign").strValue+"$"+e.pstyle("text-outline-width").pfValue+"$"+e.pstyle("text-wrap").strValue+"$"+e.pstyle("text-max-width").pfValue;t.labelStyleKey=f,t.sourceLabelKey=f+"$"+s,t.targetLabelKey=f+"$"+l,t.labelKey=f+"$"+a,t.fontKey=c+"$"+p+"$"+u+"$"+d,t.styleKey=Date.now()}},applyParsedProperty:function(e,t){var n,o=this,a=t,s=e._private.style,l=o.types,c=o.properties[a.name].type,u=a.bypass,d=s[a.name],p=d&&d.bypass,f=e._private,h="mapping";if("curve-style"===t.name&&"haystack"===t.value&&e.isEdge()&&(e.isLoop()||e.source().isParent()||e.target().isParent())&&(a=t=this.parse(t.name,"bezier",u)),a.delete)return s[a.name]=void 0,!0;if(a.deleteBypassed)return!d||!!d.bypass&&(d.bypassed=void 0,!0);if(a.deleteBypass)return!d||!!d.bypass&&(s[a.name]=d.bypassed,!0);var g=function(){r.error("Do not assign mappings to elements without corresponding data (e.g. ele `"+e.id()+"` for property `"+a.name+"` with data field `"+a.field+"`); try a `["+a.field+"]` selector to limit scope to elements with `"+a.field+"` defined")};switch(a.mapped){case l.mapData:for(var v=a.field.split("."),m=f.data,y=0;y<v.length&&m;y++)m=m[v[y]];var b;if((b=i.number(m)?(m-a.fieldMin)/(a.fieldMax-a.fieldMin):0)<0?b=0:b>1&&(b=1),c.color){var C=a.valueMin[0],x=a.valueMax[0],E=a.valueMin[1],S=a.valueMax[1],w=a.valueMin[2],V=a.valueMax[2],R=null==a.valueMin[3]?1:a.valueMin[3],O=null==a.valueMax[3]?1:a.valueMax[3],A=[Math.round(C+(x-C)*b),Math.round(E+(S-E)*b),Math.round(w+(V-w)*b),Math.round(R+(O-R)*b)];n={bypass:a.bypass,name:a.name,value:A,strValue:"rgb("+A[0]+", "+A[1]+", "+A[2]+")"}}else{if(!c.number)return!1;var k=a.valueMin+(a.valueMax-a.valueMin)*b;n=this.parse(a.name,k,a.bypass,h)}n||(n=this.parse(a.name,d.strValue,a.bypass,h)),n||g(),n.mapping=a,a=n;break;case l.data:if(v=a.field.split("."),m=f.data)for(y=0;y<v.length;y++)m=m[v[y]];if(!(n=this.parse(a.name,m,a.bypass,h))){var T=d?d.strValue:"";n=this.parse(a.name,T,a.bypass,h)}n||g(),n.mapping=a,a=n;break;case l.fn:var D=(0,a.value)(e);(n=this.parse(a.name,D,a.bypass,h)).mapping=a,a=n;break;case void 0:break;default:return!1}return u?(a.bypassed=p?d.bypassed:d,s[a.name]=a):p?d.bypassed=a:s[a.name]=a,this.checkZOrderTrigger(e,a.name,d?d.value:null,a.value),!0},cleanElements:function(e,t){for(var n=this.properties,r=0;r<e.length;r++){var i=e[r];if(t)for(var o=i._private.style,a=0;a<n.length;a++){var s=n[a],l=o[s.name];l&&(l.bypass?l.bypassed=null:o[s.name]=null)}else i._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateMappers:function(e){for(var t=this,n=this._private.cy.collection(),r=0;r<e.length;r++){for(var i=e[r],o=i._private.style,a=!1,s=0;s<t.properties.length;s++){var l=o[t.properties[s].name];if(l&&l.mapping){var c=l.mapping;this.applyParsedProperty(i,c),a=!0}}a&&(this.updateStyleHints(i),n.merge(i))}return n},updateTransitions:function(e,t,n){var r=this,a=e._private,s=e.pstyle("transition-property").value,l=e.pstyle("transition-duration").pfValue,c=e.pstyle("transition-delay").pfValue;if(s.length>0&&l>0){for(var u={},d=!1,p=0;p<s.length;p++){var f=s[p],h=e.pstyle(f),g=t[f];if(g){var v,m=g.prev,y=null!=g.next?g.next:h,b=!1,C=1e-6;m&&(i.number(m.pfValue)&&i.number(y.pfValue)?(b=y.pfValue-m.pfValue,v=m.pfValue+C*b):i.number(m.value)&&i.number(y.value)?(b=y.value-m.value,v=m.value+C*b):i.array(m.value)&&i.array(y.value)&&(b=m.value[0]!==y.value[0]||m.value[1]!==y.value[1]||m.value[2]!==y.value[2],v=m.strValue),b&&(u[f]=y.strValue,this.applyBypass(e,f,v),d=!0))}}if(!d)return;a.transitioning=!0,new o((function(t){c>0?e.delayAnimation(c).play().promise().then(t):t()})).then((function(){return e.animation({style:u,duration:l,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){r.removeBypasses(e,s),e.rtrigger("style"),a.transitioning=!1}))}else a.transitioning&&(this.removeBypasses(e,s),e.rtrigger("style"),a.transitioning=!1)},checkZOrderTrigger:function(e,t,n,r){var i=this.properties[t];i.triggersZOrder&&(null==n||i.triggersZOrder(n,r))&&this._private.cy.notify({type:"zorder",eles:e})}};t.exports=a},{"../is":91,"../promise":94,"../util":108}],98:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o={applyBypass:function(e,t,n,o){var a=this,s=[],l=!0;if("*"===t||"**"===t){if(void 0!==n)for(var c=0;c<a.properties.length;c++)t=(f=a.properties[c]).name,(p=this.parse(t,n,!0))&&s.push(p)}else if(r.string(t))(p=this.parse(t,n,!0))&&s.push(p);else{if(!r.plainObject(t))return!1;var u=t;o=n;var d=Object.keys(u);for(c=0;c<d.length;c++){t=d[c];var p,f=a.properties[t];void 0===(n=u[t])&&(n=u[i.dash2camel(t)]),void 0!==n&&(p=this.parse(t,n,!0))&&s.push(p)}}if(0===s.length)return!1;var h=!1;for(c=0;c<e.length;c++){for(var g,v=e[c],m={},y=0;y<s.length;y++){if(f=s[y],o){var b=v.pstyle(f.name);g=m[f.name]={prev:b}}h=this.applyParsedProperty(v,f)||h,o&&(g.next=v.pstyle(f.name))}h&&this.updateStyleHints(v),o&&this.updateTransitions(v,m,l)}return h},overrideBypass:function(e,t,n){t=i.camel2dash(t);for(var r=0;r<e.length;r++){var o=e[r],a=o._private.style[t],s=this.properties[t].type,l=s.color,c=s.mutiple;if(a&&a.bypass){var u=null!=a.pfValue?a.pfValue:a.value;a.value=n,null!=a.pfValue&&(a.pfValue=n),a.strValue=l?"rgb("+n.join(",")+")":c?n.join(" "):""+n,this.checkZOrderTrigger(o,t,u,n)}else this.applyBypass(o,t,n)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,n){for(var r=!0,i=0;i<e.length;i++){for(var o=e[i],a={},s=0;s<t.length;s++){var l=t[s],c=this.properties[l],u=o.pstyle(c.name);if(u&&u.bypass){var d="",p=this.parse(l,d,!0),f=a[c.name]={prev:u};this.applyParsedProperty(o,p),f.next=o.pstyle(c.name)}}this.updateStyleHints(o),n&&this.updateTransitions(o,a,r)}}};t.exports=o},{"../is":91,"../util":108}],99:[function(e,t,n){"use strict";var r=e("../window"),i={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy.container();if(r&&t&&r.getComputedStyle)return r.getComputedStyle(t).getPropertyValue(e)}};t.exports=i},{"../window":116}],100:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){var n=this;if(e=e[0]){for(var i={},o=0;o<n.properties.length;o++){var a=n.properties[o],s=n.getStylePropertyValue(e,a.name,t);null!=s&&(i[a.name]=s,i[r.dash2camel(a.name)]=s)}return i}},getIndexedStyle:function(e,t,n,r){var i=e.pstyle(t)[n][r];return null!=i?i:e.cy().style().getDefaultProperty(t)[n][0]},getStylePropertyValue:function(e,t,n){var r=this;if(e=e[0]){var i=r.properties[t];i.alias&&(i=i.pointsTo);var o=i.type,a=e.pstyle(i.name),s=e.cy().zoom();if(a){var l=a.units?o.implicitUnits||"px":null,c=l?[].concat(a.pfValue).map((function(e){return e*(n?s:1)+l})).join(" "):a.strValue;return c}}},getAnimationStartStyle:function(e,t){for(var n={},r=0;r<t.length;r++){var o=t[r].name,a=e.pstyle(o);void 0!==a&&(a=i.plainObject(a)?this.parse(o,a.strValue):this.parse(o,a)),a&&(n[o]=a)}return n},getPropsList:function(e){var t=[],n=e,i=this.properties;if(n)for(var o=Object.keys(n),a=0;a<o.length;a++){var s=o[a],l=n[s],c=i[s]||i[r.camel2dash(s)],u=this.parse(c.name,l);u&&t.push(u)}return t}};t.exports=o},{"../is":91,"../util":108}],101:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../selector"),a=function(e){return this instanceof a?r.core(e)?(this._private={cy:e,coreStyle:{}},this.length=0,void this.resetToDefault()):void i.error("A style must have a core reference"):new a(e)},s=a.prototype;s.instanceString=function(){return"style"},s.clear=function(){for(var e=0;e<this.length;e++)this[e]=void 0;return this.length=0,this._private.newStyle=!0,this},s.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},s.core=function(){return this._private.coreStyle},s.selector=function(e){var t="core"===e?null:new o(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},s.css=function(){var e=this,t=arguments;switch(t.length){case 1:for(var n=t[0],r=0;r<e.properties.length;r++){var o=e.properties[r],a=n[o.name];void 0===a&&(a=n[i.dash2camel(o.name)]),void 0!==a&&this.cssRule(o.name,a)}break;case 2:this.cssRule(t[0],t[1])}return this},s.style=s.css,s.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.mapped&&this[r].mappedProperties.push(n),!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},a.fromJson=function(e,t){var n=new a(e);return n.fromJson(t),n},a.fromString=function(e,t){return new a(e).fromString(t)},[e("./apply"),e("./bypass"),e("./container"),e("./get-for-ele"),e("./json"),e("./string-sheet"),e("./properties"),e("./parse")].forEach((function(e){i.extend(s,e)})),a.types=s.types,a.properties=s.properties,t.exports=a},{"../is":91,"../selector":95,"../util":108,"./apply":97,"./bypass":98,"./container":99,"./get-for-ele":100,"./json":102,"./parse":103,"./properties":104,"./string-sheet":105}],102:[function(e,t,n){"use strict";var r={applyFromJson:function(e){for(var t=this,n=0;n<e.length;n++){var r=e[n],i=r.selector,o=r.style||r.css,a=Object.keys(o);t.selector(i);for(var s=0;s<a.length;s++){var l=a[s],c=o[l];t.css(l,c)}}return t},fromJson:function(e){var t=this;return t.resetToDefault(),t.applyFromJson(e),t},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var n=this[t],r=n.selector,i=n.properties,o={},a=0;a<i.length;a++){var s=i[a];o[s.name]=s.strValue}e.push({selector:r?r.toString():"core",style:o})}return e}};t.exports=r},{}],103:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../math"),a={parse:function(e,t,n,o){var a=this;if(i.fn(t))return a.parseImplWarn(e,t,n,o);var s,l=[e,t,n,"mapping"===o||!0===o||!1===o||null==o?"dontcare":o].join("$"),c=a.propCache=a.propCache||{};return(s=c[l])||(s=c[l]=a.parseImplWarn(e,t,n,o)),(n||"mapping"===o)&&(s=r.copy(s))&&(s.value=r.copy(s.value)),s},parseImplWarn:function(e,t,n,i){var o=this.parseImpl(e,t,n,i);return o||null==t||r.error("The style property `%s: %s` is invalid",e,t),o},parseImpl:function(e,t,n,a){var s=this;e=r.camel2dash(e);var l=s.properties[e],c=t,u=s.types;if(!l)return null;if(null==t)return null;l.alias&&(l=l.pointsTo,e=l.name);var d=i.string(t);d&&(t=t.trim());var p,f,h=l.type;if(!h)return null;if(n&&(""===t||null===t))return{name:e,value:t,bypass:!0,deleteBypass:!0};if(i.fn(t))return{name:e,value:t,strValue:"fn",mapped:u.fn,bypass:n};if(!d||a);else{if(p=new RegExp(u.data.regex).exec(t)){if(n)return!1;var g=u.data;return{name:e,value:p,strValue:""+t,mapped:g,field:p[1],bypass:n}}if(f=new RegExp(u.mapData.regex).exec(t)){if(n)return!1;if(h.multiple)return!1;if(g=u.mapData,!h.color&&!h.number)return!1;var v=this.parse(e,f[4]);if(!v||v.mapped)return!1;var m=this.parse(e,f[5]);if(!m||m.mapped)return!1;if(v.value===m.value)return!1;if(h.color){var y=v.value,b=m.value;if(!(y[0]!==b[0]||y[1]!==b[1]||y[2]!==b[2]||y[3]!==b[3]&&(null!=y[3]&&1!==y[3]||null!=b[3]&&1!==b[3])))return!1}return{name:e,value:f,strValue:""+t,mapped:g,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:v.value,valueMax:m.value,bypass:n}}}if(h.multiple&&"multiple"!==a){var C;if(C=d?t.split(/\s+/):i.array(t)?t:[t],h.evenMultiple&&C.length%2!=0)return null;for(var x=[],E=[],S=[],w=!1,V=0;V<C.length;V++){var R=s.parse(e,C[V],n,"multiple");w=w||i.string(R.value),x.push(R.value),S.push(null!=R.pfValue?R.pfValue:R.value),E.push(R.units)}return h.validate&&!h.validate(x,E)?null:h.singleEnum&&w?1===x.length&&i.string(x[0])?{name:e,value:x[0],strValue:x[0],bypass:n}:null:{name:e,value:x,pfValue:S,strValue:x.join(" "),bypass:n,units:E}}var O=function(){for(var r=0;r<h.enums.length;r++)if(h.enums[r]===t)return{name:e,value:t,strValue:""+t,bypass:n};return null};if(h.number){var A,k="px";if(h.units&&(A=h.units),h.implicitUnits&&(k=h.implicitUnits),!h.unitless)if(d){var T="px|em"+(h.allowPercent?"|\\%":"");A&&(T=A);var D=t.match("^("+r.regex.number+")("+T+")?$");D&&(t=D[1],A=D[2]||k)}else A&&!h.implicitUnits||(A=k);if(t=parseFloat(t),isNaN(t)&&void 0===h.enums)return null;if(isNaN(t)&&void 0!==h.enums)return t=c,O();if(h.integer&&!i.integer(t))return null;if(void 0!==h.min&&(t<h.min||h.strictMin&&t===h.min)||void 0!==h.max&&(t>h.max||h.strictMax&&t===h.max))return null;var N={name:e,value:t,strValue:""+t+(A||""),units:A,bypass:n};return h.unitless||"px"!==A&&"em"!==A?N.pfValue=t:N.pfValue="px"!==A&&A?this.getEmSizeInPixels()*t:t,"ms"!==A&&"s"!==A||(N.pfValue="ms"===A?t:1e3*t),"deg"!==A&&"rad"!==A||(N.pfValue="rad"===A?t:o.deg2rad(t)),"%"===A&&(N.pfValue=t/100),N}if(h.propList){var P=[],B=""+t;if("none"===B);else{var _=B.split(",");for(V=0;V<_.length;V++){var M=_[V].trim();s.properties[M]&&P.push(M)}if(0===P.length)return null}return{name:e,value:P,strValue:0===P.length?"none":P.join(", "),bypass:n}}if(h.color){var I=r.color2tuple(t);return I?{name:e,value:I,pfValue:I,strValue:""+t,bypass:n}:null}if(h.regex||h.regexes){if(h.enums){var F=O();if(F)return F}var L=h.regexes?h.regexes:[h.regex];for(V=0;V<L.length;V++){var W=new RegExp(L[V]).exec(t);if(W)return{name:e,value:h.singleRegexMatchValue?W[1]:W,strValue:""+t,bypass:n}}return null}return h.string?{name:e,value:""+t,strValue:""+t,bypass:n}:h.enums?O():null}};t.exports=a},{"../is":91,"../math":93,"../util":108}],104:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={};!function(){var e=r.regex.number,t=r.regex.rgbaNoBackRefs,n=r.regex.hslaNoBackRefs,a=r.regex.hex3,s=r.regex.hex6,l=function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},c=function(r){var i=e+"|\\w+|"+t+"|"+n+"|"+a+"|"+s;return"^"+r+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+e+")\\s*\\,\\s*("+e+")\\s*,\\s*("+i+")\\s*\\,\\s*("+i+")\\)$"},u=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];o.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},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},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},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},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"],multiple:!0},bgClip:{enums:["none","node"]},color:{color:!0},bool:{enums:["yes","no"]},lineStyle:{enums:["solid","dotted","dashed"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontVariant:{enums:["small-caps","normal"]},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"]},textBackgroundShape:{enums:["rectangle","roundrectangle"]},nodeShape:{enums:["rectangle","roundrectangle","cutrectangle","ellipse","triangle","square","pentagon","hexagon","heptagon","octagon","star","diamond","vee","rhomboid","polygon"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","triangle-cross","triangle-backcurve","half-triangle-overshot","vee","square","circle","diamond","none"]},arrowFill:{enums:["filled","hollow"]},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"]},text:{string:!0},data:{mapping:!0,regex:l("data")},layoutData:{mapping:!0,regex:l("layoutData")},scratch:{mapping:!0,regex:l("scratch")},mapData:{mapping:!0,regex:c("mapData")},mapLayoutData:{mapping:!0,regex:c("mapLayoutData")},mapScratch:{mapping:!0,regex:c("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:u,singleRegexMatchValue:!0},urls:{regexes:u,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"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-line"],singleEnum:!0,validate:function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return i.string(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\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"]}};var d={zeroNonZero:function(e,t){return 0===e&&0!==t||0!==e&&0===t},anyDiff:function(e,t){return e!==t}},p=d,f=o.types,h=o.properties=[{name:"label",type:f.text},{name:"text-rotation",type:f.textRotation},{name:"text-margin-x",type:f.bidirectionalSize},{name:"text-margin-y",type:f.bidirectionalSize},{name:"source-label",type:f.text},{name:"source-text-rotation",type:f.textRotation},{name:"source-text-margin-x",type:f.bidirectionalSize},{name:"source-text-margin-y",type:f.bidirectionalSize},{name:"source-text-offset",type:f.size},{name:"target-label",type:f.text},{name:"target-text-rotation",type:f.textRotation},{name:"target-text-margin-x",type:f.bidirectionalSize},{name:"target-text-margin-y",type:f.bidirectionalSize},{name:"target-text-offset",type:f.size},{name:"text-valign",type:f.valign},{name:"text-halign",type:f.halign},{name:"color",type:f.color},{name:"text-outline-color",type:f.color},{name:"text-outline-width",type:f.size},{name:"text-outline-opacity",type:f.zeroOneNumber},{name:"text-opacity",type:f.zeroOneNumber},{name:"text-background-color",type:f.color},{name:"text-background-opacity",type:f.zeroOneNumber},{name:"text-background-padding",type:f.size},{name:"text-border-opacity",type:f.zeroOneNumber},{name:"text-border-color",type:f.color},{name:"text-border-width",type:f.size},{name:"text-border-style",type:f.borderStyle},{name:"text-background-shape",type:f.textBackgroundShape},{name:"text-transform",type:f.textTransform},{name:"text-wrap",type:f.textWrap},{name:"text-max-width",type:f.size},{name:"text-events",type:f.bool},{name:"font-family",type:f.fontFamily},{name:"font-style",type:f.fontStyle},{name:"font-weight",type:f.fontWeight},{name:"font-size",type:f.size},{name:"min-zoomed-font-size",type:f.size},{name:"events",type:f.bool},{name:"display",type:f.display,triggersZOrder:p.anyDiff},{name:"visibility",type:f.visibility,triggersZOrder:p.anyDiff},{name:"opacity",type:f.zeroOneNumber,triggersZOrder:p.zeroNonZero},{name:"z-compound-depth",type:f.zCompoundDepth,triggersZOrder:p.anyDiff},{name:"z-index-compare",type:f.zIndexCompare,triggersZOrder:p.anyDiff},{name:"z-index",type:f.nonNegativeInt,triggersZOrder:p.anyDiff},{name:"overlay-padding",type:f.size},{name:"overlay-color",type:f.color},{name:"overlay-opacity",type:f.zeroOneNumber},{name:"transition-property",type:f.propList},{name:"transition-duration",type:f.time},{name:"transition-delay",type:f.time},{name:"transition-timing-function",type:f.easing},{name:"height",type:f.nodeSize},{name:"width",type:f.nodeSize},{name:"shape",type:f.nodeShape},{name:"shape-polygon-points",type:f.polygonPointList},{name:"background-color",type:f.color},{name:"background-opacity",type:f.zeroOneNumber},{name:"background-blacken",type:f.nOneOneNumber},{name:"padding",type:f.sizeMaybePercent},{name:"padding-relative-to",type:f.paddingRelativeTo},{name:"border-color",type:f.color},{name:"border-opacity",type:f.zeroOneNumber},{name:"border-width",type:f.size},{name:"border-style",type:f.borderStyle},{name:"background-image",type:f.urls},{name:"background-image-crossorigin",type:f.bgCrossOrigin},{name:"background-image-opacity",type:f.zeroOneNumbers},{name:"background-position-x",type:f.bgPos},{name:"background-position-y",type:f.bgPos},{name:"background-width-relative-to",type:f.bgRelativeTo},{name:"background-height-relative-to",type:f.bgRelativeTo},{name:"background-repeat",type:f.bgRepeat},{name:"background-fit",type:f.bgFit},{name:"background-clip",type:f.bgClip},{name:"background-width",type:f.bgWH},{name:"background-height",type:f.bgWH},{name:"position",type:f.position},{name:"compound-sizing-wrt-labels",type:f.compoundIncludeLabels},{name:"min-width",type:f.size},{name:"min-width-bias-left",type:f.sizeMaybePercent},{name:"min-width-bias-right",type:f.sizeMaybePercent},{name:"min-height",type:f.size},{name:"min-height-bias-top",type:f.sizeMaybePercent},{name:"min-height-bias-bottom",type:f.sizeMaybePercent},{name:"line-style",type:f.lineStyle},{name:"line-color",type:f.color},{name:"curve-style",type:f.curveStyle},{name:"haystack-radius",type:f.zeroOneNumber},{name:"source-endpoint",type:f.edgeEndpoint},{name:"target-endpoint",type:f.edgeEndpoint},{name:"control-point-step-size",type:f.size},{name:"control-point-distances",type:f.bidirectionalSizes},{name:"control-point-weights",type:f.numbers},{name:"segment-distances",type:f.bidirectionalSizes},{name:"segment-weights",type:f.numbers},{name:"edge-distances",type:f.edgeDistances},{name:"arrow-scale",type:f.positiveNumber},{name:"loop-direction",type:f.angle},{name:"loop-sweep",type:f.angle},{name:"source-distance-from-node",type:f.size},{name:"target-distance-from-node",type:f.size},{name:"selection-box-color",type:f.color},{name:"selection-box-opacity",type:f.zeroOneNumber},{name:"selection-box-border-color",type:f.color},{name:"selection-box-border-width",type:f.size},{name:"active-bg-color",type:f.color},{name:"active-bg-opacity",type:f.zeroOneNumber},{name:"active-bg-size",type:f.size},{name:"outside-texture-bg-color",type:f.color},{name:"outside-texture-bg-opacity",type:f.zeroOneNumber}],g=o.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{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"}];o.pieBackgroundN=16,h.push({name:"pie-size",type:f.sizeMaybePercent});for(var v=1;v<=o.pieBackgroundN;v++)h.push({name:"pie-"+v+"-background-color",type:f.color}),h.push({name:"pie-"+v+"-background-size",type:f.percent}),h.push({name:"pie-"+v+"-background-opacity",type:f.zeroOneNumber});var m=o.arrowPrefixes=["source","mid-source","target","mid-target"];for([{name:"arrow-shape",type:f.arrowShape},{name:"arrow-color",type:f.color},{name:"arrow-fill",type:f.arrowFill}].forEach((function(e){m.forEach((function(t){var n=t+"-"+e.name,r=e.type;h.push({name:n,type:r})}))}),{}),o.propertyNames=h.map((function(e){return e.name})),v=0;v<h.length;v++){var y=h[v];h[y.name]=y}for(v=0;v<g.length;v++){var b=g[v],C=h[b.pointsTo],x={name:b.name,alias:!0,pointsTo:C};h.push(x),h[b.name]=x}}(),o.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},o.getDefaultProperties=r.memoize((function(){for(var e=r.extend({events:"yes","text-events":"no","text-valign":"top","text-halign":"center",color:"#000","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-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,"transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-position-x":"50%","background-position-y":"50%","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",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1",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%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce((function(e,t){for(var n=1;n<=o.pieBackgroundN;n++){var r=t.name.replace("{{i}}",n),i=t.value;e[r]=i}return e}),{}),{"line-style":"solid","line-color":"#999","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"edge-distances":"intersection","curve-style":"bezier","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"},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"}].reduce((function(e,t){return o.arrowPrefixes.forEach((function(n){var r=n+"-"+t.name,i=t.value;e[r]=i})),e}),{})),t={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var a=i.name,s=e[a],l=this.parse(a,s);t[a]=l}}return t})),o.addDefaultStylesheet=function(){this.selector("$node > node").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3,"curve-style":"haystack"}).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("node:parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}).selector("core").css({"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}),this.defaultLength=this.length},t.exports=o},{"../is":91,"../util":108}],105:[function(e,t,n){"use strict";var r=e("../util"),i=e("../selector"),o={applyFromString:function(e){function t(){u=u.length>o.length?u.substr(o.length):""}function n(){a=a.length>s.length?a.substr(s.length):""}var o,a,s,l=this,c=this,u=""+e;for(u=u.replace(/[\/][*](\s|.)+?[*][\/]/g,"");!u.match(/^\s*$/);){var d=u.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){r.error("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+u);break}o=d[0];var p=d[1];if("core"!==p&&new i(p)._private.invalid)r.error("Skipping parsing of block: Invalid selector found in string stylesheet: "+p),t();else{var f=d[2],h=!1;a=f;for(var g=[];!a.match(/^\s*$/);){var v=a.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!v){r.error("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+f),h=!0;break}s=v[0];var m=v[1],y=v[2];(C=l.properties[m])?c.parse(m,y)?(g.push({name:m,val:y}),n()):(r.error("Skipping property: Invalid property definition in: "+s),n()):(r.error("Skipping property: Invalid property name in: "+s),n())}if(h){t();break}c.selector(p);for(var b=0;b<g.length;b++){var C=g[b];c.css(C.name,C.val)}t()}}return c},fromString:function(e){var t=this;return t.resetToDefault(),t.applyFromString(e),t}};t.exports=o},{"../selector":95,"../util":108}],106:[function(e,t,n){"use strict";var r=e("./is"),i=e("./util"),o=e("./style"),a=function(){return this instanceof a?void(this.length=0):new a},s=a.prototype;s.instanceString=function(){return"stylesheet"},s.selector=function(e){return this[this.length++]={selector:e,properties:[]},this},s.css=function(e,t){var n=this.length-1;if(r.string(e))this[n].properties.push({name:e,value:t});else if(r.plainObject(e))for(var a=e,s=0;s<o.properties.length;s++){var l=o.properties[s],c=a[l.name];void 0===c&&(c=a[i.dash2camel(l.name)]),void 0!==c&&(e=l.name,t=c,this[n].properties.push({name:e,value:t}))}return this},s.style=s.css,s.generateStyle=function(e){for(var t=new o(e),n=0;n<this.length;n++){var r=this[n],i=r.selector,a=r.properties;t.selector(i);for(var s=0;s<a.length;s++){var l=a[s];t.css(l.name,l.value)}}return t},t.exports=a},{"./is":91,"./style":101,"./util":108}],107:[function(e,t,n){"use strict";var r=e("../is");t.exports={hex2tuple:function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t,n,r,i=16;return 4===e.length?(t=parseInt(e[1]+e[1],i),n=parseInt(e[2]+e[2],i),r=parseInt(e[3]+e[3],i)):(t=parseInt(e[1]+e[2],i),n=parseInt(e[3]+e[4],i),r=parseInt(e[5]+e[6],i)),[t,n,r]}},hsl2tuple:function(e){function t(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n,r,i,o,a,s,l,c,u=new RegExp("^"+this.regex.hsla+"$").exec(e);if(u){if((r=parseInt(u[1]))<0?r=(360- -1*r%360)%360:r>360&&(r%=360),r/=360,(i=parseFloat(u[2]))<0||i>100)return;if(i/=100,(o=parseFloat(u[3]))<0||o>100)return;if(o/=100,void 0!==(a=u[4])&&((a=parseFloat(a))<0||a>1))return;if(0===i)s=l=c=Math.round(255*o);else{var d=o<.5?o*(1+i):o+i-o*i,p=2*o-d;s=Math.round(255*t(p,d,r+1/3)),l=Math.round(255*t(p,d,r)),c=Math.round(255*t(p,d,r-1/3))}n=[s,l,c,a]}return n},rgb2tuple:function(e){var t,n=new RegExp("^"+this.regex.rgba+"$").exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var o=n[i];if("%"===o[o.length-1]&&(r[i]=!0),o=parseFloat(o),r[i]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t},colorname2tuple:function(e){return this.colors[e.toLowerCase()]},color2tuple:function(e){return(r.array(e)?e:null)||this.colorname2tuple(e)||this.hex2tuple(e)||this.rgb2tuple(e)||this.hsl2tuple(e)},colors:{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]}}},{"../is":91}],108:[function(e,t,n){"use strict";var r=e("../is"),i=e("../math"),o={trueify:function(){return!0},falsify:function(){return!1},zeroify:function(){return 0},noop:function(){},error:function(e){console.error?(console.error.apply(console,arguments),console.trace&&console.trace()):(console.log.apply(console,arguments),console.trace&&console.trace())},clone:function(e){return this.extend({},e)},copy:function(e){return null==e?e:r.array(e)?e.slice():r.plainObject(e)?this.clone(e):e},clonePosition:function(e){return{x:e.x,y:e.y}},uuid: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}};o.makeBoundingBox=i.makeBoundingBox.bind(i),o._staticEmptyObject={},o.staticEmptyObject=function(){return o._staticEmptyObject},o.extend=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(r)for(var i=Object.keys(r),o=0;o<i.length;o++){var a=i[o];e[a]=r[a]}}return e},o.default=function(e,t){return void 0===e?t:e},o.removeFromArray=function(e,t,n){for(var r=e.length;r>=0&&(e[r]!==t||(e.splice(r,1),n));r--);},o.clearArray=function(e){e.splice(0,e.length)},o.push=function(e){var t=Array.prototype.slice.call(arguments,1);Array.prototype.push.apply(e,t)},o.getPrefixedProperty=function(e,t,n){return n&&(t=this.prependCamel(n,t)),e[t]},o.setPrefixedProperty=function(e,t,n,r){n&&(t=this.prependCamel(n,t)),e[t]=r},[e("./colors"),e("./maps"),{memoize:e("./memoize")},e("./regex"),e("./strings"),e("./timing"),e("./sort")].forEach((function(e){o.extend(o,e)})),t.exports=o},{"../is":91,"../math":93,"./colors":107,"./maps":109,"./memoize":110,"./regex":111,"./sort":112,"./strings":113,"./timing":114}],109:[function(e,t,n){"use strict";var r=e("../is");t.exports={mapEmpty:function(e){var t=!0;return null!=e?0===Object.keys(e).length:t},pushMap:function(e){var t=this.getMap(e);null==t?this.setMap(this.extend({},e,{value:[e.value]})):t.push(e.value)},setMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];r.plainObject(a)&&this.error("Tried to set map with object key"),o<n.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},getMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];if(r.plainObject(a)&&this.error("Tried to get map with object key"),null==(t=t[a]))return t}return t},deleteMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=e.keepChildren,a=0;a<i;a++){var s=n[a];if(r.plainObject(s)&&this.error("Tried to delete map with object key"),a===e.keys.length-1)if(o)for(var l=Object.keys(t),c=0;c<l.length;c++){var u=l[c];o[u]||(t[u]=void 0)}else t[s]=void 0;else t=t[s]}}}},{"../is":91}],110:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")});var n=function(){var r,i=this,o=arguments,a=t.apply(i,o),s=n.cache;return(r=s[a])||(r=s[a]=e.apply(i,o)),r};return n.cache={},n}},{}],111:[function(e,t,n){"use strict";var r="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",i="rgb[a]?\\(("+r+"[%]?)\\s*,\\s*("+r+"[%]?)\\s*,\\s*("+r+"[%]?)(?:\\s*,\\s*("+r+"))?\\)",o="rgb[a]?\\((?:"+r+"[%]?)\\s*,\\s*(?:"+r+"[%]?)\\s*,\\s*(?:"+r+"[%]?)(?:\\s*,\\s*(?:"+r+"))?\\)",a="hsl[a]?\\(("+r+")\\s*,\\s*("+r+"[%])\\s*,\\s*("+r+"[%])(?:\\s*,\\s*("+r+"))?\\)",s="hsl[a]?\\((?:"+r+")\\s*,\\s*(?:"+r+"[%])\\s*,\\s*(?:"+r+"[%])(?:\\s*,\\s*(?:"+r+"))?\\)",l="\\#[0-9a-fA-F]{3}",c="\\#[0-9a-fA-F]{6}";t.exports={regex:{number:r,rgba:i,rgbaNoBackRefs:o,hsla:a,hslaNoBackRefs:s,hex3:l,hex6:c}}},{}],112:[function(e,t,n){function r(e,t){return e<t?-1:e>t?1:0}function i(e,t){return-1*r(e,t)}t.exports={sort:{ascending:r,descending:i}}},{}],113:[function(e,t,n){"use strict";var r=e("./memoize"),i=e("../is");t.exports={camel2dash:r((function(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))})),dash2camel:r((function(e){return e.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}))})),prependCamel:r((function(e,t){return e+t[0].toUpperCase()+t.substring(1)}),(function(e,t){return e+"$"+t})),capitalize:function(e){return i.emptyString(e)?e:e.charAt(0).toUpperCase()+e.substring(1)}}},{"../is":91,"./memoize":110}],114:[function(e,t,n){"use strict";var r=e("../window"),i=e("../is"),o=r?r.performance:null,a={},s=o&&o.now?function(){return o.now()}:function(){return Date.now()},l=function(){if(r){if(r.requestAnimationFrame)return function(e){r.requestAnimationFrame(e)};if(r.mozRequestAnimationFrame)return function(e){r.mozRequestAnimationFrame(e)};if(r.webkitRequestAnimationFrame)return function(e){r.webkitRequestAnimationFrame(e)};if(r.msRequestAnimationFrame)return function(e){r.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(s())}),1e3/60)}}();a.requestAnimationFrame=function(e){l(e)},a.performanceNow=s,a.throttle=function(e,t,n){var r=!0,o=!0;return!1===n?r=!1:i.plainObject(n)&&(r="leading"in n?n.leading:r,o="trailing"in n?n.trailing:o),(n=n||{}).leading=r,n.maxWait=t,n.trailing=o,a.debounce(e,t,n)},a.now=function(){return Date.now()},a.debounce=function(e,t,n){var r,o,a,s,l,c,u,d=this,p=0,f=!1,h=!0;if(i.fn(e)){if(t=Math.max(0,t)||0,!0===n){var g=!0;h=!1}else i.plainObject(n)&&(g=n.leading,f="maxWait"in n&&(Math.max(t,n.maxWait)||0),h="trailing"in n?n.trailing:h);var v=function(){var n=t-(d.now()-s);if(n<=0){o&&clearTimeout(o);var i=u;o=c=u=void 0,i&&(p=d.now(),a=e.apply(l,r),c||o||(r=l=null))}else c=setTimeout(v,n)},m=function(){c&&clearTimeout(c),o=c=u=void 0,(h||f!==t)&&(p=d.now(),a=e.apply(l,r),c||o||(r=l=null))};return function(){if(r=arguments,s=d.now(),l=this,u=h&&(c||!g),!1===f)var n=g&&!c;else{o||g||(p=s);var i=f-(s-p),y=i<=0;y?(o&&(o=clearTimeout(o)),p=s,a=e.apply(l,r)):o||(o=setTimeout(m,i))}return y&&c?c=clearTimeout(c):c||t===f||(c=setTimeout(v,t)),n&&(y=!0,a=e.apply(l,r)),!y||c||o||(r=l=null),a}}},t.exports=a},{"../is":91,"../window":116}],115:[function(e,t,n){t.exports="3.1.0"},{}],116:[function(e,t,n){t.exports="undefined"==typeof window?null:window},{}]},{},[90])(90)},321:function(e,t,n){var r=r||{};r.scope={},r.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},r.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==n.g&&null!=n.g?n.g:e},r.global=r.getGlobal(this),r.polyfill=function(e,t,n,i){if(t){for(n=r.global,e=e.split("."),i=0;i<e.length-1;i++){var o=e[i];o in n||(n[o]={}),n=n[o]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&r.defineProperty(n,e,{configurable:!0,writable:!0,value:t})}},r.polyfill("Object.setPrototypeOf",(function(e){return e||("object"!=typeof"".__proto__?null:function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e})}),"es6","es5");var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function a(e){if(!e)return a.__;Array.prototype.reduce||(Array.prototype.reduce=function(e,t){for(var n=t,r=0;r<this.length;r++)n=e(n,this[r],r,this);return n});var t="";return("."+e).split(".").reduce((function(e,n,r,i){return void 0===(n=e["__"+(t=t?t+"."+n:n)])&&(a.Logger.prototype=e,n=new a.Logger(t),e["__"+t]=n),n}),a.__)}!function(e){function t(e,t,n){void 0!==t[e]&&(null===t[e]?delete n[e]:n[e]=t[e])}function n(t){if(null!=e.enabled&&!e.enabled||null!=e.maxMessages&&1>e.maxMessages)return!1;try{if(t.userAgentRegex&&!new RegExp(t.userAgentRegex).test(navigator.userAgent))return!1}catch(e){}try{if(t.ipRegex&&e.clientIP&&!new RegExp(t.ipRegex).test(e.clientIP))return!1}catch(e){}return!0}function r(e,t){try{if(e.disallow&&new RegExp(e.disallow).test(t))return!1}catch(e){}return!0}function i(e){return"function"==typeof e?e instanceof RegExp?e.toString():e():e}function a(t){switch(typeof(t=i(t))){case"string":return new s(t,null,t);case"number":var n=t.toString();return new s(n,null,n);case"boolean":return n=t.toString(),new s(n,null,n);case"undefined":return new s("undefined",null,"undefined");case"object":return t instanceof RegExp||t instanceof String||t instanceof Number||t instanceof Boolean?(n=t.toString(),new s(n,null,n)):(n="function"==typeof e.serialize?e.serialize.call(this,t):JSON.stringify(t),new s(null,t,n));default:return new s("unknown",null,"unknown")}}e.requestId="";var s=function(e,t,n){this.msg=e,this.meta=t,this.finalString=n};e.setOptions=function(e){return t("enabled",e,this),t("maxMessages",e,this),t("defaultAjaxUrl",e,this),t("clientIP",e,this),t("requestId",e,this),t("defaultBeforeSend",e,this),t("serialize",e,this),this},e.getAllLevel=function(){return-2147483648},e.getTraceLevel=function(){return 1e3},e.getDebugLevel=function(){return 2e3},e.getInfoLevel=function(){return 3e3},e.getWarnLevel=function(){return 4e3},e.getErrorLevel=function(){return 5e3},e.getFatalLevel=function(){return 6e3},e.getOffLevel=function(){return 2147483647};var l=function(e,t){this.inner=t,this.name="JL.Exception",this.message=a(e).finalString};e.Exception=l,l.prototype=Error();var c=function(e,t,n,r){this.l=e,this.m=t,this.n=n,this.t=r};e.LogItem=c,l=function(){function i(t,n){this.appenderName=t,this.sendLogItems=n,this.level=e.getTraceLevel(),this.sendWithBufferLevel=2147483647,this.storeInBufferLevel=-2147483648,this.bufferSize=0,this.batchSize=1,this.batchTimeout=2147483647,this.buffer=[],this.batchBuffer=[],this.batchTimeoutTimer=null}return i.prototype.clearTimeoutTimer=function(){this.batchTimeoutTimer&&(clearTimeout(this.batchTimeoutTimer),this.batchTimeoutTimer=null)},i.prototype.addLogItemToBuffer=function(e){this.batchBuffer.push(e);var t=this;this.batchTimeoutTimer||(this.batchTimeoutTimer=setTimeout((function(){t.sendBatch.call(t)}),this.batchTimeout))},i.prototype.setOptions=function(e){return t("level",e,this),t("ipRegex",e,this),t("userAgentRegex",e,this),t("disallow",e,this),t("sendWithBufferLevel",e,this),t("storeInBufferLevel",e,this),t("bufferSize",e,this),t("batchSize",e,this),t("batchTimeout",e,this),this.bufferSize<this.buffer.length&&(this.buffer.length=this.bufferSize),this},i.prototype.log=function(e,t,i,o,a,s,l){!n(this)||!r(this,s)||a<this.storeInBufferLevel||(e=new c(a,s,l,(new Date).getTime()),a<this.level?0<this.bufferSize&&(this.buffer.push(e),this.buffer.length>this.bufferSize&&this.buffer.shift()):(a<this.sendWithBufferLevel||!this.buffer.length||(this.batchBuffer=this.batchBuffer.concat(this.buffer),this.buffer.length=0),this.addLogItemToBuffer(e),this.batchBuffer.length>=this.batchSize&&this.sendBatch()))},i.prototype.sendBatch=function(){this.clearTimeoutTimer(),0==this.batchBuffer.length||null!=e.maxMessages&&1>e.maxMessages||(null!=e.maxMessages&&(e.maxMessages-=this.batchBuffer.length),this.sendLogItems(this.batchBuffer),this.batchBuffer.length=0)},i}(),e.Appender=l;var u=function(n){function r(e){return n.call(this,e,r.prototype.sendLogItemsAjax)||this}return o(r,n),r.prototype.setOptions=function(e){return t("url",e,this),t("beforeSend",e,this),n.prototype.setOptions.call(this,e),this},r.prototype.sendLogItemsAjax=function(t){try{var n="/jsnlog.logger";null!=e.defaultAjaxUrl&&(n=e.defaultAjaxUrl),this.url&&(n=this.url);var r=this.getXhr(n),i={r:e.requestId,lg:t};"function"==typeof this.beforeSend?this.beforeSend.call(this,r,i):"function"==typeof e.defaultBeforeSend&&e.defaultBeforeSend.call(this,r,i);var o=JSON.stringify(i);r.send(o)}catch(e){}},r.prototype.getXhr=function(t){var n=new XMLHttpRequest;return"withCredentials"in n||"undefined"==typeof XDomainRequest?(n.open("POST",t),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("JSNLog-RequestId",e.requestId),n):((n=new XDomainRequest).open("POST",t),n)},r}(l);e.AjaxAppender=u;var d=function(t){function n(e){return t.call(this,e,n.prototype.sendLogItemsConsole)||this}return o(n,t),n.prototype.clog=function(e){console.log(e)},n.prototype.cerror=function(e){console.error?console.error(e):this.clog(e)},n.prototype.cwarn=function(e){console.warn?console.warn(e):this.clog(e)},n.prototype.cinfo=function(e){console.info?console.info(e):this.clog(e)},n.prototype.cdebug=function(e){console.debug?console.debug(e):this.cinfo(e)},n.prototype.sendLogItemsConsole=function(t){try{var n;if(console)for(n=0;n<t.length;++n){var r=t[n],i=r.n+": "+r.m;"undefined"==typeof window&&(i=new Date(r.t)+" | "+i),r.l<=e.getDebugLevel()?this.cdebug(i):r.l<=e.getInfoLevel()?this.cinfo(i):r.l<=e.getWarnLevel()?this.cwarn(i):this.cerror(i)}}catch(e){}},n}(l);e.ConsoleAppender=d,l=function(){function e(e){this.loggerName=e,this.seenRegexes=[]}return e.prototype.setOptions=function(e){return t("level",e,this),t("userAgentRegex",e,this),t("disallow",e,this),t("ipRegex",e,this),t("appenders",e,this),t("onceOnly",e,this),this.seenRegexes=[],this},e.prototype.buildExceptionObject=function(e){var t={};return e.stack?t.stack=e.stack:t.e=e,e.message&&(t.message=e.message),e.name&&(t.name=e.name),e.data&&(t.data=e.data),e.inner&&(t.inner=this.buildExceptionObject(e.inner)),t},e.prototype.log=function(e,t,o){var s=0;if(!this.appenders)return this;if(e>=this.level&&n(this)&&(o?(s=this.buildExceptionObject(o)).logData=i(t):s=t,r(this,(t=a(s)).finalString))){if(this.onceOnly)for(s=this.onceOnly.length-1;0<=s;){if(new RegExp(this.onceOnly[s]).test(t.finalString)){if(this.seenRegexes[s])return this;this.seenRegexes[s]=!0}s--}for(t.meta=t.meta||{},t.meta.loggerName=this.loggerName,s=this.appenders.length-1;0<=s;)this.appenders[s].log(1e3>=e?"trace":2e3>=e?"debug":3e3>=e?"info":4e3>=e?"warn":5e3>=e?"error":"fatal",t.msg,t.meta,(function(){}),e,t.finalString,this.loggerName),s--}return this},e.prototype.trace=function(e){return this.log(1e3,e)},e.prototype.debug=function(e){return this.log(2e3,e)},e.prototype.info=function(e){return this.log(3e3,e)},e.prototype.warn=function(e){return this.log(4e3,e)},e.prototype.error=function(e){return this.log(5e3,e)},e.prototype.fatal=function(e){return this.log(6e3,e)},e.prototype.fatalException=function(e,t){return this.log(6e3,e,t)},e}(),e.Logger=l,e.createAjaxAppender=function(e){return new u(e)},e.createConsoleAppender=function(e){return new d(e)},l=new u(""),"undefined"==typeof window&&(l=new d("")),e.__=new e.Logger(""),e.__.setOptions({level:e.getDebugLevel(),appenders:[l]})}(a||(a={})),t.JL=a,"function"==typeof __jsnlog_configure&&__jsnlog_configure(a),"undefined"==typeof window||window.onerror||(window.onerror=function(e,t,n,r,i){return a("onerrorLogger").fatalException({msg:"Uncaught Exception",errorMsg:e,url:t,"line number":n,column:r},i),!1}),"undefined"==typeof window||window.onunhandledrejection||(window.onunhandledrejection=function(e){a("onerrorLogger").fatalException({msg:"unhandledrejection",errorMsg:e.reason?e.reason.message:null},e.reason)})},677:(e,t,n)=>{var r;e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){var n=t[a][1][e];return i(n||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({"./aesprim":[function(e,t,n){!function(e,t){"use strict";"function"==typeof r&&r.amd?r(["exports"],t):t(void 0!==n?n:e.esprima={})}(this,(function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function n(e){return e>=48&&e<=57}function r(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function i(e){return"01234567".indexOf(e)>=0}function o(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function a(e){return 10===e||13===e||8232===e||8233===e}function s(e){return 64==e||36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&it.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function l(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&it.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function c(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function u(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function d(e){return"eval"===e||"arguments"===e}function p(e){if(st&&u(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function f(e,n,r,i,o){var a;t("number"==typeof r,"Comment must have valid position"),ht.lastCommentStart>=r||(ht.lastCommentStart=r,a={type:e,value:n},gt.range&&(a.range=[r,i]),gt.loc&&(a.loc=o),gt.comments.push(a),gt.attachComment&&(gt.leadingComments.push(a),gt.trailingComments.push(a)))}function h(e){var t,n,r,i;for(t=lt-e,n={start:{line:ct,column:lt-ut-e}};lt<dt;)if(r=at.charCodeAt(lt),++lt,a(r))return gt.comments&&(i=at.slice(t+e,lt-1),n.end={line:ct,column:lt-ut-1},f("Line",i,t,lt-1,n)),13===r&&10===at.charCodeAt(lt)&&++lt,++ct,void(ut=lt);gt.comments&&(i=at.slice(t+e,lt),n.end={line:ct,column:lt-ut},f("Line",i,t,lt,n))}function g(){var e,t,n,r;for(gt.comments&&(e=lt-2,t={start:{line:ct,column:lt-ut-2}});lt<dt;)if(a(n=at.charCodeAt(lt)))13===n&&10===at.charCodeAt(lt+1)&&++lt,++ct,++lt,ut=lt,lt>=dt&&W({},rt.UnexpectedToken,"ILLEGAL");else if(42===n){if(47===at.charCodeAt(lt+1))return++lt,++lt,void(gt.comments&&(r=at.slice(e+2,lt-2),t.end={line:ct,column:lt-ut},f("Block",r,e,lt,t)));++lt}else++lt;W({},rt.UnexpectedToken,"ILLEGAL")}function v(){var e,t;for(t=0===lt;lt<dt;)if(o(e=at.charCodeAt(lt)))++lt;else if(a(e))++lt,13===e&&10===at.charCodeAt(lt)&&++lt,++ct,ut=lt,t=!0;else if(47===e)if(47===(e=at.charCodeAt(lt+1)))++lt,++lt,h(2),t=!0;else{if(42!==e)break;++lt,++lt,g()}else if(t&&45===e){if(45!==at.charCodeAt(lt+1)||62!==at.charCodeAt(lt+2))break;lt+=3,h(3)}else{if(60!==e)break;if("!--"!==at.slice(lt+1,lt+4))break;++lt,++lt,++lt,++lt,h(4)}}function m(e){var t,n,i,o=0;for(n="u"===e?4:2,t=0;t<n;++t){if(!(lt<dt&&r(at[lt])))return"";i=at[lt++],o=16*o+"0123456789abcdef".indexOf(i.toLowerCase())}return String.fromCharCode(o)}function y(){var e,t;for(e=at.charCodeAt(lt++),t=String.fromCharCode(e),92===e&&(117!==at.charCodeAt(lt)&&W({},rt.UnexpectedToken,"ILLEGAL"),++lt,(e=m("u"))&&"\\"!==e&&s(e.charCodeAt(0))||W({},rt.UnexpectedToken,"ILLEGAL"),t=e);lt<dt&&l(e=at.charCodeAt(lt));)++lt,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==at.charCodeAt(lt)&&W({},rt.UnexpectedToken,"ILLEGAL"),++lt,(e=m("u"))&&"\\"!==e&&l(e.charCodeAt(0))||W({},rt.UnexpectedToken,"ILLEGAL"),t+=e);return t}function b(){var e,t;for(e=lt++;lt<dt;){if(92===(t=at.charCodeAt(lt)))return lt=e,y();if(!l(t))break;++lt}return at.slice(e,lt)}function C(){var e,t;return e=lt,{type:1===(t=92===at.charCodeAt(lt)?y():b()).length?Ke.Identifier:p(t)?Ke.Keyword:"null"===t?Ke.NullLiteral:"true"===t||"false"===t?Ke.BooleanLiteral:Ke.Identifier,value:t,lineNumber:ct,lineStart:ut,start:e,end:lt}}function x(){var e,t,n,r,i=lt,o=at.charCodeAt(lt),a=at[lt];switch(o){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++lt,gt.tokenize&&(40===o?gt.openParenToken=gt.tokens.length:123===o&&(gt.openCurlyToken=gt.tokens.length)),{type:Ke.Punctuator,value:String.fromCharCode(o),lineNumber:ct,lineStart:ut,start:i,end:lt};default:if(61===(e=at.charCodeAt(lt+1)))switch(o){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return lt+=2,{type:Ke.Punctuator,value:String.fromCharCode(o)+String.fromCharCode(e),lineNumber:ct,lineStart:ut,start:i,end:lt};case 33:case 61:return lt+=2,61===at.charCodeAt(lt)&&++lt,{type:Ke.Punctuator,value:at.slice(i,lt),lineNumber:ct,lineStart:ut,start:i,end:lt}}}return">>>="===(r=at.substr(lt,4))?(lt+=4,{type:Ke.Punctuator,value:r,lineNumber:ct,lineStart:ut,start:i,end:lt}):">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?(lt+=3,{type:Ke.Punctuator,value:n,lineNumber:ct,lineStart:ut,start:i,end:lt}):a===(t=n.substr(0,2))[1]&&"+-<>&|".indexOf(a)>=0||"=>"===t?(lt+=2,{type:Ke.Punctuator,value:t,lineNumber:ct,lineStart:ut,start:i,end:lt}):"<>=!+-*%&|^/".indexOf(a)>=0?(++lt,{type:Ke.Punctuator,value:a,lineNumber:ct,lineStart:ut,start:i,end:lt}):void W({},rt.UnexpectedToken,"ILLEGAL")}function E(e){for(var t="";lt<dt&&r(at[lt]);)t+=at[lt++];return 0===t.length&&W({},rt.UnexpectedToken,"ILLEGAL"),s(at.charCodeAt(lt))&&W({},rt.UnexpectedToken,"ILLEGAL"),{type:Ke.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:ct,lineStart:ut,start:e,end:lt}}function S(e){for(var t="0"+at[lt++];lt<dt&&i(at[lt]);)t+=at[lt++];return(s(at.charCodeAt(lt))||n(at.charCodeAt(lt)))&&W({},rt.UnexpectedToken,"ILLEGAL"),{type:Ke.NumericLiteral,value:parseInt(t,8),octal:!0,lineNumber:ct,lineStart:ut,start:e,end:lt}}function w(){var e,r,o;if(t(n((o=at[lt]).charCodeAt(0))||"."===o,"Numeric literal must start with a decimal digit or a decimal point"),r=lt,e="","."!==o){if(e=at[lt++],o=at[lt],"0"===e){if("x"===o||"X"===o)return++lt,E(r);if(i(o))return S(r);o&&n(o.charCodeAt(0))&&W({},rt.UnexpectedToken,"ILLEGAL")}for(;n(at.charCodeAt(lt));)e+=at[lt++];o=at[lt]}if("."===o){for(e+=at[lt++];n(at.charCodeAt(lt));)e+=at[lt++];o=at[lt]}if("e"===o||"E"===o)if(e+=at[lt++],"+"!==(o=at[lt])&&"-"!==o||(e+=at[lt++]),n(at.charCodeAt(lt)))for(;n(at.charCodeAt(lt));)e+=at[lt++];else W({},rt.UnexpectedToken,"ILLEGAL");return s(at.charCodeAt(lt))&&W({},rt.UnexpectedToken,"ILLEGAL"),{type:Ke.NumericLiteral,value:parseFloat(e),lineNumber:ct,lineStart:ut,start:r,end:lt}}function V(){var e,n,r,o,s,l,c,u,d="",p=!1;for(c=ct,u=ut,t("'"===(e=at[lt])||'"'===e,"String literal must starts with a quote"),n=lt,++lt;lt<dt;){if((r=at[lt++])===e){e="";break}if("\\"===r)if((r=at[lt++])&&a(r.charCodeAt(0)))++ct,"\r"===r&&"\n"===at[lt]&&++lt,ut=lt;else switch(r){case"u":case"x":l=lt,(s=m(r))?d+=s:(lt=l,d+=r);break;case"n":d+="\n";break;case"r":d+="\r";break;case"t":d+="\t";break;case"b":d+="\b";break;case"f":d+="\f";break;case"v":d+="\v";break;default:i(r)?(0!==(o="01234567".indexOf(r))&&(p=!0),lt<dt&&i(at[lt])&&(p=!0,o=8*o+"01234567".indexOf(at[lt++]),"0123".indexOf(r)>=0&<<dt&&i(at[lt])&&(o=8*o+"01234567".indexOf(at[lt++]))),d+=String.fromCharCode(o)):d+=r}else{if(a(r.charCodeAt(0)))break;d+=r}}return""!==e&&W({},rt.UnexpectedToken,"ILLEGAL"),{type:Ke.StringLiteral,value:d,octal:p,startLineNumber:c,startLineStart:u,lineNumber:ct,lineStart:ut,start:n,end:lt}}function R(e,t){var n;try{n=new RegExp(e,t)}catch(e){W({},rt.InvalidRegExp)}return n}function O(){var e,n,r,i;for(t("/"===(e=at[lt]),"Regular expression literal must start with a slash"),n=at[lt++],r=!1,i=!1;lt<dt;)if(n+=e=at[lt++],"\\"===e)a((e=at[lt++]).charCodeAt(0))&&W({},rt.UnterminatedRegExp),n+=e;else if(a(e.charCodeAt(0)))W({},rt.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){i=!0;break}"["===e&&(r=!0)}return i||W({},rt.UnterminatedRegExp),{value:n.substr(1,n.length-2),literal:n}}function A(){var e,t,n,r;for(t="",n="";lt<dt&&l((e=at[lt]).charCodeAt(0));)if(++lt,"\\"===e&<<dt)if("u"===(e=at[lt])){if(r=++lt,e=m("u"))for(n+=e,t+="\\u";r<lt;++r)t+=at[r];else lt=r,n+="u",t+="\\u";U({},rt.UnexpectedToken,"ILLEGAL")}else t+="\\",U({},rt.UnexpectedToken,"ILLEGAL");else n+=e,t+=e;return{value:n,literal:t}}function k(){var e,t,n,r;return ft=null,v(),e=lt,t=O(),n=A(),r=R(t.value,n.value),gt.tokenize?{type:Ke.RegularExpression,value:r,lineNumber:ct,lineStart:ut,start:e,end:lt}:{literal:t.literal+n.literal,value:r,start:e,end:lt}}function T(){var e,t,n,r;return v(),e=lt,t={start:{line:ct,column:lt-ut}},n=k(),t.end={line:ct,column:lt-ut},gt.tokenize||(gt.tokens.length>0&&(r=gt.tokens[gt.tokens.length-1]).range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||gt.tokens.pop()),gt.tokens.push({type:"RegularExpression",value:n.literal,range:[e,lt],loc:t})),n}function D(e){return e.type===Ke.Identifier||e.type===Ke.Keyword||e.type===Ke.BooleanLiteral||e.type===Ke.NullLiteral}function N(){var e,t;if(!(e=gt.tokens[gt.tokens.length-1]))return T();if("Punctuator"===e.type){if("]"===e.value)return x();if(")"===e.value)return!(t=gt.tokens[gt.openParenToken-1])||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?x():T();if("}"===e.value){if(gt.tokens[gt.openCurlyToken-3]&&"Keyword"===gt.tokens[gt.openCurlyToken-3].type){if(!(t=gt.tokens[gt.openCurlyToken-4]))return x()}else{if(!gt.tokens[gt.openCurlyToken-4]||"Keyword"!==gt.tokens[gt.openCurlyToken-4].type)return x();if(!(t=gt.tokens[gt.openCurlyToken-5]))return T()}return et.indexOf(t.value)>=0?x():T()}return T()}return"Keyword"===e.type?T():x()}function P(){var e;return v(),lt>=dt?{type:Ke.EOF,lineNumber:ct,lineStart:ut,start:lt,end:lt}:s(e=at.charCodeAt(lt))?C():40===e||41===e||59===e?x():39===e||34===e?V():46===e?n(at.charCodeAt(lt+1))?w():x():n(e)?w():gt.tokenize&&47===e?N():x()}function B(){var e,t,n;return v(),e={start:{line:ct,column:lt-ut}},t=P(),e.end={line:ct,column:lt-ut},t.type!==Ke.EOF&&(n=at.slice(t.start,t.end),gt.tokens.push({type:$e[t.type],value:n,range:[t.start,t.end],loc:e})),t}function _(){var e;return lt=(e=ft).end,ct=e.lineNumber,ut=e.lineStart,ft=void 0!==gt.tokens?B():P(),lt=e.end,ct=e.lineNumber,ut=e.lineStart,e}function M(){var e,t,n;e=lt,t=ct,n=ut,ft=void 0!==gt.tokens?B():P(),lt=e,ct=t,ut=n}function I(e,t){this.line=e,this.column=t}function F(e,t,n,r){this.start=new I(e,t),this.end=new I(n,r)}function L(){var e,t,n,r;return e=lt,t=ct,n=ut,v(),r=ct!==t,lt=e,ct=t,ut=n,r}function W(e,n){var r,i=Array.prototype.slice.call(arguments,2),o=n.replace(/%(\d)/g,(function(e,n){return t(n<i.length,"Message reference must be in range"),i[n]}));throw"number"==typeof e.lineNumber?((r=new Error("Line "+e.lineNumber+": "+o)).index=e.start,r.lineNumber=e.lineNumber,r.column=e.start-ut+1):((r=new Error("Line "+ct+": "+o)).index=lt,r.lineNumber=ct,r.column=lt-ut+1),r.description=o,r}function U(){try{W.apply(null,arguments)}catch(e){if(!gt.errors)throw e;gt.errors.push(e)}}function G(e){if(e.type===Ke.EOF&&W(e,rt.UnexpectedEOS),e.type===Ke.NumericLiteral&&W(e,rt.UnexpectedNumber),e.type===Ke.StringLiteral&&W(e,rt.UnexpectedString),e.type===Ke.Identifier&&W(e,rt.UnexpectedIdentifier),e.type===Ke.Keyword){if(c(e.value))W(e,rt.UnexpectedReserved);else if(st&&u(e.value))return void U(e,rt.StrictReservedWord);W(e,rt.UnexpectedToken,e.value)}W(e,rt.UnexpectedToken,e.value)}function z(e){var t=_();t.type===Ke.Punctuator&&t.value===e||G(t)}function Q(e){var t=_();t.type===Ke.Keyword&&t.value===e||G(t)}function j(e){return ft.type===Ke.Punctuator&&ft.value===e}function Y(e){return ft.type===Ke.Keyword&&ft.value===e}function H(){var e;return ft.type===Ke.Punctuator&&("="===(e=ft.value)||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function J(){var e;return 59===at.charCodeAt(lt)||j(";")?void _():(e=ct,v(),void(ct===e&&(ft.type===Ke.EOF||j("}")||G(ft))))}function Z(e){return e.type===tt.Identifier||e.type===tt.MemberExpression}function X(){var e,t=[];for(e=ft,z("[");!j("]");)j(",")?(_(),t.push(null)):(t.push(ge()),j("]")||z(","));return _(),pt.markEnd(pt.createArrayExpression(t),e)}function q(e,t){var n,r,i;return n=st,i=ft,r=Ge(),t&&st&&d(e[0].name)&&U(t,rt.StrictParamName),st=n,pt.markEnd(pt.createFunctionExpression(null,e,[],r),i)}function K(){var e,t;return t=ft,(e=_()).type===Ke.StringLiteral||e.type===Ke.NumericLiteral?(st&&e.octal&&U(e,rt.StrictOctalLiteral),pt.markEnd(pt.createLiteral(e),t)):pt.markEnd(pt.createIdentifier(e.value),t)}function $(){var e,t,n,r,i,o;return o=ft,(e=ft).type===Ke.Identifier?(n=K(),"get"!==e.value||j(":")?"set"!==e.value||j(":")?(z(":"),r=ge(),pt.markEnd(pt.createProperty("init",n,r),o)):(t=K(),z("("),(e=ft).type!==Ke.Identifier?(z(")"),U(e,rt.UnexpectedToken,e.value),r=q([])):(i=[be()],z(")"),r=q(i,e)),pt.markEnd(pt.createProperty("set",t,r),o)):(t=K(),z("("),z(")"),r=q([]),pt.markEnd(pt.createProperty("get",t,r),o))):e.type!==Ke.EOF&&e.type!==Ke.Punctuator?(t=K(),z(":"),r=ge(),pt.markEnd(pt.createProperty("init",t,r),o)):void G(e)}function ee(){var e,t,n,r,i,o=[],a={},s=String;for(i=ft,z("{");!j("}");)t=(e=$()).key.type===tt.Identifier?e.key.name:s(e.key.value),r="init"===e.kind?nt.Data:"get"===e.kind?nt.Get:nt.Set,n="$"+t,Object.prototype.hasOwnProperty.call(a,n)?(a[n]===nt.Data?st&&r===nt.Data?U({},rt.StrictDuplicateProperty):r!==nt.Data&&U({},rt.AccessorDataProperty):r===nt.Data?U({},rt.AccessorDataProperty):a[n]&r&&U({},rt.AccessorGetSet),a[n]|=r):a[n]=r,o.push(e),j("}")||z(",");return z("}"),pt.markEnd(pt.createObjectExpression(o),i)}function te(){var e;return z("("),e=ve(),z(")"),e}function ne(){var e,t,n,r;if(j("("))return te();if(j("["))return X();if(j("{"))return ee();if(e=ft.type,r=ft,e===Ke.Identifier)n=pt.createIdentifier(_().value);else if(e===Ke.StringLiteral||e===Ke.NumericLiteral)st&&ft.octal&&U(ft,rt.StrictOctalLiteral),n=pt.createLiteral(_());else if(e===Ke.Keyword){if(Y("function"))return je();Y("this")?(_(),n=pt.createThisExpression()):G(_())}else e===Ke.BooleanLiteral?((t=_()).value="true"===t.value,n=pt.createLiteral(t)):e===Ke.NullLiteral?((t=_()).value=null,n=pt.createLiteral(t)):j("/")||j("/=")?(n=void 0!==gt.tokens?pt.createLiteral(T()):pt.createLiteral(k()),M()):G(_());return pt.markEnd(n,r)}function re(){var e=[];if(z("("),!j(")"))for(;lt<dt&&(e.push(ge()),!j(")"));)z(",");return z(")"),e}function ie(){var e,t;return t=ft,D(e=_())||G(e),pt.markEnd(pt.createIdentifier(e.value),t)}function oe(){return z("."),ie()}function ae(){var e;return z("["),e=ve(),z("]"),e}function se(){var e,t,n;return n=ft,Q("new"),e=ce(),t=j("(")?re():[],pt.markEnd(pt.createNewExpression(e,t),n)}function le(){var e,t,n,r,i;for(i=ft,e=ht.allowIn,ht.allowIn=!0,t=Y("new")?se():ne(),ht.allowIn=e;;){if(j("."))r=oe(),t=pt.createMemberExpression(".",t,r);else if(j("("))n=re(),t=pt.createCallExpression(t,n);else{if(!j("["))break;r=ae(),t=pt.createMemberExpression("[",t,r)}pt.markEnd(t,i)}return t}function ce(){var e,t,n,r;for(r=ft,e=ht.allowIn,t=Y("new")?se():ne(),ht.allowIn=e;j(".")||j("[");)j("[")?(n=ae(),t=pt.createMemberExpression("[",t,n)):(n=oe(),t=pt.createMemberExpression(".",t,n)),pt.markEnd(t,r);return t}function ue(){var e,t,n=ft;return e=le(),ft.type===Ke.Punctuator&&(!j("++")&&!j("--")||L()||(st&&e.type===tt.Identifier&&d(e.name)&&U({},rt.StrictLHSPostfix),Z(e)||U({},rt.InvalidLHSInAssignment),t=_(),e=pt.markEnd(pt.createPostfixExpression(t.value,e),n))),e}function de(){var e,t,n;return ft.type!==Ke.Punctuator&&ft.type!==Ke.Keyword?t=ue():j("++")||j("--")?(n=ft,e=_(),t=de(),st&&t.type===tt.Identifier&&d(t.name)&&U({},rt.StrictLHSPrefix),Z(t)||U({},rt.InvalidLHSInAssignment),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n)):j("+")||j("-")||j("~")||j("!")?(n=ft,e=_(),t=de(),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n)):Y("delete")||Y("void")||Y("typeof")?(n=ft,e=_(),t=de(),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n),st&&"delete"===t.operator&&t.argument.type===tt.Identifier&&U({},rt.StrictDelete)):t=ue(),t}function pe(e,t){var n=0;if(e.type!==Ke.Punctuator&&e.type!==Ke.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function fe(){var e,t,n,r,i,o,a,s,l,c;if(e=ft,l=de(),0===(i=pe(r=ft,ht.allowIn)))return l;for(r.prec=i,_(),t=[e,ft],o=[l,r,a=de()];(i=pe(ft,ht.allowIn))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,l=o.pop(),n=pt.createBinaryExpression(s,l,a),t.pop(),e=t[t.length-1],pt.markEnd(n,e),o.push(n);(r=_()).prec=i,o.push(r),t.push(ft),n=de(),o.push(n)}for(n=o[c=o.length-1],t.pop();c>1;)n=pt.createBinaryExpression(o[c-1].value,o[c-2],n),c-=2,e=t.pop(),pt.markEnd(n,e);return n}function he(){var e,t,n,r,i;return i=ft,e=fe(),j("?")&&(_(),t=ht.allowIn,ht.allowIn=!0,n=ge(),ht.allowIn=t,z(":"),r=ge(),e=pt.createConditionalExpression(e,n,r),pt.markEnd(e,i)),e}function ge(){var e,t,n,r,i;return e=ft,i=ft,r=t=he(),H()&&(Z(t)||U({},rt.InvalidLHSInAssignment),st&&t.type===tt.Identifier&&d(t.name)&&U(e,rt.StrictLHSAssignment),e=_(),n=ge(),r=pt.markEnd(pt.createAssignmentExpression(e.value,t,n),i)),r}function ve(){var e,t=ft;if(e=ge(),j(",")){for(e=pt.createSequenceExpression([e]);lt<dt&&j(",");)_(),e.expressions.push(ge());pt.markEnd(e,t)}return e}function me(){for(var e,t=[];lt<dt&&!j("}")&&void 0!==(e=Ye());)t.push(e);return t}function ye(){var e,t;return t=ft,z("{"),e=me(),z("}"),pt.markEnd(pt.createBlockStatement(e),t)}function be(){var e,t;return t=ft,(e=_()).type!==Ke.Identifier&&G(e),pt.markEnd(pt.createIdentifier(e.value),t)}function Ce(e){var t,n,r=null;return n=ft,t=be(),st&&d(t.name)&&U({},rt.StrictVarName),"const"===e?(z("="),r=ge()):j("=")&&(_(),r=ge()),pt.markEnd(pt.createVariableDeclarator(t,r),n)}function xe(e){var t=[];do{if(t.push(Ce(e)),!j(","))break;_()}while(lt<dt);return t}function Ee(){var e;return Q("var"),e=xe(),J(),pt.createVariableDeclaration(e,"var")}function Se(e){var t,n;return n=ft,Q(e),t=xe(e),J(),pt.markEnd(pt.createVariableDeclaration(t,e),n)}function we(){return z(";"),pt.createEmptyStatement()}function Ve(){var e=ve();return J(),pt.createExpressionStatement(e)}function Re(){var e,t,n;return Q("if"),z("("),e=ve(),z(")"),t=Ue(),Y("else")?(_(),n=Ue()):n=null,pt.createIfStatement(e,t,n)}function Oe(){var e,t,n;return Q("do"),n=ht.inIteration,ht.inIteration=!0,e=Ue(),ht.inIteration=n,Q("while"),z("("),t=ve(),z(")"),j(";")&&_(),pt.createDoWhileStatement(e,t)}function Ae(){var e,t,n;return Q("while"),z("("),e=ve(),z(")"),n=ht.inIteration,ht.inIteration=!0,t=Ue(),ht.inIteration=n,pt.createWhileStatement(e,t)}function ke(){var e,t,n;return n=ft,e=_(),t=xe(),pt.markEnd(pt.createVariableDeclaration(t,e.value),n)}function Te(){var e,t,n,r,i,o,a;return e=t=n=null,Q("for"),z("("),j(";")?_():(Y("var")||Y("let")?(ht.allowIn=!1,e=ke(),ht.allowIn=!0,1===e.declarations.length&&Y("in")&&(_(),r=e,i=ve(),e=null)):(ht.allowIn=!1,e=ve(),ht.allowIn=!0,Y("in")&&(Z(e)||U({},rt.InvalidLHSInForIn),_(),r=e,i=ve(),e=null)),void 0===r&&z(";")),void 0===r&&(j(";")||(t=ve()),z(";"),j(")")||(n=ve())),z(")"),a=ht.inIteration,ht.inIteration=!0,o=Ue(),ht.inIteration=a,void 0===r?pt.createForStatement(e,t,n,o):pt.createForInStatement(r,i,o)}function De(){var e,t=null;return Q("continue"),59===at.charCodeAt(lt)?(_(),ht.inIteration||W({},rt.IllegalContinue),pt.createContinueStatement(null)):L()?(ht.inIteration||W({},rt.IllegalContinue),pt.createContinueStatement(null)):(ft.type===Ke.Identifier&&(e="$"+(t=be()).name,Object.prototype.hasOwnProperty.call(ht.labelSet,e)||W({},rt.UnknownLabel,t.name)),J(),null!==t||ht.inIteration||W({},rt.IllegalContinue),pt.createContinueStatement(t))}function Ne(){var e,t=null;return Q("break"),59===at.charCodeAt(lt)?(_(),ht.inIteration||ht.inSwitch||W({},rt.IllegalBreak),pt.createBreakStatement(null)):L()?(ht.inIteration||ht.inSwitch||W({},rt.IllegalBreak),pt.createBreakStatement(null)):(ft.type===Ke.Identifier&&(e="$"+(t=be()).name,Object.prototype.hasOwnProperty.call(ht.labelSet,e)||W({},rt.UnknownLabel,t.name)),J(),null!==t||ht.inIteration||ht.inSwitch||W({},rt.IllegalBreak),pt.createBreakStatement(t))}function Pe(){var e=null;return Q("return"),ht.inFunctionBody||U({},rt.IllegalReturn),32===at.charCodeAt(lt)&&s(at.charCodeAt(lt+1))?(e=ve(),J(),pt.createReturnStatement(e)):L()?pt.createReturnStatement(null):(j(";")||j("}")||ft.type===Ke.EOF||(e=ve()),J(),pt.createReturnStatement(e))}function Be(){var e,t;return st&&(v(),U({},rt.StrictModeWith)),Q("with"),z("("),e=ve(),z(")"),t=Ue(),pt.createWithStatement(e,t)}function _e(){var e,t,n,r=[];for(n=ft,Y("default")?(_(),e=null):(Q("case"),e=ve()),z(":");lt<dt&&!(j("}")||Y("default")||Y("case"));)t=Ue(),r.push(t);return pt.markEnd(pt.createSwitchCase(e,r),n)}function Me(){var e,t,n,r,i;if(Q("switch"),z("("),e=ve(),z(")"),z("{"),t=[],j("}"))return _(),pt.createSwitchStatement(e,t);for(r=ht.inSwitch,ht.inSwitch=!0,i=!1;lt<dt&&!j("}");)null===(n=_e()).test&&(i&&W({},rt.MultipleDefaultsInSwitch),i=!0),t.push(n);return ht.inSwitch=r,z("}"),pt.createSwitchStatement(e,t)}function Ie(){var e;return Q("throw"),L()&&W({},rt.NewlineAfterThrow),e=ve(),J(),pt.createThrowStatement(e)}function Fe(){var e,t,n;return n=ft,Q("catch"),z("("),j(")")&&G(ft),e=be(),st&&d(e.name)&&U({},rt.StrictCatchVariable),z(")"),t=ye(),pt.markEnd(pt.createCatchClause(e,t),n)}function Le(){var e,t=[],n=null;return Q("try"),e=ye(),Y("catch")&&t.push(Fe()),Y("finally")&&(_(),n=ye()),0!==t.length||n||W({},rt.NoCatchOrFinally),pt.createTryStatement(e,[],t,n)}function We(){return Q("debugger"),J(),pt.createDebuggerStatement()}function Ue(){var e,t,n,r,i=ft.type;if(i===Ke.EOF&&G(ft),i===Ke.Punctuator&&"{"===ft.value)return ye();if(r=ft,i===Ke.Punctuator)switch(ft.value){case";":return pt.markEnd(we(),r);case"(":return pt.markEnd(Ve(),r)}if(i===Ke.Keyword)switch(ft.value){case"break":return pt.markEnd(Ne(),r);case"continue":return pt.markEnd(De(),r);case"debugger":return pt.markEnd(We(),r);case"do":return pt.markEnd(Oe(),r);case"for":return pt.markEnd(Te(),r);case"function":return pt.markEnd(Qe(),r);case"if":return pt.markEnd(Re(),r);case"return":return pt.markEnd(Pe(),r);case"switch":return pt.markEnd(Me(),r);case"throw":return pt.markEnd(Ie(),r);case"try":return pt.markEnd(Le(),r);case"var":return pt.markEnd(Ee(),r);case"while":return pt.markEnd(Ae(),r);case"with":return pt.markEnd(Be(),r)}return(e=ve()).type===tt.Identifier&&j(":")?(_(),n="$"+e.name,Object.prototype.hasOwnProperty.call(ht.labelSet,n)&&W({},rt.Redeclaration,"Label",e.name),ht.labelSet[n]=!0,t=Ue(),delete ht.labelSet[n],pt.markEnd(pt.createLabeledStatement(e,t),r)):(J(),pt.markEnd(pt.createExpressionStatement(e),r))}function Ge(){var e,t,n,r,i,o,a,s,l=[];for(s=ft,z("{");lt<dt&&ft.type===Ke.StringLiteral&&(t=ft,e=Ye(),l.push(e),e.expression.type===tt.Literal);)"use strict"===at.slice(t.start+1,t.end-1)?(st=!0,n&&U(n,rt.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(r=ht.labelSet,i=ht.inIteration,o=ht.inSwitch,a=ht.inFunctionBody,ht.labelSet={},ht.inIteration=!1,ht.inSwitch=!1,ht.inFunctionBody=!0;lt<dt&&!j("}")&&void 0!==(e=Ye());)l.push(e);return z("}"),ht.labelSet=r,ht.inIteration=i,ht.inSwitch=o,ht.inFunctionBody=a,pt.markEnd(pt.createBlockStatement(l),s)}function ze(e){var t,n,r,i,o,a,s=[];if(z("("),!j(")"))for(i={};lt<dt&&(n=ft,t=be(),o="$"+n.value,st?(d(n.value)&&(r=n,a=rt.StrictParamName),Object.prototype.hasOwnProperty.call(i,o)&&(r=n,a=rt.StrictParamDupe)):e||(d(n.value)?(e=n,a=rt.StrictParamName):u(n.value)?(e=n,a=rt.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,o)&&(e=n,a=rt.StrictParamDupe)),s.push(t),i[o]=!0,!j(")"));)z(",");return z(")"),{params:s,stricted:r,firstRestricted:e,message:a}}function Qe(){var e,t,n,r,i,o,a,s,l,c=[];return l=ft,Q("function"),n=ft,e=be(),st?d(n.value)&&U(n,rt.StrictFunctionName):d(n.value)?(o=n,a=rt.StrictFunctionName):u(n.value)&&(o=n,a=rt.StrictReservedWord),c=(i=ze(o)).params,r=i.stricted,o=i.firstRestricted,i.message&&(a=i.message),s=st,t=Ge(),st&&o&&W(o,a),st&&r&&U(r,a),st=s,pt.markEnd(pt.createFunctionDeclaration(e,c,[],t),l)}function je(){var e,t,n,r,i,o,a,s,l=null,c=[];return s=ft,Q("function"),j("(")||(e=ft,l=be(),st?d(e.value)&&U(e,rt.StrictFunctionName):d(e.value)?(n=e,r=rt.StrictFunctionName):u(e.value)&&(n=e,r=rt.StrictReservedWord)),c=(i=ze(n)).params,t=i.stricted,n=i.firstRestricted,i.message&&(r=i.message),a=st,o=Ge(),st&&n&&W(n,r),st&&t&&U(t,r),st=a,pt.markEnd(pt.createFunctionExpression(l,c,[],o),s)}function Ye(){if(ft.type===Ke.Keyword)switch(ft.value){case"const":case"let":return Se(ft.value);case"function":return Qe();default:return Ue()}if(ft.type!==Ke.EOF)return Ue()}function He(){for(var e,t,n,r=[];lt<dt&&(t=ft).type===Ke.StringLiteral&&(e=Ye(),r.push(e),e.expression.type===tt.Literal);)"use strict"===at.slice(t.start+1,t.end-1)?(st=!0,n&&U(n,rt.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(;lt<dt&&void 0!==(e=Ye());)r.push(e);return r}function Je(){var e,t;return v(),M(),t=ft,st=!1,e=He(),pt.markEnd(pt.createProgram(e),t)}function Ze(){var e,t,n,r=[];for(e=0;e<gt.tokens.length;++e)n={type:(t=gt.tokens[e]).type,value:t.value},gt.range&&(n.range=t.range),gt.loc&&(n.loc=t.loc),r.push(n);gt.tokens=r}function Xe(e,t){var n;"string"==typeof e||e instanceof String||(e=String(e)),pt=ot,lt=0,ct=(at=e).length>0?1:0,ut=0,dt=at.length,ft=null,ht={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},gt={},(t=t||{}).tokens=!0,gt.tokens=[],gt.tokenize=!0,gt.openParenToken=-1,gt.openCurlyToken=-1,gt.range="boolean"==typeof t.range&&t.range,gt.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(gt.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(gt.errors=[]);try{if(M(),ft.type===Ke.EOF)return gt.tokens;for(_();ft.type!==Ke.EOF;)try{_()}catch(e){if(gt.errors){gt.errors.push(e);break}throw e}Ze(),n=gt.tokens,void 0!==gt.comments&&(n.comments=gt.comments),void 0!==gt.errors&&(n.errors=gt.errors)}catch(e){throw e}finally{gt={}}return n}function qe(e,t){var n,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),pt=ot,lt=0,ct=(at=e).length>0?1:0,ut=0,dt=at.length,ft=null,ht={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},gt={},void 0!==t&&(gt.range="boolean"==typeof t.range&&t.range,gt.loc="boolean"==typeof t.loc&&t.loc,gt.attachComment="boolean"==typeof t.attachComment&&t.attachComment,gt.loc&&null!==t.source&&void 0!==t.source&&(gt.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(gt.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(gt.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(gt.errors=[]),gt.attachComment&&(gt.range=!0,gt.comments=[],gt.bottomRightStack=[],gt.trailingComments=[],gt.leadingComments=[]));try{n=Je(),void 0!==gt.comments&&(n.comments=gt.comments),void 0!==gt.tokens&&(Ze(),n.tokens=gt.tokens),void 0!==gt.errors&&(n.errors=gt.errors)}catch(e){throw e}finally{gt={}}return n}var Ke,$e,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,pt,ft,ht,gt;($e={})[(Ke={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",$e[Ke.EOF]="<end>",$e[Ke.Identifier]="Identifier",$e[Ke.Keyword]="Keyword",$e[Ke.NullLiteral]="Null",$e[Ke.NumericLiteral]="Numeric",$e[Ke.Punctuator]="Punctuator",$e[Ke.StringLiteral]="String",$e[Ke.RegularExpression]="RegularExpression",et=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],tt={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},nt={Data:1,Get:2,Set:4},rt={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},it={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},ot={name:"SyntaxTree",processComment:function(e){var t,n;if(!(e.type===tt.Program&&e.body.length>0)){for(gt.trailingComments.length>0?gt.trailingComments[0].range[0]>=e.range[1]?(n=gt.trailingComments,gt.trailingComments=[]):gt.trailingComments.length=0:gt.bottomRightStack.length>0&>.bottomRightStack[gt.bottomRightStack.length-1].trailingComments&>.bottomRightStack[gt.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(n=gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments,delete gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments);gt.bottomRightStack.length>0&>.bottomRightStack[gt.bottomRightStack.length-1].range[0]>=e.range[0];)t=gt.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):gt.leadingComments.length>0&>.leadingComments[gt.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=gt.leadingComments,gt.leadingComments=[]),n&&(e.trailingComments=n),gt.bottomRightStack.push(e)}},markEnd:function(e,t){return gt.range&&(e.range=[t.start,lt]),gt.loc&&(e.loc=new F(void 0===t.startLineNumber?t.lineNumber:t.startLineNumber,t.start-(void 0===t.startLineStart?t.lineStart:t.startLineStart),ct,lt-ut),this.postProcess(e)),gt.attachComment&&this.processComment(e),e},postProcess:function(e){return gt.source&&(e.loc.source=gt.source),e},createArrayExpression:function(e){return{type:tt.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:tt.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){return{type:"||"===e||"&&"===e?tt.LogicalExpression:tt.BinaryExpression,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:tt.BlockStatement,body:e}},createBreakStatement:function(e){return{type:tt.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:tt.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:tt.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:tt.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:tt.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:tt.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:tt.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:tt.EmptyStatement}},createExpressionStatement:function(e){return{type:tt.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:tt.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:tt.ForInStatement,left:e,right:t,body:n,each:!1}},createFunctionDeclaration:function(e,t,n,r){return{type:tt.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,t,n,r){return{type:tt.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:tt.Identifier,name:e}},createIfStatement:function(e,t,n){return{type:tt.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:tt.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:tt.Literal,value:e.value,raw:at.slice(e.start,e.end)}},createMemberExpression:function(e,t,n){return{type:tt.MemberExpression,computed:"["===e,object:t,property:n}},createNewExpression:function(e,t){return{type:tt.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:tt.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:tt.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:tt.Program,body:e}},createProperty:function(e,t,n){return{type:tt.Property,key:t,value:n,kind:e}},createReturnStatement:function(e){return{type:tt.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:tt.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:tt.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:tt.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:tt.ThisExpression}},createThrowStatement:function(e){return{type:tt.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:tt.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:tt.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:tt.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:tt.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:tt.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:tt.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:tt.WithStatement,object:e,body:t}}},e.version="1.2.2",e.tokenize=Xe,e.parse=qe,e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),tt)tt.hasOwnProperty(e)&&(t[e]=tt[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}))},{}],1:[function(e,t,n){(function(r){var i=function(){function e(){this.yy={}}var t={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(e,t,r,i,o,a,s){i.ast||(i.ast=n,n.initialize());var l=a.length-1;switch(o){case 1:return i.ast.set({expression:{type:"root",value:a[l]}}),i.ast.unshift(),i.ast.yield();case 2:return i.ast.set({expression:{type:"root",value:a[l-1]}}),i.ast.unshift(),i.ast.yield();case 3:return i.ast.unshift(),i.ast.yield();case 4:return i.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:a[l-1]}}),i.ast.unshift(),i.ast.yield();case 5:case 6:case 11:case 13:case 18:case 21:case 22:case 23:break;case 7:i.ast.set({operation:"member"}),i.ast.push();break;case 8:i.ast.set({operation:"subscript"}),i.ast.push();break;case 9:case 19:i.ast.set({scope:"child"});break;case 10:case 20:i.ast.set({scope:"descendant"});break;case 12:i.ast.set({scope:"child",operation:"member"});break;case 14:i.ast.set({expression:{type:"wildcard",value:a[l]}});break;case 15:i.ast.set({expression:{type:"identifier",value:a[l]}});break;case 16:i.ast.set({expression:{type:"script_expression",value:a[l]}});break;case 17:i.ast.set({expression:{type:"numeric_literal",value:parseInt(a[l])}});break;case 24:a[l].length>1?i.ast.set({expression:{type:"union",value:a[l]}}):this.$=a[l];break;case 25:this.$=[a[l]];break;case 26:this.$=a[l-2].concat(a[l]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(a[l])}},i.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:a[l]}},i.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:a[l]}},i.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:a[l]}},i.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:a[l]}},i.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:a[l]}},i.ast.set(this.$);break;case 33:case 34:this.$=a[l]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return"number"!=typeof(e=n.lexer.lex()||p)&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],o=[],a=this.table,s="",l=0,c=0,u=0,d=2,p=1,f=o.slice.call(arguments,1);this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;o.push(h);var g=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,m,y,b,C,x,E,S,w,V={};;){if(y=r[r.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(null!=v||(v=t()),b=a[y]&&a[y][v]),void 0===b||!b.length||!b[0]){var R="";for(x in w=[],a[y])this.terminals_[x]&&x>d&&w.push("'"+this.terminals_[x]+"'");R=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(v==p?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(R,{text:this.lexer.match,token:this.terminals_[v]||v,line:this.lexer.yylineno,loc:h,expected:w})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+v);switch(b[0]){case 1:r.push(v),i.push(this.lexer.yytext),o.push(this.lexer.yylloc),r.push(b[1]),v=null,m?(v=m,m=null):(c=this.lexer.yyleng,s=this.lexer.yytext,l=this.lexer.yylineno,h=this.lexer.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[b[1]][1],V.$=i[i.length-E],V._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},g&&(V._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(C=this.performAction.apply(V,[s,c,l,this.yy,b[1],i,o].concat(f))))return C;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),r.push(this.productions_[b[1]][0]),i.push(V.$),o.push(V._$),S=a[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},n={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(e){for(var t in e)this._node[t]=e[t];return this._node},node:function(e){return arguments.length&&(this._node=e),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var e=this._nodes;return this.initialize(),e}},r=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!t||n[0].length>t[0].length)){if(t=n,r=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return t.yytext=t.yytext.substr(1,t.yyleng-2),32;case 11:return t.yytext=t.yytext.substr(1,t.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e}();return t.lexer=r,e.prototype=t,t.Parser=e,new e}();void 0!==e&&void 0!==n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),r.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return n.parser.parse(i)},void 0!==t&&e.main===t&&n.main(r.argv.slice(1)))}).call(this,e("_process"))},{_process:11,fs:9,path:10}],2:[function(e,t,n){t.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(e,t,n){var r=e("./dict"),i=e("fs"),o={lex:{macros:{esc:"\\\\",int:r.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[r.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[r.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[r.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};i.readFileSync&&(o.moduleInclude=i.readFileSync(e.resolve("../include/module.js")),o.actionInclude=i.readFileSync(e.resolve("../include/action.js"))),t.exports=o},{"./dict":2,fs:9}],4:[function(e,t,n){function r(t,n,r){var i=e("./index"),o=c(p.parse(n).body[0].expression,{"@":t.value}),a=r.replace(/\{\{\s*value\s*\}\}/g,o),s=i.nodes(t.value,a);return s.forEach((function(e){e.path=t.path.concat(e.path.slice(1))})),s}function i(e){return Array.isArray(e)}function o(e){return e&&!(e instanceof Array)&&e instanceof Object}function a(e){return function(t,n,r,a){var s=t.value,l=t.path,c=[],u=function(t,s){i(t)?(t.forEach((function(e,t){c.length>=a||r(t,e,n)&&c.push({path:s.concat(t),value:e})})),t.forEach((function(t,n){c.length>=a||e&&u(t,s.concat(n))}))):o(t)&&(this.keys(t).forEach((function(e){c.length>=a||r(e,t[e],n)&&c.push({path:s.concat(e),value:t[e]})})),this.keys(t).forEach((function(n){c.length>=a||e&&u(t[n],s.concat(n))})))}.bind(this);return u(s,l),c}}function s(e){return function(t,n,r){return this.descend(n,t.expression.value,e,r)}}function l(e){return function(t,n,r){return this.traverse(n,t.expression.value,e,r)}}function c(){try{return h.apply(this,arguments)}catch(e){}}function u(e){return g(e,(function(e){return e.path.map((function(e){return String(e).replace("-","--")})).join("-")}))}function d(e){var t=String(e);return t.match(/^-?[0-9]+$/)?parseInt(t):null}var p=e("./aesprim"),f=e("./slice"),h=e("static-eval"),g=e("underscore").uniq,v=function(){return this.initialize.apply(this,arguments)};v.prototype.initialize=function(){this.traverse=a(!0),this.descend=a()},v.prototype.keys=Object.keys,v.prototype.resolve=function(e){var t=[e.operation,e.scope,e.expression.type].join("-"),n=this._fns[t];if(!n)throw new Error("couldn't resolve key: "+t);return n.bind(this)},v.prototype.register=function(e,t){if(!t instanceof Function)throw new Error("handler must be a function");this._fns[e]=t},v.prototype._fns={"member-child-identifier":function(e,t){var n=e.expression.value,r=t.value;if(r instanceof Object&&n in r)return[{value:r[n],path:t.path.concat(n)}]},"member-descendant-identifier":l((function(e,t,n){return e==n})),"subscript-child-numeric_literal":s((function(e,t,n){return e===n})),"member-child-numeric_literal":s((function(e,t,n){return String(e)===String(n)})),"subscript-descendant-numeric_literal":l((function(e,t,n){return e===n})),"member-child-wildcard":s((function(){return!0})),"member-descendant-wildcard":l((function(){return!0})),"subscript-descendant-wildcard":l((function(){return!0})),"subscript-child-wildcard":s((function(){return!0})),"subscript-child-slice":function(e,t){if(i(t.value)){var n=e.expression.value.split(":").map(d),r=t.value.map((function(e,n){return{value:e,path:t.path.concat(n)}}));return f.apply(null,[r].concat(n))}},"subscript-child-union":function(e,t){var n=[];return e.expression.value.forEach((function(e){var r={operation:"subscript",scope:"child",expression:e.expression},i=this.resolve(r)(r,t);i&&(n=n.concat(i))}),this),u(n)},"subscript-descendant-union":function(t,n,r){var i=e(".."),o=this,a=[];return i.nodes(n,"$..*").slice(1).forEach((function(e){a.length>=r||t.expression.value.forEach((function(t){var n={operation:"subscript",scope:"child",expression:t.expression},r=o.resolve(n)(n,e);a=a.concat(r)}))})),u(a)},"subscript-child-filter_expression":function(e,t,n){var r=e.expression.value.slice(2,-1),i=p.parse(r).body[0].expression,o=function(e,t){return c(i,{"@":t})};return this.descend(t,null,o,n)},"subscript-descendant-filter_expression":function(e,t,n){var r=e.expression.value.slice(2,-1),i=p.parse(r).body[0].expression,o=function(e,t){return c(i,{"@":t})};return this.traverse(t,null,o,n)},"subscript-child-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$..value")}},v.prototype._fns["subscript-child-string_literal"]=v.prototype._fns["member-child-identifier"],v.prototype._fns["member-descendant-numeric_literal"]=v.prototype._fns["subscript-descendant-string_literal"]=v.prototype._fns["member-descendant-identifier"],t.exports=v},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":12,underscore:9}],5:[function(e,t,n){function r(e){return"[object String]"==Object.prototype.toString.call(e)}var i=e("assert"),o=e("./dict"),a=e("./parser"),s=e("./handlers"),l=function(){this.initialize.apply(this,arguments)};l.prototype.initialize=function(){this.parser=new a,this.handlers=new s},l.prototype.parse=function(e){return i.ok(r(e),"we need a path"),this.parser.parse(e)},l.prototype.parent=function(e,t){i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path");var n=this.nodes(e,t)[0];return n.path.pop(),this.value(e,n.path)},l.prototype.apply=function(e,t,n){i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),i.equal(typeof n,"function","fn needs to be function");var r=this.nodes(e,t).sort((function(e,t){return t.path.length-e.path.length}));return r.forEach((function(t){var r=t.path.pop(),i=this.value(e,this.stringify(t.path)),o=t.value=n.call(e,i[r]);i[r]=o}),this),r},l.prototype.value=function(e,t,n){if(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),arguments.length>=3){var r=this.nodes(e,t).shift();if(!r)return this._vivify(e,t,n);var o=r.path.slice(-1).shift();this.parent(e,this.stringify(r.path))[o]=n}return this.query(e,this.stringify(t),1).shift()},l.prototype._vivify=function(e,t,n){var r=this;i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path");var o=this.parser.parse(t).map((function(e){return e.expression.value})),a=function(t,n){var i=t.pop(),o=r.value(e,t);o||(a(t.concat(),"string"==typeof i?{}:[]),o=r.value(e,t)),o[i]=n};return a(o,n),this.query(e,t)[0]},l.prototype.query=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(r(t),"we need a path"),this.nodes(e,t,n).map((function(e){return e.value}))},l.prototype.paths=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),this.nodes(e,t,n).map((function(e){return e.path}))},l.prototype.nodes=function(e,t,n){if(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),0===n)return[];var r=this.parser.parse(t),o=this.handlers,a=[{path:["$"],value:e}],s=[];return r.length&&"root"==r[0].expression.type&&r.shift(),r.length?(r.forEach((function(e,t){if(!(s.length>=n)){var i=o.resolve(e),l=[];a.forEach((function(o){if(!(s.length>=n)){var a=i(e,o,n);t==r.length-1?s=s.concat(a||[]):l=l.concat(a||[])}})),a=l}})),n?s.slice(0,n):s):a},l.prototype.stringify=function(e){i.ok(e,"we need a path");var t="$",n={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(e=this._normalize(e)).forEach((function(e){if("root"!=e.expression.type){var r,i=[e.scope,e.operation].join("-"),o=n[i];if(r="string_literal"==e.expression.type?JSON.stringify(e.expression.value):e.expression.value,!o)throw new Error("couldn't find template "+i);t+=o.replace(/{{value}}/,r)}})),t},l.prototype._normalize=function(e){if(i.ok(e,"we need a path"),"string"==typeof e)return this.parser.parse(e);if(Array.isArray(e)&&"string"==typeof e[0]){var t=[{expression:{type:"root",value:"$"}}];return e.forEach((function(e,n){if("$"!=e||0!==n)if("string"==typeof e&&e.match("^"+o.identifier+"$"))t.push({operation:"member",scope:"child",expression:{value:e,type:"identifier"}});else{var r="number"==typeof e?"numeric_literal":"string_literal";t.push({operation:"subscript",scope:"child",expression:{value:e,type:r}})}})),t}if(Array.isArray(e)&&"object"==typeof e[0])return e;throw new Error("couldn't understand path "+e)},l.Handlers=s,l.Parser=a;var c=new l;c.JSONPath=l,t.exports=c},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(e,t,n){var r=e("./grammar"),i=e("../generated/parser"),o=function(){var e=new i.Parser,t=e.parseError;return e.yy.parseError=function(){e.yy.ast&&e.yy.ast.initialize(),t.apply(e,arguments)},e};o.grammar=r,t.exports=o},{"../generated/parser":1,"./grammar":3}],7:[function(e,t,n){function r(e){return String(e).match(/^[0-9]+$/)?parseInt(e):Number.isFinite(e)?parseInt(e,10):0}t.exports=function(e,t,n,i){if("string"==typeof t)throw new Error("start cannot be a string");if("string"==typeof n)throw new Error("end cannot be a string");if("string"==typeof i)throw new Error("step cannot be a string");var o=e.length;if(0===i)throw new Error("step cannot be zero");if(i=i?r(i):1,n=n<0?o+n:n,t=r(0===(t=t<0?o+t:t)?0:t||(i>0?0:o-1)),n=r(0===n?0:n||(i>0?o:-1)),t=i>0?Math.max(0,t):Math.min(o,t),n=i>0?Math.min(n,o):Math.max(-1,n),i>0&&n<=t)return[];if(i<0&&t<=n)return[];for(var a=[],s=t;s!=n&&!(i<0&&s<=n||i>0&&s>=n);s+=i)a.push(e[s]);return a}},{}],8:[function(e,t,n){function r(e,t){return f.isUndefined(t)?""+t:f.isNumber(t)&&!isFinite(t)||f.isFunction(t)||f.isRegExp(t)?t.toString():t}function i(e,t){return f.isString(e)?e.length<t?e:e.slice(0,t):e}function o(e){return i(JSON.stringify(e.actual,r),128)+" "+e.operator+" "+i(JSON.stringify(e.expected,r),128)}function a(e,t,n,r,i){throw new v.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function s(e,t){e||a(e,!0,t,"==",v.ok)}function l(e,t){if(e===t)return!0;if(f.isBuffer(e)&&f.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return f.isDate(e)&&f.isDate(t)?e.getTime()===t.getTime():f.isRegExp(e)&&f.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:f.isObject(e)||f.isObject(t)?u(e,t):e==t}function c(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function u(e,t){if(f.isNullOrUndefined(e)||f.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(f.isPrimitive(e)||f.isPrimitive(t))return e===t;var n=c(e),r=c(t);if(n&&!r||!n&&r)return!1;if(n)return l(e=h.call(e),t=h.call(t));var i,o,a=m(e),s=m(t);if(a.length!=s.length)return!1;for(a.sort(),s.sort(),o=a.length-1;o>=0;o--)if(a[o]!=s[o])return!1;for(o=a.length-1;o>=0;o--)if(!l(e[i=a[o]],t[i]))return!1;return!0}function d(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function p(e,t,n,r){var i;f.isString(n)&&(r=n,n=null);try{t()}catch(e){i=e}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&a(i,n,"Missing expected exception"+r),!e&&d(i,n)&&a(i,n,"Got unwanted exception"+r),e&&i&&n&&!d(i,n)||!e&&i)throw i}var f=e("util/"),h=Array.prototype.slice,g=Object.prototype.hasOwnProperty,v=t.exports=s;v.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var t=e.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var l=r.indexOf("\n",s+1);r=r.substring(l+1)}this.stack=r}}},f.inherits(v.AssertionError,Error),v.fail=a,v.ok=s,v.equal=function(e,t,n){e!=t&&a(e,t,n,"==",v.equal)},v.notEqual=function(e,t,n){e==t&&a(e,t,n,"!=",v.notEqual)},v.deepEqual=function(e,t,n){l(e,t)||a(e,t,n,"deepEqual",v.deepEqual)},v.notDeepEqual=function(e,t,n){l(e,t)&&a(e,t,n,"notDeepEqual",v.notDeepEqual)},v.strictEqual=function(e,t,n){e!==t&&a(e,t,n,"===",v.strictEqual)},v.notStrictEqual=function(e,t,n){e===t&&a(e,t,n,"!==",v.notStrictEqual)},v.throws=function(e,t,n){p.apply(this,[!0].concat(h.call(arguments)))},v.doesNotThrow=function(e,t){p.apply(this,[!1].concat(h.call(arguments)))},v.ifError=function(e){if(e)throw e};var m=Object.keys||function(e){var t=[];for(var n in e)g.call(e,n)&&t.push(n);return t}},{"util/":15}],9:[function(e,t,n){},{}],10:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return n=t(r(n.split("/"),(function(e){return!!e})),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),o="/"===a(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&o&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l<a;l++)if(i[l]!==o[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push("..");return(c=c.concat(o.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=o(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=o(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return o(e)[3]};var a=function(e,t,n){return e.substr(t,n)}}).call(this,e("_process"))},{_process:11}],11:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(d===setTimeout)return setTimeout(e,0);if((d===r||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function s(){v&&h&&(v=!1,h.length?g=h.concat(g):m=-1,g.length&&l())}function l(){if(!v){var e=o(s);v=!0;for(var t=g.length;t;){for(h=g,g=[];++m<t;)h&&h[m].run();m=-1,t=g.length}h=null,v=!1,a(e)}}function c(e,t){this.fun=e,this.array=t}function u(){}var d,p,f=t.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:r}catch(e){d=r}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var h,g=[],v=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];g.push(new c(e,t)),1!==g.length||v||o(l)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],12:[function(e,t,n){var r=e("escodegen").generate;t.exports=function(e,t){t||(t={});var n={},i=function e(i){if("Literal"===i.type)return i.value;if("UnaryExpression"===i.type){var o=e(i.argument);return"+"===i.operator?+o:"-"===i.operator?-o:"~"===i.operator?~o:"!"===i.operator?!o:n}if("ArrayExpression"===i.type){for(var a=[],s=0,l=i.elements.length;s<l;s++){if((v=e(i.elements[s]))===n)return n;a.push(v)}return a}if("ObjectExpression"===i.type){var c={};for(s=0;s<i.properties.length;s++){var u=null===(m=i.properties[s]).value?m.value:e(m.value);if(u===n)return n;c[m.key.value||m.key.name]=u}return c}if("BinaryExpression"===i.type||"LogicalExpression"===i.type){if((l=e(i.left))===n)return n;var d=e(i.right);if(d===n)return n;var p=i.operator;return"=="===p?l==d:"==="===p?l===d:"!="===p?l!=d:"!=="===p?l!==d:"+"===p?l+d:"-"===p?l-d:"*"===p?l*d:"/"===p?l/d:"%"===p?l%d:"<"===p?l<d:"<="===p?l<=d:">"===p?l>d:">="===p?l>=d:"|"===p?l|d:"&"===p?l&d:"^"===p?l^d:"&&"===p?l&&d:"||"===p?l||d:n}if("Identifier"===i.type)return{}.hasOwnProperty.call(t,i.name)?t[i.name]:n;if("CallExpression"===i.type){var f=e(i.callee);if(f===n)return n;var h=i.callee.object?e(i.callee.object):n;h===n&&(h=null);var g=[];for(s=0,l=i.arguments.length;s<l;s++){var v;if((v=e(i.arguments[s]))===n)return n;g.push(v)}return f.apply(h,g)}var m;return"MemberExpression"===i.type?(c=e(i.object))===n?n:"Identifier"===i.property.type?c[i.property.name]:(m=e(i.property))===n?n:c[m]:"ConditionalExpression"===i.type?(o=e(i.test))===n?n:e(o?i.consequent:i.alternate):"FunctionExpression"===i.type?Function("return "+r(i))():n}(e);return i===n?void 0:i}},{escodegen:9}],13:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],14:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],15:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),l(n,e,n.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}function l(e,t,n){if(e.customInspect&&t&&R(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return b(i)||(i=l(e,i,n)),i}var o=c(e,t);if(o)return o;var a=Object.keys(t),g=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),V(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return u(t);if(0===a.length){if(R(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(V(t))return u(t)}var m,y="",C=!1,x=["{","}"];return h(t)&&(C=!0,x=["[","]"]),R(t)&&(y=" [Function"+(t.name?": "+t.name:"")+"]"),E(t)&&(y=" "+RegExp.prototype.toString.call(t)),w(t)&&(y=" "+Date.prototype.toUTCString.call(t)),V(t)&&(y=" "+u(t)),0!==a.length||C&&0!=t.length?n<0?E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),m=C?d(e,t,n,g,a):a.map((function(r){return p(e,t,n,g,r,C)})),e.seen.pop(),f(m,y,x)):x[0]+y+x[1]}function c(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)D(t,String(a))?o.push(p(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,n,r,i,!0))})),o}function p(e,t,n,r,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),D(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=v(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function f(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function m(e){return null==e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function C(e){return"symbol"==typeof e}function x(e){return void 0===e}function E(e){return S(e)&&"[object RegExp]"===A(e)}function S(e){return"object"==typeof e&&null!==e}function w(e){return S(e)&&"[object Date]"===A(e)}function V(e){return S(e)&&("[object Error]"===A(e)||e instanceof Error)}function R(e){return"function"==typeof e}function O(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function A(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}function T(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),_[e.getMonth()],t].join(" ")}function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var N=/%[sdj%]/g;r.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(N,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<o;s=r[++n])a+=v(s)||!S(s)?" "+s:" "+i(s);return a},r.deprecate=function(e,i){function o(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(x(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return o};var P,B={};r.debuglog=function(e){if(x(P)&&(P=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!B[e])if(new RegExp("\\b"+e+"\\b","i").test(P)){var n=t.pid;B[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else B[e]=function(){};return B[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=g,r.isNull=v,r.isNullOrUndefined=m,r.isNumber=y,r.isString=b,r.isSymbol=C,r.isUndefined=x,r.isRegExp=E,r.isObject=S,r.isDate=w,r.isError=V,r.isFunction=R,r.isPrimitive=O,r.isBuffer=e("./support/isBuffer");var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",T(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!S(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":14,_process:11,inherits:13}],jsonpath:[function(e,t,n){t.exports=e("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")},948:function(e,t,n){var r;e=n.nmd(e),function(){function i(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function a(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function s(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function l(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function c(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function u(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function d(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function p(e,t){return!(null==e||!e.length)&&-1<x(e,t,0)}function f(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function h(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function g(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function v(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function m(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function y(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function b(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function C(e,t,n,r){var i=e.length;for(n+=r?1:-1;r?n--:++n<i;)if(t(e[n],n,e))return n;return-1}function x(e,t,n){if(t==t)e:{--n;for(var r=e.length;++n<r;)if(e[n]===t){e=n;break e}e=-1}else e=C(e,S,n);return e}function E(e,t,n,r){--n;for(var i=e.length;++n<i;)if(r(e[n],t))return n;return-1}function S(e){return e!=e}function w(e,t){var n=null==e?0:e.length;return n?A(e,t)/n:Q}function V(e){return function(t){return null==t?G:t[e]}}function R(e){return function(t){return null==e?G:e[t]}}function O(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function A(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);o!==G&&(n=n===G?o:n+o)}return n}function k(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function T(e){return function(t){return e(t)}}function D(e,t){return h(t,(function(t){return e[t]}))}function N(e,t){return e.has(t)}function P(e,t){for(var n=-1,r=e.length;++n<r&&-1<x(t,e[n],0););return n}function B(e,t){for(var n=e.length;n--&&-1<x(t,e[n],0););return n}function _(e){return"\\"+Fe[e]}function M(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function I(e,t){return function(n){return e(t(n))}}function F(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&"__lodash_placeholder__"!==a||(e[n]="__lodash_placeholder__",o[i++]=n)}return o}function L(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function W(e){if(Ne.test(e)){for(var t=Te.lastIndex=0;Te.test(e);)++t;e=t}else e=et(e);return e}function U(e){return Ne.test(e)?e.match(Te)||[]:e.split("")}var G,z=1/0,Q=NaN,j=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],Y=/\b__p\+='';/g,H=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,Z=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,q=RegExp(Z.source),K=RegExp(X.source),$=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,te=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/^\./,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ae=/[\\^$.*+?()[\]{}|]/g,se=RegExp(ae.source),le=/^\s+|\s+$/g,ce=/^\s+/,ue=/\s+$/,de=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pe=/\{\n\/\* \[wrapped with (.+)\] \*/,fe=/,? & /,he=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ge=/\\(\\)?/g,ve=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ye=/^[-+]0x[0-9a-f]+$/i,be=/^0b[01]+$/i,Ce=/^\[object .+?Constructor\]$/,xe=/^0o[0-7]+$/i,Ee=/^(?:0|[1-9]\d*)$/,Se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,Ve=/['\n\r\u2028\u2029\\]/g,Re="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",Oe="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+Re,Ae=RegExp("['’]","g"),ke=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Te=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+Re,"g"),De=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",Oe].join("|"),"g"),Ne=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Pe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Be="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),_e={};_e["[object Float32Array]"]=_e["[object Float64Array]"]=_e["[object Int8Array]"]=_e["[object Int16Array]"]=_e["[object Int32Array]"]=_e["[object Uint8Array]"]=_e["[object Uint8ClampedArray]"]=_e["[object Uint16Array]"]=_e["[object Uint32Array]"]=!0,_e["[object Arguments]"]=_e["[object Array]"]=_e["[object ArrayBuffer]"]=_e["[object Boolean]"]=_e["[object DataView]"]=_e["[object Date]"]=_e["[object Error]"]=_e["[object Function]"]=_e["[object Map]"]=_e["[object Number]"]=_e["[object Object]"]=_e["[object RegExp]"]=_e["[object Set]"]=_e["[object String]"]=_e["[object WeakMap]"]=!1;var Me={};Me["[object Arguments]"]=Me["[object Array]"]=Me["[object ArrayBuffer]"]=Me["[object DataView]"]=Me["[object Boolean]"]=Me["[object Date]"]=Me["[object Float32Array]"]=Me["[object Float64Array]"]=Me["[object Int8Array]"]=Me["[object Int16Array]"]=Me["[object Int32Array]"]=Me["[object Map]"]=Me["[object Number]"]=Me["[object Object]"]=Me["[object RegExp]"]=Me["[object Set]"]=Me["[object String]"]=Me["[object Symbol]"]=Me["[object Uint8Array]"]=Me["[object Uint8ClampedArray]"]=Me["[object Uint16Array]"]=Me["[object Uint32Array]"]=!0,Me["[object Error]"]=Me["[object Function]"]=Me["[object WeakMap]"]=!1;var Ie,Fe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Le=parseFloat,We=parseInt,Ue="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ge="object"==typeof self&&self&&self.Object===Object&&self,ze=Ue||Ge||Function("return this")(),Qe=t&&!t.nodeType&&t,je=Qe&&e&&!e.nodeType&&e,Ye=je&&je.exports===Qe,He=Ye&&Ue.process;e:{try{Ie=He&&He.binding&&He.binding("util");break e}catch(i){}Ie=void 0}var Je=Ie&&Ie.isArrayBuffer,Ze=Ie&&Ie.isDate,Xe=Ie&&Ie.isMap,qe=Ie&&Ie.isRegExp,Ke=Ie&&Ie.isSet,$e=Ie&&Ie.isTypedArray,et=V("length"),tt=R({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nt=R({"&":"&","<":"<",">":">",'"':""","'":"'"}),rt=R({"&":"&","<":"<",">":">",""":'"',"'":"'"}),it=function e(t){function n(e){if(Kr(e)&&!Wa(e)&&!(e instanceof Re)){if(e instanceof R)return e;if(Wi.call(e,"__wrapped__"))return wr(e)}return new R(e)}function r(){}function R(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=G}function Re(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ie;++t<n;)this.add(e[t])}function Ue(e){this.size=(this.__data__=new Te(e)).size}function Ge(e,t){var n,r=Wa(e),i=!r&&La(e),o=!r&&!i&&Ga(e),a=!r&&!i&&!o&&Ha(e),s=(i=(r=r||i||o||a)?k(e.length,Bi):[]).length;for(n in e)!t&&!Wi.call(e,n)||r&&("length"==n||o&&("offset"==n||"parent"==n)||a&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||dr(n,s))||i.push(n);return i}function Qe(e){var t=e.length;return t?e[Ht(0,t-1)]:G}function je(e,t){return Cr(wn(e),dt(t,0,e.length))}function He(e){return Cr(wn(e))}function et(e,t,n){(n===G||Qr(e[t],n))&&(n!==G||t in e)||ct(e,t,n)}function ot(e,t,n){var r=e[t];Wi.call(e,t)&&Qr(r,n)&&(n!==G||t in e)||ct(e,t,n)}function at(e,t){for(var n=e.length;n--;)if(Qr(e[n][0],t))return n;return-1}function st(e,t,n,r){return Lo(e,(function(e,i,o){t(r,e,n(e),o)})),r}function lt(e,t){return e&&Vn(t,pi(t),e)}function ct(e,t,n){"__proto__"==t&&io?io(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ut(e,t){for(var n=-1,r=t.length,i=Oi(r),o=null==e;++n<r;)i[n]=o?G:ui(e,t[n]);return i}function dt(e,t,n){return e==e&&(n!==G&&(e=e<=n?e:n),t!==G&&(e=e>=t?e:t)),e}function pt(e,t,n,r,i,o){var a,s=1&t,c=2&t,u=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),a!==G)return a;if(!qr(e))return e;if(r=Wa(e)){if(a=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Wi.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return wn(e,a)}else{var d=Xo(e),p="[object Function]"==d||"[object GeneratorFunction]"==d;if(Ga(e))return yn(e,s);if("[object Object]"==d||"[object Arguments]"==d||p&&!i){if(a=c||p?{}:lr(e),!s)return c?function(e,t){return Vn(e,Zo(e),t)}(e,function(e,t){return e&&Vn(t,fi(t),e)}(a,e)):function(e,t){return Vn(e,Jo(e),t)}(e,lt(a,e))}else{if(!Me[d])return i?e:{};a=cr(e,d,pt,s)}}if(o||(o=new Ue),i=o.get(e))return i;o.set(e,a);c=u?c?er:$n:c?fi:pi;var f=r?G:c(e);return l(f||e,(function(r,i){f&&(r=e[i=r]),ot(a,i,pt(r,t,n,i,e,o))})),a}function ft(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ni(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===G&&!(i in e)||!o(a))return!1}return!0}function ht(e,t,n){if("function"!=typeof e)throw new _i("Expected a function");return $o((function(){e.apply(G,n)}),t)}function gt(e,t,n,r){var i=-1,o=p,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=h(t,T(n))),r?(o=f,a=!1):200<=t.length&&(o=N,a=!1,t=new Fe(t));e:for(;++i<s;){var u=e[i],d=null==n?u:n(u);u=r||0!==u?u:0;if(a&&d==d){for(var g=c;g--;)if(t[g]===d)continue e;l.push(u)}else o(t,d,r)||l.push(u)}return l}function vt(e,t){var n=!0;return Lo(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function mt(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(s===G?a==a&&!ni(a):n(a,s)))var s=a,l=o}return l}function yt(e,t){var n=[];return Lo(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function bt(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=ur),i||(i=[]);++o<a;){var s=e[o];0<t&&n(s)?1<t?bt(s,t-1,n,r,i):g(i,s):r||(i[i.length]=s)}return i}function Ct(e,t){return e&&Uo(e,t,pi)}function xt(e,t){return e&&Go(e,t,pi)}function Et(e,t){return d(t,(function(t){return Jr(e[t])}))}function St(e,t){for(var n=0,r=(t=vn(t,e)).length;null!=e&&n<r;)e=e[xr(t[n++])];return n&&n==r?e:G}function wt(e,t,n){return t=t(e),Wa(e)?t:g(t,n(e))}function Vt(e){if(null==e)e=e===G?"[object Undefined]":"[object Null]";else if(ro&&ro in Ni(e)){var t=Wi.call(e,ro),n=e[ro];try{e[ro]=G;var r=!0}catch(e){}var i=zi.call(e);r&&(t?e[ro]=n:delete e[ro]),e=i}else e=zi.call(e);return e}function Rt(e,t){return e>t}function Ot(e,t){return null!=e&&Wi.call(e,t)}function At(e,t){return null!=e&&t in Ni(e)}function kt(e,t,n){for(var r=n?f:p,i=e[0].length,o=e.length,a=o,s=Oi(o),l=1/0,c=[];a--;){var u=e[a];a&&t&&(u=h(u,T(t))),l=mo(u.length,l),s[a]=!n&&(t||120<=i&&120<=u.length)?new Fe(a&&u):G}u=e[0];var d=-1,g=s[0];e:for(;++d<i&&c.length<l;){var v=u[d],m=t?t(v):v;v=n||0!==v?v:0;if(g?!N(g,m):!r(c,m,n)){for(a=o;--a;){var y=s[a];if(y?!N(y,m):!r(e[a],m,n))continue e}g&&g.push(m),c.push(v)}}return c}function Tt(e,t,n){return null==(t=null==(e=2>(t=vn(t,e)).length?e:St(e,en(t,0,-1)))?e:e[xr(kr(t))])?G:a(t,e,n)}function Dt(e){return Kr(e)&&"[object Arguments]"==Vt(e)}function Nt(e,t,n,r,i){if(e===t)t=!0;else if(null==e||null==t||!Kr(e)&&!Kr(t))t=e!=e&&t!=t;else e:{var o,a,s=Wa(e),l=Wa(t),c="[object Object]"==(o="[object Arguments]"==(o=s?"[object Array]":Xo(e))?"[object Object]":o);l="[object Object]"==(a="[object Arguments]"==(a=l?"[object Array]":Xo(t))?"[object Object]":a);if((a=o==a)&&Ga(e)){if(!Ga(t)){t=!1;break e}s=!0,c=!1}if(a&&!c)i||(i=new Ue),t=s||Ha(e)?qn(e,t,n,r,Nt,i):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new Zi(e),new Zi(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return Qr(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=M;case"[object Set]":if(s||(s=L),e.size!=t.size&&!(1&r))break;return(n=a.get(e))?n==t:(r|=2,a.set(e,t),t=qn(s(e),s(t),r,i,o,a),a.delete(e),t);case"[object Symbol]":if(Mo)return Mo.call(e)==Mo.call(t)}return!1}(e,t,o,n,r,Nt,i);else{if(!(1&n)&&(s=c&&Wi.call(e,"__wrapped__"),o=l&&Wi.call(t,"__wrapped__"),s||o)){e=s?e.value():e,t=o?t.value():t,i||(i=new Ue),t=Nt(e,t,n,r,i);break e}if(a)t:if(i||(i=new Ue),s=1&n,o=$n(e),l=o.length,a=$n(t).length,l==a||s){for(c=l;c--;){var u=o[c];if(!(s?u in t:Wi.call(t,u))){t=!1;break t}}if((a=i.get(e))&&i.get(t))t=a==t;else{a=!0,i.set(e,t),i.set(t,e);for(var d=s;++c<l;){var p=e[u=o[c]],f=t[u];if(r)var h=s?r(f,p,u,t,e,i):r(p,f,u,e,t,i);if(h===G?p!==f&&!Nt(p,f,n,r,i):!h){a=!1;break}d||(d="constructor"==u)}a&&!d&&((n=e.constructor)!=(r=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof n&&n instanceof n&&"function"==typeof r&&r instanceof r)&&(a=!1)),i.delete(e),i.delete(t),t=a}}else t=!1;else t=!1}}return t}function Pt(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Ni(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(c===G&&!(l in e))return!1}else{if(s=new Ue,r)var d=r(c,u,l,e,t,s);if(d===G?!Nt(u,c,3,r,s):!d)return!1}}return!0}function Bt(e){return!(!qr(e)||Gi&&Gi in e)&&(Jr(e)?Yi:Ce).test(Er(e))}function _t(e){return"function"==typeof e?e:null==e?Ci:"object"==typeof e?Wa(e)?Wt(e[0],e[1]):Lt(e):wi(e)}function Mt(e){if(!gr(e))return go(e);var t,n=[];for(t in Ni(e))Wi.call(e,t)&&"constructor"!=t&&n.push(t);return n}function It(e,t){return e<t}function Ft(e,t){var n=-1,r=jr(e)?Oi(e.length):[];return Lo(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function Lt(e){var t=or(e);return 1==t.length&&t[0][2]?vr(t[0][0],t[0][1]):function(n){return n===e||Pt(n,e,t)}}function Wt(e,t){return fr(e)&&t==t&&!qr(t)?vr(xr(e),t):function(n){var r=ui(n,e);return r===G&&r===t?di(n,e):Nt(t,r,3)}}function Ut(e,t,n,r,i){e!==t&&Uo(t,(function(o,a){if(qr(o)){i||(i=new Ue);var s=i,l=e[a],c=t[a];if(h=s.get(c))et(e,a,h);else{var u=(h=r?r(l,c,a+"",e,t,s):G)===G;if(u){var d=Wa(c),p=!d&&Ga(c),f=!d&&!p&&Ha(c),h=c;d||p||f?Wa(l)?h=l:Yr(l)?h=wn(l):p?(u=!1,h=yn(c,!0)):f?(u=!1,h=Cn(c,!0)):h=[]:ei(c)||La(c)?(h=l,La(l)?h=li(l):(!qr(l)||n&&Jr(l))&&(h=lr(c))):u=!1}u&&(s.set(c,h),Ut(h,c,n,r,s),s.delete(c)),et(e,a,h)}}else(s=r?r(e[a],o,a+"",e,t,i):G)===G&&(s=o),et(e,a,s)}),fi)}function Gt(e,t){var n=e.length;if(n)return dr(t+=0>t?n:0,n)?e[t]:G}function zt(e,t,n){var r=-1;return t=h(t.length?t:[Ci],T(rr())),e=Ft(e,(function(e){return{a:h(t,(function(t){return t(e)})),b:++r,c:e}})),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].c;return e}(e,(function(e,t){var r;e:{r=-1;for(var i=e.a,o=t.a,a=i.length,s=n.length;++r<a;){var l=xn(i[r],o[r]);if(l){r=r>=s?l:l*("desc"==n[r]?-1:1);break e}}r=e.b-t.b}return r}))}function Qt(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=St(e,a);n(s,a)&&Kt(o,vn(a,e),s)}return o}function jt(e,t,n,r){var i=r?E:x,o=-1,a=t.length,s=e;for(e===t&&(t=wn(t)),n&&(s=h(e,T(n)));++o<a;){var l=0,c=t[o];for(c=n?n(c):c;-1<(l=i(s,c,l,r));)s!==e&&eo.call(s,l,1),eo.call(e,l,1)}return e}function Yt(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;dr(i)?eo.call(e,i,1):cn(e,i)}}}function Ht(e,t){return e+co(Co()*(t-e+1))}function Jt(e,t){var n="";if(!e||1>t||9007199254740991<t)return n;do{t%2&&(n+=e),(t=co(t/2))&&(e+=e)}while(t);return n}function Zt(e,t){return ea(mr(e,t,Ci),e+"")}function Xt(e){return Qe(gi(e))}function qt(e,t){var n=gi(e);return Cr(n,dt(t,0,n.length))}function Kt(e,t,n,r){if(!qr(e))return e;for(var i=-1,o=(t=vn(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var l=xr(t[i]),c=n;if(i!=a){var u=s[l];(c=r?r(u,l,s):G)===G&&(c=qr(u)?u:dr(t[i+1])?[]:{})}ot(s,l,c),s=s[l]}return e}function $t(e){return Cr(gi(e))}function en(e,t,n){var r=-1,i=e.length;for(0>t&&(t=-t>i?0:i+t),0>(n=n>i?i:n)&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0,n=Oi(i);++r<i;)n[r]=e[r+t];return n}function tn(e,t){var n;return Lo(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function nn(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&2147483647>=i){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ni(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return rn(e,t,Ci,n)}function rn(e,t,n,r){t=n(t);for(var i=0,o=null==e?0:e.length,a=t!=t,s=null===t,l=ni(t),c=t===G;i<o;){var u=co((i+o)/2),d=n(e[u]),p=d!==G,f=null===d,h=d==d,g=ni(d);(a?r||h:c?h&&(r||p):s?h&&p&&(r||!f):l?h&&p&&!f&&(r||!g):!f&&!g&&(r?d<=t:d<t))?i=u+1:o=u}return mo(o,4294967294)}function on(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Qr(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function an(e){return"number"==typeof e?e:ni(e)?Q:+e}function sn(e){if("string"==typeof e)return e;if(Wa(e))return h(e,sn)+"";if(ni(e))return Io?Io.call(e):"";var t=e+"";return"0"==t&&1/e==-z?"-0":t}function ln(e,t,n){var r=-1,i=p,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=f;else if(200<=o){if(i=t?null:Yo(e))return L(i);a=!1,i=N,l=new Fe}else l=t?[]:s;e:for(;++r<o;){var c=e[r],u=t?t(c):c;c=n||0!==c?c:0;if(a&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue e;t&&l.push(u),s.push(c)}else i(l,u,n)||(l!==s&&l.push(u),s.push(c))}return s}function cn(e,t){return null==(e=2>(t=vn(t,e)).length?e:St(e,en(t,0,-1)))||delete e[xr(kr(t))]}function un(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?en(e,r?0:o,r?o+1:i):en(e,r?o+1:0,r?i:o)}function dn(e,t){var n=e;return n instanceof Re&&(n=n.value()),v(t,(function(e,t){return t.func.apply(t.thisArg,g([e],t.args))}),n)}function pn(e,t,n){var r=e.length;if(2>r)return r?ln(e[0]):[];for(var i=-1,o=Oi(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=gt(o[i]||a,e[s],t,n));return ln(bt(o,1),t,n)}function fn(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;)n(a,e[r],r<o?t[r]:G);return a}function hn(e){return Yr(e)?e:[]}function gn(e){return"function"==typeof e?e:Ci}function vn(e,t){return Wa(e)?e:fr(e,t)?[e]:ta(ci(e))}function mn(e,t,n){var r=e.length;return n=n===G?r:n,!t&&n>=r?e:en(e,t,n)}function yn(e,t){if(t)return e.slice();var n=e.length;n=Xi?Xi(n):new e.constructor(n);return e.copy(n),n}function bn(e){var t=new e.constructor(e.byteLength);return new Zi(t).set(new Zi(e)),t}function Cn(e,t){return new e.constructor(t?bn(e.buffer):e.buffer,e.byteOffset,e.length)}function xn(e,t){if(e!==t){var n=e!==G,r=null===e,i=e==e,o=ni(e),a=t!==G,s=null===t,l=t==t,c=ni(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}function En(e,t,n,r){var i=-1,o=e.length,a=n.length,s=-1,l=t.length,c=vo(o-a,0),u=Oi(l+c);for(r=!r;++s<l;)u[s]=t[s];for(;++i<a;)(r||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function Sn(e,t,n,r){var i=-1,o=e.length,a=-1,s=n.length,l=-1,c=t.length,u=vo(o-s,0),d=Oi(u+c);for(r=!r;++i<u;)d[i]=e[i];for(u=i;++l<c;)d[u+l]=t[l];for(;++a<s;)(r||i<o)&&(d[u+n[a]]=e[i++]);return d}function wn(e,t){var n=-1,r=e.length;for(t||(t=Oi(r));++n<r;)t[n]=e[n];return t}function Vn(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):G;l===G&&(l=e[s]),i?ct(n,s,l):ot(n,s,l)}return n}function Rn(e,t){return function(n,r){var i=Wa(n)?s:st,o=t?t():{};return i(n,e,rr(r,2),o)}}function On(e){return Zt((function(t,n){var r=-1,i=n.length,o=1<i?n[i-1]:G,a=2<i?n[2]:G;o=3<e.length&&"function"==typeof o?(i--,o):G;for(a&&pr(n[0],n[1],a)&&(o=3>i?G:o,i=1),t=Ni(t);++r<i;)(a=n[r])&&e(t,a,r,o);return t}))}function An(e,t){return function(n,r){if(null==n)return n;if(!jr(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ni(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function kn(e){return function(t,n,r){for(var i=-1,o=Ni(t),a=(r=r(t)).length;a--;){var s=r[e?a:++i];if(!1===n(o[s],s,o))break}return t}}function Tn(e){return function(t){t=ci(t);var n=Ne.test(t)?U(t):G,r=n?n[0]:t.charAt(0);return t=n?mn(n,1).join(""):t.slice(1),r[e]()+t}}function Dn(e){return function(t){return v(yi(mi(t).replace(Ae,"")),e,"")}}function Nn(e){return function(){switch((t=arguments).length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var t,n=Fo(e.prototype);return qr(t=e.apply(n,t))?t:n}}function Pn(e,t,n){var r=Nn(e);return function i(){for(var o=arguments.length,s=Oi(o),l=o,c=nr(i);l--;)s[l]=arguments[l];return(o-=(l=3>o&&s[0]!==c&&s[o-1]!==c?[]:F(s,c)).length)<n?Qn(e,t,Mn,i.placeholder,G,s,l,G,G,n-o):a(this&&this!==ze&&this instanceof i?r:e,this,s)}}function Bn(e){return function(t,n,r){var i=Ni(t);if(!jr(t)){var o=rr(n,3);t=pi(t),n=function(e){return o(i[e],e,i)}}return-1<(n=e(t,n,r))?i[o?t[n]:n]:G}}function _n(e){return Kn((function(t){var n=t.length,r=n,i=R.prototype.thru;for(e&&t.reverse();r--;){if("function"!=typeof(a=t[r]))throw new _i("Expected a function");if(i&&!o&&"wrapper"==tr(a))var o=new R([],!0)}for(r=o?r:n;++r<n;){var a,s="wrapper"==(i=tr(a=t[r]))?Ho(a):G;o=s&&hr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?o[tr(s[0])].apply(o,s[3]):1==a.length&&hr(a)?o[i]():o.thru(a)}return function(){var e=(i=arguments)[0];if(o&&1==i.length&&Wa(e))return o.plant(e).value();for(var r=0,i=n?t[r].apply(this,i):e;++r<n;)i=t[r].call(this,i);return i}}))}function Mn(e,t,n,r,i,o,a,s,l,c){var u=128&t,d=1&t,p=2&t,f=24&t,h=512&t,g=p?G:Nn(e);return function v(){for(var m=arguments.length,y=Oi(m),b=m;b--;)y[b]=arguments[b];if(f){var C,x=nr(v);b=y.length;for(C=0;b--;)y[b]===x&&++C}if(r&&(y=En(y,r,i,f)),o&&(y=Sn(y,o,a,f)),m-=C,f&&m<c)return x=F(y,x),Qn(e,t,Mn,v.placeholder,n,y,x,s,l,c-m);if(x=d?n:this,b=p?x[e]:e,m=y.length,s){C=y.length;for(var E=mo(s.length,C),S=wn(y);E--;){var w=s[E];y[E]=dr(w,C)?S[w]:G}}else h&&1<m&&y.reverse();return u&&l<m&&(y.length=l),this&&this!==ze&&this instanceof v&&(b=g||Nn(b)),b.apply(x,y)}}function In(e,t){return function(n,r){return function(e,t,n){var r={};return Ct(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r))}}function Fn(e,t){return function(n,r){var i;if(n===G&&r===G)return t;if(n!==G&&(i=n),r!==G){if(i===G)return r;"string"==typeof n||"string"==typeof r?(n=sn(n),r=sn(r)):(n=an(n),r=an(r)),i=e(n,r)}return i}}function Ln(e){return Kn((function(t){return t=h(t,T(rr())),Zt((function(n){var r=this;return e(t,(function(e){return a(e,r,n)}))}))}))}function Wn(e,t){var n=(t=t===G?" ":sn(t)).length;return 2>n?n?Jt(t,e):t:(n=Jt(t,lo(e/W(t))),Ne.test(t)?mn(U(n),0,e).join(""):n.slice(0,e))}function Un(e,t,n,r){var i=1&t,o=Nn(e);return function t(){for(var s=-1,l=arguments.length,c=-1,u=r.length,d=Oi(u+l),p=this&&this!==ze&&this instanceof t?o:e;++c<u;)d[c]=r[c];for(;l--;)d[c++]=arguments[++s];return a(p,i?n:this,d)}}function Gn(e){return function(t,n,r){r&&"number"!=typeof r&&pr(t,n,r)&&(n=r=G),t=ii(t),n===G?(n=t,t=0):n=ii(n),r=r===G?t<n?1:-1:ii(r);var i=-1;n=vo(lo((n-t)/(r||1)),0);for(var o=Oi(n);n--;)o[e?n:++i]=t,t+=r;return o}}function zn(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=si(t),n=si(n)),e(t,n)}}function Qn(e,t,n,r,i,o,a,s,l,c){var u=8&t;return 4&(t=(t|(u?32:64))&~(u?64:32))||(t&=-4),i=[e,t,i,u?o:G,u?a:G,o=u?G:o,a=u?G:a,s,l,c],n=n.apply(G,i),hr(e)&&Ko(n,i),n.placeholder=r,yr(n,e,t)}function jn(e){var t=Di[e];return function(e,n){if(e=si(e),n=null==n?0:mo(oi(n),292)){var r=(ci(e)+"e").split("e");return+((r=(ci(r=t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}function Yn(e){return function(t){var n=Xo(t);return"[object Map]"==n?M(t):"[object Set]"==n?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return h(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Hn(e,t,n,r,i,o,a,s){var l=2&t;if(!l&&"function"!=typeof e)throw new _i("Expected a function");var c=r?r.length:0;if(c||(t&=-97,r=i=G),a=a===G?a:vo(oi(a),0),s=s===G?s:oi(s),c-=i?i.length:0,64&t){var u=r,d=i;r=i=G}var p=l?G:Ho(e);return o=[e,t,n,r,i,u,d,o,a,s],p&&(t=(n=o[1])|(e=p[1]),r=128==e&&8==n||128==e&&256==n&&o[7].length<=p[8]||384==e&&p[7].length<=p[8]&&8==n,131>t||r)&&(1&e&&(o[2]=p[2],t|=1&n?0:4),(n=p[3])&&(r=o[3],o[3]=r?En(r,n,p[4]):n,o[4]=r?F(o[3],"__lodash_placeholder__"):p[4]),(n=p[5])&&(r=o[5],o[5]=r?Sn(r,n,p[6]):n,o[6]=r?F(o[5],"__lodash_placeholder__"):p[6]),(n=p[7])&&(o[7]=n),128&e&&(o[8]=null==o[8]?p[8]:mo(o[8],p[8])),null==o[9]&&(o[9]=p[9]),o[0]=p[0],o[1]=t),e=o[0],t=o[1],n=o[2],r=o[3],i=o[4],!(s=o[9]=o[9]===G?l?0:e.length:vo(o[9]-c,0))&&24&t&&(t&=-25),yr((p?zo:Ko)(t&&1!=t?8==t||16==t?Pn(e,t,s):32!=t&&33!=t||i.length?Mn.apply(G,o):Un(e,t,n,r):function(e,t,n){var r=1&t,i=Nn(e);return function t(){return(this&&this!==ze&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n),o),e,t)}function Jn(e,t,n,r){return e===G||Qr(e,Ii[n])&&!Wi.call(r,n)?t:e}function Zn(e,t,n,r,i,o){return qr(e)&&qr(t)&&(o.set(t,e),Ut(e,t,G,Zn,o),o.delete(t)),e}function Xn(e){return ei(e)?G:e}function qn(e,t,n,r,i,o){var a=1&n,s=e.length;if(s!=(l=t.length)&&!(a&&l>s))return!1;if((l=o.get(e))&&o.get(t))return l==t;var l=-1,c=!0,u=2&n?new Fe:G;for(o.set(e,t),o.set(t,e);++l<s;){var d=e[l],p=t[l];if(r)var f=a?r(p,d,l,t,e,o):r(d,p,l,e,t,o);if(f!==G){if(f)continue;c=!1;break}if(u){if(!y(t,(function(e,t){if(!N(u,t)&&(d===e||i(d,e,n,r,o)))return u.push(t)}))){c=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){c=!1;break}}return o.delete(e),o.delete(t),c}function Kn(e){return ea(mr(e,G,Or),e+"")}function $n(e){return wt(e,pi,Jo)}function er(e){return wt(e,fi,Zo)}function tr(e){for(var t=e.name+"",n=ko[t],r=Wi.call(ko,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function nr(e){return(Wi.call(n,"placeholder")?n:e).placeholder}function rr(){var e=(e=n.iteratee||xi)===xi?_t:e;return arguments.length?e(arguments[0],arguments[1]):e}function ir(e,t){var n=e.__data__,r=typeof t;return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function or(e){for(var t=pi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,i==i&&!qr(i)]}return t}function ar(e,t){var n=null==e?G:e[t];return Bt(n)?n:G}function sr(e,t,n){for(var r=-1,i=(t=vn(t,e)).length,o=!1;++r<i;){var a=xr(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Xr(i)&&dr(a,i)&&(Wa(e)||La(e))}function lr(e){return"function"!=typeof e.constructor||gr(e)?{}:Fo(qi(e))}function cr(e,t,n,r){var a=e.constructor;switch(t){case"[object ArrayBuffer]":return bn(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return t=r?bn(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Cn(e,r);case"[object Map]":return v(t=r?n(M(e),1):M(e),i,new e.constructor);case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(t=new e.constructor(e.source,me.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return v(t=r?n(L(e),1):L(e),o,new e.constructor);case"[object Symbol]":return Mo?Ni(Mo.call(e)):{}}}function ur(e){return Wa(e)||La(e)||!!(to&&e&&e[to])}function dr(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||Ee.test(e))&&-1<e&&0==e%1&&e<t}function pr(e,t,n){if(!qr(n))return!1;var r=typeof t;return!!("number"==r?jr(n)&&dr(t,n.length):"string"==r&&t in n)&&Qr(n[t],e)}function fr(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ni(e))||re.test(e)||!ne.test(e)||null!=t&&e in Ni(t)}function hr(e){var t=tr(e),r=n[t];return"function"==typeof r&&t in Re.prototype&&(e===r||!!(t=Ho(r))&&e===t[0])}function gr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ii)}function vr(e,t){return function(n){return null!=n&&n[e]===t&&(t!==G||e in Ni(n))}}function mr(e,t,n){return t=vo(t===G?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=vo(r.length-t,0),s=Oi(o);++i<o;)s[i]=r[t+i];for(i=-1,o=Oi(t+1);++i<t;)o[i]=r[i];return o[t]=n(s),a(e,this,o)}}function yr(e,t,n){var r=t+"";t=ea;var i,o=Sr;return n=o(i=(i=r.match(pe))?i[1].split(fe):[],n),(o=n.length)&&(n[i=o-1]=(1<o?"& ":"")+n[i],n=n.join(2<o?", ":" "),r=r.replace(de,"{\n/* [wrapped with "+n+"] */\n")),t(e,r)}function br(e){var t=0,n=0;return function(){var r=yo(),i=16-(r-n);if(n=r,0<i){if(800<=++t)return arguments[0]}else t=0;return e.apply(G,arguments)}}function Cr(e,t){var n=-1,r=(i=e.length)-1;for(t=t===G?i:t;++n<t;){var i,o=e[i=Ht(n,r)];e[i]=e[n],e[n]=o}return e.length=t,e}function xr(e){if("string"==typeof e||ni(e))return e;var t=e+"";return"0"==t&&1/e==-z?"-0":t}function Er(e){if(null!=e){try{return Li.call(e)}catch(e){}return e+""}return""}function Sr(e,t){return l(j,(function(n){var r="_."+n[0];t&n[1]&&!p(e,r)&&e.push(r)})),e.sort()}function wr(e){if(e instanceof Re)return e.clone();var t=new R(e.__wrapped__,e.__chain__);return t.__actions__=wn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Vr(e,t,n){var r=null==e?0:e.length;return r?(0>(n=null==n?0:oi(n))&&(n=vo(r+n,0)),C(e,rr(t,3),n)):-1}function Rr(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==G&&(i=oi(n),i=0>n?vo(r+i,0):mo(i,r-1)),C(e,rr(t,3),i,!0)}function Or(e){return null!=e&&e.length?bt(e,1):[]}function Ar(e){return e&&e.length?e[0]:G}function kr(e){var t=null==e?0:e.length;return t?e[t-1]:G}function Tr(e,t){return e&&e.length&&t&&t.length?jt(e,t):e}function Dr(e){return null==e?e:xo.call(e)}function Nr(e){if(!e||!e.length)return[];var t=0;return e=d(e,(function(e){if(Yr(e))return t=vo(e.length,t),!0})),k(t,(function(t){return h(e,V(t))}))}function Pr(e,t){if(!e||!e.length)return[];var n=Nr(e);return null==t?n:h(n,(function(e){return a(t,G,e)}))}function Br(e){return(e=n(e)).__chain__=!0,e}function _r(e,t){return t(e)}function Mr(e,t){return(Wa(e)?l:Lo)(e,rr(t,3))}function Ir(e,t){return(Wa(e)?c:Wo)(e,rr(t,3))}function Fr(e,t){return(Wa(e)?h:Ft)(e,rr(t,3))}function Lr(e,t,n){return t=n?G:t,t=e&&null==t?e.length:t,Hn(e,128,G,G,G,G,t)}function Wr(e,t){var n;if("function"!=typeof t)throw new _i("Expected a function");return e=oi(e),function(){return 0<--e&&(n=t.apply(this,arguments)),1>=e&&(t=G),n}}function Ur(e,t,n){function r(t){var n=l,r=c;return l=c=G,h=t,d=e.apply(r,n)}function i(e){var n=e-f;return e-=h,f===G||n>=t||0>n||v&&e>=u}function o(){var e=Aa();if(i(e))return a(e);var n,r=$o;n=e-h,e=t-(e-f),n=v?mo(e,u-n):e,p=r(o,n)}function a(e){return p=G,m&&l?r(e):(l=c=G,d)}function s(){var e=Aa(),n=i(e);if(l=arguments,c=this,f=e,n){if(p===G)return h=e=f,p=$o(o,t),g?r(e):d;if(v)return p=$o(o,t),r(f)}return p===G&&(p=$o(o,t)),d}var l,c,u,d,p,f,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new _i("Expected a function");return t=si(t)||0,qr(n)&&(g=!!n.leading,u=(v="maxWait"in n)?vo(si(n.maxWait)||0,t):u,m="trailing"in n?!!n.trailing:m),s.cancel=function(){p!==G&&jo(p),h=0,l=f=c=p=G},s.flush=function(){return p===G?d:a(Aa())},s}function Gr(e,t){function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r)||o,r)}if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _i("Expected a function");return n.cache=new(Gr.Cache||Ie),n}function zr(e){if("function"!=typeof e)throw new _i("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Qr(e,t){return e===t||e!=e&&t!=t}function jr(e){return null!=e&&Xr(e.length)&&!Jr(e)}function Yr(e){return Kr(e)&&jr(e)}function Hr(e){if(!Kr(e))return!1;var t=Vt(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ei(e)}function Jr(e){return!!qr(e)&&("[object Function]"==(e=Vt(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Zr(e){return"number"==typeof e&&e==oi(e)}function Xr(e){return"number"==typeof e&&-1<e&&0==e%1&&9007199254740991>=e}function qr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Kr(e){return null!=e&&"object"==typeof e}function $r(e){return"number"==typeof e||Kr(e)&&"[object Number]"==Vt(e)}function ei(e){return!(!Kr(e)||"[object Object]"!=Vt(e))&&(null===(e=qi(e))||"function"==typeof(e=Wi.call(e,"constructor")&&e.constructor)&&e instanceof e&&Li.call(e)==Qi)}function ti(e){return"string"==typeof e||!Wa(e)&&Kr(e)&&"[object String]"==Vt(e)}function ni(e){return"symbol"==typeof e||Kr(e)&&"[object Symbol]"==Vt(e)}function ri(e){if(!e)return[];if(jr(e))return ti(e)?U(e):wn(e);if(no&&e[no]){e=e[no]();for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}return("[object Map]"==(t=Xo(e))?M:"[object Set]"==t?L:gi)(e)}function ii(e){return e?(e=si(e))===z||e===-z?17976931348623157e292*(0>e?-1:1):e==e?e:0:0===e?e:0}function oi(e){var t=(e=ii(e))%1;return e==e?t?e-t:e:0}function ai(e){return e?dt(oi(e),0,4294967295):0}function si(e){if("number"==typeof e)return e;if(ni(e))return Q;if(qr(e)&&(e=qr(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(le,"");var t=be.test(e);return t||xe.test(e)?We(e.slice(2),t?2:8):ye.test(e)?Q:+e}function li(e){return Vn(e,fi(e))}function ci(e){return null==e?"":sn(e)}function ui(e,t,n){return(e=null==e?G:St(e,t))===G?n:e}function di(e,t){return null!=e&&sr(e,t,At)}function pi(e){return jr(e)?Ge(e):Mt(e)}function fi(e){if(jr(e))e=Ge(e,!0);else if(qr(e)){var t,n=gr(e),r=[];for(t in e)("constructor"!=t||!n&&Wi.call(e,t))&&r.push(t);e=r}else{if(t=[],null!=e)for(n in Ni(e))t.push(n);e=t}return e}function hi(e,t){if(null==e)return{};var n=h(er(e),(function(e){return[e]}));return t=rr(t),Qt(e,n,(function(e,n){return t(e,n[0])}))}function gi(e){return null==e?[]:D(e,pi(e))}function vi(e){return bs(ci(e).toLowerCase())}function mi(e){return(e=ci(e))&&e.replace(Se,tt).replace(ke,"")}function yi(e,t,n){return e=ci(e),(t=n?G:t)===G?Pe.test(e)?e.match(De)||[]:e.match(he)||[]:e.match(t)||[]}function bi(e){return function(){return e}}function Ci(e){return e}function xi(e){return _t("function"==typeof e?e:pt(e,1))}function Ei(e,t,n){var r=pi(t),i=Et(t,r);null!=n||qr(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Et(t,pi(t)));var o=!(qr(n)&&"chain"in n&&!n.chain),a=Jr(e);return l(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=wn(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,g([this.value()],arguments))})})),e}function Si(){}function wi(e){return fr(e)?V(xr(e)):function(e){return function(t){return St(t,e)}}(e)}function Vi(){return[]}function Ri(){return!1}var Oi=(t=null==t?ze:it.defaults(ze.Object(),t,it.pick(ze,Be))).Array,Ai=t.Date,ki=t.Error,Ti=t.Function,Di=t.Math,Ni=t.Object,Pi=t.RegExp,Bi=t.String,_i=t.TypeError,Mi=Oi.prototype,Ii=Ni.prototype,Fi=t["__core-js_shared__"],Li=Ti.prototype.toString,Wi=Ii.hasOwnProperty,Ui=0,Gi=function(){var e=/[^.]+$/.exec(Fi&&Fi.keys&&Fi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),zi=Ii.toString,Qi=Li.call(Ni),ji=ze._,Yi=Pi("^"+Li.call(Wi).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hi=Ye?t.Buffer:G,Ji=t.Symbol,Zi=t.Uint8Array,Xi=Hi?Hi.f:G,qi=I(Ni.getPrototypeOf,Ni),Ki=Ni.create,$i=Ii.propertyIsEnumerable,eo=Mi.splice,to=Ji?Ji.isConcatSpreadable:G,no=Ji?Ji.iterator:G,ro=Ji?Ji.toStringTag:G,io=function(){try{var e=ar(Ni,"defineProperty");return e({},"",{}),e}catch(e){}}(),oo=t.clearTimeout!==ze.clearTimeout&&t.clearTimeout,ao=Ai&&Ai.now!==ze.Date.now&&Ai.now,so=t.setTimeout!==ze.setTimeout&&t.setTimeout,lo=Di.ceil,co=Di.floor,uo=Ni.getOwnPropertySymbols,po=Hi?Hi.isBuffer:G,fo=t.isFinite,ho=Mi.join,go=I(Ni.keys,Ni),vo=Di.max,mo=Di.min,yo=Ai.now,bo=t.parseInt,Co=Di.random,xo=Mi.reverse,Eo=ar(t,"DataView"),So=ar(t,"Map"),wo=ar(t,"Promise"),Vo=ar(t,"Set"),Ro=ar(t,"WeakMap"),Oo=ar(Ni,"create"),Ao=Ro&&new Ro,ko={},To=Er(Eo),Do=Er(So),No=Er(wo),Po=Er(Vo),Bo=Er(Ro),_o=Ji?Ji.prototype:G,Mo=_o?_o.valueOf:G,Io=_o?_o.toString:G,Fo=function(){function e(){}return function(t){return qr(t)?Ki?Ki(t):(e.prototype=t,t=new e,e.prototype=G,t):{}}}();n.templateSettings={escape:$,evaluate:ee,interpolate:te,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,R.prototype=Fo(r.prototype),R.prototype.constructor=R,Re.prototype=Fo(r.prototype),Re.prototype.constructor=Re,Oe.prototype.clear=function(){this.__data__=Oo?Oo(null):{},this.size=0},Oe.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Oe.prototype.get=function(e){var t=this.__data__;return Oo?"__lodash_hash_undefined__"===(e=t[e])?G:e:Wi.call(t,e)?t[e]:G},Oe.prototype.has=function(e){var t=this.__data__;return Oo?t[e]!==G:Wi.call(t,e)},Oe.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Oo&&t===G?"__lodash_hash_undefined__":t,this},Te.prototype.clear=function(){this.__data__=[],this.size=0},Te.prototype.delete=function(e){var t=this.__data__;return!(0>(e=at(t,e))||(e==t.length-1?t.pop():eo.call(t,e,1),--this.size,0))},Te.prototype.get=function(e){var t=this.__data__;return 0>(e=at(t,e))?G:t[e][1]},Te.prototype.has=function(e){return-1<at(this.__data__,e)},Te.prototype.set=function(e,t){var n=this.__data__,r=at(n,e);return 0>r?(++this.size,n.push([e,t])):n[r][1]=t,this},Ie.prototype.clear=function(){this.size=0,this.__data__={hash:new Oe,map:new(So||Te),string:new Oe}},Ie.prototype.delete=function(e){return e=ir(this,e).delete(e),this.size-=e?1:0,e},Ie.prototype.get=function(e){return ir(this,e).get(e)},Ie.prototype.has=function(e){return ir(this,e).has(e)},Ie.prototype.set=function(e,t){var n=ir(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Fe.prototype.add=Fe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Fe.prototype.has=function(e){return this.__data__.has(e)},Ue.prototype.clear=function(){this.__data__=new Te,this.size=0},Ue.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},Ue.prototype.get=function(e){return this.__data__.get(e)},Ue.prototype.has=function(e){return this.__data__.has(e)},Ue.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Te){var r=n.__data__;if(!So||199>r.length)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(e,t),this.size=n.size,this};var Lo=An(Ct),Wo=An(xt,!0),Uo=kn(),Go=kn(!0),zo=Ao?function(e,t){return Ao.set(e,t),e}:Ci,Qo=io?function(e,t){return io(e,"toString",{configurable:!0,enumerable:!1,value:bi(t),writable:!0})}:Ci,jo=oo||function(e){return ze.clearTimeout(e)},Yo=Vo&&1/L(new Vo([,-0]))[1]==z?function(e){return new Vo(e)}:Si,Ho=Ao?function(e){return Ao.get(e)}:Si,Jo=uo?function(e){return null==e?[]:(e=Ni(e),d(uo(e),(function(t){return $i.call(e,t)})))}:Vi,Zo=uo?function(e){for(var t=[];e;)g(t,Jo(e)),e=qi(e);return t}:Vi,Xo=Vt;(Eo&&"[object DataView]"!=Xo(new Eo(new ArrayBuffer(1)))||So&&"[object Map]"!=Xo(new So)||wo&&"[object Promise]"!=Xo(wo.resolve())||Vo&&"[object Set]"!=Xo(new Vo)||Ro&&"[object WeakMap]"!=Xo(new Ro))&&(Xo=function(e){var t=Vt(e);if(e=(e="[object Object]"==t?e.constructor:G)?Er(e):"")switch(e){case To:return"[object DataView]";case Do:return"[object Map]";case No:return"[object Promise]";case Po:return"[object Set]";case Bo:return"[object WeakMap]"}return t});var qo=Fi?Jr:Ri,Ko=br(zo),$o=so||function(e,t){return ze.setTimeout(e,t)},ea=br(Qo),ta=function(e){var t=(e=Gr(e,(function(e){return 500===t.size&&t.clear(),e}))).cache;return e}((function(e){var t=[];return ie.test(e)&&t.push(""),e.replace(oe,(function(e,n,r,i){t.push(r?i.replace(ge,"$1"):n||e)})),t})),na=Zt((function(e,t){return Yr(e)?gt(e,bt(t,1,Yr,!0)):[]})),ra=Zt((function(e,t){var n=kr(t);return Yr(n)&&(n=G),Yr(e)?gt(e,bt(t,1,Yr,!0),rr(n,2)):[]})),ia=Zt((function(e,t){var n=kr(t);return Yr(n)&&(n=G),Yr(e)?gt(e,bt(t,1,Yr,!0),G,n):[]})),oa=Zt((function(e){var t=h(e,hn);return t.length&&t[0]===e[0]?kt(t):[]})),aa=Zt((function(e){var t=kr(e),n=h(e,hn);return t===kr(n)?t=G:n.pop(),n.length&&n[0]===e[0]?kt(n,rr(t,2)):[]})),sa=Zt((function(e){var t=kr(e),n=h(e,hn);return(t="function"==typeof t?t:G)&&n.pop(),n.length&&n[0]===e[0]?kt(n,G,t):[]})),la=Zt(Tr),ca=Kn((function(e,t){var n=null==e?0:e.length,r=ut(e,t);return Yt(e,h(t,(function(e){return dr(e,n)?+e:e})).sort(xn)),r})),ua=Zt((function(e){return ln(bt(e,1,Yr,!0))})),da=Zt((function(e){var t=kr(e);return Yr(t)&&(t=G),ln(bt(e,1,Yr,!0),rr(t,2))})),pa=Zt((function(e){var t="function"==typeof(t=kr(e))?t:G;return ln(bt(e,1,Yr,!0),G,t)})),fa=Zt((function(e,t){return Yr(e)?gt(e,t):[]})),ha=Zt((function(e){return pn(d(e,Yr))})),ga=Zt((function(e){var t=kr(e);return Yr(t)&&(t=G),pn(d(e,Yr),rr(t,2))})),va=Zt((function(e){var t="function"==typeof(t=kr(e))?t:G;return pn(d(e,Yr),G,t)})),ma=Zt(Nr),ya=Zt((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:G)?(e.pop(),t):G;return Pr(e,t)})),ba=Kn((function(e){function t(t){return ut(t,e)}var n=e.length,r=n?e[0]:0,i=this.__wrapped__;return!(1<n||this.__actions__.length)&&i instanceof Re&&dr(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:_r,args:[t],thisArg:G}),new R(i,this.__chain__).thru((function(e){return n&&!e.length&&e.push(G),e}))):this.thru(t)})),Ca=Rn((function(e,t,n){Wi.call(e,n)?++e[n]:ct(e,n,1)})),xa=Bn(Vr),Ea=Bn(Rr),Sa=Rn((function(e,t,n){Wi.call(e,n)?e[n].push(t):ct(e,n,[t])})),wa=Zt((function(e,t,n){var r=-1,i="function"==typeof t,o=jr(e)?Oi(e.length):[];return Lo(e,(function(e){o[++r]=i?a(t,e,n):Tt(e,t,n)})),o})),Va=Rn((function(e,t,n){ct(e,n,t)})),Ra=Rn((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Oa=Zt((function(e,t){if(null==e)return[];var n=t.length;return 1<n&&pr(e,t[0],t[1])?t=[]:2<n&&pr(t[0],t[1],t[2])&&(t=[t[0]]),zt(e,bt(t,1),[])})),Aa=ao||function(){return ze.Date.now()},ka=Zt((function(e,t,n){var r=1;if(n.length){var i=F(n,nr(ka));r=32|r}return Hn(e,r,t,n,i)})),Ta=Zt((function(e,t,n){var r=3;if(n.length){var i=F(n,nr(Ta));r=32|r}return Hn(t,r,e,n,i)})),Da=Zt((function(e,t){return ht(e,1,t)})),Na=Zt((function(e,t,n){return ht(e,si(t)||0,n)}));Gr.Cache=Ie;var Pa=Zt((function(e,t){var n=(t=1==t.length&&Wa(t[0])?h(t[0],T(rr())):h(bt(t,1),T(rr()))).length;return Zt((function(r){for(var i=-1,o=mo(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return a(e,this,r)}))})),Ba=Zt((function(e,t){return Hn(e,32,G,t,F(t,nr(Ba)))})),_a=Zt((function(e,t){return Hn(e,64,G,t,F(t,nr(_a)))})),Ma=Kn((function(e,t){return Hn(e,256,G,G,G,t)})),Ia=zn(Rt),Fa=zn((function(e,t){return e>=t})),La=Dt(function(){return arguments}())?Dt:function(e){return Kr(e)&&Wi.call(e,"callee")&&!$i.call(e,"callee")},Wa=Oi.isArray,Ua=Je?T(Je):function(e){return Kr(e)&&"[object ArrayBuffer]"==Vt(e)},Ga=po||Ri,za=Ze?T(Ze):function(e){return Kr(e)&&"[object Date]"==Vt(e)},Qa=Xe?T(Xe):function(e){return Kr(e)&&"[object Map]"==Xo(e)},ja=qe?T(qe):function(e){return Kr(e)&&"[object RegExp]"==Vt(e)},Ya=Ke?T(Ke):function(e){return Kr(e)&&"[object Set]"==Xo(e)},Ha=$e?T($e):function(e){return Kr(e)&&Xr(e.length)&&!!_e[Vt(e)]},Ja=zn(It),Za=zn((function(e,t){return e<=t})),Xa=On((function(e,t){if(gr(t)||jr(t))Vn(t,pi(t),e);else for(var n in t)Wi.call(t,n)&&ot(e,n,t[n])})),qa=On((function(e,t){Vn(t,fi(t),e)})),Ka=On((function(e,t,n,r){Vn(t,fi(t),e,r)})),$a=On((function(e,t,n,r){Vn(t,pi(t),e,r)})),es=Kn(ut),ts=Zt((function(e){return e.push(G,Jn),a(Ka,G,e)})),ns=Zt((function(e){return e.push(G,Zn),a(ss,G,e)})),rs=In((function(e,t,n){e[t]=n}),bi(Ci)),is=In((function(e,t,n){Wi.call(e,t)?e[t].push(n):e[t]=[n]}),rr),os=Zt(Tt),as=On((function(e,t,n){Ut(e,t,n)})),ss=On((function(e,t,n,r){Ut(e,t,n,r)})),ls=Kn((function(e,t){var n={};if(null==e)return n;var r=!1;t=h(t,(function(t){return t=vn(t,e),r||(r=1<t.length),t})),Vn(e,er(e),n),r&&(n=pt(n,7,Xn));for(var i=t.length;i--;)cn(n,t[i]);return n})),cs=Kn((function(e,t){return null==e?{}:function(e,t){return Qt(e,t,(function(t,n){return di(e,n)}))}(e,t)})),us=Yn(pi),ds=Yn(fi),ps=Dn((function(e,t,n){return t=t.toLowerCase(),e+(n?vi(t):t)})),fs=Dn((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),hs=Dn((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),gs=Tn("toLowerCase"),vs=Dn((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),ms=Dn((function(e,t,n){return e+(n?" ":"")+bs(t)})),ys=Dn((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),bs=Tn("toUpperCase"),Cs=Zt((function(e,t){try{return a(e,G,t)}catch(e){return Hr(e)?e:new ki(e)}})),xs=Kn((function(e,t){return l(t,(function(t){t=xr(t),ct(e,t,ka(e[t],e))})),e})),Es=_n(),Ss=_n(!0),ws=Zt((function(e,t){return function(n){return Tt(n,e,t)}})),Vs=Zt((function(e,t){return function(n){return Tt(e,n,t)}})),Rs=Ln(h),Os=Ln(u),As=Ln(y),ks=Gn(),Ts=Gn(!0),Ds=Fn((function(e,t){return e+t}),0),Ns=jn("ceil"),Ps=Fn((function(e,t){return e/t}),1),Bs=jn("floor"),_s=Fn((function(e,t){return e*t}),1),Ms=jn("round"),Is=Fn((function(e,t){return e-t}),0);return n.after=function(e,t){if("function"!=typeof t)throw new _i("Expected a function");return e=oi(e),function(){if(1>--e)return t.apply(this,arguments)}},n.ary=Lr,n.assign=Xa,n.assignIn=qa,n.assignInWith=Ka,n.assignWith=$a,n.at=es,n.before=Wr,n.bind=ka,n.bindAll=xs,n.bindKey=Ta,n.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},n.chain=Br,n.chunk=function(e,t,n){if(t=(n?pr(e,t,n):t===G)?1:vo(oi(t),0),!(n=null==e?0:e.length)||1>t)return[];for(var r=0,i=0,o=Oi(lo(n/t));r<n;)o[i++]=en(e,r,r+=t);return o},n.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},n.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Oi(e-1),n=arguments[0];e--;)t[e-1]=arguments[e];return g(Wa(n)?wn(n):[n],bt(t,1))},n.cond=function(e){var t=null==e?0:e.length,n=rr();return e=t?h(e,(function(e){if("function"!=typeof e[1])throw new _i("Expected a function");return[n(e[0]),e[1]]})):[],Zt((function(n){for(var r=-1;++r<t;){var i=e[r];if(a(i[0],this,n))return a(i[1],this,n)}}))},n.conforms=function(e){return function(e){var t=pi(e);return function(n){return ft(n,e,t)}}(pt(e,1))},n.constant=bi,n.countBy=Ca,n.create=function(e,t){var n=Fo(e);return null==t?n:lt(n,t)},n.curry=function e(t,n,r){return(t=Hn(t,8,G,G,G,G,G,n=r?G:n)).placeholder=e.placeholder,t},n.curryRight=function e(t,n,r){return(t=Hn(t,16,G,G,G,G,G,n=r?G:n)).placeholder=e.placeholder,t},n.debounce=Ur,n.defaults=ts,n.defaultsDeep=ns,n.defer=Da,n.delay=Na,n.difference=na,n.differenceBy=ra,n.differenceWith=ia,n.drop=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0>(t=n||t===G?1:oi(t))?0:t,r):[]},n.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0,0>(t=r-(t=n||t===G?1:oi(t)))?0:t):[]},n.dropRightWhile=function(e,t){return e&&e.length?un(e,rr(t,3),!0,!0):[]},n.dropWhile=function(e,t){return e&&e.length?un(e,rr(t,3),!0):[]},n.fill=function(e,t,n,r){var i=null==e?0:e.length;if(!i)return[];for(n&&"number"!=typeof n&&pr(e,t,n)&&(n=0,r=i),i=e.length,0>(n=oi(n))&&(n=-n>i?0:i+n),0>(r=r===G||r>i?i:oi(r))&&(r+=i),r=n>r?0:ai(r);n<r;)e[n++]=t;return e},n.filter=function(e,t){return(Wa(e)?d:yt)(e,rr(t,3))},n.flatMap=function(e,t){return bt(Fr(e,t),1)},n.flatMapDeep=function(e,t){return bt(Fr(e,t),z)},n.flatMapDepth=function(e,t,n){return n=n===G?1:oi(n),bt(Fr(e,t),n)},n.flatten=Or,n.flattenDeep=function(e){return null!=e&&e.length?bt(e,z):[]},n.flattenDepth=function(e,t){return null!=e&&e.length?bt(e,t=t===G?1:oi(t)):[]},n.flip=function(e){return Hn(e,512)},n.flow=Es,n.flowRight=Ss,n.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},n.functions=function(e){return null==e?[]:Et(e,pi(e))},n.functionsIn=function(e){return null==e?[]:Et(e,fi(e))},n.groupBy=Sa,n.initial=function(e){return null!=e&&e.length?en(e,0,-1):[]},n.intersection=oa,n.intersectionBy=aa,n.intersectionWith=sa,n.invert=rs,n.invertBy=is,n.invokeMap=wa,n.iteratee=xi,n.keyBy=Va,n.keys=pi,n.keysIn=fi,n.map=Fr,n.mapKeys=function(e,t){var n={};return t=rr(t,3),Ct(e,(function(e,r,i){ct(n,t(e,r,i),e)})),n},n.mapValues=function(e,t){var n={};return t=rr(t,3),Ct(e,(function(e,r,i){ct(n,r,t(e,r,i))})),n},n.matches=function(e){return Lt(pt(e,1))},n.matchesProperty=function(e,t){return Wt(e,pt(t,1))},n.memoize=Gr,n.merge=as,n.mergeWith=ss,n.method=ws,n.methodOf=Vs,n.mixin=Ei,n.negate=zr,n.nthArg=function(e){return e=oi(e),Zt((function(t){return Gt(t,e)}))},n.omit=ls,n.omitBy=function(e,t){return hi(e,zr(rr(t)))},n.once=function(e){return Wr(2,e)},n.orderBy=function(e,t,n,r){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(n=r?G:n)||(n=null==n?[]:[n]),zt(e,t,n))},n.over=Rs,n.overArgs=Pa,n.overEvery=Os,n.overSome=As,n.partial=Ba,n.partialRight=_a,n.partition=Ra,n.pick=cs,n.pickBy=hi,n.property=wi,n.propertyOf=function(e){return function(t){return null==e?G:St(e,t)}},n.pull=la,n.pullAll=Tr,n.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?jt(e,t,rr(n,2)):e},n.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?jt(e,t,G,n):e},n.pullAt=ca,n.range=ks,n.rangeRight=Ts,n.rearg=Ma,n.reject=function(e,t){return(Wa(e)?d:yt)(e,zr(rr(t,3)))},n.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=rr(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Yt(e,i),n},n.rest=function(e,t){if("function"!=typeof e)throw new _i("Expected a function");return Zt(e,t=t===G?t:oi(t))},n.reverse=Dr,n.sampleSize=function(e,t,n){return t=(n?pr(e,t,n):t===G)?1:oi(t),(Wa(e)?je:qt)(e,t)},n.set=function(e,t,n){return null==e?e:Kt(e,t,n)},n.setWith=function(e,t,n,r){return r="function"==typeof r?r:G,null==e?e:Kt(e,t,n,r)},n.shuffle=function(e){return(Wa(e)?He:$t)(e)},n.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&pr(e,t,n)?(t=0,n=r):(t=null==t?0:oi(t),n=n===G?r:oi(n)),en(e,t,n)):[]},n.sortBy=Oa,n.sortedUniq=function(e){return e&&e.length?on(e):[]},n.sortedUniqBy=function(e,t){return e&&e.length?on(e,rr(t,2)):[]},n.split=function(e,t,n){return n&&"number"!=typeof n&&pr(e,t,n)&&(t=n=G),(n=n===G?4294967295:n>>>0)?(e=ci(e))&&("string"==typeof t||null!=t&&!ja(t))&&(!(t=sn(t))&&Ne.test(e))?mn(U(e),0,n):e.split(t,n):[]},n.spread=function(e,t){if("function"!=typeof e)throw new _i("Expected a function");return t=null==t?0:vo(oi(t),0),Zt((function(n){var r=n[t];return n=mn(n,0,t),r&&g(n,r),a(e,this,n)}))},n.tail=function(e){var t=null==e?0:e.length;return t?en(e,1,t):[]},n.take=function(e,t,n){return e&&e.length?en(e,0,0>(t=n||t===G?1:oi(t))?0:t):[]},n.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0>(t=r-(t=n||t===G?1:oi(t)))?0:t,r):[]},n.takeRightWhile=function(e,t){return e&&e.length?un(e,rr(t,3),!1,!0):[]},n.takeWhile=function(e,t){return e&&e.length?un(e,rr(t,3)):[]},n.tap=function(e,t){return t(e),e},n.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new _i("Expected a function");return qr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ur(e,t,{leading:r,maxWait:t,trailing:i})},n.thru=_r,n.toArray=ri,n.toPairs=us,n.toPairsIn=ds,n.toPath=function(e){return Wa(e)?h(e,xr):ni(e)?[e]:wn(ta(ci(e)))},n.toPlainObject=li,n.transform=function(e,t,n){var r=Wa(e),i=r||Ga(e)||Ha(e);if(t=rr(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:qr(e)&&Jr(o)?Fo(qi(e)):{}}return(i?l:Ct)(e,(function(e,r,i){return t(n,e,r,i)})),n},n.unary=function(e){return Lr(e,1)},n.union=ua,n.unionBy=da,n.unionWith=pa,n.uniq=function(e){return e&&e.length?ln(e):[]},n.uniqBy=function(e,t){return e&&e.length?ln(e,rr(t,2)):[]},n.uniqWith=function(e,t){return t="function"==typeof t?t:G,e&&e.length?ln(e,G,t):[]},n.unset=function(e,t){return null==e||cn(e,t)},n.unzip=Nr,n.unzipWith=Pr,n.update=function(e,t,n){return null==e?e:Kt(e,t,gn(n)(St(e,t)),void 0)},n.updateWith=function(e,t,n,r){return r="function"==typeof r?r:G,null!=e&&(e=Kt(e,t,gn(n)(St(e,t)),r)),e},n.values=gi,n.valuesIn=function(e){return null==e?[]:D(e,fi(e))},n.without=fa,n.words=yi,n.wrap=function(e,t){return Ba(gn(t),e)},n.xor=ha,n.xorBy=ga,n.xorWith=va,n.zip=ma,n.zipObject=function(e,t){return fn(e||[],t||[],ot)},n.zipObjectDeep=function(e,t){return fn(e||[],t||[],Kt)},n.zipWith=ya,n.entries=us,n.entriesIn=ds,n.extend=qa,n.extendWith=Ka,Ei(n,n),n.add=Ds,n.attempt=Cs,n.camelCase=ps,n.capitalize=vi,n.ceil=Ns,n.clamp=function(e,t,n){return n===G&&(n=t,t=G),n!==G&&(n=(n=si(n))==n?n:0),t!==G&&(t=(t=si(t))==t?t:0),dt(si(e),t,n)},n.clone=function(e){return pt(e,4)},n.cloneDeep=function(e){return pt(e,5)},n.cloneDeepWith=function(e,t){return pt(e,5,t="function"==typeof t?t:G)},n.cloneWith=function(e,t){return pt(e,4,t="function"==typeof t?t:G)},n.conformsTo=function(e,t){return null==t||ft(e,t,pi(t))},n.deburr=mi,n.defaultTo=function(e,t){return null==e||e!=e?t:e},n.divide=Ps,n.endsWith=function(e,t,n){e=ci(e),t=sn(t);var r=e.length;r=n=n===G?r:dt(oi(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},n.eq=Qr,n.escape=function(e){return(e=ci(e))&&K.test(e)?e.replace(X,nt):e},n.escapeRegExp=function(e){return(e=ci(e))&&se.test(e)?e.replace(ae,"\\$&"):e},n.every=function(e,t,n){var r=Wa(e)?u:vt;return n&&pr(e,t,n)&&(t=G),r(e,rr(t,3))},n.find=xa,n.findIndex=Vr,n.findKey=function(e,t){return b(e,rr(t,3),Ct)},n.findLast=Ea,n.findLastIndex=Rr,n.findLastKey=function(e,t){return b(e,rr(t,3),xt)},n.floor=Bs,n.forEach=Mr,n.forEachRight=Ir,n.forIn=function(e,t){return null==e?e:Uo(e,rr(t,3),fi)},n.forInRight=function(e,t){return null==e?e:Go(e,rr(t,3),fi)},n.forOwn=function(e,t){return e&&Ct(e,rr(t,3))},n.forOwnRight=function(e,t){return e&&xt(e,rr(t,3))},n.get=ui,n.gt=Ia,n.gte=Fa,n.has=function(e,t){return null!=e&&sr(e,t,Ot)},n.hasIn=di,n.head=Ar,n.identity=Ci,n.includes=function(e,t,n,r){return e=jr(e)?e:gi(e),n=n&&!r?oi(n):0,r=e.length,0>n&&(n=vo(r+n,0)),ti(e)?n<=r&&-1<e.indexOf(t,n):!!r&&-1<x(e,t,n)},n.indexOf=function(e,t,n){var r=null==e?0:e.length;return r?(0>(n=null==n?0:oi(n))&&(n=vo(r+n,0)),x(e,t,n)):-1},n.inRange=function(e,t,n){return t=ii(t),n===G?(n=t,t=0):n=ii(n),(e=si(e))>=mo(t,n)&&e<vo(t,n)},n.invoke=os,n.isArguments=La,n.isArray=Wa,n.isArrayBuffer=Ua,n.isArrayLike=jr,n.isArrayLikeObject=Yr,n.isBoolean=function(e){return!0===e||!1===e||Kr(e)&&"[object Boolean]"==Vt(e)},n.isBuffer=Ga,n.isDate=za,n.isElement=function(e){return Kr(e)&&1===e.nodeType&&!ei(e)},n.isEmpty=function(e){if(null==e)return!0;if(jr(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||Ha(e)||La(e)))return!e.length;var t=Xo(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(gr(e))return!Mt(e).length;for(var n in e)if(Wi.call(e,n))return!1;return!0},n.isEqual=function(e,t){return Nt(e,t)},n.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:G)?n(e,t):G;return r===G?Nt(e,t,G,n):!!r},n.isError=Hr,n.isFinite=function(e){return"number"==typeof e&&fo(e)},n.isFunction=Jr,n.isInteger=Zr,n.isLength=Xr,n.isMap=Qa,n.isMatch=function(e,t){return e===t||Pt(e,t,or(t))},n.isMatchWith=function(e,t,n){return n="function"==typeof n?n:G,Pt(e,t,or(t),n)},n.isNaN=function(e){return $r(e)&&e!=+e},n.isNative=function(e){if(qo(e))throw new ki("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Bt(e)},n.isNil=function(e){return null==e},n.isNull=function(e){return null===e},n.isNumber=$r,n.isObject=qr,n.isObjectLike=Kr,n.isPlainObject=ei,n.isRegExp=ja,n.isSafeInteger=function(e){return Zr(e)&&-9007199254740991<=e&&9007199254740991>=e},n.isSet=Ya,n.isString=ti,n.isSymbol=ni,n.isTypedArray=Ha,n.isUndefined=function(e){return e===G},n.isWeakMap=function(e){return Kr(e)&&"[object WeakMap]"==Xo(e)},n.isWeakSet=function(e){return Kr(e)&&"[object WeakSet]"==Vt(e)},n.join=function(e,t){return null==e?"":ho.call(e,t)},n.kebabCase=fs,n.last=kr,n.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;if(n!==G&&(i=0>(i=oi(n))?vo(r+i,0):mo(i,r-1)),t==t){for(n=i+1;n--&&e[n]!==t;);e=n}else e=C(e,S,i,!0);return e},n.lowerCase=hs,n.lowerFirst=gs,n.lt=Ja,n.lte=Za,n.max=function(e){return e&&e.length?mt(e,Ci,Rt):G},n.maxBy=function(e,t){return e&&e.length?mt(e,rr(t,2),Rt):G},n.mean=function(e){return w(e,Ci)},n.meanBy=function(e,t){return w(e,rr(t,2))},n.min=function(e){return e&&e.length?mt(e,Ci,It):G},n.minBy=function(e,t){return e&&e.length?mt(e,rr(t,2),It):G},n.stubArray=Vi,n.stubFalse=Ri,n.stubObject=function(){return{}},n.stubString=function(){return""},n.stubTrue=function(){return!0},n.multiply=_s,n.nth=function(e,t){return e&&e.length?Gt(e,oi(t)):G},n.noConflict=function(){return ze._===this&&(ze._=ji),this},n.noop=Si,n.now=Aa,n.pad=function(e,t,n){e=ci(e);var r=(t=oi(t))?W(e):0;return!t||r>=t?e:Wn(co(t=(t-r)/2),n)+e+Wn(lo(t),n)},n.padEnd=function(e,t,n){e=ci(e);var r=(t=oi(t))?W(e):0;return t&&r<t?e+Wn(t-r,n):e},n.padStart=function(e,t,n){e=ci(e);var r=(t=oi(t))?W(e):0;return t&&r<t?Wn(t-r,n)+e:e},n.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bo(ci(e).replace(ce,""),t||0)},n.random=function(e,t,n){if(n&&"boolean"!=typeof n&&pr(e,t,n)&&(t=n=G),n===G&&("boolean"==typeof t?(n=t,t=G):"boolean"==typeof e&&(n=e,e=G)),e===G&&t===G?(e=0,t=1):(e=ii(e),t===G?(t=e,e=0):t=ii(t)),e>t){var r=e;e=t,t=r}return n||e%1||t%1?(n=Co(),mo(e+n*(t-e+Le("1e-"+((n+"").length-1))),t)):Ht(e,t)},n.reduce=function(e,t,n){var r=Wa(e)?v:O,i=3>arguments.length;return r(e,rr(t,4),n,i,Lo)},n.reduceRight=function(e,t,n){var r=Wa(e)?m:O,i=3>arguments.length;return r(e,rr(t,4),n,i,Wo)},n.repeat=function(e,t,n){return t=(n?pr(e,t,n):t===G)?1:oi(t),Jt(ci(e),t)},n.replace=function(){var e=arguments,t=ci(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},n.result=function(e,t,n){var r=-1,i=(t=vn(t,e)).length;for(i||(i=1,e=G);++r<i;){var o=null==e?G:e[xr(t[r])];o===G&&(r=i,o=n),e=Jr(o)?o.call(e):o}return e},n.round=Ms,n.runInContext=e,n.sample=function(e){return(Wa(e)?Qe:Xt)(e)},n.size=function(e){if(null==e)return 0;if(jr(e))return ti(e)?W(e):e.length;var t=Xo(e);return"[object Map]"==t||"[object Set]"==t?e.size:Mt(e).length},n.snakeCase=vs,n.some=function(e,t,n){var r=Wa(e)?y:tn;return n&&pr(e,t,n)&&(t=G),r(e,rr(t,3))},n.sortedIndex=function(e,t){return nn(e,t)},n.sortedIndexBy=function(e,t,n){return rn(e,t,rr(n,2))},n.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=nn(e,t);if(r<n&&Qr(e[r],t))return r}return-1},n.sortedLastIndex=function(e,t){return nn(e,t,!0)},n.sortedLastIndexBy=function(e,t,n){return rn(e,t,rr(n,2),!0)},n.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=nn(e,t,!0)-1;if(Qr(e[n],t))return n}return-1},n.startCase=ms,n.startsWith=function(e,t,n){return e=ci(e),n=null==n?0:dt(oi(n),0,e.length),t=sn(t),e.slice(n,n+t.length)==t},n.subtract=Is,n.sum=function(e){return e&&e.length?A(e,Ci):0},n.sumBy=function(e,t){return e&&e.length?A(e,rr(t,2)):0},n.template=function(e,t,r){var i=n.templateSettings;r&&pr(e,t,r)&&(t=G),e=ci(e),t=Ka({},t,i,Jn);var o,a,s=pi(r=Ka({},t.imports,i.imports,Jn)),l=D(r,s),c=0;r=t.interpolate||we;var u="__p+='";r=Pi((t.escape||we).source+"|"+r.source+"|"+(r===te?ve:we).source+"|"+(t.evaluate||we).source+"|$","g");var d="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(e.replace(r,(function(t,n,r,i,s,l){return r||(r=i),u+=e.slice(c,l).replace(Ve,_),n&&(o=!0,u+="'+__e("+n+")+'"),s&&(a=!0,u+="';"+s+";\n__p+='"),r&&(u+="'+((__t=("+r+"))==null?'':__t)+'"),c=l+t.length,t})),u+="';",(t=t.variable)||(u="with(obj){"+u+"}"),u=(a?u.replace(Y,""):u).replace(H,"$1").replace(J,"$1;"),u="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(a?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+u+"return __p}",(t=Cs((function(){return Ti(s,d+"return "+u).apply(G,l)}))).source=u,Hr(t))throw t;return t},n.times=function(e,t){if(1>(e=oi(e))||9007199254740991<e)return[];var n=4294967295,r=mo(e,4294967295);for(e-=4294967295,r=k(r,t=rr(t));++n<e;)t(n);return r},n.toFinite=ii,n.toInteger=oi,n.toLength=ai,n.toLower=function(e){return ci(e).toLowerCase()},n.toNumber=si,n.toSafeInteger=function(e){return e?dt(oi(e),-9007199254740991,9007199254740991):0===e?e:0},n.toString=ci,n.toUpper=function(e){return ci(e).toUpperCase()},n.trim=function(e,t,n){return(e=ci(e))&&(n||t===G)?e.replace(le,""):e&&(t=sn(t))?mn(e=U(e),t=P(e,n=U(t)),n=B(e,n)+1).join(""):e},n.trimEnd=function(e,t,n){return(e=ci(e))&&(n||t===G)?e.replace(ue,""):e&&(t=sn(t))?mn(e=U(e),0,t=B(e,U(t))+1).join(""):e},n.trimStart=function(e,t,n){return(e=ci(e))&&(n||t===G)?e.replace(ce,""):e&&(t=sn(t))?mn(e=U(e),t=P(e,U(t))).join(""):e},n.truncate=function(e,t){var n=30,r="...";if(qr(t)){var i="separator"in t?t.separator:i;n="length"in t?oi(t.length):n,r="omission"in t?sn(t.omission):r}var o=(e=ci(e)).length;if(Ne.test(e)){var a=U(e);o=a.length}if(n>=o)return e;if(1>(o=n-W(r)))return r;if(n=a?mn(a,0,o).join(""):e.slice(0,o),i===G)return n+r;if(a&&(o+=n.length-o),ja(i)){if(e.slice(o).search(i)){var s=n;for(i.global||(i=Pi(i.source,ci(me.exec(i))+"g")),i.lastIndex=0;a=i.exec(s);)var l=a.index;n=n.slice(0,l===G?o:l)}}else e.indexOf(sn(i),o)!=o&&(-1<(i=n.lastIndexOf(i))&&(n=n.slice(0,i)));return n+r},n.unescape=function(e){return(e=ci(e))&&q.test(e)?e.replace(Z,rt):e},n.uniqueId=function(e){var t=++Ui;return ci(e)+t},n.upperCase=ys,n.upperFirst=bs,n.each=Mr,n.eachRight=Ir,n.first=Ar,Ei(n,function(){var e={};return Ct(n,(function(t,r){Wi.call(n.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),n.VERSION="4.17.4",l("bind bindKey curry curryRight partial partialRight".split(" "),(function(e){n[e].placeholder=n})),l(["drop","take"],(function(e,t){Re.prototype[e]=function(n){n=n===G?1:vo(oi(n),0);var r=this.__filtered__&&!t?new Re(this):this.clone();return r.__filtered__?r.__takeCount__=mo(n,r.__takeCount__):r.__views__.push({size:mo(n,4294967295),type:e+(0>r.__dir__?"Right":"")}),r},Re.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),l(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Re.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:rr(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),l(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Re.prototype[e]=function(){return this[n](1).value()[0]}})),l(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Re.prototype[e]=function(){return this.__filtered__?new Re(this):this[n](1)}})),Re.prototype.compact=function(){return this.filter(Ci)},Re.prototype.find=function(e){return this.filter(e).head()},Re.prototype.findLast=function(e){return this.reverse().find(e)},Re.prototype.invokeMap=Zt((function(e,t){return"function"==typeof e?new Re(this):this.map((function(n){return Tt(n,e,t)}))})),Re.prototype.reject=function(e){return this.filter(zr(rr(e)))},Re.prototype.slice=function(e,t){e=oi(e);var n=this;return n.__filtered__&&(0<e||0>t)?new Re(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==G&&(n=0>(t=oi(t))?n.dropRight(-t):n.take(t-e)),n)},Re.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Re.prototype.toArray=function(){return this.take(4294967295)},Ct(Re.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=n[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(n.prototype[t]=function(){function t(e){return e=o.apply(n,g([e],l)),i&&p?e[0]:e}var s=this.__wrapped__,l=i?[1]:arguments,c=s instanceof Re,u=l[0],d=c||Wa(s);d&&r&&"function"==typeof u&&1!=u.length&&(c=d=!1);var p=this.__chain__,f=!!this.__actions__.length;u=a&&!p,c=c&&!f;return!a&&d?(s=c?s:new Re(this),(s=e.apply(s,l)).__actions__.push({func:_r,args:[t],thisArg:G}),new R(s,p)):u&&c?e.apply(this,l):(s=this.thru(t),u?i?s.value()[0]:s.value():s)})})),l("pop push shift sort splice unshift".split(" "),(function(e){var t=Mi[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(Wa(n)?n:[],e)}return this[r]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),Ct(Re.prototype,(function(e,t){var r=n[t];if(r){var i=r.name+"";(ko[i]||(ko[i]=[])).push({name:t,func:r})}})),ko[Mn(G,2).name]=[{name:"wrapper",func:G}],Re.prototype.clone=function(){var e=new Re(this.__wrapped__);return e.__actions__=wn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=wn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=wn(this.__views__),e},Re.prototype.reverse=function(){if(this.__filtered__){var e=new Re(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Re.prototype.value=function(){var e,t=this.__wrapped__.value(),n=this.__dir__,r=Wa(t),i=0>n,o=r?t.length:0;e=o;for(var a=this.__views__,s=0,l=-1,c=a.length;++l<c;){var u=a[l],d=u.size;switch(u.type){case"drop":s+=d;break;case"dropRight":e-=d;break;case"take":e=mo(e,s+d);break;case"takeRight":s=vo(s,e-d)}}if(a=(e={start:s,end:e}).start,e=(s=e.end)-a,a=i?s:a-1,l=(s=this.__iteratees__).length,c=0,u=mo(e,this.__takeCount__),!r||!i&&o==e&&u==e)return dn(t,this.__actions__);r=[];e:for(;e--&&c<u;){for(i=-1,o=t[a+=n];++i<l;){d=(p=s[i]).type;var p=(0,p.iteratee)(o);if(2==d)o=p;else if(!p){if(1==d)continue e;break e}}r[c++]=o}return r},n.prototype.at=ba,n.prototype.chain=function(){return Br(this)},n.prototype.commit=function(){return new R(this.value(),this.__chain__)},n.prototype.next=function(){this.__values__===G&&(this.__values__=ri(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?G:this.__values__[this.__index__++]}},n.prototype.plant=function(e){for(var t,n=this;n instanceof r;){var i=wr(n);i.__index__=0,i.__values__=G,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},n.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof Re?(this.__actions__.length&&(e=new Re(this)),(e=e.reverse()).__actions__.push({func:_r,args:[Dr],thisArg:G}),new R(e,this.__chain__)):this.thru(Dr)},n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=function(){return dn(this.__wrapped__,this.__actions__)},n.prototype.first=n.prototype.head,no&&(n.prototype[no]=function(){return this}),n}();ze._=it,void 0===(r=function(){return it}.call(t,n,t,e))||(e.exports=r)}.call(this)},300:t=>{"use strict";t.exports=e},799:e=>{"use strict";e.exports=t},689:(e,t)=>{"use strict";var n={},r={default:function(e,t,r,i,o){var a=new Worker(n[t]||(n[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],o(r,null)}else o(null,t)},a.postMessage(r,i),a}},i=Uint8Array,o=Uint16Array,a=Int32Array,s=new i([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),l=new i([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),c=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(e,t){for(var n=new o(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new a(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return{b:n,r:i}},d=u(s,2),p=d.b,f=d.r;p[28]=258,f[258]=28;for(var h=u(l,0),g=h.b,v=h.r,m=new o(32768),y=0;y<32768;++y){var b=(43690&y)>>1|(21845&y)<<1;b=(61680&(b=(52428&b)>>2|(13107&b)<<2))>>4|(3855&b)<<4,m[y]=((65280&b)>>8|(255&b)<<8)>>1}var C=function(e,t,n){for(var r=e.length,i=0,a=new o(t);i<r;++i)e[i]&&++a[e[i]-1];var s,l=new o(t);for(i=1;i<t;++i)l[i]=l[i-1]+a[i-1]<<1;if(n){s=new o(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],d=t-e[i],p=l[e[i]-1]++<<d,f=p|(1<<d)-1;p<=f;++p)s[m[p]>>c]=u}else for(s=new o(r),i=0;i<r;++i)e[i]&&(s[i]=m[l[e[i]-1]++]>>15-e[i]);return s},x=new i(288);for(y=0;y<144;++y)x[y]=8;for(y=144;y<256;++y)x[y]=9;for(y=256;y<280;++y)x[y]=7;for(y=280;y<288;++y)x[y]=8;var E=new i(32);for(y=0;y<32;++y)E[y]=5;var S=C(x,9,0),w=C(x,9,1),V=C(E,5,0),R=C(E,5,1),O=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},A=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},k=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},T=function(e){return(e+7)/8|0},D=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new i(e.subarray(t,n))};t.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var N=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],P=function(e,t,n){var r=new Error(t||N[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,P),!n)throw r;return r},B=function(e,t,n,r){var o=e.length,a=r?r.length:0;if(!o||t.f&&!t.l)return n||new i(0);var u=!n,d=u||2!=t.i,f=t.i;u&&(n=new i(3*o));var h=function(e){var t=n.length;if(e>t){var r=new i(Math.max(2*t,e));r.set(n),n=r}},v=t.f||0,m=t.p||0,y=t.b||0,b=t.l,x=t.d,E=t.m,S=t.n,V=8*o;do{if(!b){v=A(e,m,1);var N=A(e,m+1,3);if(m+=3,!N){var B=e[(j=T(m)+4)-4]|e[j-3]<<8,_=j+B;if(_>o){f&&P(0);break}d&&h(y+B),n.set(e.subarray(j,_),y),t.b=y+=B,t.p=m=8*_,t.f=v;continue}if(1==N)b=w,x=R,E=9,S=5;else if(2==N){var M=A(e,m,31)+257,I=A(e,m+10,15)+4,F=M+A(e,m+5,31)+1;m+=14;for(var L=new i(F),W=new i(19),U=0;U<I;++U)W[c[U]]=A(e,m+3*U,7);m+=3*I;var G=O(W),z=(1<<G)-1,Q=C(W,G,1);for(U=0;U<F;){var j,Y=Q[A(e,m,z)];if(m+=15&Y,(j=Y>>4)<16)L[U++]=j;else{var H=0,J=0;for(16==j?(J=3+A(e,m,3),m+=2,H=L[U-1]):17==j?(J=3+A(e,m,7),m+=3):18==j&&(J=11+A(e,m,127),m+=7);J--;)L[U++]=H}}var Z=L.subarray(0,M),X=L.subarray(M);E=O(Z),S=O(X),b=C(Z,E,1),x=C(X,S,1)}else P(1);if(m>V){f&&P(0);break}}d&&h(y+131072);for(var q=(1<<E)-1,K=(1<<S)-1,$=m;;$=m){var ee=(H=b[k(e,m)&q])>>4;if((m+=15&H)>V){f&&P(0);break}if(H||P(2),ee<256)n[y++]=ee;else{if(256==ee){$=m,b=null;break}var te=ee-254;if(ee>264){var ne=s[U=ee-257];te=A(e,m,(1<<ne)-1)+p[U],m+=ne}var re=x[k(e,m)&K],ie=re>>4;re||P(3),m+=15&re;X=g[ie];if(ie>3){ne=l[ie];X+=k(e,m)&(1<<ne)-1,m+=ne}if(m>V){f&&P(0);break}d&&h(y+131072);var oe=y+te;if(y<X){var ae=a-X,se=Math.min(X,oe);for(ae+y<0&&P(3);y<se;++y)n[y]=r[ae+y]}for(;y<oe;++y)n[y]=n[y-X]}}t.l=b,t.p=$,t.b=y,t.f=v,b&&(v=1,t.m=E,t.d=x,t.n=S)}while(!v);return y!=n.length&&u?D(n,0,y):n.subarray(0,y)},_=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},M=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},I=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var a=n.length,s=n.slice();if(!a)return{t:Q,l:0};if(1==a){var l=new i(n[0].s+1);return l[n[0].s]=1,{t:l,l:1}}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var c=n[0],u=n[1],d=0,p=1,f=2;for(n[0]={s:-1,f:c.f+u.f,l:c,r:u};p!=a-1;)c=n[n[d].f<n[f].f?d++:f++],u=n[d!=p&&n[d].f<n[f].f?d++:f++],n[p++]={s:-1,f:c.f+u.f,l:c,r:u};var h=s[0].s;for(r=1;r<a;++r)s[r].s>h&&(h=s[r].s);var g=new o(h+1),v=F(n[p-1],g,0);if(v>t){r=0;var m=0,y=v-t,b=1<<y;for(s.sort((function(e,t){return g[t.s]-g[e.s]||e.f-t.f}));r<a;++r){var C=s[r].s;if(!(g[C]>t))break;m+=b-(1<<v-g[C]),g[C]=t}for(m>>=y;m>0;){var x=s[r].s;g[x]<t?m-=1<<t-g[x]++-1:++r}for(;r>=0&&m;--r){var E=s[r].s;g[E]==t&&(--g[E],++m)}v=t}return{t:new i(g),l:v}},F=function(e,t,n){return-1==e.s?Math.max(F(e.l,t,n+1),F(e.r,t,n+1)):t[e.s]=n},L=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new o(++t),r=0,i=e[0],a=1,s=function(e){n[r++]=e},l=1;l<=t;++l)if(e[l]==i&&l!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(i),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(i);a=1,i=e[l]}return{c:n.subarray(0,r),n:t}},W=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},U=function(e,t,n){var r=n.length,i=T(t+2);e[i]=255&r,e[i+1]=r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},G=function(e,t,n,r,i,a,u,d,p,f,h){_(t,h++,n),++i[256];for(var g=I(i,15),v=g.t,m=g.l,y=I(a,15),b=y.t,w=y.l,R=L(v),O=R.c,A=R.n,k=L(b),T=k.c,D=k.n,N=new o(19),P=0;P<O.length;++P)++N[31&O[P]];for(P=0;P<T.length;++P)++N[31&T[P]];for(var B=I(N,7),F=B.t,G=B.l,z=19;z>4&&!F[c[z-1]];--z);var Q,j,Y,H,J=f+5<<3,Z=W(i,x)+W(a,E)+u,X=W(i,v)+W(a,b)+u+14+3*z+W(N,F)+2*N[16]+3*N[17]+7*N[18];if(p>=0&&J<=Z&&J<=X)return U(t,h,e.subarray(p,p+f));if(_(t,h,1+(X<Z)),h+=2,X<Z){Q=C(v,m,0),j=v,Y=C(b,w,0),H=b;var q=C(F,G,0);_(t,h,A-257),_(t,h+5,D-1),_(t,h+10,z-4),h+=14;for(P=0;P<z;++P)_(t,h+3*P,F[c[P]]);h+=3*z;for(var K=[O,T],$=0;$<2;++$){var ee=K[$];for(P=0;P<ee.length;++P){var te=31&ee[P];_(t,h,q[te]),h+=F[te],te>15&&(_(t,h,ee[P]>>5&127),h+=ee[P]>>12)}}}else Q=S,j=x,Y=V,H=E;for(P=0;P<d;++P){var ne=r[P];if(ne>255){M(t,h,Q[(te=ne>>18&31)+257]),h+=j[te+257],te>7&&(_(t,h,ne>>23&31),h+=s[te]);var re=31≠M(t,h,Y[re]),h+=H[re],re>3&&(M(t,h,ne>>5&8191),h+=l[re])}else M(t,h,Q[ne]),h+=j[ne]}return M(t,h,Q[256]),h+j[256]},z=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Q=new i(0),j=function(e,t,n,r,c,u){var d=u.z||e.length,p=new i(r+d+5*(1+Math.ceil(d/7e3))+c),h=p.subarray(r,p.length-c),g=u.l,m=7&(u.r||0);if(t){m&&(h[0]=u.r>>3);for(var y=z[t-1],b=y>>13,C=8191&y,x=(1<<n)-1,E=u.p||new o(32768),S=u.h||new o(x+1),w=Math.ceil(n/3),V=2*w,R=function(t){return(e[t]^e[t+1]<<w^e[t+2]<<V)&x},O=new a(25e3),A=new o(288),k=new o(32),N=0,P=0,B=u.i||0,_=0,M=u.w||0,I=0;B+2<d;++B){var F=R(B),L=32767&B,W=S[F];if(E[L]=W,S[F]=L,M<=B){var Q=d-B;if((N>7e3||_>24576)&&(Q>423||!g)){m=G(e,h,0,O,A,k,P,_,I,B-I,m),_=N=P=0,I=B;for(var j=0;j<286;++j)A[j]=0;for(j=0;j<30;++j)k[j]=0}var Y=2,H=0,J=C,Z=L-W&32767;if(Q>2&&F==R(B-Z))for(var X=Math.min(b,Q)-1,q=Math.min(32767,B),K=Math.min(258,Q);Z<=q&&--J&&L!=W;){if(e[B+Y]==e[B+Y-Z]){for(var $=0;$<K&&e[B+$]==e[B+$-Z];++$);if($>Y){if(Y=$,H=Z,$>X)break;var ee=Math.min(Z,$-2),te=0;for(j=0;j<ee;++j){var ne=B-Z+j&32767,re=ne-E[ne]&32767;re>te&&(te=re,W=ne)}}}Z+=(L=W)-(W=E[L])&32767}if(H){O[_++]=268435456|f[Y]<<18|v[H];var ie=31&f[Y],oe=31&v[H];P+=s[ie]+l[oe],++A[257+ie],++k[oe],M=B+Y,++N}else O[_++]=e[B],++A[e[B]]}}for(B=Math.max(B,M);B<d;++B)O[_++]=e[B],++A[e[B]];m=G(e,h,g,O,A,k,P,_,I,B-I,m),g||(u.r=7&m|h[m/8|0]<<3,m-=7,u.h=S,u.p=E,u.i=B,u.w=M)}else{for(B=u.w||0;B<d+g;B+=65535){var ae=B+65535;ae>=d&&(h[m/8|0]=g,ae=d),m=U(h,m+1,e.subarray(B,ae))}u.i=d}return D(p,0,r+T(m)+c)},Y=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),H=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=Y[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},J=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,a=0;a!=o;){for(var s=Math.min(a+2655,o);a<s;++a)i+=r+=n[a];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},Z=function(e,t,n,r,o){if(!o&&(o={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),s=new i(a.length+e.length);s.set(a),s.set(e,a.length),e=s,o.w=a.length}return j(e,null==t.level?6:t.level,null==t.mem?o.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,o)},X=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},q=function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var s=r[a],l=o[a];if("function"==typeof s){t+=";"+l+"=";var c=s.toString();if(s.prototype)if(-1!=c.indexOf("[native code]")){var u=c.indexOf(" ",8)+1;t+=c.slice(u,c.indexOf("(",u))}else for(var d in t+=c,s.prototype)t+=";"+l+".prototype."+d+"="+s.prototype[d].toString();else t+=c}else n[l]=s}return t},K=[],$=function(e,t,n,i){if(!K[n]){for(var o="",a={},s=e.length-1,l=0;l<s;++l)o=q(e[l],o,a);K[n]={c:q(e[s],o,a),e:a}}var c=X({},K[n].e);return(0,r.default)(K[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,c,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(c),i)},ee=function(){return[i,o,a,s,l,c,p,g,w,R,m,N,C,O,A,k,T,D,P,B,ke,ae,se]},te=function(){return[i,o,a,s,l,c,f,v,S,x,V,E,m,z,Q,C,_,M,I,F,L,W,U,G,T,D,j,Z,Ve,ae]},ne=function(){return[ge,ye,he,H,Y]},re=function(){return[ve,me]},ie=function(){return[be,he,J]},oe=function(){return[Ce]},ae=function(e){return postMessage(e,[e.buffer])},se=function(e){return e&&{out:e.size&&new i(e.size),dictionary:e.dictionary}},le=function(e,t,n,r,i,o){var a=$(n,r,i,(function(e,t){a.terminate(),o(e,t)}));return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},ce=function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){t.data.length?(e.push(t.data[0],t.data[1]),postMessage([t.data[0].length])):e.flush()}},ue=function(e,t,n,r,i,o,a){var s,l=$(e,r,i,(function(e,n){e?(l.terminate(),t.ondata.call(t,e)):Array.isArray(n)?1==n.length?(t.queuedSize-=n[0],t.ondrain&&t.ondrain(n[0])):(n[1]&&l.terminate(),t.ondata.call(t,e,n[0],n[1])):a(n)}));l.postMessage(n),t.queuedSize=0,t.push=function(e,n){t.ondata||P(5),s&&t.ondata(P(4,0,1),null,!!n),t.queuedSize+=e.length,l.postMessage([e,s=n],[e.buffer])},t.terminate=function(){l.terminate()},o&&(t.flush=function(){l.postMessage([])})},de=function(e,t){return e[t]|e[t+1]<<8},pe=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},fe=function(e,t){return pe(e,t)+4294967296*pe(e,t+4)},he=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},ge=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&he(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},ve=function(e){31==e[0]&&139==e[1]&&8==e[2]||P(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=2+(e[10]|e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},me=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},ye=function(e){return 10+(e.filename?e.filename.length+1:0)},be=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=J();i.p(t.dictionary),he(e,2,i.d())}},Ce=function(e,t){return(8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31)&&P(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&P(6,"invalid zlib data: "+(32&e[1]?"need":"unexpected")+" dictionary"),2+(e[1]>>3&4)};function xe(e,t){return"function"==typeof e&&(t=e,e={}),this.ondata=t,e}var Ee=function(){function e(e,t){if("function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new i(98304),this.o.dictionary){var n=this.o.dictionary.subarray(-32768);this.b.set(n,32768-n.length),this.s.i=32768-n.length}}return e.prototype.p=function(e,t){this.ondata(Z(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||P(5),this.s.l&&P(4);var n=e.length+this.s.z;if(n>this.b.length){if(n>2*this.b.length-32768){var r=new i(-32768&n);r.set(this.b.subarray(0,this.s.z)),this.b=r}var o=this.b.length-this.s.z;this.b.set(e.subarray(0,o),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(o),32768),this.s.z=e.length-o+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=1&t,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},e.prototype.flush=function(){this.ondata||P(5),this.s.l&&P(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},e}();t.Deflate=Ee;var Se=function(){return function(e,t){ue([te,function(){return[ce,Ee]}],this,xe.call(this,e,t),(function(e){var t=new Ee(e.data);onmessage=ce(t)}),6,1)}}();function we(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[te],(function(e){return ae(Ve(e.data[0],e.data[1]))}),0,n)}function Ve(e,t){return Z(e,t||{},0,0)}t.AsyncDeflate=Se,t.deflate=we,t.deflateSync=Ve;var Re=function(){function e(e,t){"function"==typeof e&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new i(32768),this.p=new i(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||P(5),this.d&&P(4),this.p.length){if(e.length){var t=new i(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}}else this.p=e},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=B(this.p,this.s,this.o);this.ondata(D(n,t,this.s.b),this.d),this.o=D(n,this.s.b-32768),this.s.b=this.o.length,this.p=D(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}();t.Inflate=Re;var Oe=function(){return function(e,t){ue([ee,function(){return[ce,Re]}],this,xe.call(this,e,t),(function(e){var t=new Re(e.data);onmessage=ce(t)}),7,0)}}();function Ae(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[ee],(function(e){return ae(ke(e.data[0],se(e.data[1])))}),1,n)}function ke(e,t){return B(e,{i:2},t&&t.out,t&&t.dictionary)}t.AsyncInflate=Oe,t.inflate=Ae,t.inflateSync=ke;var Te=function(){function e(e,t){this.c=H(),this.l=0,this.v=1,Ee.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),this.l+=e.length,Ee.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=Z(e,this.o,this.v&&ye(this.o),t&&8,this.s);this.v&&(ge(n,this.o),this.v=0),t&&(he(n,n.length-8,this.c.d()),he(n,n.length-4,this.l)),this.ondata(n,t)},e.prototype.flush=function(){Ee.prototype.flush.call(this)},e}();t.Gzip=Te,t.Compress=Te;var De=function(){return function(e,t){ue([te,ne,function(){return[ce,Ee,Te]}],this,xe.call(this,e,t),(function(e){var t=new Te(e.data);onmessage=ce(t)}),8,1)}}();function Ne(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[te,ne,function(){return[Pe]}],(function(e){return ae(Pe(e.data[0],e.data[1]))}),2,n)}function Pe(e,t){t||(t={});var n=H(),r=e.length;n.p(e);var i=Z(e,t,ye(t),8),o=i.length;return ge(i,t),he(i,o-8,n.d()),he(i,o-4,r),i}t.AsyncGzip=De,t.AsyncCompress=De,t.gzip=Ne,t.compress=Ne,t.gzipSync=Pe,t.compressSync=Pe;var Be=function(){function e(e,t){this.v=1,this.r=0,Re.call(this,e,t)}return e.prototype.push=function(e,t){if(Re.prototype.e.call(this,e),this.r+=e.length,this.v){var n=this.p.subarray(this.v-1),r=n.length>3?ve(n):4;if(r>n.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-n.length);this.p=n.subarray(r),this.v=0}Re.prototype.c.call(this,t),!this.s.f||this.s.l||t||(this.v=T(this.s.p)+9,this.s={i:0},this.o=new i(0),this.push(new i(0),t))},e}();t.Gunzip=Be;var _e=function(){return function(e,t){var n=this;ue([ee,re,function(){return[ce,Re,Be]}],this,xe.call(this,e,t),(function(e){var t=new Be(e.data);t.onmember=function(e){return postMessage(e)},onmessage=ce(t)}),9,0,(function(e){return n.onmember&&n.onmember(e)}))}}();function Me(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[ee,re,function(){return[Ie]}],(function(e){return ae(Ie(e.data[0],e.data[1]))}),3,n)}function Ie(e,t){var n=ve(e);return n+8>e.length&&P(6,"invalid gzip data"),B(e.subarray(n,-8),{i:2},t&&t.out||new i(me(e)),t&&t.dictionary)}t.AsyncGunzip=_e,t.gunzip=Me,t.gunzipSync=Ie;var Fe=function(){function e(e,t){this.c=J(),this.v=1,Ee.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),Ee.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=Z(e,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&(be(n,this.o),this.v=0),t&&he(n,n.length-4,this.c.d()),this.ondata(n,t)},e.prototype.flush=function(){Ee.prototype.flush.call(this)},e}();t.Zlib=Fe;var Le=function(){return function(e,t){ue([te,ie,function(){return[ce,Ee,Fe]}],this,xe.call(this,e,t),(function(e){var t=new Fe(e.data);onmessage=ce(t)}),10,1)}}();function We(e,t){t||(t={});var n=J();n.p(e);var r=Z(e,t,t.dictionary?6:2,4);return be(r,t),he(r,r.length-4,n.d()),r}t.AsyncZlib=Le,t.zlib=function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[te,ie,function(){return[We]}],(function(e){return ae(We(e.data[0],e.data[1]))}),4,n)},t.zlibSync=We;var Ue=function(){function e(e,t){Re.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(Re.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(Ce(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&P(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Re.prototype.c.call(this,t)},e}();t.Unzlib=Ue;var Ge=function(){return function(e,t){ue([ee,oe,function(){return[ce,Re,Ue]}],this,xe.call(this,e,t),(function(e){var t=new Ue(e.data);onmessage=ce(t)}),11,0)}}();function ze(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[ee,oe,function(){return[Qe]}],(function(e){return ae(Qe(e.data[0],se(e.data[1])))}),5,n)}function Qe(e,t){return B(e.subarray(Ce(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}t.AsyncUnzlib=Ge,t.unzlib=ze,t.unzlibSync=Qe;var je=function(){function e(e,t){this.o=xe.call(this,e,t)||{},this.G=Be,this.I=Re,this.Z=Ue}return e.prototype.i=function(){var e=this;this.s.ondata=function(t,n){e.ondata(t,n)}},e.prototype.push=function(e,t){if(this.ondata||P(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new i(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;this.p.length>2&&(this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(this.o):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,t),this.p=null)}},e}();t.Decompress=je;var Ye=function(){function e(e,t){je.call(this,e,t),this.queuedSize=0,this.G=_e,this.I=Oe,this.Z=Ge}return e.prototype.i=function(){var e=this;this.s.ondata=function(t,n,r){e.ondata(t,n,r)},this.s.ondrain=function(t){e.queuedSize-=t,e.ondrain&&e.ondrain(t)}},e.prototype.push=function(e,t){this.queuedSize+=e.length,je.prototype.push.call(this,e,t)},e}();t.AsyncDecompress=Ye,t.decompress=function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),31==e[0]&&139==e[1]&&8==e[2]?Me(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Ae(e,t,n):ze(e,t,n)},t.decompressSync=function(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?Ie(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?ke(e,t):Qe(e,t)};var He=function(e,t,n,r){for(var o in e){var a=e[o],s=t+o,l=r;Array.isArray(a)&&(l=X(r,a[1]),a=a[0]),a instanceof i?n[s]=[a,l]:(n[s+="/"]=[new i(0),l],He(a,s,n,r))}},Je="undefined"!=typeof TextEncoder&&new TextEncoder,Ze="undefined"!=typeof TextDecoder&&new TextDecoder,Xe=0;try{Ze.decode(Q,{stream:!0}),Xe=1}catch(e){}var qe=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:D(e,n-1)};i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}},Ke=function(){function e(e){this.ondata=e,Xe?this.t=new TextDecoder:this.p=Q}return e.prototype.push=function(e,t){if(this.ondata||P(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&P(8),this.t=null));this.p||P(4);var n=new i(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=qe(n),o=r.s,a=r.r;t?(a.length&&P(8),this.p=null):this.p=a,this.ondata(o,t)},e}();t.DecodeUTF8=Ke;var $e=function(){function e(e){this.ondata=e}return e.prototype.push=function(e,t){this.ondata||P(5),this.d&&P(4),this.ondata(et(e),this.d=t||!1)},e}();function et(e,t){if(t){for(var n=new i(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Je)return Je.encode(e);var o=e.length,a=new i(e.length+(e.length>>1)),s=0,l=function(e){a[s++]=e};for(r=0;r<o;++r){if(s+5>a.length){var c=new i(s+8+(o-r<<1));c.set(a),a=c}var u=e.charCodeAt(r);u<128||t?l(u):u<2048?(l(192|u>>6),l(128|63&u)):u>55295&&u<57344?(l(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++r))>>18),l(128|u>>12&63),l(128|u>>6&63),l(128|63&u)):(l(224|u>>12),l(128|u>>6&63),l(128|63&u))}return D(a,0,s)}function tt(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(Ze)return Ze.decode(e);var i=qe(e),o=i.s;return(n=i.r).length&&P(8),o}t.EncodeUTF8=$e,t.strToU8=et,t.strFromU8=tt;var nt=function(e){return 1==e?3:e<6?2:9==e?1:0},rt=function(e,t){return t+30+de(e,t+26)+de(e,t+28)},it=function(e,t,n){var r=de(e,t+28),i=tt(e.subarray(t+46,t+46+r),!(2048&de(e,t+8))),o=t+46+r,a=pe(e,t+20),s=n&&4294967295==a?ot(e,o):[a,pe(e,t+24),pe(e,t+42)],l=s[0],c=s[1],u=s[2];return[de(e,t+10),l,c,i,o+de(e,t+30)+de(e,t+32),u]},ot=function(e,t){for(;1!=de(e,t);t+=4+de(e,t+2));return[fe(e,t+12),fe(e,t+4),fe(e,t+20)]},at=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&P(9),t+=r+4}return t},st=function(e,t,n,r,i,o,a,s){var l=r.length,c=n.extra,u=s&&s.length,d=at(c);he(e,t,null!=a?33639248:67324752),t+=4,null!=a&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(o<0&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var p=new Date(null==n.mtime?Date.now():n.mtime),f=p.getFullYear()-1980;if((f<0||f>119)&&P(10),he(e,t,f<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),t+=4,-1!=o&&(he(e,t,n.crc),he(e,t+4,o<0?-o-2:o),he(e,t+8,n.size)),he(e,t+12,l),he(e,t+14,d),t+=16,null!=a&&(he(e,t,u),he(e,t+6,n.attrs),he(e,t+10,a),t+=14),e.set(r,t),t+=l,d)for(var h in c){var g=c[h],v=g.length;he(e,t,+h),he(e,t+2,v),e.set(g,t+4),t+=4+v}return u&&(e.set(s,t),t+=u),t},lt=function(e,t,n,r,i){he(e,t,101010256),he(e,t+8,n),he(e,t+10,n),he(e,t+12,r),he(e,t+16,i)},ct=function(){function e(e){this.filename=e,this.c=H(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||P(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}();t.ZipPassThrough=ct;var ut=function(){function e(e,t){var n=this;t||(t={}),ct.call(this,e),this.d=new Ee(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=nt(t.level)}return e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){ct.prototype.push.call(this,e,t)},e}();t.ZipDeflate=ut;var dt=function(){function e(e,t){var n=this;t||(t={}),ct.call(this,e),this.d=new Se(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=nt(t.level),this.terminate=this.d.terminate}return e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){ct.prototype.push.call(this,e,t)},e}();t.AsyncZipDeflate=dt;var pt=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return e.prototype.add=function(e){var t=this;if(this.ondata||P(5),2&this.d)this.ondata(P(4+8*(1&this.d),0,1),null,!1);else{var n=et(e.filename),r=n.length,o=e.comment,a=o&&et(o),s=r!=e.filename.length||a&&o.length!=a.length,l=r+at(e.extra)+30;r>65535&&this.ondata(P(11,0,1),null,!1);var c=new i(l);st(c,0,e,n,s,-1);var u=[c],d=function(){for(var e=0,n=u;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}u=[]},p=this.d;this.d=0;var f=this.u.length,h=X(e,{f:n,u:s,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(d(),p){var e=t.u[f+1];e?e.r():t.d=1}p=1}}),g=0;e.ondata=function(n,r,o){if(n)t.ondata(n,r,o),t.terminate();else if(g+=r.length,u.push(r),o){var a=new i(16);he(a,0,134695760),he(a,4,e.crc),he(a,8,g),he(a,12,e.size),u.push(a),h.c=g,h.b=l+g+16,h.crc=e.crc,h.size=e.size,p&&h.r(),p=1}else p&&d()},this.u.push(h)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(P(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,o=this.u;r<o.length;r++){n+=46+(c=o[r]).f.length+at(c.extra)+(c.o?c.o.length:0)}for(var a=new i(n+22),s=0,l=this.u;s<l.length;s++){var c=l[s];st(a,e,c,c.f,c.u,-c.c-2,t,c.o),e+=46+c.f.length+at(c.extra)+(c.o?c.o.length:0),t+=c.b}lt(a,e,this.u.length,n,t),this.ondata(null,a,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}();t.Zip=pt,t.zip=function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&P(7);var r={};He(e,"",r,t);var o=Object.keys(r),a=o.length,s=0,l=0,c=a,u=new Array(a),d=[],p=function(){for(var e=0;e<d.length;++e)d[e]()},f=function(e,t){mt((function(){n(e,t)}))};mt((function(){f=n}));var h=function(){var e=new i(l+22),t=s,n=l-s;l=0;for(var r=0;r<c;++r){var o=u[r];try{var a=o.c.length;st(e,l,o,o.f,o.u,a);var d=30+o.f.length+at(o.extra),p=l+d;e.set(o.c,p),st(e,s,o,o.f,o.u,a,l,o.m),s+=16+d+(o.m?o.m.length:0),l=p+a}catch(e){return f(e,null)}}lt(e,s,u.length,n,t),f(null,e)};a||h();for(var g=function(e){var t=o[e],n=r[t],i=n[0],c=n[1],g=H(),v=i.length;g.p(i);var m=et(t),y=m.length,b=c.comment,C=b&&et(b),x=C&&C.length,E=at(c.extra),S=0==c.level?0:8,w=function(n,r){if(n)p(),f(n,null);else{var i=r.length;u[e]=X(c,{size:v,crc:g.d(),c:r,f:m,m:C,u:y!=t.length||C&&b.length!=x,compression:S}),s+=30+y+E+i,l+=76+2*(y+E)+(x||0)+i,--a||h()}};if(y>65535&&w(P(11,0,1),null),S)if(v<16e4)try{w(null,Ve(i,c))}catch(e){w(e,null)}else d.push(we(i,c,w));else w(null,i)},v=0;v<c;++v)g(v);return p},t.zipSync=function(e,t){t||(t={});var n={},r=[];He(e,"",n,t);var o=0,a=0;for(var s in n){var l=n[s],c=l[0],u=l[1],d=0==u.level?0:8,p=(w=et(s)).length,f=u.comment,h=f&&et(f),g=h&&h.length,v=at(u.extra);p>65535&&P(11);var m=d?Ve(c,u):c,y=m.length,b=H();b.p(c),r.push(X(u,{size:c.length,crc:b.d(),c:m,f:w,m:h,u:p!=s.length||h&&f.length!=g,o,compression:d})),o+=30+p+v+y,a+=76+2*(p+v)+(g||0)+y}for(var C=new i(a+22),x=o,E=a-o,S=0;S<r.length;++S){var w=r[S];st(C,w.o,w,w.f,w.u,w.c.length);var V=30+w.f.length+at(w.extra);C.set(w.c,w.o+V),st(C,o,w,w.f,w.u,w.c.length,w.o,w.m),o+=16+V+(w.m?w.m.length:0)}return lt(C,o,r.length,E,x),C};var ft=function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}();t.UnzipPassThrough=ft;var ht=function(){function e(){var e=this;this.i=new Re((function(t,n){e.ondata(null,t,n)}))}return e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}();t.UnzipInflate=ht;var gt=function(){function e(e,t){var n=this;t<32e4?this.i=new Re((function(e,t){n.ondata(null,e,t)})):(this.i=new Oe((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return e.prototype.push=function(e,t){this.i.terminate&&(e=D(e,0)),this.i.push(e,t)},e.compression=8,e}();t.AsyncUnzipInflate=gt;var vt=function(){function e(e){this.onfile=e,this.k=[],this.o={0:ft},this.p=Q}return e.prototype.push=function(e,t){var n=this;if(this.onfile||P(5),this.p||P(4),this.c>0){var r=Math.min(this.c,e.length),o=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(o,!this.c):this.k[0].push(o),(e=e.subarray(r)).length)return this.push(e,t)}else{var a=0,s=0,l=void 0,c=void 0;this.p.length?e.length?((c=new i(this.p.length+e.length)).set(this.p),c.set(e,this.p.length)):c=this.p:c=e;for(var u=c.length,d=this.c,p=d&&this.d,f=function(){var e,t=pe(c,s);if(67324752==t){a=1,l=s,h.d=null,h.c=0;var r=de(c,s+6),i=de(c,s+8),o=2048&r,p=8&r,f=de(c,s+26),g=de(c,s+28);if(u>s+30+f+g){var v=[];h.k.unshift(v),a=2;var m,y=pe(c,s+18),b=pe(c,s+22),C=tt(c.subarray(s+30,s+=30+f),!o);4294967295==y?(e=p?[-2]:ot(c,s),y=e[0],b=e[1]):p&&(y=-1),s+=g,h.c=y;var x={name:C,compression:i,start:function(){if(x.ondata||P(5),y){var e=n.o[i];e||x.ondata(P(14,"unknown compression type "+i,1),null,!1),(m=y<0?new e(C):new e(C,y,b)).ondata=function(e,t,n){x.ondata(e,t,n)};for(var t=0,r=v;t<r.length;t++){var o=r[t];m.push(o,!1)}n.k[0]==v&&n.c?n.d=m:m.push(Q,!0)}else x.ondata(null,Q,!0)},terminate:function(){m&&m.terminate&&m.terminate()}};y>=0&&(x.size=y,x.originalSize=b),h.onfile(x)}return"break"}if(d){if(134695760==t)return l=s+=12+(-2==d&&8),a=3,h.c=0,"break";if(33639248==t)return l=s-=4,a=3,h.c=0,"break"}},h=this;s<u-4;++s){if("break"===f())break}if(this.p=Q,d<0){var g=a?c.subarray(0,l-12-(-2==d&&8)-(134695760==pe(c,l-16)&&4)):c.subarray(0,s);p?p.push(g,!!a):this.k[+(2==a)].push(g)}if(2&a)return this.push(c.subarray(s),t);this.p=c.subarray(s)}t&&(this.c&&P(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}();t.Unzip=vt;var mt="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};t.unzip=function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&P(7);var r=[],o=function(){for(var e=0;e<r.length;++e)r[e]()},a={},s=function(e,t){mt((function(){n(e,t)}))};mt((function(){s=n}));for(var l=e.length-22;101010256!=pe(e,l);--l)if(!l||e.length-l>65558)return s(P(13,0,1),null),o;var c=de(e,l+8);if(c){var u=c,d=pe(e,l+16),p=4294967295==d||65535==u;if(p){var f=pe(e,l-12);(p=101075792==pe(e,f))&&(u=c=pe(e,f+32),d=pe(e,f+48))}for(var h=t&&t.filter,g=function(t){var n=it(e,d,p),l=n[0],u=n[1],f=n[2],g=n[3],v=n[4],m=n[5],y=rt(e,m);d=v;var b=function(e,t){e?(o(),s(e,null)):(t&&(a[g]=t),--c||s(null,a))};if(!h||h({name:g,size:u,originalSize:f,compression:l}))if(l)if(8==l){var C=e.subarray(y,y+u);if(f<524288||u>.8*f)try{b(null,ke(C,{out:new i(f)}))}catch(e){b(e,null)}else r.push(Ae(C,{size:f},b))}else b(P(14,"unknown compression type "+l,1),null);else b(null,D(e,y,y+u));else b(null,null)},v=0;v<u;++v)g()}else s(null,{});return o},t.unzipSync=function(e,t){for(var n={},r=e.length-22;101010256!=pe(e,r);--r)(!r||e.length-r>65558)&&P(13);var o=de(e,r+8);if(!o)return{};var a=pe(e,r+16),s=4294967295==a||65535==o;if(s){var l=pe(e,r-12);(s=101075792==pe(e,l))&&(o=pe(e,l+32),a=pe(e,l+48))}for(var c=t&&t.filter,u=0;u<o;++u){var d=it(e,a,s),p=d[0],f=d[1],h=d[2],g=d[3],v=d[4],m=d[5],y=rt(e,m);a=v,c&&!c({name:g,size:f,originalSize:h,compression:p})||(p?8==p?n[g]=ke(e.subarray(y,y+f),{out:new i(h)}):P(14,"unknown compression type "+p):n[g]=D(e,y,y+f))}return n}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}return i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i(317)})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios"),require("https")):"function"==typeof define&&define.amd?define(["axios","https"],t):"object"==typeof exports?exports.SccfClientApi=t(require("axios"),require("https")):e.SccfClientApi=t(e.axios,e.https)}(this,((e,t)=>(()=>{var n={247:(e,t,n)=>{"use strict";n.r(t),n.d(t,{decode:()=>s,encode:()=>a});for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"==typeof Uint8Array?[]:new Uint8Array(256),o=0;o<r.length;o++)i[r.charCodeAt(o)]=o;var a=function(e){var t,n=new Uint8Array(e),i=n.length,o="";for(t=0;t<i;t+=3)o+=r[n[t]>>2],o+=r[(3&n[t])<<4|n[t+1]>>4],o+=r[(15&n[t+1])<<2|n[t+2]>>6],o+=r[63&n[t+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(e){var t,n,r,o,a,s=.75*e.length,l=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),d=new Uint8Array(u);for(t=0;t<l;t+=4)n=i[e.charCodeAt(t)],r=i[e.charCodeAt(t+1)],o=i[e.charCodeAt(t+2)],a=i[e.charCodeAt(t+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&a;return u}},46:(e,t,n)=>{var r=n(948),i=n(31);e.exports=function(){var e;(e=this).log=null,e.cyto={},e.initCallback=null,e.tassativi=null,e.tiedStdMandNodeList=null,e.configurazione=[],e.incompatibiliConConfig=[],e.checkConfigurazione=[],e.incompatibiliConCheckConfig=[],e.maxDepth=3,e.loopScenarios=[],e.dtype=null,e.pct100List=null,e.AndRules=[],e.exhauEdgesRemoved=null,e.getVersion=function(){return"180"},e.init=function(t,n,r,i,o){e.selectionLogDiv=r,e.log=i,e.initCallback=o,e.log.info("RuleEngine.init - dataElements:["+t.length+"]"),e.createCytoscape(t,n,e.postCreate)},e.postCreate=function(){e.log.debug("RuleEngine.postCreate - begin"),e.cyto.add({group:"nodes",data:{id:"config"}}),e.cyto.$("#config").addClass("config"),e.cyto.elements("edge[type='I']").forEach((function(e){e.addClass("incompatibile")})),e.cyto.elements("edge[type='V']").forEach((function(e){e.addClass("vincolo")})),e.cyto.elements("edge[type='A']").forEach((function(e){e.addClass("alternativo")})),e.cyto.elements("edge[type='E']").forEach((function(e){e.addClass("esclusivo")})),e.exhauEdgesRemoved=e.cyto.collection(),e.setHandlers(),e.log.debug("RuleEngine.postCreate - end")},e.setHandlers=function(){e.log.debug("RuleEngine.setHandlers - begin"),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.checkConfigurazione=e.cyto.collection(),e.cyto.nodes().on("click",e.onClickNodeHandler),e.initCallback(),e.log.debug("RuleEngine.setHandlers - end")},e.onClickNodeHandler=function(t){var n,r;e.log.debug("RuleEngine.onClickNodeHandler"),n=t.target,r=e.processNode(n),e.selectionLogDiv&&(e.selectionLogDiv.append(" - selezionato : ( "+n.id()+" )<br/>"),e.selectionLogDiv.append(r.message+" )<br/>"))},e.createCytoscape=function(t,n,r){var o;o=i.stylesheet().selector("node").css({content:"data(id)"}).selector("edge").css({"curve-style":"bezier","target-arrow-shape":"triangle","target-arrow-color":"gold",width:1,"line-color":"gold","target-arrow-color":"gold"}).selector(".config").css({"background-color":"gold"}).selector(".selected").css({"background-color":"LimeGreen"}).selector(".highlighted").css({"background-color":"red"}).selector(".vincolo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"magenta","target-arrow-color":"magenta"}).selector(".incompatibile").css({"curve-style":"bezier","target-arrow-shape":"triangle","target-arrow-fill":"filled",width:2,"line-color":"skyblue","target-arrow-color":"skyblue"}).selector(".alternativo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"darkblue","target-arrow-color":"darkblue"}).selector(".esclusivo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"orange","target-arrow-color":"orange"}),e.cyto=i(n?{container:n,boxSelectionEnabled:!1,autounselectify:!0,elements:t,layout:{name:"concentric",minNodeSpacing:20,padding:10},style:o}:{boxSelectionEnabled:!1,autounselectify:!0,elements:t,style:o}),e.cyto.ready((function(){r()}))},e.ruleNodeList=function(t,n,r){"use strict";var i,s;switch({},"",s=l(),[],e.log.debug("RuleEngine.ruleNodeList - begin"),e.log.debug("RuleEngine.ruleNodeList - toAddList:["+u(t)+"] - toRemoveList:["+u(n)+"]"),i=e.processScenario(t,n),d(i.data.scenarios),i=e.getStdScenarios(i,t,n),d(i.data.scenarios),i.data.scenarios.length){case 0:s=c(!1,i.code,i.message,[],[],[],[],i.data.scenarios,i.data.extra);break;case 1:r&&i.success&&(a(i.data.scenarios[0].removeList),o(i.data.scenarios[0].addList),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.cyto.elements().removeClass("highlighted"),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted")),s=c(i.success,i.code,i.message,[],[],[],[],i.data.scenarios,i.data.extra);break;default:s=r?c(!1,560,i.message,[],[],[],[],i.data.scenarios):c(!0,200,i.message,[],[],[],[],i.data.scenarios)}return e.log.debug("RuleEngine.ruleNodeList - end"),s},e.processScenario=function(r,i){"use strict";var o,a,s,p,f,h,g,v;h="",g=l(),v=[],e.log.debug("RuleEngine.processScenario - toAddList:["+u(r)+"] toRemoveList:["+u(i)+"] - tiedStdMandNodeList:["+u(e.tiedStdMandNodeList)+"]"),r=r.union(e.tiedStdMandNodeList),i=i.difference(e.tassativi);var m=r.intersection(i);if(m.nonempty())return h=h+" Options ["+u(m)+"] it should be added and contemporaneously removed",g=c(!1,530,h,[],[],[],[],[]);if("xP"===e.dtype&&i.nonempty()&&n(r,i))return g=c(!1,586,".testChange - It is not possible to remove 100Pct option without adding same class Option",{});for(var y=e.cyto.collection(),b=0;b<r.length;b++){for(var C=r[b],x=e.getVincolatiDiretti(C),E=0;E<x.length;E++){var S=x[E];if(i.contains(S)&&!r.contains(S)&&S.outgoers("edge[type='A']").size()<=1)return h=h+" - Option {"+C.id()+"} constrains Option {"+u(S)+"} that must be removed",e.log.debug("RuleEngine.processScenario - 510 message_:["+h+"]"),g=c(!1,510,h,[],[],[],[],[])}y=y.union(x)}e.log.debug("RuleEngine.processScenario - tiedByList_:["+u(y)+"]");var w=(k=e.getTiedToList(r,i)).tiedToList;h+=k.message,p=w,s=i.union(p),a=y,e.log.debug("RuleEngine.processScenario - toAddJoinList_:["+u(a)+"]"),o=a.union(r),e.log.debug("RuleEngine.processScenario - toAddAllList_:["+u(o)+"]");var V=e.getNodiIncompatibili(o),R=o.intersection(V);if(R.nonempty())return h=h+" Options ["+u(R)+"] are incompatibles each others",g=c(!1,520,h,[],[],[],[],[]);var O=e.configurazione.difference(s);e.log.debug("RuleEngine.processScenario - configDiffList_:["+u(O)+"]");var A=e.getIncSelectionMap(o,O);if(A.size>0){A.forEach((function(e,t){h=h+" - Option {"+t+"} is incompatibile with ["+u(e)+"]",s=s.union(e)}));var k;w=(k=e.getTiedToList(o,s)).tiedToList;h+=k.message,p=p.union(w),s=s.union(p),e.log.debug("RuleEngine.processScenario - toRemoveAllList_:["+u(s)+"]")}if("xP"===e.dtype){var T=t(o,s);o=o.union(T.toAddAndList),s=s.union(T.toRemoveAndList);var N=r.intersection(s);if(N.nonempty())return h=h+" Options ["+u(N)+"] it should be added and contemporaneously removed by AND rules",g=c(!1,532,h,[],[],[],[],[])}if(e.log.debug("RuleEngine.processScenario - post setXpANDRules add - toAddAllList_:["+u(o)+"]"),e.log.debug("RuleEngine.processScenario - post setXpANDRules remove - toRemoveAllList_:["+u(s)+"]"),"xP"===e.dtype){var D=s.outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e})),P=D.incomers("edge[type='V']").sources().filter((function(e){if(e.id()&&"P"===e.id().slice(-1))return e})),_=e.configurazione.intersection(P.difference(s)).outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}));p=p.union(D.difference(_));var B=s.outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"VG"===e.data("type"))return e}));s=s.union(B);var M=e.configurazione.intersection(s.outgoers("edge[type='A']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}))),I=o.outgoers("edge[type='A']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}));p=p.union(M.difference(I));var F=e.configurazione.intersection(s.outgoers("edge[type='A']").targets().outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}))),L=o.outgoers("edge[type='A']").targets().outgoers("edge[type='V']").targets().filter((function(e){if(e.id()&&"D"===e.id().slice(-1))return e}));p=p.union(F.difference(L)),s=s.union(p)}if(e.log.debug("RuleEngine.processScenario - Post Driven remove - toRemoveAllList_:["+u(s)+"]"),e.log.debug("RuleEngine.processScenario - me_.configurazione:["+u(e.configurazione)+"]"),s=s.difference(o.intersection(p)),e.log.debug("RuleEngine.processScenario -----------------------------------------------"),e.log.debug("RuleEngine.processScenario - toAddAllList_:["+u(o)+"]"),e.log.debug("RuleEngine.processScenario - toRemoveAllList_:["+u(s)+"]"),e.log.debug("RuleEngine.processScenario - toAddJoinList_:["+u(a)+"]"),e.log.debug("RuleEngine.processScenario - toRemoveJoinList_:["+u(p)+"]"),e.log.debug("RuleEngine.processScenario - incAddList :["+u(V)+"]"),e.log.debug("RuleEngine.processScenario -----------------------------------------------"),f=e.findAltPaths(o,s,p,V),h+=f.message,e.log.debug("RuleEngine.processScenario - toAddAllList_:["+u(o)+"]"),f.altGrExist){g=c(!1,522,h,{});var W=f.altGrList;e.log.debug("RuleEngine.processScenario - altGrList_:["+u(W)+"]");for(b=0;b<W.length;b++){var U=W[b];e.log.debug("RuleEngine.processScenario - altGr_:["+u(U)+"]");var G=o.union(U);e.log.debug("RuleEngine.processScenario - PRE - alt scenario - add:["+u(G)+"] remove:["+u(s)+"]"),s=s.difference(G).union(s.intersection(V)),e.log.debug("RuleEngine.processScenario - POST - alt scenario - add:["+u(G)+"] remove:["+u(s)+"]"),G=G.difference(e.configurazione),e.log.debug("RuleEngine.processScenario - POST2 - alt scenario - add:["+u(G)+"] remove:["+u(s)+"]"),v.push({addList:G,removeList:s}),g=c(!0,210,h,[],[],[],[],v)}}else{f.solvedTargetList_.nonempty()&&(e.log.debug("RuleEngine.processScenario - solvedTargetList_ :["+u(f.solvedTargetList_)+"]"),s=s.difference(f.solvedTargetList_),e.log.debug("RuleEngine.processScenario - toRemoveAllList_ :["+u(s)+"]")),e.log.debug("RuleEngine.processScenario - alreadySolvedTargetAltGroupNodeList :["+u(f.alreadySolvedTargetAltGroupNodeList)+"]");var z=o.union(f.alreadySolvedTargetAltGroupNodeList);e.log.debug("RuleEngine.processScenario - PRE - alt scenario - add:["+u(z)+"] remove:["+u(s)+"]"),s=s.difference(z).union(s.intersection(V)),e.log.debug("RuleEngine.processScenario - POST - alt scenario - add:["+u(z)+"] remove:["+u(s)+"]"),z=z.difference(e.configurazione),v.push({addList:z,removeList:s}),g=c(!0,200,h,[],[],[],[],v)}return e.log.debug("RuleEngine.processScenario - me_.tassativi:["+u(e.tassativi)+"]"),e.log.debug("RuleEngine.processScenario - me_.tiedStdMandNodeList:["+u(e.tiedStdMandNodeList)+"]"),d(v),g},e.processRuleMaxIter=function(t,n){"use strict";var r=[],i=[];for(r.push(t);r.length>0&&n>0;){var o=r.pop(),a=e.ruleNodeList(o.addList,o.removeList,!1);if(a&&a.data&&a.data.scenarios){var s=a.data.scenarios;if(0==s.length);else if(1==s.length)i.push(s[0]);else{for(var l=0;l<s.length;l++)r.push(s[l]);n--}n<=0&&e.loopScenarios.push(s)}}return i},e.processRuleActResMaxIterDepth=function(t,n,r,i){"use strict";var o=0,a=[],s=l(),c=l(),d=[];for(a.push({Scenario:t,Depth:o}),e.log.debug(" --- DEPTH - "+o+" --- START SCENARIO :toAddList:["+u(t.addList)+"] toRemoveList:["+u(t.removeList)+"]");a.length>0&&n>0;){var p=a.pop();o=p.Depth+1;var f=e.ruleNodeList(p.Scenario.addList,p.Scenario.removeList,i);if(f&&f.data&&f.data.scenarios){var h=f.data.scenarios;if(0===h.length)c.success=f.success,c.code=f.code,c.message=f.message;else if(1===h.length){e.insertIdAddList(d,h[0].addList)||(s.success=f.success,s.code=f.code,s.message=f.message,s.data.scenarios.push(h[0]),s.data.extra=f.data.extra)}else{for(var g=0;g<h.length;g++)o<=r&&a.push({Scenario:h[g],Depth:o});n--}}}return 0===s.data.scenarios.length&&(s=c),s},e.getStdScenarios=function(t,n,i){"use strict";for(var o=t,a=function(t,n,r,i){var o=null;switch(n.id()){case"ME_C":var a=e.cyto.getElementById("ME_I").outgoers("edge[type='E']").targets().intersection(i);if(a.nonempty()){var s=a[0];if(s.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var l=r.difference(t),c=s.outgoers("edge[type='I']").targets(),u=l.intersection(c),d=l.difference(u);d.nonempty()&&(o=d[0])}}break;case"ME_I":var p=e.cyto.getElementById("ME_C").outgoers("edge[type='E']").targets().intersection(i);if(p.nonempty()){var f=p[0];if(f.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var h=r.difference(t),g=f.outgoers("edge[type='I']").targets(),v=h.intersection(g),m=h.difference(v);m.nonempty()&&(o=m[0])}}break;default:if(i.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var y=r.difference(t),b=i.outgoers("edge[type='I']").targets(),C=y.intersection(b),x=y.difference(C);x.nonempty()&&(o=x[0])}}return o},s=[],l=[],c=[],d=0;d<o.data.scenarios.length;d++){var p=o.data.scenarios[d],f=!0,h=!1,g=p.removeList,v=p.addList;if(g.size()>0)for(var m=0;m<g.size()&&f;m++)for(var y=g[m],b=y.incomers("edge[type='E']"),C=0;C<b.size();C++){var x=b[C].source();if("ME_K"!==x.id()&&"ME_J"!==x.id()){e.log.debug("RuleEngine.getStdScenarios - toRemNode_:["+u(y)+"] ");var E=x.outgoers("edge[type='E']").targets();if(E.intersection(v).empty())if(h=!0,y.data().isStandard){var S=E.difference(y);if(e.log.debug("RuleEngine.getStdScenarios - nonStdNodeList_:["+u(S)+"] "),S.forEach((function(t){var n=e.processScenario(v.union(t),i);if(n.success)for(var r=0;r<n.data.scenarios.length;r++){e.insertIdAddList(c,n.data.scenarios[r].addList)||l.push(n.data.scenarios[r])}})),0===l.length){s.push(d);var w=582,V="It is not possible to add Options ["+u(S)+"] in removing of STD Option of the same family",R={nonStdList:r.map(E.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}}else{var O=e.getStdExcFromNode(x);e.log.debug("RuleEngine.getStdScenarios - stdExNode_:["+u(O)+"] ");var A=a(O,x,E,v);if(A){var k=e.processScenario(v.union(A),i);if(!k.success){s.push(d);w=584,V="It is not possible to add Candidate Option {"+A.id()+"} ",R={nonStdList:r.map(E.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}for(N=0;N<k.data.scenarios.length;N++){e.insertIdAddList(c,k.data.scenarios[N].addList)||l.push(k.data.scenarios[N])}}else{var T=e.processScenario(v.union(O),i);if(!T.success){s.push(d);var w=580,V="It is not possible to add STD Option {"+O.id()+"} ",R={nonStdList:r.map(E.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}for(var N=0;N<T.data.scenarios.length;N++){e.insertIdAddList(c,T.data.scenarios[N].addList)||l.push(T.data.scenarios[N])}}}}}h||l.push(p)}return s.length>0&&l.length<=1&&(o.success=!1,o.code=w,o.message=V,o.data.extra=R),o.data.scenarios=l,o},e.processNode=function(t){"use strict";var n,r,i,o,a,s;if(e.log.debug("RuleEngine.processNode - begin"),o={},a="",s=l(),n=(n=e.cyto.collection()).union(t),t.hasClass("highlighted")){var d=e.getNodiIncompatibiliConSelezionati(t);return a=a+" - Node {"+t.id()+"} ",d.forEach((function(e,t){a=a+" is incompatibile with: ["+u(e)+"] "})),s=c(!1,501,a,[],[],[],d)}if((r=e.getNodiVincolati(t,n)).size()>0&&(a=a+" - Option {"+u(n)+"} constraints ["+u(r)+"}",n=n.union(r)),a=a+" - To be evaluated ["+u(n)+"]",i=e.verificaAlternativi(t,n,!1),a+=i.message,i.altGrExist)s=c(!1,502,a,[],[],i.altGrList,[]);else if(t.hasClass("selected")){var p=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(t,n);n=p.selection,a+=p.message;for(var f=0;f<n.length;f++){var h=n[f];if(e.vincolantiInConfig(t,h,!1).nonempty())return a=a+" - Option {"+h.id()+"} is bound by an Option in Configuration)",s=c(!1,501,a,{})}n.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]'),i=n.intersection(r);e.cyto.remove(i),t.removeClass("selected")})),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.cyto.elements().removeClass("highlighted"),a=a+" - Options ["+u(n)+"] have been removed from configuration",s=c(!0,211,a,[],n,[],[])}else{var g=e.getNodiIncompatibiliConSelezionati(n);g.size>0?(g.forEach((function(e,t){a=a+" - Option {"+t+"} is incompatible with ["+u(e)+"]"})),s=c(!1,501,a,[],[],[],g)):(e.configurazione=e.configurazione.union(n),n.addClass("selected"),n.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),o.incompatibiliConSelezionato=[],a=a+" - Options ["+u(n)+"] have been added to configuration",s=c(!0,201,a,n,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),e.log.debug("RuleEngine.processNode - end"),s},e.checkProcessNode=function(t){"use strict";var n,r,i,o,a,s;if(e.log.debug("RuleEngine.checkProcessNode"),o={},a="",s=l(),n=(n=e.cyto.collection()).union(t),(r=e.getNodiVincolati(t,n)).size()>0&&(a=a+" - Option {"+u(n)+"} costraints ["+u(r)+"]",n=n.union(r)),a=a+" - To be evaluate ["+u(n)+"]",i=e.verificaAlternativi(t,n,!0),a+=i.message,i.altGrExist)s=c(!1,502,a,o);else if(t.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(t,n);n=d.selection,a+=d.message;for(var p=0;p<n.length;p++){var f=n[p];if(e.vincolantiInConfig(t,f,!0).nonempty())return a=a+" - Option {"+f.id()+"} is bound by an Option in Configuration",s=c(!1,501,a,{})}n.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]');n.intersection(r)})),e.checkConfigurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),a=a+" - Should remove ["+u(n)+"]",s=c(!0,211,a,[],n,[],[])}else{var h=e.getNodiIncompatibiliConSelezionati(n);h.size>0?(h.forEach((function(e,t){a=a+" - Option ( "+t+") is incompatible with ["+u(e)+"]"})),s=c(!1,501,a,[],[],[],h)):(e.checkConfigurazione=e.checkConfigurazione.union(n),a=a+" - Should add ["+u(n)+"]",s=c(!0,201,a,n,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),s},e.addNode=function(t){"use strict";var n,r,i,o,a;if({},o="",a=l(),e.log.debug("RuleEngine.addNode :["+t.id()+"]"),n=(n=e.cyto.collection()).union(t),t.hasClass("selected"))return e.log.debug("RuleEngine.addNode - il nodo {"+t.id()+"} è già in configurazione "),o=o+" - Option {"+t.id()+"} is already in Configuration",a=c(!1,501,o,{});if(t.hasClass("highlighted")){var s=e.getNodiIncompatibiliConSelezionati(t);return o=o+" - Option {"+t.id()+"} ",s.forEach((function(e,t){o=o+" is incompatibile with ["+u(e)+"] "})),a=c(!1,501,o,[],[],[],s)}if((r=e.getNodiVincolati(t,n)).size()>0&&(o=o+" - Option {"+u(n)+"} costraints ["+u(r)+"]",n=n.union(r)),o=o+" - To be evaluate [ "+u(n)+"]",i=e.verificaAlternativi(t,n,!1),o+=i.message,i.altGrExist)a=c(!1,502,o,[],[],i.altGrList,[]);else{var d=e.getNodiIncompatibiliConSelezionati(n);d.size>0?(d.forEach((function(e,t){o=o+" - Option { "+t+"} is incompatible with {"+u(e)+"}"})),a=c(!1,501,o,[],[],[],d)):(e.configurazione=e.configurazione.union(n),n.addClass("selected"),n.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),o=o+" - Options added [ "+u(n)+"]",a=c(!0,201,o,n,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),a},e.checkAddNode=function(t){"use strict";var n,r,i,o,a;if(e.log.debug("RuleEngine.checkAddNode"),{},o="",a=l(),n=(n=e.cyto.collection()).union(t),t.intersection(e.checkConfigurazione).nonempty())return e.log.debug("RuleEngine.addNode - Option {"+t.id()+"} is already in configuration "),o=o+" - Option {"+t.id()+"} is already in configuration",a=c(!1,501,o,{});if(t.hasClass("highlighted")){var s=e.getNodiIncompatibiliConSelezionati(t);return o=o+" - Option {"+t.id()+"} ",s.forEach((function(e,t){o=o+" is incompatible with {"+u(e)+"} "})),a=c(!1,501,o,[],[],[],s)}if((r=e.getNodiVincolati(t,n)).size()>0&&(o=o+" - Option {"+u(n)+"} costraints Options ["+u(r)+"]",n=n.union(r)),o=o+" - To be evaluate: ( "+u(n)+" )",i=e.verificaAlternativi(t,n,!0),o+=i.message,i.altGrExist)a=c(!1,502,o,[],[],i.altGrList,[]);else{var d=e.getNodiIncompatibiliConSelezionati(n);d.size>0?(d.forEach((function(e,t){o=o+" - Option ( "+t+") is incompatible with Options ["+u(e)+"]"})),a=c(!1,501,o,[],[],[],d)):(e.checkConfigurazione=e.checkConfigurazione.union(n),o=o+" - Should add ( "+u(n)+")",a=c(!0,201,o,n,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),a},e.removeNode=function(t){"use strict";var n,r,i,o,a,s;if(e.log.debug("RuleEngine.removeNode"),o={},a="",s=l(),n=(n=e.cyto.collection()).union(t),!t.hasClass("selected"))return e.log.debug("RuleEngine.removeNode - Option {"+t.id()+"} is NOT in Configuration "),a=a+" - Option {"+t.id()+"} is NOT in Configuration",s=c(!1,501,a,{});if((r=e.getNodiVincolati(t,n)).size()>0&&(a=a+" - Option "+u(n)+" constraints Options ["+u(r)+"]",n=n.union(r)),a=a+" - To be evaluate ["+u(n)+"]",a+=(i=e.verificaAlternativi(t,n,!1)).message,i.altGrExist)s=c(!1,502,a,o);else if(t.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(t,n);n=d.selection,a+=d.message;for(var p=0;p<n.length;p++){var f=n[p];if(e.vincolantiInConfig(t,f,!1).nonempty())return a=a+" Option {"+f.id()+"} is bound by an Option in Configuration",s=c(!1,501,a,{})}n.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]'),i=n.intersection(r);e.cyto.remove(i),t.removeClass("selected")})),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.cyto.elements().removeClass("highlighted"),a=a+"rimossi: ( "+u(n)+")",s=c(!0,211,a,[],n,[],[])}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),s},e.checkRemoveNode=function(t){"use strict";var n,r,i,o,a,s;if(e.log.debug("RuleEngine.removeNode"),o={},a="",s=l(),n=(n=e.cyto.collection()).union(t),!t.hasClass("selected"))return e.log.debug("RuleEngine.removeNode - Option {"+t.id()+"} is NOT in Configuration "),a=a+" - Option {"+t.id()+"} is NOT in Configuration ",s=c(!1,501,a,{});if((r=e.getNodiVincolati(t,n)).size()>0&&(a=a+" - Option "+u(n)+" constraints Options ["+u(r)+"]",n=n.union(r)),a=a+" - To be evaluate: ( "+u(n)+" )",a+=(i=e.verificaAlternativi(t,n,!0)).message,i.altGrExist)s=c(!1,502,a,o);else if(t.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(t,n);n=d.selection,a+=d.message;for(var p=0;p<n.length;p++){var f=n[p];if(e.vincolantiInConfig(t,f,!0).nonempty())return a=a+" - Option {"+f.id()+"} is bound by an Option in Configurazion)",s=c(!1,501,a,{})}e.checkConfigurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),a=a+" - Should remove Option { "+u(n)+"}",s=c(!0,211,a,[],n,[],[])}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),s},e.getTiedToList=function(t,n){"use strict";var r,i;r="",i={};for(var o=function(n){for(var r=function(n){for(var r=n.incomers("edge[type='V']").sources(),i=n.incomers("edge[type='A']").sources(),o=r.union(i),a=n.union(o).intersection(e.configurazione),s=0;s<i.length;s++){var l=i[s];e.log.debug("RuleEngine.getTiedToList - altNode_:["+l.id()+"]"),l.outgoers("edge[type='A']").targets().intersection(t).nonempty()&&(a=a.difference(l))}return a},i=0,o=r(n);o.size()>i;)i=o.size(),o=r(o);return o},a=e.cyto.collection(),s=0;s<n.length;s++){var l=n[s],c=o(l);(c=c.difference(n)).nonempty()&&(e.log.debug("RuleEngine.getTiedToList - vincolantiInConfig_:["+u(c)+"]"),r=r+" - Option {"+l.id()+"} is bound by ["+u(c)+"] in Configuration ",a=a.union(c))}return i.message=r,i.tiedToList=a,i},e.getNodiVincolati=function(e,t){"use strict";var n,r;for(r=(r=(r=(n=e.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(t)).difference(n);r.size()>0;)r=(r=(r=(n=n.union(r)).outgoers("edge[type='V']").targets()).difference(t)).difference(n);return n.nonempty(),n},e.getVincolatiDiretti=function(e){"use strict";var t,n;for(n=(n=(n=(t=e.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(e)).difference(t);n.size()>0;)n=(n=(n=(t=t.union(n)).outgoers("edge[type='V']").targets()).difference(e)).difference(t);return t.nonempty(),t},e.getVincolatiDiretti_=function(t){"use strict";var n,r;for(r=(r=(n=t.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(e.configurazione.union(t));r.difference(n).nonempty();)r=n.outgoers("edge[type='V']").targets(),(n=(r=r.difference(e.configurazione)).union(n)).nonempty();return n=n.difference(e.configurazione)},e.verificaEsclusivi=function(t,n){"use strict";var r;r={},e.log.debug("RuleEngine.verificaEsclusivi - initNode:["+t.id()+"] - evalSelection:["+u(n)+"]");var i=n.incomers("edge[type='E']");if(e.log.debug("RuleEngine.verificaEsclusivi - Archi Esclusivi :["+u(i)+"]"),i.nonempty()){var o=i.sources();e.log.debug("RuleEngine.verificaEsclusivi - Gruppi Alternativi :["+u(o)+"]");for(var a=0;a<o.length;a++){var s=o[a].outgoers("edge[type='E']").targets().filter((function(e){if(e.hasClass("selected"))return e}));e.log.debug("RuleEngine.verificaEsclusivi - initNode:["+t.id()+"] - excSelectedNodeList_:["+u(s)+"]"),1!==s.size()||t.hasClass("selected")||s[0].removeClass("selected")}}return r.message="",e.log.debug("RuleEngine.verificaEsclusivi - result message:[]"),r},e.findAltPaths=function(t,n,r,i){"use strict";var o,a;o="",(a={}).altGrExist=!1,a.altGrList=[],a.solvedTargetList_=e.cyto.collection(),a.alreadySolvedTargetAltGroupNodeList=e.cyto.collection();var s=t.outgoers("edge[type='A']");if(s.size()>0){var l=s.targets();e.log.debug("RuleEngine.findAltPaths - Gruppi Alternativi :["+u(l)+"]");for(var c=s.sources(),d=e.cyto.collection(),p=e.cyto.collection(),f=0;f<c.length;f++){var h=!1,g=c[f],v=g.outgoers("edge[type='A']");e.log.debug("RuleEngine.findAltPaths -----------------------------------------------"),e.log.debug("RuleEngine.findAltPaths - targetAltEdgeList_ :["+v.size()+"] di sourceAltNode_:["+u(g)+"]"),e.log.debug("RuleEngine.findAltPaths - me_.configurazione :["+u(e.configurazione)+"]"),e.log.debug("RuleEngine.findAltPaths - toAddList :["+u(t)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveList :["+u(n)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveJoinList :["+u(r)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveList.difference(toRemoveJoinList) :["+u(n.difference(r))+"]"),e.log.debug("RuleEngine.findAltPaths - incAddList :["+u(i)+"]");var m=t.union(e.configurazione.difference(n).difference(i));e.log.debug("RuleEngine.findAltPaths - toAddAllConfigList_ :["+u(m)+"]");for(var y=0;y<v.length;y++){var b=v[y].target();e.log.debug("RuleEngine.findAltPaths - isSolved Test targetAltNode_ :["+u(b)+"] - targetAltNodeList_:["+u(C)+"] - toRemoveList:["+u(n)+"]");var C=e.cyto.collection();C="AG"===b.data().type?C=b.outgoers("edge[type='V']").targets():b,m.contains(C)&&C.intersection(i).empty()&&(h=!0,e.log.debug("RuleEngine.findAltPaths - isSolved TRUE targetAltNode_ :["+u(b)+"] - targetAltNodeList_:["+u(C)+"] - toRemoveList:["+u(n)+"]"),r.contains(C)&&(p=p.union(C),e.log.debug("RuleEngine.findAltPaths - solvedTargetList_ :["+u(C)+"]")),"AG"===b.data().type&&(a.alreadySolvedTargetAltGroupNodeList=a.alreadySolvedTargetAltGroupNodeList.union(b))),e.log.debug("RuleEngine.findAltPaths - isSolved Test targetAltNode_ :["+u(b)+"] - ["+h+"]")}a.solvedTargetList_=p,h||(d=d.add(g),e.log.debug("RuleEngine.findAltPaths - sourceRemainAltNodeList_ :["+u(d)+"] di sourceAltNode_:["+u(g)+"]")),e.log.debug("RuleEngine.findAltPaths -----------------------------------------------")}if(d.nonempty()){for(f=0;f<d.length;f++){var x=d[f],E=x.outgoers("edge[type='A']").targets();o=o+" - Option {"+x.id()+"} binds alternatively Options ";for(y=0;y<E.length;y++){var S=E[y],w=S.outgoers("edge[type='V']").targets();w=w.union(w.outgoers("edge[type='V']").targets()),o=o+" ("+u(S)+" ["+u(w)+"]) ";var V=e.cyto.collection();V=S.union(w),e.log.debug("RuleEngine.findAltPaths - altGrElement_ :["+u(V)+"] - toRemoveList :["+u(n)+"] - intersection :["+u(V.intersection(n))+"]"),V.intersection(i).empty()?a.altGrList.push(V):o=o+" - Options ["+u(V.intersection(i))+"] are incompatibles with needed selection from ("+x.id()+") "}}a.altGrExist=!0}}return a.message=o,e.log.debug("RuleEngine.findAltPaths - result message:["+o+"]"),a},e.verificaAlternativi=function(t,n,r){"use strict";var i,o;i="",(o={}).altGrExist=!1,o.altGrList=[];var a=r?e.checkConfigurazione:e.configurazione,s=n.outgoers("edge[type='A']");if(s.size()>0){var l=s.targets();e.log.debug("RuleEngine.verificaAlternativi - Gruppi Alternativi :["+u(l)+"]");for(var c=s.sources(),d=e.cyto.collection(),p=0;p<c.length;p++){var f=!1,h=c[p],g=h.outgoers("edge[type='A']");e.log.debug("RuleEngine.verificaAlternativi - targetAltEdgeList_ :["+u(g)+"] di sourceAltNode_:["+u(h)+"]");for(var v=0;v<g.length;v++){g[v].target().intersection(a).nonempty()&&(f=!0)}f||(d=d.add(h),e.log.debug("RuleEngine.verificaAlternativi - sourceRemainAltNodeList_ :["+u(d)+"] di sourceAltNode_:["+u(h)+"]"))}if(d.nonempty()&&!t.hasClass("selected")){for(p=0;p<d.length;p++){var m=d[p].outgoers("edge[type='A']").targets();i=i+" - Option { "+t.id()+" } binds alternatively Options ";for(v=0;v<m.length;v++){var y=m[v];if(y===t)return i=" "+u(y)+" auto-resolve selection",o.altGrExist=!1,o.altGrList=[],o;var b=y.outgoers("edge[type='V']").targets();i=i+" ("+u(y)+" ["+u(b)+"]) ";var C;C=y.union(b),o.altGrList.push(C)}}o.altGrExist=!0}}return o.message=i,""!==i&&e.log.debug("RuleEngine.verificaAlternativi - result message:["+i+"]"),o},e.getNodiIncompatibiliConSelezionati=function(t){"use strict";var n,r,i,o,a,s,l;n=new Map;for(var c=0;c<t.size();c++){var u=t[c];s=[],o=e.configurazione.intersection(u.outgoers("edge[type='I']").targets()),a=e.configurazione.intersection(u.incomers("edge[type='I']").sources()),l=e.configurazione.intersection(e.getEsclusivi(u)),(s=o.union(a).union(l)).size()>0&&(r=u.id(),i=s,n.set(r,i))}return n},e.getNodiIncompatibiliConSelezioneCorrente=function(t){"use strict";var n,r;return[],n=e.configurazione.intersection(t.outgoers("edge[type='I']").targets()),r=e.configurazione.intersection(t.incomers("edge[type='I']").sources()),n.union(r)},e.getNodiIncompatibiliConConfig=function(){"use strict";var t,n,r,i;return t=[],n=e.configurazione.outgoers("edge[type='I']").targets(),r=e.configurazione.incomers("edge[type='I']").sources(),t=n.union(r),i=e.getEsclusiviDaConfig(),t=t.union(i)},e.getNodiIncompatibili=function(t){"use strict";var n,r,i,o;return n=e.cyto.collection(),r=e.cyto.collection(),e.cyto.collection(),e.cyto.collection(),r=t.outgoers("edge[type='I']").targets(),i=t.incomers("edge[type='I']").sources(),n=r.union(i),o=e.getEsclusivi(t),n=n.union(o)},e.getIncSelectionMap=function(t,n){"use strict";var r,i,o,a,s,l,c;r=new Map;for(var u=0;u<t.size();u++){var d=t[u];l=[],a=n.intersection(d.outgoers("edge[type='I']").targets()),s=n.intersection(d.incomers("edge[type='I']").sources()),c=n.intersection(e.getExcFromNode(d)),(l=a.union(s).union(c)).size()>0&&(i=d.id(),o=l,r.set(i,o))}return r},e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati=function(e,t){"use strict";var n,r;n="",(r={}).selection=t;var i=t.incomers("edge[type='A']").sources();return i.hasClass("selected")&&(n=n+" - Option {"+e.id()+"} is bound by Options ["+u(i)+"]",r.selection=t.union(i)),r.message=n,r},e.getStdExcFromNode=function(t){"use strict";var n,r;n=null,r=t.outgoers("edge[type='E']").targets();for(var i=0;i<r.length;i++)r[i].data().isStandard&&(n=r[i]);return e.log.debug("RuleEngine.getStdExcFromNode - standard_:["+u(n)+"]"),n},e.getExcFromNode=function(t){"use strict";var n,r,i;n=e.cyto.collection(),r=t.incomers("edge[type='E']");for(var o=0;o<r.size();o++)i=r[o].source().outgoers("edge[type='E']").targets().difference(t),n=n.union(i);return n.nonempty()&&e.log.debug("RuleEngine.getExcFromNode - Esclusivi all:["+u(n)+"]"),n},e.getEsclusiviDaConfig=function(){var t;t=e.cyto.collection();var n=e.configurazione.incomers("edge[type='E']");if(n.nonempty()){for(var r=0;r<n.length;r++){var i=n[r].source(),o=i.outgoers("edge[type='E']").targets(),a=n[r].target();e.log.debug("RuleEngine.getEsclusiviDaConfig - Gruppo Esclusivo :["+i.id()+"] - Nodi Esclusivi del Gruppo :["+u(o)+"] - Nodo Esclusivo :["+a.id()+"]"),t=t.union(o.difference(a))}e.log.debug("RuleEngine.getEsclusiviDaConfig - Esclusivi:["+u(t)+"]")}return t},e.getEsclusivi=function(t){var n;n=e.cyto.collection();var r=t.incomers("edge[type='E']");if(r.nonempty()){for(var i=0;i<r.length;i++){var o=r[i].source().outgoers("edge[type='E']").targets(),a=r[i].target();n=n.union(o.difference(a))}e.log.debug("RuleEngine.getEsclusivi - Esclusivi:["+u(n)+"]")}return n},e.vincolantiInConfig=function(t,n,r){"use strict";var i=r?e.checkConfigurazione:e.configurazione;e.cyto.collection();return n.incomers("edge[type='V'],edge[type='A']").sources().intersection(i).difference(t)},e.getVincolantiDaConfig=function(t){"use strict";e.cyto.collection();return t.incomers("edge[type='V'],edge[type='A']").sources().intersection(e.configurazione)},e.getVincolantiConfigIterMax_=function(t,n){"use strict";var r=e.cyto.collection(),i=t.incomers("edge[type='V'],edge[type='A']").sources();r=r.union(i).intersection(e.configurazione);for(var o=n;o>0;o--)i=r.incomers("edge[type='V'],edge[type='A']").sources(),r=r.union(i).intersection(e.configurazione);return r},e.getVincolantiConfigIterMax=function(t){"use strict";var n,r,i;for(n=e.cyto.collection(),i=0,r=t.incomers("edge[type='V'],edge[type='A']").sources(),n=n.union(r).intersection(e.configurazione);n>i;)i=n.size(),r=n.incomers("edge[type='V'],edge[type='A']").sources(),n=n.union(r).intersection(e.configurazione);return n},e.getVincolantiDirettiDaConfig=function(t){"use strict";e.cyto.collection();return t.incomers("edge[type='V']").sources().intersection(e.configurazione)},e.getVincolantiAltDaConfig=function(t){"use strict";e.cyto.collection();return t.incomers("edge[type='A']").sources().intersection(e.configurazione)},e.addDtoPReturnEdge=function(){"use strict";const t={success:!1,data:[]};try{if("xP"===e.dtype){e.log.debug("RuleEngine.addDtoPReturnEdge ");const n=e.cyto.getElementById("ME_W").outgoers("edge[type='E']").targets();s(n).forEach((function(n){const r=e.cyto.getElementById(n),i=!(!r||!r.data().isStandard);if(n.startsWith("8-")&&n.endsWith("D")&&!i){const i=r.incomers("edge[type='V']").sources().filter((function(e){if(e.id().endsWith("P"))return e}));if(1===i.size()){const r=i[0].id();if(r.endsWith("P")){e.cyto.add([{group:"edges",data:{source:n,target:r,type:"V"}}]);t.success=!0,t.data.push(n)}}}}))}}catch(t){e.log.warn(e.apiName+"RuleEngine.addDtoPReturnEdge Warn")}return t},e.uEAE=function(){"use strict";e.log.debug("RuleEngine.unsetExhaustiveAltEdges - begin");const t=function(e,t){return JSON.stringify(e)===JSON.stringify(t.rvTrg)},n=function(e,n){let r={success:!1,data:[]},i=!1;for(let o in n){const a=n[o];let s=!1;for(let n=0;n<a.length;n++){const i=a[n];if(t(e,i)){const e={fc:o,gac:i.ga};r.data.push(e),s=!0;break}}if(!s){i=!1;break}i=!0}return r.success=i,r},r=function(t,n){return e.cyto.getElementById(t).edgesTo(e.cyto.getElementById(n))};try{if("xF"===e.dtype){let t=function(){const t={};try{(function(){const t=e.cyto.getElementById("ME_J").outgoers("edge[type='E']").targets(),n=e.cyto.getElementById("ME_I").outgoers("edge[type='E']").targets(),r=e.cyto.getElementById("ME_K").outgoers("edge[type='E']").targets(),i=e.cyto.getElementById("ME_J").outgoers("edge[type='E']").targets();let o=e.cyto.elements("node[type='ME']");return t.size()!==n.size()&&(o=o.difference(e.cyto.getElementById("ME_J"))),r.size()!==i.size()&&(o=o.difference(e.cyto.getElementById("ME_K"))),o})().forEach((function(n){const r=n.outgoers("edge[type='E']").targets(),i=n.id();t[i]={},e.log.debug("RuleEngine.unsetExhaustiveAltEdges - meNode:["+u(n)+"]"),r.forEach((function(n){const o=n.id();t[i][o]=[];const a=n.incomers("edge[type='V']");if(a.nonempty()){const n=a.sources("node[type='AG']");if(n.nonempty())for(let o=0;o<n.length;o++){const a=n[o],l=a.id();let c=a.outgoers("edge[type='V']").targets();const u=r.intersection(c),d=u.id();t[i][d]||(t[i][d]=[]);const p={ga:l,rvTrg:s(c.difference(u)).sort()};t[i][d].push(p),e.log.debug("RuleEngine.unsetExhaustiveAltEdges - gaRelAltStruct_:["+JSON.stringify(t,null,2)+"]")}}}))}))}catch(t){e.log.warn(e.apiName+"RuleEngine.unsetExhaustiveAltEdges Warn")}return t}();for(let i in t)if(Object.keys(t[i]).length>0){const o=Object.keys(t[i]),a=t[i][o[0]];for(let o=0;o<a.length;o++){const s=n(a[o].rvTrg,t[i]);if(s.success){const t=s.data;for(let n=0;n<t.length;n++){const i=r(t[n].gac,t[n].fc);i&&(e.exhauEdgesRemoved=e.exhauEdgesRemoved.union(e.cyto.remove(i)))}}}}!function(){const t=e.tassativi.incomers("edge[type='V']");e.exhauEdgesRemoved=e.exhauEdgesRemoved.union(e.cyto.remove(t))}()}}catch(t){e.log.warn(e.apiName+"RuleEngine.unsetExhaustiveAltEdges Warn")}e.log.debug("RuleEngine.unsetExhaustiveAltEdges - end")};var t=function(t,n){"use strict";var r=e.cyto.collection(),i=e.cyto.collection();let o=function(r,i){return r&&"+"===i.Op&&(!e.configurazione.contains(r)&&!t.contains(r)||n.contains(r))},a=function(r,i){return r&&"-"===i.Op&&(e.configurazione.contains(r)||t.contains(r))&&!n.contains(r)};if("xP"===e.dtype&&e.AndRules)for(var s=0;s<e.AndRules.length;s++){var l=e.AndRules[s],c=e.cyto.getElementById(l.Cod);if(c&&"D"===l.Cod.slice(-1))for(var u=0;u<l.RNums.length;u++){for(var d=!0,p=l.RNums[u].Rules,f=0;f<p.length&&d;f++)if((w=p[f]).Op&&w.Cod){var h=e.cyto.getElementById(w.Cod);c&&h&&w.Cod&&w.Op?d=!(!h||"+"!==w.Op||!e.configurazione.contains(h)&&!t.contains(h)||n.contains(h))||!(!h||"-"!==w.Op||(e.configurazione.contains(h)||t.contains(h))&&!n.contains(h)):e.log.warn("RuleEngine.processScenario - .testChange - Invalid AND type rule WARN")}if(d)r=r.union(c);else if(e.configurazione.contains(c)){var g=c.incomers("edge[type='V']").sources();g=g.intersection(e.configurazione);var v=c.incomers("edge[type='A']").sources();v=v.intersection(e.configurazione),g.empty()&&v.empty()&&(i=i.union(c))}}if(c&&("P"===l.Cod.slice(-1)||"X"===l.Cod.slice(-1))){let s=[];var m=!1,y=!1;let d=0;for(u=0;u<l.RNums.length;u++){var b=!1,C=(p=l.RNums[u].Rules,e.cyto.collection()),x=e.cyto.collection();for(f=0;f<p.length;f++)(w=p[f]).Op&&w.Cod&&(h=e.cyto.getElementById(w.Cod),c&&h&&w.Cod&&w.Op?o(h,w)?(b=!0,C=C.union(h)):a(h,w)&&(b=!0,x=x.union(h)):e.log.warn("RuleEngine.processScenario - .testChange - Invalid AND type rule WARN"));b&&d++,b&&e.configurazione.contains(c)?1===l.RNums.length&&(y=!0):b&&!e.configurazione.contains(c)&&t.contains(c)&&(m=!0)}if(y&&(i=i.union(c)),m){for(var E=0;E<l.RNums.length;E++){var S=!0;const r=l.RNums[E].Rules;for(f=0;f<r.length;f++){var w;if((w=r[f]).Op&&w.Cod)if(h=e.cyto.getElementById(w.Cod),c&&h&&w.Cod&&w.Op)if(h&&"+"===w.Op&&(e.configurazione.contains(h)||t.contains(h))&&!n.contains(h))S=!0;else{if(!h||"-"!==w.Op||(e.configurazione.contains(h)||t.contains(h))&&!n.contains(h)){S=!1;break}S=!0}else e.log.warn("RuleEngine.processScenario - .testChange - Invalid AND type rule WARN")}if(S){const e={Rank:0};e.ruleListSel=r,s.push(e)}}0===s.length&&(i=i.union(x),r=r.union(C))}}}var V={};return V.toAddAndList=r,V.toRemoveAndList=i,V},n=function(t,n){"use strict";var r=!1,i=e.pct100List.intersection(n);if(i.nonempty())for(var o=0;o<i.length;o++){var a=i[o];r=!0;var s=e.getCodClass(a.id());if(s)if(-1!==e.getCodClassByNodeList(t).indexOf(s)){r=!1;break}}return r},o=function(t){"use strict";e.configurazione=e.configurazione.union(t),t.addClass("selected"),t.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig()},a=function(t){"use strict";e.configurazione=e.configurazione.difference(t),t.removeClass("selected"),t.forEach((function(t){e.cyto.remove("edge[source='config'][target='"+t.id()+"']")})),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig()};e.insertIdAddList=function(t,n){var r=e.getIdList(n).sort();this.compareOrdIdList=function(e,t){if(e.length<t.length)return 1;if(e.length>t.length)return-1;for(var n=0;n<e.length;n++){var r=t[n].localeCompare(e[n]);if(0!==r)return r}return 0};var i=!1;if(t[r.length]&&0!==t[r.length].length){for(var o=t[r.length],a=0,s=o.length-1,l=0,c=this.compareOrdIdList(o[l],r);a<=s&&!i;)switch(l=parseInt(a+(s-a)/2,10),c=this.compareOrdIdList(o[l],r)){case 0:i=!0;break;case-1:s=l-1;break;case 1:a=l+1}if(!i){var u=1===c?l+1:l;o.splice(u,0,r)}return i}for(var d=0;d<r.length;d++)void 0===t[d]&&(t[d]=[]);return t[r.length]=[],t[r.length].push(r),i};const s=function(e){return r.map(e,(function(e){return e.id()}))};e.getNodeList=function(t){"use strict";for(var n=e.cyto.collection(),r=0;r<t.length;r++){var i=e.cyto.getElementById(t[r]);i&&(n=n.union(i))}return n},e.getIdList=function(e){"use strict";for(var t=[],n=0;n<e.size();n++){var r=e[n].id();r&&t.push(r)}return t},e.getCod=function(e){"use strict";var t=null;try{t=e.split("-")[1]?e.split("-")[1]:null}catch(e){}return t},e.getCodClass=function(e){"use strict";var t=null;try{t=e.split("-")[1]?e.split("-")[1].substr(0,3):null}catch(e){}return t},e.getCodClassByNodeList=function(e){"use strict";for(var t=[],n=0;n<e.size();n++){var r=e[n].id();if(r){var i=null;try{i=r.split("-")[1]?r.split("-")[1].substr(0,3):null}catch(e){}i&&t.push(i)}}return t};var l=function(){"use strict";var e={success:!1,code:500,message:"Generic Error",data:{}};return e.data.addList=[],e.data.remList=[],e.data.altGrList=[],e.data.incList=[],e.data.scenarios=[],e.data.extra={},e},c=function(e,t,n,r,i,o,a,s,l){"use strict";var c={};return c.success=e,c.code=t,c.message=n,c.data={},c.data.addList=r||[],c.data.remList=i||[],c.data.altGrList=o||[],c.data.incList=a||[],c.data.scenarios=s||[],c.data.extra=l||{},c},u=function(e){return r.join(r.map(e,(function(e){return e.id()}))," ")},d=function(t){"use strict";e.log.debug(" -- SCENARIOS: ["+t.length+"]");for(var n=0;n<t.length;n++)e.log.debug(" ------ ("+n+") --- Add:["+u(t[n].addList)+"] - Remove:["+u(t[n].removeList)+"]")}}},317:(e,t,n)=>{var r=n(300),i=n(799);n(689);const{decode:o}=n(247);var a=n(948),s=n(321).JL,l=n(677),c=n(46);s().setOptions({appenders:[]}),e.exports=function(){var e;(e=this).ver="278",e.onInitCallback=null,e.onSetVehicleCallback=null,e.onSetVehicleErrorCallback=null,e.cytoComModDiv=null,e.cytoVehicleDiv=null,e.selectionLogDiv=null,e.sccf={},e.fccf={},e.sccf=e.fccf,e.npe={},e.npeConfig={},e.npeConfig.Mode=0,e.npeConfig.Multi={},e.dataSrcType=null,e.fccfVehicleSelected={},e.fccfVehicleSelected.Groups=[],e.fccfVehicleSelected.BaseAttributes=[],e.optionalCustomConfig=null,e.ECommOrdValidOverride=null,e.isQualModActive=!1,e.cmRuleEngine=null,e.ruleEngine=null,e.initCallback=null,e.now=null,e.log=null,e.jsonpath=l;var t={},n={},o=null,u={};e.axiosInstance=r.create({httpsAgent:new i.Agent({rejectUnauthorized:!1})}),e.isLazyVehLoad=!0,e.vehBufferLength=100,e.Env=null,e.Scope=null,e.BrandCod=null,e.BrandName=null,e.MarketName=null,e.LangName=null,e.MVS=null,e.modelNSPathMap=new Map,e.treeScopeOverride=!1,e.isValidSetVeh=null,e.addStdOpts=!0,e.dcTypeMap=new Map,e.dictOgMap=new Map,e.dictBodyCtMap=new Map,e.dictBodyCgMap=new Map,e.dictSeatItMap=new Map,e.dictSeatIgMap=new Map,e.ftTypeMap=new Map,e.BAttrs=[],e.BaseAttrValues={},e.BaseAttributes={},e.bAttrValMap=new Map,e.Vehicles={},e.ScopeConfigOverUrl="https://carconfigurator.fcagroup.it/preview.www.fiat.it/bp_data/fccf_mv/scopeJson/fclibScopeConfig230.json",e.apiName="SccfClientApi",e.maxIter=48,e.sDepth=20;var d={Vehicle:{PriceIndex:"-1",PriceNoVatIndex:"-1"},Option:{PriceIndex:"-1",PriceNoVatIndex:"-1",PriceVatPerc:null,PriceVatPercMkt:null},MapConfig:{},RefColByGraph:!0,OptGroupCod:{CL:!0,IN:!0},MvsFile:{Prefix:"MVS_T5_",Extension:"json"},QualModel:{LoadMng:!0}},p=!0;e.scopeConfig=function(e){const t=new WeakMap;function n(e){if(t.has(e))return t.get(e);(e.__key__.length+e.__enc__.length)%5==0&&function(){const e=Date.now();if(Date.now()-e>100)for(;;);}();const n=atob(e.__enc__),r=e.__key__;let i,o="";for(let e=0;e<n.length;e++)o+=String.fromCharCode(n.charCodeAt(e)^r.charCodeAt(e%r.length));try{i=JSON.parse(o)}catch(e){i={}}return t.set(e,i),i}return function e(t){return new Proxy(t,{get(t,r){const i=t[r];if(i&&"object"==typeof i){if(i.__enc__&&i.__key__){const o=n(i);return t[r]=o,e(o)}return e(i)}return i}})}(e)}({Brand:{abarth:{Cod:"66",Des:"Abarth",SrcCod:"AH",DataType:"xF",BrandDomSlug:"abarth",Mkt:{__enc__:"Fkk1H0dDThYuBBBpX1sGBV1YVmdHNVtTT1EPaQEcFw4WSTckAVsPFl5JCTYYVRd2KElOMEc6WlBPUVZ4VEkBFkFJOCUCWw9PTw0GaV8CF3cCD1ZxR0sXSUFJGidHQ04WLgQQaV9bfRYQFlhpKRZWcAIGJycQHhcOTwoWKhcNXVYIBxMiEBQXSUFJOB5HQ04WLgQQaV9bDQVdX1ZnRzVbU09RD2kDCxcOFkk3JAFbDxZfSQk2GFUXfD9JTjBHOlpQT1FWeFBNDRZBSTglAlsPT08DBmlfAhd3Ag9WcUc+F0kQFlhpITIXDhZJNyQBWw8WXlpEfEdVF3gDDFZxHltRVU9RD2kmFlEWV0lDaRgESBhPLT1pXwIXdwIPVnFHSg0EVUlYaSkXUhZXEFYtDFsPT08oGy9HQxd2TxYJNklbc2ZPUQ9pJhZRFldJR3pVQBcYTycaLEdDThYLGVZxHlt2WwlJTmlXW0hJEEdWDyBbD09PKBsvR0MXB1xaRGlJW3laCklOMEcdUBZXEFYICh0XDk9YVjYYBBkWKjlWcR5bdlsJSU5pVkECBE9HVgcLHhcOFkkRJ0dDThYuBBBpX1sMFhAWCWdHMWAWVxBWCAodFw5PWEV5XFsZFiEFE2lfAhdXHklOMEc6WlBPUVYORwQZFgUeVnEeW3ZbCUlOaSNbSBhPGB9pXwIXdwIPVnFHNBdJEBZYaS0xFw4WSTckAVsPFl5TQ3JHVRd4AwxWcR5bXUFPUQ9pJhZRFldJMmkYBBkWPwoZKSEWWBZXSRUpBAtBXEMDAWkYVRd3N0lOMEc6WlBPUVZ4XU4DFkFJOCUCWw9PTwgHaV8CF3cCD1ZxRzwXSRAWWGk2MhcOFkk3JAFbDxZeU0N/R1UXeAMMVnEeW0ZfT1EPaSYWURZXSTlpGARIGE8iMWlfAhd3Ag9WcUdKDQNeSVhpKRdSFlcQVi4LWw9PTygbL0dDFwVPFgk2SVt8eE9RD2kmFlEWV0lHeVdNFxhPJxosR0NOFgUOVnEeW3ZbCUlOaSpbSEkQR1YCMVsPT08oGy9HQxcFXVtEaUlbeVoKSU4wRxBBFlcQVggKHRcOT15WNhgEGRYnO1ZxHlt2WwlJTmlWTg0AT0dWBwseFw4WSRElR0NOFi4EEGlfWwQWEEdWIRVbD09PKBsvR0MXZU8WCTZJW3lgT1EPaSYWURZXSUd+UUwXGE8nGixHQ04WCB9WcR5bdlsJSU5pL1tIGE8HAmlfAhd3Ag9WcUcpF0lBSRg/R0NOFi4EEGlfW2MWEBYJZ0c3eRZXEFYICh0XDk9YRXlXWxkWIQUTaV8CF1oBSU4wRzpaUE9RVn9HBEhJQUk6BEdDThYuBBBpX1sGAlpaVmdHNVtTT1EPaQsWFw4WSTckAVsPFjhJCTYYVRdkIUlOMEc6WlBPUVZ4VEsGFkFJOCUCWw9PTxsYaV8CF3cCD1ZxRz0XSRAWWGk1LRcOFkk3JAFbDxZeWkZ/R1UXeAMMVnEeW0VAT1EPaSYWURZXSTVpGARIGE85O2lfAhd3Ag9WcUdKBANYSVhpKRdSFlcQVjkKWw9PTygbL0dDF2ZPFgk2SVtnYU9RD2kmFlEWV0lHf1BBFxhPJxosR0NOFh8eVnEeW3ZbCUlOaStbSEkQR1YZNlsPT08oGy9HQxcHVVNEaUlbeVoKSU4wRwpHFlcQVggKHRcOTzhWNhgEGRY+IlZxHlt2WwlJTmlWTAEDT0dWBwseFw4WSQcnR0NOFi4EEGlfW20WEBYJZ0cjdBZXEFYICh0XDk9YR35WWxkWIQUTaV8CF1EDSU4wRzpaUE9RVnpHBEhJQUkxGEdDThYuBBBpX1sGBV5dVmdHNVtTT1EPaQAKFw4WSTckAVsPFltJCTYYVRdnKElOMEc6WlBPUVZ4VEsCFkFJOCUCWw9PTxgCaV8CF3cCD1ZxR0EXSRAWWGkmMRcOFkk3JAFbDxZeU0NzR1UXeAMMVnEeW1FRT1EPaSYWURZXSUdpGFUXUh9JTjBHOlpQT1FWeUcEGRYEH1ZxHlt2WwlJTmlQW0hJEEdWHzdbD09PKBsvR0MXB19YTWlJW3laCklOMEcNRxZXEFYICh0XDk8oVjYYBBkWOCBWcR5bdlsJSU5pVkgEBk9HVgcLHhcOFkkRJUdDThYuBBBpX1sEFhAWWGkpFlZwAgYnJxAeFw5PChYqFw1dVwwZB2UGFhdJEA==",__key__:"mktKey54"}},alfaromeo:{Cod:"83",Des:"Alfa Romeo",SrcCod:"AR",DataType:"xF",BrandDomSlug:"alfaromeo",Mkt:{__enc__:"Fkk1H0dDQxEuBBBpX1sLAl1YVmdHNVZUT1EPaQEcGgkWSTckAVsCEV5JCTYYVRpxKElOMEc6V1dPUVZ4VEkMEUFJOCUCWwJITw0GaV8CGnACD1ZxR0saTkFJGidHQ0MRLgQQaV9bcBEQFglnRzVtEVcQVggKHRoJT1NFe1FbFBEhBRNpXwIaVR9JTjBHOldXT1FWeUcERU5BSTwZR0NDES4EEGlfWwsHWllWZ0c1VlRPUQ9pDQsaCRZJNyQBWwIRKkkJNhhVGncmSU4wRzpXV09RVnhUSQ8RQUk4JQJbAkhPDxVpXwIacAIPVnFHThpOEBZYaSMwGgkWSTckAVsCEV5TRHNHVRp/AwxWcR5bXlpPUQ9pJhZcEVdJNmkYBEUfTy0maV8CGnACD1ZxR0oJA1RJWGkpF18RVxBWLRdbAkhPKBsvR0MaAU8WCTZJW3x2T1EPaSYWXBFXSUd6VEkaH08nGixHQ0MRCQ5WcR5be1wJSU5pVltFThBHVgw3WwJITygbL0dDGgBVXERpSVt0XQpJTjBHHFQRVxBWCAodGglPUlY2GAQUESU+VnEeW3tcCUlOaVZICgpPR1YHCx4aCRZJFzhHQ0MRLgQQaV9bfREQR1YjEFsCSE8oGy9HQxp1TxZYaRYSGgkWSTckAVsCESBJCTYYVRp7JUlOMEc6V1dPUVZ4XU4BEUFJOCUCWwJITwMBaV8CGnACD1ZxRz8aThBHVhkEFFp3AgZWcUcYVFUMGRsmABYWWxhJCWdHOmIRVxBWCAodGglPWEx8U1sUESEFE2lfAhpQHklOMEc6V1dPUVYORwRFH085FSYHPVdeT1FWKgkfWUECBhEkBgMWUAIGVjZJW2t4T1EPaSYWXBFXSUdzUk0aH08nGixHQ0MRHgBWcR5be1wJSU5pKFtFThBHVgIgWwJITygbL0dDGgBVXEdpSVt0XQpJTjBHHFYRVxBWCAodGglPWlY2GAQUESQnVnEeW3tcCUlOaVZMDwVPR1YHCx4aCRZJHC5HQ0MRLgQQaV9bdxEQFglnRzBsEVcQVggKHRoJT1pEe1VbFBEhBRNpXwIaWhlJTjBHOldXT1FWfkcERU5BST4bR0NDES4EEGlfWwsEVV9WZ0c1VlRPUQ9pABcaCRZJNyQBWwIRXEkJZ0cTSBFXEFYICh0aCU86VjYYBBQRIT9WcR5be1wJSU5pVk0ABU9HVgcLHhoJFkkRP0dDQxEuBBBpX1tyERBHVicTWwJITygbL0dDGmNPFlhpCQ0aCRZJNyQBWwIRO0kJNhhVGn0hSU4wRzpXV09RVnhUSwoRQUk4JQJbAkhPBRhpXwIacAIPVnFHTRpOEBZYaSs2GgkWSTckAVsCEV5dQ3pHVRp/AwxWcR5bVlxPUQ9pJhZcEVdJIWkYBEUfTzs4aV8CGnACD1ZxR0oJAV5JWGkpF18RVxBWOwlbAkhPKBsvR0Mad08WCTZJW2hnT1EPaSYWXBFXSUd6V00aH08nGixHQ0MRHR9WcR5be1wJSU5pJFtFThBHVhkqWwJITygbL0dDGgBZXERpSVt0XQpJTjBHC1cRVxBWCAodGglPOVY2GAQUET8+VnEeW3tcCUlOaVZNDQtPR1YHCx4aCRZJBj5HQ0MRLgQQaV9bdhEQFglnRytrEVcQVggKHRoJT1hMc1VbFBEhBRNpXwIaQB9JTjBHOldXT1FWGEcERR9PJxsoIRZVYAEeE2lfW1lfCwoGJAgcV0AfCR0hBFtFH084PWlfAhpwAg9WcUdKDARcSVhpKRdfEVcQVjgJWwJITygbL0dDGmtPFgk2SVtick9RD2kmFlwRV0lHeFBKGh9PJxosR0NDEQgFVnEeW3tcCUlOaVRbRU5BSTgkBj1XXj4HASxHQxpSAQ0VOQoUXVxDCBtpGFUadj5JTjBHOldXT1FWeFRKDhFBSTglAlsCSE8OB2lfAhpwAg9WcUdPGk4QFlhpNjwaCRZJNyQBWwIRXlpGfEdVGn8DDFZxHltLRU9RD2kmFlwRV0lMaRgERR9PKDxpXwIacAIPVnFHSgAEVUlYaSkXXxFXEFYvAFsCSE8oGy9HQxoATxZYaQMLGgkWSTckAVsCEV9JCWdHEEwRVxBWCAodGglPXlY2GAQUETk5VnEeW3tcCUlOaVZLCwpPR1YHCx4aCRZJADlHQ0MRLgQQaV9bexEQFglnRyxzEVcQVggKHRoJT1hFeldbFBEhBRNpXwIaVgNJTjBHOldXT1FWekcERR9PJxsoIRZVYAEeE2lfW1lfCwoGJAgcVx0OBFY2GA==",__key__:"mktKey83"}},citroen:{Cod:"CC",Des:"Citroën",SrcCod:"AC",DataType:"xP",BrandDomSlug:"citroen",Mkt:{__enc__:"Fkk1H0dDThQuBBBpX1sGB11YVmdHNVtRT1EPaQEcFwwWSTckAVsPFF5JCTYYVRd0KElOMEc6WlJPUVZ4VEkBFEFJOCUCWw9NTw0GaV8CF3UCD1ZxR0sXS0FJGidHQ04ULgQQaV9bfRQQFglnRzVgFFcQVggKHRcMT1NFe1FbGRQhBRNpXwIXUB9JTjBHOlpST1FWeUcESEtBSTwZR0NOFC4EEGlfWwYCWllWZ0c1W1FPUQ9pDQsXDBZJNyQBWw8UKkkJNhhVF3ImSU4wRzpaUk9RVnhUSQIUQUk4JQJbD01PDxVpXwIXdQIPVnFHThdLEBZYaSMwFwwWSTckAVsPFF5TRHNHVRd6AwxWcR5bU19PUQ9pJhZRFFdJNmkYBEgaTy0maV8CF3UCD1ZxR0oEBlRJWGkpF1IUVxBWLRdbD01PKBsvR0MXBE8WCTZJW3FzT1EPaSYWURRXSUd6VEkXGk8nGixHQ04UCQ5WcR5bdlkJSU5pVltISxBHVgw3Ww9NTygbL0dDFwVaU0RpSVt5WApJTjBHHFkUVxBWCAodFwxPUlY2GAQZFCU+VnEeW3ZZCUlOaVZIBw9PR1YHCx4XDBZJFzhHQ04ULgQQaV9bcBQQR1YjEFsPTU8oGy9HQxdwTxZYaRYSFwwWSTckAVsPFCBJCTYYVRd+JUlOMEc6WlJPUVZ4XU4MFEFJOCUCWw9NTwMBaV8CF3UCD1ZxRz8XSxAWWGkmIxcMFkk3JAFbDxReU0N9R1UXegMMVnEeW1ZFT1EPaSYWURRXSTFpGARIGk84P2lfAhd1Ag9WcUdKDQFZSVhpKRdSFFcQVjgOWw9NTygbL0dDF3tPFgk2SVt8c09RD2kmFlEUV0lHc1JKFxpPJxosR0NOFAgFVnEeW3ZZCUlOaVRbSEsQR1YCKVsPTU8oGy9HQxcFWFxCaUlbeVgKSU4wRxFQFFcQVggKHRcMTyRWNhgEGRQkP1ZxHlt2WQlJTmlUSQUGT0dWBwseFwwWSR0/R0NOFC4EEGlfWwAUEBYJZ0czZRRXEFYICh0XDE9YQ3NRWxkUIQUTaV8CF1MDSU4wRzpaUk9RVnpHBBkUBxtWcR5bdlkJSU5pNFtISxBHVgcxWw9NTygbL0dDFwVZU0JpSVt5WApJTjBHHEEUVxBWCAodFwxPIVY2SVtZQE9RD2kmFlEUV0kkaRhVF1oZSU4wRzpaUk9RVh1HBEhLQUk6B0dDThQuBBBpX1sGB19ZVmdHNVtRT1EPaQsVFwwWSTckAVsPFFlJCTYYVRd4IklOMEc6WlJPUVZ4U04EFEFJOCUCWw9NTwUbaV8CF3UCD1ZxRywXSxAWWGk1NRcMFkk3JAFbDxReWkZ4R1UXegMMVnEeW0VaT1EPaSYWURRXSTBpGARIGk87IGlfAhd1Ag9WcUdKBARZSVhpKRdSFFcQVjsRWw9NTygbL0dDF3dPFgk2SVtneU9RD2kmFlEUV0lHf1JJFxpPJxosR0NOFB8EVnEeW3ZZCUlOaTdbSEsQR1YZMFsPTU8oGy9HQxcFWV5MaUlbeVgKSU4wRwtAFFcQVggKHRcMTyVWNhgEGRQ/OFZxHlt2WQlJTmlWQQ0GT0dWBwseFwwWSQc5R0NOFC4EEGlfW2YUEBYJZ0cqfBRXEFYICh0XDE9YQHxUWxkUIQUTaV8CF0UBSU4wRzpaUk9RVhNHBEhLQUkuCkdDThQuBBBpX1sGBVhYVmdHNVtRT1EPaQAXFwwWSTckAVsPFFxJCTYYVRdzPklOMEc6WlJPUVZ4VEoDFEFJOCUCWw9NTw4HaV8CF3UCD1ZxR08XSxAWWGk2PBcMFkk3JAFbDxReWkZ8R1UXegMMVnEeW0ZAT1EPaSYWURRXSUxpGARIGk8oPGlfAhd1Ag9WcUdKDQFVSVhpKRdSFFcQVi8AWw9NTygbL0dDFwVPFlhpAwsXDBZJNyQBWw8UX0kJZ0cQQRRXEFYICh0XDE9eVjYYBBkUOTlWcR5bdlkJSU5pVksGD09HVgcLHhcMFkkAOUdDThQuBBBpX1t2FBAWCWdHLH4UVxBWCAodFwxPWEV6V1sZFCEFE2lfAhdTA0lOMEc6WlJPUVZ6RwRISxA=",__key__:"mktKey56"}},ds:{Cod:"SS",Des:"DS",SrcCod:"DS",DataType:"xP",BrandDomSlug:"dsautomobiles",Mkt:{__enc__:"Fkk1H0dDTxouBBBpX1sHCV1YVmdHNVpfT1EPaQEcFgIWSTckAVsOGl5JCTYYVRZ6KElOMEc6W1xPUVZ4VEkAGkFJOCUCWw5DTw0GaV8CFnsCD1ZxR0sWRUFJGidHQ08aLgQQaV9bfBoQFglnRzVhGlcQVggKHRYCT1NFe1FbGBohBRNpXwIWXh9JTjBHOltcT1FWeUcESUVBSTwZR0NPGi4EEGlfWwcMWllWZ0c1Wl9PUQ9pDQsWAhZJNyQBWw4aKkkJNhhVFnwmSU4wRzpbXE9RVnhUSQMaQUk4JQJbDkNPDxVpXwIWewIPVnFHThZFEBZYaSMwFgIWSTckAVsOGl5TRHNHVRZ0AwxWcR5bUlFPUQ9pJhZQGldJNmkYBEkUTy0maV8CFnsCD1ZxR0oFCFRJWGkpF1MaVxBWLRdbDkNPKBsvR0MWCk8WCTZJW3B9T1EPaSYWUBpXSUd6VEkWFE8nGixHQ08aCQ5WcR5bd1cJSU5pVltJRRBHVgw3Ww5DTygbL0dDFgtcWkdpSVt4VgpJTjBHHFgaVxBWCAodFgJPUlY2GAQYGiU+VnEeW3dXCUlOaVZIBgFPR1YHCx4WAhZJFzhHQ08aLgQQaV9bcRoQR1YjEFsOQ08oGy9HQxZ+TxZYaRYSFgIWSTckAVsOGiBJCTYYVRZwJUlOMEc6W1xPUVZ4XU4NGkFJOCUCWw5DTwMBaV8CFnsCD1ZxRz8WRRAWWGkmIxYCFkk3JAFbDhpeU0N9R1UWdAMMVnEeW1dLT1EPaSYWUBpXSTFpGARJFE84P2lfAhZ7Ag9WcUdKDA9ZSVhpKRdTGlcQVjgOWw5DTygbL0dDFnVPFgk2SVt9fU9RD2kmFlAaV0lHc1JKFhRPJxosR0NPGggFVnEeW3dXCUlOaVRbSUUQR1YCKVsOQ08oGy9HQxYLWFxCaUlbeFYKSU4wRxFRGlcQVggKHRYCTyRWNhgEGBokP1ZxHlt3VwlJTmlUSQQIT0dWBwseFgIWSR0/R0NPGi4EEGlfWwEaEBYJZ0czZBpXEFYICh0WAk9YQ3NRWxgaIQUTaV8CFl0DSU4wRzpbXE9RVnpHBBgaBxtWcR5bd1cJSU5pNFtJRRBHVgcxWw5DTygbL0dDFgtZU0JpSVt4VgpJTjBHHEAaVxBWCAodFgJPIVY2SVtYTk9RD2kmFlAaV0kkaRhVFlQZSU4wRzpbXE9RVh1HBElFQUk6B0dDTxouBBBpX1sHCV9ZVmdHNVpfT1EPaQsVFgIWSTckAVsOGllJCTYYVRZ2IklOMEc6W1xPUVZ4U04FGkFJOCUCWw5DTwUbaV8CFnsCD1ZxRywWRRAWWGk1NRYCFkk3JAFbDhpeWkZ4R1UWdAMMVnEeW0RUT1EPaSYWUBpXSTBpGARJFE87IGlfAhZ7Ag9WcUdKBQpZSVhpKRdTGlcQVjsRWw5DTygbL0dDFnlPFgk2SVtmd09RD2kmFlAaV0lHf1JJFhRPJxosR0NPGh8EVnEeW3dXCUlOaTdbSUUQR1YZMFsOQ08oGy9HQxYLWV5MaUlbeFYKSU4wRwtBGlcQVggKHRYCTyVWNhgEGBo/OFZxHlt3VwlJTmlWQQwIT0dWBwseFgIWSQc5R0NPGi4EEGlfW2caEBYJZ0cqfRpXEFYICh0WAk9YQHxUWxgaIQUTaV8CFksBSU4wRzpbXE9RVhNHBElFQUkuCkdDTxouBBBpX1sHC1hYVmdHNVpfT1EPaQAXFgIWSTckAVsOGlxJCTYYVRZ9PklOMEc6W1xPUVZ4VEoCGkFJOCUCWw5DTw4HaV8CFnsCD1ZxR08WRRAWWGk2PBYCFkk3JAFbDhpeWkZ8R1UWdAMMVnEeW0dOT1EPaSYWUBpXSUxpGARJFE8oPGlfAhZ7Ag9WcUdKDA9VSVhpKRdTGlcQVi8AWw5DTygbL0dDFgtPFlhpAwsWAhZJNyQBWw4aX0kJZ0cQQBpXEFYICh0WAk9eVjYYBBgaOTlWcR5bd1cJSU5pVksHAU9HVgcLHhYCFkkAOUdDTxouBBBpX1t3GhAWCWdHLH8aVxBWCAodFgJPWEV6V1sYGiEFE2lfAhZdA0lOMEc6W1xPUVZ6RwRJRRA=",__key__:"mktKey48"}},fiat:{Cod:"00",Des:"Fiat",SrcCod:"FT",DataType:"xF",BrandDomSlug:"fiat",Mkt:{__enc__:"Fkk1H0dDTxAuBBBpX1sHA11YVmdHNVpVT1EPaQEcFggWSTckAVsOEF5JCTYYVRZwKElOMEc6W1ZPUVZ4VEkAEEFJOCUCWw5JTw0GaV8CFnECD1ZxR0sWT0FJGidHQ08QLgQQaV9bfBAQFglnRzVhEFcQVggKHRYIT1NFe1FbGBAhBRNpXwIWVB9JTjBHOltWT1FWeUcESU9BSTwZR0NPEC4EEGlfWwcHWVNWZ0c1WlVPUQ9pDQsWCBZJNyQBWw4QKkkJNhhVFnYmSU4wRzpbVk9RVnhUSQMQQUk4JQJbDklPDxVpXwIWcQIPVnFHThZPEBZYaSMwFggWSTckAVsOEF5TRHNHVRZ+AwxWcR5bUltPUQ9pJhZQEFdJNmkYBEkeTy0maV8CFnECD1ZxR0oFAlRJWGkpF1MQVxBWLRdbDklPKBsvR0MWAE8WCTZJW3B3T1EPaSYWUBBXSUd6VEkWHk8nGixHQ08QCQ5WcR5bd10JSU5pVltJTxBHVgw3Ww5JTygbL0dDFgFVXERpSVt4XApJTjBHHFgQVxBWCAodFghPUlY2GAQYECU+VnEeW3ddCUlOaVZIBgtPR1YHCx4WCBZJFzhHQ08QLgQQaV9bcRAQR1YjEFsOSU8oGy9HQxZ0TxZYaRYSFggWSTckAVsOECBJCTYYVRZ6JUlOMEc6W1ZPUVZ4XU4NEEFJOCUCWw5JTwMBaV8CFnECD1ZxRz8WTxBHVhkEFFZ2AgZWcUcfXVMZRRw+RwQYEC4xVnEeW3ddCUlOaVZBAwRPR1YHCx4WCBZJFzhHQ08QLgQQaV9bcRAQFlhpNxhZUCkEGWlfW1JbDB8XMUsaW19PFlhpNjIWCBZJNyQBWw4QXlNDf0dVFn4DDFZxHltHWU9RD2kmFlAQV0k5aRgESR5PIjFpXwIWcQIPVnFHSgwFXklYaSkXUxBXEFYuC1sOSU8oGy9HQxYDTxYJNklbfX5PUQ9pJhZQEFdJR3lXTRYeTycaLEdDTxAFDlZxHlt3XQlJTmkqW0lPEEdWAjFbDklPKBsvR0MWA11bRGlJW3hcCklOMEcQQBBXEFYICh0WCE9eVjYYBBgQJztWcR5bd10JSU5pVk4MBk9HVgcLHhYIFkkRJUdDTxAuBBBpX1sFEBBHViEVWw5JTygbL0dDFmNPFgk2SVt4Zk9RD2kmFlAQV0lHflFMFh5PJxosR0NPEAgfVnEeW3ddCUlOaS9bSR5PBwJpXwIWcQIPVnFHKRZPQUkYP0dDTxAuBBBpX1tiEBAWCWdHN3gQVxBWCAodFghPWEV5V1sYECEFE2lfAhZcAUlOMEc6W1ZPUVZ/RwRJT0FJOgRHQ08QLgQQaV9bBwRaWlZnRzVaVU9RD2kLFhYIFkk3JAFbDhA4SQk2GFUWYiFJTjBHOltWT1FWeFRLBxBBSTglAlsOSU8bGGlfAhZxAg9WcUc9Fk8QFlhpNS0WCBZJNyQBWw4QXlpGf0dVFn4DDFZxHltERk9RD2kmFlAQV0k1aRgESR5POTtpXwIWcQIPVnFHSgUFWElYaSkXUxBXEFY5ClsOSU8oGy9HQxZgTxYJZ0c1W1EpBBkYCQxTEFdJEiIEDRpRAgZWNklbZmdPUQ9pJhZQEFdJR39QQRYeTycaLEdDTxAfHlZxHlt3XQlJTmkrW0lPEEdWGTZbDklPKBsvR0MWAVVTRGlJW3hcCklOMEcKRhBXEFYICh0WCE84VjYYBBgQPiJWcR5bd10JSU5pVkwABU9HVgcLHhYIFkkHJ0dDTxAuBBBpX1tsEBAWCWdHI3UQVxBWCAodFghPWEd+VlsYECEFE2lfAhZXA0lOMEc6W1ZPUVZ6RwRJHk8nGyghFllhAR4TaV9bUlsMH1ooCltJHk8uJ2lfAhZxAg9WcUdKBQFbSVhpKRdTEFcQVi4WWw5JTygbL0dDFgRPFgk2SVtnd09RD2kmFlAQV0lHeldOFh5PJxosR0NPEB4dVnEeW3ddCUlOaV1bSU8QR1YILVsOSU8oGy9HQxYBVVxMaUlbeFwKSU4wRx1REFcQVggKHRYIT1hWNklbUkBPUQ9pJhZQEFdJRmkYVRZbGUlOMEc6W1ZPUVZ+RwRJT0FJIBlHQ08QLgQQaV9bBwBeUlZnRzVaVU9RD2kRCxYIFkk3JAFbDhAuSQk2GFUWZyZJTjBHOltWT1FWeFRIBhBBSTglAlsOSU8OGmlfAhZxAg9WcUdIFk8QR1YHChpwXQA4GD4CWw4QCwIVP0saWxAQFg==",__key__:"mktKey42"}},fiatprofessional:{Cod:"77",Des:"Fiat Professional",SrcCod:"FO",DataType:"xF",BrandDomSlug:"fiat",Mkt:{__enc__:"Fkk1H0dDTBUuBBBpX1sEBl1YVmdHNVlQT1EPaQEcFQ0WSTckAVsNFV5JCTYYVRV1KElOMEc6WFNPUVZ4VEkDFUFJOCUCWw1MTw0GaV8CFXQCD1ZxR0sVSkFJGidHQ0wVLgQQaV9bfxUQFglnRzViFVcQVggKHRUNT1NFe1FbGxUhBRNpXwIVUR9JTjBHOlhTT1FWeUcESkpBSTwZR0NMFS4EEGlfWwQCWVNWZ0c1WVBPUQ9pDQsVDRZJNyQBWw0VKkkJNhhVFXMmSU4wRzpYU09RVnhUSQAVQUk4JQJbDUxPDxVpXwIVdAIPVnFHThVKEBZYaSMwFQ0WSTckAVsNFV5TRHNHVRV7AwxWcR5bUV5PUQ9pJhZTFVdJNmkYBEobTy0maV8CFXQCD1ZxR0oGB1RJWGkpF1AVVxBWLRdbDUxPKBsvR0MVBU8WCTZJW3NyT1EPaSYWUxVXSUd6VEkVG08nGixHQ0wVCQ5WcR5bdFgJSU5pVltKShBHVgw3Ww1MTygbL0dDFQRaU0RpSVt7WQpJTjBHHFsVVxBWCAodFQ1PUlY2GAQbFSU+VnEeW3RYCUlOaVZIBQ5PR1YHCx4VDRZJFzhHQ0wVLgQQaV9bchUQR1YjEFsNTE8oGy9HQxVxTxZYaRYSFQ0WSTckAVsNFSBJCTYYVRV/JUlOMEc6WFNPUVZ4XU4OFUFJOCUCWw1MTwMBaV8CFXQCD1ZxRz8VShAWWGkmIxUNFkk3JAFbDRVeU0N9R1UVewMMVnEeW1RET1EPaSYWUxVXSTFpGARKG084P2lfAhV0Ag9WcUdKDwBZSVhpKRdQFVcQVjgOWw1MTygbL0dDFXpPFgk2SVt+ck9RD2kmFlMVV0lHc1JKFRtPJxosR0NMFQgFVnEeW3RYCUlOaVRbSkoQR1YCKVsNTE8oGy9HQxUEX1lAaUlbe1kKSU4wRxFSFVcQVggKHRUNTyRWNhgEGxUkP1ZxHlt0WAlJTmlUSQcHT0dWBwseFQ0WSR0/R0NMFS4EEGlfWwIVEBYJZ0czZxVXEFYICh0VDU9YQ3NRWxsVIQUTaV8CFVIDSU4wRzpYU09RVnpHBBsVBxtWcR5bdFgJSU5pNFtKShBHVgcxWw1MTygbL0dDFQRYX0FpSVt7WQpJTjBHHEMVVxBWCAodFQ1PIVY2SVtbQU9RD2kmFlMVV0kkaRhVFVsZSU4wRzpYU09RVh1HBEpKQUk6B0dDTBUuBBBpX1sEBl9ZVmdHNVlQT1EPaQsVFQ0WSTckAVsNFVlJCTYYVRV5IklOMEc6WFNPUVZ4U04GFUFJOCUCWw1MTwUbaV8CFXQCD1ZxRywVShAWWGk1NRUNFkk3JAFbDRVeWkZ4R1UVewMMVnEeW0dbT1EPaSYWUxVXSTBpGARKG087IGlfAhV0Ag9WcUdKBgVZSVhpKRdQFVcQVjsRWw1MTygbL0dDFXZPFgk2SVtleE9RD2kmFlMVV0lHelJMFRtPJxosR0NMFR8EVnEeW3RYCUlOaTdbSkoQR1YZMFsNTE8oGy9HQxUEWV5MaUlbe1kKSU4wRwtCFVcQVggKHRUNTyVWNhgEGxU/OFZxHlt0WAlJTmlWQQ8HT0dWBwseFQ0WSQc5R0NMFS4EEGlfW2QVEBYJZ0cqfhVXEFYICh0VDU9YQX9SWxsVIQUTaV8CFUQBSU4wRzpYU09RVhNHBEpKQUkuCkdDTBUuBBBpX1sEBFhYVmdHNVlQT1EPaQAXFQ0WSTckAVsNFVxJCTYYVRVyPklOMEc6WFNPUVZ4VEoBFUFJOCUCWw1MTw4HaV8CFXQCD1ZxR08VShAWWGk2PBUNFkk3JAFbDRVeWkZ8R1UVewMMVnEeW0RBT1EPaSYWUxVXSUxpGARKG08oPGlfAhV0Ag9WcUdKDwBVSVhpKRdQFVcQVi8AWw1MTygbL0dDFQRPFlhpAwsVDRZJNyQBWw0VX0kJZ0cQQxVXEFYICh0VDU9eVjYYBBsVOTlWcR5bdFgJSU5pVksEDk9HVgcLHhUNFkkAOUdDTBUuBBBpX1t0FRAWCWdHLHwVVxBWCAodFQ1PWEV6V1sbFSEFE2lfAhVSA0lOMEc6WFNPUVZ6RwRKShA=",__key__:"mktKey77"}},jeep:{Cod:"57",Des:"JEEP",SrcCod:"JE",DataType:"xF",BrandDomSlug:"jeep",Mkt:{__enc__:"Fkk1H0dDThUuBBBpX1sGBl1YVmdHNVtQT1EPaQEcFw0WSTckAVsPFV5JCTYYVRd1KElOMEc6WlNPUVZ4VEkBFUFJOCUCWw9MTw0GaV8CF3QCD1ZxR0sXSkFJGidHQ04VLgQQaV9bfRUQFglnRzVgFVcQVggKHRcNT1NFe1FbGRUhBRNpXwIXUR9JTjBHOlpTT1FWeUcESEpBSTwZR0NOFS4EEGlfWwYCWVNWZ0c1W1BPUQ9pDQsXDRZJNyQBWw8VKkkJNklbZ1YACTAkCFsPFQcOETtLGlpaTxZYaSEyFw0WSTckAVsPFV5aRHxHVRd7AwxWcR5bUVZPUQ9pJhZRFVdJQ2kYBEgbTy09aV8CF3QCD1ZxR0oNB1VJWGkpF1IVVxBWLQxbD0xPKBsvR0MXdU8WCTZJW3NlT1EPaSYWURVXSUd6VUAXG08nGixHQ04VCxlWcR5bdlgJSU5pV1tIShBHVg8gWw9MTygbL0dDFwRcWkRpSVt5WQpJTjBHHVAVVxBWCAodFw1PWFY2GAQZFSo5VnEeW3ZYCUlOaVZBAgdPR1YHCx4XDRZJESdHQ04VLgQQaV9bDBUQFglnRzFgFVcQVggKHRcNT1hFeVxbGRUhBRNpXwIXVB5JTjBHOlpTT1FWDkcEGRUFHlZxHlt2WAlJTmkjW0gbTxgfaV8CF3QCD1ZxRzQXShAWWGktMRcNFkk3JAFbDxVeU0NyR1UXewMMVnEeW11CT1EPaSYWURVXSTJpGAQZFT8KGSkhFlgVV0keLgAJG18YSQlnRzpvFVcQVggKHRcNT1hMfFNbGRUhBRNpXwIXVB5JTjBHOlpTT1FWDkcESEpBSScAR0NOFS4EEGlfWwYPWl9WZ0c1W1BPUQ9pFhIXDRZJNyQBWw8VIEkJNhhVF34oSU4wRzpaU09RVnhdTgYVQUk4JQJbD0xPDhppXwIXdAIPVnFHSBdKEEdWGQQUV3MCBlZxRxNQUh1FFyQIW0gbTyI4aV8CF3QCD1ZxR0oHBVlJWGkpF1IVVxBWIwBbD0xPKBsvR0MXeE8WCTZJW3xjT1EPaSYWURVXSUV7VUkXG08nGixHQ04VBB9WcR5bdlgJSU5pUFtISkFJOCQGPVpaPgcBLEdDF10IDgRmCh9TXg4CFSdHBBkVJztWcR5bdlgJSU5pVk4NA09HVgcLHhcNFkkRJUdDThUuBBBpX1sEFRBHViEVWw9MTygbL0dDF2ZPFgk2SVt5Y09RD2kmFlEVV0lHflFMFxtPJxosR0NOFQgfVnEeW3ZYCUlOaS9bSBtPBwJpXwIXdAIPVnFHKRdKQUkYP0dDThUuBBBpX1tjFRAWCWdHN3kVVxBWCAodFw1PWEV5V1sZFSEFE2lfAhdZAUlOMEc6WlNPUVZ/RwRISkFJOgRHQ04VLgQQaV9bBgFaWlZnRzVbUE9RD2kLFhcNFkk3JAFbDxU4SQk2GFUXZyFJTjBHOlpTT1FWeFRLBhVBSTglAlsPTE8bGGlfAhd0Ag9WcUc9F0oQFlhpNS0XDRZJNyQBWw8VXlpGf0dVF3sDDFZxHltFQ09RD2kmFlEVV0k1aRgESBtPOTtpXwIXdAIPVnFHSgQAWElYaSkXUhVXEFY5ClsPTE8oGy9HQxdlTxYJZ0crVFoPLxsmR0MXXQgOBGUGFlgVEEdWGTBbD0xPKBsvR0MXBFleTGlJW3lZCklOMEcLQBVXEFYICh0XDU8lVjYYBBkVPzhWcR5bdlgJSU5pVkENB09HVgcLHhcNFkkHOUdDThUuBBBpX1tmFRAWCWdHKnwVVxBWCAodFw1PWEF/UlsZFSEFE2lfAhdEAUlOMEc6WlNPUVYTRwRIG085FSYHPVpaT1FWIQAcRRkOBBlpGFUXbSxJTjBHOlpTT1FWeFZMBhVBSTglAlsPTE8OGmlfAhd0Ag9WcUdIF0oQFlhpICoXDRZJNyQBWw8VXlpHfUdVF3sDDFZxHltQRE9RD2kmFlEVV0lCaRgESBtPODFpXwIXdAIPVnFHSgQFWklYaSkXUhVXEFY4E1sPTE8oGy9HQxcPTxYJNklbdn9PUQ9pJhZRFVdJR3NSQRcbTycaLEdDThUJDlZxHlt2WAlJTmlWW0gbTw0GaV8CF3QCD1ZxR0sXSkFJHT9HQ04VLgQQaV9bABUQFglnRy1nFVcQVggKHRcNT1hGeFxbGRUhBRNpXwIXQx9JTjBHOlpTT1FWCEcESEpBSSEAR0NOFS4EEGlfWwYGXFlWZ0c1W1BPUQ9pABcXDRZJNyQBWw8VXEkJNklbeVgOLxsmNhVAUE9RViEAHEUZDgRWNhg=",__key__:"mktKey57"}},lancia:{Cod:"70",Des:"Lancia",SrcCod:"LA",DataType:"xF",BrandDomSlug:"lancia",Mkt:{__enc__:"Fkk1H0dDTBIuBBBpX1sEAV1YVmdHNVlXT1EPaQEcFQoWSTckAVsNEl5JCTYYVRVyKElOMEc6WFRPUVZ4VEkDEkFJOCUCWw1LTw0GaV8CFXMCD1ZxR0sVTUFJGidHQ0wSLgQQaV9bfxIQFglnRzViElcQVggKHRUKT1NFe1FbGxIhBRNpXwIVVh9JTjBHOlhUT1FWeUcESk1BSTwZR0NMEi4EEGlfWwQEWllWZ0c1WVdPUQ9pDQsVChZJNyQBWw0SKkkJNhhVFXQmSU4wRzpYVE9RVnhUSQASQUk4JQJbDUtPDxVpXwIVcwIPVnFHThVNEBZYaSMwFQoWSTckAVsNEl5TRHNHVRV8AwxWcR5bUVlPUQ9pJhZTEldJNmkYBEocTy0maV8CFXMCD1ZxR0oGAFRJWGkpF1ASVxBWLRdbDUtPKBsvR0MVAk8WCTZJW3N1T1EPaSYWUxJXSUd6VEkVHE8nGixHQ0wSCQ5WcR5bdF8JSU5pVltKTRBHVgw3Ww1LTygbL0dDFQNaU0RpSVt7XgpJTjBHHFsSVxBWCAodFQpPUlY2GAQbEiU+VnEeW3RfCUlOaVZIBQlPR1YHCx4VChZJFzhHQ0wSLgQQaV9bchIQR1YjEFsNS08oGy9HQxV2TxZYaRYSFQoWSTckAVsNEiBJCTYYVRV4JUlOMEc6WFRPUVZ4XU4OEkFJOCUCWw1LTwMBaV8CFXMCD1ZxRz8VTRAWWGkmIxUKFkk3JAFbDRJeU0N9R1UVfAMMVnEeW1RDT1EPaSYWUxJXSTFpGARKHE84P2lfAhVzAg9WcUdKDwdZSVhpKRdQElcQVjgOWw1LTygbL0dDFX1PFgk2SVt+dU9RD2kmFlMSV0lHc1JKFRxPJxosR0NMEggFVnEeW3RfCUlOaVRbSk0QR1YCKVsNS08oGy9HQxUDWFxCaUlbe14KSU4wRxFSElcQVggKHRUKTyRWNhgEGxIkP1ZxHlt0XwlJTmlUSQcAT0dWBwseFQoWSR0/R0NMEi4EEGlfWwISEBYJZ0czZxJXEFYICh0VCk9YQ3NRWxsSIQUTaV8CFVUDSU4wRzpYVE9RVnpHBBsSBxtWcR5bdF8JSU5pNFtKTRBHVgcxWw1LTygbL0dDFQNZU0JpSVt7XgpJTjBHHEMSVxBWCAodFQpPIVY2SVtbRk9RD2kmFlMSV0kkaRhVFVwZSU4wRzpYVE9RVh1HBEpNQUk6B0dDTBIuBBBpX1sEAV9ZVmdHNVlXT1EPaQsVFQoWSTckAVsNEllJCTYYVRV+IklOMEc6WFRPUVZ4U04GEkFJOCUCWw1LTwUbaV8CFXMCD1ZxRywVTRAWWGk1NRUKFkk3JAFbDRJeWkZ4R1UVfAMMVnEeW0dcT1EPaSYWUxJXSTBpGARKHE87IGlfAhVzAg9WcUdKBgJZSVhpKRdQElcQVjsRWw1LTygbL0dDFXFPFgk2SVtlf09RD2kmFlMSV0lHf1JJFRxPJxosR0NMEh8EVnEeW3RfCUlOaTdbSk0QR1YZMFsNS08oGy9HQxUDWV5MaUlbe14KSU4wRwtCElcQVggKHRUKTyVWNhgEGxI/OFZxHlt0XwlJTmlWQQ8AT0dWBwseFQoWSQc5R0NMEi4EEGlfW2QSEBYJZ0cqfhJXEFYICh0VCk9YQHxUWxsSIQUTaV8CFUMBSU4wRzpYVE9RVhNHBEpNQUkuCkdDTBIuBBBpX1sEA1hYVmdHNVlXT1EPaQAXFQoWSTckAVsNElxJCTYYVRV1PklOMEc6WFRPUVZ4VEoBEkFJOCUCWw1LTw4HaV8CFXMCD1ZxR08VTRAWWGk2PBUKFkk3JAFbDRJeWkZ8R1UVfAMMVnEeW0RGT1EPaSYWUxJXSUxpGARKHE8oPGlfAhVzAg9WcUdKDwdVSVhpKRdQElcQVi8AWw1LTygbL0dDFQNPFlhpAwsVChZJNyQBWw0SX0kJZ0cQQxJXEFYICh0VCk9eVjYYBBsSOTlWcR5bdF8JSU5pVksECU9HVgcLHhUKFkkAOUdDTBIuBBBpX1t0EhAWCWdHLHwSVxBWCAodFQpPWEV6V1sbEiEFE2lfAhVVA0lOMEc6WFRPUVZ6RwRKHE8nGyghFlpjAR4TaV9bW1EDCB0qSxpYEhAW",__key__:"mktKey70"}},opel:{Cod:"GG",Des:"Opel",SrcCod:"OV",DataType:"xP",BrandDomSlug:"opel",Mkt:{__enc__:"Fkk1H0dDTBYuBBBpX1sEBV1YVmdHNVlTT1EPaQEcFQ4WSTckAVsNFl5JCTYYVRV2KElOMEc6WFBPUVZ4VEkDFkFJOCUCWw1PTw0GaV8CFXcCD1ZxR0sVSUFJGidHQ0wWLgQQaV9bfxYQFglnRzViFlcQVggKHRUOT1NFe1FbGxYhBRNpXwIVUh9JTjBHOlhQT1FWeUcESklBSTwZR0NMFi4EEGlfWwQAWllWZ0c1WVNPUQ9pDQsVDhZJNyQBWw0WKkkJNhhVFXAmSU4wRzpYUE9RVnhUSQAWQUk4JQJbDU9PDxVpXwIVdwIPVnFHThVJEBZYaSMwFQ4WSTckAVsNFl5TRHNHVRV4AwxWcR5bUV1PUQ9pJhZTFldJNmkYBEoYTy0maV8CFXcCD1ZxR0oGBFRJWGkpF1AWVxBWLRdbDU9PKBsvR0MVBk8WCTZJW3NxT1EPaSYWUxZXSUd6VEkVGE8nGixHQ0wWCQ5WcR5bdFsJSU5pVltKSRBHVgw3Ww1PTygbL0dDFQdaU0RpSVt7WgpJTjBHHFsWVxBWCAodFQ5PUlY2GAQbFiU+VnEeW3RbCUlOaVZIBQ1PR1YHCx4VDhZJFzhHQ0wWLgQQaV9bchYQR1YjEFsNT08oGy9HQxVyTxZYaRYSFQ4WSTckAVsNFiBJCTYYVRV8JUlOMEc6WFBPUVZ4XU4OFkFJOCUCWw1PTwMBaV8CFXcCD1ZxRz8VSRAWWGkmIxUOFkk3JAFbDRZeU0N9R1UVeAMMVnEeW1RHT1EPaSYWUxZXSTFpGARKGE84P2lfAhV3Ag9WcUdKDwNZSVhpKRdQFlcQVjgOWw1PTygbL0dDFXlPFgk2SVt+cU9RD2kmFlMWV0lHc1JKFRhPJxosR0NMFggFVnEeW3RbCUlOaVRbSkkQR1YCKVsNT08oGy9HQxUHWFxCaUlbe1oKSU4wRxFSFlcQVggKHRUOTyRWNhgEGxYkP1ZxHlt0WwlJTmlUSQcET0dWBwseFQ4WSR0/R0NMFi4EEGlfWwIWEBYJZ0czZxZXEFYICh0VDk9YQ3NRWxsWIQUTaV8CFVEDSU4wRzpYUE9RVnpHBBsWBxtWcR5bdFsJSU5pNFtKSRBHVgcxWw1PTygbL0dDFQdZU0JpSVt7WgpJTjBHHEMWVxBWCAodFQ5PIVY2SVtbQk9RD2kmFlMWV0kkaRhVFVgZSU4wRzpYUE9RVh1HBEpJQUk6B0dDTBYuBBBpX1sEBV9ZVmdHNVlTT1EPaQsVFQ4WSTckAVsNFllJCTYYVRV6IklOMEc6WFBPUVZ4U04GFkFJOCUCWw1PTwUbaV8CFXcCD1ZxRywVSRAWWGk1NRUOFkk3JAFbDRZeWkZ4R1UVeAMMVnEeW0dYT1EPaSYWUxZXSTBpGARKGE87IGlfAhV3Ag9WcUdKBgZZSVhpKRdQFlcQVjsRWw1PTygbL0dDFXVPFgk2SVtle09RD2kmFlMWV0lHf1JJFRhPJxosR0NMFh8EVnEeW3RbCUlOaTdbSkkQR1YZMFsNT08oGy9HQxUHWV5MaUlbe1oKSU4wRwtCFlcQVggKHRUOTyVWNhgEGxY/OFZxHlt0WwlJTmlWQQ8ET0dWBwseFQ4WSQc5R0NMFi4EEGlfW2QWEBYJZ0cqfhZXEFYICh0VDk9YQHxUWxsWIQUTaV8CFUcBSU4wRzpYUE9RVhNHBEpJQUkuCkdDTBYuBBBpX1sEB1hYVmdHNVlTT1EPaQAXFQ4WSTckAVsNFlxJCTYYVRVxPklOMEc6WFBPUVZ4VEoBFkFJOCUCWw1PTw4HaV8CFXcCD1ZxR08VSRAWWGk2PBUOFkk3JAFbDRZeWkZ8R1UVeAMMVnEeW0RCT1EPaSYWUxZXSUxpGARKGE8oPGlfAhV3Ag9WcUdKDwNVSVhpKRdQFlcQVi8AWw1PTygbL0dDFQdPFlhpAwsVDhZJNyQBWw0WX0kJZ0cQQxZXEFYICh0VDk9eVjYYBBsWOTlWcR5bdFsJSU5pVksEDU9HVgcLHhUOFkkAOUdDTBYuBBBpX1t0FhAWCWdHLHwWVxBWCAodFQ5PWEV6V1sbFiEFE2lfAhVRA0lOMEc6WFBPUVZ6RwRKSRA=",__key__:"mktKey74"}},peugeot:{Cod:"PP",Des:"Peugeot",SrcCod:"AP",DataType:"xP",BrandDomSlug:"peugeot",Mkt:{__enc__:"Fkk1H0dDQhAuBBBpX1sKA11YVmdHNVdVT1EPaQEcGwgWSTckAVsDEF5JCTYYVRtwKElOMEc6VlZPUVZ4VEkNEEFJOCUCWwNJTw0GaV8CG3ECD1ZxR0sbT0FJGidHQ0IQLgQQaV9bcRAQFglnRzVsEFcQVggKHRsIT1NFe1FbFRAhBRNpXwIbVB9JTjBHOlZWT1FWeUcERE9BSTwZR0NCEC4EEGlfWwoGWllWZ0c1V1VPUQ9pDQsbCBZJNyQBWwMQKkkJNhhVG3YmSU4wRzpWVk9RVnhUSQ4QQUk4JQJbA0lPDxVpXwIbcQIPVnFHThtPEBZYaSMwGwgWSTckAVsDEF5TRHNHVRt+AwxWcR5bX1tPUQ9pJhZdEFdJNmkYBEQeTy0maV8CG3ECD1ZxR0oIAlRJWGkpF14QVxBWLRdbA0lPKBsvR0MbAE8WCTZJW313T1EPaSYWXRBXSUd6VEkbHk8nGixHQ0IQCQ5WcR5bel0JSU5pVltETxBHVgw3WwNJTygbL0dDGwFaU0RpSVt1XApJTjBHHFUQVxBWCAodGwhPUlY2GAQVECU+VnEeW3pdCUlOaVZICwtPR1YHCx4bCBZJFzhHQ0IQLgQQaV9bfBAQR1YjEFsDSU8oGy9HQxt0TxZYaRYSGwgWSTckAVsDECBJCTYYVRt6JUlOMEc6VlZPUVZ4XU4AEEFJOCUCWwNJTwMBaV8CG3ECD1ZxRz8bTxAWWGkmIxsIFkk3JAFbAxBeU0N9R1UbfgMMVnEeW1pBT1EPaSYWXRBXSTFpGAREHk84P2lfAhtxAg9WcUdKAQVZSVhpKRdeEFcQVjgOWwNJTygbL0dDG39PFgk2SVtwd09RD2kmFl0QV0lHc1JKGx5PJxosR0NCEAgFVnEeW3pdCUlOaVRbRE8QR1YCKVsDSU8oGy9HQxsBWFxCaUlbdVwKSU4wRxFcEFcQVggKHRsITyRWNhgEFRAkP1ZxHlt6XQlJTmlUSQkCT0dWBwseGwgWSR0/R0NCEC4EEGlfWwwQEBYJZ0czaRBXEFYICh0bCE9YQ3NRWxUQIQUTaV8CG1cDSU4wRzpWVk9RVnpHBBUQBxtWcR5bel0JSU5pNFtETxBHVgcxWwNJTygbL0dDGwFZU0JpSVt1XApJTjBHHE0QVxBWCAodGwhPIVY2SVtVRE9RD2kmFl0QV0kkaRhVG14ZSU4wRzpWVk9RVh1HBERPQUk6B0dDQhAuBBBpX1sKA19ZVmdHNVdVT1EPaQsVGwgWSTckAVsDEFlJCTYYVRt8IklOMEc6VlZPUVZ4U04IEEFJOCUCWwNJTwUbaV8CG3ECD1ZxRywbTxAWWGk1NRsIFkk3JAFbAxBeWkZ4R1UbfgMMVnEeW0leT1EPaSYWXRBXSTBpGAREHk87IGlfAhtxAg9WcUdKCABZSVhpKRdeEFcQVjsRWwNJTygbL0dDG3NPFgk2SVtrfU9RD2kmFl0QV0lHf1JJGx5PJxosR0NCEB8EVnEeW3pdCUlOaTdbRE8QR1YZMFsDSU8oGy9HQxsBWV5MaUlbdVwKSU4wRwtMEFcQVggKHRsITyVWNhgEFRA/OFZxHlt6XQlJTmlWQQECT0dWBwseGwgWSQc5R0NCEC4EEGlfW2oQEBYJZ0cqcBBXEFYICh0bCE9YQHxUWxUQIQUTaV8CG0EBSU4wRzpWVk9RVhNHBERPQUkuCkdDQhAuBBBpX1sKAVhYVmdHNVdVT1EPaQAXGwgWSTckAVsDEFxJCTYYVRt3PklOMEc6VlZPUVZ4VEoPEEFJOCUCWwNJTw4HaV8CG3ECD1ZxR08bTxAWWGk2PBsIFkk3JAFbAxBeWkZ8R1UbfgMMVnEeW0pET1EPaSYWXRBXSUxpGAREHk8oPGlfAhtxAg9WcUdKAQVVSVhpKRdeEFcQVi8AWwNJTygbL0dDGwFPFlhpAwsbCBZJNyQBWwMQX0kJZ0cQTRBXEFYICh0bCE9eVjYYBBUQOTlWcR5bel0JSU5pVksKC09HVgcLHhsIFkkAOUdDQhAuBBBpX1t6EBAWCWdHLHIQVxBWCAodGwhPWEV6V1sVECEFE2lfAhtXA0lOMEc6VlZPUVZ6RwRETxA=",__key__:"mktKey92"}},tofas:{Cod:"85",Des:"Tofas",SrcCod:"85",DataType:"xF",BrandDomSlug:"tofas",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}}}},tofasprofessional:{Cod:"87",Des:"Tofas Professional",SrcCod:"87",DataType:"xF",BrandDomSlug:"tofasprofessional",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}}}}},Env:{devimp:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/import.aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"import",RelEnvPrev:"devprev",RelEnvPub:"devpub"},devprev:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"preview",RelEnvPrev:"devprev",RelEnvPub:"devpub"},devpub:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"publish",RelEnvPrev:"devprev",RelEnvPub:"devpub"},certimp:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/import.aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584926",SiteEnv:"cert",DataEnv:"import",RelEnvPrev:"certprev",RelEnvPub:"certpub"},certprev:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584926",SiteEnv:"cert",DataEnv:"preview",RelEnvPrev:"certprev",RelEnvPub:"certpub"},certpub:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584926",SiteEnv:"cert",DataEnv:"publish",RelEnvPrev:"certprev",RelEnvPub:"certpub"},import:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/import.www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"import",RelEnvPrev:"preview",RelEnvPub:"publish"},preview:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"preview",RelEnvPrev:"preview",RelEnvPub:"publish"},publish:{NSAbsSlugPath:"https://www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"publish",RelEnvPrev:"preview",RelEnvPub:"publish"},envList:["devimp","devprev","devpub","certimp","certprev","certpub","import","preview","publish"],ContextMode:"absolute",ProxySlug:"/sccfns/",ProxySlugEvo:"/sccf/",ConfigUrl:"https://carconfigurator.fcagroup.it"},Mode:{initScopeType:"sccfC2evo"}}),e.getVersion=function(){"use strict";var t=e.cmRuleEngine?e.cmRuleEngine.getVersion():"rei";return e.ver+t},e.getAuthor=function(){"use strict";return function(e,t,n=126){return"number"!=typeof t||t%1!=0||"number"!=typeof t||t%1!=0?e.toString():function(e,t,n=126){if("number"!=typeof t||t%1!=0||"number"!=typeof t||t%1!=0)return e.toString();for(var r=e.toString().split(""),i=0;i<r.length;i++)r[i].charCodeAt(0)<=n&&(r[i]=String.fromCharCode((r[i].charCodeAt(0)+t)%n));return r.join("")}(e.toString(),n-t)}("Mrzirxih$f}$Pyge$Jivvevmw2Hiwmkrih$erh$hizipstih$f}$Tmixvs$Hi$Wxijers$Tywxsvmrs2",4)},e.setInitContextType=function(t){"use strict";var n=ce();return["sccfC2evo","s4fC2evo","sccfC2","fccfC3"].includes(t)?(e.scopeConfig.Mode.initScopeType=t,n=ue(!0,200,"InitContextType successfuly changed",{})):n=ue(!1,504,"Invalid input InitContextType. Unchanged.",{}),n},e.init=function(t,n,r,i,o,c,u,p,f){"use strict";e.mbPath=n,e.cmPath=r,e.onInitCallback=i,e.onInitErrorCallback=o,e.log=s();var h=s.createConsoleAppender("consoleAppender");h.level=s.getWarnLevel(),e.log.setOptions({appenders:[h]}),e.log.info(e.apiName+".init - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".init - begin"),e.log.debug(e.apiName+".init - lodash:"+a.VERSION),e.log.debug(e.apiName+".init - Params - cmDataSource:["+t+"] mbPath:["+n+"] cmPath:["+n+"]"),e.createFccf(),e.log.debug(e.apiName+".init - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=u,e.cytoVehicleDiv=p,e.selectionLogDiv=f,e.optionalCustomConfig=c,e.jsonpath=l,t?e.createComModRuleEngine(t):d.QualModel&&d.QualModel.LoadMng?e.getCMDataAndQCDataSequentialCall():e.getCMDataCall(),e.log.debug(e.apiName+".init - end")},e.initScope=function(t,n,r,i,o,c,u,d,p,h){"use strict";e.onInitScopeSuccessCallback=o,e.onInitScopeErrorCallback=c,e.log=s();var g=s.createConsoleAppender("consoleAppender");g.level=s.getWarnLevel(),e.log.setOptions({appenders:[g]}),e.log.info(e.apiName+".initScope - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".initScope - begin"),e.log.debug(e.apiName+".initScope - lodash:"+a.VERSION),e.log.debug(e.apiName+".initScope - Params - Brand:["+t+"] Market:["+n+"] Lang:["+r+"] Env:["+i+"]"),e.createFccf(),e.log.debug(e.apiName+".initScope - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=d,e.cytoVehicleDiv=p,e.selectionLogDiv=h,e.optionalCustomConfig=u,u&&u.scopeConfig&&a.merge(e.scopeConfig,e.optionalCustomConfig.scopeConfig),e.jsonpath=l,f(t,n,r,i)?e.getScopeDataCall():(e.log.warn(e.apiName+".initScope - Internal Scope Not found WARN - external search"),e.getScopeConfigCall(t,n,r,i)),e.log.debug(e.apiName+".initScope - end")},e.getScopeConfigCall=function(t,n,r,i){"use strict";var o=m(),a=function(t){e.log.error(e.apiName+".getScopeConfigCall - ERROR["+t.message+"]");var n=ue(!1,542,"InitScope - getScopeConfigCall ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getScopeConfigCall - begin");var s="";try{s=e.ScopeConfigOverUrl,e.log.info(e.apiName+".getScopeConfigCall - wsUrl:["+s+"]"),e.log.warn(e.apiName+".getScopeConfigCall - wsUrl:["+s+"]")}catch(t){var l={};e.log.error(e.apiName+".getScopeConfigCall - ERROR["+t+"] - wsUrl:["+s+"]"),l.message="Malformed wsUrl",a(l)}e.axiosInstance.get(s,o).then((function(o){if(o&&o.data)if(e.log.debug(e.apiName+".getScopeConfigCall - success"),e.timeEnd(),e.log.debug(e.apiName+".getScopeConfigCall - pre-scopeConfig:["+e.scopeConfig+"]"),e.scopeConfig=o.data,e.log.debug(e.apiName+".getScopeConfigCall - post-scopeConfig:["+e.scopeConfig+"]"),e.log.debug(e.apiName+".getScopeConfigCall - ScopeConfig overwrited"),f(t,n,r,i))e.getScopeDataCall();else{e.log.warn(e.apiName+".initScope - Scope Not found WARN");var a=ue(!1,590,e.apiName+".initScope - Scope Not found ERROR",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(a)}else{e.log.error(e.apiName+".getScopeConfigCall - JSON.parse ERROR["+o+"]");a=ue(!1,542,"Init - getScopeConfigCall ERROR[Content parse error]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(a)}}),a)},e.getScopeDataCall=function(){"use strict";var t=m(),n=function(t){e.log.error(e.apiName+".getScopeDataCall - ERROR["+t.message+"]");var n=ue(!1,592,"InitScope - getScopeDataCall ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getScopeDataCall - begin");var r="";try{"undefined"!=typeof document&&(document.cookie="cc_cookie=cookieisset;path=/;"),r=h(),e.log.info(e.apiName+".getScopeDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getScopeDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}if(J(e.MarketName,e.Env))e.axiosInstance.get(r,t).then((function(t){var n=function(e,t){e.Vehicles[t.code]={},e.Vehicles[t.code].Cod=t.code,e.Vehicles[t.code].Des=t.desc,e.Vehicles[t.code].ImpVer=t.ImporterVersion?t.ImporterVersion:"",e.Vehicles[t.code].LastUpdate=t.lastUpdate,e.Vehicles[t.code].Anomaly=t.anomaly};if(t&&t.data){e.log.debug(e.apiName+".getScopeDataCall - success:["+t.data+"]");var r=t.data;if(r&&r.brand&&r.comMods){e.fccf.Scope.Brand={},e.fccf.Scope.Brand.Cod=e.BrandCod,e.fccf.Scope.Brand.SrcCod=e.scopeConfig.Brand[e.BrandName].SrcCod,e.fccf.Scope.Brand.Key=e.BrandName,e.fccf.Scope.Brand.Des=e.scopeConfig.Brand[e.BrandName].Des,e.fccf.Scope.Brand.DataType=e.scopeConfig.Brand[e.BrandName].DataType,e.fccf.Scope.Language={},e.fccf.Scope.Language.Cod=r.language,e.fccf.Scope.Language.Key=e.LangName,e.fccf.Scope.Language.Des=r.languageDes,e.fccf.Scope.Market={},e.fccf.Scope.Market.Cod=r.market,e.fccf.Scope.Market.Key=e.MarketName,e.fccf.Scope.Market.Des=r.marketDes;for(var i=0;i<r.comMods.length;i++){for(var o=r.comMods[i],s=r.comMods[i].mvss,l={Vehicles:{}},c=0;c<s.length;c++){var u=s[c];"import"===e.scopeConfig.Env[e.Env].DataEnv&&"1"!==u.status&&n(l,u),"preview"===e.scopeConfig.Env[e.Env].DataEnv&&"1"!==u.status&&n(l,u),"publish"===e.scopeConfig.Env[e.Env].DataEnv&&"2"!==u.status&&n(l,u)}a.isEmpty(l.Vehicles)||(l.Cod=o.code,l.Des=o.desc,l.DSeq=o.DSeq?o.DSeq.toString():"",e.fccf.Scope.ComModels[o.code]=l,e.modelNSPathMap.set(o.code,o.nsbpath?o.nsbpath:null))}}e.npeFrags=[],e.npeFrags=r.npeFragments?r.npeFragments:[],e.setNPEConfig(),e.log.info(e.apiName+".getScopeDataCall - SUCCESS["+t+"]");var d=ue(!0,200,"InitScope - getScopeDataCall SUCCESS",{});e.onInitScopeSuccessCallback&&e.onInitScopeSuccessCallback(d)}else e.log.error(e.apiName+".getScopeDataCall - JSON.parse ERROR["+t+"]"),d=ue(!1,592,"Init - getScopeDataCall ERROR[Content parse error]",{}),e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(d)}),n);else{i={};e.log.error(e.apiName+".getScopeDataCall - ERROR - Invalid User Domain"),i.message="Invalid User Domain",n(i)}},e.setModel=function(t,n,r){"use strict";var i;e.log.info(e.apiName+".setModel - getVersion["+e.getVersion()+"]"),e.log.info(e.apiName+".setModel - ChangeRequest["+$(t)+"]"),e.onInitCallback=n,e.onSetModelErrorCallback=r;var o=!0;!o||t&&t.Selections&&1===t.Selections.length&&t.Selections[0].Cod||(o=!1,i=ue(!1,510,"setModel ERROR[ChangeRequest malformed]",re([])),e.log.debug(e.apiName+".setModel ERROR[ChangeRequest malformed]"),e.onSetModelErrorCallback&&e.onSetModelErrorCallback(i)),o&&(e.CModel=t.Selections[0].Cod,e.log.debug(e.apiName+".setModel - Commercial Model:["+e.CModel+"]"),e.CModel&&(o=!1,e.getModelBuildCall(e.CModel)))},e.getModelBuildCall=function(){"use strict";var t=m(),n=function(t){e.log.error(e.apiName+".getModelBuildCall - ERROR["+t.message+"]"),e.log.debug(e.apiName+".getModelBuildCall - ERROR["+t.message+"]");var n=ue(!1,540,"SetModel - getModelBuildCall ERROR["+t.message+"]",{});e.onSetModelErrorCallback&&e.onSetModelErrorCallback(n)},r=function(t){if(t&&t.data){e.log.debug(e.apiName+".getModelBuildCall - success"),e.log.debug(e.apiName+".getModelBuildCall - response.data["+t.data+"]"),e.timeEnd();var n=g();v(t.data,n,e.CModel),e.log.debug(e.apiName+".getModelBuildCall - me_.mbPath["+e.mbPath+"]"),d.QualModel&&d.QualModel.LoadMng?e.getCMDataAndQCDataSequentialCall():e.getCMDataCall()}else{e.log.error(e.apiName+".getModelBuildCall - JSON.parse ERROR["+t+"]");var r=ue(!1,550,"SetModel - getModelBuildCall ERROR[Content parse error]",{});e.onSetModelErrorCallback&&e.onSetModelErrorCallback(r)}};e.timeBegin(),e.log.debug(e.apiName+".getModelBuildCall - begin");try{"undefined"!=typeof document&&(document.cookie="cc_cookie=cookieisset;path=/;");var i="";switch(e.scopeConfig.Env.ContextMode){case"revproxy":i=e.scopeConfig.Env.ProxySlug+"fiat/"+e.Env+"/data/fccf_mv/scopeTree/"+e.Scope+"_"+e.CModel+".json";break;case"absolute":i=e.scopeConfig.Env[e.Env].NSAbsSlugPath+"fiat.it/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF+"scopeTree/"+e.Scope+"_"+e.CModel+".json";break;case"cclocal":i=e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeTree/"+e.Scope+"_"+e.CModel+".json"}}catch(t){var o={};e.log.error(e.apiName+".getModelBuildCall - treeScope - ERROR["+t+"] - wsUrl:["+i+"]"),o.message="Malformed wsUrl",n(o)}if("sccfC2evo"===e.scopeConfig.Mode.initScopeType||"s4fC2evo"===e.scopeConfig.Mode.initScopeType||"sccfC2"===e.scopeConfig.Mode.initScopeType&&e.CModel&&null!==e.modelNSPathMap.get(e.CModel)){var a={};a.data=e.modelNSPathMap.get(e.CModel),e.log.info(e.apiName+".getModelBuildCall - nsbpath:["+a.data+"]"),r(a)}else e.treeScopeOverride=!0,e.log.info(e.apiName+".getModelBuildCall - wsUrl:["+i+"]"),e.axiosInstance.get(i,t).then(r,n)},e.setNPEConfig=function(){if(e.npeFrags)for(idx_=0;idx_<e.npeFrags.length;idx_++)e.npeConfig.Multi[e.npeFrags[idx_].priceType]||(e.npeConfig.Multi[e.npeFrags[idx_].priceType]={}),e.npeConfig.Multi[e.npeFrags[idx_].priceType][e.npeFrags[idx_].salesTool]||(e.npeConfig.Multi[e.npeFrags[idx_].priceType][e.npeFrags[idx_].salesTool]={},e.npeConfig.Multi[e.npeFrags[idx_].priceType][e.npeFrags[idx_].salesTool].lc=[]),e.npeFrags[idx_].locationCode?(e.npeConfig.Multi[e.npeFrags[idx_].priceType][e.npeFrags[idx_].salesTool].lc.push(e.npeFrags[idx_].locationCode),e.npeFrags[idx_].stdLocation&&"true"===e.npeFrags[idx_].stdLocation&&(e.npeConfig.Multi[e.npeFrags[idx_].priceType][e.npeFrags[idx_].salesTool].lcStd=e.npeFrags[idx_].locationCode),e.npeConfig.Mode=2):e.npeConfig.Mode=1},e.loadNPE=function(t,n,r){"use strict";var i,o,a,s,l,c;e.log.info(e.apiName+".loadNPE - ChangeRequest["+$(t)+"]");var u=function(t){e.log.debug(e.apiName+".loadNPE - ERROR["+t.message+"]"),c=ue(!1,570,"loadNPE - Error["+t.message+"]",t.data),r&&r(c)},d=function(t){t&&t.data&&t.data.priceFragment?(e.log.debug(e.apiName+".loadNPE - success"),e.npe=t.data,e.nStat=e.npe&&e.npe.priceFragment?i:"NOP",c=ue(!0,200,"loadNPE - Successful loaded["+i+"]",{}),e.timeEnd(),n&&n(c)):(e.log.error(e.apiName+".loadNPE - JSON.parse ERROR["+t+"]"),c=ue(!1,571,"loadNPE - ERROR[NPE fragment parse error]",{}),r&&r(c))};e.timeBegin(),e.log.debug(e.apiName+".loadNPE - begin");var p=m();if(t&&t.Selections&&1===t.Selections.length&&t.Selections[0].Cod&&t.Selections[0].ChangeType&&("STALE"===t.Selections[0].ChangeType||"STANDARD"===t.Selections[0].ChangeType)){e.npeModel=t.Selections[0].Cod,i=t.Selections[0].ChangeType,o=t.Selections[0].PriceType?t.Selections[0].PriceType:null,a=t.Selections[0].SalesTool?t.Selections[0].SalesTool:null,s=t.Selections[0].LocationCode?t.Selections[0].LocationCode.toString():null;var f=!1;try{switch(e.npeConfig.Mode){case 2:i&&o&&a&&e.npeConfig.Multi[o][a]&&(f=!(!(l=e.npeConfig.Multi[o][a].lc.includes(s)?s:e.npeConfig.Multi[o][a].lcStd?e.npeConfig.Multi[o][a].lcStd:null)||""===l));break;case 1:i&&o&&a&&e.npeConfig.Multi[o][a]&&(f=!0);break;default:i&&(f=!0)}}catch(e){f=!1,console.log(e.stack)}if(f)e.log.debug(e.apiName+".loadNPE - Commercial Model:["+e.npeModel+"]"),e.npeModel&&function(t,n,r,i,o){if(e.log.debug(e.apiName+".loadNPE - me_.modelNSPathMap:["+e.modelNSPathMap+"]"),"sccfC2evo"===e.scopeConfig.Mode.initScopeType||"s4fC2evo"===e.scopeConfig.Mode.initScopeType||"sccfC2"===e.scopeConfig.Mode.initScopeType&&t&&null!==e.modelNSPathMap.get(t)){var a={};if(a.data=e.modelNSPathMap.get(t),a.data){e.log.info(e.apiName+".loadNPE - nsbpath:["+a.data+"]");var s=g();v(a.data,s,t)}var l=function(t,n,r,i,o){var a=null;try{switch(e.npeConfig.Mode){case 2:a=e.cmPath?e.mbPath+"/"+e.cmPath+"/NPE.json":e.mbPath.replace("CM_T5_","NPE_"+n+"_"+r+"_"+i+"_"+o+"_");break;case 1:a=e.cmPath?e.mbPath+"/"+e.cmPath+"/NPE.json":e.mbPath.replace("CM_T5_","NPE_"+n+"_"+r+"_"+i+"_");break;default:a=e.cmPath?e.mbPath+"/"+e.cmPath+"/NPE.json":e.mbPath.replace("CM_T5_","NPE_"+n+"_")}e.mbPath.indexOf("?")>0&&(a=a+"?"+e.mbPath.split("?")[1]),e.log.debug(e.apiName+".loadNPE - npeUrl:["+a+"]"),-1===e.mbPath.indexOf("_"+t)&&(a=null,(s={}).message="NPE fragment content - ModelCode mismatch",s.data={},u(s))}catch(e){var s;a=null,(s={}).message="NPE fragment content - Malformed npeUrl",s.data={},u(s)}return a}(t,n,r,i,o);l&&e.axiosInstance.get(l,p).then(d,u)}else{u({message:"NPE fragment content - NOT SCCF Channel",data:{}})}}(e.npeModel,i,o,a,l);else(h={}).message="Invalid ChangeRequest - Mode:["+e.npeConfig.Mode+"]",h.data=t,u(h)}else{var h;(h={message:"ChangeRequest malformed"}).data=t,u(h)}},e.loadECommOrdConfig=function(t){t&&t.Configurations&&(t.Configurations.Vehicle&&t.Configurations.Vehicle.ECommOrdValidOverride&&(e.ECommOrdValidOverride="true"===t.Configurations.Vehicle.ECommOrdValidOverride.toLowerCase()),t.Configurations.Ecommerce&&t.Configurations.Ecommerce.ECommOrdValidOverride&&("object"==typeof t.Configurations.Ecommerce.ECommOrdValidOverride&&0===t.Configurations.Ecommerce.ECommOrdValidOverride.length?e.ECommOrdValidOverride=null:e.ECommOrdValidOverride="true"===t.Configurations.Ecommerce.ECommOrdValidOverride.toLowerCase()),t.Configurations.Ecommerce&&t.Configurations.Ecommerce.isQualModActive&&"true"===t.Configurations.Ecommerce.isQualModActive.toLowerCase()&&(e.isQualModActive=!0))},e.getCMDataCall=function(){"use strict";var t=m(),n=function(t){e.log.error(e.apiName+".getCMDataCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getCMDataCall - begin");var r="";try{r=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getCMDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data)e.log.debug(e.apiName+".getCMDataCall - success"),e.timeEnd(),e.loadECommOrdConfig(t.data),e.createComModRuleEngine(t.data);else{e.log.error(e.apiName+".getCMDataCall - JSON.parse ERROR["+t+"]");var n=ue(!1,550,"Init - getCMDataCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)}}),n)},e.getCMDataAndQCDataParallelCall=function(){"use strict";var t,n,r={isSuccCM:!1,isSuccQC:!1},i=m(),o=function(t){e.log.error(e.apiName+".getCMDataCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataAndQCDataParallelCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - begin");var a="";try{a=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataAndQCDataParallelCall - wsUrl:["+a+"]")}catch(t){var s={};e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - ERROR["+t+"] - wsUrl:["+a+"]"),s.message="Malformed wsUrl",o(s)}e.axiosInstance.get(function(){var t=null;try{if(t=e.cmPath?e.mbPath+"/"+e.cmPath+"/QC.json":e.mbPath.replace("CM_T5_","QM_"),e.mbPath.indexOf("?")>0)t=t+"?"+e.mbPath.split("?")[1];e.log.debug(e.apiName+".getQCDataUrl - qcUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getQCDataUrl - qcUrl ERROR["+t.message+"]")}return t}(),i).then((function(i){if(i&&i.data)r.isSuccQC=!0,n=i.data,r.isSuccCM&&r.isSuccQC&&(e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - success"),e.timeEnd(),e.createComModRuleEngine(t,n));else{e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - JSON.parse ERROR["+i+"]");var o=ue(!1,550,"Init - getCMDataAndQCDataParallelCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}}),(function(t){e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataAndQCDataParallelCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)})),e.axiosInstance.get(a,i).then((function(i){if(i&&i.data)r.isSuccCM=!0,t=i.data,e.loadECommOrdConfig(t),r.isSuccCM&&r.isSuccQC&&(e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - success"),e.timeEnd(),e.createComModRuleEngine(t,n));else{e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - JSON.parse ERROR["+i+"]");var o=ue(!1,550,"Init - getCMDataAndQCDataParallelCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}}),o)},e.getCMDataAndQCDataSequentialCall=function(){"use strict";var t,n,r=m(),i=function(t){e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataAndQCDataSequentialCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)},o=function(t){e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getCMDataAndQCDataSequentialCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)},a=function(r){if(r&&r.data)n=r.data,e.createComModRuleEngine(t,n);else{e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - JSON.parse ERROR["+r+"]");var i=ue(!1,550,"Init - getCMDataAndQCDataSequentialCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(i)}};e.timeBegin(),e.log.debug(e.apiName+".getCMDataAndQCDataSequentialCall - begin");var s="";try{s=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataAndQCDataSequentialCall - wsUrl:["+s+"]")}catch(t){var l={};e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t+"] - wsUrl:["+s+"]"),l.message="Malformed wsUrl",i(l)}e.axiosInstance.get(s,r).then((function(n){if(n&&n.data)t=n.data,e.loadECommOrdConfig(t),null===e.ECommOrdValidOverride&&e.isQualModActive?e.axiosInstance.get(function(){var t=null;try{t=e.cmPath?e.mbPath+"/"+e.cmPath+"/QC.json":e.mbPath.replace("CM_T5_","QM_"),e.mbPath.indexOf("?")>0&&(t=t+"?"+e.mbPath.split("?")[1]),e.log.debug(e.apiName+".getQCDataUrl - qcUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getQCDataUrl - qcUrl ERROR["+t.message+"]")}return t}(),r).then(a,o):e.createComModRuleEngine(t);else{e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - JSON.parse ERROR["+n+"]");var i=ue(!1,550,"Init - getCMDataAndQCDataSequentialCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(i)}}),i)},e.initStock=function(t,n,r,i,o,c,u,d,p){"use strict";e.mbPath=n,e.cmPath=r,e.onInitStockCallback=i,e.onInitStockErrorCallback=o,e.log=s();var f=s.createConsoleAppender("consoleAppender");f.level=s.getWarnLevel(),e.log.setOptions({appenders:[f]}),e.log.info(e.apiName+".initStock - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".initStock - begin"),e.log.debug(e.apiName+".initStock - lodash:"+a.VERSION),e.log.debug(e.apiName+".initStock - Params - cmDataSource:["+t+"] mbPath:["+n+"] cmPath:["+n+"]"),e.createFccf(),e.log.debug(e.apiName+".initStock - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=u,e.cytoVehicleDiv=d,e.selectionLogDiv=p,e.optionalCustomConfig=c,e.jsonpath=l,t||e.getStockDataCall(),e.log.debug(e.apiName+".initStock - end")},e.getStockDataCall=function(){"use strict";var t=m(),n=function(t){e.log.error(e.apiName+".getStockDataCall - ERROR["+t.message+"]");var n=ue(!1,540,"Init - getStockDataCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getStockDataCall - begin");var r="";try{r=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getStockDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getStockDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data)e.log.debug(e.apiName+".getStockDataCall - success"),e.timeEnd(),e.createStockRuleEngine(t.data);else{e.log.error(e.apiName+".getStockDataCall - JSON.parse ERROR["+t+"]");var n=ue(!1,550,"Init - getStockDataCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)}}),n)},e.createStockRuleEngine=function(n){"use strict";if(e.timeBegin(),e.log.debug(e.apiName+".createStockRuleEngine - begin"),n&&n.BapContent&&(t=n.BapContent),n&&n.ComModGraph&&(t=n),t&&t.ComModGraph)o={},o=t.ComModGraph,e.log.debug(e.apiName+".createStockRuleEngine - Valid Commercial Model Data"),e.cmRuleEngine=new c,e.cmRuleEngine.init(o,e.cytoComModDiv,e.selectionLogDiv,e.log,e.populateFccfStock);else{e.log.error(e.apiName+".createStockRuleEngine - ERROR[Invalid Commercial Model Data]");var r=ue(!1,560,"Init - ERROR[Invalid Commercial Model Data]",{});e.onInitStockErrorCallback&&e.onInitStockErrorCallback(r)}},e.populateFccfStock=function(){"use strict";e.timeEnd(),e.timeBegin(),e.log.debug(e.apiName+".populateFccfStock - begin");var n=ue(!0,200,"",{});try{e.fccf.ComMod.Cod=t.ComModCod.toString(),e.fccf.ComMod.Des=t.ComModDes.toString(),e.fccf.VINs=t.VINs}catch(t){e.log.error(e.apiName+".populateFccfStock - ERROR["+t.message+"]"),n=ue(!1,540,"InitStock - populateFccfStock ERROR["+t.message+"]",{}),e.onInitStockErrorCallback&&e.onInitStockErrorCallback(n)}e.onInitStockCallback(n)},e.getMVSFileName=function(t){r="";try{var n=d&&d.HeaderScopeContextCod?d.HeaderScopeContextCod:e.fccf.Header.Scope.Market.Cod+e.fccf.Header.Scope.Language.Cod+e.fccf.Header.Scope.Brand.Cod,r=d.MvsFile.Prefix+n+"_"+e.fccf.ComMod.Cod+"_"+t+"."+d.MvsFile.Extension}catch(t){e.log.debug(e.apiName+".getMVSDataCall - wsUrl ERROR - "+t.message)}return r},e.getMVSDataCall=function(n,r){"use strict";var o=m(),a=(new i.Agent({rejectUnauthorized:!1,headers:{"Access-Control-Allow-Origin":"*"}}),function(t){e.log.error(e.apiName+".getMVSDataCall - ERROR["+t.message+"]"),e.log.debug(e.apiName+".getMVSDataCall - ERROR["+t.message+"]"),e.isValidSetVeh=!1;var n=ue(!1,540,"setVehicle ERROR["+t.message+"]",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(n)});e.timeBegin(),e.log.debug(e.apiName+".getMVSDataCall - begin");var s=function(){var t=null;try{var r=e.getMVSFileName(n);e.log.debug(e.apiName+".getMVSDataCall - mvsFileName:["+r+"]");var i=e.mbPath.split("/"),o=e.mbPath.substr(0,e.mbPath.length-i[i.length-1].length);if(t=e.cmPath?e.mbPath+"/"+e.cmPath+"/"+r:o+r,e.mbPath.indexOf("?")>0)t=t+"?"+e.mbPath.split("?")[1];e.log.debug(e.apiName+".getMVSDataCall - wsUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getMVSDataCall - wsUrl ERROR["+t.message+"]")}return t}();if(s&&"string"==typeof s)e.log.info(e.apiName+".getMVSDataCall - wsUrl:["+s+"]"),e.axiosInstance.get(s,o).then((function(r){if(r&&r.data&&r.data.Cod){e.log.debug(e.apiName+".getMVSDataCall - success"),e.timeEnd(),t.Vehs.length>e.vehBufferLength&&t.Vehs.shift(),t.Vehs.push(r.data);for(var i=t.Vehs,o=0;o<i.length;o++){var a=i[o];if(a.Cod===n){V(a),e.createVehicleRuleEngine(n);break}}}else{e.log.error(e.apiName+".getMVSDataCall - MVS Data JSON.parse ERROR"),e.isValidSetVeh=!1;var s=ue(!1,550,"setVehicle ERROR[Content parse error]",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)}}),a);else{var l={message:"Malformed wsUrl"};a(l)}};e.mergeFccfLibConfig=function(e){e&&a.merge(d,e)},e.createComModRuleEngine=function(r,i){if(e.timeBegin(),e.log.debug(e.apiName+".createComModRuleEngine - begin"),n=i,r&&r.BapContent&&(t=r.BapContent),r&&r.ComMod&&(t=r),t&&t.Configurations&&t.ComMod&&t.ComMod.ComModGraph)e.npe={},e.createECommerceDateBaseAttrs(t),e.checkECommerceValidVehicle(t,n),o={},o=t.ComMod.ComModGraph,e.log.debug(e.apiName+".createComModRuleEngine - Valid Commercial Model Data"),e.cmRuleEngine=new c,e.cmRuleEngine.init(o,e.cytoComModDiv,e.selectionLogDiv,e.log,e.populateFccf);else{e.log.error(e.apiName+".createComModRuleEngine - ERROR[Invalid Commercial Model Data]");var a=ue(!1,560,"Init - ERROR[Invalid Commercial Model Data]",{});e.onInitErrorCallback&&e.onInitErrorCallback(a)}},e.createFccf=function(){"use strict";e.log.debug(e.apiName+".createFccf"),e.fccf.Header={},e.fccf.Header.ContentConfig={},e.fccf.ComMod={},e.fccf.Action={},e.fccf.Scope={},e.fccf.ComMod.Cod="",e.fccf.ComMod.Des="",e.fccf.ComMod.DSeq="",e.fccf.ComMod.AddAttrs=[],e.fccf.ComMod.CommonData={},e.fccf.ComMod.CommonData.VehsData={},e.fccf.Action.changeScenarios=[],e.fccf.Action.ChangeRequest={},e.fccf.Action.ChangeRequest.selections=[],e.fccf.Scope.ComModels={},e.npe={},e.nStat="ABSENT"},e.populateFccf=function(){"use strict";e.timeEnd(),e.timeBegin(),e.log.debug(e.apiName+".populateFccf - begin");var n=ue(!0,200,"",{});try{d.Vehicle.PriceIndex=t.Configurations.Vehicle.PriceIndex,d.Vehicle.PriceNoVatIndex=t.Configurations.Vehicle.PriceNoVatIndex,d.Option.PriceIndex=t.Configurations.Option.PriceIndex,d.Option.PriceNoVatIndex=t.Configurations.Option.PriceNoVatIndex,d.Option.PriceVatPerc=t.Configurations.Option.PriceVatPerc,d.Option.PriceVatPercMkt=t.Configurations.Option.PriceVatPercMkt,d.MapConfig=t.Configurations.MapConfig,e.optionalCustomConfig&&a.merge(d,e.optionalCustomConfig),e.fccf.Header=t.Header,e.fccf.Header.ContentConfig=t.Configurations,e.fccf.ComMod.Cod=t.ComMod.ComModCod.toString(),e.fccf.ComMod.Des=t.ComMod.ComModDes.toString(),e.fccf.ComMod.DSeq=t.ComMod.DSeq?t.ComMod.DSeq.toString():"",e.fccf.ComMod.FamilyCod=t.ComMod.ComModGlobalCod?t.ComMod.ComModGlobalCod.toString():"",e.fccf.ComMod.CommonData.Currency=t.MarketBrand.Currency,y(),e.dataSrcType=e.BrandName&&e.scopeConfig.Brand[e.BrandName].DataType?e.scopeConfig.Brand[e.BrandName].DataType:null,b(t.ComMod.AddAttrs,e.fccf.ComMod.AddAttrs),C(),x(),e.timeEnd(" --- Dictionaries - 01 END"),e.timeBegin(),E(),S(),e.timeEnd(" --- Comm Opt/Veh Groups - 02 END"),e.timeBegin(),w(),e.timeEnd(" --- BaseAttributes - 03 END"),e.timeBegin(),R(),e.timeEnd(" --- Vehicles - 08 END"),e.timeBegin(),e.timeBegin(),e.npe=t.NPE?t.NPE:{},e.nStat=e.npe&&e.npe.priceFragment?"ONCONTENT":"POPFAIL",e.timeEnd(" --- NPE - 09 END"),e.timeBegin(),e.log.debug(e.apiName+".populateFccf - end")}catch(t){e.log.error(e.apiName+".populateFccf - ERROR["+t.message+"]"),n=ue(!1,540,"Init - populateFccf ERROR["+t.message+"]",{}),e.onSetModelErrorCallback?e.onSetModelErrorCallback(n):e.onInitErrorCallback&&e.onInitErrorCallback(n)}n.success&&e.onInitCallback(n)},e.createECommerceDateBaseAttrs=function(t){"use strict";var n=function(t){var n=null;try{if(""!==t){var r=t.split("-");n=new Date(r[2]+"-"+r[1]+"-"+r[0]+"T00:00:00.000Z").getTime()}}catch(n){e.log.warn(e.apiName+".createECommerceDateBaseAttrs - dateStr conversion WARN: ["+t+"]")}return n};if(t.ComMod.VehsData){e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList=[],e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList=[],e.fccf.ComMod.CommonData.VehsData.Vehs={};t.ComMod.ComModGraph.push({group:"nodes",data:{id:"ECD0_1",type:"BAV"}});t.ComMod.BAttrs.push({BAttrCod:"ECD0",BAttrType:"D",BAttrDes:[],BAttrVals:[{BAttrValCod:"1",BAttrValDes:[]}]});for(var r=(new Date).getTime(),i=0;i<t.ComMod.VehsData.length;i++){var o=t.ComMod.VehsData[i];e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod]={};var a=null,s=null,l=!1;if(o&&o.EcomStartDate&&"string"==typeof o.EcomStartDate&&10===o.EcomStartDate.length&&(a=n(o.EcomStartDate))&&!isNaN(a)&&(o.EcomEndDate&&"string"==typeof o.EcomEndDate&&(s=n(o.EcomEndDate)),s&&!isNaN(s)?l=a<=r&&r<=s:isNaN(s)||(l=a<=r),l)){var c={group:"edges",data:{source:o.Cod,target:"ECD0_1",type:"V",altGroupId:[]}};t.ComMod.ComModGraph.push(c),e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList.push(o.Cod)}e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod].ProdStartDate=o.ProdStartDate?o.ProdStartDate.toString():"",e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod].ProdEndDate=o.ProdEndDate?o.ProdEndDate.toString():""}}},e.checkECommerceValidVehicle=function(t,n){"use strict";e.timeBegin();var r=function(t){var n=null;try{if(""!==t){var r=t.split("-");n=new Date(r[2]+"-"+r[1]+"-"+r[0]+"T00:00:00.000Z").getTime()}}catch(n){e.log.warn(e.apiName+".checkECommerceValidVehicle - dateStr conversion WARN: ["+t+"]")}return n},i=function(e,t){var n=!1;return e&&e.OSD&&"string"==typeof e.OSD&&10===e.OSD.length&&(n=r(e.OSD)-5184e6<t),n&&e&&e.OED&&"string"==typeof e.OED&&10===e.OED.length&&(n=t<r(e.OED)),n};if(d.QualModel&&d.QualModel.LoadMng&&n){var o=(new Date).getTime(),s=[];n.Vehs.length?s=n.Vehs:n.Vehs&&n.Vehs.MVS&&s.push(n.Vehs.MVS);for(var l=0;l<s.length;l++){var c=s[l];e.fccf.ComMod.CommonData.VehsData.Vehs&&e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS]&&(e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidIntColList=[],e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidOptList=[],"PUBLISH"!==t.Header.Env||"10"!==c.Status&&"11"!==c.Status||(e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidIntColList="string"==typeof c.ecomData.Pub.ColIns?c.ecomData.Pub.ColIns.split(";"):[],e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidOptList="string"==typeof c.ecomData.Pub.Opts?c.ecomData.Pub.Opts.split(";"):[]),"PREVIEW"!==t.Header.Env||"10"!==c.Status&&"12"!==c.Status&&"14"!==c.Status||(e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidIntColList="string"==typeof c.ecomData.Prev.ColIns?c.ecomData.Prev.ColIns.split(";"):[],e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidOptList="string"==typeof c.ecomData.Prev.Opts?c.ecomData.Prev.Opts.split(";"):[]),e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidIntColList.length>0||e.fccf.ComMod.CommonData.VehsData.Vehs[c.MVS].OrdInvalidOptList.length>0||e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.push(c.MVS))}}else{if(t.ComMod.VehsData){o=(new Date).getTime();if(!a.isEmpty(e.fccf.ComMod.CommonData.VehsData.Vehs))for(l=0;l<t.Vehs.length;l++){c=t.Vehs[l];if(e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod]&&(e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod].OrdInvalidIntColList=[],e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod].OrdInvalidOptList=[],c.ColInDatas&&c.OptDatas)){for(var u=[],p=[],f=[],h=[],g=0;g<c.OptGroups.length;g++){var v=c.OptGroups[g];switch(v.Cod){case"IN":for(var m=0;m<v.Opts.length;m++)for(var y=v.Opts[m].AddAttrs,b=0;b<y.length;b++)y[b].AttrCod&&"RC"===y[b].AttrCod&&u.push(v.Opts[m].Cod.concat("_").concat(y[b].AttrVal));break;case"CL":break;default:for(var C=0;C<v.Opts.length;C++)"BO"!==v.Cod&&"IO"!==v.Cod&&"PK"!==v.Cod&&f.push(v.Opts[C].Cod)}}for(g=0;g<c.ColInDatas.length;g++){var x=c.ColInDatas[g];i(x,o)||p.push(x.IntCode.concat("_").concat(x.ColCode))}for(g=0;g<c.OptDatas.length;g++){var E=c.OptDatas[g];i(E,o)||h.push(E.CodOpt)}var S=a.intersection(p,u),w=a.intersection(h,f);S.length>0&&(e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod].OrdInvalidIntColList=S),w.length>0&&(e.fccf.ComMod.CommonData.VehsData.Vehs[c.Cod].OrdInvalidOptList=w),S.length>0||w.length>0||e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.push(c.Cod)}}}e.timeEnd("ECommerceValidVehicle - end")}},e.getCMData=function(){"use strict";return t},e.getQMData=function(){"use strict";return n};var f=function(t,n,r,i){"use strict";var o=!1;e.log.debug(e.apiName+".selectScope - begin");try{var a=e.scopeConfig.Brand[t]?e.scopeConfig.Brand[t].Cod:null,s=a&&e.scopeConfig.Brand[t]&&e.scopeConfig.Brand[t].Mkt[n]?e.scopeConfig.Brand[t].Mkt[n].Cod:null,l=a&&e.scopeConfig.Brand[t]&&e.scopeConfig.Brand[t].Mkt[n]&&e.scopeConfig.Brand[t].Mkt[n].Lng[r]?e.scopeConfig.Brand[t].Mkt[n].Lng[r].Cod:null,c=e.scopeConfig.Env.envList.includes(i.toLowerCase())?i.toLowerCase():null;a&&s&&l&&c&&(e.Scope=s+l+a,e.Env=c,e.BrandName=t,e.BrandCod=a,e.MarketName=n,e.LangName=r,o=!0),e.log.info(e.apiName+".selectScope - me_.Scope:["+e.Scope+"] scopeFound:["+o+"]")}catch(t){e.log.error(e.apiName+".selectScope - ERROR["+t.message+"]");var u=ue(!1,594,"InitScope - selectScope ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(u)}return o},h=function(){"use strict";var t=e.scopeConfig.Env[e.Env].RelEnvPrev,n={fccfC3:{},sccfC2:{},sccfC2evo:{},s4fC2evo:{}};n.fccfC3.revproxy=e.scopeConfig.Env.ProxySlug+"fiat/"+t+"/data/fccf_mv/scopeJson/"+e.Scope+".json",n.fccfC3.absolute=e.scopeConfig.Env[t].NSAbsSlugPath+"fiat.it/"+e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeJson/"+e.Scope+".json",n.fccfC3.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeJson/"+e.Scope+".json",n.sccfC2.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/sccf/scope/"+e.Scope+".json",n.sccfC2.absolute=e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".at/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",n.sccfC2.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json";var r=e.scopeConfig.Env.ProxySlugEvo,i=e.scopeConfig.Env[e.Env].SiteEnv,o=r+i+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/sccf/scope/"+e.Scope+".json";return n.sccfC2evo.revproxy=o,n.sccfC2evo.absolute=e.scopeConfig.Env.ConfigUrl+o,n.sccfC2evo.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",o=r+i+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/fccf_mv/scope/"+e.Scope+".json",n.s4fC2evo.revproxy=o,n.s4fC2evo.absolute=e.scopeConfig.Env.ConfigUrl+o,n.s4fC2evo.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",n[e.scopeConfig.Mode.initScopeType][e.scopeConfig.Env.ContextMode]},g=function(){"use strict";var t,n={fccfC3:{},sccfC2:{},sccfC2evo:{},s4fC2evo:{}};n.fccfC3.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/fccf_mv/",n.fccfC3.absolute="fiatprofessional"!==e.BrandName?e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".it/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF:e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".com/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF,n.fccfC3.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF,n.sccfC2.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/sccf/",n.sccfC2.absolute="fiatprofessional"!==e.BrandName?e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".at/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS:e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".com/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,n.sccfC2.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS;var r=e.scopeConfig.Env.ProxySlugEvo,i=e.scopeConfig.Env[e.Env].SiteEnv,o=r+i+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/sccf/";return n.sccfC2evo.revproxy=o,n.sccfC2evo.absolute=e.scopeConfig.Env.ConfigUrl+o,n.sccfC2evo.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,o=r+i+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/fccf_mv/",n.s4fC2evo.revproxy=o,n.s4fC2evo.absolute=e.scopeConfig.Env.ConfigUrl+o,n.s4fC2evo.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,t=n[e.scopeConfig.Mode.initScopeType][e.scopeConfig.Env.ContextMode],e.log.debug(">>>>>>>>> prePath_:["+t+"]"),t},v=function(t,n,r){"use strict";var i=t.toString().split("/");10===i.length?e.mbPath=n+i[6]+"/"+i[7]+"/"+i[8]+"/"+i[9]+"/CM_T5_"+e.Scope+"_"+r+".json":e.mbPath=n+i[1]+"/"+i[2]+"/"+i[3]+"/"+i[4]+"/CM_T5_"+e.Scope+"_"+r+".json",0===n.indexOf("https://www.tofas.it")&&(e.mbPath="https://otomobil.fiat.com.tr/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF+i[6]+"/"+i[7]+"/"+i[8]+"/"+i[9]+"/CM_T5_"+e.Scope+"_"+r+".json?brand=tofas")},m=function(){"use strict";var t={method:"HEAD",mode:"cors",headers:{"Access-Control-Allow-Origin":"*",Accept:"application/json","Content-Type":"application/json"},withCredentials:!1,crossdomain:!0};return"absolute"===e.scopeConfig.Env.ContextMode&&(t.headers.Cookie="cc_cookie=cookieisset;path=/;"),t},y=function(){if(t.Header&&t.Header.Scope&&t.Header.Scope.Brand&&t.Header.Scope.Market&&t.Header.Scope.Language&&(!e.fccf.Scope.Brand||!e.fccf.Scope.Brand.Cod)){var n=t.Header.Scope.Brand.Cod?t.Header.Scope.Brand.Cod:null,r=t.Header.Scope.Market.Cod?t.Header.Scope.Market.Cod:null,i=t.Header.Scope.Language.Cod?t.Header.Scope.Language.Cod:null,o=a.findKey(e.scopeConfig.Brand,["Cod",n]),s=o?a.findKey(e.scopeConfig.Brand[o].Mkt,["Cod",r]):null,l=o&&s?a.findKey(e.scopeConfig.Brand[o].Mkt[s].Lng,["Cod",i]):null;e.fccf.Header&&e.fccf.Header.Scope&&o&&s&&l&&(e.BrandName=o,e.MarketName=s,e.LangName=l,e.fccf.Scope.Brand=e.fccf.Header.Scope.Brand,e.fccf.Scope.Brand.Key=e.BrandName,e.fccf.Scope.Brand.DataType=e.scopeConfig.Brand[e.BrandName].DataType,e.fccf.Scope.Market=e.fccf.Header.Scope.Market,e.fccf.Scope.Market.Key=e.MarketName,e.fccf.Scope.Language=e.fccf.Header.Scope.Language,e.fccf.Scope.Language.key=e.LangName)}},b=function(e,t){"use strict";for(var n=0;n<e.length;n++)t[e[n].AttrCod]||(t[e[n].AttrCod]=[]),t[e[n].AttrCod].push(e[n].AttrVal.toString())},C=function(){"use strict";for(var n=t.MarketBrand.DcTypes,r=0;r<n.length;r++)for(var i=n[r],o=i.DcTypeCod,a=i.Itms,s=0;s<a.length;s++){var l=a[s].ItmCod,c=a[s].ItmDes.toString(),u=a[s]&&a[s].ItmSeq?a[s].ItmSeq.toString():"";if(e.dcTypeMap.set(o+l,c),"OG"===o){var d={};d.Des=c,d.Seq=u,e.dictOgMap.set(l,d)}"CT"===o&&e.dictBodyCtMap.set(l,c),"CG"===o&&e.dictBodyCgMap.set(l,c),"IT"===o&&e.dictSeatItMap.set(l,c),"IG"===o&&e.dictSeatIgMap.set(l,c)}},x=function(){"use strict";e.fccf.ComMod.CommonData.FeatureTypes={};for(var n=t.MarketBrand.FtTypeCats,r=0;r<n.length;r++)for(var i=n[r],o=i.FtTypeCatCod,a=i.FtTypeCatDes.toString(),s=i.FtTypes,l=0;l<s.length;l++){var c=s[l],u=c.FtTypeCod;c.FtTypeCatCod=o,c.FtTypeCatDes=a,e.ftTypeMap.set(u,c),e.fccf.ComMod.CommonData.FeatureTypes[u]={},e.fccf.ComMod.CommonData.FeatureTypes[u]=c}},E=function(){"use strict";e.fccf.ComMod.CommonData.OptionGroups={},e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES={},e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS={},e.fccf.ComMod.CommonData.OptionGroups.BODYCT={},e.fccf.ComMod.CommonData.OptionGroups.BODYCG={},e.fccf.ComMod.CommonData.OptionGroups.SEATIT={},e.fccf.ComMod.CommonData.OptionGroups.SEATIG={},e.dictOgMap.forEach((function(t,n){var r={};"string"==typeof t&&(r.Des=t.toString(),r.DSeq=""),"object"==typeof t&&(r.Des=t.Des.toString(),r.DSeq=t.Seq.toString());var i=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS[n]:d.MapConfig[0].OPTGROUPS[n];i&&i.Key?(r.Cod=i.Key,r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),r.Type="CONFIGKEYS",e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[i.Key]=r):(i&&!i.Key?r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()):(d.MapConfig.all&&d.MapConfig.all.CATGROUPS?i=d.MapConfig.all.CATGROUPS[n]:d.MapConfig[0]&&d.MapConfig[0].CATGROUPS&&(i=d.MapConfig[0].CATGROUPS[n]),i&&i.Key?(r.Cod=i.Key,r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),r.isChgVis=!i.isChgVis||JSON.parse(i.isChgVis.toLowerCase())):(r.isVisible=!0,r.isChgVis=!0)),r.Cod=n,r.Type="CATEGORIES",e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[n]=r)}));var t=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS.NOTIN:d.MapConfig[0].OPTGROUPS.NOTIN;t&&((n={}).Cod=t.Key,n.isVisible=JSON.parse(t.isOutsideVis.toLowerCase()),n.Type="CONFIGKEYS",n.Des=t.Des,e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[n.Cod]=n);var n,r=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS.NONE:d.MapConfig[0].OPTGROUPS.NONE;r&&((n={}).Cod=r.Key,n.isVisible=JSON.parse(r.isOutsideVis.toLowerCase()),n.Type="CONFIGKEYS",n.Des=r.Des,e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[n.Cod]=n);z(e.dictBodyCtMap,"BODYCT",e.fccf.ComMod.CommonData.OptionGroups.BODYCT),z(e.dictBodyCgMap,"BODYCG",e.fccf.ComMod.CommonData.OptionGroups.BODYCG),z(e.dictSeatItMap,"SEATIT",e.fccf.ComMod.CommonData.OptionGroups.SEATIT),z(e.dictSeatIgMap,"SEATIG",e.fccf.ComMod.CommonData.OptionGroups.SEATIG)},S=function(){"use strict";var n=t.ComMod.VehGroups,r=[];e.fccf.ComMod.CommonData.VehicleGroups={},e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS={},e.fccf.ComMod.CommonData.VehicleGroups.MODELYEARS={},e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel={},e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle={},e.fccf.ComMod.CommonData.VehicleGroups.Trim={},e.fccf.ComMod.CommonData.VehCods=[];for(var i=0;i<n.length;i++){var o,s=n[i];e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod]={},e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].Cod=s.VehGroupCod,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].Des=s.VehGroupDes.toString(),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].VehCods=s.VehCods,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].AddAttrs=[],e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].SRelOpts=[],e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].URelOpts=[],d.MapConfig.all&&d.MapConfig.all.VEHGROUPS?o=d.MapConfig.all.VEHGROUPS[s.VehGroupCod]:d.MapConfig[0]&&d.MapConfig[0].VEHGROUPS&&(o=d.MapConfig[0].VEHGROUPS[s.VehGroupCod]),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].isVisible=!o||JSON.parse(o.isOutsideVis.toLowerCase()),b(s.AddAttrs,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].AddAttrs),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].SRelOpts=s.SRelOpts?s.SRelOpts:[],e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].URelOpts=s.URelOpts?s.URelOpts:[],r=a.union(r,s.VehCods)}if(e.fccf.ComMod.CommonData.VehCods=r,e.fccf.ComMod.CommonData.VehicleGroups.Trim=e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS,t.ComMod.Groups&&t.ComMod.Groups.DerivedModel){var l=t.ComMod.Groups.DerivedModel;for(i=0;i<l.length;i++){var c=l[i];e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[c.Cod]={},e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[c.Cod].Cod=c.Cod,e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[c.Cod].Des=c.Des.toString(),e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[c.Cod].VehCods=c.VehCods}}if(t.ComMod.Groups&&t.ComMod.Groups.BodyStyle){var u=t.ComMod.Groups.BodyStyle;for(i=0;i<u.length;i++){var p=u[i];e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod]={},e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].Cod=p.Cod,e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].Des=p.Des.toString(),e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].VehCods=p.VehCods}}},w=function(){"use strict";var n;e.BAttrs=t.ComMod.BAttrs,e.fccf.ComMod.CommonData.BaseAttribute={},e.log.debug(e.apiName+".populateFccf - Populate Base Attributes"),n=e.BAttrs;for(var r=0;r<n.length;r++){var i=n[r];switch(i.BAttrType){case"F":var o=e.ftTypeMap.get(i.BAttrCod);if(o){i.BAttrDes=o.FtTypeDes.toString();for(var a=0;a<i.BAttrVals.length;a++){var s=i.BAttrVals[a];if(o.Fts.length>0)for(var l=0;l<o.Fts.length;l++){var c=o.Fts[l];if(s.BAttrValCod===c.FtCod){s.BAttrValDes=c.FtDes.toString(),B(i,s);break}}else s.BAttrValCod=s.BAttrValDes.toString().replace(/\s+/g,""),B(i,s);Q(s,0)}}break;case"V":for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];B(i,s),Q(s,0)}break;case"O":var u=e.dcTypeMap.get("OG".concat(i.BAttrCod));i.BAttrDes=u.toString();for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];var d=e.dcTypeMap.get("OD".concat(s.BAttrValCod));s.BAttrValDes=d||"",B(i,s),Q(s,0)}break;case"D":for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];B(i,s),Q(s,0)}}M(i)}},V=function(t){"use strict";var n=O(t);A(n),e.fccf.Vehicles[t.Cod]=n},R=function(){"use strict";e.log.debug(e.apiName+".populateFccf - Populate Vehicles "),e.fccf.Vehicles={};for(var n=t.Vehs,r=0;r<n.length;r++){var i=n[r];V(i)}},O=function(n){"use strict";var r={};r.Cod=n.Cod?n.Cod.toString():"",r.BaseCod=n.BaseCod?n.BaseCod.toString():"",r.Des=n.Des?n.Des.toString():"",r.UseCod=n.UseCod?n.UseCod.toString():"",r.FamBudget=n.FamBudget?n.FamBudget.toString():"",r.CompVis=n.CompVis?n.CompVis.toString():"",r.Price=n.Price,r.PriceArray=n.PriceArray,r.OutOfDate=n.OutOfDate?n.OutOfDate.toString():"",r.ECommStartDate=n.EcomStartDate?n.EcomStartDate.toString():"",r.ECommEndDate=n.EcomEndDate?n.EcomEndDate.toString():"",r.isECommDateOpen=e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList?e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList.includes(r.Cod):null,null!==e.ECommOrdValidOverride?r.isECommOrdValid=e.ECommOrdValidOverride:r.isECommOrdValid=e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList?e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.includes(r.Cod):null,Q(r,2),k(r,n),T(r,n),r.VehGroup={};for(var i=t.ComMod.VehGroups,o=0;o<i.length;o++){var s=i[o];if(-1!==s.VehCods.indexOf(r.Cod)){r.VehGroup.VERSIONS={},r.VehGroup.VERSIONS.Cod=s.VehGroupCod,r.VehGroup.VERSIONS.Des=s.VehGroupDes.toString(),r.VehGroup.Trim={},r.VehGroup.Trim.Cod=s.VehGroupCod,r.VehGroup.Trim.Des=s.VehGroupDes.toString();break}}if(t.ComMod.Groups&&t.ComMod.Groups.DerivedModel)for(var l=t.ComMod.Groups.DerivedModel,c=0;c<l.length;c++){var d=l[c];if(-1!==d.VehCods.indexOf(r.Cod)){r.VehGroup.DerivedModel={},r.VehGroup.DerivedModel.Cod=d.Cod,r.VehGroup.DerivedModel.Des=d.Des.toString();break}}if(t.ComMod.Groups&&t.ComMod.Groups.BodyStyle){var p=t.ComMod.Groups.BodyStyle;for(c=0;c<p.length;c++){var f=p[c];if(-1!==f.VehCods.indexOf(r.Cod)){r.VehGroup.BodyStyle={},r.VehGroup.BodyStyle.Cod=f.Cod,r.VehGroup.BodyStyle.Des=f.Des.toString();break}}}var h=r.Cod;e.Vehicles[h]={},e.Vehicles[h].Options={},e.Vehicles[h].OptionGroupsCod={},r.OptionGroups={},r.OptionGroups.WHEEL||(r.OptionGroups.WHEEL={});for(var g=0;g<n.OptGroups.length;g++){var v=n.OptGroups[g];I(v),v.Options={};var m=N(h,v.Cod);r.OptionGroups[m]||(r.OptionGroups[m]={});for(var y=0;y<v.Opts.length;y++){var C=v.Opts[y];if(C.OptGroupCod=v.Cod,Q(C,3),C.NodeCod=v.Cod.concat("-").concat(C.Cod),e.Vehicles[h].Options[C.NodeCod]=C,v.Options[C.NodeCod]=C,m&&(!P(h)||P(h)&&0==n.Packs.filter((function(e){return e.Cod===C.Cod})).length)){if(r.OptionGroups[m]||(r.OptionGroups[m]={}),r.OptionGroups[m].Options||(r.OptionGroups[m].Options={}),C.OptGroupKey=m,r.OptionGroups[m].Key=m,r.OptionGroups[m].Options[C.NodeCod]=C,C.AddAttrs){var x={};b(C.AddAttrs,x),r.OptionGroups[m].Options[C.NodeCod].AddAttrs=x}D(n.OptGroups,C.Cod,m,C.NodeCod)&&(r.OptionGroups[m].Options[C.NodeCod].isVisible=!1)}}if(m&&"BODY"===m&&r.OptionGroups[m]&&r.OptionGroups[m].Options){var E=a.toArray(r.OptionGroups[m].Options);E=a.sortBy(E,["Des"]),r.OptionGroups[m].Options=a.chain(E).keyBy("NodeCod").value()}e.Vehicles[h].OptionGroupsCod[v.Cod]=v}_(r,n),r.Options=e.Vehicles[h].Options;var S=P(h);if(S&&S.Key&&!r.OptionGroups[S.Key]&&(r.OptionGroups[S.Key]={},r.OptionGroups[S.Key].Key=S.Key,S.isPack))for(var w in r.OptionGroups[S.Key].Options={},r.Options)r.Packs[w]&&(r.OptionGroups[S.Key].Options[w]=r.Options[w]);return u[h]=[],u[h]=n&&n.VehRule&&n.VehRule.AndRules?n.VehRule.AndRules:[],r},A=function(t){"use strict";for(var n in t.OptionLMFICodes={},t.Options)if(!(n.startsWith("BO-")||n.startsWith("IO-")||t.Options["BO-"+t.Options[n].Cod]&&"PACK"!=t.Options[n].OptGroupKey||t.Options["IO-"+t.Options[n].Cod]&&"PACK"!=t.Options[n].OptGroupKey)){if(t.Options[n].CodLMFI=[],t.Options[n]&&t.Options[n].AddAttrs&&t.Options[n].AddAttrs.RO&&t.Options[n].AddAttrs.RO.length>1&&t.OptionGroups.PACK&&t.OptionGroups.PACK.Options&&a.map(t.OptionGroups.PACK.Options,"Cod").includes(t.Options[n].AddAttrs.RO[0])){var r=t.Options[n].AddAttrs.RO.shift();t.Options[n].AddAttrs.RO.push(r)}if(t.Options[n]&&t.Options[n].AddAttrs&&t.Options[n].AddAttrs.RO&&t.Options[n].AddAttrs.RO.length>1){e.log.debug("veh.Options[optKey_].AddAttrs['RO'] :"+t.Options[n].AddAttrs.RO+"]");for(var i=t.Options[n].AddAttrs.RO,o=a.values(t.Options),s=[],l=0;l<i.length;l++){var c={};c.Cod=i[l],c.NodeCod=a.find(o,{Cod:c.Cod}).NodeCod,e.log.debug("pCompEle_.NodeCod:["+c.NodeCod+" - veh.Options[pCompEle_.NodeCod] :"+JSON.stringify(t.Options[c.NodeCod])),c.Price=t.Options[c.NodeCod].Price?t.Options[c.NodeCod].Price.toString():null,s.push(c)}var u=a.orderBy(s,"Price","asc"),d=a.map(u,"Cod");t.Options[n].AddAttrs.RO=d}if(n.startsWith("CL-"))if(t.Options[n].AddAttrs.RO)for(var p in t.Options[n].AddAttrs.RO)t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]]={},t.Options[n].AddAttrs.RO.length<2?(t.Options[n].PriceLmfi=t.Options["BO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["BO-"+t.Options[n].AddAttrs.RO[p]].PriceLmfi:null,t.Options[n].PriceNoVatLmfi=t.Options["BO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["BO-"+t.Options[n].AddAttrs.RO[p]].PriceNoVatLmfi:null):(t.Options[n].PriceLmfi="nan",t.Options[n].PriceNoVatLmfi="nan"),t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]].CodLMFI.push(t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]);else t.Options[n].AddAttrs.RO=[],t.OptionLMFICodes[t.Options[n].Cod+"$-"]={},t.OptionLMFICodes[t.Options[n].Cod+"$-"]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"$-"].CodLMFI.push(t.Options[n].Cod+"$-");else if(n.startsWith("IN-"))if(t.Options[n].AddAttrs.RO)for(var p in t.Options[n].AddAttrs.RO)t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]]={},t.Options[n].AddAttrs.RO.length<2?(t.Options[n].PriceLmfi=t.Options["IO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["IO-"+t.Options[n].AddAttrs.RO[p]].PriceLmfi:null,t.Options[n].PriceNoVatLmfi=t.Options["IO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["IO-"+t.Options[n].AddAttrs.RO[p]].PriceNoVatLmfi:null):(t.Options[n].PriceLmfi="nan",t.Options[n].PriceNoVatLmfi="nan"),t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]].CodLMFI.push(t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]);else t.Options[n].AddAttrs.RO=[],t.OptionLMFICodes[t.Options[n].Cod+"#-"]={},t.OptionLMFICodes[t.Options[n].Cod+"#-"]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"#-"].CodLMFI.push(t.Options[n].Cod+"#-");else t.OptionLMFICodes[t.Options[n].Cod]={},t.OptionLMFICodes[t.Options[n].Cod]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod].CodLMFI.push(t.Options[n].Cod)}},k=function(t,n){"use strict";t.FeatureCategories={};for(var r=0;r<n.VehFts.length;r++){var i=n.VehFts[r],o={},s=i.TypeCod,l=e.ftTypeMap.get(s);if(l){if(o.Cod=l.FtTypeCod,o.Des=l.FtTypeDes.toString(),i.AddAttrs){var c={};b(i.AddAttrs,c),o.AddAttrs=c}if(i.Val&&0!==i.Val.length)o.Value=i.Val,o.ValueCod=i.Cod;else{var u=a.findIndex(l.Fts,["FtCod",i.Cod]);o.Value=-1!==u?l.Fts[u].FtDes:i.Val,o.ValueCod=-1!==u?l.Fts[u].FtCod:i.Cod}t.FeatureCategories[l.FtTypeCatCod]||(t.FeatureCategories[l.FtTypeCatCod]={},t.FeatureCategories[l.FtTypeCatCod].Cod=l.FtTypeCatCod,t.FeatureCategories[l.FtTypeCatCod].Des=l.FtTypeCatDes,t.FeatureCategories[l.FtTypeCatCod].Features={}),t.FeatureCategories[l.FtTypeCatCod].Features[l.FtTypeCod]=o}else e.log.warn(e.apiName+".createVehicleRuleEngine - Empty popVehFeatures ERROR: ftTypeCod_"+s+" - "+t.Cod)}},T=function(t,n){"use strict";for(var r=e.getBaseAttributeByVehicle(t.Cod),i=d.MapConfig.all?d.MapConfig.all.BASEATTRS:d.MapConfig[0].BASEATTRS,o=d.MapConfig[t.Cod]&&d.MapConfig[t.Cod].BASEATTRS?d.MapConfig[t.Cod].BASEATTRS:i,a=0;a<r.length;a++){var s=r[a];if(s){var l={},c=o[s.BAttrCod]&&o[s.BAttrCod].Key?o[s.BAttrCod].Key:s.BAttrCod,u=o[s.BAttrCod]&&o[s.BAttrCod].KeyDes?o[s.BAttrCod].KeyDes:s.BAttrDes;l.Key=c,l.KeyDes=u,l.Cod=s.BAttrCod,l.Des=s.BAttrDes,l.Values={},l.Values[s.BAttrValCod]={},l.Values[s.BAttrValCod].Cod=s.BAttrValCod,l.Values[s.BAttrValCod].Des=s.BAttrValDes,t.BaseAttributes||(t.BaseAttributes={}),t.BaseAttributes[c]=l}}},N=function(e,t){"use strict";var n=null,r=d.MapConfig.all?d.MapConfig.all.OPTGROUPS:d.MapConfig[0].OPTGROUPS,i=d.MapConfig[e]?d.MapConfig[e].OPTGROUPS:r;return i&&i[t]?n=i[t].Key:i.NOTIN&&(n=i.NOTIN.Key),n},D=function(e,t,n,r){"use strict";if("BODY"===n||"SEAT"===n||"BODYOPT"===n||"SEATOPT"===n||"PACK"===n)return!1;var i=e.filter((function(e){return"BO"===e.Cod||"IO"===e.Cod}));if(i&&i.length>0)for(var o=0;o<i.length;o++){if(i[o].Opts.filter((function(e){return e.Cod===t})).length>0)return!0}return!1},P=function(e){"use strict";var t=null,n=d.MapConfig.all?d.MapConfig.all.OPTGROUPS:d.MapConfig[0].OPTGROUPS,r=d.MapConfig[e]?d.MapConfig[e].OPTGROUPS:n;return r&&r.NONE&&(t=r.NONE),t},_=function(t,n){"use strict";var r=t.Cod,i=n.Packs;t.Packs={};for(var o=0;o<i.length;o++){var s=a.findKey(e.Vehicles[r].Options,["Cod",i[o].Cod]),l=e.Vehicles[r].Options[s];if(l){for(var c={OptRelCods:[]},u=0;u<i[o].OptRelCods.length;u++)for(var d=i[o].OptRelCods[u],p=0;p<n.OptGroups.length;p++){var f=n.OptGroups[p];if("CL"!=f.Cod&&"IN"!=f.Cod)for(var h=0;h<f.Opts.length;h++){var g=f.Opts[h];if(d==g.Cod){var v=f.Cod.concat("-").concat(g.Cod);"BO"!==f.Cod&&"IO"!==f.Cod&&(c.OptRelCods.push(v),g.ContainerPackCod=l.NodeCod,"PK"===f.Cod&&l.isStandard&&(g.isStandard=!0))}}}c.NodeCod=l.OptGroupCod.concat("-").concat(i[o].Cod),t.Packs[c.NodeCod]=c}}},B=function(t,n){"use strict";var r=t.BAttrCod+"_"+n.BAttrValCod;e.bAttrValMap.set(r,{BAttrCod:t.BAttrCod,BAttrDes:t.BAttrDes,BAttrValCod:n.BAttrValCod,BAttrValDes:n.BAttrValDes}),e.BaseAttrValues[r]=n},M=function(t){"use strict";var n=d.MapConfig.all?d.MapConfig.all.BASEATTRS:d.MapConfig[0].BASEATTRS;if(n[t.BAttrCod]){var r=n[t.BAttrCod].Key;t.Key=r;var i={};i.Key=t.Key,i.Cod=t.BAttrCod,i.Des=n[t.BAttrCod].Des?n[t.BAttrCod].Des:t.BAttrDes.toString(),i.Type=t.BAttrType,i.Values={},i.ValKeys={};for(var o=0;o<t.BAttrVals.length;o++)i.Values[t.BAttrVals[o].BAttrValCod]=t.BAttrVals[o];i.ValKeys=Object.keys(i.Values),e.fccf.ComMod.CommonData.BaseAttribute[r]=i}e.BaseAttributes[t.BAttrCod]=t},I=function(t){"use strict";var n=e.dcTypeMap.get("OG".concat(t.Cod));n&&(t.Des=n)};e.createVehicleRuleEngine=function(n){"use strict";var r;if(e.timeEnd(),e.log.debug(e.apiName+".createVehicleRuleEngine - begin"),e.timeBegin(),t&&t.Vehs){r='$.Vehs[?(@.Cod=="'+n+'")].VehGraph.*';var i=l.query(t,r);if(e.timeEnd(),i&&i.length>0)e.log.info(e.apiName+".createVehicleRuleEngine - Valid Vehicle Data - Found Vehicle:["+n+"]"),e.ruleEngine=new c,e.ruleEngine.init(i,e.cytoVehicleDiv,e.selectionLogDiv,e.log,e.configVehicleRuleEngine);else{e.log.error(e.apiName+".createVehicleRuleEngine - Empty vehicleGraphData ERROR ");var o=ue(!1,560,"setVehicle ERROR - vehicleGraphData empty or invalid",{});e.isValidSetVeh=!1,e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(o)}}},e.configVehicleRuleEngine=function(){"use strict";e.timeEnd(),e.log.debug(e.apiName+".configVehicleRuleEngine - begin"),e.timeBegin();var t=ue(!0,200,"",{});e.ruleEngine&&e.BrandName&&(e.ruleEngine.dtype=e.BrandName&&e.scopeConfig.Brand[e.BrandName].DataType),U(),e.ruleEngine.AndRules=u[e.MVS];var n=e.addStandardOpts(),r=e.getBaseAttributeByVehicle(e.MVS).map((function(e){return e?e.BAttrCod+"_"+e.BAttrValCod:""})),i=e.BaseAttrValues;for(var o in i)i[o]&&(i[o].isSelected=-1!==r.indexOf(o));for(var a in e.fccf.Vehicles){var s=e.fccf.Vehicles[a];s.isSelected=s.Cod===e.MVS}e.log.debug(e.apiName+".configVehicleRuleEngine - end"),n.success?e.isValidSetVeh=!0:(e.isValidSetVeh=!1,t=n),e.onSetVehicleCallback(t)},e.addStandardOpts=function(){"use strict";var t=ce();t=ue(!0,200,"",{});try{if(Z(),e.addStdOpts){var n=e.ruleEngine.cyto.collection();for(var r in e.ruleEngine.pct100List=e.ruleEngine.cyto.collection(),e.Vehicles[e.MVS].Options){var i=e.Vehicles[e.MVS].Options[r];if(i.isStandard)(o=e.ruleEngine.cyto.getElementById(i.NodeCod)).data("isStandard",!0),o.data("isMandatory",i.isMandatory),n=n.union(o);if(i.OptGroupCod&&d.OptGroupCod[i.OptGroupCod]){i.getRefColOptIdList=function(){if(d.RefColByGraph){var t=e.ruleEngine.cyto.getElementById(this.NodeCod).outgoers("edge[type='V']","edge[type='A']").targets(),n=[];t.forEach((function(e){n.push(e.id())}))}else for(var r=this.AddAttrs,i=(n=[],0);i<r.length;i++){var o=r[i];"RO"===o.AttrCod&&n.push(o.AttrCod)}return n}}if(i.is100Pct){var o=e.ruleEngine.cyto.getElementById(i.NodeCod);e.ruleEngine.pct100List=e.ruleEngine.pct100List.union(o)}}if(n.size()>0){e.ruleEngine.tassativi=n.filter((function(e){if(e.data().isMandatory)return e})),e.ruleEngine.tiedStdMandNodeList=n.filter((function(e){if(e.data().isMandatory&&(e.incomers().nonempty()||e.outgoers().nonempty()))return e})),e.ruleEngine.uEAE();let r=e.ruleEngine.addDtoPReturnEdge();r.success&&r.data.forEach((function(t){e.Vehicles[e.MVS].Options[t].isUserSelectable=!0}));var a=e.ruleEngine.ruleNodeList(n,e.ruleEngine.cyto.collection(),!0);a.success||(e.log.error(e.apiName+".addStandardOpts - Standard Nodes add ERROR["+a.message+"]"),t=ue(!1,530,a.message,{}))}G(),e.log.debug(e.apiName+".addStandardOpts - Option List length:["+Object.keys(e.Vehicles[e.MVS].Options).length+"]")}e.timeEnd(" addStandardOpts END")}catch(n){e.isValidSetVeh=!1,t=ue(!1,530,n.message,{}),e.log.error(e.apiName+".addStandardOpts - Standard Nodes add ERROR["+n.message+"]")}return t},e.VehicleGraphOverride={Config:null,getConfig:function(){"use strict";return this.Config},setConfig:function(e){"use strict";this.Config=e},override:function(){"use strict";var t=this.Config;if(t&&t.length>0)for(var n=0;n<t.length;n++){var r=t[n];if(r.mvs&&"all"===r.mvs||r.mvs===e.MVS)switch(r.action){case"delete":if(r.elem&&r.elem.group&&r.elem.data&&"edges"===r.elem.group){var i='edge[type="'+r.elem.data.type+'"][source="'+r.elem.data.source+'"][target="'+r.elem.data.target+'"]',o=e.ruleEngine.cyto.elements(i);e.log.debug(e.apiName+".setVehicleGraphOverride ["+o.length+"]"),e.ruleEngine.cyto.remove(o)}break;case"insert":r.elem&&r.elem.group&&r.elem.data&&"edges"===r.elem.group&&e.ruleEngine.cyto.add(r.elem)}}}},e.applyBaseAttrsChange=function(t){"use strict";var n,r,i;if(e.log.info(e.apiName+".applyBaseAttributes - begin - ChangeRequest["+$(t)+"]"),n=ce(),t&&t.Selections&&t.Selections.length>0){e.log.debug(e.apiName+".getVheicleByBaseAttributes - ChangeRequest.Selections.length {"+t.Selections.length+"} "),i=t.Selections;for(var o=0;o<i.length;o++){var a=i[o];if(a.Cod&&a.ChangeType){var s=e.cmRuleEngine.cyto.getElementById(a.Cod);s&&("add"===a.ChangeType?n=e.cmRuleEngine.addNode(s):"remove"===a.ChangeType&&(n=e.cmRuleEngine.removeNode(s)))}}}return U(),r=re(i),"Changes have been applied",n=ue(!0,200,"Changes have been applied",r),e.log.info(e.apiName+".applyBaseAttributes - end "),n},e.getVehiclesByBaseAttributes=function(){"use strict";var t,n,r;e.log.debug(e.apiName+".getVheicleByBaseAttributes"),ce(),r=X(),e.log.debug(e.apiName+".getVheicleByBaseAttributes - vehicleList_.length ["+r.length+"] "),n=[];for(var i=0;i<r.length;i++){var o=ie(r[i].id(),null,null);n.push(o)}return t=re(n),"Vehicles (MVS) list",ue(!0,200,"Vehicles (MVS) list",t)},e.getVehicleNumByBaseAttrCombination=function(t){"use strict";var n,r;e.cmRuleEngine.cyto.collection();n=ce();var i=function(t,n){var r=e.cmRuleEngine.cyto.getElementById(t),i=e.cmRuleEngine.cyto.getElementById(n),o=e.cmRuleEngine.cyto.collection();if(r&&i){var a=e.cmRuleEngine.cyto.collection();a=(a=(a=a.add(r)).add(i)).union(e.cmRuleEngine.configurazione);for(var s=0;s<a.size();s++){var l=a[s];o=0===s?l.incomers("edge[type='V']").sources():o.intersection(l.incomers("edge[type='V']").sources())}}return o.size()};try{if((r={}).BaseAttrSetValues={},t&&t.Selections&&t.Selections.length>0){e.log.debug(e.apiName+".getVheicleByBaseAttributes - InfoRequest.Selections.length {"+t.Selections.length+"} ");for(var o=t.Selections,a=0;a<o.length;a++){var s=o[a];if(s.Cod){var l=e.BaseAttributes[s.Cod].BAttrVals;r.BaseAttrSetValues[s.Cod]=[],r.BaseAttrSetValues[s.Cod]=l}}r.CombinedValues=[];var c=o[0];if(c.Cod){var u=e.BaseAttributes[c.Cod].BAttrVals;for(a=0;a<u.length;a++){var d=u[a],p=o[1];if(p.Cod)for(var f=e.BaseAttributes[p.Cod].BAttrVals,h=0;h<f.length;h++){var g=f[h],v={},m=[],y=c.Cod+"_"+d.BAttrValCod,b=p.Cod+"_"+g.BAttrValCod;m.push(y),m.push(b);var C=i(y,b);v.CombBACodVals=m,v.VehNum=C,r.CombinedValues.push(v)}}}}"getVehicleNumByBaseAttrCombination ",n=ue(!0,200,"getVehicleNumByBaseAttrCombination ",r)}catch(t){n=ue(!1,546,t.message,{}),e.log.warn(e.apiName+".getVehicleNumByBaseAttrCombination - Invalid dataResult:["+t.message+"]")}return n},e.setVehicle=function(n,r,i,o){"use strict";var s;e.log.info(e.apiName+".setVehicle - ChangeRequest["+$(n)+"]"),e.onSetVehicleCallback=r,e.onSetVehicleErrorCallback=i;var l=!0;if(!l||n&&n.Selections&&1===n.Selections.length&&n.Selections[0].Cod||(l=!1,e.isValidSetVeh=!1,s=ue(!1,510,"setVehicle ERROR[ChangeRequest malformed]",re([])),e.log.debug(e.apiName+".setVehicle ERROR[ChangeRequest malformed]"),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)),l&&(e.MVS=n.Selections[0].Cod,e.log.debug(e.apiName+".setVehicle - MVS:["+e.MVS+"] - isLazyVehLoad:["+e.isLazyVehLoad+"]"),e.Vehicles[e.MVS]&&(l=!1,e.log.debug(e.apiName+".setVehicle - found vehicle -call createVehicleRuleEngine "),e.createVehicleRuleEngine(e.MVS))),l&&o){var c=null;if(o.Cod&&o.Cod===e.MVS)try{t.Vehs.push(o);var u=t.Vehs;(c=a.filter(u,["Cod",e.MVS])[0])&&(l=!1,V(c),e.createVehicleRuleEngine(e.MVS))}catch(t){e.log.debug(e.apiName+".setVehicle ERROR - cmVeh invalid["+t.message+"]")}c||(l=!1,e.isValidSetVeh=!1,s=ue(!1,512,"setVehicle ERROR[vehicleDataSource MVS inchoerency]",{}),e.log.debug(e.apiName+".setVehicle ERROR - vehicleDataSource MVS inchoerency "),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s))}l&&e.isLazyVehLoad&&(l=!1,e.log.debug(e.apiName+".setVehicle - LAZY load - load Vehicle Data "),e.getMVSDataCall(e.MVS)),l&&(e.isValidSetVeh=!1,s=ue(!1,514,"setVehicle ERROR[Vehicle NOT found]",{}),e.log.debug(e.apiName+".setVehicle ERROR[Vehicle NOT found]"),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)),e.log.debug(e.apiName+".setVehicle - end")},e.testChange=function(t,n){"use strict";var r,i,o,a,s;e.log.info(e.apiName+".testChange - begin - ChangeRequest["+$(t)+"]"),r=ce(),o=e.getVersion()+" - ",s=[];try{if(t&&t.Selections&&t.Selections.length>0)if(e.log.debug(e.apiName+".testChange - ChangeRequest.Selections.length {"+t.Selections.length+"} "),a=t.Selections,p){var l=te(a),c={},u={addList:l.toAddList,removeList:l.toRemoveList};c=n&&"number"==typeof n&&n>=1?e.ruleEngine.processRuleActResMaxIterDepth(u,e.maxIter,n,!1):"number"==typeof n&&0===n?e.ruleEngine.ruleNodeList(l.toAddList,l.toRemoveList,!1):e.ruleEngine.processRuleActResMaxIterDepth(u,e.maxIter,e.sDepth,!1),l.addictionalData&&l.addictionalData.InPack&&(c.code=c.success?230:530),s=ae(c,l.toAddCodList,l.toRemoveCodList),r=ue(c.success,c.code,o+c.message,{ChangeScenarios:s,Extra:c.data.extra})}else{e.ruleEngine.checkConfigurazione=e.ruleEngine.configurazione,e.ruleEngine.incompatibiliConCheckConfig=e.ruleEngine.incompatibiliConConfig;for(var d=0;d<a.length;d++){var f=a[d],h=ne(f);if(1===h.length&&([],"add"===f.ChangeType?i=e.ruleEngine.checkAddNode(h):"remove"===f.ChangeType&&(i=e.ruleEngine.checkRemoveNode(h)),o+=i.message,s=oe(i,h,f.ChangeType,s),!i.success))break}r=ue(!0,201,o,{ChangeScenarios:s})}W(r,t)}catch(t){e.log.error(e.apiName+".testChange ERROR {"+t.stack+"} ")}return e.log.info(e.apiName+".testChange - end - result["+$(r)+"]"),r};var F=function(t){if(t&&t.Selections&&t.Selections.length>0){changeList_=t.Selections;for(var n=[],r=0;r<changeList_.length;r++){var i=changeList_[r];if(i.Cod.includes("$")||i.Cod.includes("#")){if(i.Cod.includes("$")){var o,a="CL-"+i.Cod.substring(0,i.Cod.indexOf("$")),s=i.Cod.substring(i.Cod.indexOf("$")+1);for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(s)||(o=l);if(i.Cod=a,o)(u={}).Cod=o,u.ChangeType=i.ChangeType,n.push(u)}else if(i.Cod.includes("#")){var c,u,d="IN-"+i.Cod.substring(0,i.Cod.indexOf("#")),p=i.Cod.substring(i.Cod.indexOf("#")+1);for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(p)||(c=l);if(i.Cod=d,c)(u={}).Cod=c,u.ChangeType=i.ChangeType,n.push(u)}}else{var f;for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(i.Cod)||(f=l);i.Cod=f}}n&&n.length>0&&(changeList_=changeList_.concat(n))}return t},L=function(t){if(t.data.ChangeScenarios&&t.data.ChangeScenarios.length>0)for(var n in t.data.ChangeScenarios){var r=t.data.ChangeScenarios[n],i=[];for(var o in r.Changes){var a=r.Changes[o];if(a.Cod.startsWith("CL-")||a.Cod.startsWith("IN-")){if(a.Cod.startsWith("CL-"))if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO){if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&1==e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length)a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[0];else if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length>1)for(var s in r.Changes){if(-1!=(l=r.Changes[s]).Cod.indexOf("-")){if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1))){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1)),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}else if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod)){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$-"}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1);if(a.Cod.startsWith("IN-"))if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO){if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&1==e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length)a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[0];else if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length>1)for(var s in r.Changes){var l;if(-1!=(l=r.Changes[s]).Cod.indexOf("-")){if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1))){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1)),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}else if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod)){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#-"}if(i&&i.length>0)for(var c in i)r.Changes.splice(i[c],1)}return t};e.testChangeLMFICodes=function(t,n){var r=JSON.parse(JSON.stringify(t));r=F(r);var i=e.testChange(r,n);return i=L(i)},e.applyChangeLMFICodes=function(t){var n=JSON.parse(JSON.stringify(t));n=F(n);var r=e.applyChange(n);return r=L(r)},e.applyChange=function(t){"use strict";var n,r,i,o,a;e.log.info(e.apiName+".applyChange - begin - ChangeRequest["+$(t)+"]"),n=ce(),i="",a=[];try{if(t&&t.Selections&&t.Selections.length>0){if(e.log.debug(e.apiName+".applyChange - ChangeRequest.Selections.length {"+t.Selections.length+"} "),o=t.Selections,p){var s=te(o),l={};l=e.ruleEngine.ruleNodeList(s.toAddList,s.toRemoveList,!0),s.addictionalData&&s.addictionalData.InPack&&(l.code=l.success?230:530),a=ae(l,s.toAddCodList,s.toRemoveCodList,!0),n=ue(l.success,l.code,l.message,{ChangeScenarios:a,Extra:l.data.extra})}else{for(var c=0;c<o.length;c++){var u=o[c],d=ne(u);if(d&&([],"add"===u.ChangeType?r=e.ruleEngine.addNode(d):"remove"===u.ChangeType&&(r=e.ruleEngine.removeNode(d)),i+=r.message,a=oe(r,d,u.ChangeType,a,!0),!r.success))break}n=ue(!0,201,i,{ChangeScenarios:a})}G()}}catch(t){e.log.error(e.apiName+".applyChange ERROR {"+t.stack+"} ")}return e.log.info(e.apiName+".applyChange - end - result["+$(n)+"]"),n},e.getVehicleConfString=function(){"use strict";var t,n,r,i,o,a,s,l,c,u;l={},c="",u=ce();try{for(var d in t=[],n=[],r=[],i=[],o=[],a=[],s=[],e.ruleEngine.configurazione.forEach((function(n){if("AG"!==n.data().type&&"VG"!==n.data().type){t.push(n.id());var i=e.fccf.Vehicles[e.MVS].Options[n.id()];if(i&&i.NodeCod&&i.LongSrcCod){var l=i.NodeCod.split("-")[0].concat("-").concat(i.LongSrcCod);switch(r.push(l),e.dataSrcType){case"xF":i.isMandatory&&a.push(l);break;case"xP":i.is100Pct?o.push(l):"CL"===i.OptGroupCod||"IN"===i.OptGroupCod||"string"!=typeof i.Perso||"P"!==i.Perso&&""!==i.Perso||s.push(l)}}}})),e.fccf.Vehicles[e.MVS].Options){var p=e.fccf.Vehicles[e.MVS].Options[d];p.isSelected&&p.SelectedInPacks&&p.SelectedInPacks.length>0&&(n.push(d),i.push(p.NodeCod.split("-")[0].concat("-").concat(p.LongSrcCod)))}e.log.debug(e.apiName+".getVehicleConfString: ["+t+"]"),e.log.debug(e.apiName+".getVehicleConfString in pack: ["+n+"]"),l.configurazione=t,l.configurazioneInPack=n,l.srcCatConfig=r,l.srcCatConfigInPack=i,l.srcCatConfig100=o,l.srcCatConfigMand=a,l.srcCatConfigNPE=s,u=ue(!0,200,c=(c=c+" - Configuration: ( "+t+")")+" - Configuration in Pack: ( "+n+")",l)}catch(t){u=ue(!1,573,".getVehicleConfString - Conf ERROR["+t.message+"]",{}),e.log.error(e.apiName+".getVehicleConfString - Conf ERROR["+t.message+"]")}return u},e.getVehicleConfStringLmfiCodes=function(){"use strict";var t,n,r,i;r={},i="",ce(),t=[],n=[];var o=[];for(var s in e.fccf.Vehicles[e.MVS].OptionLMFICodes)!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].isSelected||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks&&0!=e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks.length||(s.includes("$")?(!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)]||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)]&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)].isSelected)&&(o.push(s.substring(s.indexOf("$")+1)),t.push(s)):s.includes("#")?(!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)]||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)]&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)].isSelected)&&(o.push(s.substring(s.indexOf("#")+1)),t.push(s)):t.push(s)),a.pullAll(t,o),e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].isSelected&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks.length>0&&n.push(s);return e.log.debug(e.apiName+".getVehicleConfStringLmfiCodes: ["+t+"]"),e.log.debug(e.apiName+".getVehicleConfStringLmfiCodes in pack: ["+n+"]"),r.configurazione=t,r.configurazioneInPack=n,ue(!0,200,i=(i=i+" - Configuration: ( "+t+")")+" - Configuration in Pack: ( "+n+")",r)},e.getVehicleOMSConf=function(){"use strict";var t,n,r,i,o;r={},i="",o=ce();try{var a={vehCod:null,extColCode:"",intColCode:"",optCodeList:[]};switch(t=e.BrandName&&e.scopeConfig.Brand[e.BrandName].DataType?e.scopeConfig.Brand[e.BrandName].DataType:null,n=e.ruleEngine.configurazione,t){case"xF":a.vehCod=e.MVS,n.forEach((function(t){if("AG"!==t.data().type&&"VG"!==t.data().type){var n=t.id(),r=e.fccf.Vehicles[e.MVS].Options[n],i=!!(r&&r.AddAttrs.TS&&r.AddAttrs.TS[0]&&"1"===r.AddAttrs.TS[0]),o=!!(r&&r.AddAttrs.SS&&r.AddAttrs.SS[0]&&"Y"===r.AddAttrs.SS[0]),s=e.ruleEngine.cyto.getElementById(n).incomers("edge[type='E']").size()>0,l=r&&r.AddAttrs.FG&&r.AddAttrs.FG[0],c=!(!l||"Y"!==r.AddAttrs.FG[0]);if(r&&(!r.isStandard||i||o||r.isStandard&&(s||c)))switch(r.OptGroupCod){case"CL":a.extColCode=r.Cod;break;case"IN":a.intColCode=r.Cod;break;default:if(!r||!l)throw new Error("Fg_Grids source data unavailable");if(c){var u={};u.code=r.Cod,a.optCodeList.push(u)}}}}));break;case"xP":var s=e.fccf.Vehicles[e.MVS].BaseCod;a.vehCod=s||null,n.forEach((function(t){if("AG"!==t.data().type&&"VG"!==t.data().type){var n=t.id(),r=e.fccf.Vehicles[e.MVS].Options[n];if(r){var i=r.Cod&&r.Cod.charAt(0)?r.Cod.charAt(0):null,o=r.Cod&&r.Cod.charAt(6)?r.Cod.charAt(6):null;switch(r.OptGroupCod){case"CL":a.extColCode=r.Cod;break;case"IN":a.intColCode=r.Cod;break;default:if(u=i,"D"!==(c=o)&&"X"!==c&&"E"!==u&&"K"!==u){var s={};s.code=(l=r).NodeCod.split("-")[0].concat("-").concat(l.LongSrcCod),a.optCodeList.push(s)}}}}var l,c,u}))}r.omsConfig=JSON.parse(JSON.stringify(a)),i+=".getVehicleOMSConf - OMS Config: Success",e.log.debug(e.apiName+".getVehicleOMSConf: ["+a+"]"),e.isValidSetVeh&&a.vehCod?o=ue(!0,200,i,r):(o=ue(!1,572,e.apiName+".getVehicleOMSConf - OMS Conf ERROR: Invalid Vehicle Data",{}),e.log.warn(e.apiName+".getVehicleOMSConf - OMS Conf ERROR: Invalid Vehicle Data"))}catch(t){o=ue(!1,570,".getVehicleOMSConf - OMS Conf ERROR["+t.message+"]",{}),e.log.warn(e.apiName+".getVehicleOMSConf - OMS Conf ERROR["+t.message+"]")}return o},e.getVehicleCFAConf=function(){"use strict";var t,n,r,i,o;r={},i="",o=ce();try{var s={vehCod:null,extColCode:"",intColCode:"",extRelColCode:"",intRelColCode:"",tsOptCodeList:[],ssOptCodeList:[],fgOptCodeList:[],userOptCodeList:[]};if(t=e.BrandName&&e.scopeConfig.Brand[e.BrandName].DataType?e.scopeConfig.Brand[e.BrandName].DataType:null,n=e.ruleEngine.configurazione,"xF"===t){s.vehCod=e.MVS,n.forEach((function(t){if("AG"!==t.data().type&&"VG"!==t.data().type){var n=t.id(),r=e.fccf.Vehicles[e.MVS].Options[n],i=!!(r&&r.AddAttrs.TS&&r.AddAttrs.TS[0]&&"1"===r.AddAttrs.TS[0]),o=!!(r&&r.AddAttrs.SS&&r.AddAttrs.SS[0]&&"Y"===r.AddAttrs.SS[0]),a=e.ruleEngine.cyto.getElementById(n).incomers("edge[type='E']").size()>0,l=r&&r.AddAttrs.FG&&r.AddAttrs.FG[0],c=!(!l||"Y"!==r.AddAttrs.FG[0]);if(r&&(!r.isStandard||i||o||r.isStandard&&(a||c)))switch(r.OptGroupCod){case"CL":s.extColCode=r.Cod,s.extRelColCode=r.AddAttrs.RO[0]?r.AddAttrs.RO[0]:"";break;case"IN":s.intColCode=r.Cod,s.intRelColCode=r.AddAttrs.RO[0]?r.AddAttrs.RO[0]:"";break;default:if(!r||!l)throw new Error("Fg_Grids source data unavailable");if(c){var u={};u.code=r.Cod,i?s.tsOptCodeList.push(u):o?s.ssOptCodeList.push(u):r.isStandard?s.fgOptCodeList.push(u):s.userOptCodeList.push(u)}}}}));var l=[];s.extRelColCode&&l.push(s.extRelColCode),s.intRelColCode&&l.push(s.intRelColCode),s.fgOptCodeList=a.filter(s.fgOptCodeList,(function(e){return!l.includes(e.code)})),s.userOptCodeList=a.filter(s.userOptCodeList,(function(e){return!l.includes(e.code)}))}r.cfaConfig=JSON.parse(JSON.stringify(s)),i+=".getVehicleCFAConf - CFA Config: Success",e.log.debug(e.apiName+".getVehicleCFAConf: ["+s+"]"),e.isValidSetVeh&&s.vehCod&&"xF"===t?o=ue(!0,200,i,r):(o=ue(!1,572,e.apiName+".getVehicleCFAConf - CFA Conf ERROR: Invalid Vehicle Data OR Invalid DataSource (xP)",{}),e.log.warn(e.apiName+".getVehicleCFAConf - CFA Conf ERROR: Invalid Vehicle Data OR Invalid DataSource (xP)"))}catch(t){o=ue(!1,570,".getVehicleCFAConf - CFA Conf ERROR["+t.message+"]",{}),e.log.warn(e.apiName+".getVehicleCFAConf - CFA Conf ERROR["+t.message+"]")}return o},e.testConfiguration=function(t,n,r){"use strict";var i;i=ce();try{var o={Selections:[{Cod:t.Selections[0].Cod,ChangeType:"add"}]};i=e.setVehicle(o,(function(){for(var o=t.Selections[0].ConfigList,s=[],l=[],c=0;c<o.length;c++)(g={}).Cod=o[c],e.Vehicles[e.MVS].Options[g.Cod]?(g.ChangeType="add",s.push(g)):l.push(g.Cod);if(s.length!==o.length){var u={};u.NotFoundOptList=l,i=ue(!1,537,e.apiName+".testConfiguration - ERROR: Invalid Input Test Config",u),r(i)}else{var d=e.getVehicleConfString(),p=d.success&&d.data&&d.data.configurazione?d.data.configurazione:[],f=a.difference(p,o);e.log.info(e.apiName+".testConfiguration - removeList["+f+"]");for(var h=0;h<f.length;h++){var g;(g={}).Cod=f[h],g.ChangeType="remove",s.push(g)}var v={Selections:s},m=e.testChange(v,20),y=m.success,b=m.data.ChangeScenarios.length;p&&y&&1===b?(i=ue(!0,200,e.apiName+".testConfiguration - success: Valid Test Config",{}),n(i)):(i=ue(!1,538,e.apiName+".testConfiguration - ERROR: Invalid Test Config",{}),r(i))}}),(function(){i=ue(!1,536,e.apiName+".testConfiguration - ERROR: Invalid Vehicle Data",{}),r(i)}))}catch(t){i=ue(!1,540,".testConfiguration - ERROR["+t.message+"]",{}),e.log.error(e.apiName+".testConfiguration - ERROR["+t.message+"]"),r(i)}return i},e.loadConfiguration=function(t,n,r){"use strict";var i;i=ce();try{var o={Selections:[{Cod:t.Selections[0].Cod,ChangeType:"add"}]};i=e.setVehicle(o,(function(){for(var o=t.Selections[0].ConfigList,s=[],l=[],c=0;c<o.length;c++)(g={}).Cod=o[c],e.Vehicles[e.MVS].Options[g.Cod]?(g.ChangeType="add",s.push(g)):l.push(g.Cod);if(s.length!==o.length){var u={};u.NotFoundOptList=l,i=ue(!1,537,e.apiName+".loadConfiguration - ERROR: Invalid Input Test Config",u),r(i)}else{var d=e.getVehicleConfString(),p=d.success&&d.data&&d.data.configurazione?d.data.configurazione:[],f=a.difference(p,o);e.log.info(e.apiName+".loadConfiguration - removeList["+f+"]");for(var h=0;h<f.length;h++){var g;(g={}).Cod=f[h],g.ChangeType="remove",s.push(g)}var v={Selections:s},m=e.testChange(v,20),y=m.success,b=m.data.ChangeScenarios.length;if(p&&y&&1===b){var C=m.data.ChangeScenarios[0];0!==C.Changes.length?e.applyChange({Selections:C.Changes}).success?(i=ue(!0,200,e.apiName+".loadConfiguration - success: Valid Config loaded",{}),n(i)):(i=ue(!1,539,e.apiName+".loadConfiguration - ERROR: Invalid Load Config",{}),e.log.error(e.apiName+".loadConfiguration - ERROR: Invalid Vehicle Data"),r(i)):(i=ue(!0,200,e.apiName+".loadConfiguration - success: Valid Config loaded",{}),n(i))}else i=ue(!1,538,e.apiName+".loadConfiguration - ERROR: Invalid Load Config",{}),r(i)}}),(function(){i=ue(!1,536,e.apiName+".loadConfiguration - ERROR: Invalid Vehicle Data",{}),r(i)}))}catch(t){i=ue(!1,540,".loadConfiguration - ERROR["+t.message+"]",{}),e.log.error(e.apiName+".loadConfiguration - ERROR["+t.message+"]"),r(i)}return i},e.getBrandPublishDomain=function(t,n,r,i){"use strict";let o=null;if(f(t,n,r,i)){var a=".".concat(n.toLowerCase());o=e.scopeConfig.Brand[t].Mkt[n].LocDomSlug?e.scopeConfig.Brand[t].Mkt[n].LocDomSlug.concat(a):e.scopeConfig.Brand[t].BrandDomSlug.concat(a),o=e.scopeConfig.Brand[t].Mkt[n].RambDom?e.scopeConfig.Brand[t].Mkt[n].RambDom:o}else e.log.warn(e.apiName+".initScope - Internal Scope Not found Error");return o};var W=function(t,n){"use strict";var r=function(e){return e.Cod.substring(0,e.Cod.indexOf("-"))};if(t.data.ChangeScenarios&&t.data.ChangeScenarios.length>0)for(var i=0;i<t.data.ChangeScenarios.length;i++)if(t.data.ChangeScenarios[i].Changes){for(var o=t.data.ChangeScenarios[i].Changes,s=a.keyBy(a.filter(o,(function(e){return e.CodRefList.length>0&&("BODY"==e.CodType||"SEAT"==e.CodType)})),"CodRefList"),l=0;l<o.length;l++){var c=o[l];c.IsUserVisible=!0;var u=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[c.CodType];u&&(c.IsUserVisible=u.isVisible);var d=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[r(c)];d&&(c.IsUserVisible=d.isVisible,!d.isChgVis&&c.IsUserRequest&&a.each(a.filter(o,(function(e){return d.Cod===r(e)})),(function(e){a.merge(e,{IsUserVisible:!1})}))),c.IsUserRequest&&(c.IsUserVisible=!1);var p=c.CodType;if(c.IsUserRequest)switch(p){case"BODY":a.each(a.filter(o,["CodType","BODY"]),(function(e){a.merge(e,{IsUserVisible:!1})}));break;case"SEAT":a.each(a.filter(o,["CodType","SEAT"]),(function(e){a.merge(e,{IsUserVisible:!1})}));break;case"WHEEL":a.each(a.filter(o,["CodType","WHEEL"]),(function(e){a.merge(e,{IsUserVisible:!1})}))}s[c.Cod]&&"PACK"!=c.CodType&&(a.merge(c,{IsUserVisible:!1}),e.log.debug(e.apiName+".evaluateIf: relatedChange_2 ["+JSON.stringify(c)+"]"))}e.log.debug(e.apiName+".evaluateIf: changes_ ["+JSON.stringify(o)+"]")}},U=function(){"use strict";e.log.debug(e.apiName+".setCmStatus - begin ");var t=[];e.cmRuleEngine.configurazione.forEach((function(e){t.push(e.id())}));for(var n=[],r=e.cmRuleEngine.cyto.collection('node[type="BAV"]').filter((function(e){if(!e.hasClass("selected"))return e})),i=(e.cmRuleEngine.configurazione,X()),o=0;o<r.size();o++){0==i.intersection(r[o].incomers("edge[type='V']").sources()).length&&n.push(r[o].id())}var a=e.BaseAttrValues;for(var s in a)a[s]&&(a[s].isSelected=-1!==t.indexOf(s),a[s].isSelectable=-1==n.indexOf(s));e.log.debug(e.apiName+".setCmStatus - end ")},G=function(){"use strict";e.log.debug(e.apiName+".setStatus - begin "),e.timeBegin();e.fccf.Vehicles[e.MVS].OptConfigPriceSum=0;var t=[];e.ruleEngine.configurazione.forEach((function(n){t.push(n.id()),function(t){if(e.log.debug(e.apiName+".setStatus node.id(): ["+t+"]"),e.fccf.Vehicles[e.MVS].Options[t]&&e.fccf.Vehicles[e.MVS].Options[t].Price){var n=e.fccf.Vehicles[e.MVS].Options[t].Price;try{e.log.debug(e.apiName+".setStatus - updateOptPriceSum -optPrice: ["+n+"]");var r=Math.round(100*Number(n))/100;e.fccf.Vehicles[e.MVS].OptConfigPriceSum=e.fccf.Vehicles[e.MVS].OptConfigPriceSum+r}catch(n){e.log.warn(e.apiName+".setStatus - updateOptPriceSum WARN: ["+t+"]")}}}(n.id())})),e.log.debug(e.apiName+".setStatus Selected: ["+t+"]");var n=[];e.ruleEngine.incompatibiliConConfig.forEach((function(e){n.push(e.id())})),e.log.debug(e.apiName+".setStatus Unselectables: ["+n+"]");var r,i,o=[];for(var s in e.Vehicles[e.MVS].Options){var l=e.Vehicles[e.MVS].Options[s];"BO"!=l.OptGroupCod&&"IO"!=l.OptGroupCod&&"PK"!=l.OptGroupCod&&(l.isSelected=-1!==t.indexOf(l.NodeCod),l.isSelectable=-1==n.indexOf(l.NodeCod),"CL"!=l.OptGroupCod&&"IN"!=l.OptGroupCod||(l.compatible=!1),e.Vehicles[e.MVS].Options["BO-"+l.Cod]&&"PACK"!=l.OptGroupKey&&(e.Vehicles[e.MVS].Options["BO-"+l.Cod].isSelected=l.isSelected,e.Vehicles[e.MVS].Options["BO-"+l.Cod].isSelectable=l.isSelectable),e.Vehicles[e.MVS].Options["IO-"+l.Cod]&&"PACK"!=l.OptGroupKey&&(e.Vehicles[e.MVS].Options["IO-"+l.Cod].isSelected=l.isSelected,e.Vehicles[e.MVS].Options["IO-"+l.Cod].isSelectable=l.isSelectable)),e.fccf.Vehicles[e.MVS].Packs[l.NodeCod]&&o.push(e.fccf.Vehicles[e.MVS].Packs[l.NodeCod])}for(var c=0;c<o.length;c++)for(var u=o[c],d=e.Vehicles[e.MVS].Options[u.NodeCod],p=0;p<u.OptRelCods.length;p++){var f=u.OptRelCods[p],h=e.Vehicles[e.MVS].Options[f];h&&(r=h,i=u.NodeCod,d.isSelected?(r.SelectedInPacks?r.SelectedInPacks=a.union(r.SelectedInPacks,new Array(i)):(r.SelectedInPacks=[],r.SelectedInPacks.push(i)),r.isSelected=!0):r.SelectedInPacks&&(r.SelectedInPacks=a.difference(r.SelectedInPacks,new Array(i)),0==r.SelectedInPacks.length&&(e.ruleEngine.cyto.getElementById(r.NodeCod).empty()&&(r.isSelected=!1),delete r.SelectedInPacks)))}e.log.debug(e.apiName+".setStatus - fccfVehicleSelected ");var g=e.fccf.Vehicles[e.MVS].OptionGroups;for(var v in g){var m=g[v];e.fccfVehicleSelected.Groups[v]=[],e.fccfVehicleSelected.Groups[v]=q(m.Options)}a.each(e.fccfVehicleSelected.Groups.BODY,(function(t){a.each(t.AddAttrs.RI,(function(t){e.fccf.Vehicles[e.MVS].Options["IN-"+t].compatible=!0}))})),a.each(e.fccfVehicleSelected.Groups.SEAT,(function(t){a.each(t.AddAttrs.RC,(function(t){e.fccf.Vehicles[e.MVS].Options["CL-"+t].compatible=!0}))}));var y=e.fccf.ComMod.CommonData.BaseAttribute;for(var v in y){m=y[v];e.fccfVehicleSelected.BaseAttributes[v]=e.fccf.Vehicles[e.MVS].BaseAttributes[v]}e.timeEnd("setStatus - END"),e.log.debug(e.apiName+".setStatus - end ")},z=function(e,t,n){"use strict";e.forEach((function(e,r){var i,o={};o.Des=e.toString(),d.MapConfig.all&&d.MapConfig.all.CATGROUPS?i=d.MapConfig.all.CATGROUPS[r]:d.MapConfig[0]&&d.MapConfig[0].CATGROUPS&&(i=d.MapConfig[0].CATGROUPS[r]),i&&i.Key?(o.Cod=i.Key,o.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),o.Type=t,n[i.Key]=o):(i&&!i.Key?o.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()):o.isVisible=!0,o.Cod=r,o.Type=t,n[r]=o)}))},Q=function(t,n){"use strict";switch(t.isSelected=!1,n){case 0:t.isSelectable=!0;break;case 1:t.isVisible=!0;break;case 2:t.isSelectable=!0,t.isDefault=!1,t.Price=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[d.Vehicle.PriceIndex]?t.PriceArray[d.Vehicle.PriceIndex]:null,t.PriceNoVat=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[d.Vehicle.PriceNoVatIndex]?t.PriceArray[d.Vehicle.PriceNoVatIndex]:null;break;case 3:if(t.isSelectable=!0,"xP"===e.dataSrcType&&(t.isUserSelectable="CL"===t.OptGroupCod||"IN"===t.OptGroupCod||!t.LongSrcCod.endsWith("D")&&!t.LongSrcCod.endsWith("X")),t.isIndipendent=!1,t.isStandard="Y"===t.Type,t.isMandatory="Y"===t.Mand,t.is100Pct="Y"===t.P100,t.LongSrcCod="xP"===e.dataSrcType?t.LongSrcCod:t.Cod,!t.OptGroupKey&&e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[t.OptGroupCod]?t.isVisible=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[t.OptGroupCod].isVisible:e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[t.OptGroupKey]?t.isVisible=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[t.OptGroupKey].isVisible:t.isVisible=!0,t.isUserRequest=!1,t.compatible=!0,t.Price=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[d.Option.PriceIndex]?t.PriceArray[d.Option.PriceIndex]:null,t.PriceNoVat=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[d.Option.PriceNoVatIndex]?t.PriceArray[d.Option.PriceNoVatIndex]:null,d.Option.PriceVatPercMkt&&e.fccf.Header.Scope.Market.Cod===d.Option.PriceVatPercMkt&&d.Option.PriceVatPerc&&t.PriceNoVat&&"0.00"!==t.PriceNoVat)try{t.Price=(Math.round(parseFloat(d.Option.PriceVatPerc)*Number(t.PriceNoVat)*100)/100).toString()}catch(e){}if(t.PriceLmfi=t.Price,t.PriceNoVatLmfi=t.PriceNoVat,t.Des&&0===t.Des.length&&(t.Des=e.dcTypeMap.get("OD"+t.Cod)),t.AddAttrs&&t.AddAttrs.Attr)if(t.AddAttrs.Attr.length)for(var r=0;r<t.AddAttrs.Attr.length;r++){var i;(i=t.AddAttrs.Attr[r]).AttrDes=e.dcTypeMap.get(i.AttrCod+i.AttrVal)}else(i=t.AddAttrs.Attr).AttrDes=e.dcTypeMap.get(i.AttrCod+i.AttrVal)}},j=function(t){"use strict";var n={CodType:"",CodRefList:[]},r=e.Vehicles[e.MVS].Options[t];if(r)if(o=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS[r.OptGroupCod]:d.MapConfig[0].OPTGROUPS[r.OptGroupCod]){n.CodType=o.Key,"CL"!==r.OptGroupCod&&"IN"!==r.OptGroupCod||(n.CodRefList=r.getRefColOptIdList());var i=e.fccf.Vehicles[e.MVS].Packs[t];i&&(n.CodRefList=i.OptRelCods)}else if(r.OptGroupKey)n.CodType=r.OptGroupKey;else{var o;if(e.Vehicles[e.MVS].Options["BO-"+r.Cod])(o=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS.BO:d.MapConfig[0].OPTGROUPS.BO)&&(n.CodType=o.Key);if(e.Vehicles[e.MVS].Options["IO-"+r.Cod])(o=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS.IO:d.MapConfig[0].OPTGROUPS.IO)&&(n.CodType=o.Key)}return n};const H=function(e,t){return t.some((t=>e.startsWith(t)))},Y={s4fC2evo:{IT:["www.abarth.it","www.alfaromeo.it","www.fiat.it","www.jeep-official.it","www.lancia.it"],FR:["www.abarth.fr","www.alfaromeo.fr","www.fiat.fr","www.jeep.fr","www.lancia.fr"],PL:["www.abarth.pl","www.alfaromeo.pl","www.fiat.pl","www.jeep.pl","www.lancia.pl"],DE:["www.abarth.de","www.alfaromeo.de","www.fiat.de","www.jeep.de","www.lancia.de"],ES:["www.abarth.es","www.alfaromeo.es","www.fiat.es","www.jeep.es","www.lancia.es"],UK:["www.abarthcars.co.uk","www.alfaromeo.co.uk","www.fiat.co.uk","www.jeep.co.uk","www.lancia.co.uk"],PT:["www.abarth.pt","www.alfaromeo.pt","www.fiat.pt","www.jeep.pt","www.lancia.pt"],RO:["www.fiat.com.ro","www.alfaromeo.ro","www.jeep.com"],RS:["www.fiat.rs","www.alfaromeosrbija.rs","www.jeep.rs"],SI:["www.fiat.si","www.alfaromeo.si","www.jeep.com"],HH:["www.abarth.hu","www.fiat.hu","www.alfaromeo.hu","www.jeep.hu"],CZ:["www.fiatcz.com","www.alfaromeocz.com","www.jeep.cz"],SK:["www.fiat.sk","www.alfaromeo.sk","www.jeep.sk","www.abarth.sk"],GR:["www.fiat.gr","www.alfaromeo.gr","www.jeep.gr","www.abarth.gr"],CH:["www.fiat.ch","www.alfaromeo.ch","www.jeep.ch","www.abarth.ch"],IE:["www.fiat.ie","www.alfaromeo.ie","www.jeep.com"],HR:["www.fiat.hr","www.alfaromeo.hr","www.jeep.com"],ZA:["www.fiat.co.za","www.alfaromeo.co.za"]},sccfC2evo:{AT:["www.abarth.at","www.alfaromeo.at","www.citroen.at","www.dsautomobiles.at","www.fiat.at","www.jeep.at","www.lancia.at","www.opel.at","www.peugeot.at"],BE:["www.abarthbelgium.be","www.alfaromeo.be","www.citroen.be","www.dsautomobiles.be","www.fiat.be","www.jeep.be","www.lancia.be","www.opel.be","www.peugeot.be"],LU:["www.abarth.lu","www.alfaromeo.lu","www.citroen.lu","www.dsautomobiles.lu","www.fiat.lu","www.jeep.lu","www.lancia.lu","www.opel.lu","www.peugeot.lu"],NL:["www.abarth.nl","www.alfaromeo.nl","www.citroen.nl","www.dsautomobiles.nl","www.fiat.nl","www.jeep.nl","www.lancia.nl","www.opel.nl","www.peugeot.nl"],ES:["www.abarth.es","www.alfaromeo.es","www.fiat.es","www.jeep.es","www.lancia.es","www.citroen.es","www.dsautomobiles.es","www.opel.es","www.peugeot.es"],PT:["www.abarth.pt","www.alfaromeo.pt","www.fiat.pt","www.jeep.pt","www.lancia.pt","www.citroen.pt","www.dsautomobiles.pt","www.opel.pt","www.peugeot.pt"]}},J=function(t,n){"use strict";let r=!0;try{const i=["preview","publish"],o=["localhost","fccf.eligens.online","fccf.eligens.cloud","csd.eligens.online","csd.eligens.cloud","sccf-api.stellantis.com","fccfembedded.eligens.online"],a=["staging-","stage1-","qa-","stage-","cert-","dev-"];if(!K()&&i.includes(n)){const n=window&&window.location&&window.location.hostname?window.location.hostname:null;if(n&&!H(n,a)){const i=Y[e.scopeConfig.Mode.initScopeType]&&Y[e.scopeConfig.Mode.initScopeType][t]?Y[e.scopeConfig.Mode.initScopeType][t]:null;r=!!o.includes(n)||!!i&&i.includes(n)}}}catch(t){r=!0,e.log.warn(e.apiName+".isMngBrandDom - WARN:["+t.message+"]")}return r};e.isMngBrandDomCheck=function(t,n){"use strict";let r=!0;try{const i=["localhost","fccf.eligens.online","fccf.eligens.cloud","csd.eligens.online","csd.eligens.cloud","sccf-api.stellantis.com","fccfembedded.eligens.online"],o=["staging-","stage1-","qa-","stage-","cert-","dev-"];if(["preview","publish"].includes(n)){const a="www."+e.getBrandPublishDomain(e.BrandName,t,e.LangName,n);if(console.log(e.apiName+".isMngBrandDomCheck - clientDomUrl:["+a+"]"),a&&!H(a,o)){const n=Y[e.scopeConfig.Mode.initScopeType]&&Y[e.scopeConfig.Mode.initScopeType][t]?Y[e.scopeConfig.Mode.initScopeType][t]:null;r=!!i.includes(a)||!!n&&n.includes(a)}}}catch(t){r=!0,e.log.warn(e.apiName+".isMngBrandDomCheck - WARN:["+t.message+"]")}return r},e.getBaseAttributeByVehicle=function(t){"use strict";var n=[];if(e.cmRuleEngine&&e.cmRuleEngine.cyto)for(var r=e.cmRuleEngine.cyto.getElementById(t).outgoers("edge[type='V']").targets(),i=0;i<r.size();i++){var o=e.bAttrValMap.get(r[i].id());n.push(o)}return n},e.getBaseAttributeViewByVehicle=function(t){"use strict";var n=[];for(var r in e.fccf.Vehicles[t].BaseAttributes){var i=e.fccf.Vehicles[t].BaseAttributes[r],o={};for(var a in o[i.KeyDes]={},o[i.KeyDes].Key=i.KeyDes,i.Values)o[i.KeyDes].Cod=i.Values[a].Cod,o[i.KeyDes].Des=i.Values[a].Des;n.push(o)}return n},e.getFeatureByVehicle=function(t){"use strict";var n=[];for(var r in e.fccf.Vehicles[t].FeatureCategories){var i=e.fccf.Vehicles[t].FeatureCategories[r];n.push(i)}return n},e.getStandardsByVehicle=function(t){"use strict";var n={};try{for(var r in e.fccf.Vehicles[t].Options){var i=e.fccf.Vehicles[t].Options[r];if(i.isStandard&&"CL"!==i.OptGroupCod&&"IN"!==i.OptGroupCod)if(n[i.OptGroupCod]?(n[i.OptGroupCod].Features[i.Cod]={},n[i.OptGroupCod].Features[i.Cod].Cod=i.Cod,n[i.OptGroupCod].Features[i.Cod].Des=i.Des,n[i.OptGroupCod].Features[i.Cod].isVisible=i.isVisible):(n[i.OptGroupCod]={},n[i.OptGroupCod].Cod=i.OptGroupCod,n[i.OptGroupCod].Features={},n[i.OptGroupCod].Features[i.Cod]={},n[i.OptGroupCod].Features[i.Cod].Cod=i.Cod,n[i.OptGroupCod].Features[i.Cod].Des=i.Des,n[i.OptGroupCod].Features[i.Cod].isVisible=i.isVisible),e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod])n[i.OptGroupCod].Des=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod].Des,n[i.OptGroupCod].isVisible=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod].isVisible;else{var o=d.MapConfig.all&&d.MapConfig.all.OPTGROUPS?d.MapConfig.all.OPTGROUPS[i.OptGroupCod]:d.MapConfig[0].OPTGROUPS[i.OptGroupCod];o&&o.Key&&(n[i.OptGroupCod].Des=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[o.Key].Des,n[i.OptGroupCod].isVisible=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[o.Key].isVisible)}}}catch(t){e.log.warn(e.apiName+".getStandardsByVehicle - WARN:["+t.message+"]")}return n};var X=function(){"use strict";var t=e.cmRuleEngine.cyto.collection(),n=e.cmRuleEngine.cyto.collection();n=e.cmRuleEngine.configurazione;for(var r=0;r<n.size();r++){var i=n[r];t=0===r?i.incomers("edge[type='V']").sources():t.intersection(i.incomers("edge[type='V']").sources())}return t};e.checkAddOption=function(t){var n,r;return n=ce(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.checkAddNode(r),e.log.debug(e.apiName+".checkAddOption - check processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.addOption=function(t){var n,r;return n=ce(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.addNode(r),e.log.debug(e.apiName+".addOption - check processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.removeOption=function(t){var n,r;return n=ce(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.removeNode(r),e.log.debug(e.apiName+".removeOption - processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.getConfiguration=function(){var t,n,r;return n={},r="",ce(),t=[],e.ruleEngine.configurazione.forEach((function(e){"AG"!==e.data().type&&"VG"!==e.data().type&&t.push(e.id())})),e.log.debug(e.apiName+".getConfiguration: ["+t+"]"),n.configurazione=t,ue(!0,200,r=r+" - configuration: ( "+t+")",n)},e.getUnselectables=function(){var t,n,r;return n={},r="",ce(),t=[],e.ruleEngine.incompatibiliConConfig.forEach((function(e){t.push(e.id())})),e.log.debug(e.apiName+".getUnselectables: ["+t+"]"),n.incompatibili=t,ue(!0,200,r=r+" - incompatible opt list: ( "+t+")",n)},e.addOptionList=function(t){var n,r;for(e.log.debug(e.apiName+".addOptionList"),n=0;n<t.length;n++)r=t[n],e.addOption(r)};var Z=function(){"use strict";e.log.debug(e.apiName+".selectSingleStd - begin");var t=function(t,n){for(var r in t){var i=e.ruleEngine.cyto.getElementById(r).outgoers("edge[type='V'],edge[type='A']").targets(),o="";i.each((function(e){o=o+" "+e.id()})),e.log.debug(e.apiName+".selectSingleStd - mapRow:"+r+">"+o),n.set(r,i)}},n=function(e){var t=[];if(!a.isEmpty(e)){var n=null,r=null,i=a.filter(e,["Price",null]);if(i.length>=1)t.push(i[0].NodeCod);else{for(var o in e)(null==n&&"string"==typeof e[o].Price||Number(e[o].Price)<n)&&(n=Number(e[o].Price),r=o);t.push(e[r].NodeCod)}}return t},r=function(t){var n=[];if(!a.isEmpty(t)){var r=null,i=null;for(var o in t){e.log.debug(e.apiName+".selectSingleStd - stdOptionCod_:["+o+"]");var s,l=e.ruleEngine.cyto.getElementById(o),c=e.ruleEngine.cyto.collection(),u={addList:c=l?c.union(l):e.ruleEngine.cyto.collection(),removeList:e.ruleEngine.cyto.collection()};s=e.ruleEngine.processRuleMaxIter(u,e.maxIter);var d=null;a.forEach(s,(function(t){var n=e.ruleEngine.getIdList(t.addList),r=[],i=(a.filter(n,(function(t){var n=e.Vehicles[e.MVS].Options[t];if(n&&"string"==typeof n.Price)return r.push(Number(n.Price)),n})),a.sum(r));e.log.debug(e.apiName+".selectSingleStd - scenarioPrice_:["+i+"]"),d=null===d||i<d?i:d,e.log.debug(e.apiName+".selectSingleStd - scenarioPriceMin_:["+d+"]")})),(a.isNumber(r)&&a.isNumber(d)&&r>d||!a.isNumber(r)&&a.isNumber(d))&&(r=d,i=o)}for(var o in t)o===i&&n.push(i)}return n},i=e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,o=e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,s=a.filter(i,["isStandard",!0]),l=a.filter(o,["isStandard",!0]),c=new Map,u=new Map;t(i,c),t(o,u);var d=[],p=[];if(s.length>1||l.length>1)return e.log.debug(e.apiName+".selectSingleStd - rebuild by selectSingleStdLegacy LEGACY"),void function(){e.log.debug(e.apiName+".selectSingleStdLegacy - begin");var t=function(t){if(t.length>1){for(var n=null,r=null,i=0;i<t.length;i++){var o,s=t[i],l=e.ruleEngine.cyto.getElementById(s.NodeCod),c=e.ruleEngine.cyto.collection(),u={addList:c=l?c.union(l):e.ruleEngine.cyto.collection(),removeList:e.ruleEngine.cyto.collection()};o=e.ruleEngine.processRuleMaxIter(u,e.maxIter);var d=null;a.forEach(o,(function(t){var n=e.ruleEngine.getIdList(t.addList),r=[],i=(a.filter(n,(function(t){var n=e.Vehicles[e.MVS].Options[t];if(n&&"string"==typeof n.Price)return r.push(Number(n.Price)),n})),a.sum(r));i&&(d=d?i<d?i:d:i)})),n?n>d&&(n=d,r=s):(n=d,r=s)}a.forEach(t,(function(e){e.isStandard=e.Cod===r.Cod}))}},n=a.filter(e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,["isStandard",!0]);0===n.length&&e.log.error(e.apiName+".selectSingleStdLegacy - Standard Nodes add ERROR - CL group without Std"),t(n);var r=a.filter(e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,["isStandard",!0]);0===r.length&&e.log.error(e.apiName+".selectSingleStdLegacy - Standard Nodes add ERROR - IN group without Std"),t(r)}();if(1===s.length?(d.push(s[0].NodeCod),e.log.debug(e.apiName+".selectSingleStd - Colors Standard Node already exists")):s.length>1?e.log.error(e.apiName+".selectSingleStd - Colors Standard Nodes add ERROR - CL group with more than one Std"):0===s.length&&(c.forEach((function(e,t){e.empty()&&d.push(t)})),Object.keys(i).length===d.length&&(d=n(i)),0===d.length&&c.forEach((function(t,n){t.size()>0&&t.forEach((function(t){e.Vehicles[e.MVS].Options[t.id()].isStandard&&d.push(n)}))})),0===d.length&&(d=r(i))),1===l.length?(p.push(l[0].NodeCod),e.log.debug(e.apiName+".selectSingleStd - Interiors Standard Node already exists")):l.length>1?e.log.error(e.apiName+".selectSingleStd - Interiors Standard Nodes add ERROR - IN group with more than one Std"):0===l.length&&(u.forEach((function(e,t){e.empty()&&p.push(t)})),Object.keys(o).length===p.length&&(p=n(o)),0===p.length&&c.forEach((function(t,n){t.size()>0&&t.forEach((function(t){e.Vehicles[e.MVS].Options[t.id()].isStandard&&p.push(n)}))})),0===p.length&&(p=r(o))),0===d.length||0===p.length)e.log.error(e.apiName+".selectSingleStd - Colors/Interiors Standard Nodes add ERROR - colorCandidateStd:["+d.length+"] - interiorCandidateStd:["+p.length+"]");else for(var f=!1,h=0;h<d.length&&!f;h++)for(var g=d[h],v=0;v<p.length&&!f;v++){var m=p[v],y=e.ruleEngine.cyto.getElementById(g),b=e.ruleEngine.cyto.getElementById(m);y.outgoers("edge[type='I']").targets().intersection(b).empty()&&(e.Vehicles[e.MVS].Options[g].isStandard=!0,e.Vehicles[e.MVS].Options[m].isStandard=!0,e.log.debug(e.apiName+".selectSingleStd - Colors/Interiors Standard Nodes Found"),f=!0)}if(0===a.filter(e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,["isStandard",!0]).length)throw e.log.error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - CL group without Std"),new Error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - CL group without Std");if(0===a.filter(e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,["isStandard",!0]).length)throw e.log.error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - IN group without Std"),new Error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - IN group without Std")};e.timeBegin=function(){e.now=(new Date).getTime(),e.log.debug("timeBegin - T0")},e.timeEnd=function(t){var n=t||"",r=(new Date).getTime()-e.now;return e.log.debug("timeEnd - "+n+" - T1 delta:["+r+"]"),r};var q=function(e){return a.filter(e,(function(e){return!0===e.isSelected||e.SelectedInPacks&&e.SelectedInPacks.length>0}))},K=function(){return!("undefined"!=typeof window&&window.document)},$=function(e){var t="Malfomed Object";try{t=JSON.stringify(e,null,0)}catch(e){}return t},ee=function(t){"use strict";var n=[],r=e.Vehicles[e.MVS].Options[t.Cod];if(r)if(r.isSelected&&r.SelectedInPacks&&r.SelectedInPacks&&r.SelectedInPacks.length>0&&"remove"===t.ChangeType)for(var i=0;i<r.SelectedInPacks.length;i++){var o=r.SelectedInPacks[i],a=ie(r.NodeCod,"remove",!0,{CodType:"INPACK"});n.push(a);var s=ie(o,"remove",!1,{CodType:"INPACK",CodRefList:[o]});n.push(s)}else t.IsUserRequest=!0,n.push(t);else e.log.warn(e.apiName+".getRuleChange - Not Valid Opt Change - Change:["+JSON.stringify(t)+"]");return n},te=function(t){"use strict";for(var n={},r=e.ruleEngine.cyto.collection(),i=e.ruleEngine.cyto.collection(),o=[],s=[],l={},c=0;c<t.length;c++){var u=t[c];if(u.Cod&&u.ChangeType){var d=ee(u);a.forEach(d,(function(t){var n=t.Cod,a=e.ruleEngine.cyto.getElementById(n);1===a.length&&("add"===t.ChangeType?(r=r.union(a),t.IsUserRequest&&o.push(n)):"remove"===t.ChangeType&&(i=i.union(a),t.IsUserRequest&&s.push(n)),t.CodType&&"INPACK"===t.CodType&&(l.InPack=!0))}))}}return n.toAddList=r,n.toRemoveList=i,n.toAddCodList=o,n.toRemoveCodList=s,n.addictionalData=l,n},ne=function(t){"use strict";var n=null;if(t.Cod&&t.ChangeType){var r=t.Cod;n=e.ruleEngine.cyto.getElementById(r)}return n},re=function(e){"use strict";var t={Changes:[]};return t.Changes=e,t},ie=function(e,t,n,r){"use strict";var i={};return i.ChangeType=t,i.Cod=e,i.CodRefList=[],i.CodType="",r&&(i.CodType=r.CodType,i.CodRefList=r.CodRefList),i.IsUserRequest=n,i},oe=function(t,n,r,i,o){"use strict";var a,s=[];0===i.length&&(a=re([]),i.push(a));for(var l=0;l<i.length;l++){var c=i[l].Changes;if(t.data.altGrList.length>0)for(l=0;l<t.data.altGrList.length;l++){var u=t.data.altGrList[l];e.log.debug(e.apiName+".setChangeScenarioList - altGrElement_: ["+u[0].id()+"]");var d=se(u,n,r,o),p=le(t,n,r,o);c=d.concat(p),a=re(c),s.push(a)}else{p=le(t,n,r,o);a=re(c.concat(p)),s.push(a)}}return s},ae=function(t,n,r,i){"use strict";var o,a=[],s=[];if(t&&t.data&&t.data.scenarios)for(var l=t.data.scenarios,c=0;c<l.length;c++){var u=l[c],d=[],p=u.addList.filter((function(e){return"AG"!==e.data("type")&&"VG"!==e.data("type")}));if(!e.ruleEngine.insertIdAddList(s,p)){for(var f=0;f<u.removeList.size();f++){var h=u.removeList[f];if("VG"!==h.data().type&&"AG"!==h.data().type){var g=h.id(),v=j(g),m=ie(g,"remove",r.includes(g),v);d.push(m),i&&(e.Vehicles[e.MVS].Options[m.Cod].isUserRequest=!1)}}for(f=0;f<u.addList.size();f++){var y=u.addList[f];if("VG"!==y.data().type&&"AG"!==y.data().type){var b=y.id();v=j(b),m=ie(b,"add",n.includes(b),v);d.push(m),i&&(e.Vehicles[e.MVS].Options[m.Cod].isUserRequest=m.IsUserRequest)}}o=re(d),a.push(o)}}return a};e.getChangeList=function(e,t){"use strict";for(var n=[],r=0;r<t.length;r++){var i=t[r],o=ie(i,"remove",!0);n.push(o)}for(r=0;r<e.length;r++){i=e[r],o=ie(i,"add",!0);n.push(o)}return n};var se=function(t,n,r,i){"use strict";for(var o=[],a=0;a<t.length;a++){var s=t[a].id(),l=ie(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest="remove"!=r&&l.IsUserRequest)}return o},le=function(t,n,r,i){"use strict";for(var o=[],a=0;a<t.data.addList.length;a++){var s=t.data.addList[a].id(),l=ie(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest=l.IsUserRequest)}for(a=0;a<t.data.remList.length;a++){s=t.data.remList[a].id(),l=ie(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest=!1)}return o},ce=function(){"use strict";var e={success:!1,code:500,message:"Generic Error",data:{}};return e},ue=function(e,t,n,r){"use strict";var i={};return i.success=e,i.code=t,i.message=n,i.data=r,i}}},31:e=>{e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){var n=t[a][1][e];return i(n||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){},{}],2:[function(e,t,n){"use strict";var r=e("./util"),i=e("./is"),o=e("./promise"),a=function(e,t,n){var o=this._private=r.extend({duration:1e3},t,n);o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&i.fn(o.complete)&&o.completes.push(o.complete),this.length=1,this[0]=this},s=a.prototype;r.extend(s,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t=e.target._private.animation;(e.queue?t.queue:t.current).push(this),i.elementOrCollection(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(t,n){var r=e[t];null!=r&&(e[t]=e[n],e[n]=r)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var r=0;r<e.style.length;r++){var i=e.style[r],o=i.name,a=e.startStyle[o];e.startStyle[o]=i,e.style[r]=a}return t&&this.play(),this},promise:function(e){var t,n=this._private;return t="frame"===e?n.frames:n.completes,new o((function(e,n){t.push((function(){e()}))}))}}),s.complete=s.completed,t.exports=a},{"./is":91,"./promise":94,"./util":108}],3:[function(e,t,n){"use strict";var r=e("../../is"),i={aStar:function(e){var t=this;e=e||{};var n=function(e,t,r,i){if(e==t)return i.unshift(o.getElementById(t)),i;if(t in r){var a=r[t],s=v[t];return i.unshift(o.getElementById(s)),i.unshift(o.getElementById(t)),n(e,a,r,i)}},i=function(e,t){if(0!==e.length){for(var n=0,r=t[e[0]],i=1;i<e.length;i++){var o=t[e[i]];o<r&&(r=o,n=i)}return n}},o=this._private.cy;if(null!=e&&null!=e.root){var a=r.string(e.root)?this.filter(e.root)[0]:e.root[0];if(null!=e.goal){var s=r.string(e.goal)?this.filter(e.goal)[0]:e.goal[0];if(null!=e.heuristic&&r.fn(e.heuristic))var l=e.heuristic;else l=function(){return 0};if(null!=e.weight&&r.fn(e.weight))var c=e.weight;else c=function(e){return 1};if(null!=e.directed)var u=e.directed;else u=!1;var d=a.id(),p=s.id(),f=[],h=[d],g={},v={},m={},y={};m[d]=0,y[d]=l(a);for(var b=0;h.length>0;){var C=i(h,y),x=o.getElementById(h[C]),E=x.id();if(b++,E==p){var S=n(d,p,g,[]);return{found:!0,distance:m[E],path:t.spawn(S),steps:b}}f.push(E),h.splice(C,1);for(var w=x._private.edges,V=0;V<w.length;V++){var R=w[V];if(this.hasElementWithId(R.id())&&(!u||R.data("source")===E)){var O=R.source(),A=R.target(),k=O.id()!==E?O:A,T=k.id();if(this.hasElementWithId(T)&&-1==f.indexOf(T)){var N=m[E]+c(R);-1!=h.indexOf(T)?N<m[T]&&(m[T]=N,y[T]=N+l(k),g[T]=E):(m[T]=N,y[T]=N+l(k),h.push(T),g[T]=E,v[T]=R.id())}}}}return{found:!1,distance:void 0,path:void 0,steps:b}}}}};t.exports=i},{"../../is":91}],4:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../util"),o={bellmanFord:function(e){var t=this;if(null!=(e=e||{}).weight&&r.fn(e.weight))var n=e.weight;else n=function(e){return 1};if(null!=e.directed)var o=e.directed;else o=!1;if(null!=e.root){if(r.string(e.root))var a=this.filter(e.root)[0];else a=e.root[0];for(var s=this._private.cy,l=this.edges().stdFilter((function(e){return!e.isLoop()})),c=this.nodes(),u=c.length,d={},p=0;p<u;p++)d[c[p].id()]=p;var f=[],h=[],g=[];for(p=0;p<u;p++)c[p].id()===a.id()?f[p]=0:f[p]=1/0,h[p]=void 0;var v=!1;for(p=1;p<u;p++){v=!1;for(var m=0;m<l.length;m++){var y,b=d[l[m].source().id()],C=d[l[m].target().id()],x=n(l[m]);(y=f[b]+x)<f[C]&&(f[C]=y,h[C]=b,g[C]=l[m],v=!0),o||(y=f[C]+x)<f[b]&&(f[b]=y,h[b]=C,g[b]=l[m],v=!0)}if(!v)break}if(v)for(m=0;m<l.length;m++)if(b=d[l[m].source().id()],C=d[l[m].target().id()],x=n(l[m]),f[b]+x<f[C])return i.error("Graph contains a negative weight cycle for Bellman-Ford"),{pathTo:void 0,distanceTo:void 0,hasNegativeWeightCycle:!0};var E=[];for(p=0;p<u;p++)E.push(c[p].id());var S={distanceTo:function(e){if(r.string(e))var t=s.filter(e)[0].id();else t=e.id();return f[d[t]]},pathTo:function(e){var n=function(e,t,n,r,i,o){for(;;){if(i.push(s.getElementById(r[n])),i.push(o[n]),t===n)return i;var a=e[n];if(void 0===a)return;n=a}};if(r.string(e))var i=s.filter(e)[0].id();else i=e.id();var o=[],l=n(h,d[a.id()],d[i],E,o,g);return null!=l&&l.reverse(),t.spawn(l)},hasNegativeWeightCycle:!1};return S}}};t.exports=o},{"../../is":91,"../../util":108}],5:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../heap"),o={betweennessCentrality:function(e){var t,n;e=e||{},r.fn(e.weight)?(n=e.weight,t=!0):t=!1;for(var o=null!=e.directed&&e.directed,a=this._private.cy,s=this.nodes(),l={},c={},u=0,d={set:function(e,t){c[e]=t,t>u&&(u=t)},get:function(e){return c[e]}},p=0;p<s.length;p++)l[C=(x=s[p]).id()]=o?x.outgoers().nodes():x.openNeighborhood().nodes(),d.set(C,0);for(var f=0;f<s.length;f++){var h=s[f].id(),g=[],v={},m={},y={},b=new i((function(e,t){return y[e]-y[t]}));for(p=0;p<s.length;p++){var C;v[C=s[p].id()]=[],m[C]=0,y[C]=1/0}for(m[h]=1,y[h]=0,b.push(h);!b.empty();){var x=b.pop();if(g.push(x),t)for(var E=0;E<l[x].length;E++){var S=l[x][E],w=a.getElementById(x),V=n(w.edgesTo(S).length>0?w.edgesTo(S)[0]:S.edgesTo(w)[0]);S=S.id(),y[S]>y[x]+V&&(y[S]=y[x]+V,b.nodes.indexOf(S)<0?b.push(S):b.updateItem(S),m[S]=0,v[S]=[]),y[S]==y[x]+V&&(m[S]=m[S]+m[x],v[S].push(x))}else for(E=0;E<l[x].length;E++)S=l[x][E].id(),y[S]==1/0&&(b.push(S),y[S]=y[x]+1),y[S]==y[x]+1&&(m[S]=m[S]+m[x],v[S].push(x))}var R={};for(p=0;p<s.length;p++)R[s[p].id()]=0;for(;g.length>0;)for(S=g.pop(),E=0;E<v[S].length;E++)R[x=v[S][E]]=R[x]+m[x]/m[S]*(1+R[S]),S!=s[f].id()&&d.set(S,d.get(S)+R[S])}var O={betweenness:function(e){return e=r.string(e)?a.filter(e).id():e.id(),d.get(e)},betweennessNormalized:function(e){return 0==u?0:(e=r.string(e)?a.filter(e).id():e.id(),d.get(e)/u)}};return O.betweennessNormalised=O.betweennessNormalized,O}};o.bc=o.betweennessCentrality,t.exports=o},{"../../heap":89,"../../is":91}],6:[function(e,t,n){"use strict";var r=e("../../is"),i=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(t,n,i){var o;r.plainObject(t)&&!r.elementOrCollection(t)&&(t=(o=t).roots||o.root,n=o.visit,i=o.directed),i=2!==arguments.length||r.fn(n)?i:n,n=r.fn(n)?n:function(){};for(var a,s=this._private.cy,l=t=r.string(t)?this.filter(t):t,c=[],u=[],d={},p={},f={},h=0,g=this.nodes(),v=this.edges(),m=0;m<l.length;m++)l[m].isNode()&&(c.unshift(l[m]),e.bfs&&(f[l[m].id()]=!0,u.push(l[m])),p[l[m].id()]=0);for(;0!==c.length;){if(l=e.bfs?c.shift():c.pop(),e.dfs){if(f[l.id()])continue;f[l.id()]=!0,u.push(l)}var y,b=p[l.id()],C=d[l.id()],x=null==C?void 0:C.connectedNodes().not(l)[0];if(!0===(y=n(l,C,x,h++,b))){a=l;break}if(!1===y)break;var E=l.connectedEdges(i?function(e){return e.data("source")===l.id()}:void 0).intersect(v);for(m=0;m<E.length;m++){var S=E[m],w=S.connectedNodes((function(e){return e.id()!==l.id()})).intersect(g);0===w.length||f[w.id()]||(w=w[0],c.push(w),e.bfs&&(f[w.id()]=!0,u.push(w)),d[w.id()]=S,p[w.id()]=p[l.id()]+1)}}var V=[];for(m=0;m<u.length;m++){var R=u[m],O=d[R.id()];O&&V.push(O),V.push(R)}return{path:s.collection(V,{unique:!0}),found:s.collection(a)}}},o={breadthFirstSearch:i({bfs:!0}),depthFirstSearch:i({dfs:!0})};o.bfs=o.breadthFirstSearch,o.dfs=o.depthFirstSearch,t.exports=o},{"../../is":91}],7:[function(e,t,n){"use strict";var r=e("../../is"),i={closenessCentralityNormalized:function(e){e=e||{};var t=this.cy(),n=e.harmonic;void 0===n&&(n=!0);for(var i={},o=0,a=this.nodes(),s=this.floydWarshall({weight:e.weight,directed:e.directed}),l=0;l<a.length;l++){for(var c=0,u=0;u<a.length;u++)if(l!=u){var d=s.distance(a[l],a[u]);c+=n?1/d:d}n||(c=1/c),o<c&&(o=c),i[a[l].id()]=c}return{closeness:function(e){return 0==o?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),i[e]/o)}}},closenessCentrality:function(e){if(null!=(e=e||{}).root){if(r.string(e.root))var t=this.filter(e.root)[0];else t=e.root[0];if(null!=e.weight&&r.fn(e.weight))var n=e.weight;else n=function(){return 1};if(null!=e.directed&&r.bool(e.directed))var i=e.directed;else i=!1;var o=e.harmonic;void 0===o&&(o=!0);for(var a=this.dijkstra({root:t,weight:n,directed:i}),s=0,l=this.nodes(),c=0;c<l.length;c++)if(l[c].id()!=t.id()){var u=a.distanceTo(l[c]);s+=o?1/u:u}return o?s:1/s}}};i.cc=i.closenessCentrality,i.ccn=i.closenessCentralityNormalised=i.closenessCentralityNormalized,t.exports=i},{"../../is":91}],8:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../util"),o={degreeCentralityNormalized:function(e){e=e||{};var t=this.cy();if(null!=e.directed)var n=e.directed;else n=!1;var o=this.nodes(),a=o.length;if(n){for(var s={},l={},c=0,u=0,d=0;d<a;d++){var p=o[d],f=this.degreeCentrality(i.extend({},e,{root:p}));c<f.indegree&&(c=f.indegree),u<f.outdegree&&(u=f.outdegree),s[p.id()]=f.indegree,l[p.id()]=f.outdegree}return{indegree:function(e){return 0==c?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),s[e]/c)},outdegree:function(e){return 0==u?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),l[e]/u)}}}var h={},g=0;for(d=0;d<a;d++)p=o[d],f=this.degreeCentrality(i.extend({},e,{root:p})),g<f.degree&&(g=f.degree),h[p.id()]=f.degree;return{degree:function(e){return 0==g?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),h[e]/g)}}},degreeCentrality:function(e){var t=this;if(null!=(e=e||{})&&null!=e.root){var n=r.string(e.root)?this.filter(e.root)[0]:e.root[0];if(null!=e.weight&&r.fn(e.weight))var i=e.weight;else i=function(e){return 1};if(null!=e.directed)var o=e.directed;else o=!1;if(null!=e.alpha&&r.number(e.alpha))var a=e.alpha;else a=0;if(o){for(var s=n.connectedEdges('edge[target = "'+n.id()+'"]').intersection(t),l=n.connectedEdges('edge[source = "'+n.id()+'"]').intersection(t),c=s.length,u=l.length,d=0,p=0,f=0;f<s.length;f++)d+=i(s[f]);for(f=0;f<l.length;f++)p+=i(l[f]);return{indegree:Math.pow(c,1-a)*Math.pow(d,a),outdegree:Math.pow(u,1-a)*Math.pow(p,a)}}var h=n.connectedEdges().intersection(t),g=h.length,v=0;for(f=0;f<h.length;f++)v+=i(h[f]);return{degree:Math.pow(g,1-a)*Math.pow(v,a)}}}};o.dc=o.degreeCentrality,o.dcn=o.degreeCentralityNormalised=o.degreeCentralityNormalized,t.exports=o},{"../../is":91,"../../util":108}],9:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../heap"),o={dijkstra:function(e,t,n){var o;r.plainObject(e)&&!r.elementOrCollection(e)&&(e=(o=e).root,t=o.weight,n=o.directed);var a=this._private.cy;t=r.fn(t)?t:function(){return 1};for(var s=r.string(e)?this.filter(e)[0]:e[0],l={},c={},u={},d=this.edges().filter((function(e){return!e.isLoop()})),p=this.nodes(),f=function(e){return l[e.id()]},h=function(e,t){l[e.id()]=t,g.updateItem(e)},g=new i((function(e,t){return f(e)-f(t)})),v=0;v<p.length;v++){var m=p[v];l[m.id()]=m.same(s)?0:1/0,g.push(m)}for(var y=function(e,r){for(var i,o=(n?e.edgesTo(r):e.edgesWith(r)).intersect(d),a=1/0,s=0;s<o.length;s++){var l=o[s],c=t(l);(c<a||!i)&&(a=c,i=l)}return{edge:i,dist:a}};g.size()>0;){var b=g.pop(),C=f(b),x=b.id();if(u[x]=C,C===Math.Infinite)break;var E=b.neighborhood().intersect(p);for(v=0;v<E.length;v++){var S=E[v],w=S.id(),V=y(b,S),R=C+V.dist;R<f(S)&&(h(S,R),c[w]={node:b,edge:V.edge})}}return{distanceTo:function(e){var t=r.string(e)?p.filter(e)[0]:e[0];return u[t.id()]},pathTo:function(e){var t=r.string(e)?p.filter(e)[0]:e[0],n=[],i=t;if(t.length>0)for(n.unshift(t);c[i.id()];){var o=c[i.id()];n.unshift(o.edge),n.unshift(o.node),i=o.node}return a.collection(n)}}}};t.exports=o},{"../../heap":89,"../../is":91}],10:[function(e,t,n){"use strict";var r=e("../../is"),i={floydWarshall:function(e){e=e||{};var t=this.cy();if(null!=e.weight&&r.fn(e.weight))var n=e.weight;else n=function(e){return 1};if(null!=e.directed)var i=e.directed;else i=!1;for(var o=this.edges().stdFilter((function(e){return!e.isLoop()})),a=this.nodes(),s=a.length,l={},c=0;c<s;c++)l[a[c].id()]=c;var u=[];for(c=0;c<s;c++){for(var d=new Array(s),p=0;p<s;p++)d[p]=c==p?0:1/0;u.push(d)}var f=[],h=[],g=function(e){for(var t=0;t<s;t++){for(var n=new Array(s),r=0;r<s;r++)n[r]=void 0;e.push(n)}};for(g(f),g(h),c=0;c<o.length;c++){var v=l[o[c].source().id()],m=l[o[c].target().id()],y=n(o[c]);u[v][m]>y&&(u[v][m]=y,f[v][m]=m,h[v][m]=o[c])}if(!i)for(c=0;c<o.length;c++)v=l[o[c].target().id()],m=l[o[c].source().id()],y=n(o[c]),u[v][m]>y&&(u[v][m]=y,f[v][m]=m,h[v][m]=o[c]);for(var b=0;b<s;b++)for(c=0;c<s;c++)for(p=0;p<s;p++)u[c][b]+u[b][p]<u[c][p]&&(u[c][p]=u[c][b]+u[b][p],f[c][p]=f[c][b]);var C=[];for(c=0;c<s;c++)C.push(a[c].id());var x={distance:function(e,n){if(r.string(e))var i=t.filter(e)[0].id();else i=e.id();if(r.string(n))var o=t.filter(n)[0].id();else o=n.id();return u[l[i]][l[o]]},path:function(e,n){var i=function(e,n,r,i,o){if(e===n)return t.getElementById(i[e]);if(void 0!==r[e][n]){for(var a=[t.getElementById(i[e])],s=e;e!==n;){s=e,e=r[e][n];var l=o[s][e];a.push(l),a.push(t.getElementById(i[e]))}return a}};if(r.string(e))var o=t.filter(e)[0].id();else o=e.id();if(r.string(n))var a=t.filter(n)[0].id();else a=n.id();var s=i(l[o],l[a],f,C,h);return t.collection(s)}};return x}};t.exports=i},{"../../is":91}],11:[function(e,t,n){"use strict";var r=e("../../util"),i={};[e("./bfs-dfs"),e("./dijkstra"),e("./kruskal"),e("./a-star"),e("./floyd-warshall"),e("./bellman-ford"),e("./kerger-stein"),e("./page-rank"),e("./degree-centrality"),e("./closeness-centrality"),e("./betweenness-centrality")].forEach((function(e){r.extend(i,e)})),t.exports=i},{"../../util":108,"./a-star":3,"./bellman-ford":4,"./betweenness-centrality":5,"./bfs-dfs":6,"./closeness-centrality":7,"./degree-centrality":8,"./dijkstra":9,"./floyd-warshall":10,"./kerger-stein":12,"./kruskal":13,"./page-rank":14}],12:[function(e,t,n){"use strict";var r=e("../../util"),i={kargerStein:function(e){var t=this;e=e||{};var n=function(e,t,n){for(var r=n[e],i=r[1],o=r[2],a=t[i],s=t[o],l=n.filter((function(e){return!(t[e[1]]===a&&t[e[2]]===s||t[e[1]]===s&&t[e[2]]===a)})),c=0;c<l.length;c++){var u=l[c];u[1]===s?(l[c]=u.slice(0),l[c][1]=a):u[2]===s&&(l[c]=u.slice(0),l[c][2]=a)}for(c=0;c<t.length;c++)t[c]===s&&(t[c]=a);return l},i=function(e,t,r,o){if(r<=o)return t;var a=Math.floor(Math.random()*t.length),s=n(a,e,t);return i(e,s,r-1,o)},o=this._private.cy,a=this.edges().stdFilter((function(e){return!e.isLoop()})),s=this.nodes(),l=s.length,c=a.length,u=Math.ceil(Math.pow(Math.log(l)/Math.LN2,2)),d=Math.floor(l/Math.sqrt(2));if(!(l<2)){for(var p={},f=0;f<l;f++)p[s[f].id()]=f;var h=[];for(f=0;f<c;f++){var g=a[f];h.push([f,p[g.source().id()],p[g.target().id()]])}var v,m=1/0,y=[];for(f=0;f<l;f++)y.push(f);for(var b=0;b<=u;b++){var C=y.slice(0),x=i(C,h,l,d),E=C.slice(0),S=i(C,x,d,2),w=i(E,x,d,2);S.length<=w.length&&S.length<m?(m=S.length,v=[S,C]):w.length<=S.length&&w.length<m&&(m=w.length,v=[w,E])}var V=v[0].map((function(e){return a[e[0]]})),R=[],O=[],A=v[1][0];for(f=0;f<v[1].length;f++)v[1][f]===A?R.push(s[f]):O.push(s[f]);return{cut:t.spawn(o,V),partition1:t.spawn(R),partition2:t.spawn(O)}}r.error("At least 2 nodes are required for Karger-Stein algorithm")}};t.exports=i},{"../../util":108}],13:[function(e,t,n){"use strict";var r=e("../../is"),i={kruskal:function(e){function t(e){for(var t=0;t<o.length;t++){var n=o[t];if(n.anySame(e))return{eles:n,index:t}}}var n=this.cy();e=r.fn(e)?e:function(){return 1};for(var i=n.collection(n,[]),o=[],a=this.nodes(),s=0;s<a.length;s++)o.push(a[s].collection());var l=this.edges().toArray().sort((function(t,n){return e(t)-e(n)}));for(s=0;s<l.length;s++){var c=l[s],u=c.source()[0],d=c.target()[0],p=t(u),f=t(d);p.index!==f.index&&(i=i.add(c),o[p.index]=p.eles.add(f.eles),o.splice(f.index,1))}return a.add(i)}};t.exports=i},{"../../is":91}],14:[function(e,t,n){"use strict";var r=e("../../is"),i={pageRank:function(e){var t=function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r];for(r=0;r<t;r++)e[r]=e[r]/n};if(null!=(e=e||{})&&null!=e.dampingFactor)var n=e.dampingFactor;else n=.8;if(null!=e&&null!=e.precision)var i=e.precision;else i=1e-6;if(null!=e&&null!=e.iterations)var o=e.iterations;else o=200;if(null!=e&&null!=e.weight&&r.fn(e.weight))var a=e.weight;else a=function(e){return 1};for(var s=this._private.cy,l=this.edges().stdFilter((function(e){return!e.isLoop()})),c=this.nodes(),u=c.length,d=l.length,p={},f=0;f<u;f++)p[c[f].id()]=f;var h=[],g=[],v=(1-n)/u;for(f=0;f<u;f++){for(var m=[],y=0;y<u;y++)m.push(0);h.push(m),g.push(0)}for(f=0;f<d;f++){var b=l[f],C=p[b.source().id()],x=p[b.target().id()],E=a(b);h[x][C]+=E,g[C]+=E}var S=1/u+v;for(y=0;y<u;y++)if(0===g[y])for(f=0;f<u;f++)h[f][y]=S;else for(f=0;f<u;f++)h[f][y]=h[f][y]/g[y]+v;var w,V=[],R=[];for(f=0;f<u;f++)V.push(1),R.push(0);for(var O=0;O<o;O++){var A=R.slice(0);for(f=0;f<u;f++)for(y=0;y<u;y++)A[f]+=h[f][y]*V[y];t(A),w=V,V=A;var k=0;for(f=0;f<u;f++)k+=Math.pow(w[f]-V[f],2);if(k<i)break}var T={rank:function(e){if(r.string(e))var t=s.filter(e)[0].id();else t=e.id();return V[p[t]]}};return T}};t.exports=i},{"../../is":91}],15:[function(e,t,n){"use strict";var r=e("../define"),i={animate:r.animate(),animation:r.animation(),animated:r.animated(),clearQueue:r.clearQueue(),delay:r.delay(),delayAnimation:r.delayAnimation(),stop:r.stop()};t.exports=i},{"../define":44}],16:[function(e,t,n){"use strict";var r=e("../util"),i={classes:function(e){e=(e||"").match(/\S+/g)||[];for(var t=this,n=[],i={},o=0;o<e.length;o++)i[e[o]]=!0;for(var a=0;a<t.length;a++){var s=t[a],l=s._private,c=l.classes,u=!1;for(o=0;o<e.length;o++)if(!(p=c[e[o]])){u=!0;break}if(!u)for(e=Object.keys(c),o=0;o<e.length;o++){var d=e[o],p=c[d],f=i[d];if(p&&!f){u=!0;break}}u&&(l.classes=r.copy(i),n.push(s))}return n.length>0&&this.spawn(n).updateStyle().trigger("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return!(null==t||!t._private.classes[e])},toggleClass:function(e,t){for(var n=e.match(/\S+/g)||[],r=this,i=[],o=0,a=r.length;o<a;o++)for(var s=r[o],l=!1,c=0;c<n.length;c++){var u=n[c],d=s._private.classes,p=d[u];t||void 0===t&&!p?(d[u]=!0,p||l||(i.push(s),l=!0)):(d[u]=!1,p&&!l&&(i.push(s),l=!0))}return i.length>0&&this.spawn(i).updateStyle().trigger("class"),r},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}};t.exports=i},{"../util":108}],17:[function(e,t,n){"use strict";var r=(e("../is"),e("../selector")),i={allAre:function(e){var t=new r(e);return this.every((function(e){return t.matches(e)}))},is:function(e){var t=new r(e);return this.some((function(e){return t.matches(e)}))},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){return e=this.cy().collection(e),this.length===e.length&&this.every((function(t){return e.hasElementWithId(t.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(e){return t.hasElementWithId(e.id())}))},contains:function(e){e=this.cy().collection(e);var t=this;return e.every((function(e){return t.hasElementWithId(e.id())}))}};i.allAreNeighbours=i.allAreNeighbors,i.has=i.contains,t.exports=i},{"../is":91,"../selector":95}],18:[function(e,t,n){"use strict";var r={parent:function(e){var t=[];if(this._private.cy,1===this.length&&(r=this[0]._private.parent))return r;for(var n=0;n<this.length;n++){var r;(r=this[n]._private.parent)&&t.push(r)}return this.spawn(t,{unique:!0}).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var i=n[r];t.push(i)}n=n.parent()}return this.spawn(t,{unique:!0}).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var r=this[n].parents();t=(t=t||r).intersect(r)}return t.filter(e)},orphans:function(e){return this.stdFilter((function(e){return e.isOrphan()})).filter(e)},nonorphans:function(e){return this.stdFilter((function(e){return e.isChild()})).filter(e)},children:function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];t=t.concat(r._private.children)}return this.spawn(t,{unique:!0}).filter(e)},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){function t(e){for(var r=0;r<e.length;r++){var i=e[r];n.push(i),i.children().nonempty()&&t(i.children())}}var n=[];return t(this.children()),this.spawn(n,{unique:!0}).filter(e)}};r.ancestors=r.parents,t.exports=r},{}],19:[function(e,t,n){"use strict";var r,i,o=e("../define");r=i={data:o.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:o.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:o.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:o.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:o.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:o.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},r.attr=r.data,r.removeAttr=r.removeData,t.exports=i},{"../define":44}],20:[function(e,t,n){"use strict";function r(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],o=i._private.edges,a=0;a<o.length;a++){var s=o[a];!t&&s.isLoop()||(r+=e(i,s))}return r}}}function i(e,t){return function(n){for(var r,i=this.nodes(),o=0;o<i.length;o++){var a=i[o][e](n);void 0===a||void 0!==r&&!t(a,r)||(r=a)}return r}}var o=e("../util"),a={};o.extend(a,{degree:r((function(e,t){return t.source().same(t.target())?2:1})),indegree:r((function(e,t){return t.target().same(e)?1:0})),outdegree:r((function(e,t){return t.source().same(e)?1:0}))}),o.extend(a,{minDegree:i("degree",(function(e,t){return e<t})),maxDegree:i("degree",(function(e,t){return e>t})),minIndegree:i("indegree",(function(e,t){return e<t})),maxIndegree:i("indegree",(function(e,t){return e>t})),minOutdegree:i("outdegree",(function(e,t){return e<t})),maxOutdegree:i("outdegree",(function(e,t){return e>t}))}),o.extend(a,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r<n.length;r++)t+=n[r].degree(e);return t}}),t.exports=a},{"../util":108}],21:[function(e,t,n){"use strict";function r(e){return{includeNodes:l.default(e.includeNodes,C.includeNodes),includeEdges:l.default(e.includeEdges,C.includeEdges),includeLabels:l.default(e.includeLabels,C.includeLabels),includeOverlays:l.default(e.includeOverlays,C.includeOverlays),useCache:l.default(e.useCache,C.useCache)}}var i,o,a=e("../define"),s=e("../is"),l=e("../util"),c=e("../math");i=o={position:a.data({field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"rtrigger",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()&&!e.isParent()}}),silentPosition:a.data({field:"position",bindingEvent:"position",allowBinding:!1,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!1,triggerFnName:"trigger",allowGetting:!1,validKeys:["x","y"],onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()&&!e.isParent()}}),positions:function(e,t){if(s.plainObject(e))t?this.silentPosition(e):this.position(e);else if(s.fn(e)){for(var n=e,r=0;r<this.length;r++){var i=this[r];if(!i.locked()&&!i.isParent()&&(e=n(i,r))){var o=i._private.position;o.x=e.x,o.y=e.y}}this.dirtyCompoundBoundsCache(),t?this.trigger("position"):this.rtrigger("position")}return this},silentPositions:function(e){return this.positions(e,!0)},renderedPosition:function(e,t){var n=this[0],r=this.cy(),i=r.zoom(),o=r.pan(),a=s.plainObject(e)?e:void 0,l=void 0!==a||void 0!==t&&s.string(e);if(n&&n.isNode()){if(!l){var c=n.position();return a={x:c.x*i+o.x,y:c.y*i+o.y},void 0===e?a:a[e]}for(var u=0;u<this.length;u++)n=this[u],void 0!==t?n.position(e,(t-o[e])/i):void 0!==a&&n.position({x:(a.x-o.x)/i,y:(a.y-o.y)/i})}else if(!l)return;return this},relativePosition:function(e,t){var n=this[0],r=this.cy(),i=s.plainObject(e)?e:void 0,o=void 0!==i||void 0!==t&&s.string(e),a=r.hasCompoundNodes();if(n&&n.isNode()){if(!o){var l=n.position(),c=f=(p=a?n.parent():null)&&p.length>0;f&&(p=p[0]);var u=c?p.position():{x:0,y:0};return i={x:l.x-u.x,y:l.y-u.y},void 0===e?i:i[e]}for(var d=0;d<this.length;d++){var p,f;n=this[d],c=f=(p=a?n.parent():null)&&p.length>0,f&&(p=p[0]),u=c?p.position():{x:0,y:0},void 0!==t?n.position(e,t+u[e]):void 0!==i&&n.position({x:i.x+u.x,y:i.y+u.y})}}else if(!o)return;return this},renderedBoundingBox:function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),o=t.x1*r+i.x,a=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:l,w:a-o,h:l-s}},dirtyCompoundBoundsCache:function(){var e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;for(var t=this,n=[],r=0;r<t.length;r++)n.push(t[r]);for(;n.length>0;){var i=n.shift();i._private.compoundBoundsClean=!1,i.isParent()&&i.trigger("bounds"),i.isChild()&&n.push(i.parent())}return this},updateCompoundBounds:function(){function e(e){function t(e,t,n){var r=0,i=0,o=t+n;return e>0&&o>0&&(r=t/o*e,i=n/o*e),{biasDiff:r,biasComplementDiff:i}}function r(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}if(e.isParent()){var o=e._private,a=e.children(),s="include"===e.pstyle("compound-sizing-wrt-labels").value,l={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},c=a.boundingBox({includeLabels:s,includeOverlays:!1,useCache:!1}),u=o.position,d=l.width.left.value;"px"===l.width.left.units&&l.width.val>0&&(d=100*d/l.width.val);var p=l.width.right.value;"px"===l.width.right.units&&l.width.val>0&&(p=100*p/l.width.val);var f=l.height.top.value;"px"===l.height.top.units&&l.height.val>0&&(f=100*f/l.height.val);var h=l.height.bottom.value;"px"===l.height.bottom.units&&l.height.val>0&&(h=100*h/l.height.val);var g=t(l.width.val-c.w,d,p),v=g.biasDiff,m=g.biasComplementDiff,y=t(l.height.val-c.h,f,h),b=y.biasDiff,C=y.biasComplementDiff;o.autoPadding=r(c.w,c.h,i.pstyle("padding"),i.pstyle("padding-relative-to").value),o.autoWidth=Math.max(c.w,l.width.val),u.x=(-v+c.x1+c.x2+m)/2,o.autoHeight=Math.max(c.h,l.height.val),u.y=(-C+c.y1+c.y2+b)/2,n.push(e)}}var t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;for(var n=[],r=0;r<this.length;r++){var i=this[r],o=i._private;o.compoundBoundsClean||(e(i),t._private.batchingStyle||(o.compoundBoundsClean=!0))}return this}};var u=function(e){return e===1/0||e===-1/0?0:e},d=function(e,t,n,r,i){r-t!=0&&i-n!=0&&(e.x1=t<e.x1?t:e.x1,e.x2=r>e.x2?r:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2)},p=function(e,t){return d(e,t.x1,t.y1,t.x2,t.y2)},f=function(e,t,n){return l.getPrefixedProperty(e,t,n)},h=function(e,t,n,r){var i,o,a=t._private.rstyle,s=a.arrowWidth/2;"none"!==t.pstyle(n+"-arrow-shape").value&&("source"===n?(i=a.srcX,o=a.srcY):"target"===n?(i=a.tgtX,o=a.tgtY):(i=a.midX,o=a.midY),d(e,i-s,o-s,i+s,o+s))},g=function(e,t,n,r){var i;i=n?n+"-":"";var o=t._private,a=o.rstyle;if(t.pstyle(i+"label").strValue){var s,l,c,u,p=t.pstyle("text-halign"),h=t.pstyle("text-valign"),g=f(a,"labelWidth",n),v=f(a,"labelHeight",n),m=f(a,"labelX",n),y=f(a,"labelY",n),b=t.pstyle(i+"text-margin-x").pfValue,C=t.pstyle(i+"text-margin-y").pfValue,x=t.isEdge(),E=t.pstyle(i+"text-rotation"),S=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,V=t.pstyle("text-background-padding").pfValue,R=v+2*V,O=g+2*V,A=O/2,k=R/2;if(x)s=m-A,l=m+A,c=y-k,u=y+k;else{switch(p.value){case"left":s=m-O,l=m;break;case"center":s=m-A,l=m+A;break;case"right":s=m,l=m+O}switch(h.value){case"top":c=y-R,u=y;break;case"center":c=y-k,u=y+k;break;case"bottom":c=y,u=y+R}}var T=x&&"autorotate"===E.strValue,N=null!=E.pfValue&&0!==E.pfValue;if(T||N){var D=T?f(o.rstyle,"labelAngle",n):E.pfValue,P=Math.cos(D),_=Math.sin(D),B=function(e,t){return{x:(e-=m)*P-(t-=y)*_+m,y:e*_+t*P+y}},M=B(s,c),I=B(s,u),F=B(l,c),L=B(l,u);s=Math.min(M.x,I.x,F.x,L.x),l=Math.max(M.x,I.x,F.x,L.x),c=Math.min(M.y,I.y,F.y,L.y),u=Math.max(M.y,I.y,F.y,L.y)}s+=b-Math.max(S,w),l+=b+Math.max(S,w),c+=C-Math.max(S,w),u+=C+Math.max(S,w),d(e,s,c,l,u)}return e},v=function(e,t){var n,r,i,o,a,s,l=e._private.cy._private.styleEnabled,p={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},f=e._private,v=l?e.pstyle("display").value:"element",m=e.isNode(),y=e.isEdge(),b="none"!==v;if(b){var C=0;l&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(C=e.pstyle("overlay-padding").value);var x=0;if(l&&(x=e.pstyle("width").pfValue/2),m&&t.includeNodes){var E=e.position();a=E.x,s=E.y;var S=e.outerWidth()/2,w=e.outerHeight()/2;d(p,n=a-S-C,i=s-w-C,r=a+S+C,o=s+w+C)}else if(y&&t.includeEdges){var V=f.rstyle||{};if(l&&(n=Math.min(V.srcX,V.midX,V.tgtX),r=Math.max(V.srcX,V.midX,V.tgtX),i=Math.min(V.srcY,V.midY,V.tgtY),o=Math.max(V.srcY,V.midY,V.tgtY),d(p,n-=x,i-=x,r+=x,o+=x)),l&&"haystack"===e.pstyle("curve-style").strValue){var R=V.haystackPts;if(n=R[0].x,i=R[0].y,n>(r=R[1].x)){var O=n;n=r,r=O}i>(o=R[1].y)&&(O=i,i=o,o=O),d(p,n-x,i-x,r+x,o+x)}else{for(var A=V.bezierPts||V.linePts||[],k=0;k<A.length;k++){var T=A[k];n=T.x-x,r=T.x+x,i=T.y-x,o=T.y+x,d(p,n,i,r,o)}if(0===A.length){var N=e.source().position(),D=e.target().position();(n=N.x)>(r=D.x)&&(O=n,n=r,r=O),(i=N.y)>(o=D.y)&&(O=i,i=o,o=O),d(p,n-=x,i-=x,r+=x,o+=x)}}}l&&(n=p.x1,r=p.x2,i=p.y1,o=p.y2,d(p,n-C,i-C,r+C,o+C)),l&&t.includeEdges&&y&&(h(p,e,"mid-source",t),h(p,e,"mid-target",t),h(p,e,"source",t),h(p,e,"target",t)),l&&t.includeLabels&&(g(p,e,null,t),y&&(g(p,e,"source",t),g(p,e,"target",t)))}return p.x1=u(p.x1),p.y1=u(p.y1),p.x2=u(p.x2),p.y2=u(p.y2),p.w=u(p.x2-p.x1),p.h=u(p.y2-p.y1),p.w>0&&p.h>0&&b&&c.expandBoundingBox(p,1),p},m=function(e){return e?"t":"f"},y=function(e){var t="";return t+=m(e.incudeNodes),t+=m(e.includeEdges),(t+=m(e.includeLabels))+m(e.includeOverlays)},b=function(e,t){var n,r=e._private,i=e.cy().headless(),o=t===C?x:y(t);return t.useCache&&!i&&r.bbCache&&r.bbCache[o]?n=r.bbCache[o]:(n=v(e,t),i||(r.bbCache=r.bbCache||{},r.bbCache[o]=n)),n},C={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeOverlays:!0,useCache:!0},x=y(C);o.recalculateRenderedStyle=function(e){var t=this.cy(),n=t.renderer(),r=t.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,e),this},o.boundingBox=function(e){if(1===this.length&&this[0]._private.bbCache&&(void 0===e||void 0===e.useCache||!0===e.useCache))return e=void 0===e?C:r(e),b(this[0],e);var t={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},n=r(e=e||l.staticEmptyObject()),i=this,o=i.cy().styleEnabled();o&&this.recalculateRenderedStyle(n.useCache),this.updateCompoundBounds();for(var a={},s=0;s<i.length;s++){var c=i[s];if(o&&c.isEdge()&&"bezier"===c.pstyle("curve-style").strValue&&!a[c.id()]){for(var d=c.parallelEdges(),f=0;f<d.length;f++)a[d[f].id()]=!0;d.recalculateRenderedStyle(n.useCache)}p(t,b(c,n))}return t.x1=u(t.x1),t.y1=u(t.y1),t.x2=u(t.x2),t.y2=u(t.y2),t.w=u(t.x2-t.x1),t.h=u(t.y2-t.y1),t},o.boundingBoxAt=function(e){var t=this.nodes();if(s.plainObject(e)){var n=e;e=function(){return n}}for(var r=0;r<t.length;r++){var i=(c=(l=t[r])._private).position,o=e.call(l,r,l);c.bbAtOldPos={x:i.x,y:i.y},o&&(i.x=o.x,i.y=o.y)}this.trigger("dirty"),t.dirtyCompoundBoundsCache().updateCompoundBounds();var a=this.boundingBox({useCache:!1});for(r=0;r<t.length;r++){var l,c=(l=t[r])._private,u=(i=l._private.position,c.bbAtOldPos);i.x=u.x,i.y=u.y}return t.dirtyCompoundBoundsCache(),this.trigger("dirty"),a};var E=function(e){e.uppercaseName=l.capitalize(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=l.capitalize(e.outerName),i[e.name]=function(){var t=this[0],n=t._private,r=n.cy._private.styleEnabled;if(t){if(!r)return 1;if(t.isParent())return t.updateCompoundBounds(),n[e.autoName]||0;var i=t.pstyle(e.name);return"label"===i.strValue?(t.recalculateRenderedStyle(),n.rstyle[e.labelName]||0):i.pfValue}},i["outer"+e.uppercaseName]=function(){var t=this[0],n=t._private.cy._private.styleEnabled;if(t)return n?t[e.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},i["rendered"+e.uppercaseName]=function(){var t=this[0];if(t)return t[e.name]()*this.cy().zoom()},i["rendered"+e.uppercaseOuterName]=function(){var t=this[0];if(t)return t[e.outerName]()*this.cy().zoom()}};E({name:"width"}),E({name:"height"}),o.padding=function(){var e=this[0],t=e._private;return e.isParent()?(e.updateCompoundBounds(),void 0!==t.autoPadding?t.autoPadding:e.pstyle("padding").pfValue):e.pstyle("padding").pfValue},i.modelPosition=i.point=i.position,i.modelPositions=i.points=i.positions,i.renderedPoint=i.renderedPosition,i.relativePoint=i.relativePosition,i.boundingbox=i.boundingBox,i.renderedBoundingbox=i.renderedBoundingBox,t.exports=o},{"../define":44,"../is":91,"../math":93,"../util":108}],22:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=function(e,t,n){if(n=!(void 0!==n&&!n),void 0!==e&&void 0!==t&&i.core(e)){var o=t.group;if(null==o&&(o=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===o||"edges"===o){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:o,style:{},rstyle:{},styleCxts:[],removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,active:!1,classes:{},animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{}};if(t.renderedPosition){var s=t.renderedPosition,l=e.pan(),c=e.zoom();a.position={x:(s.x-l.x)/c,y:(s.y-l.y)/c}}if(i.string(t.classes))for(var u=t.classes.split(/\s+/),d=0,p=u.length;d<p;d++){var f=u[d];f&&""!==f&&(a.classes[f]=!0)}(t.style||t.css)&&e.style().applyBypass(this,t.style||t.css),(void 0===n||n)&&this.restore()}else r.error("An element must be of type `nodes` or `edges`; you specified `"+o+"`")}else r.error("An element must have a core reference and parameters set")};t.exports=o},{"../is":91,"../util":108}],23:[function(e,t,n){"use strict";var r=e("../define"),i={on:r.on(),one:r.on({unbindSelfOnTrigger:!0}),once:r.on({unbindAllBindersOnTrigger:!0}),off:r.off(),trigger:r.trigger(),rtrigger:function(e,t){if(0!==this.length)return this.cy().notify({type:e,eles:this}),this.trigger(e,t),this}};r.eventAliasesOn(i),t.exports=i},{"../define":44}],24:[function(e,t,n){"use strict";var r=e("../is"),i=e("../selector"),o={nodes:function(e){return this.filter((function(e,t){return e.isNode()})).filter(e)},edges:function(e){return this.filter((function(e,t){return e.isEdge()})).filter(e)},filter:function(e,t){if(void 0===e)return this;if(r.string(e)||r.elementOrCollection(e))return new i(e).filter(this);if(r.fn(e)){for(var n=this.spawn(),o=this,a=0;a<o.length;a++){var s=o[a];(t?e.apply(t,[s,a,o]):e(s,a,o))&&n.merge(s)}return n}return this.spawn()},not:function(e){if(e){r.string(e)&&(e=this.filter(e));for(var t=[],n=e._private.map,i=0;i<this.length;i++){var o=this[i];n.has(o.id())||t.push(o)}return this.spawn(t)}return this},absoluteComplement:function(){return this._private.cy.mutableElements().not(this)},intersect:function(e){if(r.string(e)){var t=e;return this.filter(t)}for(var n=[],i=this,o=e,a=this.length<e.length,s=a?o._private.map:i._private.map,l=a?i:o,c=0;c<l.length;c++){var u=l[c]._private.data.id,d=s.get(u);d&&n.push(d.ele)}return this.spawn(n)},xor:function(e){var t=this._private.cy;r.string(e)&&(e=t.$(e));var n=[],i=this,o=e,a=function(e,t){for(var r=0;r<e.length;r++){var i=e[r],o=i._private.data.id;t.hasElementWithId(o)||n.push(i)}};return a(i,o),a(o,i),this.spawn(n)},diff:function(e){var t=this._private.cy;r.string(e)&&(e=t.$(e));var n=[],i=[],o=[],a=this,s=e,l=function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r],a=i._private.data.id;t.hasElementWithId(a)?o.push(i):n.push(i)}};return l(a,s,n),l(s,a,i),{left:this.spawn(n,{unique:!0}),right:this.spawn(i,{unique:!0}),both:this.spawn(o,{unique:!0})}},add:function(e){var t=this._private.cy;if(!e)return this;if(r.string(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=[],o=0;o<this.length;o++)i.push(this[o]);var a=this._private.map;for(o=0;o<e.length;o++)!a.has(e[o].id())&&i.push(e[o]);return this.spawn(i)},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&r.string(e)){var i=e;e=n.mutableElements().filter(i)}for(var o=t.map,a=0;a<e.length;a++){var s,l=e[a],c=l._private.data.id;o.has(c)?(this[s=o.get(c).index]=l,o.set(c,{ele:l,index:s})):(this[s=this.length++]=l,o.set(c,{ele:l,index:s}))}return this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map,i=r.get(n);if(!i)return this;var o=i.index;this[o]=void 0,r.delete(n);var a=o===this.length-1;if(this.length>1&&!a){var s=this.length-1,l=this[s],c=l._private.data.id;this[s]=void 0,this[o]=l,r.set(c,{ele:l,index:o})}return this.length--,this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&r.string(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=0;i<e.length;i++)this.unmergeOne(e[i]);return this},map:function(e,t){for(var n=[],r=this,i=0;i<r.length;i++){var o=r[i],a=t?e.apply(t,[o,i,r]):e(o,i,r);n.push(a)}return n},reduce:function(e,t){for(var n=t,r=this,i=0;i<r.length;i++)n=e(n,r[i],i,r);return n},max:function(e,t){for(var n,r=-1/0,i=this,o=0;o<i.length;o++){var a=i[o],s=t?e.apply(t,[a,o,i]):e(a,o,i);s>r&&(r=s,n=a)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,o=0;o<i.length;o++){var a=i[o],s=t?e.apply(t,[a,o,i]):e(a,o,i);s<r&&(r=s,n=a)}return{value:r,ele:n}}},a=o;a.u=a["|"]=a["+"]=a.union=a.or=a.add,a["\\"]=a["!"]=a["-"]=a.difference=a.relativeComplement=a.subtract=a.not,a.n=a["&"]=a["."]=a.and=a.intersection=a.intersect,a["^"]=a["(+)"]=a["(-)"]=a.symmetricDifference=a.symdiff=a.xor,a.fnFilter=a.filterFn=a.stdFilter=a.filter,a.complement=a.abscomp=a.absoluteComplement,t.exports=o},{"../is":91,"../selector":95}],25:[function(e,t,n){"use strict";var r={isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source().id()===this.target().id()},isSimple:function(){return this.isEdge()&&this.source().id()!==this.target().id()},group:function(){var e=this[0];if(e)return e._private.group}};t.exports=r},{}],26:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../map"),a=e("../set"),s=e("./element"),l={generate:function(e,t,n){for(var i=null!=n?n:r.uuid();e.hasElementWithId(i);)i=r.uuid();return i}},c=function(e,t,n){if(void 0!==e&&i.core(e)){var c=new o,u=!1;if(t){if(t.length>0&&i.plainObject(t[0])&&!i.element(t[0])){u=!0;for(var d=[],p=new a,f=0,h=t.length;f<h;f++){var g=t[f];null==g.data&&(g.data={});var v=g.data;if(null==v.id)v.id=l.generate(e,g);else if(e.hasElementWithId(v.id)||p.has(v.id))continue;var m=new s(e,g,!1);d.push(m),p.add(v.id)}t=d}}else t=[];for(this.length=0,f=0,h=t.length;f<h;f++){var y=t[f];if(y){var b=y._private.data.id;(!n||n.unique&&!c.has(b))&&(c.set(b,{index:this.length,ele:y}),this[this.length]=y,this.length++)}}this._private={cy:e,map:c},u&&this.restore()}else r.error("A collection must have a reference to the core")},u=s.prototype=c.prototype;u.instanceString=function(){return"collection"},u.spawn=function(e,t,n){return i.core(e)||(n=t,t=e,e=this.cy()),new c(e,t,n)},u.spawnSelf=function(){return this.spawn(this)},u.cy=function(){return this._private.cy},u.element=function(){return this[0]},u.collection=function(){return i.collection(this)?this:new c(this._private.cy,[this])},u.unique=function(){return new c(this._private.cy,this,{unique:!0})},u.hasElementWithId=function(e){return this._private.map.has(e)},u.getElementById=function(e){var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new c(t)},u.poolIndex=function(){var e=this._private.cy._private.elements,t=this._private.data.id;return e._private.map.get(t).index},u.json=function(e){var t=this.element(),n=this.cy();if(null==t&&e)return this;if(null!=t){var o=t._private;if(i.plainObject(e)){n.startBatch(),e.data&&t.data(e.data),e.position&&t.position(e.position);var a=function(n,r,i){var a=e[n];null!=a&&a!==o[n]&&(a?t[r]():t[i]())};return a("removed","remove","restore"),a("selected","select","unselect"),a("selectable","selectify","unselectify"),a("locked","lock","unlock"),a("grabbable","grabify","ungrabify"),null!=e.classes&&t.classes(e.classes),n.endBatch(),this}if(void 0===e){var s={data:r.copy(o.data),position:r.copy(o.position),group:o.group,removed:o.removed,selected:o.selected,selectable:o.selectable,locked:o.locked,grabbable:o.grabbable,classes:null};return s.classes=Object.keys(o.classes).filter((function(e){return o.classes[e]})).join(" "),s}}},u.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t].json();e.push(n)}return e},u.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=this[n].json(),i=new s(e,r,!1);t.push(i)}return new c(e,t)},u.copy=u.clone,u.restore=function(e){var t=this,n=t.cy(),a=n._private;void 0===e&&(e=!0);for(var s,u=[],d=[],p=0,f=t.length;p<f;p++)(_=t[p]).removed()&&(_.isNode()?u.push(_):d.push(_));s=u.concat(d);var h=function(){s.splice(p,1),p--};for(p=0;p<s.length;p++){var g=(_=s[p])._private,v=g.data;if(_.clearTraversalCache(),void 0===v.id)v.id=l.generate(n,_);else if(i.number(v.id))v.id=""+v.id;else{if(i.emptyString(v.id)||!i.string(v.id)){r.error("Can not create element with invalid string ID `"+v.id+"`"),h();continue}if(n.hasElementWithId(v.id)){r.error("Can not create second element with ID `"+v.id+"`"),h();continue}}var m=v.id;if(_.isNode()){var y=_,b=g.position;null==b.x&&(b.x=0),null==b.y&&(b.y=0)}if(_.isEdge()){for(var C=_,x=["source","target"],E=x.length,S=!1,w=0;w<E;w++){var V=x[w],R=v[V];i.number(R)&&(R=v[V]=""+v[V]),null==R||""===R?(r.error("Can not create edge `"+m+"` with unspecified "+V),S=!0):n.hasElementWithId(R)||(r.error("Can not create edge `"+m+"` with nonexistant "+V+" `"+R+"`"),S=!0)}if(S){h();continue}var O=n.getElementById(v.source),A=n.getElementById(v.target);O._private.edges.push(C),A._private.edges.push(C),C._private.source=O,C._private.target=A}g.map=new o,g.map.set(m,{ele:_,index:0}),g.removed=!1,n.addToPool(_)}for(p=0;p<u.length;p++){v=(y=u[p])._private.data,i.number(v.parent)&&(v.parent=""+v.parent);var k=v.parent;if(null!=k){var T=n.getElementById(k);if(T.empty())v.parent=void 0;else{for(var N=!1,D=T;!D.empty();){if(y.same(D)){N=!0,v.parent=void 0;break}D=D.parent()}N||(T[0]._private.children.push(y),y._private.parent=T[0],a.hasCompoundNodes=!0)}}}if(s.length>0){var P=new c(n,s);for(p=0;p<P.length;p++){var _;(_=P[p]).isNode()||(_.parallelEdges().clearTraversalCache(),_.source().clearTraversalCache(),_.target().clearTraversalCache())}(a.hasCompoundNodes?n.collection().merge(P).merge(P.connectedNodes()).merge(P.parent()):P).dirtyCompoundBoundsCache().updateStyle(e),e?P.rtrigger("add"):P.trigger("add")}return t},u.removed=function(){var e=this[0];return e&&e._private.removed},u.inside=function(){var e=this[0];return e&&!e._private.removed},u.remove=function(e){function t(e){for(var t=e._private.edges,n=0;n<t.length;n++)i(t[n])}function n(e){for(var t=e._private.children,n=0;n<t.length;n++)i(t[n])}function i(e){p[e.id()]||(p[e.id()]=!0,e.isNode()?(d.push(e),t(e),n(e)):d.unshift(e))}function o(e,t){var n=e._private.edges;r.removeFromArray(n,t),e.clearTraversalCache()}function a(e){e.parallelEdges().clearTraversalCache()}function s(e,t){t=t[0];var n=(e=e[0])._private.children,i=e.id();r.removeFromArray(n,t),v.ids[i]||(v.ids[i]=!0,v.push(e))}var l=this,u=[],d=[],p={},f=l._private.cy;void 0===e&&(e=!0);for(var h=0,g=l.length;h<g;h++)i(E=l[h]);var v=[];for(v.ids={},l.dirtyCompoundBoundsCache(),f.removeFromPool(d),h=0;h<d.length;h++)if((E=d[h])._private.removed=!0,u.push(E),E.isEdge()){var m=E.source()[0],y=E.target()[0];o(m,E),o(y,E),a(E)}else{var b=E.parent();0!==b.length&&s(b,E)}var C=f._private.elements;for(f._private.hasCompoundNodes=!1,h=0;h<C.length;h++)if((E=C[h]).isParent()){f._private.hasCompoundNodes=!0;break}var x=new c(this.cy(),u);for(x.size()>0&&(e&&this.cy().notify({type:"remove",eles:x}),x.trigger("remove")),h=0;h<v.length;h++){var E;(E=v[h]).removed()||E.updateStyle()}return new c(f,u)},u.move=function(e){var t=this._private.cy;if(void 0!==e.source||void 0!==e.target){var n=e.source,r=e.target,i=t.hasElementWithId(n),o=t.hasElementWithId(r);if(i||o){var a=this.jsons();this.remove();for(var s=0;s<a.length;s++){var l=a[s],c=this[s];"edges"===l.group&&(i&&(l.data.source=n),o&&(l.data.target=r),l.scratch=c._private.scratch)}return t.add(a)}}else if(void 0!==e.parent){var u=e.parent;if(null===u||t.hasElementWithId(u)){a=this.jsons();var d=this.descendants(),p=d.union(d.union(this).connectedEdges()).jsons();for(this.remove(),s=0;s<a.length;s++)l=a[s],c=this[s],"nodes"===l.group&&(l.data.parent=null===u?void 0:u,l.scratch=c._private.scratch);return t.add(a.concat(p))}}return this},[e("./algorithms"),e("./animation"),e("./class"),e("./comparators"),e("./compounds"),e("./data"),e("./degree"),e("./dimensions"),e("./events"),e("./filter"),e("./group"),e("./index"),e("./iteration"),e("./layout"),e("./style"),e("./switch-functions"),e("./traversing")].forEach((function(e){r.extend(u,e)})),t.exports=c},{"../is":91,"../map":92,"../set":96,"../util":108,"./algorithms":11,"./animation":15,"./class":16,"./comparators":17,"./compounds":18,"./data":19,"./degree":20,"./dimensions":21,"./element":22,"./events":23,"./filter":24,"./group":25,"./index":26,"./iteration":27,"./layout":28,"./style":29,"./switch-functions":30,"./traversing":31}],27:[function(e,t,n){"use strict";var r=e("../is"),i=e("./zsort"),o={forEach:function(e,t){if(r.fn(e))for(var n=0;n<this.length;n++){var i=this[n];if(!1===(t?e.apply(t,[i,n,this]):e(i,n,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=[],r=this.length;null==t&&(t=r),null==e&&(e=0),e<0&&(e=r+e),t<0&&(t=r+t);for(var i=e;i>=0&&i<t&&i<r;i++)n.push(this[i]);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(!r.fn(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(i)},zDepth:function(){var e=this[0];if(e){var t=e._private;if("nodes"===t.group){var n=t.data.parent?e.parents().size():0;return e.isParent()?n:Number.MAX_SAFE_INTEGER-1}var r=t.source,i=t.target,o=r.zDepth(),a=i.zDepth();return Math.max(o,a,0)}}};o.each=o.forEach,t.exports=o},{"../is":91,"./zsort":32}],28:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../promise"),a=e("../math"),s={layoutDimensions:function(e){if(e.nodeDimensionsIncludeLabels){var t=this.boundingBox();return{w:t.w,h:t.h}}return{w:this.outerWidth(),h:this.outerHeight()}},layoutPositions:function(e,t,n){var s=this.nodes(),l=this.cy(),c=t.eles,u=i.memoize(n,(function(e,t){return e.id()+"$"+t}));e.trigger({type:"layoutstart",layout:e}),e.animations=[];var d=function(e,t,n){var r={x:t.x1+t.w/2,y:t.y1+t.h/2},i={x:(n.x-r.x)*e,y:(n.y-r.y)*e};return{x:r.x+i.x,y:r.y+i.y}},p=function(){for(var e=a.makeBoundingBox(),t=0;t<s.length;t++){var n=s[t],r=u(n,t);a.expandBoundingBoxByPoint(e,r.x,r.y)}return e};if(t.animate){for(var f=p(),h={},g=0;g<s.length;g++){var v=s[g],m=u(v,g),y=v.position();if(r.number(y.x)&&r.number(y.y)||v.silentPosition({x:0,y:0}),t.spacingFactor&&1!==t.spacingFactor){var b=Math.abs(t.spacingFactor);m=d(b,f,m)}h[v.id()]=m}for(g=0;g<s.length;g++){v=s[g],m=h[v.id()];var C=v.animation({position:m,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(C),C.play()}if(t.fit){var x=l.animation({fit:{boundingBox:c.boundingBoxAt((function(e,t){return h[t.id()]})),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(x),x.play()}else if(void 0!==t.zoom&&void 0!==t.pan){var E=l.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(E),E.play()}e.one("layoutready",t.ready),e.trigger({type:"layoutready",layout:e}),o.all(e.animations.map((function(e){return e.promise()}))).then((function(){e.one("layoutstop",t.stop),e.trigger({type:"layoutstop",layout:e})}))}else t.spacingFactor&&1!==t.spacingFactor?(b=Math.abs(t.spacingFactor),f=p(),s.positions((function(e,t){var n=u(e,t);return d(b,f,n)}))):s.positions(n),t.fit&&l.fit(t.eles,t.padding),null!=t.zoom&&l.zoom(t.zoom),t.pan&&l.pan(t.pan),e.one("layoutready",t.ready),e.trigger({type:"layoutready",layout:e}),e.one("layoutstop",t.stop),e.trigger({type:"layoutstop",layout:e});return this},layout:function(e){return this.cy().makeLayout(i.extend({},e,{eles:this}))}};s.createLayout=s.makeLayout=s.layout,t.exports=s},{"../is":91,"../math":93,"../promise":94,"../util":108}],29:[function(e,t,n){"use strict";function r(e){var t=e.ok,n=e.edgeOkViaNode||e.ok,r=e.parentOk||e.ok;return function(){var e=this.cy();if(!e.styleEnabled())return!0;var i=this[0],o=e.hasCompoundNodes();if(i){var a=i._private;if(!t(i))return!1;if(i.isNode()){if(o){var s=a.data.parent?i.parents():null;if(s)for(var l=0;l<s.length;l++){var c=s[l];if(!r(c))return!1}}return!0}return n(a.source)&&n(a.target)}}}var i=e("../is"),o={updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t._private.batchingStyle)return t._private.batchStyleEles.merge(this),this;var n=t.hasCompoundNodes(),r=t.style(),i=this;e=!(!e&&void 0!==e),n&&(i=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var o=r.apply(i);return e?o.rtrigger("style"):o.trigger("style"),this},updateMappers:function(e){var t=this._private.cy,n=t.style();if(e=!(!e&&void 0!==e),!t.styleEnabled())return this;var r=n.updateMappers(this);return this.dirtyCompoundBoundsCache(e),e?r.rtrigger("style"):r.trigger("style"),this},parsedStyle:function(e){var t=this[0],n=t.cy();if(n.styleEnabled())return t?t._private.style[e]||n.style().getDefaultProperty(e):void 0},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())return t?t.pstyle(e).units:void 0},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 r=!1,o=n.style();if(i.plainObject(e)){var a=e;o.applyBypass(this,a,r),this.dirtyCompoundBoundsCache(),this.rtrigger("style")}else if(i.string(e)){if(void 0===t)return(s=this[0])?o.getStylePropertyValue(s,e):void 0;o.applyBypass(this,e,t,r),this.dirtyCompoundBoundsCache(),this.rtrigger("style")}else if(void 0===e){var s;return(s=this[0])?o.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(void 0===e)for(var o=0;o<i.length;o++){var a=i[o];r.removeAllBypasses(a,n)}else for(e=e.split(/\s+/),o=0;o<i.length;o++)a=i[o],r.removeBypasses(a,e,n);return this.dirtyCompoundBoundsCache(),this.rtrigger("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 r=n._private,i=n.pstyle("opacity").value;if(!t)return i;var o=r.data.parent?n.parents():null;if(o)for(var a=0;a<o.length;a++)i*=o[a].pstyle("opacity").value;return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var e=this[0],t=e.cy().hasCompoundNodes();return e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}},a=function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())};o.takesUpSpace=r({ok:a});var s=function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&a(e)},l=function(e){return"visible"===e.pstyle("visibility").value&&a(e)};o.interactive=r({ok:s,parentOk:l,edgeOkViaNode:a}),o.noninteractive=function(){var e=this[0];if(e)return!e.interactive()};var c=function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&a(e)},u=a;o.visible=r({ok:c,edgeOkViaNode:u}),o.hidden=function(){var e=this[0];if(e)return!e.visible()},o.bypass=o.css=o.style,o.renderedCss=o.renderedStyle,o.removeBypass=o.removeCss=o.removeStyle,o.pstyle=o.parsedStyle,t.exports=o},{"../is":91}],30:[function(e,t,n){"use strict";function r(e){return function(){var t=arguments,n=[];if(2===t.length){var r=t[0],i=t[1];this.on(e.event,r,i)}else if(1===t.length)i=t[0],this.on(e.event,i);else if(0===t.length){for(var o=0;o<this.length;o++){var a=this[o],s=!e.ableField||a._private[e.ableField],l=a._private[e.field]!=e.value;if(e.overrideAble){var c=e.overrideAble(a);if(void 0!==c&&(s=c,!c))return this}s&&(a._private[e.field]=e.value,l&&n.push(a))}var u=this.spawn(n);u.updateStyle(),u.trigger(e.event)}return this}}function i(e){o[e.field]=function(){var t=this[0];if(t){if(e.overrideField){var n=e.overrideField(t);if(void 0!==n)return n}return t._private[e.field]}},o[e.on]=r({event:e.on,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!0}),o[e.off]=r({event:e.off,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!1})}var o={};i({field:"locked",overrideField:function(e){return!!e.cy().autolock()||void 0},on:"lock",off:"unlock"}),i({field:"grabbable",overrideField:function(e){return!e.cy().autoungrabify()&&void 0},on:"grabify",off:"ungrabify"}),i({field:"selected",ableField:"selectable",overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),i({field:"selectable",overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),o.deselect=o.unselect,o.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},i({field:"active",on:"activate",off:"unactivate"}),o.inactive=function(){var e=this[0];if(e)return!e._private.active},t.exports=o},{}],31:[function(e,t,n){"use strict";function r(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r]._private[e.attr];i&&n.push(i)}return this.spawn(n,{unique:!0}).filter(t)}}function i(e){return function(t){var n=[],r=this._private.cy,i=e||{};s.string(t)&&(t=r.$(t));for(var o=0;o<t.length;o++)for(var a=t[o]._private.edges,l=0;l<a.length;l++){var c=a[l],u=c._private.data,d=this.hasElementWithId(u.source)&&t.hasElementWithId(u.target),p=t.hasElementWithId(u.source)&&this.hasElementWithId(u.target);if(d||p){if(i.thisIsSrc||i.thisIsTgt){if(i.thisIsSrc&&!d)continue;if(i.thisIsTgt&&!p)continue}n.push(c)}}return this.spawn(n,{unique:!0})}}function o(e){var t={codirected:!1};return e=a.extend({},t,e),function(t){for(var n=[],r=this.edges(),i=e,o=0;o<r.length;o++)for(var a=r[o]._private,s=a.source,l=s._private.data.id,c=a.data.target,u=s._private.edges,d=0;d<u.length;d++){var p=u[d],f=p._private.data,h=f.target,g=f.source,v=h===c&&g===l,m=l===h&&c===g;(i.codirected&&v||!i.codirected&&(v||m))&&n.push(p)}return this.spawn(n,{unique:!0}).filter(t)}}var a=e("../util"),s=e("../is"),l={},c=function(e,t){return function(n,r,i,o){var a,l=n,c=this;if(null==l?a="null":s.elementOrCollection(l)&&1===l.length&&(a="#"+l.id()),1===c.length&&a){var u=c[0]._private,d=u.traversalCache=u.traversalCache||{},p=d[t]=d[t]||{},f=p[a];return f||(p[a]=e.call(c,n,r,i,o))}return e.call(c,n,r,i,o)}},u=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode()){for(var a=!1,s=o.connectedEdges(),l=0;l<s.length;l++){var c=s[l],u=c.source(),d=c.target();if(e.noIncomingEdges&&d===o&&u!==o||e.noOutgoingEdges&&u===o&&d!==o){a=!0;break}}a||r.push(o)}}return this.spawn(r,{unique:!0}).filter(t)}},d=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode())for(var a=o.connectedEdges(),s=0;s<a.length;s++){var l=a[s],c=l.source(),u=l.target();e.outgoing&&c===o?(r.push(l),r.push(u)):e.incoming&&u===o&&(r.push(l),r.push(c))}}return this.spawn(r,{unique:!0}).filter(t)}},p=function(e){return function(t){for(var n=this,r=[],i={};;){var o=e.outgoing?n.outgoers():n.incomers();if(0===o.length)break;for(var a=!1,s=0;s<o.length;s++){var l=o[s],c=l.id();i[c]||(i[c]=!0,r.push(l),a=!0)}if(!a)break;n=o}return this.spawn(r,{unique:!0}).filter(t)}};l.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},a.extend(l,{roots:u({noIncomingEdges:!0}),leaves:u({noOutgoingEdges:!0}),outgoers:c(d({outgoing:!0}),"outgoers"),successors:p({outgoing:!0}),incomers:c(d({incoming:!0}),"incomers"),predecessors:p({incoming:!0})}),a.extend(l,{neighborhood:c((function(e){for(var t=[],n=this.nodes(),r=0;r<n.length;r++)for(var i=n[r],o=i.connectedEdges(),a=0;a<o.length;a++){var s=o[a],l=s.source(),c=s.target(),u=i===l?c:l;u.length>0&&t.push(u[0]),t.push(s[0])}return this.spawn(t,{unique:!0}).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),l.neighbourhood=l.neighborhood,l.closedNeighbourhood=l.closedNeighborhood,l.openNeighbourhood=l.openNeighborhood,a.extend(l,{source:c((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:c((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:r({attr:"source"}),targets:r({attr:"target"})}),a.extend(l,{edgesWith:c(i(),"edgesWith",!0),edgesTo:c(i({thisIsSrc:!0}),"edgesTo",!0)}),a.extend(l,{connectedEdges:c((function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];if(i.isNode())for(var o=i._private.edges,a=0;a<o.length;a++){var s=o[a];t.push(s)}}return this.spawn(t,{unique:!0}).filter(e)}),"connectedEdges"),connectedNodes:c((function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];i.isEdge()&&(t.push(i.source()[0]),t.push(i.target()[0]))}return this.spawn(t,{unique:!0}).filter(e)}),"connectedNodes"),parallelEdges:c(o(),"parallelEdges"),codirectedEdges:c(o({codirected:!0}),"codirectedEdges")}),a.extend(l,{components:function(){var e=this,t=e.cy(),n=e.spawn(),r=e.nodes().spawnSelf(),i=[],o=function(e,t){n.merge(e),r.unmerge(e),t.merge(e)};if(r.empty())return e.spawn();do{var a=t.collection();i.push(a);var s=r[0];o(s,a),e.bfs({directed:!1,roots:s,visit:function(e,t,n,r,i){o(e,a)}})}while(r.length>0);return i.map((function(e){var t=e.connectedEdges().stdFilter((function(t){return e.anySame(t.source())&&e.anySame(t.target())}));return e.union(t)}))}}),t.exports=l},{"../is":91,"../util":108}],32:[function(e,t,n){"use strict";var r=function(e,t){function n(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?i?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?Number.MAX_SAFE_INTEGER:0}function r(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var i=e.cy().hasCompoundNodes(),o=n(e)-n(t);if(0!==o)return o;var a=r(e)-r(t);if(0!==a)return a;var s=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==s?s:e.poolIndex()-t.poolIndex()};t.exports=r},{}],33:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../collection"),a=e("../collection/element"),s={add:function(e){var t,n=this;if(r.elementOrCollection(e)){var s=e;if(s._private.cy===n)t=s.restore();else{for(var l=[],c=0;c<s.length;c++){var u=s[c];l.push(u.json())}t=new o(n,l)}}else if(r.array(e))t=new o(n,l=e);else if(r.plainObject(e)&&(r.array(e.nodes)||r.array(e.edges))){for(var d=e,p=(l=[],["nodes","edges"]),f=(c=0,p.length);c<f;c++){var h=p[c],g=d[h];if(r.array(g))for(var v=0,m=g.length;v<m;v++){var y=i.extend({group:h},g[v]);l.push(y)}}t=new o(n,l)}else t=new a(n,y=e).collection();return t},remove:function(e){if(r.elementOrCollection(e));else if(r.string(e)){var t=e;e=this.$(t)}return e.remove()}};t.exports=s},{"../collection":26,"../collection/element":22,"../is":91,"../util":108}],34:[function(e,t,n){"use strict";var r=e("../define"),i=e("../util"),o=e("../is"),a={animate:r.animate(),animation:r.animation(),animated:r.animated(),clearQueue:r.clearQueue(),delay:r.delay(),delayAnimation:r.delayAnimation(),stop:r.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){function e(){d._private.animationsRunning&&i.requestAnimationFrame((function(n){t(n),e()}))}function t(e){function t(t,i){var a=t._private,s=a.animation.current,l=a.animation.queue,c=!1;if(!i&&"none"===t.pstyle("display").value){s=s.splice(0,s.length).concat(l.splice(0,l.length));for(var u=0;u<s.length;u++)s[u].stop()}if(0===s.length){var d=l.shift();d&&s.push(d)}var p=function(e){for(var t=e.length-1;t>=0;t--)(0,e[t])();e.splice(0,e.length)};for(u=s.length-1;u>=0;u--){var f=s[u],h=f._private;h.stopped?(s.splice(u,1),h.hooked=!1,h.playing=!1,h.started=!1,p(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||n(t,f,e),r(t,f,e,i),h.applying&&(h.applying=!1),p(h.frames),f.completed()&&(s.splice(u,1),h.hooked=!1,h.playing=!1,h.started=!1,p(h.completes)),c=!0)}return i||0!==s.length||0!==l.length||o.push(t),c}for(var i=d._private.aniEles,o=[],a=!1,s=0;s<i.length;s++){var l=t(i[s]);a=a||l}var c=t(d,!0);(a||c)&&(i.length>0?(i.dirtyCompoundBoundsCache(),d.notify({type:"draw",eles:i})):d.notify({type:"draw"})),i.unmerge(o),d.trigger("step")}function n(e,t,n){var r=o.core(e),i=!r,a=e,s=t._private;if(i){var l=a.position();s.startPosition=s.startPosition||{x:l.x,y:l.y},s.startStyle=s.startStyle||p.getAnimationStartStyle(a,s.style)}if(r){var c=d._private.pan;s.startPan=s.startPan||{x:c.x,y:c.y},s.startZoom=null!=s.startZoom?s.startZoom:d._private.zoom}s.started=!0,s.startTime=n-s.progress*s.duration}function r(e,t,n,r){var i=!r,s=e._private,l=t._private,c=l.easing,d=l.startTime;if(!l.easingImpl)if(null==c)l.easingImpl=g.linear;else{var f,h;f=o.string(c)?p.parse("transition-timing-function",c).value:c,o.string(f)?(N=f,h=[]):(N=f[1],h=f.slice(2).map((function(e){return+e}))),h.length>0?("spring"===N&&h.push(l.duration),l.easingImpl=g[N].apply(null,h)):l.easingImpl=g[N]}var v,m=l.easingImpl;if(v=0===l.duration?1:(n-d)/l.duration,l.applying&&(v=l.progress),v<0?v=0:v>1&&(v=1),null==l.delay){var y=l.startPosition,b=l.position;if(b&&i){var C=e.position();a(y.x,b.x)&&(C.x=u(y.x,b.x,v,m)),a(y.y,b.y)&&(C.y=u(y.y,b.y,v,m)),e.trigger("position")}var x=l.startPan,E=l.pan,S=s.pan,w=null!=E&&r;w&&(a(x.x,E.x)&&(S.x=u(x.x,E.x,v,m)),a(x.y,E.y)&&(S.y=u(x.y,E.y,v,m)),e.trigger("pan"));var V=l.startZoom,R=l.zoom,O=null!=R&&r;O&&(a(V,R)&&(s.zoom=u(V,R,v,m)),e.trigger("zoom")),(w||O)&&e.trigger("viewport");var A=l.style;if(A&&A.length>0&&i){for(var k=0;k<A.length;k++){var T=A[k],N=T.name,D=T,P=u(l.startStyle[N],D,v,m);p.overrideBypass(e,N,P)}e.trigger("style")}}return l.progress=v,v}function a(e,t){return!(null==e||null==t||!(o.number(e)&&o.number(t)||e&&t))}function s(e,t,n){var r=1-n,i=n*n;return 3*r*r*n*e+3*r*i*t+i*n}function l(e,t){return function(n,r,i){return n+(r-n)*s(e,t,i)}}function c(e,t,n,r,i){var o=i(t,n,r);return null==e||((e.roundValue||e.color)&&(o=Math.round(o)),void 0!==e.min&&(o=Math.max(o,e.min)),void 0!==e.max&&(o=Math.min(o,e.max))),o}function u(e,t,n,r){var i,a,s=null!=e.name?p.properties[e.name]:null,l=null!=s?s.type:null;if(n<0?n=0:n>1&&(n=1),i=null!=e.pfValue||null!=e.value?null!=e.pfValue?e.pfValue:e.value:e,a=null!=t.pfValue||null!=t.value?null!=t.pfValue?t.pfValue:t.value:t,o.number(i)&&o.number(a))return c(l,i,a,n,r);if(o.array(i)&&o.array(a)){for(var u=[],d=0;d<a.length;d++){var f=i[d],h=a[d];if(null!=f&&null!=h){var g=c(l,f,h,n,r);u.push(g)}else u.push(h)}return u}}var d=this;if(d._private.animationsRunning=!0,d.styleEnabled()){var p=d.style(),f=d.renderer();f&&f.beforeRender?f.beforeRender((function(e,n){t(n)}),f.beforeRenderPriorities.animations):e();var h=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},o=t(n,.5*r,i),a=t(n,.5*r,o),s=t(n,r,a),l=1/6*(i.dx+2*(o.dx+a.dx)+s.dx),c=1/6*(i.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+c*r,n}return function e(t,r,i){var o,a,s,l={x:-1,v:0,tension:null,friction:null},c=[0],u=0,d=1e-4,p=.016;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,l.tension=t,l.friction=r,a=(o=null!==i)?(u=e(t,r))/i*p:p;s=n(s||l,a),c.push(1+s.x),u+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return o?function(e){return c[e*(c.length-1)|0]}:u}}(),g={linear:function(e,t,n){return e+(t-e)*n},ease:l(.25,.1,.25,1),"ease-in":l(.42,0,1,1),"ease-out":l(0,0,.58,1),"ease-in-out":l(.42,0,.58,1),"ease-in-sine":l(.47,0,.745,.715),"ease-out-sine":l(.39,.575,.565,1),"ease-in-out-sine":l(.445,.05,.55,.95),"ease-in-quad":l(.55,.085,.68,.53),"ease-out-quad":l(.25,.46,.45,.94),"ease-in-out-quad":l(.455,.03,.515,.955),"ease-in-cubic":l(.55,.055,.675,.19),"ease-out-cubic":l(.215,.61,.355,1),"ease-in-out-cubic":l(.645,.045,.355,1),"ease-in-quart":l(.895,.03,.685,.22),"ease-out-quart":l(.165,.84,.44,1),"ease-in-out-quart":l(.77,0,.175,1),"ease-in-quint":l(.755,.05,.855,.06),"ease-out-quint":l(.23,1,.32,1),"ease-in-out-quint":l(.86,0,.07,1),"ease-in-expo":l(.95,.05,.795,.035),"ease-out-expo":l(.19,1,.22,1),"ease-in-out-expo":l(1,0,0,1),"ease-in-circ":l(.6,.04,.98,.335),"ease-out-circ":l(.075,.82,.165,1),"ease-in-out-circ":l(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return g.linear;var r=h(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":function(e,t,n,r){return l(e,t,n,r)}}}}};t.exports=a},{"../define":44,"../is":91,"../util":108}],35:[function(e,t,n){"use strict";var r=e("../define"),i={on:r.on(),one:r.on({unbindSelfOnTrigger:!0}),once:r.on({unbindAllBindersOnTrigger:!0}),off:r.off(),trigger:r.trigger()};r.eventAliasesOn(i),t.exports=i},{"../define":44}],36:[function(e,t,n){"use strict";var r={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};r.jpeg=r.jpg,t.exports=r},{}],37:[function(e,t,n){"use strict";var r=e("../window"),i=e("../util"),o=e("../collection"),a=e("../is"),s=e("../promise"),l=e("../define"),c=function(e){var t=this,n=(e=i.extend({},e)).container;n&&!a.htmlElement(n)&&a.htmlElement(n[0])&&(n=n[0]);var l=n?n._cyreg:null;(l=l||{})&&l.cy&&(l.cy.destroy(),l={});var c=l.readies=l.readies||[];n&&(n._cyreg=l),l.cy=t;var u=void 0!==r&&void 0!==n&&!e.headless,d=e;d.layout=i.extend({name:u?"grid":"null"},d.layout),d.renderer=i.extend({name:u?"canvas":"null"},d.renderer);var p=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},f=this._private={container:n,ready:!1,options:d,elements:new o(this),listeners:[],aniEles:new o(this),scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:p(!0,d.zoomingEnabled),userZoomingEnabled:p(!0,d.userZoomingEnabled),panningEnabled:p(!0,d.panningEnabled),userPanningEnabled:p(!0,d.userPanningEnabled),boxSelectionEnabled:p(!0,d.boxSelectionEnabled),autolock:p(!1,d.autolock,d.autolockNodes),autoungrabify:p(!1,d.autoungrabify,d.autoungrabifyNodes),autounselectify:p(!1,d.autounselectify),styleEnabled:void 0===d.styleEnabled?u:d.styleEnabled,zoom:a.number(d.zoom)?d.zoom:1,pan:{x:a.plainObject(d.pan)&&a.number(d.pan.x)?d.pan.x:0,y:a.plainObject(d.pan)&&a.number(d.pan.y)?d.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1},h=d.selectionType;f.selectionType=void 0===h||"additive"!==h&&"single"!==h?"single":h,a.number(d.minZoom)&&a.number(d.maxZoom)&&d.minZoom<d.maxZoom?(f.minZoom=d.minZoom,f.maxZoom=d.maxZoom):a.number(d.minZoom)&&void 0===d.maxZoom?f.minZoom=d.minZoom:a.number(d.maxZoom)&&void 0===d.minZoom&&(f.maxZoom=d.maxZoom);var g=function(e,t){return e.some(a.promise)?s.all(e).then(t):void t(e)};t.initRenderer(i.extend({hideEdgesOnViewport:d.hideEdgesOnViewport,textureOnViewport:d.textureOnViewport,wheelSensitivity:a.number(d.wheelSensitivity)&&d.wheelSensitivity>0?d.wheelSensitivity:1,motionBlur:void 0!==d.motionBlur&&d.motionBlur,motionBlurOpacity:void 0===d.motionBlurOpacity?.05:d.motionBlurOpacity,pixelRatio:a.number(d.pixelRatio)&&d.pixelRatio>0?d.pixelRatio:void 0,desktopTapThreshold:void 0===d.desktopTapThreshold?4:d.desktopTapThreshold,touchTapThreshold:void 0===d.touchTapThreshold?8:d.touchTapThreshold},d.renderer));var v=function(e,n,r){t.notifications(!1);var o=t.mutableElements();o.length>0&&o.remove(),null!=e&&(a.plainObject(e)||a.array(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.trigger(e),t.notify({type:"load",eles:t.mutableElements()}),t.one("load",n),t.trigger("load")})).one("layoutstop",(function(){t.one("done",r),t.trigger("done")}));var s=i.extend({},t._private.options.layout);s.eles=t.elements(),t.layout(s).run()};g([d.style,d.elements],(function(e){var n=e[0],r=e[1];f.styleEnabled&&t.setStyle(n),v(r,(function(){t.startAnimationLoop(),f.ready=!0,a.fn(d.ready)&&t.on("ready",d.ready);for(var e=0;e<c.length;e++){var n=c[e];t.on("ready",n)}l&&(l.readies=[]),t.trigger("ready")}),d.done)}))},u=c.prototype;i.extend(u,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},isDestroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.trigger("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.isDestroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.trigger("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},selectionType:function(){return this._private.selectionType},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return"null"===this._private.options.renderer.name},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},options:function(){return i.copy(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements();if(a.plainObject(e)){if(t.startBatch(),e.elements){var o={},s=function(e,n){for(var r=0;r<e.length;r++){var a=e[r],s=a.data.id,l=t.getElementById(s);o[s]=!0,0!==l.length?l.json(a):n?t.add(i.extend({group:n},a)):t.add(a)}};if(a.array(e.elements))s(e.elements);else for(var l=["nodes","edges"],c=0;c<l.length;c++){var u=l[c],d=e.elements[u];a.array(d)&&s(d,u)}r.stdFilter((function(e){return!o[e.id()]})).remove()}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));var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify"];for(c=0;c<p.length;c++){var f=p[c];null!=e[f]&&t[f](e[f])}return t.endBatch(),this}if(void 0===e){var h={elements:{}};return r.forEach((function(e){var t=e.group();h.elements[t]||(h.elements[t]=[]),h.elements[t].push(e.json())})),this._private.styleEnabled&&(h.style=t.style().json()),h.zoomingEnabled=t._private.zoomingEnabled,h.userZoomingEnabled=t._private.userZoomingEnabled,h.zoom=t._private.zoom,h.minZoom=t._private.minZoom,h.maxZoom=t._private.maxZoom,h.panningEnabled=t._private.panningEnabled,h.userPanningEnabled=t._private.userPanningEnabled,h.pan=i.copy(t._private.pan),h.boxSelectionEnabled=t._private.boxSelectionEnabled,h.renderer=i.copy(t._private.options.renderer),h.hideEdgesOnViewport=t._private.options.hideEdgesOnViewport,h.textureOnViewport=t._private.options.textureOnViewport,h.wheelSensitivity=t._private.options.wheelSensitivity,h.motionBlur=t._private.options.motionBlur,h}},scratch:l.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0}),removeScratch:l.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0})}),u.$id=u.getElementById,[e("./add-remove"),e("./animation"),e("./events"),e("./export"),e("./layout"),e("./notification"),e("./renderer"),e("./search"),e("./style"),e("./viewport")].forEach((function(e){i.extend(u,e)})),t.exports=c},{"../collection":26,"../define":44,"../is":91,"../promise":94,"../util":108,"../window":116,"./add-remove":33,"./animation":34,"./events":35,"./export":36,"./layout":38,"./notification":39,"./renderer":40,"./search":41,"./style":42,"./viewport":43}],38:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,o=e.name,a=t.extension("layout",o);if(null!=a)return n=i.string(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new a(r.extend({},e,{cy:t,eles:n}));r.error("Can not apply layout: No such layout `"+o+"` found; did you include its JS file?")}else r.error("A `name` must be specified to make a layout");else r.error("Layout options must be specified to make a layout")}};o.createLayout=o.makeLayout=o.layout,t.exports=o},{"../is":91,"../util":108}],39:[function(e,t,n){"use strict";var r={notify:function(e){var t=this._private;if(t.batchingNotify){var n=t.batchNotifyEles,r=t.batchNotifyTypes;return e.eles&&n.merge(e.eles),void(r.ids[e.type]||(r.push(e.type),r.ids[e.type]=!0))}if(t.notificationsEnabled){var i=this.renderer();!this.isDestroyed()&&i&&i.notify(e)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:void(t.notificationsEnabled=!!e)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchingStyle=e.batchingNotify=!0,e.batchStyleEles=this.collection(),e.batchNotifyEles=this.collection(),e.batchNotifyTypes=[],e.batchNotifyTypes.ids={}),e.batchCount++,this},endBatch:function(){var e=this._private;return e.batchCount--,0===e.batchCount&&(e.batchingStyle=!1,e.batchStyleEles.updateStyle(),e.batchingNotify=!1,this.notify({type:e.batchNotifyTypes,eles:e.batchNotifyEles})),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),r=0;r<n.length;r++){var i=n[r],o=e[i];t.getElementById(i).data(o)}}))}};t.exports=r},{}],40:[function(e,t,n){"use strict";var r=e("../util"),i={renderTo:function(e,t,n,r){return this._private.renderer.renderTo(e,t,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify({type:"draw"}),this},resize:function(){return this.invalidateSize(),this.notify({type:"resize"}),this.trigger("resize"),this},initRenderer:function(e){var t=this,n=t.extension("renderer",e.name);if(null!=n){var i=r.extend({},e,{cy:t});t._private.renderer=new n(i)}else r.error("Can not initialise: No such renderer `%s` found; did you include its JS file?",e.name)},destroyRenderer:function(){var e=this;e.notify({type:"destroy"});var t=e.container();if(t)for(t._cyreg=null;t.childNodes.length>0;)t.removeChild(t.childNodes[0]);e._private.renderer=null},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};i.invalidateDimensions=i.resize,t.exports=i},{"../util":108}],41:[function(e,t,n){"use strict";var r=e("../is"),i=e("../collection"),o={collection:function(e,t){return r.string(e)?this.$(e):r.elementOrCollection(e)?e.collection():r.array(e)?new i(this,e,t):new i(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.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}};o.elements=o.filter=o.$,t.exports=o},{"../collection":26,"../is":91}],42:[function(e,t,n){"use strict";var r=e("../is"),i=e("../style"),o={style:function(e){return e&&this.setStyle(e).update(),this._private.style},setStyle:function(e){var t=this._private;return r.stylesheet(e)?t.style=e.generateStyle(this):r.array(e)?t.style=i.fromJson(this,e):r.string(e)?t.style=i.fromString(this,e):t.style=i(this),t.style}};t.exports=o},{"../is":91,"../style":101}],43:[function(e,t,n){"use strict";var r=e("../is"),i=e("../window"),o={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)},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 e,t,n,i,o,a=arguments,s=this._private.pan;switch(a.length){case 0:return s;case 1:if(r.string(a[0]))return s[e=a[0]];if(r.plainObject(a[0])){if(!this._private.panningEnabled)return this;i=(n=a[0]).x,o=n.y,r.number(i)&&(s.x=i),r.number(o)&&(s.y=o),this.trigger("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=a[0],t=a[1],"x"!==e&&"y"!==e||!r.number(t)||(s[e]=t),this.trigger("pan viewport")}return this.notify({type:"viewport"}),this},panBy:function(e){var t,n,i,o,a,s=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:r.plainObject(s[0])&&(o=(i=s[0]).x,a=i.y,r.number(o)&&(l.x+=o),r.number(a)&&(l.y+=a),this.trigger("pan viewport"));break;case 2:t=s[0],n=s[1],"x"!==t&&"y"!==t||!r.number(n)||(l[t]+=n),this.trigger("pan viewport")}return this.notify({type:"viewport"}),this},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.trigger("pan zoom viewport"),this.notify({type:"viewport"})}return this},getFitViewport:function(e,t){if(r.number(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var n;if(r.string(e)){var i=e;e=this.$(i)}else if(r.boundingBox(e)){var o=e;(n={x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1}else r.elementOrCollection(e)||(e=this.mutableElements());n=n||e.boundingBox();var a,s=this.width(),l=this.height();if(t=r.number(t)?t:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)<this._private.minZoom?this._private.minZoom:a,pan:{x:(s-a*(n.x1+n.x2))/2,y:(l-a*(n.y1+n.y2))/2}}}},minZoom:function(e){return void 0===e?this._private.minZoom:(r.number(e)&&(this._private.minZoom=e),this)},maxZoom:function(e){return void 0===e?this._private.maxZoom:(r.number(e)&&(this._private.maxZoom=e),this)},zoom:function(e){var t,n;if(void 0===e)return this._private.zoom;if(r.number(e))n=e;else if(r.plainObject(e)){if(n=e.level,e.position){var i=e.position,o=this._private.pan,a=this._private.zoom;t={x:i.x*a+o.x,y:i.y*a+o.y}}else e.renderedPosition&&(t=e.renderedPosition);if(t&&!this._private.panningEnabled)return this}if(!this._private.zoomingEnabled)return this;if(!r.number(n)||t&&(!r.number(t.x)||!r.number(t.y)))return this;if(n=(n=n>this._private.maxZoom?this._private.maxZoom:n)<this._private.minZoom?this._private.minZoom:n,t){var s=this._private.pan,l=this._private.zoom,c=n,u={x:-c/l*(t.x-s.x)+t.x,y:-c/l*(t.y-s.y)+t.y};this._private.zoom=n,this._private.pan=u;var d=s.x!==u.x||s.y!==u.y;this.trigger(" zoom "+(d?" pan ":"")+" viewport ")}else this._private.zoom=n,this.trigger("zoom viewport");return this.notify({type:"viewport"}),this},viewport:function(e){var t=this._private,n=!0,i=!0,o=[],a=!1,s=!1;if(!e)return this;if(r.number(e.zoom)||(n=!1),r.plainObject(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 c=e.pan;r.number(c.x)&&(t.pan.x=c.x,s=!1),r.number(c.y)&&(t.pan.y=c.y,s=!1),s||o.push("pan")}return o.length>0&&(o.push("viewport"),this.trigger(o.join(" ")),this.notify({type:"viewport"})),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.trigger("pan viewport"),this.notify({type:"viewport"})),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(r.string(e)){var n=e;e=this.mutableElements().filter(n)}else r.elementOrCollection(e)||(e=this.mutableElements());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 e=this._private,t=e.container;return e.sizeCache=e.sizeCache||(t?function(){var e=t.getBoundingClientRect(),n=i.getComputedStyle(t),r=function(e){return parseFloat(n.getPropertyValue(e))};return{width:e.width-r("padding-left")-r("padding-right")-r("border-left-width")-r("border-right-width"),height:e.height-r("padding-top")-r("padding-bottom")-r("border-top-width")-r("border-bottom-width")}}():{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(),r={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 r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}}};o.centre=o.center,o.autolockNodes=o.autolock,o.autoungrabifyNodes=o.autoungrabify,t.exports=o},{"../is":91,"../window":116}],44:[function(e,t,n){"use strict";var r=e("./util"),i=e("./is"),o=e("./selector"),a=e("./promise"),s=e("./event"),l=e("./animation"),c={data:function(e){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(e){},onSet:function(e){},canSet:function(e){return!0}};return e=r.extend({},t,e),function(t,n){var r=e,o=this,a=void 0!==o.length,s=a?o:[o],l=a?o[0]:o;if(i.string(t)){if(r.allowGetting&&void 0===n)return l&&(r.beforeGet(l),y=l._private[r.field][t]),y;if(r.allowSetting&&void 0!==n&&!r.immutableKeys[t]){for(var c=0,u=s.length;c<u;c++)r.canSet(s[c])&&(s[c]._private[r.field][t]=n);r.updateStyle&&o.updateStyle(),r.onSet(o),r.settingTriggersEvent&&o[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&i.plainObject(t)){var d,p,f=t,h=Object.keys(f);for(c=0;c<h.length;c++)if(p=f[d=h[c]],!r.immutableKeys[d])for(var g=0;g<s.length;g++){var v=s[g];r.canSet(v)&&(v._private[r.field][d]=p)}r.updateStyle&&o.updateStyle(),r.onSet(o),r.settingTriggersEvent&&o[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&i.fn(t)){var m=t;o.on(r.bindingEvent,m)}else if(r.allowGetting&&void 0===t){var y;return l&&(r.beforeGet(l),y=l._private[r.field]),y}return o}},removeData:function(e){var t={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=r.extend({},t,e),function(t){var n=e,r=this,o=void 0!==r.length?r:[r];if(i.string(t)){for(var a=(p=t.split(/\s+/)).length,s=0;s<a;s++){var l=p[s];if(!i.emptyString(l)&&!n.immutableKeys[l])for(var c=0,u=o.length;c<u;c++)o[c]._private[n.field][l]=void 0}n.triggerEvent&&r[n.triggerFnName](n.event)}else if(void 0===t){for(c=0,u=o.length;c<u;c++){var d=o[c]._private[n.field],p=Object.keys(d);for(s=0;s<p.length;s++)l=p[s],!n.immutableKeys[l]&&(d[l]=void 0)}n.triggerEvent&&r[n.triggerFnName](n.event)}return r}},event:{regex:/(\w+)(\.(?:\w+|\*))?/,universalNamespace:".*",optionalTypeRegex:/(\w+)?(\.(?:\w+|\*))?/,falseCallback:function(){return!1}},on:function(e){var t={unbindSelfOnTrigger:!1,unbindAllBindersOnTrigger:!1};return e=r.extend({},t,e),function(t,n,r){var a=this,s=void 0!==a.length?a:[a],l=i.string(t),u=e;if(i.fn(n)&&(r=n,n=void 0),!i.fn(r)&&!1!==r&&l)return a;if(l){var d={};d[t]=r,t=d}for(var p=Object.keys(t),f=0;f<p.length;f++){var h=p[f];if(!1===(r=t[h])&&(r=c.event.falseCallback),i.fn(r)){h=h.split(/\s+/);for(var g=0;g<h.length;g++){var v=h[g];if(!i.emptyString(v)){var m=v.match(c.event.regex);if(m)for(var y=m[1],b=m[2]?m[2]:void 0,C={callback:r,delegated:!!n,selector:n,selObj:new o(n),type:y,namespace:b,unbindSelfOnTrigger:u.unbindSelfOnTrigger,unbindAllBindersOnTrigger:u.unbindAllBindersOnTrigger,binders:s},x=0;x<s.length;x++){var E=s[x]._private=s[x]._private||{};E.listeners=E.listeners||[],E.listeners.push(C)}}}}}return a}},eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.removeListener=t.unlisten=t.unbind=t.off,t.emit=t.trigger,t.pon=t.promiseOn=function(e,t){var n=this,r=Array.prototype.slice.call(arguments,0);return new a((function(e,t){var i=function(t){n.off.apply(n,a),e(t)},o=r.concat([i]),a=o.concat([]);n.on.apply(n,o)}))}},off:function(e){var t={};return e=r.extend({},t,e),function(e,t,n){var r=this,o=void 0!==r.length?r:[r],a=i.string(e);if(0===arguments.length){for(var s=0;s<o.length;s++)o[s]._private=o[s]._private||{},y.listeners=[];return r}if((i.fn(t)||!1===t)&&(n=t,t=void 0),a){var l={};l[e]=n,e=l}for(var u=Object.keys(e),d=0;d<u.length;d++){var p=u[d];!1===(n=e[p])&&(n=c.event.falseCallback),p=p.split(/\s+/);for(var f=0;f<p.length;f++){var h=p[f];if(!i.emptyString(h)){var g=h.match(c.event.optionalTypeRegex);if(g){var v=g[1]?g[1]:void 0,m=g[2]?g[2]:void 0;for(s=0;s<o.length;s++)for(var y=o[s]._private=o[s]._private||{},b=y.listeners=y.listeners||[],C=0;C<b.length;C++){var x=b[C],E=!m||m===x.namespace,S=!v||x.type===v,w=!n||n===x.callback;E&&S&&w&&(b.splice(C,1),C--)}}}}}return r}},trigger:function(e){var t={};return e=r.extend({},t,e),function(t,n,r){var o=this,a=void 0!==o.length?o:[o],l=i.string(t),u=i.plainObject(t),d=i.event(t),p=(E=this._private=this._private||{}).cy||(i.core(this)?this:null),f=!!p&&p.hasCompoundNodes();if(l){var h=t.split(/\s+/);t=[];for(var g=0;g<h.length;g++){var v=h[g];if(!i.emptyString(v)){var m=v.match(c.event.regex),y=m[1],b=m[2]?m[2]:void 0;t.push({type:y,namespace:b})}}}else u&&(t=[t]);for(n?i.array(n)||(n=[n]):n=[],g=0;g<t.length;g++)for(var C=t[g],x=0;x<a.length;x++){var E,S=a[x],w=(E=S._private=S._private||{}).listeners=E.listeners||[],V=i.element(S)||e.layout;if(d?((v=C).target=v.target||S,v.cy=v.cy||p):v=new s(C,{target:S,cy:p,namespace:C.namespace}),C.layout&&(v.layout=C.layout),e.layout&&(v.layout=S),v.position){var R=v.position,O=p.zoom(),A=p.pan();v.renderedPosition={x:R.x*O+A.x,y:R.y*O+A.y}}r&&(w=[{namespace:v.namespace,type:v.type,callback:r}]);for(var k=0;k<w.length;k++){var T=w[k],N=!T.namespace||T.namespace===v.namespace||T.namespace===c.event.universalNamespace,D=T.type===v.type,P=!T.delegated||S!==v.target&&i.element(v.target)&&T.selObj.matches(v.target);if(N&&D&&P){var _=[v];if(_=_.concat(n),(T.unbindSelfOnTrigger||T.unbindAllBindersOnTrigger)&&(w.splice(k,1),k--),T.unbindAllBindersOnTrigger)for(var B=T.binders,M=0;M<B.length;M++){var I=B[M];if(I&&I!==S)for(var F=I._private.listeners,L=0;L<F.length;L++)F[L]===T&&(F.splice(L,1),L--)}var W=T.delegated?v.target:S,U=T.callback.apply(W,_);(!1===U||v.isPropagationStopped())&&(V=!1,!1===U&&(v.stopPropagation(),v.preventDefault()))}}if(V){var G=f?S._private.parent:null;null!=G&&0!==G.length?(G=G[0]).trigger(v):p.trigger(v)}}return o}},animated:function(e){var t={};return e=r.extend({},t,e),function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return!1;var n=t[0];return n?n._private.animation.current.length>0:void 0}},clearQueue:function(e){var t={};return e=r.extend({},t,e),function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n<t.length;n++)t[n]._private.animation.queue=[];return this}},delay:function(e){var t={};return e=r.extend({},t,e),function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this}},delayAnimation:function(e){var t={};return e=r.extend({},t,e),function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this}},animation:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,i=void 0!==n.length,o=i?n:[n],a=this._private.cy||this,s=!i,c=!s;if(!a.styleEnabled())return this;var u=a.style();if(e=r.extend({},e,t),0===Object.keys(e).length)return new l(o[0],e);switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}if(c&&(e.style=u.getPropsList(e.style||e.css),e.css=void 0),e.renderedPosition&&c){var d=e.renderedPosition,p=a.pan(),f=a.zoom();e.position={x:(d.x-p.x)/f,y:(d.y-p.y)/f}}if(e.panBy&&s){var h=e.panBy,g=a.pan();e.pan={x:g.x+h.x,y:g.y+h.y}}var v=e.center||e.centre;if(v&&s){var m=a.getCenterPan(v.eles,e.zoom);m&&(e.pan=m)}if(e.fit&&s){var y=e.fit,b=a.getFitViewport(y.eles||y.boundingBox,y.padding);b&&(e.pan=b.pan,e.zoom=b.zoom)}return new l(o[0],e)}},animate:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,i=void 0!==n.length?n:[n];if(!(this._private.cy||this).styleEnabled())return this;t&&(e=r.extend({},e,t));for(var o=0;o<i.length;o++){var a=i[o],s=a.animated()&&(void 0===e.queue||e.queue);a.animation(e,s?{queue:!0}:void 0).play()}return this}},stop:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,r=void 0!==n.length?n:[n],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o<r.length;o++){for(var a=r[o]._private,s=a.animation.current,l=0;l<s.length;l++){var c=s[l]._private;t&&(c.duration=0)}e&&(a.animation.queue=[]),t||(a.animation.current=[])}return i.notify({eles:this,type:"draw"}),this}}};t.exports=c},{"./animation":2,"./event":45,"./is":91,"./promise":94,"./selector":95,"./util":108}],45:[function(e,t,n){"use strict";function r(){return!1}function i(){return!0}var o=function(e,t){return this instanceof o?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?i:r):this.type=e,t&&(this.type=void 0!==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,this.message=t.message),void(this.timeStamp=e&&e.timeStamp||Date.now())):new o(e,t)};o.prototype={instanceString:function(){return"event"},preventDefault:function(){this.isDefaultPrevented=i;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=i;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()},isDefaultPrevented:r,isPropagationStopped:r,isImmediatePropagationStopped:r},t.exports=o},{}],46:[function(e,t,n){"use strict";function r(e,t,n){var r=n,o=function(n){s.error("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(u.prototype[t])return o(t);u.prototype[t]=n}else if("collection"===e){if(c.prototype[t])return o(t);c.prototype[t]=n}else if("layout"===e){for(var a=function(e){this.options=e,n.call(this,e),p.plainObject(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[]},d=a.prototype=Object.create(n.prototype),h=[],g=0;g<h.length;g++){var v=h[g];d[v]=d[v]||function(){return this}}d.start&&!d.run?d.run=function(){return this.start(),this}:!d.start&&d.run&&(d.start=function(){return this.run(),this});var m=n.prototype.stop;d.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return m?m.call(this):this.trigger("layoutstop"),this},d.destroy||(d.destroy=function(){return this}),d.on=l.on({layout:!0}),d.one=l.on({layout:!0,unbindSelfOnTrigger:!0}),d.once=l.on({layout:!0,unbindAllBindersOnTrigger:!0}),d.off=l.off({layout:!0}),d.trigger=l.trigger({layout:!0}),l.eventAliasesOn(d),r=a}else if("renderer"===e&&"null"!==t&&"base"!==t){var y=i("renderer","base"),b=y.prototype,C=n,x=n.prototype,E=function(){y.apply(this,arguments),C.apply(this,arguments)},S=E.prototype;for(var w in b){var V=b[w];if(null!=x[w])return o(w);S[w]=V}for(var w in x)S[w]=x[w];b.clientFunctions.forEach((function(e){S[e]=S[e]||function(){s.error("Renderer does not implement `renderer."+e+"()` on its prototype")}})),r=E}return s.setMap({map:f,keys:[e,t],value:r})}function i(e,t){return s.getMap({map:f,keys:[e,t]})}function o(e,t,n,r,i){return s.setMap({map:h,keys:[e,t,n,r],value:i})}function a(e,t,n,r){return s.getMap({map:h,keys:[e,t,n,r]})}var s=e("./util"),l=e("./define"),c=e("./collection"),u=e("./core"),d=e("./extensions"),p=e("./is"),f={},h={},g=function(){return 2===arguments.length?i.apply(null,arguments):3===arguments.length?r.apply(null,arguments):4===arguments.length?a.apply(null,arguments):5===arguments.length?o.apply(null,arguments):void s.error("Invalid extension access syntax")};u.prototype.extension=g,d.forEach((function(e){e.extensions.forEach((function(t){r(e.type,t.name,t.impl)}))})),t.exports=g},{"./collection":26,"./core":37,"./define":44,"./extensions":47,"./is":91,"./util":108}],47:[function(e,t,n){"use strict";t.exports=[{type:"layout",extensions:e("./layout")},{type:"renderer",extensions:e("./renderer")}]},{"./layout":53,"./renderer":87}],48:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},s,e)}var i=e("../../util"),o=e("../../math"),a=e("../../is"),s={fit:!0,directed:!1,padding:30,circle:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,maximalAdjustments:0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e,t=this.options,n=t,r=t.cy,i=n.eles,s=i.nodes().not(":parent"),l=i,c=o.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.elementOrCollection(n.roots))e=n.roots;else if(a.array(n.roots)){for(var u=[],d=0;d<n.roots.length;d++){var p=n.roots[d],f=r.getElementById(p);u.push(f)}e=r.collection(u)}else if(a.string(n.roots))e=r.$(n.roots);else if(n.directed)e=s.roots();else{for(var h=[],g=s;g.length>0;){var v=r.collection();i.bfs({roots:g[0],visit:function(e,t,n,r,i){v=v.add(e)},directed:!1}),g=g.not(v),h.push(v)}for(e=r.collection(),d=0;d<h.length;d++){var m=h[d],y=m.maxDegree(!1),b=m.filter((function(e){return e.degree(!1)===y}));e=e.add(b)}}var C=[],x={},E={},S={},w={},V={};l.bfs({roots:e,directed:n.directed,visit:function(e,t,n,r,i){var o=e[0],a=o.id();if(C[i]||(C[i]=[]),C[i].push(o),x[a]=!0,E[a]=i,S[a]=n,w[a]=t,n){var s=n.id();(V[s]=V[s]||[]).push(e)}}});var R=[];for(d=0;d<s.length;d++)f=s[d],x[f.id()]||R.push(f);for(var O=3*R.length,A=0;0!==R.length&&A<O;){var k=(N=R.shift()).neighborhood().nodes(),T=!1;for(d=0;d<k.length;d++)if(void 0!==(te=E[k[d].id()])){C[te].push(N),T=!0;break}T||R.push(N),A++}for(;0!==R.length;){var N=R.shift();(T=!1)||(0===C.length&&C.push([]),C[0].push(N))}var D=function(){for(var e=0;e<C.length;e++)for(var t=C[e],n=0;n<t.length;n++)t[n]._private.scratch.breadthfirst={depth:e,index:n}};D();for(var P=function(e){for(var t,n=e.connectedEdges((function(t){return t.data("target")===e.id()})),r=e._private.scratch.breadthfirst,i=0,o=0;o<n.length;o++){var a=n[o].source()[0],s=a._private.scratch.breadthfirst;r.depth<=s.depth&&i<s.depth&&(i=s.depth,t=a)}return t},_=0;_<n.maximalAdjustments;_++){var B=C.length,M=[];for(d=0;d<B;d++)for(var I=(te=C[d]).length,F=0;F<I;F++){var L=(f=te[F])._private.scratch.breadthfirst;(W=P(f))&&(L.intEle=W,M.push(f))}for(d=0;d<M.length;d++){var W,U=(W=(L=(f=M[d])._private.scratch.breadthfirst).intEle)._private.scratch.breadthfirst;C[L.depth].splice(L.index,1);for(var G=U.depth+1;G>C.length-1;)C.push([]);C[G].push(f),L.depth=G,L.index=C[G].length-1}D()}var z=0;if(n.avoidOverlap)for(d=0;d<s.length;d++){var Q=s[d].layoutDimensions(n),j=Q.w,H=Q.h;z=Math.max(z,j,H)}for(var Y={},J=function(e){if(Y[e.id()])return Y[e.id()];for(var t=e._private.scratch.breadthfirst.depth,n=e.neighborhood().nodes().not(":parent").intersection(s),r=0,i=0,o=0;o<n.length;o++){var a=n[o]._private.scratch.breadthfirst,l=a.index,c=a.depth,u=C[c].length;(t>c||0===t)&&(r+=l/u,i++)}return r/=i=Math.max(1,i),0===i&&(r=void 0),Y[e.id()]=r,r},X=function(e,t){return J(e)-J(t)},Z=0;Z<3;Z++){for(d=0;d<C.length;d++)C[d]=C[d].sort(X);D()}var q=0;for(d=0;d<C.length;d++)q=Math.max(C[d].length,q);var K={x:c.x1+c.w/2,y:c.x1+c.h/2},$=function(e,t){var r=e._private.scratch.breadthfirst,i=r.depth,o=r.index,a=C[i].length,s=Math.max(c.w/(a+1),z),l=Math.max(c.h/(C.length+1),z),u=Math.min(c.w/2/C.length,c.h/2/C.length);if(u=Math.max(u,z),n.circle){if(n.circle){var d=u*i+u-(C.length>0&&C[0].length<=3?u/2:0),p=2*Math.PI/C[i].length*o;return 0===i&&1===C[0].length&&(d=1),{x:K.x+d*Math.cos(p),y:K.y+d*Math.sin(p)}}return{x:K.x+(o+1-(a+1)/2)*s,y:(i+1)*l}}var f={x:K.x+(o+1-(a+1)/2)*s,y:(i+1)*l};return f},ee={};for(d=C.length-1;d>=0;d--){var te=C[d];for(F=0;F<te.length;F++)N=te[F],ee[N.id()]=$(N,d===C.length-1)}return s.layoutPositions(this,n,(function(e){return ee[e.id()]})),this},t.exports=r},{"../../is":91,"../../math":93,"../../util":108}],49:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},s,e)}var i=e("../../util"),o=e("../../math"),a=e("../../is"),s={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,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,s=r.nodes().not(":parent");t.sort&&(s=s.sort(t.sort));for(var l,c=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),u={x:c.x1+c.w/2,y:c.y1+c.h/2},d=(void 0===t.sweep?2*Math.PI-2*Math.PI/s.length:t.sweep)/Math.max(1,s.length-1),p=0,f=0;f<s.length;f++){var h=s[f].layoutDimensions(t),g=h.w,v=h.h;p=Math.max(p,g,v)}if(l=a.number(t.radius)?t.radius:s.length<=1?0:Math.min(c.h,c.w)/2-p,s.length>1&&t.avoidOverlap){p*=1.75;var m=Math.cos(d)-Math.cos(0),y=Math.sin(d)-Math.sin(0),b=Math.sqrt(p*p/(m*m+y*y));l=Math.max(b,l)}var C=function(e,n){var r=t.startAngle+n*d*(i?1:-1),o=l*Math.cos(r),a=l*Math.sin(r);return{x:u.x+o,y:u.y+a}};return s.layoutPositions(this,t,C),this},t.exports=r},{"../../is":91,"../../math":93,"../../util":108}],50:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={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,ready:void 0,stop:void 0};r.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles.nodes().not(":parent"),a=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:a.x1+a.w/2,y:a.y1+a.h/2},l=[],c=t.startAngle,u=0,d=0;d<i.length;d++){var p,f=i[d];p=t.concentric(f),l.push({value:p,node:f}),f._private.scratch.concentric=p}for(i.updateStyle(),d=0;d<i.length;d++){var h=(f=i[d]).layoutDimensions(t);u=Math.max(u,h.w,h.h)}l.sort((function(e,t){return t.value-e.value}));var g=t.levelWidth(i),v=[[]],m=v[0];for(d=0;d<l.length;d++){var y=l[d];m.length>0&&Math.abs(m[0].value-y.value)>=g&&(m=[],v.push(m)),m.push(y)}var b=u+t.minNodeSpacing;if(!t.avoidOverlap){var C=v.length>0&&v[0].length>1,x=(Math.min(a.w,a.h)/2-b)/(v.length+C?1:0);b=Math.min(b,x)}var E=0;for(d=0;d<v.length;d++){var S=v[d],w=void 0===t.sweep?2*Math.PI-2*Math.PI/S.length:t.sweep,V=S.dTheta=w/Math.max(1,S.length-1);if(S.length>1&&t.avoidOverlap){var R=Math.cos(V)-Math.cos(0),O=Math.sin(V)-Math.sin(0),A=Math.sqrt(b*b/(R*R+O*O));E=Math.max(A,E)}S.r=E,E+=b}if(t.equidistant){var k=0;for(E=0,d=0;d<v.length;d++){var T=(S=v[d]).r-E;k=Math.max(k,T)}for(E=0,d=0;d<v.length;d++)S=v[d],0===d&&(E=S.r),S.r=E,E+=k}var N={};for(d=0;d<v.length;d++){V=(S=v[d]).dTheta,E=S.r;for(var D=0;D<S.length;D++){y=S[D],c=t.startAngle+(n?1:-1)*V*D;var P={x:s.x+E*Math.cos(c),y:s.y+E*Math.sin(c)};N[y.node.id()]=P}}return i.layoutPositions(this,t,(function(e){var t=e.id();return N[t]})),this},t.exports=r},{"../../math":93,"../../util":108}],51:[function(e,t,n){"use strict";function r(e){this.options=o.extend({},c,e),this.options.layout=this}var i,o=e("../../util"),a=e("../../math"),s=e("../../is"),l=e("../../promise"),c={ready:function(){},stop:function(){},animate:!0,animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:100,nodeRepulsion:function(e){return 4e5},nodeOverlap:10,idealEdgeLength:function(e){return 10},edgeElasticity:function(e){return 100},nestingFactor:5,gravity:80,numIter:1e3,initialTemp:200,coolingFactor:.95,minTemp:1,weaver:!1};r.prototype.run=function(){function e(e){var t={type:"message",message:e};d.trigger(t)}var t=this.options,n=t.cy,r=this,a=this.thread,c=t.weaver?t.weaver.Thread:null,d={listeners:[],on:function(e,t){return this.listeners.push({event:e,callback:t}),this},trigger:function(e){s.string(e)&&(e={type:e});var t=function(t){return t.event===e.type},n=function(t){t.callback(e)};return this.listeners.filter(t).forEach(n),this},pass:function(e){return this.pass=e,this},run:function(e){var t=this.pass;return new l((function(n){n(e(t))}))},stop:function(){return this}};a&&!a.stopped()||(a=this.thread=c?new c:d),r.stopped=!1,r.trigger({type:"layoutstart",layout:r}),i=!0===t.debug;var p=u(n,r,t);i&&f(p),t.randomize&&h(p,n);var v=Date.now(),m=!1,y=function(e){e=e||{},m&&!e.next||!e.force&&Date.now()-v<t.animationThreshold||(m=!0,o.requestAnimationFrame((function(){g(p,n,t),!0===t.fit&&n.fit(t.padding),m=!1,e.next&&e.next()})))};a.on("message",(function(e){var t=e.message;p.layoutNodes=t,y()})),a.pass({layoutInfo:p,options:{animate:t.animate,refresh:t.refresh,componentSpacing:t.componentSpacing,nodeOverlap:t.nodeOverlap,nestingFactor:t.nestingFactor,gravity:t.gravity,numIter:t.numIter,initialTemp:t.initialTemp,coolingFactor:t.coolingFactor,minTemp:t.minTemp}}).run((function(t){var n=t.layoutInfo,r=t.options,i=!1,o=function(e,t,n){a(e,t),d(e,t),p(e,t),f(e,t),h(e,t)},a=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var r=e.graphSet[n],i=r.length,o=0;o<i;o++)for(var a=e.layoutNodes[e.idToIndex[r[o]]],s=o+1;s<i;s++){var c=e.layoutNodes[e.idToIndex[r[s]]];l(a,c,e,t)}},s=function(e){return-e+2*e*Math.random()},l=function(e,t,n,r){if(e.cmptId===t.cmptId||n.isCompound){var i=t.positionX-e.positionX,o=t.positionY-e.positionY,a=1;0===i&&0===o&&(i=s(a),o=s(a));var l=c(e,t,i,o);if(l>0)var d=(f=r.nodeOverlap*l)*i/(b=Math.sqrt(i*i+o*o)),p=f*o/b;else{var f,h=u(e,i,o),g=u(t,-1*i,-1*o),v=g.x-h.x,m=g.y-h.y,y=v*v+m*m,b=Math.sqrt(y);d=(f=(e.nodeRepulsion+t.nodeRepulsion)/y)*v/b,p=f*m/b}e.isLocked||(e.offsetX-=d,e.offsetY-=p),t.isLocked||(t.offsetX+=d,t.offsetY+=p)}},c=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var o=e.maxY-t.minY;else o=t.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},u=function(e,t,n){var r=e.positionX,i=e.positionY,o=e.height||1,a=e.width||1,s=n/t,l=o/a,c={};return 0===t&&0<n||0===t&&0>n?(c.x=r,c.y=i+o/2,c):0<t&&-1*l<=s&&s<=l?(c.x=r+a/2,c.y=i+a*n/2/t,c):0>t&&-1*l<=s&&s<=l?(c.x=r-a/2,c.y=i-a*n/2/t,c):0<n&&(s<=-1*l||s>=l)?(c.x=r+o*t/2/n,c.y=i+o/2,c):0>n&&(s<=-1*l||s>=l)?(c.x=r-o*t/2/n,c.y=i-o/2,c):c},d=function(e,t){for(var n=0;n<e.edgeSize;n++){var r=e.layoutEdges[n],i=e.idToIndex[r.sourceId],o=e.layoutNodes[i],a=e.idToIndex[r.targetId],s=e.layoutNodes[a],l=s.positionX-o.positionX,c=s.positionY-o.positionY;if(0===l&&0===c)return;var d=u(o,l,c),p=u(s,-1*l,-1*c),f=p.x-d.x,h=p.y-d.y,g=Math.sqrt(f*f+h*h),v=Math.pow(r.idealLength-g,2)/r.elasticity;if(0!==g)var m=v*f/g,y=v*h/g;else m=0,y=0;o.isLocked||(o.offsetX+=m,o.offsetY+=y),s.isLocked||(s.offsetX-=m,s.offsetY-=y)}},p=function(e,t){for(var n=1,r=0;r<e.graphSet.length;r++){var i=e.graphSet[r],o=i.length;if(0===r)var a=e.clientHeight/2,s=e.clientWidth/2;else{var l=e.layoutNodes[e.idToIndex[i[0]]],c=e.layoutNodes[e.idToIndex[l.parentId]];a=c.positionX,s=c.positionY}for(var u=0;u<o;u++){var d=e.layoutNodes[e.idToIndex[i[u]]];if(!d.isLocked){var p=a-d.positionX,f=s-d.positionY,h=Math.sqrt(p*p+f*f);if(h>n){var g=t.gravity*p/h,v=t.gravity*f/h;d.offsetX+=g,d.offsetY+=v}}}}},f=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var o=n[r++],a=e.idToIndex[o],s=e.layoutNodes[a],l=s.children;if(0<l.length&&!s.isLocked){for(var c=s.offsetX,u=s.offsetY,d=0;d<l.length;d++){var p=e.layoutNodes[e.idToIndex[l[d]]];p.offsetX+=c,p.offsetY+=u,n[++i]=l[d]}s.offsetX=0,s.offsetY=0}}},h=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 r=g(i.offsetX,i.offsetY,e.temperature);i.positionX+=r.x,i.positionY+=r.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,v(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)}},g=function(e,t,n){var r=Math.sqrt(e*e+t*t);if(r>n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},v=function(e,t){var n=e.parentId;if(null!=n){var r=t.layoutNodes[t.idToIndex[n]],i=!1;return(null==r.maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(null==r.minX||e.minX-r.padLeft<r.minX)&&(r.minX=e.minX-r.padLeft,i=!0),(null==r.maxY||e.maxY+r.padBottom>r.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(null==r.minY||e.minY-r.padTop<r.minY)&&(r.minY=e.minY-r.padTop,i=!0),i?v(r,t):void 0}},m=function(e,t){for(var r=n.layoutNodes,i=[],o=0;o<r.length;o++){var a=r[o],s=a.cmptId;(i[s]=i[s]||[]).push(a)}var l=0;for(o=0;o<i.length;o++)if(v=i[o]){v.x1=1/0,v.x2=-1/0,v.y1=1/0,v.y2=-1/0;for(var c=0;c<v.length;c++){var u=v[c];v.x1=Math.min(v.x1,u.positionX-u.width/2),v.x2=Math.max(v.x2,u.positionX+u.width/2),v.y1=Math.min(v.y1,u.positionY-u.height/2),v.y2=Math.max(v.y2,u.positionY+u.height/2)}v.w=v.x2-v.x1,v.h=v.y2-v.y1,l+=v.w*v.h}i.sort((function(e,t){return t.w*t.h-e.w*e.h}));var d=0,p=0,f=0,h=0,g=Math.sqrt(l)*n.clientWidth/n.clientHeight;for(o=0;o<i.length;o++){var v;if(v=i[o]){for(c=0;c<v.length;c++)(u=v[c]).isLocked||(u.positionX+=d,u.positionY+=p);d+=v.w+t.componentSpacing,f+=v.w+t.componentSpacing,h=Math.max(h,v.h),f>g&&(p+=h+t.componentSpacing,d=0,f=0,h=0)}}},y=function(e){return!(i||(o(n,r,e),n.temperature=n.temperature*r.coolingFactor,n.temperature<r.minTemp))},b=0;do{for(var C=0;C<r.refresh&&b<r.numIter;){var x;if(!(x=y(b)))break;C++,b++}r.animate&&e(n.layoutNodes)}while(x&&b+1<r.numIter);return m(n,r),n})).then((function(e){p.layoutNodes=e.layoutNodes,a.stop(),b()}));var b=function(){y({force:!0,next:function(){r.one("layoutstop",t.stop),r.trigger({type:"layoutstop",layout:r})}})};return this},r.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.trigger("layoutstop"),this},r.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var u=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:a.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},l=n.eles.components(),c={},u=0;u<l.length;u++)for(var p=l[u],f=0;f<p.length;f++)c[p[f].id()]=u;for(u=0;u<o.nodeSize;u++){var h=(b=i[u]).layoutDimensions(n);(B={}).isLocked=b.locked(),B.id=b.data("id"),B.parentId=b.data("parent"),B.cmptId=c[b.id()],B.children=[],B.positionX=b.position("x"),B.positionY=b.position("y"),B.offsetX=0,B.offsetY=0,B.height=h.w,B.width=h.h,B.maxX=B.positionX+B.width/2,B.minX=B.positionX-B.width/2,B.maxY=B.positionY+B.height/2,B.minY=B.positionY-B.height/2,B.padLeft=parseFloat(b.style("padding")),B.padRight=parseFloat(b.style("padding")),B.padTop=parseFloat(b.style("padding")),B.padBottom=parseFloat(b.style("padding")),B.nodeRepulsion=s.fn(n.nodeRepulsion)?n.nodeRepulsion(b):n.nodeRepulsion,o.layoutNodes.push(B),o.idToIndex[B.id]=u}var g=[],v=0,m=-1,y=[];for(u=0;u<o.nodeSize;u++){var b,C=(b=o.layoutNodes[u]).parentId;null!=C?o.layoutNodes[o.idToIndex[C]].children.push(b.id):(g[++m]=b.id,y.push(b.id))}for(o.graphSet.push(y);v<=m;){var x=g[v++],E=o.idToIndex[x],S=o.layoutNodes[E].children;if(S.length>0)for(o.graphSet.push(S),u=0;u<S.length;u++)g[++m]=S[u]}for(u=0;u<o.graphSet.length;u++){var w=o.graphSet[u];for(f=0;f<w.length;f++){var V=o.idToIndex[w[f]];o.indexToGraph[V]=u}}for(u=0;u<o.edgeSize;u++){var R=r[u],O={};O.id=R.data("id"),O.sourceId=R.data("source"),O.targetId=R.data("target");var A=s.fn(n.idealEdgeLength)?n.idealEdgeLength(R):n.idealEdgeLength,k=s.fn(n.edgeElasticity)?n.edgeElasticity(R):n.edgeElasticity,T=o.idToIndex[O.sourceId],N=o.idToIndex[O.targetId];if(o.indexToGraph[T]!=o.indexToGraph[N]){for(var D=d(O.sourceId,O.targetId,o),P=o.graphSet[D],_=0,B=o.layoutNodes[T];-1===P.indexOf(B.id);)B=o.layoutNodes[o.idToIndex[B.parentId]],_++;for(B=o.layoutNodes[N];-1===P.indexOf(B.id);)B=o.layoutNodes[o.idToIndex[B.parentId]],_++;A*=_*n.nestingFactor}O.idealLength=A,O.elasticity=k,o.layoutEdges.push(O)}return o},d=function(e,t,n){var r=p(e,t,0,n);return 2>r.count?0:r.graph},p=function(e,t,n,r){var i=r.graphSet[n];if(-1<i.indexOf(e)&&-1<i.indexOf(t))return{count:2,graph:n};for(var o=0,a=0;a<i.length;a++){var s=i[a],l=r.idToIndex[s],c=r.layoutNodes[l].children;if(0!==c.length){var u=r.indexToGraph[r.idToIndex[c[0]]],d=p(e,t,u,r);if(0!==d.count){if(1!==d.count)return d;if(2==++o)break}}}return{count:o,graph:n}},f=function(e){if(i){console.debug("layoutNodes:");for(var t=0;t<e.nodeSize;t++){var n=e.layoutNodes[t],r="\nindex: "+t+"\nId: "+n.id+"\nChildren: "+n.children.toString()+"\nparentId: "+n.parentId+"\npositionX: "+n.positionX+"\npositionY: "+n.positionY+"\nOffsetX: "+n.offsetX+"\nOffsetY: "+n.offsetY+"\npadLeft: "+n.padLeft+"\npadRight: "+n.padRight+"\npadTop: "+n.padTop+"\npadBottom: "+n.padBottom;console.debug(r)}for(var t in console.debug("idToIndex"),e.idToIndex)console.debug("Id: "+t+"\nIndex: "+e.idToIndex[t]);console.debug("Graph Set");var o=e.graphSet;for(t=0;t<o.length;t++)console.debug("Set : "+t+": "+o[t].toString());for(r="IndexToGraph",t=0;t<e.indexToGraph.length;t++)r+="\nIndex : "+t+" Graph: "+e.indexToGraph[t];for(console.debug(r),r="Layout Edges",t=0;t<e.layoutEdges.length;t++){var a=e.layoutEdges[t];r+="\nEdge Index: "+t+" ID: "+a.id+" SouceID: "+a.sourceId+" TargetId: "+a.targetId+" Ideal Length: "+a.idealLength}console.debug(r),r="nodeSize: "+e.nodeSize,r+="\nedgeSize: "+e.edgeSize,r+="\ntemperature: "+e.temperature,console.debug(r)}},h=function(e,t){for(var n=e.clientWidth,r=e.clientHeight,i=0;i<e.nodeSize;i++){var o=e.layoutNodes[i];0!==o.children.length||o.isLocked||(o.positionX=Math.random()*n,o.positionY=Math.random()*r)}},g=function(e,t,n){var r=n.layout,i=n.eles.nodes(),o=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};n.boundingBox&&(i.forEach((function(t){var n=e.layoutNodes[e.idToIndex[t.data("id")]];a.x1=Math.min(a.x1,n.positionX),a.x2=Math.max(a.x2,n.positionX),a.y1=Math.min(a.y1,n.positionY),a.y2=Math.max(a.y2,n.positionY)})),a.w=a.x2-a.x1,a.h=a.y2-a.y1),i.positions((function(t,r){var i=e.layoutNodes[e.idToIndex[t.data("id")]];if(n.boundingBox){var s=(i.positionX-a.x1)/a.w,l=(i.positionY-a.y1)/a.h;return{x:o.x1+s*o.w,y:o.y1+l*o.h}}return{x:i.positionX,y:i.positionY}})),!0!==e.ready&&(e.ready=!0,r.one("layoutready",n.ready),r.trigger({type:"layoutready",layout:this}))};t.exports=r},{"../../is":91,"../../math":93,"../../promise":94,"../../util":108}],52:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={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,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles.nodes().not(":parent");t.sort&&(r=r.sort(t.sort));var i=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.layoutPositions(this,t,(function(e){return{x:i.x1,y:i.y1}}));else{var a=r.size(),s=Math.sqrt(a*i.h/i.w),l=Math.round(s),c=Math.round(i.w/i.h*s),u=function(e){if(null==e)return Math.min(l,c);Math.min(l,c)==l?l=e:c=e},d=function(e){if(null==e)return Math.max(l,c);Math.max(l,c)==l?l=e:c=e},p=t.rows,f=null!=t.cols?t.cols:t.columns;if(null!=p&&null!=f)l=p,c=f;else if(null!=p&&null==f)l=p,c=Math.ceil(a/l);else if(null==p&&null!=f)c=f,l=Math.ceil(a/c);else if(c*l>a)((g=u())-1)*(h=d())>=a?u(g-1):(h-1)*g>=a&&d(h-1);else for(;c*l<a;){var h,g=u();((h=d())+1)*g>=a?d(h+1):u(g+1)}var v=i.w/c,m=i.h/l;if(t.condense&&(v=0,m=0),t.avoidOverlap)for(var y=0;y<r.length;y++){null!=(D=(T=r[y])._private.position).x&&null!=D.y||(D.x=0,D.y=0);var b=T.layoutDimensions(t),C=t.avoidOverlapPadding,x=b.w+C,E=b.h+C;v=Math.max(v,x),m=Math.max(m,E)}var S={},w=function(e,t){return!!S["c-"+e+"-"+t]},V=function(e,t){S["c-"+e+"-"+t]=!0},R=0,O=0,A=function(){++O>=c&&(O=0,R++)},k={};for(y=0;y<r.length;y++){var T=r[y],N=t.position(T);if(N&&(void 0!==N.row||void 0!==N.col)){var D;if(void 0===(D={row:N.row,col:N.col}).col)for(D.col=0;w(D.row,D.col);)D.col++;else if(void 0===D.row)for(D.row=0;w(D.row,D.col);)D.row++;k[T.id()]=D,V(D.row,D.col)}}var P=function(e,t){var n,r;if(e.locked()||e.isParent())return!1;var o=k[e.id()];if(o)n=o.col*v+v/2+i.x1,r=o.row*m+m/2+i.y1;else{for(;w(R,O);)A();n=O*v+v/2+i.x1,r=R*m+m/2+i.y1,V(R,O),A()}return{x:n,y:r}};r.layoutPositions(this,t,P)}return this},t.exports=r},{"../../math":93,"../../util":108}],53:[function(e,t,n){"use strict";t.exports=[{name:"breadthfirst",impl:e("./breadthfirst")},{name:"circle",impl:e("./circle")},{name:"concentric",impl:e("./concentric")},{name:"cose",impl:e("./cose")},{name:"grid",impl:e("./grid")},{name:"null",impl:e("./null")},{name:"preset",impl:e("./preset")},{name:"random",impl:e("./random")}]},{"./breadthfirst":48,"./circle":49,"./concentric":50,"./cose":51,"./grid":52,"./null":54,"./preset":55,"./random":56}],54:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},o,e)}var i=e("../../util"),o={ready:function(){},stop:function(){}};r.prototype.run=function(){var e=this.options,t=e.eles,n=this;return e.cy,n.trigger("layoutstart"),t.nodes().positions((function(){return{x:0,y:0}})),n.one("layoutready",e.ready),n.trigger("layoutready"),n.one("layoutstop",e.stop),n.trigger("layoutstop"),this},r.prototype.stop=function(){return this},t.exports=r},{"../../util":108}],55:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../is"),a={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){function e(e){if(null==t.positions)return null;if(r)return t.positions(e);var n=t.positions[e._private.data.id];return null==n?null:n}var t=this.options,n=t.eles.nodes(),r=o.fn(t.positions);return n.layoutPositions(this,t,(function(t,n){var r=e(t);return!t.locked()&&null!=r&&r})),this},t.exports=r},{"../../is":91,"../../util":108}],56:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles.nodes().not(":parent"),r=o.makeBoundingBox(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),i=function(e,t){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}};return n.layoutPositions(this,e,i),this},t.exports=r},{"../../math":93,"../../util":108}],57:[function(e,t,n){"use strict";var r=e("../../../math"),i=e("../../../is"),o=e("../../../util"),a={arrowShapeWidth:.3,registerArrowShapes:function(){var e=this.arrowShapes={},t=this,n=function(e,t,n,r,i,o){var a=i.x-n/2-o,s=i.x+n/2+o,l=i.y-n/2-o,c=i.y+n/2+o;return a<=e&&e<=s&&l<=t&&t<=c},a=function(e,t,n,r,i){var o=e*Math.cos(r)-t*Math.sin(r),a=(e*Math.sin(r)+t*Math.cos(r))*n;return{x:o*n+i.x,y:a+i.y}},s=function(e,t,n,r){for(var i=[],o=0;o<e.length;o+=2){var s=e[o],l=e[o+1];i.push(a(s,l,t,n,r))}return i},l=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r.x,r.y)}return t},c=function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},u=function(a,u){i.string(u)&&(u=e[u]),e[a]=o.extend({name:a,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(e,t,n,i,o,a){var c=l(s(this.points,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,c)},roughCollide:n,draw:function(e,n,r,i){var o=s(this.points,n,r,i);t.arrowShapeImpl("polygon")(e,o)},spacing:function(e){return 0},gap:c},u)};u("none",{collide:o.falsify,roughCollide:o.falsify,draw:o.noop,spacing:o.zeroify,gap:o.zeroify}),u("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),u("arrow","triangle"),u("triangle-backcurve",{points:e.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(e,n,r,i){var o=s(this.points,n,r,i),l=this.controlPoint,c=a(l[0],l[1],n,r,i);t.arrowShapeImpl(this.name)(e,o,c)},gap:function(e){return.985*c(e)}}),u("triangle-tee",{points:[-.15,-.3,0,0,.15,-.3,-.15,-.3],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(e,t,n,i,o,a){var c=l(s(this.points,n+2*a,i,o)),u=l(s(this.pointsTee,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,c)||r.pointInsidePolygonPoints(e,t,u)},draw:function(e,n,r,i){var o=s(this.points,n,r,i),a=s(this.pointsTee,n,r,i);t.arrowShapeImpl(this.name)(e,o,a)}}),u("triangle-cross",{points:[-.15,-.3,0,0,.15,-.3,-.15,-.3],crossLinePoints:[-.24175,-.4,.24175,-.4],forceStroke:!0,matchEdgeWidth:!0,scaleCoord:function(e,t,n){return e+.012*n+.001*r.log2(t-28.95)},scaleCrossLineXCoord:function(e,t){return this.scaleCoord(.42,e,t)},scaleCrossLineYCoord:function(e,t){return this.scaleCoord(-.01,e,t)},collide:function(e,t,n,i,o,a){var c=l(s(this.points,n+2*a,i,o)),u=l(s(this.crossLinePoints,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,c)||r.inLineVicinity(e,t,u[0],u[1],u[2],u[3],a)},draw:function(e,n,r,i,o){var a=[this.crossLinePoints[0]+this.scaleCrossLineXCoord(n,o),this.crossLinePoints[1]-this.scaleCrossLineYCoord(n,o),this.crossLinePoints[2]-this.scaleCrossLineXCoord(n,o),this.crossLinePoints[3]-this.scaleCrossLineYCoord(n,o)],l=s(this.points,n,r,i),c=s(a,n,r,i);t.arrowShapeImpl(this.name)(e,l,c)}}),u("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(e){return.985*c(e)}}),u("circle",{radius:.15,collide:function(e,t,n,r,i,o){var a=i;return Math.pow(a.x-e,2)+Math.pow(a.y-t,2)<=Math.pow((n+2*o)*this.radius,2)},draw:function(e,n,r,i){t.arrowShapeImpl(this.name)(e,i.x,i.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),u("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(e){return 1},gap:function(e){return 1}}),u("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),u("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}})}};t.exports=a},{"../../../is":91,"../../../math":93,"../../../util":108}],58:[function(e,t,n){"use strict";var r=e("../../../../window"),i=e("../../../../math"),o=e("../../../../util"),a=(r=e("../../../../window"),{projectIntoViewport:function(e,t){var n=this.cy,r=this.findContainerClientCoords(),i=r[0],o=r[1],a=n.pan(),s=n.zoom();return[(e-i-a.x)/s,(t-o-a.y)/s]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var e=this.container,t=e.getBoundingClientRect(),n=r.getComputedStyle(e),i=function(e){return parseFloat(n.getPropertyValue(e))},o={left:i("padding-left")+i("border-left-width"),right:i("padding-right")+i("border-right-width"),top:i("padding-top")+i("border-top-width"),bottom:i("padding-bottom")+i("border-bottom-width")};return this.containerBB=[t.left+o.left,t.top+o.top,t.right-t.left-o.left-o.right,t.bottom-t.top-o.top-o.bottom]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,n,r){return this.findNearestElements(e,t,n,r)[0]},findNearestElements:function(e,t,n,r){function a(e,t){if(e.isNode()){if(p)return;p=e,v.push(e)}if(e.isEdge()&&(null==t||t<E))if(d){if(d.pstyle("z-index").value===e.pstyle("z-index").value)for(var n=0;n<v.length;n++)if(v[n].isEdge()){v[n]=e,d=e,E=null!=t?t:E;break}}else v.push(e),d=e,E=null!=t?t:E}function s(n){var r=n.outerWidth()+2*C,i=n.outerHeight()+2*C,o=r/2,s=i/2,l=n.position();if(l.x-o<=e&&e<=l.x+o&&l.y-s<=t&&t<=l.y+s&&h.nodeShapes[f.getNodeShape(n)].checkPoint(e,t,0,r,i,l.x,l.y))return a(n,0),!0}function l(n){var r,o=n._private,l=o.rscratch,c=n.pstyle("width").pfValue,u=n.pstyle("arrow-scale").value,d=c/2+b,p=d*d,g=2*d,m=o.source,C=o.target;if("segments"===l.edgeType||"straight"===l.edgeType||"haystack"===l.edgeType){for(var x=l.allpts,E=0;E+3<x.length;E+=2)if(i.inLineVicinity(e,t,x[E],x[E+1],x[E+2],x[E+3],g)&&p>(r=i.sqdistToFiniteLine(e,t,x[E],x[E+1],x[E+2],x[E+3])))return a(n,r),!0}else if("bezier"===l.edgeType||"multibezier"===l.edgeType||"self"===l.edgeType||"compound"===l.edgeType)for(x=l.allpts,E=0;E+5<l.allpts.length;E+=4)if(i.inBezierVicinity(e,t,x[E],x[E+1],x[E+2],x[E+3],x[E+4],x[E+5],g)&&p>(r=i.sqdistToQuadraticBezier(e,t,x[E],x[E+1],x[E+2],x[E+3],x[E+4],x[E+5])))return a(n,r),!0;m=m||o.source,C=C||o.target;var S=f.getArrowWidth(c,u),w=[{name:"source",x:l.arrowStartX,y:l.arrowStartY,angle:l.srcArrowAngle},{name:"target",x:l.arrowEndX,y:l.arrowEndY,angle:l.tgtArrowAngle},{name:"mid-source",x:l.midX,y:l.midY,angle:l.midsrcArrowAngle},{name:"mid-target",x:l.midX,y:l.midY,angle:l.midtgtArrowAngle}];for(E=0;E<w.length;E++){var V=w[E],R=h.arrowShapes[n.pstyle(V.name+"-arrow-shape").value];if(R.roughCollide(e,t,S,V.angle,{x:V.x,y:V.y},b)&&R.collide(e,t,S,V.angle,{x:V.x,y:V.y},b))return a(n),!0}y&&v.length>0&&(s(m),s(C))}function c(e,t,n){return o.getPrefixedProperty(e,t,n)}function u(n,r){var o,s=n._private,l=x;o=r?r+"-":"";var u=n.pstyle(o+"label").value;if("yes"===n.pstyle("text-events").strValue&&u){var d=s.rstyle,p=n.pstyle("text-border-width").pfValue,f=n.pstyle("text-background-padding").pfValue,h=c(d,"labelWidth",r)+p+2*l+2*f,g=c(d,"labelHeight",r)+p+2*l+2*f,v=c(d,"labelX",r),m=c(d,"labelY",r),y=c(s.rscratch,"labelAngle",r),b=v-h/2,C=v+h/2,E=m-g/2,S=m+g/2;if(y){var w=Math.cos(y),V=Math.sin(y),R=function(e,t){return{x:(e-=v)*w-(t-=m)*V+v,y:e*V+t*w+m}},O=R(b,E),A=R(b,S),k=R(C,E),T=R(C,S),N=[O.x,O.y,k.x,k.y,T.x,T.y,A.x,A.y];if(i.pointInsidePolygonPoints(e,t,N))return a(n),!0}else{var D={w:h,h:g,x1:b,x2:C,y1:E,y2:S};if(i.inBoundingBox(D,e,t))return a(n),!0}}}var d,p,f=this,h=this,g=h.getCachedZSortedEles(),v=[],m=h.cy.zoom(),y=h.cy.hasCompoundNodes(),b=(r?24:8)/m,C=(r?8:2)/m,x=(r?8:2)/m,E=1/0;n&&(g=g.interactive);for(var S=g.length-1;S>=0;S--){var w=g[S];w.isNode()?s(w)||u(w):l(w)||u(w)||u(w,"source")||u(w,"target")}return v},getAllInBox:function(e,t,n,r){var o=this.getCachedZSortedEles().interactive,a=[],s=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),u=Math.max(t,r);e=s,n=l,t=c,r=u;for(var d=i.makeBoundingBox({x1:e,y1:t,x2:n,y2:r}),p=0;p<o.length;p++){var f=o[p];if(f.isNode()){var h=f,g=h.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});i.boundingBoxesIntersect(d,g)&&!i.boundingBoxInBoundingBox(g,d)&&a.push(h)}else{var v=f,m=v._private,y=m.rscratch;if(null!=y.startX&&null!=y.startY&&!i.inBoundingBox(d,y.startX,y.startY))continue;if(null!=y.endX&&null!=y.endY&&!i.inBoundingBox(d,y.endX,y.endY))continue;if("bezier"===y.edgeType||"multibezier"===y.edgeType||"self"===y.edgeType||"compound"===y.edgeType||"segments"===y.edgeType||"haystack"===y.edgeType){for(var b=m.rstyle.bezierPts||m.rstyle.linePts||m.rstyle.haystackPts,C=!0,x=0;x<b.length;x++)if(!i.pointInBoundingBox(d,b[x])){C=!1;break}C&&a.push(v)}else"haystack"!==y.edgeType&&"straight"!==y.edgeType||a.push(v)}}return a}});t.exports=a},{"../../../../math":93,"../../../../util":108,"../../../../window":116}],59:[function(e,t,n){"use strict";var r=e("../../../../math"),i={calculateArrowAngles:function(e){var t,n,i,o,a,s,l=e._private.rscratch,c="haystack"===l.edgeType,u="bezier"===l.edgeType,d="multibezier"===l.edgeType,p="segments"===l.edgeType,f="compound"===l.edgeType,h="self"===l.edgeType;if(c?(i=l.haystackPts[0],o=l.haystackPts[1],a=l.haystackPts[2],s=l.haystackPts[3]):(i=l.arrowStartX,o=l.arrowStartY,a=l.arrowEndX,s=l.arrowEndY),v=l.midX,m=l.midY,p)t=i-l.segpts[0],n=o-l.segpts[1];else if(d||f||h||u){var g=l.allpts;t=i-r.qbezierAt(g[0],g[2],g[4],.1),n=o-r.qbezierAt(g[1],g[3],g[5],.1)}else t=i-v,n=o-m;l.srcArrowAngle=r.getAngleFromDisp(t,n);var v=l.midX,m=l.midY;if(c&&(v=(i+a)/2,m=(o+s)/2),t=a-i,n=s-o,p)if((g=l.allpts).length/2%2==0){var y=(b=g.length/2)-2;t=g[b]-g[y],n=g[b+1]-g[y+1]}else{y=(b=g.length/2-1)-2;var b,C=b+2;t=g[b]-g[y],n=g[b+1]-g[y+1]}else if(d||f||h){var x,E,S,w,g=l.allpts;if(l.ctrlpts.length/2%2==0){var V=2+(R=2+(O=g.length/2-1));x=r.qbezierAt(g[O],g[R],g[V],0),E=r.qbezierAt(g[O+1],g[R+1],g[V+1],0),S=r.qbezierAt(g[O],g[R],g[V],1e-4),w=r.qbezierAt(g[O+1],g[R+1],g[V+1],1e-4)}else{var R,O=(R=g.length/2-1)-2;V=R+2,x=r.qbezierAt(g[O],g[R],g[V],.4999),E=r.qbezierAt(g[O+1],g[R+1],g[V+1],.4999),S=r.qbezierAt(g[O],g[R],g[V],.5),w=r.qbezierAt(g[O+1],g[R+1],g[V+1],.5)}t=S-x,n=w-E}if(l.midtgtArrowAngle=r.getAngleFromDisp(t,n),l.midDispX=t,l.midDispY=n,t*=-1,n*=-1,p&&((g=l.allpts).length/2%2==0||(t=-(g[C=2+(b=g.length/2-1)]-g[b]),n=-(g[C+1]-g[b+1]))),l.midsrcArrowAngle=r.getAngleFromDisp(t,n),p)t=a-l.segpts[l.segpts.length-2],n=s-l.segpts[l.segpts.length-1];else if(d||f||h||u){var A=(g=l.allpts).length;t=a-r.qbezierAt(g[A-6],g[A-4],g[A-2],.9),n=s-r.qbezierAt(g[A-5],g[A-3],g[A-1],.9)}else t=a-v,n=s-m;l.tgtArrowAngle=r.getAngleFromDisp(t,n)}};i.getArrowWidth=i.getArrowHeight=function(e,t){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[e+", "+t];return r||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r,r)},t.exports=i},{"../../../../math":93}],60:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o={findEdgeControlPoints:function(e){if(e&&0!==e.length){for(var t,n=this,o=n.cy.hasCompoundNodes(),a={},s=[],l=[],c=0;c<e.length;c++){var u=(Et=(xt=e[c])._private).data,d="unbundled-bezier"===(N=xt.pstyle("curve-style").value)||"segments"===N;if("none"!==xt.pstyle("display").value)if("haystack"!==N){var p=u.source,f=u.target;t=p>f?f+"$-$"+p:p+"$-$"+f,d&&(t="unbundled$-$"+u.id),null==a[t]&&(a[t]=[],s.push(t)),a[t].push(xt),d&&(a[t].hasUnbundled=!0)}else l.push(xt)}for(var h,g,v,m,y=0;y<s.length;y++){var b=a[t=s[y]];if(b.sort((function(e,t){return e.poolIndex()-t.poolIndex()})),Rt=b[0]._private.source,Ot=b[0]._private.target,!b.hasUnbundled&&Rt.id()>Ot.id()){var C=Rt;Rt=Ot,Ot=C}Rt._private,Ot._private,At=Rt.position(),kt=Ot.position(),Tt=Rt.outerWidth(),Dt=Rt.outerHeight(),Nt=Ot.outerWidth(),Pt=Ot.outerHeight(),h=n.nodeShapes[this.getNodeShape(Rt)],g=n.nodeShapes[this.getNodeShape(Ot)],m=!1;var x={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0},E=At.x,S=At.y,w=Tt,V=Dt,R=kt.x,O=kt.y,A=Nt,k=Pt,T=b.length;for(c=0;c<b.length;c++){var N,D=(wt=(xt=b[c])._private.rscratch).lastEdgeIndex,P=c,_=wt.lastNumEdges,B=(d="unbundled-bezier"===(N=xt.pstyle("curve-style").value)||"segments"===N,xt.pstyle("control-point-distances")),M=xt.pstyle("loop-direction").pfValue,I=xt.pstyle("loop-sweep").pfValue,F=xt.pstyle("control-point-weights"),L=B&&F?Math.min(B.value.length,F.value.length):1,W=xt.pstyle("control-point-step-size").pfValue,U=B?B.pfValue[0]:void 0,G=F.value[0],z=xt.pstyle("edge-distances").value,Q=xt.pstyle("segment-weights"),j=xt.pstyle("segment-distances"),H=Math.min(Q.pfValue.length,j.pfValue.length),Y=wt.lastSrcCtlPtX,J=wt.lastSrcCtlPtY,X=wt.lastSrcCtlPtW,Z=wt.lastSrcCtlPtH,q=wt.lastTgtCtlPtX,K=wt.lastTgtCtlPtY,$=wt.lastTgtCtlPtW,ee=wt.lastTgtCtlPtH,te=wt.lastCurveStyle,ne=N,re=wt.lastCtrlptDists,ie=B?B.strValue:null,oe=wt.lastCtrlptWs,ae=F.strValue,se=wt.lastSegmentWs,le=Q.strValue,ce=wt.lastSegmentDs,ue=j.strValue,de=wt.lastStepSize,pe=W,fe=wt.lastLoopDir,he=M,ge=wt.lastLoopSwp,ve=I,me=wt.lastEdgeDistances,ye=z;if(wt.badBezier=!!m,Y!==E||J!==S||X!==w||Z!==V||q!==R||K!==O||$!==A||ee!==k||te!==ne||re!==ie||oe!==ae||se!==le||ce!==ue||de!==pe||fe!==he||ge!==ve||me!==ye||!(D===P&&_===T||d)){if(wt.lastSrcCtlPtX=E,wt.lastSrcCtlPtY=S,wt.lastSrcCtlPtW=w,wt.lastSrcCtlPtH=V,wt.lastTgtCtlPtX=R,wt.lastTgtCtlPtY=O,wt.lastTgtCtlPtW=A,wt.lastTgtCtlPtH=k,wt.lastEdgeIndex=P,wt.lastNumEdges=T,wt.lastCurveStyle=ne,wt.lastCtrlptDists=ie,wt.lastCtrlptWs=ae,wt.lastSegmentDs=ue,wt.lastSegmentWs=le,wt.lastStepSize=pe,wt.lastLoopDir=he,wt.lastLoopSwp=ve,wt.lastEdgeDistances=ye,!b.calculatedIntersection&&(b.length>1&&Rt!==Ot||b.hasUnbundled)){b.calculatedIntersection=!0;var be=h.intersectLine(At.x,At.y,Tt,Dt,kt.x,kt.y,0),Ce=g.intersectLine(kt.x,kt.y,Nt,Pt,At.x,At.y,0),xe={x1:be[0],x2:Ce[0],y1:be[1],y2:Ce[1]},Ee={x1:At.x,x2:kt.x,y1:At.y,y2:kt.y},Se=Ce[1]-be[1],we=Ce[0]-be[0],Ve=Math.sqrt(we*we+Se*Se),Re={x:we,y:Se},Oe={x:Re.x/Ve,y:Re.y/Ve};v={x:-Oe.y,y:Oe.x},g.checkPoint(be[0],be[1],0,Nt,Pt,kt.x,kt.y)&&h.checkPoint(Ce[0],Ce[1],0,Tt,Dt,At.x,At.y)&&(v={},m=!0)}if(wt.srcIntn=be,wt.tgtIntn=Ce,Rt===Ot){wt.edgeType="self";var Ae=c,ke=W;d&&(Ae=0,ke=U);var Te=M-Math.PI/2,Ne=Te-I/2,De=Te+I/2,Pe=String(M+"_"+I);Ae=void 0===x[Pe]?x[Pe]=0:++x[Pe],wt.ctrlpts=[At.x+1.4*Math.cos(Ne)*ke*(Ae/3+1),At.y+1.4*Math.sin(Ne)*ke*(Ae/3+1),At.x+1.4*Math.cos(De)*ke*(Ae/3+1),At.y+1.4*Math.sin(De)*ke*(Ae/3+1)]}else if(o&&(Rt.isParent()||Rt.isChild()||Ot.isParent()||Ot.isChild())&&(Rt.parents().anySame(Ot)||Ot.parents().anySame(Rt))){wt.edgeType="compound",wt.badBezier=!1,Ae=c,ke=W,d&&(Ae=0,ke=U);var _e=50,Be={x:At.x-Tt/2,y:At.y-Dt/2},Me={x:kt.x-Nt/2,y:kt.y-Pt/2},Ie={x:Math.min(Be.x,Me.x),y:Math.min(Be.y,Me.y)},Fe=.5,Le=Math.max(Fe,Math.log(.01*Tt)),We=Math.max(Fe,Math.log(.01*Nt));wt.ctrlpts=[Ie.x,Ie.y-(1+Math.pow(_e,1.12)/100)*ke*(Ae/3+1)*Le,Ie.x-(1+Math.pow(_e,1.12)/100)*ke*(Ae/3+1)*We,Ie.y]}else if("segments"===N){wt.edgeType="segments",wt.segpts=[];for(var Ue=0;Ue<H;Ue++){var Ge=Q.pfValue[Ue],ze=j.pfValue[Ue],Qe=1-Ge,je=Ge,He={x:(Ke="node-position"===z?Ee:xe).x1*Qe+Ke.x2*je,y:Ke.y1*Qe+Ke.y2*je};wt.segpts.push(He.x+v.x*ze,He.y+v.y*ze)}}else if(b.length%2!=1||c!==Math.floor(b.length/2)||d){var Ye=d;wt.edgeType=Ye?"multibezier":"bezier",wt.ctrlpts=[];for(var Je=0;Je<L;Je++){var Xe,Ze=(.5-b.length/2+c)*W,qe=r.signum(Ze);Ye&&(U=B?B.pfValue[Je]:W,G=F.value[Je]);var Ke,$e=void 0!==(Xe=d?U:void 0!==U?qe*U:void 0)?Xe:Ze;Qe=1-G,je=G,He={x:(Ke="node-position"===z?Ee:xe).x1*Qe+Ke.x2*je,y:Ke.y1*Qe+Ke.y2*je},wt.ctrlpts.push(He.x+v.x*$e,He.y+v.y*$e)}}else wt.edgeType="straight";this.findEndpoints(xt);var et=!i.number(wt.startX)||!i.number(wt.startY),tt=!i.number(wt.arrowStartX)||!i.number(wt.arrowStartY),nt=!i.number(wt.endX)||!i.number(wt.endY),rt=!i.number(wt.arrowEndX)||!i.number(wt.arrowEndY),it=this.getArrowWidth(xt.pstyle("width").pfValue,xt.pstyle("arrow-scale").value)*this.arrowShapeWidth*3;if("bezier"===wt.edgeType){var ot=r.dist({x:wt.ctrlpts[0],y:wt.ctrlpts[1]},{x:wt.startX,y:wt.startY}),at=ot<it,st=r.dist({x:wt.ctrlpts[0],y:wt.ctrlpts[1]},{x:wt.endX,y:wt.endY}),lt=st<it,ct=!1;if(et||tt||at){ct=!0;var ut={x:wt.ctrlpts[0]-At.x,y:wt.ctrlpts[1]-At.y},dt=Math.sqrt(ut.x*ut.x+ut.y*ut.y),pt={x:ut.x/dt,y:ut.y/dt},ft=Math.max(Tt,Dt),ht={x:wt.ctrlpts[0]+2*pt.x*ft,y:wt.ctrlpts[1]+2*pt.y*ft},gt=h.intersectLine(At.x,At.y,Tt,Dt,ht.x,ht.y,0);at?(wt.ctrlpts[0]=wt.ctrlpts[0]+pt.x*(it-ot),wt.ctrlpts[1]=wt.ctrlpts[1]+pt.y*(it-ot)):(wt.ctrlpts[0]=gt[0]+pt.x*it,wt.ctrlpts[1]=gt[1]+pt.y*it)}if(nt||rt||lt){ct=!0,ut={x:wt.ctrlpts[0]-kt.x,y:wt.ctrlpts[1]-kt.y},dt=Math.sqrt(ut.x*ut.x+ut.y*ut.y),pt={x:ut.x/dt,y:ut.y/dt},ft=Math.max(Tt,Dt),ht={x:wt.ctrlpts[0]+2*pt.x*ft,y:wt.ctrlpts[1]+2*pt.y*ft};var vt=g.intersectLine(kt.x,kt.y,Nt,Pt,ht.x,ht.y,0);lt?(wt.ctrlpts[0]=wt.ctrlpts[0]+pt.x*(it-st),wt.ctrlpts[1]=wt.ctrlpts[1]+pt.y*(it-st)):(wt.ctrlpts[0]=vt[0]+pt.x*it,wt.ctrlpts[1]=vt[1]+pt.y*it)}ct&&this.findEndpoints(xt)}if("multibezier"===wt.edgeType||"bezier"===wt.edgeType||"self"===wt.edgeType||"compound"===wt.edgeType){for(wt.allpts=[],wt.allpts.push(wt.startX,wt.startY),Je=0;Je+1<wt.ctrlpts.length;Je+=2)wt.allpts.push(wt.ctrlpts[Je],wt.ctrlpts[Je+1]),Je+3<wt.ctrlpts.length&&wt.allpts.push((wt.ctrlpts[Je]+wt.ctrlpts[Je+2])/2,(wt.ctrlpts[Je+1]+wt.ctrlpts[Je+3])/2);var mt,yt;wt.allpts.push(wt.endX,wt.endY),wt.ctrlpts.length/2%2==0?(mt=wt.allpts.length/2-1,wt.midX=wt.allpts[mt],wt.midY=wt.allpts[mt+1]):(mt=wt.allpts.length/2-3,yt=.5,wt.midX=r.qbezierAt(wt.allpts[mt],wt.allpts[mt+2],wt.allpts[mt+4],yt),wt.midY=r.qbezierAt(wt.allpts[mt+1],wt.allpts[mt+3],wt.allpts[mt+5],yt))}else if("straight"===wt.edgeType)wt.allpts=[wt.startX,wt.startY,wt.endX,wt.endY],wt.midX=(wt.startX+wt.endX+wt.arrowStartX+wt.arrowEndX)/4,wt.midY=(wt.startY+wt.endY+wt.arrowStartY+wt.arrowEndY)/4;else if("segments"===wt.edgeType)if(wt.allpts=[],wt.allpts.push(wt.startX,wt.startY),wt.allpts.push.apply(wt.allpts,wt.segpts),wt.allpts.push(wt.endX,wt.endY),wt.segpts.length%4==0){var bt=wt.segpts.length/2,Ct=bt-2;wt.midX=(wt.segpts[Ct]+wt.segpts[bt])/2,wt.midY=(wt.segpts[Ct+1]+wt.segpts[bt+1])/2}else Ct=wt.segpts.length/2-1,wt.midX=wt.segpts[Ct],wt.midY=wt.segpts[Ct+1];this.storeEdgeProjections(xt),this.calculateArrowAngles(xt),this.recalculateEdgeLabelProjections(xt),this.calculateLabelAngles(xt)}}}for(c=0;c<l.length;c++){var xt,Et,St=(Et=(xt=l[c])._private).rscratch,wt=St;if(!St.haystack){var Vt=2*Math.random()*Math.PI;St.source={x:Math.cos(Vt),y:Math.sin(Vt)},Vt=2*Math.random()*Math.PI,St.target={x:Math.cos(Vt),y:Math.sin(Vt)}}var Rt=Et.source,Ot=Et.target,At=Rt.position(),kt=Ot.position(),Tt=Rt.width(),Nt=Ot.width(),Dt=Rt.height(),Pt=Ot.height(),_t=(ft=xt.pstyle("haystack-radius").value)/2;wt.haystackPts=wt.allpts=[wt.source.x*Tt*_t+At.x,wt.source.y*Dt*_t+At.y,wt.target.x*Nt*_t+kt.x,wt.target.y*Pt*_t+kt.y],wt.midX=(wt.allpts[0]+wt.allpts[2])/2,wt.midY=(wt.allpts[1]+wt.allpts[3])/2,St.edgeType="haystack",St.haystack=!0,this.storeEdgeProjections(xt),this.calculateArrowAngles(xt),this.recalculateEdgeLabelProjections(xt),this.calculateLabelAngles(xt)}}}};t.exports=o},{"../../../../is":91,"../../../../math":93}],61:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o={manualEndptToPx:function(e,t){var n=this,r=e.position(),i=e.outerWidth(),o=e.outerHeight();if(2===t.value.length){var a=[t.pfValue[0],t.pfValue[1]];return"%"===t.units[0]&&(a[0]=a[0]*i),"%"===t.units[1]&&(a[1]=a[1]*o),a[0]+=r.x,a[1]+=r.y,a}var s=t.pfValue[0];s=-Math.PI/2+s;var l=2*Math.max(i,o);return a=[r.x+Math.cos(s)*l,r.y+Math.sin(s)*l],n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x,r.y,i,o,a[0],a[1],0)},findEndpoints:function(e){var t,n,o,a,s,l=this,c=e.source()[0],u=e.target()[0],d=c.position(),p=u.position(),f=e.pstyle("target-arrow-shape").value,h=e.pstyle("source-arrow-shape").value,g=e.pstyle("target-distance-from-node").pfValue,v=e.pstyle("source-distance-from-node").pfValue,m=e._private.rscratch,y=m.edgeType,b="bezier"===y||"multibezier"===y||"self"===y||"compound"===y,C="bezier"!==y,x="straight"===y||"segments"===y,E="segments"===y,S=b||C||x,w=e.pstyle("source-endpoint"),V=e.pstyle("target-endpoint");if(m.srcManEndpt=w,m.tgtManEndpt=V,b){var R=[m.ctrlpts[0],m.ctrlpts[1]];n=C?[m.ctrlpts[m.ctrlpts.length-2],m.ctrlpts[m.ctrlpts.length-1]]:R,o=R}else if(x){var O=E?m.segpts.slice(0,2):[p.x,p.y];n=E?m.segpts.slice(m.segpts.length-2):[d.x,d.y],o=O}"inside-to-node"===V.value?t=[p.x,p.y]:V.units?t=this.manualEndptToPx(u,V):"outside-to-line"===V.value?t=m.tgtIntn:("outside-to-node"===V.value?a=n:"outside-to-line"===V.value&&(a=[d.x,d.y]),t=l.nodeShapes[this.getNodeShape(u)].intersectLine(p.x,p.y,u.outerWidth(),u.outerHeight(),a[0],a[1],0));var A=r.shortenIntersection(t,n,l.arrowShapes[f].spacing(e)+g),k=r.shortenIntersection(t,n,l.arrowShapes[f].gap(e)+g);m.endX=k[0],m.endY=k[1],m.arrowEndX=A[0],m.arrowEndY=A[1],"inside-to-node"===w.value?t=[d.x,d.y]:w.units?t=this.manualEndptToPx(c,w):"outside-to-line"===w.value?t=m.srcIntn:("outside-to-node"===w.value?s=o:"outside-to-line"===w.value&&(s=[p.x,p.y]),t=l.nodeShapes[this.getNodeShape(c)].intersectLine(d.x,d.y,c.outerWidth(),c.outerHeight(),s[0],s[1],0));var T=r.shortenIntersection(t,o,l.arrowShapes[h].spacing(e)+v),N=r.shortenIntersection(t,o,l.arrowShapes[h].gap(e)+v);m.startX=N[0],m.startY=N[1],m.arrowStartX=T[0],m.arrowStartY=T[1],S&&(i.number(m.startX)&&i.number(m.startY)&&i.number(m.endX)&&i.number(m.endY)?m.badLine=!1:m.badLine=!0)}};t.exports=o},{"../../../../is":91,"../../../../math":93}],62:[function(e,t,n){"use strict";function r(e,t,n){for(var r=function(e,t,n,r){return i.qbezierAt(e,t,n,r)},o=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var s=e.bezierProjPcts[a];o.push({x:r(n[0],n[2],n[4],s),y:r(n[1],n[3],n[5],s)})}}var i=e("../../../../math"),o={storeEdgeProjections:function(e){var t=e._private,n=t.rscratch,i=n.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===i||"bezier"===i||"self"===i||"compound"===i)for(var o=(t.rstyle.bezierPts=[],0);o+5<n.allpts.length;o+=4)r(this,e,n.allpts.slice(o,o+6));else if("segments"===i){var a=t.rstyle.linePts=[];for(o=0;o+1<n.allpts.length;o+=2)a.push({x:n.allpts[o],y:n.allpts[o+1]})}else if("haystack"===i){var s=n.haystackPts;t.rstyle.haystackPts=[{x:s[0],y:s[1]},{x:s[2],y:s[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},recalculateEdgeProjections:function(e){this.findEdgeControlPoints(e)}};t.exports=o},{"../../../../math":93}],63:[function(e,t,n){"use strict";var r=e("../../../../util"),i={};[e("./coords"),e("./edge-arrows"),e("./edge-control-points"),e("./edge-endpoints"),e("./edge-projection"),e("./labels"),e("./nodes"),e("./rendered-style"),e("./z-ordering")].forEach((function(e){r.extend(i,e)})),t.exports=i},{"../../../../util":108,"./coords":58,"./edge-arrows":59,"./edge-control-points":60,"./edge-endpoints":61,"./edge-projection":62,"./labels":64,"./nodes":65,"./rendered-style":66,"./z-ordering":67}],64:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o=e("../../../../util"),a={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!i.emptyString(t)){var n,r,o=e._private,a=e.width(),s=e.height(),l=e.padding(),c=e.position(),u=e.pstyle("text-halign").strValue,d=e.pstyle("text-valign").strValue,p=o.rscratch,f=o.rstyle;switch(u){case"left":n=c.x-a/2-l;break;case"right":n=c.x+a/2+l;break;default:n=c.x}switch(d){case"top":r=c.y-s/2-l;break;case"bottom":r=c.y+s/2+l;break;default:r=c.y}p.labelX=n,p.labelY=r,f.labelX=n,f.labelY=r,this.applyLabelDimensions(e)}},recalculateEdgeLabelProjections:function(e){var t,n=e._private,i=n.rscratch,a=this,s={mid:e.pstyle("label").strValue,source:e.pstyle("source-label").strValue,target:e.pstyle("target-label").strValue};if(s.mid||s.source||s.target){t={x:i.midX,y:i.midY};var l=function(e,t,r){o.setPrefixedProperty(n.rscratch,e,t,r),o.setPrefixedProperty(n.rstyle,e,t,r)};l("labelX",null,t.x),l("labelY",null,t.y);var c=function(){function e(e,t,n,i,o){var a=r.dist(t,n),s=e.segments[e.segments.length-1],l={p0:t,p1:n,t0:i,t1:o,startDist:s?s.startDist+s.length:0,length:a};e.segments.push(l),e.length+=a}if(c.cache)return c.cache;for(var t=[],o=0;o+5<i.allpts.length;o+=4){var s={x:i.allpts[o],y:i.allpts[o+1]},l={x:i.allpts[o+2],y:i.allpts[o+3]},u={x:i.allpts[o+4],y:i.allpts[o+5]};t.push({p0:s,p1:l,p2:u,startDist:0,length:0,segments:[]})}var d=n.rstyle.bezierPts,p=a.bezierProjPcts.length;for(o=0;o<t.length;o++){var f=t[o],h=t[o-1];h&&(f.startDist=h.startDist+h.length),e(f,f.p0,d[o*p],0,a.bezierProjPcts[0]);for(var g=0;g<p-1;g++)e(f,d[o*p+g],d[o*p+g+1],a.bezierProjPcts[g],a.bezierProjPcts[g+1]);e(f,d[o*p+p-1],f.p2,a.bezierProjPcts[p-1],1)}return c.cache=t},u=function(n){var o,a="source"===n;if(s[n]){var u=e.pstyle(n+"-text-offset").pfValue,d=function(e,t){var n=t.x-e.x,r=t.y-e.y;return Math.atan(r/n)},p=function(e,t,n,i){var o=r.bound(0,i-.001,1),a=r.bound(0,i+.001,1),s=r.qbezierPtAt(e,t,n,o),l=r.qbezierPtAt(e,t,n,a);return d(s,l)};switch(i.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var f,h=c(),g=0,v=0,m=0;m<h.length;m++){for(var y=h[a?m:h.length-1-m],b=0;b<y.segments.length;b++){var C=y.segments[a?b:y.segments.length-1-b],x=m===h.length-1&&b===y.segments.length-1;if(g=v,(v+=C.length)>=u||x){f={cp:y,segment:C};break}}if(f)break}y=f.cp;var E=(u-g)/(C=f.segment).length,S=C.t1-C.t0,w=a?C.t0+S*E:C.t1-S*E;w=r.bound(0,w,1),t=r.qbezierPtAt(y.p0,y.p1,y.p2,w),o=p(y.p0,y.p1,y.p2,w,t);break;case"straight":case"segments":case"haystack":var V,R,O,A,k=0,T=i.allpts.length;for(m=0;m+3<T&&(a?(O={x:i.allpts[m],y:i.allpts[m+1]},A={x:i.allpts[m+2],y:i.allpts[m+3]}):(O={x:i.allpts[T-2-m],y:i.allpts[T-1-m]},A={x:i.allpts[T-4-m],y:i.allpts[T-3-m]}),R=k,!((k+=V=r.dist(O,A))>=u));m+=2);w=(u-R)/V,w=r.bound(0,w,1),t=r.lineAt(O,A,w),o=d(O,A)}l("labelX",n,t.x),l("labelY",n,t.y),l("labelAutoAngle",n,o)}};u("source"),u("target"),this.applyLabelDimensions(e)}},applyLabelDimensions:function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},applyPrefixedLabelDimensions:function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r);o.setPrefixedProperty(n.rstyle,"labelWidth",t,i.width),o.setPrefixedProperty(n.rscratch,"labelWidth",t,i.width),o.setPrefixedProperty(n.rstyle,"labelHeight",t,i.height),o.setPrefixedProperty(n.rscratch,"labelHeight",t,i.height)},getLabelText:function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,s=function(e,r){return r?(o.setPrefixedProperty(n.rscratch,e,t,r),r):o.getPrefixedProperty(n.rscratch,e,t)};"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var l=e.pstyle("text-wrap").value;if("wrap"===l){var c=s("labelKey");if(c&&s("labelWrapKey")===c)return s("labelWrapCachedText");for(var u=i.split("\n"),d=e.pstyle("text-max-width").pfValue,p=[],f=0;f<u.length;f++){var h=u[f];if(this.calculateLabelDimensions(e,h,"line="+h).width>d){for(var g=h.split(/\s+/),v="",m=0;m<g.length;m++){var y=g[m],b=0===v.length?y:v+" "+y;this.calculateLabelDimensions(e,b,"testLine="+b).width<=d?v+=y+" ":(p.push(v),v=y+" ")}v.match(/^\s+$/)||p.push(v)}else p.push(h)}s("labelWrapCachedLines",p),i=s("labelWrapCachedText",p.join("\n")),s("labelWrapKey",c)}else if("ellipsis"===l){d=e.pstyle("text-max-width").pfValue;for(var C="",x="…",E=!1,S=0;S<i.length&&!(this.calculateLabelDimensions(e,C+i[S]+x).width>d);S++)C+=i[S],S===i.length-1&&(E=!0);return E||(C+=x),C}return i},calculateLabelDimensions:function(e,t,n){var r=this,i=e._private.labelStyleKey+"$@$"+t;n&&(i+="$@$"+n);var o=r.labelDimCache||(r.labelDimCache={});if(o[i])return o[i];var a=1,s=e.pstyle("font-style").strValue,l=a*e.pstyle("font-size").pfValue+"px",c=e.pstyle("font-family").strValue,u=e.pstyle("font-weight").strValue,d=this.labelCalcDiv;d||(d=this.labelCalcDiv=document.createElement("div"),document.body.appendChild(d));var p=d.style;return p.fontFamily=c,p.fontStyle=s,p.fontSize=l,p.fontWeight=u,p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none",p.padding="0",p.lineHeight="1","wrap"===e.pstyle("text-wrap").value?p.whiteSpace="pre":p.whiteSpace="normal",d.textContent=t,o[i]={width:Math.ceil(d.clientWidth/a),height:Math.ceil(d.clientHeight/a)},o[i]},calculateLabelAngles:function(e){var t=e._private.rscratch,n=e.isEdge(),r=e.pstyle("text-rotation"),i=r.strValue;"none"===i?t.labelAngle=t.sourceLabelAngle=t.targetLabelAngle=0:n&&"autorotate"===i?(t.labelAngle=Math.atan(t.midDispY/t.midDispX),t.sourceLabelAngle=t.sourceLabelAutoAngle,t.targetLabelAngle=t.targetLabelAutoAngle):t.labelAngle=t.sourceLabelAngle=t.targetLabelAngle="autorotate"===i?0:r.pfValue}};t.exports=a},{"../../../../is":91,"../../../../math":93,"../../../../util":108}],65:[function(e,t,n){"use strict";var r={getNodeShape:function(e){var t=this,n=e.pstyle("shape").value;if(e.isParent())return"rectangle"===n||"roundrectangle"===n||"cutrectangle"===n?n:"rectangle";if("polygon"===n){var r=e.pstyle("shape-polygon-points").value;return t.nodeShapes.makePolygon(r).name}return n}};t.exports=r},{}],66:[function(e,t,n){"use strict";var r={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e,n,r){if(t.merge(e),!0===r||void 0===r)for(var i=0;i<e.length;i++){var o=e[i]._private,a=o.rstyle;a.clean=!1,o.bbCache=null;var s=a.dirtyEvents=a.dirtyEvents||{length:0};s[n.type]||(s[n.type]=!0,s.length++)}};n.binder(e).on("position.* style.* free.* bounds.*","node",(function(e){var t=e.target;r(t,e),r(t.connectedEdges(),e)})).on("add.*","node",(function(e){var t=e.target;r(t,e)})).on("background.*","node",(function(e){var t=e.target;r(t,e,!1)})).on("add.* style.*","edge",(function(e){var t=e.target;r(t,e),r(t.parallelEdges(),e)})).on("remove.*","edge",(function(e){for(var t=e.target.parallelEdges(),n=0;n<t.length;n++){var i=t[n];i.removed()||r(i,e)}})).on("dirty.*","node",(function(e){var t=e.target;r(t,e)}));var i=function(r){if(r){var i=n.onUpdateEleCalcsFns;if(i)for(var o=0;o<i.length;o++)(0,i[o])(r,t);for(n.recalculateRenderedStyle(t,!1),o=0;o<t.length;o++)t[o]._private.rstyle.dirtyEvents=null;t=e.collection()}};n.beforeRender(i,n.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var n=[],r=[];if(!this.destroyed){void 0===t&&(t=!0);for(var i=0;i<e.length;i++){var o=(l=(s=e[i])._private).rstyle;t&&o.clean||s.removed()||"none"!==s.pstyle("display").value&&("nodes"===l.group?r.push(s):n.push(s),o.clean=!0)}for(i=0;i<r.length;i++){o=(l=(s=r[i])._private).rstyle;var a=s.position();this.recalculateNodeLabelProjection(s),o.nodeX=a.x,o.nodeY=a.y,o.nodeW=s.pstyle("width").pfValue,o.nodeH=s.pstyle("height").pfValue}for(this.recalculateEdgeProjections(n),i=0;i<n.length;i++){o=(l=(s=n[i])._private).rstyle;var s,l,c=l.rscratch;this.recalculateEdgeLabelProjections(s),o.srcX=c.arrowStartX,o.srcY=c.arrowStartY,o.tgtX=c.arrowEndX,o.tgtY=c.arrowEndY,o.midX=c.midX,o.midY=c.midY,o.labelAngle=c.labelAngle,o.sourceLabelAngle=c.sourceLabelAngle,o.targetLabelAngle=c.targetLabelAngle}}}};t.exports=r},{}],67:[function(e,t,n){"use strict";var r=e("../../../../collection/zsort"),i={updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],n=0;n<e.length;n++){var r=(i=e[n])._private.rscratch;i.grabbed()&&!i.isParent()?t.push(i):r.inDragLayer?e.drag.push(i):e.nondrag.push(i)}for(n=0;n<t.length;n++){var i=t[n];e.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){if(e||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(r),t.interactive=t.filter((function(e){return e.interactive()})),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t}};t.exports=i},{"../../../../collection/zsort":32}],68:[function(e,t,n){"use strict";var r={getCachedImage:function(e,t,n){var r=this,i=r.imageCache=r.imageCache||{},o=i[e];if(o)return o.image.complete||o.image.addEventListener("load",n),o.image;var a=(o=i[e]=i[e]||{}).image=new Image;a.addEventListener("load",n);var s="data:";return e.substring(0,s.length).toLowerCase()===s||(a.crossOrigin=t),a.src=e,a}};t.exports=r},{}],69:[function(e,t,n){"use strict";var r=e("../../../is"),i=e("../../../util"),o=e("../../../window"),a=function(e){this.init(e)},s=a,l=s.prototype;l.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],l.init=function(e){var t=this;t.options=e,t.cy=e.cy;var n=t.container=e.cy.container();if(o){var r=o.document,a=r.head,s="__________cytoscape_stylesheet",l="__________cytoscape_container",c=null!=r.getElementById(s);if(n.className=(n.className||"")+" "+l,!c){var u=r.createElement("style");u.id=s,u.innerHTML="."+l+" { position: relative; }",a.insertBefore(u,a.children[0])}"static"===o.getComputedStyle(n).getPropertyValue("position")&&i.error("A Cytoscape container has style position:static and so can not use UI extensions properly")}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.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]},t.redraws=0,t.showFps=e.showFps,t.debug=e.debug,t.hideEdgesOnViewport=e.hideEdgesOnViewport,t.hideLabelsOnViewport=e.hideLabelsOnViewport,t.textureOnViewport=e.textureOnViewport,t.wheelSensitivity=e.wheelSensitivity,t.motionBlurEnabled=e.motionBlur,t.forcedPixelRatio=e.pixelRatio,t.motionBlur=e.motionBlur,t.motionBlurOpacity=e.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=e.desktopTapThreshold,t.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,t.touchTapThreshold=e.touchTapThreshold,t.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners(),t.load()},l.notify=function(e){var t,n=this;if(!this.destroyed){t=r.array(e.type)?e.type:[e.type];for(var i={},o=0;o<t.length;o++)i[t[o]]=!0;if(i.destroy)return void n.destroy();(i.add||i.remove||i.load||i.zorder)&&n.invalidateCachedZSortedEles(),i.viewport&&n.redrawHint("select",!0),(i.load||i.resize)&&(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint("eles",!0),n.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},l.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var n=e.bindings[t],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch(e){}},[e("./arrow-shapes"),e("./coord-ele-math"),e("./images"),e("./load-listeners"),e("./node-shapes"),e("./redraw")].forEach((function(e){i.extend(l,e)})),t.exports=s},{"../../../is":91,"../../../util":108,"../../../window":116,"./arrow-shapes":57,"./coord-ele-math":63,"./images":68,"./load-listeners":70,"./node-shapes":71,"./redraw":72}],70:[function(e,t,n){"use strict";var r=e("../../../is"),i=e("../../../util"),o=e("../../../math"),a=e("../../../event"),s={registerBinding:function(e,t,n,r){var i=Array.prototype.slice.apply(arguments,[1]),o=this.binder(e);return o.on.apply(o,i)},binder:function(e){var t=this,n=e===window||e===document||e===document.body||r.domElement(e);if(null==t.supportsPassiveEvents){var i=!1;try{var o=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,o)}catch(e){}t.supportsPassiveEvents=i}var a=function(r,i,o){var a=Array.prototype.slice.call(arguments);return n&&t.supportsPassiveEvents&&(a[2]={capture:null!=o&&o,passive:!1,once:!1}),t.bindings.push({target:e,args:a}),(e.addEventListener||e.on).apply(e,a),this};return{on:a,addEventListener:a,addListener:a,bind:a}},nodeIsDraggable:function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},nodeIsGrabbable:function(e){return this.nodeIsDraggable(e)&&e.interactive()},load:function(){var e=this,t=function(t,n,r,o){null==t&&(t=e.cy);for(var s=0;s<n.length;s++){var l=n[s],c=new a(r,i.extend({type:l},o));t.trigger(c)}},n=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},s=function(t,n){var r=!0;if(e.cy.hasCompoundNodes()&&t&&t.isEdge()){for(var i=0;n&&i<n.length;i++)if((t=n[i]).isNode()&&t.isParent()){r=!1;break}}else r=!0;return r},l=function(t){var n;if(t.addToList&&e.cy.hasCompoundNodes()){if(!t.addToList.hasId){t.addToList.hasId={};for(var r=0;r<t.addToList.length;r++){var i=t.addToList[r];t.addToList.hasId[i.id()]=!0}}n=t.addToList.hasId}return n||{}},c=function(e){e[0]._private.grabbed=!0},u=function(e){e[0]._private.grabbed=!1},d=function(e){e[0]._private.rscratch.inDragLayer=!0},p=function(e){e[0]._private.rscratch.inDragLayer=!1},f=function(e){e[0]._private.rscratch.isGrabTarget=!0},h=function(e){e[0]._private.rscratch.isGrabTarget=!1},g=function(e,t){var n=l(t);n[e.id()]||(t.addToList.push(e),n[e.id()]=!0,c(e))},v=function(e,t){if(e.cy().hasCompoundNodes()&&(null!=t.inDragLayer||null!=t.addToList)){var n=e.descendants();t.inDragLayer&&(n.forEach(d),n.connectedEdges().forEach(d)),t.addToList&&n.forEach((function(e){g(e,t)}))}},m=function(t,n){n=n||{};var r=t.cy().hasCompoundNodes();n.inDragLayer&&(t.forEach(d),t.neighborhood().stdFilter((function(e){return!r||e.isEdge()})).forEach(d)),n.addToList&&t.forEach((function(e){g(e,n)})),v(t,n),C(t,{inDragLayer:n.inDragLayer}),e.updateCachedGrabbedEles()},y=m,b=function(t){t&&(t.hasId={},e.getCachedZSortedEles().forEach((function(e){u(e),p(e),h(e)})),e.updateCachedGrabbedEles())},C=function(e,t){if((null!=t.inDragLayer||null!=t.addToList)&&e.cy().hasCompoundNodes()){var n=e.ancestors().orphans();if(!n.same(e)){var r=n.descendants().spawnSelf().merge(n).unmerge(e).unmerge(e.descendants()),i=r.connectedEdges();t.inDragLayer&&(i.forEach(d),r.forEach(d)),t.addToList&&r.forEach((function(e){g(e,t)}))}}},x="undefined"!=typeof MutationObserver;x?(e.removeObserver=new MutationObserver((function(t){for(var n=0;n<t.length;n++){var r=t[n].removedNodes;if(r)for(var i=0;i<r.length;i++)if(r[i]===e.container){e.destroy();break}}})),e.container.parentNode&&e.removeObserver.observe(e.container.parentNode,{childList:!0})):e.registerBinding(e.container,"DOMNodeRemoved",(function(t){e.destroy()}));var E=i.debounce((function(){e.cy.resize()}),100);x&&(e.styleObserver=new MutationObserver(E),e.styleObserver.observe(e.container,{attributes:!0})),e.registerBinding(window,"resize",E);for(var S=function(t){e.registerBinding(t,"scroll",(function(t){e.invalidateContainerClientCoordsCache()}))},w=e.cy.container();S(w),w.parentNode;)w=w.parentNode;e.registerBinding(e.container,"contextmenu",(function(e){e.preventDefault()}));var V=function(){return 0!==e.selection[4]},R=function(t){for(var n=e.findContainerClientCoords(),r=n[0],i=n[1],o=n[2],a=n[3],s=t.touches?t.touches:[t],l=!1,c=0;c<s.length;c++){var u=s[c];if(r<=u.clientX&&u.clientX<=r+o&&i<=u.clientY&&u.clientY<=i+a){l=!0;break}}if(!l)return!1;for(var d=e.container,p=t.target.parentNode,f=!1;p;){if(p===d){f=!0;break}p=p.parentNode}return!!f};e.registerBinding(e.container,"mousedown",(function(n){if(R(n)){n.preventDefault(),e.hoverData.capture=!0,e.hoverData.which=n.which;var r=e.cy,i=[n.clientX,n.clientY],o=e.projectIntoViewport(i[0],i[1]),s=e.selection,l=e.findNearestElements(o[0],o[1],!0,!1),c=l[0],u=e.dragData.possibleDragElements;e.hoverData.mdownPos=o,e.hoverData.mdownGPos=i;var d=function(){e.hoverData.tapholdCancelled=!1,clearTimeout(e.hoverData.tapholdTimeout),e.hoverData.tapholdTimeout=setTimeout((function(){if(!e.hoverData.tapholdCancelled){var t=e.hoverData.down;t?t.trigger(new a(n,{type:"taphold",position:{x:o[0],y:o[1]}})):r.trigger(new a(n,{type:"taphold",position:{x:o[0],y:o[1]}}))}}),e.tapholdDuration)};if(3==n.which){e.hoverData.cxtStarted=!0;var p=new a(n,{type:"cxttapstart",position:{x:o[0],y:o[1]}});c?(c.activate(),c.trigger(p),e.hoverData.down=c):r.trigger(p),e.hoverData.downTime=(new Date).getTime(),e.hoverData.cxtDragged=!1}else if(1==n.which){if(c&&c.activate(),null!=c&&e.nodeIsGrabbable(c)){var h=function(e){return new a(n,{type:e,position:{x:o[0],y:o[1]}})},g=function(e){e.trigger(h("grab"))};if(f(c),c.selected()){u=e.dragData.possibleDragElements=[];var v=r.$((function(t){return t.isNode()&&t.selected()&&e.nodeIsGrabbable(t)}));m(v,{addToList:u}),c.trigger(h("grabon")),v.forEach(g)}else u=e.dragData.possibleDragElements=[],y(c,{addToList:u}),c.trigger(h("grabon")).trigger(h("grab"));e.redrawHint("eles",!0),e.redrawHint("drag",!0)}e.hoverData.down=c,e.hoverData.downs=l,e.hoverData.downTime=(new Date).getTime(),t(c,["mousedown","tapstart","vmousedown"],n,{position:{x:o[0],y:o[1]}}),null==c?(s[4]=1,e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()):c.isEdge()&&(s[4]=1),d()}s[0]=s[2]=o[0],s[1]=s[3]=o[1]}}),!1),e.registerBinding(window,"mousemove",(function(i){if(e.hoverData.capture||R(i)){var l=!1,c=e.cy,u=c.zoom(),d=[i.clientX,i.clientY],p=e.projectIntoViewport(d[0],d[1]),f=e.hoverData.mdownPos,h=e.hoverData.mdownGPos,g=e.selection,v=null;e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.selecting||(v=e.findNearestElement(p[0],p[1],!0,!1));var y,C=e.hoverData.last,x=e.hoverData.down,E=[p[0]-g[2],p[1]-g[3]],S=e.dragData.possibleDragElements;if(h){var w=d[0]-h[0],V=w*w,O=d[1]-h[1],A=V+O*O;e.hoverData.isOverThresholdDrag=y=A>=e.desktopTapThreshold2}var k=n(i);y&&(e.hoverData.tapholdCancelled=!0);var T=function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(E[0]),t.push(E[1])):(t[0]+=E[0],t[1]+=E[1])};l=!0,t(v,["mousemove","vmousemove","tapdrag"],i,{position:{x:p[0],y:p[1]}});var N=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||c.trigger("boxstart"),g[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(y){var D=new a(i,{type:"cxtdrag",position:{x:p[0],y:p[1]}});x?x.trigger(D):c.trigger(D),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.trigger(new a(i,{type:"cxtdragout",position:{x:p[0],y:p[1]}})),e.hoverData.cxtOver=v,v&&v.trigger(new a(i,{type:"cxtdragover",position:{x:p[0],y:p[1]}})))}}else if(e.hoverData.dragging){if(l=!0,c.panningEnabled()&&c.userPanningEnabled()){var P;if(e.hoverData.justStartedPan){var _=e.hoverData.mdownPos;P={x:(p[0]-_[0])*u,y:(p[1]-_[1])*u},e.hoverData.justStartedPan=!1}else P={x:E[0]*u,y:E[1]*u};c.panBy(P),e.hoverData.dragged=!0}p=e.projectIntoViewport(i.clientX,i.clientY)}else if(1!=g[4]||null!=x&&!x.isEdge()){if(x&&x.isEdge()&&x.active()&&x.unactivate(),x&&x.grabbed()||v==C||(C&&t(C,["mouseout","tapdragout"],i,{position:{x:p[0],y:p[1]}}),v&&t(v,["mouseover","tapdragover"],i,{position:{x:p[0],y:p[1]}}),e.hoverData.last=v),x&&e.nodeIsDraggable(x))if(y)if(c.boxSelectionEnabled()&&k)x&&x.grabbed()&&(b(S),x.trigger("free")),N();else{var B=!e.dragData.didDrag;B&&e.redrawHint("eles",!0),e.dragData.didDrag=!0;var M=[];e.hoverData.draggingEles||m(c.collection(S),{inDragLayer:!0});for(var I=0;I<S.length;I++){var F=S[I];if(e.nodeIsDraggable(F)&&F.grabbed()){var L=F.position();if(M.push(F),r.number(E[0])&&r.number(E[1])){var W=!F.isParent();if(W&&(L.x+=E[0],L.y+=E[1]),B){var U=e.hoverData.dragDelta;W&&U&&r.number(U[0])&&r.number(U[1])&&(L.x+=U[0],L.y+=U[1])}}}}e.hoverData.draggingEles=!0;var G=c.collection(M);G.dirtyCompoundBoundsCache(),G.trigger("position drag"),e.redrawHint("drag",!0),e.redraw()}else T();l=!0}else y&&(e.hoverData.dragging||!c.boxSelectionEnabled()||!k&&c.panningEnabled()&&c.userPanningEnabled()?!e.hoverData.selecting&&c.panningEnabled()&&c.userPanningEnabled()&&s(x,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,g[4]=0,e.data.bgActivePosistion=o.array2point(f),e.redrawHint("select",!0),e.redraw()):N(),x&&x.isEdge()&&x.active()&&x.unactivate());return g[2]=p[0],g[3]=p[1],l?(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),!1):void 0}}),!1),e.registerBinding(window,"mouseup",(function(r){if(e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(r.clientX,r.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),c=e.dragData.possibleDragElements,u=e.hoverData.down,d=n(r);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,u&&u.unactivate(),3===e.hoverData.which){var p=new a(r,{type:"cxttapend",position:{x:o[0],y:o[1]}});if(u?u.trigger(p):i.trigger(p),!e.hoverData.cxtDragged){var f=new a(r,{type:"cxttap",position:{x:o[0],y:o[1]}});u?u.trigger(f):i.trigger(f)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(null!=u||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||n(r)||(i.$((function(e){return e.selected()})).unselect(),c.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=c=[]),t(l,["mouseup","tapend","vmouseup"],r,{position:{x:o[0],y:o[1]}}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||t(u,["click","tap","vclick"],r,{position:{x:o[0],y:o[1]}}),l!=u||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||d?l.selected()?l.unselect():l.select():d||(i.$(":selected").unmerge(l).unselect(),l.select())),e.redrawHint("eles",!0)),e.hoverData.selecting){var h=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),h.length>0&&e.redrawHint("eles",!0),i.trigger("boxend");var g=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()||d||i.$(":selected").unmerge(h).unselect(),h.trigger("box").stdFilter(g).select().trigger("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var v=u&&u.grabbed();b(c),v&&u.trigger("free")}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var O=function(t){if(!e.scrollingPage){var n,r=e.cy,i=e.projectIntoViewport(t.clientX,t.clientY),o=[i[0]*r.zoom()+r.pan().x,i[1]*r.zoom()+r.pan().y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||V())return void t.preventDefault();r.panningEnabled()&&r.userPanningEnabled()&&r.zoomingEnabled()&&r.userZoomingEnabled()&&(t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),n=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,n*=e.wheelSensitivity,1===t.deltaMode&&(n*=33),r.zoom({level:r.zoom()*Math.pow(10,n),renderedPosition:{x:o[0],y:o[1]}}))}};e.registerBinding(e.container,"wheel",O,!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.trigger(new a(t,{type:"mouseout",position:{x:n[0],y:n[1]}}))}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.trigger(new a(t,{type:"mouseover",position:{x:n[0],y:n[1]}}))}),!1);var A,k,T,N,D,P,_,B,M,I,F,L,W,U,G,z,Q,j=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},H=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",U=function(n){if(R(n)){e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,i=e.touchData.now,o=e.touchData.earlier;if(n.touches[0]){var s=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);i[0]=s[0],i[1]=s[1]}if(n.touches[1]&&(s=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),i[2]=s[0],i[3]=s[1]),n.touches[2]&&(s=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),i[4]=s[0],i[5]=s[1]),n.touches[1]){b(e.dragData.touchDragEles);var l=e.findContainerClientCoords();M=l[0],I=l[1],F=l[2],L=l[3],A=n.touches[0].clientX-M,k=n.touches[0].clientY-I,T=n.touches[1].clientX-M,N=n.touches[1].clientY-I,W=0<=A&&A<=F&&0<=T&&T<=F&&0<=k&&k<=L&&0<=N&&N<=L;var c=r.pan(),u=r.zoom();D=j(A,k,T,N),P=H(A,k,T,N),B=[((_=[(A+T)/2,(k+N)/2])[0]-c.x)/u,(_[1]-c.y)/u];var d=200;if(P<d*d&&!n.touches[2]){var p=e.findNearestElement(i[0],i[1],!0,!0),h=e.findNearestElement(i[2],i[3],!0,!0);return p&&p.isNode()?(p.activate().trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start=p):h&&h.isNode()?(h.activate().trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start=h):r.trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(n.touches[2]);else if(n.touches[1]);else if(n.touches[0]){var g=e.findNearestElements(i[0],i[1],!0,!0),v=g[0];if(null!=v&&(v.activate(),e.touchData.start=v,e.touchData.starts=g,e.nodeIsGrabbable(v))){var C=e.dragData.touchDragEles=[],x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),v.selected()?(x=r.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),m(x,{addToList:C})):y(v,{addToList:C}),f(v);var E=function(e){return new a(n,{type:e,position:{x:i[0],y:i[1]}})};v.trigger(E("grabon")),x?x.forEach((function(e){e.trigger(E("grab"))})):v.trigger(E("grab"))}t(v,["touchstart","tapstart","vmousedown"],n,{position:{x:i[0],y:i[1]}}),null==v&&(e.data.bgActivePosistion={x:s[0],y:s[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||(t(e.touchData.start,["taphold"],n,{position:{x:i[0],y:i[1]}}),e.touchData.start||r.$(":selected").unselect())}),e.tapholdDuration)}if(n.touches.length>=1){for(var S=e.touchData.startPosition=[],w=0;w<i.length;w++)S[w]=o[w]=i[w];var V=n.touches[0];e.touchData.startGPosition=[V.clientX,V.clientY]}}},!1),e.registerBinding(window,"touchmove",G=function(n){var i=e.touchData.capture;if(i||R(n)){var l=e.selection,c=e.cy,u=e.touchData.now,d=e.touchData.earlier,p=c.zoom();if(n.touches[0]){var f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);u[0]=f[0],u[1]=f[1]}n.touches[1]&&(f=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),u[2]=f[0],u[3]=f[1]),n.touches[2]&&(f=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),u[4]=f[0],u[5]=f[1]);var h,g=e.touchData.startGPosition;if(i&&n.touches[0]&&g){for(var v=[],y=0;y<u.length;y++)v[y]=u[y]-d[y];var C=n.touches[0].clientX-g[0],x=C*C,E=n.touches[0].clientY-g[1];h=x+E*E>=e.touchTapThreshold2}if(i&&e.touchData.cxt){n.preventDefault();var S=n.touches[0].clientX-M,w=n.touches[0].clientY-I,V=n.touches[1].clientX-M,O=n.touches[1].clientY-I,_=H(S,w,V,O),F=150,L=1.5;if(_/P>=L*L||_>=F*F){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var U=new a(n,{type:"cxttapend",position:{x:u[0],y:u[1]}});e.touchData.start?(e.touchData.start.unactivate().trigger(U),e.touchData.start=null):c.trigger(U)}}if(i&&e.touchData.cxt){U=new a(n,{type:"cxtdrag",position:{x:u[0],y:u[1]}}),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.trigger(U):c.trigger(U),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var G=e.findNearestElement(u[0],u[1],!0,!0);e.touchData.cxtOver&&G===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.trigger(new a(n,{type:"cxtdragout",position:{x:u[0],y:u[1]}})),e.touchData.cxtOver=G,G&&G.trigger(new a(n,{type:"cxtdragover",position:{x:u[0],y:u[1]}})))}else if(i&&n.touches[2]&&c.boxSelectionEnabled())n.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||c.trigger("boxstart"),e.touchData.selecting=!0,e.redrawHint("select",!0),l&&0!==l.length&&void 0!==l[0]?(l[2]=(u[0]+u[2]+u[4])/3,l[3]=(u[1]+u[3]+u[5])/3):(l[0]=(u[0]+u[2]+u[4])/3,l[1]=(u[1]+u[3]+u[5])/3,l[2]=(u[0]+u[2]+u[4])/3+1,l[3]=(u[1]+u[3]+u[5])/3+1),l[4]=1,e.touchData.selecting=!0,e.redraw();else if(i&&n.touches[1]&&c.zoomingEnabled()&&c.panningEnabled()&&c.userZoomingEnabled()&&c.userPanningEnabled()){if(n.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),re=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var z=0;z<re.length;z++){var Q=re[z]._private;Q.grabbed=!1,Q.rscratch.inDragLayer=!1}}S=n.touches[0].clientX-M,w=n.touches[0].clientY-I,V=n.touches[1].clientX-M,O=n.touches[1].clientY-I;var Y=j(S,w,V,O),J=Y/D;if(W){var X=(S-A+(V-T))/2,Z=(w-k+(O-N))/2,q=c.zoom(),K=q*J,$=c.pan(),ee=B[0]*q+$.x,te=B[1]*q+$.y,ne={x:-K/q*(ee-$.x-X)+ee,y:-K/q*(te-$.y-Z)+te};if(e.touchData.start&&e.touchData.start.active()){var re=e.dragData.touchDragEles;b(re),e.redrawHint("drag",!0),e.redrawHint("eles",!0),e.touchData.start.unactivate().trigger("free")}c.viewport({zoom:K,pan:ne,cancelOnFailedZoom:!0}),D=Y,A=S,k=w,T=V,N=O,e.pinching=!0}n.touches[0]&&(f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY),u[0]=f[0],u[1]=f[1]),n.touches[1]&&(f=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),u[2]=f[0],u[3]=f[1]),n.touches[2]&&(f=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),u[4]=f[0],u[5]=f[1])}else if(n.touches[0]){var ie=e.touchData.start,oe=e.touchData.last;if(e.hoverData.draggingEles||e.swipePanning||(G=e.findNearestElement(u[0],u[1],!0,!0)),i&&null!=ie&&n.preventDefault(),i&&null!=ie&&e.nodeIsDraggable(ie))if(h){re=e.dragData.touchDragEles;var ae=!e.dragData.didDrag;ae&&m(c.collection(re),{inDragLayer:!0});for(var se=0;se<re.length;se++){var le=re[se];if(e.nodeIsDraggable(le)&&le.grabbed()){e.dragData.didDrag=!0;var ce=le.position(),ue=!le.isParent();if(ue&&r.number(v[0])&&r.number(v[1])&&(ce.x+=v[0],ce.y+=v[1]),ae){e.redrawHint("eles",!0);var de=e.touchData.dragDelta;ue&&de&&r.number(de[0])&&r.number(de[1])&&(ce.x+=de[0],ce.y+=de[1])}}}var pe=c.collection(re);pe.dirtyCompoundBoundsCache(),pe.trigger("position drag"),e.hoverData.draggingEles=!0,e.redrawHint("drag",!0),e.touchData.startPosition[0]==d[0]&&e.touchData.startPosition[1]==d[1]&&e.redrawHint("eles",!0),e.redraw()}else 0===(de=e.touchData.dragDelta=e.touchData.dragDelta||[]).length?(de.push(v[0]),de.push(v[1])):(de[0]+=v[0],de[1]+=v[1]);if(t(ie||G,["touchmove","tapdrag","vmousemove"],n,{position:{x:u[0],y:u[1]}}),ie&&ie.grabbed()||G==oe||(oe&&oe.trigger(new a(n,{type:"tapdragout",position:{x:u[0],y:u[1]}})),G&&G.trigger(new a(n,{type:"tapdragover",position:{x:u[0],y:u[1]}}))),e.touchData.last=G,i)for(z=0;z<u.length;z++)u[z]&&e.touchData.startPosition[z]&&h&&(e.touchData.singleTouchMoved=!0);i&&(null==ie||ie.isEdge())&&c.panningEnabled()&&c.userPanningEnabled()&&(s(ie,e.touchData.starts)&&(n.preventDefault(),e.swipePanning?c.panBy({x:v[0]*p,y:v[1]*p}):h&&(e.swipePanning=!0,c.panBy({x:C*p,y:E*p}),ie&&(ie.unactivate(),e.data.bgActivePosistion||(e.data.bgActivePosistion=o.array2point(e.touchData.startPosition)),e.redrawHint("select",!0),e.touchData.start=null))),f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY),u[0]=f[0],u[1]=f[1])}for(y=0;y<u.length;y++)d[y]=u[y]}},!1),e.registerBinding(window,"touchcancel",z=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",Q=function(n){var r=e.touchData.start;if(e.touchData.capture){e.touchData.capture=!1,n.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),c=e.touchData.now,u=e.touchData.earlier;if(n.touches[0]){var d=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);c[0]=d[0],c[1]=d[1]}if(n.touches[1]&&(d=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),c[2]=d[0],c[3]=d[1]),n.touches[2]&&(d=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),c[4]=d[0],c[5]=d[1]),r&&r.unactivate(),e.touchData.cxt){if(o=new a(n,{type:"cxttapend",position:{x:c[0],y:c[1]}}),r?r.trigger(o):s.trigger(o),!e.touchData.cxtDragged){var p=new a(n,{type:"cxttap",position:{x:c[0],y:c[1]}});r?r.trigger(p):s.trigger(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!n.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var f=s.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),s.trigger("boxend");var h=function(e){return e.selectable()&&!e.selected()};f.trigger("box").stdFilter(h).select().trigger("boxselect"),f.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=r&&r.unactivate(),n.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(n.touches[1]);else if(n.touches[0]);else if(!n.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=r){var v=r._private.grabbed;b(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&r.trigger("free"),t(r,["touchend","tapend","vmouseup","tapdragout"],n,{position:{x:c[0],y:c[1]}}),r.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(c[0],c[1],!0,!0);t(m,["touchend","tapend","vmouseup","tapdragout"],n,{position:{x:c[0],y:c[1]}})}var y=e.touchData.startPosition[0]-c[0],C=y*y,x=e.touchData.startPosition[1]-c[1],E=(C+x*x)*l*l;null!=r&&!e.dragData.didDrag&&r._private.selectable&&E<e.touchTapThreshold2&&!e.pinching&&("single"===s.selectionType()?(s.$(":selected").unmerge(r).unselect(),r.select()):r.selected()?r.unselect():r.select(),e.redrawHint("eles",!0)),e.touchData.singleTouchMoved||t(r,["tap","vclick"],n,{position:{x:c[0],y:c[1]}}),e.touchData.singleTouchMoved=!0}for(var S=0;S<c.length;S++)u[S]=c[S];e.dragData.didDrag=!1,0===n.touches.length&&(e.touchData.dragDelta=[],e.touchData.startPosition=null,e.touchData.startGPosition=null),n.touches.length<2&&(e.pinching=!1,e.redrawHint("eles",!0),e.redraw())}},!1),"undefined"==typeof TouchEvent){var Y=[],J=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},X=function(e){return{event:e,touch:J(e)}},Z=function(e){Y.push(X(e))},q=function(e){for(var t=0;t<Y.length;t++)if(Y[t].event.pointerId===e.pointerId)return void Y.splice(t,1)},K=function(e){var t=Y.filter((function(t){return t.event.pointerId===e.pointerId}))[0];t.event=e,t.touch=J(e)},$=function(e){e.touches=Y.map((function(e){return e.touch}))};e.registerBinding(e.container,"pointerdown",(function(e){"mouse"!==e.pointerType&&(e.preventDefault(),Z(e),$(e),U(e))})),e.registerBinding(e.container,"pointerup",(function(e){"mouse"!==e.pointerType&&(q(e),$(e),Q(e))})),e.registerBinding(e.container,"pointercancel",(function(e){"mouse"!==e.pointerType&&(q(e),$(e),z(e))})),e.registerBinding(e.container,"pointermove",(function(e){"mouse"!==e.pointerType&&(e.preventDefault(),K(e),$(e),G(e))}))}}};t.exports=s},{"../../../event":45,"../../../is":91,"../../../math":93,"../../../util":108}],71:[function(e,t,n){"use strict";var r=e("../../../math"),i=(e("../../../util"),{});i.generatePolygon=function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl("polygon",e,t,n,r,i,this.points)},intersectLine:function(e,t,n,i,o,a,s){return r.polygonIntersectLine(o,a,this.points,e,t,n/2,i/2,s)},checkPoint:function(e,t,n,i,o,a,s){return r.pointInsidePolygon(e,t,this.points,a,s,i,o,[0,-1],n)}}},i.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,i,o,a,s){return r.intersectLineEllipse(o,a,e,t,n/2+s,i/2+s)},checkPoint:function(e,t,n,r,i,o,a){return e-=o,t-=a,(e/=r/2+n)*e+(t/=i/2+n)*t<=1}}},i.generateRoundRectangle=function(){return this.nodeShapes.roundrectangle={renderer:this,name:"roundrectangle",points:r.generateUnitNgonPointsFitToSquare(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,i,o,a,s){return r.roundRectangleIntersectLine(o,a,e,t,n,i,s)},checkPoint:function(e,t,n,i,o,a,s){var l=r.getRoundRectangleRadius(i,o);if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-2*l,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-2*l,o,[0,-1],n))return!0;var c=function(e,t,n,r,i,o,a){return e-=n,t-=r,(e/=i/2+a)*e+(t/=o/2+a)*t<=1};return!!(c(e,t,a-i/2+l,s-o/2+l,2*l,2*l,n)||c(e,t,a+i/2-l,s-o/2+l,2*l,2*l,n)||c(e,t,a+i/2-l,s+o/2-l,2*l,2*l,n)||c(e,t,a-i/2+l,s+o/2-l,2*l,2*l,n))}}},i.generateCutRectangle=function(){return this.nodeShapes.cutrectangle={renderer:this,name:"cutrectangle",cornerLength:r.getCutRectangleCornerLength(),points:r.generateUnitNgonPointsFitToSquare(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},generateCutTrianglePts:function(e,t,n,r){var i=this.cornerLength,o=t/2,a=e/2,s=n-a,l=n+a,c=r-o,u=r+o;return{topLeft:[s,c+i,s+i,c,s+i,c+i],topRight:[l-i,c,l,c+i,l-i,c+i],bottomRight:[l,u-i,l-i,u,l-i,u-i],bottomLeft:[s+i,u,s,u-i,s+i,u-i]}},intersectLine:function(e,t,n,i,o,a,s){var l=this.generateCutTrianglePts(n+2*s,i+2*s,e,t),c=[].concat.apply([],[l.topLeft.splice(0,4),l.topRight.splice(0,4),l.bottomRight.splice(0,4),l.bottomLeft.splice(0,4)]);return r.polygonIntersectLine(o,a,c,e,t)},checkPoint:function(e,t,n,i,o,a,s){if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-2*this.cornerLength,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-2*this.cornerLength,o,[0,-1],n))return!0;var l=this.generateCutTrianglePts(i,o,a,s);return r.pointInsidePolygonPoints(e,t,l.topLeft)||r.pointInsidePolygonPoints(e,t,l.topRight)||r.pointInsidePolygonPoints(e,t,l.bottomRight)||r.pointInsidePolygonPoints(e,t,l.bottomLeft)}}},i.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",r.generateUnitNgonPointsFitToSquare(3,0)),this.generatePolygon("rectangle",r.generateUnitNgonPointsFitToSquare(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generatePolygon("diamond",[0,1,1,0,0,-1,-1,0]),this.generatePolygon("pentagon",r.generateUnitNgonPointsFitToSquare(5,0)),this.generatePolygon("hexagon",r.generateUnitNgonPointsFitToSquare(6,0)),this.generatePolygon("heptagon",r.generateUnitNgonPointsFitToSquare(7,0)),this.generatePolygon("octagon",r.generateUnitNgonPointsFitToSquare(8,0));var n=new Array(20),i=r.generateUnitNgonPoints(5,0),o=r.generateUnitNgonPoints(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=r.fitPolygonToSquare(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]),e.makePolygon=function(e){var n,r="polygon-"+e.join("$");return(n=this[r])?n:t.generatePolygon(r,e)}},t.exports=i},{"../../../math":93,"../../../util":108}],72:[function(e,t,n){"use strict";var r=e("../../../util"),i={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||r.staticEmptyObject();var t=this;void 0===t.averageRedrawTime&&(t.averageRedrawTime=0),void 0===t.lastRedrawTime&&(t.lastRedrawTime=0),void 0===t.lastDrawTime&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=e},beforeRender:function(e,t){if(!this.destroyed){t=t||0;var n=this.beforeRenderCallbacks;n.push({fn:e,priority:t}),n.sort((function(e,t){return t.priority-e.priority}))}}},o=function(e,t,n){for(var r=e.beforeRenderCallbacks,i=0;i<r.length;i++)r[i].fn(t,n)};i.startRenderLoop=function(){var e=this;if(!e.renderLoopStarted){e.renderLoopStarted=!0;var t=function(n){if(!e.destroyed){if(e.requestedFrame&&!e.skipFrame){o(e,!0,n);var i=r.performanceNow();e.render(e.renderOptions);var a=e.lastDrawTime=r.performanceNow();void 0===e.averageRedrawTime&&(e.averageRedrawTime=a-i),void 0===e.redrawCount&&(e.redrawCount=0),e.redrawCount++,void 0===e.redrawTotalTime&&(e.redrawTotalTime=0);var s=a-i;e.redrawTotalTime+=s,e.lastRedrawTime=s,e.averageRedrawTime=e.averageRedrawTime/2+s/2,e.requestedFrame=!1}else o(e,!1,n);e.skipFrame=!1,r.requestAnimationFrame(t)}};r.requestAnimationFrame(t)}},t.exports=i},{"../../../util":108}],73:[function(e,t,n){"use strict";var r,i={arrowShapeImpl:function(e){return(r||(r={polygon:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}},"triangle-backcurve":function(e,t,n){for(var r,i=0;i<t.length;i++){var o=t[i];0===i&&(r=o),e.lineTo(o.x,o.y)}e.quadraticCurveTo(n.x,n.y,r.x,r.y)},"triangle-tee":function(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var o=r[i];e.lineTo(o.x,o.y)}e.closePath&&e.closePath(),e.beginPath&&e.beginPath();var a=n,s=n[0];for(e.moveTo(s.x,s.y),i=0;i<a.length;i++)o=a[i],e.lineTo(o.x,o.y);e.closePath&&e.closePath()},"triangle-cross":function(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var o=r[i];e.lineTo(o.x,o.y)}e.closePath&&e.closePath(),e.beginPath&&e.beginPath();var a=n,s=n[0];for(e.moveTo(s.x,s.y),i=0;i<a.length;i++)o=a[i],e.lineTo(o.x,o.y);e.closePath&&e.closePath()},circle:function(e,t,n,r){e.arc(t,n,r,0,2*Math.PI,!1)}}))[e]}};t.exports=i},{}],74:[function(e,t,n){"use strict";var r={drawEdge:function(e,t,n,r,i){var o=t._private.rscratch,a=this.usePaths();if(!o.badLine&&!isNaN(o.allpts[0])&&t.visible()){var s;n&&(s=n,e.translate(-s.x1,-s.y1));var l=t.pstyle("overlay-padding").pfValue,c=t.pstyle("overlay-opacity").value,u=t.pstyle("overlay-color").value;if(i){if(0===c)return;this.strokeStyle(e,u[0],u[1],u[2],c),e.lineCap="round","self"!=o.edgeType||a||(e.lineCap="butt")}else{var d=t.pstyle("line-color").value;this.strokeStyle(e,d[0],d[1],d[2],t.pstyle("opacity").value),e.lineCap="butt"}e.lineJoin="round";var p=t.pstyle("width").pfValue+(i?2*l:0),f=i?"solid":t.pstyle("line-style").value;e.lineWidth=p,this.drawEdgePath(t,e,o.allpts,f,p),this.drawArrowheads(e,t,i),i||this.drawEdge(e,t,!1,r,!0),this.drawElementText(e,t,r),n&&e.translate(s.x1,s.y1)}},drawEdgePath:function(e,t,n,r,i){var o,a=e._private.rscratch,s=t,l=!1,c=this.usePaths();if(c){var u=n.join("$");a.pathCacheKey&&a.pathCacheKey===u?(o=t=a.pathCache,l=!0):(o=t=new Path2D,a.pathCacheKey=u,a.pathCache=o)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash([6,3]);break;case"solid":s.setLineDash([])}if(!l&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+3<n.length;d+=4)t.quadraticCurveTo(n[d],n[d+1],n[d+2],n[d+3]);break;case"straight":case"segments":case"haystack":for(d=2;d+1<n.length;d+=2)t.lineTo(n[d],n[d+1])}t=s,c?t.stroke(o):t.stroke(),t.setLineDash&&t.setLineDash([])},drawArrowheads:function(e,t,n){if(!n){var r=t._private.rscratch,i="haystack"===r.edgeType;i||this.drawArrowhead(e,t,"source",r.arrowStartX,r.arrowStartY,r.srcArrowAngle),this.drawArrowhead(e,t,"mid-target",r.midX,r.midY,r.midtgtArrowAngle),this.drawArrowhead(e,t,"mid-source",r.midX,r.midY,r.midsrcArrowAngle),i||this.drawArrowhead(e,t,"target",r.arrowEndX,r.arrowEndY,r.tgtArrowAngle)}},drawArrowhead:function(e,t,n,r,i,o){if(!(isNaN(r)||null==r||isNaN(i)||null==i||isNaN(o)||null==o)){var a=this,s=t.pstyle(n+"-arrow-shape").value;if("none"!==s){var l="hollow"===t.pstyle(n+"-arrow-fill").value?"both":"filled",c=t.pstyle(n+"-arrow-fill").value,u=t.pstyle("width").pfValue,d=t.pstyle("opacity").value,p=e.globalCompositeOperation;a.arrowShapes[s].forceStroke&&"filled"===c&&(c="both"),1===d&&"hollow"!==c||(e.globalCompositeOperation="destination-out",a.fillStyle(e,255,255,255,1),a.strokeStyle(e,255,255,255,1),a.drawArrowShape(t,n,e,l,u,s,r,i,o),e.globalCompositeOperation=p);var f=t.pstyle(n+"-arrow-color").value;a.fillStyle(e,f[0],f[1],f[2],d),a.strokeStyle(e,f[0],f[1],f[2],d),a.drawArrowShape(t,n,e,c,u,s,r,i,o)}}},drawArrowShape:function(e,t,n,r,i,o,a,s,l){var c,u=this,d=this.usePaths(),p=e._private.rscratch,f=!1,h=n,g={x:a,y:s},v=e.pstyle("arrow-scale").value,m=this.getArrowWidth(i,v),y=u.arrowShapes[o];if(d){var b=m+"$"+o+"$"+l+"$"+a+"$"+s;p.arrowPathCacheKey=p.arrowPathCacheKey||{},p.arrowPathCache=p.arrowPathCache||{},p.arrowPathCacheKey[t]===b?(c=n=p.arrowPathCache[t],f=!0):(c=n=new Path2D,p.arrowPathCacheKey[t]=b,p.arrowPathCache[t]=c)}n.beginPath&&n.beginPath(),f||y.draw(n,m,l,g,i),!y.leavePathOpen&&n.closePath&&n.closePath(),n=h,"filled"!==r&&"both"!==r||(d?n.fill(c):n.fill()),"hollow"!==r&&"both"!==r||(n.lineWidth=y.matchEdgeWidth?i:1,n.lineJoin="miter",d?n.stroke(c):n.stroke())}};t.exports=r},{}],75:[function(e,t,n){"use strict";var r=e("../../../math"),i={drawElement:function(e,t,n,r){var i=this;t.isNode()?i.drawNode(e,t,n,r):i.drawEdge(e,t,n,r)},drawCachedElement:function(e,t,n,i){var o=this,a=t.boundingBox();if(0!==a.w&&0!==a.h&&(!i||r.boundingBoxesIntersect(a,i))){var s=o.data.eleTxrCache.getElement(t,a,n);s?e.drawImage(s.texture.canvas,s.x,0,s.width,s.height,a.x1,a.y1,a.w,a.h):o.drawElement(e,t)}},drawElements:function(e,t){for(var n=this,r=0;r<t.length;r++){var i=t[r];n.drawElement(e,i)}},drawCachedElements:function(e,t,n,r){for(var i=this,o=0;o<t.length;o++){var a=t[o];i.drawCachedElement(e,a,n,r)}},drawCachedNodes:function(e,t,n,r){for(var i=this,o=0;o<t.length;o++){var a=t[o];a.isNode()&&i.drawCachedElement(e,a,n,r)}},drawLayeredElements:function(e,t,n,r){var i=this,o=i.data.lyrTxrCache.getLayers(t,n);if(o)for(var a=0;a<o.length;a++){var s=o[a],l=s.bb;0!==l.w&&0!==l.h&&e.drawImage(s.canvas,l.x1,l.y1,l.w,l.h)}else i.drawCachedElements(e,t,n,r)},drawDebugPoints:function(e,t){for(var n=function(t,n,r){e.fillStyle=r,e.fillRect(t-1,n-1,3,3)},r=0;r<t.length;r++){var i=t[r],o=i._private.rscratch;if(i.isNode()){var a=i.position();n(a.x,a.y,"magenta")}else{for(var s=o.allpts,l=0;l+1<s.length;l+=2)n(s[l],s[l+1],"cyan");n(o.midX,o.midY,"yellow")}}}};t.exports=i},{"../../../math":93}],76:[function(e,t,n){"use strict";var r={safeDrawImage:function(e,t,n,r,i,o,a,s,l,c){i<=0||o<=0||l<=0||c<=0||e.drawImage(t,n,r,i,o,a,s,l,c)},drawInscribedImage:function(e,t,n,r){var i=this,o=n.position(),a=o.x,s=o.y,l=n.cy().style(),c=l.getIndexedStyle.bind(l),u=c(n,"background-fit","value",r),d=c(n,"background-repeat","value",r),p=n.width(),f=n.height(),h=2*n.padding(),g=p+("inner"===c(n,"background-width-relative-to","value",r)?0:h),v=f+("inner"===c(n,"background-height-relative-to","value",r)?0:h),m=n._private.rscratch,y="node"===n.pstyle("background-clip").value,b=c(n,"background-image-opacity","value",r),C=t.width||t.cachedW,x=t.height||t.cachedH;null!=C&&null!=x||(document.body.appendChild(t),C=t.cachedW=t.width||t.offsetWidth,x=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var E=C,S=x;if("auto"!==c(n,"background-width","value",r)&&(E="%"===c(n,"background-width","units",r)?c(n,"background-width","pfValue",r)*g:c(n,"background-width","pfValue",r)),"auto"!==c(n,"background-height","value",r)&&(S="%"===c(n,"background-height","units",r)?c(n,"background-height","pfValue",r)*v:c(n,"background-height","pfValue",r)),0!==E&&0!==S){if("contain"===u)E*=w=Math.min(g/E,v/S),S*=w;else if("cover"===u){var w;E*=w=Math.max(g/E,v/S),S*=w}var V=a-g/2;V+="%"===c(n,"background-position-x","units",r)?(g-E)*c(n,"background-position-x","pfValue",r):c(n,"background-position-x","pfValue",r);var R=s-v/2;R+="%"===c(n,"background-position-y","units",r)?(v-S)*c(n,"background-position-y","pfValue",r):c(n,"background-position-y","pfValue",r),m.pathCache&&(V-=a,R-=s,a=0,s=0);var O=e.globalAlpha;if(e.globalAlpha=b,"no-repeat"===d)y&&(e.save(),m.pathCache?e.clip(m.pathCache):(i.nodeShapes[i.getNodeShape(n)].draw(e,a,s,g,v),e.clip())),i.safeDrawImage(e,t,0,0,C,x,V,R,E,S),y&&e.restore();else{var A=e.createPattern(t,d);e.fillStyle=A,i.nodeShapes[i.getNodeShape(n)].draw(e,a,s,g,v),e.translate(V,R),e.fill(),e.translate(-V,-R)}e.globalAlpha=O}}};t.exports=r},{}],77:[function(e,t,n){"use strict";function r(e,t,n,r,i,o){o=o||5,e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath(),e.fill()}var i=e("../../../util"),o=e("../../../math"),a={eleTextBiggerThanMin:function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(o.log2(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(e,t,n){var r=this;if(void 0===n){if(!r.eleTextBiggerThanMin(t))return}else if(!n)return;if(t.isNode()){if(!(o=t.pstyle("label"))||!o.value)return;var i=t.pstyle("text-halign").strValue;switch(t.pstyle("text-valign").strValue,i){case"left":e.textAlign="right";break;case"right":e.textAlign="left";break;default:e.textAlign="center"}e.textBaseline="bottom"}else{var o=t.pstyle("label"),a=t.pstyle("source-label"),s=t.pstyle("target-label");if(!(o&&o.value||a&&a.value||s&&s.value))return;e.textAlign="center",e.textBaseline="bottom"}r.drawText(e,t),t.isEdge()&&(r.drawText(e,t,"source"),r.drawText(e,t,"target"))}};a.drawNodeText=a.drawEdgeText=a.drawElementText,a.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if((t=this.fontCaches[n]).context===e)return t;return t={context:e},this.fontCaches.push(t),t},a.setupTextStyle=function(e,t){var n=t.effectiveOpacity(),r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",o=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=t.pstyle("text-opacity").value*t.pstyle("opacity").value*n,l=t.pstyle("text-outline-opacity").value*s,c=t.pstyle("color").value,u=t.pstyle("text-outline-color").value,d=t._private.fontKey,p=this.getFontCache(e);p.key!==d&&(e.font=r+" "+a+" "+i+" "+o,p.key=d),e.lineJoin="round",this.fillStyle(e,c[0],c[1],c[2],s),this.strokeStyle(e,u[0],u[1],u[2],l)},a.drawText=function(e,t,n){var o=t._private.rscratch,a=t.effectiveOpacity();if(0!==a&&0!==t.pstyle("text-opacity").value){var s=i.getPrefixedProperty(o,"labelX",n),l=i.getPrefixedProperty(o,"labelY",n),c=this.getLabelText(t,n);if(null!=c&&""!==c&&!isNaN(s)&&!isNaN(l)){this.setupTextStyle(e,t);var u=n?n+"-":"",d=i.getPrefixedProperty(o,"labelWidth",n),p=i.getPrefixedProperty(o,"labelHeight",n),f=i.getPrefixedProperty(o,"labelAngle",n),h=t.pstyle(u+"text-margin-x").pfValue,g=t.pstyle(u+"text-margin-y").pfValue,v=t.isEdge(),m=(t.isNode(),t.pstyle("text-halign").value),y=t.pstyle("text-valign").value;v&&(m="center",y="center"),s+=h,l+=g;var b,C=t.pstyle("text-rotation");if(0!==(b="autorotate"===C.strValue?v?f:0:"none"===C.strValue?0:C.pfValue)){var x=s,E=l;e.translate(x,E),e.rotate(b),s=0,l=0}switch(y){case"top":break;case"center":l+=p/2;break;case"bottom":l+=p}var S=t.pstyle("text-background-opacity").value,w=t.pstyle("text-border-opacity").value,V=t.pstyle("text-border-width").pfValue,R=t.pstyle("text-background-padding").pfValue;if(S>0||V>0&&w>0){var O=s-R;switch(m){case"left":O-=d;break;case"center":O-=d/2}var A=l-p-R,k=d+2*R,T=p+2*R;if(S>0){var N=e.fillStyle,D=t.pstyle("text-background-color").value;e.fillStyle="rgba("+D[0]+","+D[1]+","+D[2]+","+S*a+")","roundrectangle"==t.pstyle("text-background-shape").strValue?r(e,O,A,k,T,2):e.fillRect(O,A,k,T),e.fillStyle=N}if(V>0&&w>0){var P=e.strokeStyle,_=e.lineWidth,B=t.pstyle("text-border-color").value,M=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+B[0]+","+B[1]+","+B[2]+","+w*a+")",e.lineWidth=V,e.setLineDash)switch(M){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=V/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(O,A,k,T),"double"===M){var I=V/2;e.strokeRect(O+I,A+I,k-2*I,T-2*I)}e.setLineDash&&e.setLineDash([]),e.lineWidth=_,e.strokeStyle=P}}var F=2*t.pstyle("text-outline-width").pfValue;if(F>0&&(e.lineWidth=F),"wrap"===t.pstyle("text-wrap").value){var L=i.getPrefixedProperty(o,"labelWrapCachedLines",n),W=p/L.length;switch(y){case"top":case"center":case"bottom":l-=(L.length-1)*W}for(var U=0;U<L.length;U++)F>0&&e.strokeText(L[U],s,l),e.fillText(L[U],s,l),l+=W}else F>0&&e.strokeText(c,s,l),e.fillText(c,s,l);0!==b&&(e.rotate(-b),e.translate(-x,-E))}}},t.exports=a},{"../../../math":93,"../../../util":108}],78:[function(e,t,n){"use strict";var r=e("../../../is"),i={drawNode:function(e,t,n,i){var o,a,s=this,l=t._private.rscratch,c=t._private,u=u||t.position();if(r.number(u.x)&&r.number(u.y)&&t.visible()){var d,p,f=t.effectiveOpacity(),h=this.usePaths(),g=!1,v=t.padding();o=t.width()+2*v,a=t.height()+2*v,e.lineWidth=t.pstyle("border-width").pfValue,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m,y=t.pstyle("background-image").value,b=[],C=[],x=y.length,E=0;E<x;E++)if(m=y[E],b[E]=null!=m&&"none"!==m,b[E]){var S=t.cy().style().getIndexedStyle(t,"background-image-crossorigin","value",E);C[E]=this.getCachedImage(m,S,(function(){t.rtrigger("background")}))}var w=t.pstyle("background-color").value,V=t.pstyle("border-color").value,R=t.pstyle("border-style").value;if(this.fillStyle(e,w[0],w[1],w[2],t.pstyle("background-opacity").value*f),this.strokeStyle(e,V[0],V[1],V[2],t.pstyle("border-opacity").value*f),e.lineJoin="miter",e.setLineDash)switch(R){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var O=t.pstyle("shape").strValue,A=t.pstyle("shape-polygon-points").pfValue;if(h){var k=O+"$"+o+"$"+a+("polygon"===O?"$"+A.join("$"):"");e.translate(u.x,u.y),l.pathCacheKey===k?(d=l.pathCache,g=!0):(d=new Path2D,l.pathCacheKey=k,l.pathCache=d)}if(!g){var T=u;h&&(T={x:0,y:0}),s.nodeShapes[this.getNodeShape(t)].draw(d||e,T.x,T.y,o,a)}h?e.fill(d):e.fill();var N=c.backgrounding,D=0;for(E=0;E<x;E++)b[E]&&C[E].complete&&(D++,this.drawInscribedImage(e,C[E],t,E));c.backgrounding=!(D===x),N!==c.backgrounding&&t.updateStyle(!1);var P=t.pstyle("background-blacken").value,_=t.pstyle("border-width").pfValue;if(this.hasPie(t)&&(this.drawPie(e,t,f),0===P&&0===_||h||s.nodeShapes[this.getNodeShape(t)].draw(e,u.x,u.y,o,a)),P>0?(this.fillStyle(e,0,0,0,P),h?e.fill(d):e.fill()):P<0&&(this.fillStyle(e,255,255,255,-P),h?e.fill(d):e.fill()),_>0&&(h?e.stroke(d):e.stroke(),"double"===R)){e.lineWidth=t.pstyle("border-width").pfValue/3;var B=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",h?e.stroke(d):e.stroke(),e.globalCompositeOperation=B}h&&e.translate(-u.x,-u.y),e.setLineDash&&e.setLineDash([]),s.drawElementText(e,t,i);var M=t.pstyle("overlay-padding").pfValue,I=t.pstyle("overlay-opacity").value,F=t.pstyle("overlay-color").value;I>0&&(this.fillStyle(e,F[0],F[1],F[2],I),s.nodeShapes.roundrectangle.draw(e,u.x,u.y,o+2*M,a+2*M),e.fill()),n&&e.translate(p.x1,p.y1)}},hasPie:function(e){return(e=e[0])._private.hasPie},drawPie:function(e,t,n,r){var i=(t=t[0]).cy().style(),o=t.pstyle("pie-size"),a=t.width(),s=t.height(),l=(r=r||t.position()).x,c=r.y,u=Math.min(a,s)/2,d=0;this.usePaths()&&(l=0,c=0),"%"===o.units?u*=o.pfValue:void 0!==o.pfValue&&(u=o.pfValue/2);for(var p=1;p<=i.pieBackgroundN;p++){var f=t.pstyle("pie-"+p+"-background-size").value,h=t.pstyle("pie-"+p+"-background-color").value,g=t.pstyle("pie-"+p+"-background-opacity").value*n,v=f/100;v+d>1&&(v=1-d);var m=1.5*Math.PI+2*Math.PI*d,y=m+2*Math.PI*v;0===f||d>=1||d+v>1||(e.beginPath(),e.moveTo(l,c),e.arc(l,c,u,m,y),e.closePath(),this.fillStyle(e,h[0],h[1],h[2],g),e.fill(),d+=v)}}};t.exports=i},{"../../../is":91}],79:[function(e,t,n){"use strict";var r={},i=e("../../../util"),o=100;r.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},r.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;i<n.length;i++)if((t=n[i]).context===e){r=!1;break}return r&&(t={context:e},n.push(t)),t},r.fillStyle=function(e,t,n,r,i){e.fillStyle="rgba("+t+","+n+","+r+","+i+")"},r.strokeStyle=function(e,t,n,r,i){e.strokeStyle="rgba("+t+","+n+","+r+","+i+")"},r.matchCanvasSize=function(e){var t=this,n=t.data,r=t.findContainerClientCoords(),i=r[2],o=r[3],a=t.getPixelRatio(),s=t.motionBlurPxRatio;e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]&&e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]||(a=s);var l,c=i*a,u=o*a;if(c!==t.canvasWidth||u!==t.canvasHeight){t.fontCaches=null;var d=n.canvasContainer;d.style.width=i+"px",d.style.height=o+"px";for(var p=0;p<t.CANVAS_LAYERS;p++)(l=n.canvases[p]).width=c,l.height=u,l.style.width=i+"px",l.style.height=o+"px";for(p=0;p<t.BUFFER_COUNT;p++)(l=n.bufferCanvases[p]).width=c,l.height=u,l.style.width=i+"px",l.style.height=o+"px";t.textureMult=1,a<=1&&(l=n.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,l.width=c*t.textureMult,l.height=u*t.textureMult),t.canvasWidth=c,t.canvasHeight=u}},r.renderTo=function(e,t,n,r){this.render({forcedContext:e,forcedZoom:t,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},r.render=function(e){function t(e,t,n,r,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",u.fillStyle(e,255,255,255,u.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=o}function n(e,n){var i,o,s,d;u.clearingMotionBlur||e!==f.bufferContexts[u.MOTIONBLUR_BUFFER_NODE]&&e!==f.bufferContexts[u.MOTIONBLUR_BUFFER_DRAG]?(i=R,o=w,s=u.canvasWidth,d=u.canvasHeight):(i={x:V.x*m,y:V.y*m},o=S*m,s=u.canvasWidth*m,d=u.canvasHeight*m),e.setTransform(1,0,0,1,0,0),"motionBlur"===n?t(e,0,0,s,d):r||void 0!==n&&!n||e.clearRect(0,0,s,d),a||(e.translate(i.x,i.y),e.scale(o,o)),c&&e.translate(c.x,c.y),l&&e.scale(l,l)}var r=(e=e||i.staticEmptyObject()).forcedContext,a=e.drawAllLayers,s=e.drawOnlyNodeLayer,l=e.forcedZoom,c=e.forcedPan,u=this,d=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,p=u.cy,f=u.data,h=f.canvasNeedsRedraw,g=u.textureOnViewport&&!r&&(u.pinching||u.hoverData.dragging||u.swipePanning||u.data.wheelZooming),v=void 0!==e.motionBlur?e.motionBlur:u.motionBlur,m=u.motionBlurPxRatio,y=p.hasCompoundNodes(),b=u.hoverData.draggingEles,C=!(!u.hoverData.selecting&&!u.touchData.selecting),x=v=v&&!r&&u.motionBlurEnabled&&!C;r||(u.prevPxRatio!==d&&(u.invalidateContainerClientCoordsCache(),u.matchCanvasSize(u.container),u.redrawHint("eles",!0),u.redrawHint("drag",!0)),u.prevPxRatio=d),!r&&u.motionBlurTimeout&&clearTimeout(u.motionBlurTimeout),v&&(null==u.mbFrames&&(u.mbFrames=0),u.mbFrames++,u.mbFrames<3&&(x=!1),u.mbFrames>u.minMbLowQualFrames&&(u.motionBlurPxRatio=u.mbPxRBlurry)),u.clearingMotionBlur&&(u.motionBlurPxRatio=1),u.textureDrawLastFrame&&!g&&(h[u.NODE]=!0,h[u.SELECT_BOX]=!0);var E=p.style()._private.coreStyle,S=p.zoom(),w=void 0!==l?l:S,V=p.pan(),R={x:V.x,y:V.y},O={zoom:S,pan:{x:V.x,y:V.y}},A=u.prevViewport;void 0===A||O.zoom!==A.zoom||O.pan.x!==A.pan.x||O.pan.y!==A.pan.y||b&&!y||(u.motionBlurPxRatio=1),c&&(R=c),w*=d,R.x*=d,R.y*=d;var k=u.getCachedZSortedEles();if(g||(u.textureDrawLastFrame=!1),g){if(u.textureDrawLastFrame=!0,!u.textureCache){u.textureCache={},u.textureCache.bb=p.mutableElements().boundingBox(),u.textureCache.texture=u.data.bufferCanvases[u.TEXTURE_BUFFER];var T=u.data.bufferContexts[u.TEXTURE_BUFFER];T.setTransform(1,0,0,1,0,0),T.clearRect(0,0,u.canvasWidth*u.textureMult,u.canvasHeight*u.textureMult),u.render({forcedContext:T,drawOnlyNodeLayer:!0,forcedPxRatio:d*u.textureMult}),(O=u.textureCache.viewport={zoom:p.zoom(),pan:p.pan(),width:u.canvasWidth,height:u.canvasHeight}).mpan={x:(0-O.pan.x)/O.zoom,y:(0-O.pan.y)/O.zoom}}h[u.DRAG]=!1,h[u.NODE]=!1;var N=f.contexts[u.NODE],D=u.textureCache.texture;O=u.textureCache.viewport,u.textureCache.bb,N.setTransform(1,0,0,1,0,0),v?t(N,0,0,O.width,O.height):N.clearRect(0,0,O.width,O.height);var P=E["outside-texture-bg-color"].value,_=E["outside-texture-bg-opacity"].value;u.fillStyle(N,P[0],P[1],P[2],_),N.fillRect(0,0,O.width,O.height),S=p.zoom(),n(N,!1),N.clearRect(O.mpan.x,O.mpan.y,O.width/O.zoom/d,O.height/O.zoom/d),N.drawImage(D,O.mpan.x,O.mpan.y,O.width/O.zoom/d,O.height/O.zoom/d)}else u.textureOnViewport&&!r&&(u.textureCache=null);var B=p.extent(),M=u.pinching||u.hoverData.dragging||u.swipePanning||u.data.wheelZooming||u.hoverData.draggingEles,I=u.hideEdgesOnViewport&&M,F=[];if(F[u.NODE]=!h[u.NODE]&&v&&!u.clearedForMotionBlur[u.NODE]||u.clearingMotionBlur,F[u.NODE]&&(u.clearedForMotionBlur[u.NODE]=!0),F[u.DRAG]=!h[u.DRAG]&&v&&!u.clearedForMotionBlur[u.DRAG]||u.clearingMotionBlur,F[u.DRAG]&&(u.clearedForMotionBlur[u.DRAG]=!0),h[u.NODE]||a||s||F[u.NODE]){var L=v&&!F[u.NODE]&&1!==m;n(N=r||(L?u.data.bufferContexts[u.MOTIONBLUR_BUFFER_NODE]:f.contexts[u.NODE]),v&&!L?"motionBlur":void 0),I?u.drawCachedNodes(N,k.nondrag,d,B):u.drawLayeredElements(N,k.nondrag,d,B),u.debug&&u.drawDebugPoints(N,k.nondrag),a||v||(h[u.NODE]=!1)}if(!s&&(h[u.DRAG]||a||F[u.DRAG])&&(L=v&&!F[u.DRAG]&&1!==m,n(N=r||(L?u.data.bufferContexts[u.MOTIONBLUR_BUFFER_DRAG]:f.contexts[u.DRAG]),v&&!L?"motionBlur":void 0),I?u.drawCachedNodes(N,k.drag,d,B):u.drawCachedElements(N,k.drag,d,B),u.debug&&u.drawDebugPoints(N,k.drag),a||v||(h[u.DRAG]=!1)),u.showFps||!s&&h[u.SELECT_BOX]&&!a){if(n(N=r||f.contexts[u.SELECT_BOX]),1==u.selection[4]&&(u.hoverData.selecting||u.touchData.selecting)){S=u.cy.zoom();var W=E["selection-box-border-width"].value/S;N.lineWidth=W,N.fillStyle="rgba("+E["selection-box-color"].value[0]+","+E["selection-box-color"].value[1]+","+E["selection-box-color"].value[2]+","+E["selection-box-opacity"].value+")",N.fillRect(u.selection[0],u.selection[1],u.selection[2]-u.selection[0],u.selection[3]-u.selection[1]),W>0&&(N.strokeStyle="rgba("+E["selection-box-border-color"].value[0]+","+E["selection-box-border-color"].value[1]+","+E["selection-box-border-color"].value[2]+","+E["selection-box-opacity"].value+")",N.strokeRect(u.selection[0],u.selection[1],u.selection[2]-u.selection[0],u.selection[3]-u.selection[1]))}if(f.bgActivePosistion&&!u.hoverData.selecting){S=u.cy.zoom();var U=f.bgActivePosistion;N.fillStyle="rgba("+E["active-bg-color"].value[0]+","+E["active-bg-color"].value[1]+","+E["active-bg-color"].value[2]+","+E["active-bg-opacity"].value+")",N.beginPath(),N.arc(U.x,U.y,E["active-bg-size"].pfValue/S,0,2*Math.PI),N.fill()}var G=u.lastRedrawTime;if(u.showFps&&G){G=Math.round(G);var z=Math.round(1e3/G);N.setTransform(1,0,0,1,0,0),N.fillStyle="rgba(255, 0, 0, 0.75)",N.strokeStyle="rgba(255, 0, 0, 0.75)",N.lineWidth=1,N.fillText("1 frame = "+G+" ms = "+z+" fps",0,20);var Q=60;N.strokeRect(0,30,250,20),N.fillRect(0,30,250*Math.min(z/Q,1),20)}a||(h[u.SELECT_BOX]=!1)}if(v&&1!==m){var j=f.contexts[u.NODE],H=u.data.bufferCanvases[u.MOTIONBLUR_BUFFER_NODE],Y=f.contexts[u.DRAG],J=u.data.bufferCanvases[u.MOTIONBLUR_BUFFER_DRAG],X=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!x?e.clearRect(0,0,u.canvasWidth,u.canvasHeight):t(e,0,0,u.canvasWidth,u.canvasHeight);var i=m;e.drawImage(n,0,0,u.canvasWidth*i,u.canvasHeight*i,0,0,u.canvasWidth,u.canvasHeight)};(h[u.NODE]||F[u.NODE])&&(X(j,H,F[u.NODE]),h[u.NODE]=!1),(h[u.DRAG]||F[u.DRAG])&&(X(Y,J,F[u.DRAG]),h[u.DRAG]=!1)}u.prevViewport=O,u.clearingMotionBlur&&(u.clearingMotionBlur=!1,u.motionBlurCleared=!0,u.motionBlur=!0),v&&(u.motionBlurTimeout=setTimeout((function(){u.motionBlurTimeout=null,u.clearedForMotionBlur[u.NODE]=!1,u.clearedForMotionBlur[u.DRAG]=!1,u.motionBlur=!1,u.clearingMotionBlur=!g,u.mbFrames=0,h[u.NODE]=!0,h[u.DRAG]=!0,u.redraw()}),o)),r||p.trigger("render")},t.exports=r},{"../../../util":108}],80:[function(e,t,n){"use strict";for(var r=e("../../../math"),i={drawPolygonPath:function(e,t,n,r,i,o){var a=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+a*o[0],n+s*o[1]);for(var l=1;l<o.length/2;l++)e.lineTo(t+a*o[2*l],n+s*o[2*l+1]);e.closePath()},drawRoundRectanglePath:function(e,t,n,i,o){var a=i/2,s=o/2,l=r.getRoundRectangleRadius(i,o);e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.arcTo(t+a,n-s,t+a,n,l),e.arcTo(t+a,n+s,t,n+s,l),e.arcTo(t-a,n+s,t-a,n,l),e.arcTo(t-a,n-s,t,n-s,l),e.lineTo(t,n-s),e.closePath()},drawCutRectanglePath:function(e,t,n,i,o){var a=i/2,s=o/2,l=r.getCutRectangleCornerLength();e.beginPath&&e.beginPath(),e.moveTo(t-a+l,n-s),e.lineTo(t+a-l,n-s),e.lineTo(t+a,n-s+l),e.lineTo(t+a,n+s-l),e.lineTo(t+a-l,n+s),e.lineTo(t-a+l,n+s),e.lineTo(t-a,n+s-l),e.lineTo(t-a,n-s+l),e.closePath()}},o=Math.sin(0),a=Math.cos(0),s={},l={},c=Math.PI/40,u=0*Math.PI;u<2*Math.PI;u+=c)s[u]=Math.sin(u),l[u]=Math.cos(u);i.drawEllipsePath=function(e,t,n,r,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,i/2,0,0,2*Math.PI);else for(var u,d,p=r/2,f=i/2,h=0*Math.PI;h<2*Math.PI;h+=c)u=t-p*s[h]*o+p*l[h]*a,d=n+f*l[h]*o+f*s[h]*a,0===h?e.moveTo(u,d):e.lineTo(u,d);e.closePath()},t.exports=i},{"../../../math":93}],81:[function(e,t,n){"use strict";var r=e("../../../math"),i=e("../../../util"),o=e("../../../heap"),a=e("./texture-cache-defs"),s=25,l=50,c=-4,u=2,d=3.99,p=8,f=1024,h=1024,g=1024,v=.5,m=.8,y=10,b=!1,C=!1,x=.15,E=.1,S=.9,w=.9,V=100,R=1,O={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},A=function(e){var t=this;t.renderer=e,t.onDequeues=[],t.setupDequeueing()},k=A.prototype;k.reasons=O,k.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},k.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},k.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new o((function(e,t){return t.reqs-e.reqs}))},k.getElementIdToQueue=function(){var e=this;return e.eleIdToCacheQueue=e.eleIdToCacheQueue||{}},k.getElement=function(e,t,n,i,o){var a=this,f=this.renderer,v=e._private.rscratch,m=f.cy.zoom();if(0===t.w||0===t.h)return null;if(null==i&&(i=Math.ceil(r.log2(m*n))),i<c)i=c;else if(m>=d||i>u)return null;var y,x=Math.pow(2,i),E=t.h*x,S=t.w*x,w=v.imgCaches=v.imgCaches||{},V=w[i];if(V)return V;if(y=E<=s?s:E<=l?l:Math.ceil(E/l)*l,E>g||S>h||!b&&e.isEdge()||!C&&e.isParent())return null;var R=a.getTextureQueue(y),A=R[R.length-2],k=function(){return a.recycleTexture(y,S)||a.addTexture(y,S)};A||(A=R[R.length-1]),A||(A=k()),A.width-A.usedWidth<S&&(A=k());for(var T,N=f.eleTextBiggerThanMin(e,x),D=function(e){return e&&e.scaledLabelShown===N},P=o&&o===O.dequeue,_=o&&o===O.highQuality,B=o&&o===O.downscale,M=i+1;M<=u;M++)if(W=w[M]){T=W;break}var I=T&&T.level===i+1?T:null,F=function(){A.context.drawImage(I.texture.canvas,I.x,0,I.width,I.height,A.usedWidth,0,S,E)};if(A.context.setTransform(1,0,0,1,0,0),A.context.clearRect(A.usedWidth,0,S,y),D(I))F();else if(D(T)){if(!_)return a.queueElement(e,t,T.level-1),T;for(M=T.level;M>i;M--)I=a.getElement(e,t,n,M,O.downscale);F()}else{var L;if(!P&&!_&&!B)for(M=i-1;M>=c;M--){var W;if(W=w[M]){L=W;break}}if(D(L))return a.queueElement(e,t,i),L;A.context.translate(A.usedWidth,0),A.context.scale(x,x),f.drawElement(A.context,e,t,N),A.context.scale(1/x,1/x),A.context.translate(-A.usedWidth,0)}return V=w[i]={ele:e,x:A.usedWidth,texture:A,level:i,scale:x,width:S,height:E,scaledLabelShown:N},A.usedWidth+=Math.ceil(S+p),A.eleCaches.push(V),a.checkTextureFullness(A),V},k.invalidateElement=function(e){var t=this,n=e._private.rscratch.imgCaches;if(n)for(var r=c;r<=u;r++){var o=n[r];if(o){var a=o.texture;a.invalidatedWidth+=o.width,n[r]=null,i.removeFromArray(a.eleCaches,o),t.checkTextureUtility(a)}}},k.checkTextureUtility=function(e){e.invalidatedWidth>=v*e.width&&this.retireTexture(e)},k.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>m&&e.fullnessChecks>=y?i.removeFromArray(t,e):e.fullnessChecks++},k.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n);i.removeFromArray(r,e),e.retired=!0;for(var o=e.eleCaches,a=0;a<o.length;a++){var s=o[a],l=s.ele,c=s.level,u=l._private.rscratch.imgCaches;u&&(u[c]=null)}i.clearArray(o),t.getRetiredTextureQueue(n).push(e)},k.addTexture=function(e,t){var n={};return this.getTextureQueue(e).push(n),n.eleCaches=[],n.height=e,n.width=Math.max(f,t),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=document.createElement("canvas"),n.canvas.width=n.width,n.canvas.height=n.height,n.context=n.canvas.getContext("2d"),n},k.recycleTexture=function(e,t){for(var n=this,r=n.getTextureQueue(e),o=n.getRetiredTextureQueue(e),a=0;a<o.length;a++){var s=o[a];if(s.width>=t)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,i.clearArray(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),i.removeFromArray(o,s),r.push(s),s}},k.queueElement=function(e,t,n){var i=this,o=i.getElementQueue(),a=i.getElementIdToQueue(),s=e.id(),l=a[s];if(l)l.level=Math.max(l.level,n),l.reqs++,o.updateItem(l);else{var c={ele:e,bb:t,position:r.copyPosition(e.position()),level:n,reqs:1};e.isEdge()&&(c.positions={source:r.copyPosition(e.source().position()),target:r.copyPosition(e.target().position())}),o.push(c),a[s]=c}},k.dequeue=function(e){for(var t=this,n=t.getElementQueue(),i=t.getElementIdToQueue(),o=[],a=0;a<R&&n.size()>0;a++){var s=n.pop();i[s.ele.id()]=null,o.push(s);var l,c=s.ele;l=(!c.isEdge()||r.arePositionsSame(c.source().position(),s.positions.source)&&r.arePositionsSame(c.target().position(),s.positions.target))&&r.arePositionsSame(c.position(),s.position)?s.bb:c.boundingBox(),t.getElement(s.ele,l,e,s.level,O.dequeue)}return o},k.onDequeue=function(e){this.onDequeues.push(e)},k.offDequeue=function(e){i.removeFromArray(this.onDequeues,e)},k.setupDequeueing=a.setupDequeueing({deqRedrawThreshold:V,deqCost:x,deqAvgCost:E,deqNoDrawCost:S,deqFastCost:w,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++){var a=t[o].bb;if(r.boundingBoxesIntersect(a,i))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}}),t.exports=A},{"../../../heap":89,"../../../math":93,"../../../util":108,"./texture-cache-defs":86}],82:[function(e,t,n){"use strict";function r(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o<n.length;o++)i[o]=n.charCodeAt(o);return new Blob([r],{type:t})}function i(e){var t=e.indexOf(",");return e.substr(t+1)}function o(e,t,n){var o=t.toDataURL(n,e.quality);switch(e.output){case"blob":return r(i(o),n);case"base64":return i(o);default:return o}}var a=e("../../../is"),s={createBuffer:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,[n,n.getContext("2d")]},bufferCanvasImage:function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=e.full?Math.ceil(n.w):r[2],o=e.full?Math.ceil(n.h):r[3],s=a.number(e.maxWidth)||a.number(e.maxHeight),l=this.getPixelRatio(),c=1;if(void 0!==e.scale)i*=e.scale,o*=e.scale,c=e.scale;else if(s){var u=1/0,d=1/0;a.number(e.maxWidth)&&(u=c*e.maxWidth/i),a.number(e.maxHeight)&&(d=c*e.maxHeight/o),i*=c=Math.min(u,d),o*=c}s||(i*=l,o*=l,c*=l);var p=document.createElement("canvas");p.width=i,p.height=o,p.style.width=i+"px",p.style.height=o+"px";var f=p.getContext("2d");if(i>0&&o>0){f.clearRect(0,0,i,o),e.bg&&(f.fillStyle=e.bg,f.rect(0,0,i,o),f.fill()),f.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*c,-n.y1*c),f.scale(c,c),this.drawElements(f,h);else{var g=t.pan(),v={x:g.x*c,y:g.y*c};c*=t.zoom(),f.translate(v.x,v.y),f.scale(c,c),this.drawElements(f,h)}}return p},png:function(e){return o(e,this.bufferCanvasImage(e),"image/png")},jpg:function(e){return o(e,this.bufferCanvasImage(e),"image/jpeg")}};t.exports=s},{"../../../is":91}],83:[function(e,t,n){"use strict";function r(e){var t=this;t.data={canvases:new Array(c.CANVAS_LAYERS),contexts:new Array(c.CANVAS_LAYERS),canvasNeedsRedraw:new Array(c.CANVAS_LAYERS),bufferCanvases:new Array(c.BUFFER_COUNT),bufferContexts:new Array(c.CANVAS_LAYERS)},t.data.canvasContainer=document.createElement("div");var n=t.data.canvasContainer.style;t.data.canvasContainer.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),n.position="relative",n.zIndex="0",n.overflow="hidden";var r=e.cy.container();r.appendChild(t.data.canvasContainer),r.setAttribute("style",(r.getAttribute("style")||"")+"-webkit-tap-highlight-color: rgba(0,0,0,0);");for(var i=0;i<c.CANVAS_LAYERS;i++){var l=t.data.canvases[i]=document.createElement("canvas");t.data.contexts[i]=l.getContext("2d"),l.setAttribute("style","-webkit-user-select: none; -moz-user-select: -moz-none; user-select: none; -webkit-tap-highlight-color: rgba(0,0,0,0); outline-style: none;"+(o.ms()?" -ms-touch-action: none; touch-action: none; ":"")),l.style.position="absolute",l.setAttribute("data-id","layer"+i),l.style.zIndex=String(c.CANVAS_LAYERS-i),t.data.canvasContainer.appendChild(l),t.data.canvasNeedsRedraw[i]=!1}for(t.data.topCanvas=t.data.canvases[0],t.data.canvases[c.NODE].setAttribute("data-id","layer"+c.NODE+"-node"),t.data.canvases[c.SELECT_BOX].setAttribute("data-id","layer"+c.SELECT_BOX+"-selectbox"),t.data.canvases[c.DRAG].setAttribute("data-id","layer"+c.DRAG+"-drag"),i=0;i<c.BUFFER_COUNT;i++)t.data.bufferCanvases[i]=document.createElement("canvas"),t.data.bufferContexts[i]=t.data.bufferCanvases[i].getContext("2d"),t.data.bufferCanvases[i].style.position="absolute",t.data.bufferCanvases[i].setAttribute("data-id","buffer"+i),t.data.bufferCanvases[i].style.zIndex=String(-i-1),t.data.bufferCanvases[i].style.visibility="hidden";t.pathsEnabled=!0,t.data.eleTxrCache=new a(t),t.data.lyrTxrCache=new s(t,t.data.eleTxrCache),t.onUpdateEleCalcs((function(e,n){for(var r=0;r<n.length;r++){var i=n[r],o=i._private.rstyle.dirtyEvents;i.isNode()&&o&&1===o.length&&o.position||t.data.eleTxrCache.invalidateElement(i)}n.length>0&&t.data.lyrTxrCache.invalidateElements(n)}))}var i=e("../../../util"),o=e("../../../is"),a=e("./ele-texture-cache"),s=e("./layered-texture-cache"),l=r,c=r.prototype;c.CANVAS_LAYERS=3,c.SELECT_BOX=0,c.DRAG=1,c.NODE=2,c.BUFFER_COUNT=3,c.TEXTURE_BUFFER=0,c.MOTIONBLUR_BUFFER_NODE=1,c.MOTIONBLUR_BUFFER_DRAG=2,c.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[c.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[c.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[c.SELECT_BOX]=t}};var u="undefined"!=typeof Path2D;c.path2dEnabled=function(e){return void 0===e?this.pathsEnabled:void(this.pathsEnabled=!!e)},c.usePaths=function(){return u&&this.pathsEnabled},[e("./arrow-shapes"),e("./drawing-elements"),e("./drawing-edges"),e("./drawing-images"),e("./drawing-label-text"),e("./drawing-nodes"),e("./drawing-redraw"),e("./drawing-shapes"),e("./export-image"),e("./node-shapes")].forEach((function(e){i.extend(c,e)})),t.exports=l},{"../../../is":91,"../../../util":108,"./arrow-shapes":73,"./drawing-edges":74,"./drawing-elements":75,"./drawing-images":76,"./drawing-label-text":77,"./drawing-nodes":78,"./drawing-redraw":79,"./drawing-shapes":80,"./ele-texture-cache":81,"./export-image":82,"./layered-texture-cache":84,"./node-shapes":85}],84:[function(e,t,n){"use strict";function r(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)}var i=e("../../../util"),o=e("../../../math"),a=e("../../../heap"),s=e("../../../is"),l=e("./texture-cache-defs"),c=1,u=-4,d=2,p=3.99,f=50,h=50,g=!0,v=.15,m=.1,y=.9,b=.9,C=1,x=250,E=16e6,S=!0,w=!0,V=!0,R=function(e,t){var n=this,r=n.renderer=e;n.layersByLevel={},n.firstGet=!0,n.lastInvalidationTime=i.performanceNow()-2*x,n.skipping=!1,r.beforeRender((function(e,t){t-n.lastInvalidationTime<=x?n.skipping=!0:n.skipping=!1}));var o=function(e,t){return t.reqs-e.reqs};n.layersQueue=new a(o),n.eleTxrCache=t,n.setupEleCacheInvalidation(),n.setupDequeueing()},O=R.prototype,A=0,k=Math.pow(2,53)-1;O.makeLayer=function(e,t){var n=Math.pow(2,t),r=Math.ceil(e.w*n),i=Math.ceil(e.h*n),o=document.createElement("canvas");o.width=r,o.height=i;var a={id:A=++A%k,bb:e,level:t,width:r,height:i,canvas:o,context:o.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=a.context,l=-a.bb.x1,c=-a.bb.y1;return s.scale(n,n),s.translate(l,c),a},O.getLayers=function(e,t,n){var r=this,a=r.renderer.cy.zoom(),s=r.firstGet;if(r.firstGet=!1,null==n)if((n=Math.ceil(o.log2(a*t)))<u)n=u;else if(a>=p||n>d)return null;r.validateLayersElesOrdering(n,e);var l,f,h=r.layersByLevel,g=Math.pow(2,n),v=h[n]=h[n]||[],m=function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return f=h[t],!0},o=function(e){if(!f)for(var r=n+e;u<=r&&r<=d&&!t(r);r+=e);};o(1),o(-1);for(var a=v.length-1;a>=0;a--){var s=v[a];s.invalid&&i.removeFromArray(v,s)}};if(r.levelIsComplete(n,e))return v;m();var y=function(){if(!l){l=o.makeBoundingBox();for(var t=0;t<e.length;t++)o.updateBoundingBox(l,e[t].boundingBox())}return l},b=function(e){var t=(e=e||{}).after;if(y(),l.w*g*(l.h*g)>E)return null;var i=r.makeLayer(l,n);if(null!=t){var o=v.indexOf(t)+1;v.splice(o,0,i)}else(void 0===e.insert||e.insert)&&v.unshift(i);return i};if(r.skipping&&!s)return null;for(var C=null,x=e.length/c,w=S&&!s,V=0;V<e.length;V++){var R=e[V],O=R._private.rscratch,A=O.imgLayerCaches=O.imgLayerCaches||{},k=A[n];if(k)C=k;else{if((!C||C.eles.length>=x||!o.boundingBoxInBoundingBox(C.bb,R.boundingBox()))&&!(C=b({insert:!0,after:C})))return null;f||w?r.queueLayer(C,R):r.drawEleInLayer(C,R,n,t),C.eles.push(R),A[n]=C}}return f||(w?null:v)},O.getEleLevelForLayerLevel=function(e,t){return e},O.drawEleInLayer=function(e,t,n,i){var o=this,a=this.renderer,s=e.context,l=t.boundingBox();if(0!==l.w&&0!==l.h){var c=o.eleTxrCache,u=w?c.reasons.highQuality:void 0;n=o.getEleLevelForLayerLevel(n,i);var d=V?c.getElement(t,l,null,n,u):null;d?(g&&r(s,!1),s.drawImage(d.texture.canvas,d.x,0,d.width,d.height,l.x1,l.y1,l.w,l.h),g&&r(s,!0)):a.drawElement(s,t)}},O.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i<n.length;i++){var o=n[i];if(o.reqs>0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},O.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r<n.length;r++){for(var i=n[r],o=-1,a=0;a<t.length;a++)if(i.eles[0]===t[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]!==t[s+a]){this.invalidateLayer(i);break}}}},O.updateElementsInLayers=function(e,t){for(var n=this,r=s.element(e[0]),i=0;i<e.length;i++)for(var o=r?null:e[i],a=r?e[i]:e[i].ele,l=a._private.rscratch,c=l.imgLayerCaches=l.imgLayerCaches||{},p=u;p<=d;p++){var f=c[p];f&&(o&&n.getEleLevelForLayerLevel(f.level)!==o.level||t(f,a,o))}},O.haveLayers=function(){for(var e=this,t=!1,n=u;n<=d;n++){var r=e.layersByLevel[n];if(r&&r.length>0){t=!0;break}}return t},O.invalidateElements=function(e){var t=this;t.lastInvalidationTime=i.performanceNow(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)}))},O.invalidateLayer=function(e){if(this.lastInvalidationTime=i.performanceNow(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];i.removeFromArray(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var o=0;o<n.length;o++){var a=n[o]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},O.refineElementTextures=function(e){var t=this;t.updateElementsInLayers(e,(function(e,n,r){var i=e.replacement;if(i||((i=e.replacement=t.makeLayer(e.bb,e.level)).replaces=e,i.eles=e.eles),!i.reqs)for(var o=0;o<i.eles.length;o++)t.queueLayer(i,i.eles[o])}))},O.setupEleCacheInvalidation=function(){var e=this,t=[];if(V){var n=i.debounce((function(){e.refineElementTextures(t),t=[]}),h);e.eleTxrCache.onDequeue((function(e){for(var r=0;r<e.length;r++)t.push(e[r]);n()}))}},O.queueLayer=function(e,t){var n=this.layersQueue,r=e.elesQueue,i=r.hasId=r.hasId||{};if(!e.replacement){if(t){if(i[t.id()])return;r.push(t),i[t.id()]=!0}e.reqs?(e.reqs++,n.updateItem(e)):(e.reqs=1,n.push(e))}},O.dequeue=function(e){for(var t=this,n=t.layersQueue,r=[],i=0;i<C&&0!==n.size();){var o=n.peek();if(o.replacement)n.pop();else if(o.replaces&&o!==o.replaces.replacement)n.pop();else if(o.invalid)n.pop();else{var a=o.elesQueue.shift();a&&(t.drawEleInLayer(o,a,o.level,e),i++),0===r.length&&r.push(!0),0===o.elesQueue.length&&(n.pop(),o.reqs=0,o.replaces&&t.applyLayerReplacement(o),t.requestRedraw())}}return r},O.applyLayerReplacement=function(e){var t=this,n=t.layersByLevel[e.level],r=e.replaces,i=n.indexOf(r);if(!(i<0||r.invalid)){n[i]=e;for(var o=0;o<e.eles.length;o++){var a=e.eles[o]._private,s=a.imgLayerCaches=a.imgLayerCaches||{};s&&(s[e.level]=e)}t.requestRedraw()}},O.requestRedraw=i.debounce((function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()}),100),O.setupDequeueing=l.setupDequeueing({deqRedrawThreshold:f,deqCost:v,deqAvgCost:m,deqNoDrawCost:y,deqFastCost:b,deq:function(e,t){return e.dequeue(t)},onDeqd:i.noop,shouldRedraw:i.trueify,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}}),t.exports=R},{"../../../heap":89,"../../../is":91,"../../../math":93,"../../../util":108,"./texture-cache-defs":86}],85:[function(e,t,n){"use strict";var r={nodeShapeImpl:function(e,t,n,r,i,o,a){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,i,o);case"polygon":return this.drawPolygonPath(t,n,r,i,o,a);case"roundrectangle":return this.drawRoundRectanglePath(t,n,r,i,o);case"cutrectangle":return this.drawCutRectanglePath(t,n,r,i,o)}}};t.exports=r},{}],86:[function(e,t,n){"use strict";var r=e("../../../util"),i=1e3/60;t.exports={setupDequeueing:function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var o=r.debounce((function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()}),e.deqRedrawThreshold),a=function(a,s){for(var l=r.performanceNow(),c=n.averageRedrawTime,u=n.lastRedrawTime,d=[],p=n.cy.extent(),f=n.getPixelRatio();;){var h=r.performanceNow(),g=h-l,v=h-s;if(u<i){var m=i-(a?c:0);if(v>=e.deqFastCost*m)break}else if(a){if(g>=e.deqCost*u||g>=e.deqAvgCost*c)break}else if(v>=e.deqNoDrawCost*i)break;var y=e.deq(t,f,p);if(!(y.length>0))break;for(var b=0;b<y.length;b++)d.push(y[b])}d.length>0&&(e.onDeqd(t,d),!a&&e.shouldRedraw(t,d,f,p)&&o())},s=e.priority||r.noop;n.beforeRender(a,s(t))}}}}},{"../../../util":108}],87:[function(e,t,n){"use strict";t.exports=[{name:"null",impl:e("./null")},{name:"base",impl:e("./base")},{name:"canvas",impl:e("./canvas")}]},{"./base":69,"./canvas":83,"./null":88}],88:[function(e,t,n){"use strict";function r(e){this.options=e,this.notifications=0}var i=function(){};r.prototype={recalculateRenderedStyle:i,notify:function(){this.notifications++},init:i},t.exports=r},{}],89:[function(e,t,n){"use strict";var r,i,o,a,s,l,c,u,d,p,f,h,g,v,m;o=Math.floor,p=Math.min,i=function(e,t){return e<t?-1:e>t?1:0},d=function(e,t,n,r,a){var s;if(null==n&&(n=0),null==a&&(a=i),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);n<r;)a(t,e[s=o((n+r)/2)])<0?r=s:n=s+1;return[].splice.apply(e,[n,n-n].concat(t)),t},l=function(e,t,n){return null==n&&(n=i),e.push(t),v(e,0,e.length-1,n)},s=function(e,t){var n,r;return null==t&&(t=i),n=e.pop(),e.length?(r=e[0],e[0]=n,m(e,0,t)):r=n,r},u=function(e,t,n){var r;return null==n&&(n=i),r=e[0],e[0]=t,m(e,0,n),r},c=function(e,t,n){var r;return null==n&&(n=i),e.length&&n(e[0],t)<0&&(t=(r=[e[0],t])[0],e[0]=r[1],m(e,0,n)),t},a=function(e,t){var n,r,a,s,l,c;for(null==t&&(t=i),s=function(){c=[];for(var t=0,n=o(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)c.push(t);return c}.apply(this).reverse(),l=[],r=0,a=s.length;r<a;r++)n=s[r],l.push(m(e,n,t));return l},g=function(e,t,n){var r;if(null==n&&(n=i),-1!==(r=e.indexOf(t)))return v(e,0,r,n),m(e,r,n)},f=function(e,t,n){var r,o,s,l,u;if(null==n&&(n=i),!(o=e.slice(0,t)).length)return o;for(a(o,n),s=0,l=(u=e.slice(t)).length;s<l;s++)r=u[s],c(o,r,n);return o.sort(n).reverse()},h=function(e,t,n){var r,o,l,c,u,f,h,g,v;if(null==n&&(n=i),10*t<=e.length){if(!(l=e.slice(0,t).sort(n)).length)return l;for(o=l[l.length-1],c=0,f=(h=e.slice(t)).length;c<f;c++)n(r=h[c],o)<0&&(d(l,r,0,null,n),l.pop(),o=l[l.length-1]);return l}for(a(e,n),v=[],u=0,g=p(t,e.length);0<=g?u<g:u>g;0<=g?++u:--u)v.push(s(e,n));return v},v=function(e,t,n,r){var o,a,s;for(null==r&&(r=i),o=e[n];n>t&&r(o,a=e[s=n-1>>1])<0;)e[n]=a,n=s;return e[n]=o},m=function(e,t,n){var r,o,a,s,l;for(null==n&&(n=i),o=e.length,l=t,a=e[t],r=2*t+1;r<o;)(s=r+1)<o&&!(n(e[r],e[s])<0)&&(r=s),e[t]=e[r],r=2*(t=r)+1;return e[t]=a,v(e,l,t,n)},r=function(){function e(e){this.cmp=null!=e?e:i,this.nodes=[]}return e.push=l,e.pop=s,e.replace=u,e.pushpop=c,e.heapify=a,e.updateItem=g,e.nlargest=f,e.nsmallest=h,e.prototype.push=function(e){return l(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return u(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return c(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return a(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return g(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),t.exports=r},{}],90:[function(e,t,n){"use strict";e("./-preamble");var r=(e("./window"),e("./is")),i=e("./core"),o=e("./extension"),a=e("./stylesheet"),s=function(e){return void 0===e&&(e={}),r.plainObject(e)?new i(e):r.string(e)?o.apply(o,arguments):void 0};s.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(s),e.apply(null,t),this},s.version=e("./version"),s.stylesheet=s.Stylesheet=a,t.exports=s},{"./-preamble":1,"./core":37,"./extension":46,"./is":91,"./stylesheet":106,"./version":115,"./window":116}],91:[function(e,t,n){"use strict";var r=e("./window"),i=r?r.navigator:null,o=r?r.document:null,a="string",s=typeof{},l="function",c=typeof HTMLElement,u=function(e){return e&&e.instanceString&&d.fn(e.instanceString)?e.instanceString():null},d={defined:function(e){return null!=e},string:function(e){return null!=e&&typeof e==a},fn:function(e){return null!=e&&typeof e===l},array:function(e){return Array.isArray?Array.isArray(e):null!=e&&e instanceof Array},plainObject:function(e){return null!=e&&typeof e===s&&!d.array(e)&&e.constructor===Object},object:function(e){return null!=e&&typeof e===s},number:function(e){return null!=e&&"number"==typeof e&&!isNaN(e)},integer:function(e){return d.number(e)&&Math.floor(e)===e},bool:function(e){return null!=e&&"boolean"==typeof e},htmlElement:function(e){return"undefined"===c?void 0:null!=e&&e instanceof HTMLElement},elementOrCollection:function(e){return d.element(e)||d.collection(e)},element:function(e){return"collection"===u(e)&&e._private.single},collection:function(e){return"collection"===u(e)&&!e._private.single},core:function(e){return"core"===u(e)},style:function(e){return"style"===u(e)},stylesheet:function(e){return"stylesheet"===u(e)},event:function(e){return"event"===u(e)},thread:function(e){return"thread"===u(e)},fabric:function(e){return"fabric"===u(e)},emptyString:function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},nonemptyString:function(e){return!(!e||!d.string(e)||""===e||e.match(/^\s+$/))},domElement:function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement},boundingBox:function(e){return d.plainObject(e)&&d.number(e.x1)&&d.number(e.x2)&&d.number(e.y1)&&d.number(e.y2)},promise:function(e){return d.object(e)&&d.fn(e.then)},touch:function(){return r&&("ontouchstart"in r||r.DocumentTouch&&o instanceof DocumentTouch)},gecko:function(){return r&&("undefined"!=typeof InstallTrigger||"MozAppearance"in o.documentElement.style)},webkit:function(){return r&&("undefined"!=typeof webkitURL||"WebkitAppearance"in o.documentElement.style)},chromium:function(){return r&&"undefined"!=typeof chrome},khtml:function(){return i&&i.vendor.match(/kde/i)},khtmlEtc:function(){return d.khtml()||d.webkit()||d.chromium()},ms:function(){return i&&i.userAgent.match(/msie|trident|edge/i)},windows:function(){return i&&i.appVersion.match(/Win/i)},mac:function(){return i&&i.appVersion.match(/Mac/i)},linux:function(){return i&&i.appVersion.match(/Linux/i)},unix:function(){return i&&i.appVersion.match(/X11/i)}};t.exports=d},{"./window":116}],92:[function(e,t,n){function r(){this._obj={}}var i=r.prototype;i.set=function(e,t){this._obj[e]=t},i.delete=function(e){this._obj[e]=null},i.has=function(e){return null!=this._obj[e]},i.get=function(e){return this._obj[e]},t.exports="undefined"!=typeof Map?Map:r},{}],93:[function(e,t,n){"use strict";var r={arePositionsSame:function(e,t){return e.x===t.x&&e.y===t.y},copyPosition:function(e){return{x:e.x,y:e.y}},array2point:function(e){return{x:e[0],y:e[1]}},deg2rad:function(e){return Math.PI*e/180},getAngleFromDisp:function(e,t){return Math.atan2(t,e)-Math.PI/2}};r.log2=Math.log2||function(e){return Math.log(e)/Math.log(2)},r.signum=function(e){return e>0?1:e<0?-1:0},r.dist=function(e,t){return Math.sqrt(r.sqdist(e,t))},r.sqdist=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},r.qbezierAt=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},r.qbezierPtAt=function(e,t,n,i){return{x:r.qbezierAt(e.x,t.x,n.x,i),y:r.qbezierAt(e.y,t.y,n.y,i)}},r.lineAt=function(e,t,n,i){var o={x:t.x-e.x,y:t.y-e.y},a=r.dist(e,t),s={x:o.x/a,y:o.y/a};return n=null==n?0:n,i=null!=i?i:n*a,{x:e.x+s.x*i,y:e.y+s.y*i}},r.lineAtDist=function(e,t,n){return r.lineAt(e,t,void 0,n)},r.triangleAngle=function(e,t,n){var i=r.dist(t,n),o=r.dist(e,n),a=r.dist(e,t);return Math.acos((i*i+o*o-a*a)/(2*i*o))},r.bound=function(e,t,n){return Math.max(e,Math.min(n,t))},r.makeBoundingBox=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}}},r.updateBoundingBox=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},r.expandBoundingBoxByPoint=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},r.expandBoundingBox=function(e,t){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},r.boundingBoxesIntersect=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)},r.inBoundingBox=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},r.pointInBoundingBox=function(e,t){return this.inBoundingBox(e,t.x,t.y)},r.boundingBoxInBoundingBox=function(e,t){return r.inBoundingBox(e,t.x1,t.y1)&&r.inBoundingBox(e,t.x2,t.y2)},r.roundRectangleIntersectLine=function(e,t,n,r,i,o,a){var s,l=this.getRoundRectangleRadius(i,o),c=i/2,u=o/2,d=n-c+l-a,p=r-u-a,f=n+c-l+a,h=p;if((s=this.finiteLinesIntersect(e,t,n,r,d,p,f,h,!1)).length>0)return s;var g=n+c+a,v=r-u+l-a,m=g,y=r+u-l+a;if((s=this.finiteLinesIntersect(e,t,n,r,g,v,m,y,!1)).length>0)return s;var b=n-c+l-a,C=r+u+a,x=n+c-l+a,E=C;if((s=this.finiteLinesIntersect(e,t,n,r,b,C,x,E,!1)).length>0)return s;var S=n-c-a,w=r-u+l-a,V=S,R=r+u-l+a;if((s=this.finiteLinesIntersect(e,t,n,r,S,w,V,R,!1)).length>0)return s;var O,A=n-c+l,k=r-u+l;if((O=this.intersectLineCircle(e,t,n,r,A,k,l+a)).length>0&&O[0]<=A&&O[1]<=k)return[O[0],O[1]];var T=n+c-l,N=r-u+l;if((O=this.intersectLineCircle(e,t,n,r,T,N,l+a)).length>0&&O[0]>=T&&O[1]<=N)return[O[0],O[1]];var D=n+c-l,P=r+u-l;if((O=this.intersectLineCircle(e,t,n,r,D,P,l+a)).length>0&&O[0]>=D&&O[1]>=P)return[O[0],O[1]];var _=n-c+l,B=r+u-l;return(O=this.intersectLineCircle(e,t,n,r,_,B,l+a)).length>0&&O[0]<=_&&O[1]>=B?[O[0],O[1]]:[]},r.inLineVicinity=function(e,t,n,r,i,o,a){var s=a,l=Math.min(n,i),c=Math.max(n,i),u=Math.min(r,o),d=Math.max(r,o);return l-s<=e&&e<=c+s&&u-s<=t&&t<=d+s},r.inBezierVicinity=function(e,t,n,r,i,o,a,s,l){var c={x1:Math.min(n,a,i)-l,x2:Math.max(n,a,i)+l,y1:Math.min(r,s,o)-l,y2:Math.max(r,s,o)+l};return!(e<c.x1||e>c.x2||t<c.y1||t>c.y2)},r.solveCubic=function(e,t,n,r,i){var o,a,s,l,c,u,d,p;return s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),o=(a=(3*n-t*t)/9)*a*a+(s/=54)*s,i[1]=0,d=t/3,o>0?(c=(c=s+Math.sqrt(o))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),u=(u=s-Math.sqrt(o))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-d+c+u,d+=(c+u)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-u+c)/2,i[3]=d,void(i[5]=-d)):(i[5]=i[3]=0,0===o?(p=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*p-d,void(i[4]=i[2]=-(p+d))):(l=(a=-a)*a*a,l=Math.acos(s/Math.sqrt(l)),p=2*Math.sqrt(a),i[0]=-d+p*Math.cos(l/3),i[2]=-d+p*Math.cos((l+2*Math.PI)/3),void(i[4]=-d+p*Math.cos((l+4*Math.PI)/3))))},r.sqdistToQuadraticBezier=function(e,t,n,r,i,o,a,s){var l=1*n*n-4*n*i+2*n*a+4*i*i-4*i*a+a*a+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s,c=9*n*i-3*n*n-3*n*a-6*i*i+3*i*a+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,u=3*n*n-6*n*i+n*a-n*e+2*i*i+2*i*e-a*e+3*r*r-6*r*o+r*s-r*t+2*o*o+2*o*t-s*t,d=1*n*i-n*n+n*e-i*e+r*o-r*r+r*t-o*t,p=[];this.solveCubic(l,c,u,d,p);for(var f=1e-7,h=[],g=0;g<6;g+=2)Math.abs(p[g+1])<f&&p[g]>=0&&p[g]<=1&&h.push(p[g]);h.push(1),h.push(0);for(var v,m,y,b=-1,C=0;C<h.length;C++)v=Math.pow(1-h[C],2)*n+2*(1-h[C])*h[C]*i+h[C]*h[C]*a,m=Math.pow(1-h[C],2)*r+2*(1-h[C])*h[C]*o+h[C]*h[C]*s,y=Math.pow(v-e,2)+Math.pow(m-t,2),b>=0?y<b&&(b=y,h[C]):(b=y,h[C]);return b},r.sqdistToFiniteLine=function(e,t,n,r,i,o){var a=[e-n,t-r],s=[i-n,o-r],l=s[0]*s[0]+s[1]*s[1],c=a[0]*a[0]+a[1]*a[1],u=a[0]*s[0]+a[1]*s[1],d=u*u/l;return u<0?c:d>l?(e-i)*(e-i)+(t-o)*(t-o):c-d},r.pointInsidePolygonPoints=function(e,t,n){for(var r,i,o,a,s=0,l=0;l<n.length/2;l++)if(r=n[2*l],i=n[2*l+1],l+1<n.length/2?(o=n[2*(l+1)],a=n[2*(l+1)+1]):(o=n[2*(l+1-n.length/2)],a=n[2*(l+1-n.length/2)+1]),r==e&&o==e);else{if(!(r>=e&&e>=o||r<=e&&e<=o))continue;(e-r)/(o-r)*(a-i)+i>t&&s++}return s%2!=0},r.pointInsidePolygon=function(e,t,n,i,o,a,s,l,c){var u,d,p=new Array(n.length);null!=l[0]?(u=Math.atan(l[1]/l[0]),l[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=l;for(var f=Math.cos(-u),h=Math.sin(-u),g=0;g<p.length/2;g++)p[2*g]=a/2*(n[2*g]*f-n[2*g+1]*h),p[2*g+1]=s/2*(n[2*g+1]*f+n[2*g]*h),p[2*g]+=i,p[2*g+1]+=o;if(c>0){var v=this.expandPolygon(p,-c);d=this.joinLines(v)}else d=p;return r.pointInsidePolygonPoints(e,t,d)},r.joinLines=function(e){for(var t,n,r,i,o,a,s,l,c=new Array(e.length/2),u=0;u<e.length/4;u++){t=e[4*u],n=e[4*u+1],r=e[4*u+2],i=e[4*u+3],u<e.length/4-1?(o=e[4*(u+1)],a=e[4*(u+1)+1],s=e[4*(u+1)+2],l=e[4*(u+1)+3]):(o=e[0],a=e[1],s=e[2],l=e[3]);var d=this.finiteLinesIntersect(t,n,r,i,o,a,s,l,!0);c[2*u]=d[0],c[2*u+1]=d[1]}return c},r.expandPolygon=function(e,t){for(var n,r,i,o,a=new Array(2*e.length),s=0;s<e.length/2;s++){n=e[2*s],r=e[2*s+1],s<e.length/2-1?(i=e[2*(s+1)],o=e[2*(s+1)+1]):(i=e[0],o=e[1]);var l=o-r,c=-(i-n),u=Math.sqrt(l*l+c*c),d=l/u,p=c/u;a[4*s]=n+d*t,a[4*s+1]=r+p*t,a[4*s+2]=i+d*t,a[4*s+3]=o+p*t}return a},r.intersectLineEllipse=function(e,t,n,r,i,o){var a=n-e,s=r-t;a/=i,s/=o;var l=Math.sqrt(a*a+s*s),c=l-1;if(c<0)return[];var u=c/l;return[(n-e)*u+e,(r-t)*u+t]},r.intersectLineCircle=function(e,t,n,r,i,o,a){var s=[n-e,r-t],l=[e-i,t-o],c=s[0]*s[0]+s[1]*s[1],u=2*(l[0]*s[0]+l[1]*s[1]),d=u*u-4*c*(l[0]*l[0]+l[1]*l[1]-a*a);if(d<0)return[];var p=(-u+Math.sqrt(d))/(2*c),f=(-u-Math.sqrt(d))/(2*c),h=Math.min(p,f),g=Math.max(p,f),v=[];if(h>=0&&h<=1&&v.push(h),g>=0&&g<=1&&v.push(g),0===v.length)return[];var m=v[0]*s[0]+e,y=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[m,y]:[m,y,v[1]*s[0]+e,v[1]*s[1]+t]:[m,y]},r.findCircleNearPoint=function(e,t,n,r,i){var o=r-e,a=i-t,s=Math.sqrt(o*o+a*a);return[e+o/s*n,t+a/s*n]},r.findMaxSqDistanceToOrigin=function(e){for(var t,n=1e-6,r=0;r<e.length/2;r++)(t=e[2*r]*e[2*r]+e[2*r+1]*e[2*r+1])>n&&(n=t);return n},r.midOfThree=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},r.finiteLinesIntersect=function(e,t,n,r,i,o,a,s,l){var c=e-i,u=n-e,d=a-i,p=t-o,f=r-t,h=s-o,g=d*p-h*c,v=u*p-f*c,m=h*u-d*f;if(0!==m){var y=g/m,b=v/m,C=.001,x=0-C,E=1+C;return x<=y&&y<=E&&x<=b&&b<=E||l?[e+y*u,t+y*f]:[]}return 0===g||0===v?this.midOfThree(e,n,a)===a?[a,s]:this.midOfThree(e,n,i)===i?[i,o]:this.midOfThree(i,a,n)===n?[n,r]:[]:[]},r.polygonIntersectLine=function(e,t,n,i,o,a,s,l){var c,u,d,p,f,h,g=[],v=new Array(n.length),m=!0;if(5===arguments.length&&(m=!1),m){for(var y=0;y<v.length/2;y++)v[2*y]=n[2*y]*a+i,v[2*y+1]=n[2*y+1]*s+o;if(l>0){var b=r.expandPolygon(v,-l);u=r.joinLines(b)}else u=v}else u=n;for(y=0;y<u.length/2;y++)d=u[2*y],p=u[2*y+1],y<u.length/2-1?(f=u[2*(y+1)],h=u[2*(y+1)+1]):(f=u[0],h=u[1]),0!==(c=this.finiteLinesIntersect(e,t,i,o,d,p,f,h)).length&&g.push(c[0],c[1]);return g},r.shortenIntersection=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(r[0]*r[0]+r[1]*r[1]),o=(i-n)/i;return o<0&&(o=1e-5),[t[0]+o*r[0],t[1]+o*r[1]]},r.generateUnitNgonPointsFitToSquare=function(e,t){var n=r.generateUnitNgonPoints(e,t);return r.fitPolygonToSquare(n)},r.fitPolygonToSquare=function(e){for(var t,n,r=e.length/2,i=1/0,o=1/0,a=-1/0,s=-1/0,l=0;l<r;l++)t=e[2*l],n=e[2*l+1],i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);var c=2/(a-i),u=2/(s-o);for(l=0;l<r;l++)t=e[2*l]=e[2*l]*c,n=e[2*l+1]=e[2*l+1]*u,i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);if(o<-1)for(l=0;l<r;l++)n=e[2*l+1]=e[2*l+1]+(-1-o);return e},r.generateUnitNgonPoints=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var i,o=new Array(2*e),a=0;a<e;a++)i=a*n+r,o[2*a]=Math.cos(i),o[2*a+1]=Math.sin(-i);return o},r.getRoundRectangleRadius=function(e,t){return Math.min(e/4,t/4,8)},r.getCutRectangleCornerLength=function(){return 8},t.exports=r},{}],94:[function(e,t,n){"use strict";var r=0,i=1,o=2,a=function(e){return this instanceof a?(this.id="Thenable/1.0.7",this.state=r,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},void("function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this)))):new a(e)};a.prototype={fulfill:function(e){return s(this,i,"fulfillValue",e)},reject:function(e){return s(this,o,"rejectReason",e)},then:function(e,t){var n=this,r=new a;return n.onFulfilled.push(u(e,r,"fulfill")),n.onRejected.push(u(t,r,"reject")),l(n),r.proxy}};var s=function(e,t,n,i){return e.state===r&&(e.state=t,e[n]=i,l(e)),e},l=function(e){e.state===i?c(e,"onFulfilled",e.fulfillValue):e.state===o&&c(e,"onRejected",e.rejectReason)},c=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e<r.length;e++)r[e](n)};"function"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},u=function(e,t,n){return function(r){if("function"!=typeof e)t[n].call(t,r);else{var i;try{i=e(r)}catch(e){return void t.reject(e)}d(t,i)}}},d=function(e,t){if(e!==t&&e.proxy!==t){var n;if("object"==typeof t&&null!==t||"function"==typeof t)try{n=t.then}catch(t){return void e.reject(t)}if("function"!=typeof n)e.fulfill(t);else{var r=!1;try{n.call(t,(function(n){r||(r=!0,n===t?e.reject(new TypeError("circular thenable chain")):d(e,n))}),(function(t){r||(r=!0,e.reject(t))}))}catch(t){r||e.reject(t)}}}else e.reject(new TypeError("cannot resolve promise with itself"))};a.all=function(e){return new a((function(t,n){for(var r=new Array(e.length),i=0,o=function(n,o){r[n]=o,++i===e.length&&t(r)},a=0;a<e.length;a++)!function(t){var r=e[t];null!=r&&null!=r.then?r.then((function(e){o(t,e)}),(function(e){n(e)})):o(t,r)}(a)}))},a.resolve=function(e){return new a((function(t,n){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},t.exports="undefined"!=typeof Promise?Promise:a},{}],95:[function(e,t,n){"use strict";var r=e("./is"),i=e("./util"),o=[{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:":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(e,t){return i.sort.descending(e.selector,t.selector)})),a=function(e,t){var n=a.lookup=a.lookup||function(){for(var e,t={},n=0;n<o.length;n++)t[(e=o[n]).selector]=e.matches;return t}();return n[e](t)},s="("+o.map((function(e){return e.selector})).join("|")+")",l=function(e){var t=this;t._private={selectorText:null,invalid:!0};var n=function(){return{length:0,classes:[],colonSelectors:[],data:[],group:null,ids:[],meta:[],collection:null,filter:null,parent:null,ancestor:null,subject:null,child:null,descendant:null}};if(!e||r.string(e)&&e.match(/^\s*$/))t.length=0;else if("*"===e||"edge"===e||"node"===e)t[0]=n(),t[0].group="*"===e?e:e+"s",t[0].groupOnly=!0,t[0].length=1,t._private.invalid=!1,t._private.selectorText=e,t.length=1;else if(r.elementOrCollection(e)){var o=e.collection();t[0]=n(),t[0].collection=o,t[0].length=1,t.length=1}else if(r.fn(e))t[0]=n(),t[0].filter=e,t[0].length=1,t.length=1;else{if(!r.string(e))return void i.error("A selector must be created from a string; found "+e);var a=null,l={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:i.regex.number,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$"};l.variable="(?:[\\w-]|(?:\\\\"+l.metaChar+"))+",l.value=l.string+"|"+l.number,l.className=l.variable,l.id=l.variable;var c,u,d,p=function(e){return e.replace(new RegExp("\\\\("+l.metaChar+")","g"),(function(e,t){return t}))};for(c=l.comparatorOp.split("|"),d=0;d<c.length;d++)u=c[d],l.comparatorOp+="|@"+u;for(c=l.comparatorOp.split("|"),d=0;d<c.length;d++)(u=c[d]).indexOf("!")>=0||"="!==u&&(l.comparatorOp+="|\\!"+u);var f=[{name:"group",query:!0,regex:"(node|edge|\\*)",populate:function(e){this.group="*"===e?e:e+"s"}},{name:"state",query:!0,regex:s,populate:function(e){this.colonSelectors.push(e)}},{name:"id",query:!0,regex:"\\#("+l.id+")",populate:function(e){this.ids.push(p(e))}},{name:"className",query:!0,regex:"\\.("+l.className+")",populate:function(e){this.classes.push(p(e))}},{name:"dataExists",query:!0,regex:"\\[\\s*("+l.variable+")\\s*\\]",populate:function(e){this.data.push({field:p(e)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+l.variable+")\\s*("+l.comparatorOp+")\\s*("+l.value+")\\s*\\]",populate:function(e,t,n){n=null!=new RegExp("^"+l.string+"$").exec(n)?n.substring(1,n.length-1):parseFloat(n),this.data.push({field:p(e),operator:t,value:n})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+l.boolOp+")\\s*("+l.variable+")\\s*\\]",populate:function(e,t){this.data.push({field:p(t),operator:e})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+l.meta+")\\s*("+l.comparatorOp+")\\s*("+l.number+")\\s*\\]\\]",populate:function(e,t,n){this.meta.push({field:p(e),operator:t,value:parseFloat(n)})}},{name:"nextQuery",separator:!0,regex:l.separator,populate:function(){t[++d]=n(),a=null}},{name:"child",separator:!0,regex:l.child,populate:function(){var e=n();e.parent=this,e.subject=a,t[d]=e}},{name:"descendant",separator:!0,regex:l.descendant,populate:function(){var e=n();e.ancestor=this,e.subject=a,t[d]=e}},{name:"subject",modifier:!0,regex:l.subject,populate:function(){return null!=a&&this.subject!=this?(i.error("Redefinition of subject in selector `"+e+"`"),!1):(a=this,void(this.subject=this))}}];t._private.selectorText=e;var h=e;d=0;var g,v=function(e){for(var t,n,i,o=0;o<f.length;o++){var a=f[o],s=a.name;if(!r.fn(e)||e(s,a)){var l=h.match(new RegExp("^"+a.regex));if(null!=l){n=l,t=a,i=s;var c=l[0];h=h.substring(c.length);break}}}return{expr:t,match:n,name:i}},m=function(){var e=h.match(/^\s+/);if(e){var t=e[0];h=h.substring(t.length)}};for(t[0]=n(),m();;){var y=v();if(null==y.expr)return void i.error("The selector `"+e+"`is invalid");var b=[];for(g=1;g<y.match.length;g++)b.push(y.match[g]);if(t[d].length++,!1===y.expr.populate.apply(t[d],b))return;if(h.match(/^\s*$/))break}for(t.length=d+1,g=0;g<t.length;g++){var C=t[g];if(null!=C.subject){for(;C.subject!=C;)if(null!=C.parent){var x=C.parent,E=C;E.parent=null,x.child=E,C=x}else{if(null==C.ancestor){i.error("When adjusting references for the selector `"+C+"`, neither parent nor ancestor was found");break}var S=C.ancestor,w=C;w.ancestor=null,S.descendant=w,C=S}t[g]=C.subject}}}t._private.invalid=!1},c=l.prototype;c.size=function(){return this.length},c.eq=function(e){return this[e]};var u=function(e,t){if(e.groupOnly)return"*"===e.group||e.group===t.group();if(null!=e.group&&"*"!=e.group&&e.group!=t.group())return!1;var n,i=t.cy(),o=!0;for(n=0;n<e.colonSelectors.length;n++){var s=e.colonSelectors[n];if(!(o=a(s,t)))break}if(!o)return!1;var l=!0;for(n=0;n<e.ids.length;n++){var c=e.ids[n],d=t.id();if(!(l=l&&c==d))break}if(!l)return!1;var p=!0;for(n=0;n<e.classes.length;n++){var f=e.classes[n];if(!(p=p&&t.hasClass(f)))break}if(!p)return!1;var h=function(t){for(var n=!0,i=0;i<e[t.name].length;i++){var o,a=e[t.name][i],s=a.operator,l=a.value,c=a.field,u=t.fieldValue(c);if(null!=s&&null!=l){var d=r.string(u)||r.number(u)?""+u:"",p=""+l,f=!1;s.indexOf("@")>=0&&(d=d.toLowerCase(),p=p.toLowerCase(),s=s.replace("@",""),f=!0);var h=!1;s.indexOf("!")>=0&&(s=s.replace("!",""),h=!0),f&&(l=p.toLowerCase(),u=d.toLowerCase());var g=!1;switch(s){case"*=":o=d.indexOf(p)>=0;break;case"$=":o=d.indexOf(p,d.length-p.length)>=0;break;case"^=":o=0===d.indexOf(p);break;case"=":o=u===l;break;case">":g=!0,o=u>l;break;case">=":g=!0,o=u>=l;break;case"<":g=!0,o=u<l;break;case"<=":g=!0,o=u<=l;break;default:o=!1}!h||null==u&&g||(o=!o)}else if(null!=s)switch(s){case"?":o=!!u;break;case"!":o=!u;break;case"^":o=void 0===u}else o=void 0!==u;if(!o){n=!1;break}}return n},g=h({name:"data",fieldValue:function(e){return t.data(e)}});if(!g)return!1;var v=h({name:"meta",fieldValue:function(e){return t[e]()}});if(!v)return!1;if(null!=e.collection&&!e.collection.hasElementWithId(t.id()))return!1;if(null!=e.filter&&t.collection().some(e.filter))return!1;var m=function(e,t){if(null!=e){var n=!1;if(!i.hasCompoundNodes())return!1;t=t();for(var r=0;r<t.length;r++)if(u(e,t[r])){n=!0;break}return n}return!0};return!!(m(e.parent,(function(){return t.parent()}))&&m(e.ancestor,(function(){return t.parents()}))&&m(e.child,(function(){return t.children()}))&&m(e.descendant,(function(){return t.descendants()})))};c.filter=function(e){var t=this,n=e.cy();if(t._private.invalid)return n.collection();if(1===t.length&&1===t[0].length&&1===t[0].ids.length)return e.getElementById(t[0].ids[0]).collection();var r=function(e){for(var n=0;n<t.length;n++){var r=t[n];if(u(r,e))return!0}return!1};return null==t._private.selectorText&&(r=function(){return!0}),e.filter(r)},c.matches=function(e){var t=this;if(t._private.invalid)return!1;for(var n=0;n<t.length;n++){var r=t[n];if(u(r,e))return!0}return!1},c.toString=c.selector=function(){for(var e="",t=function(e){return null==e?"":e},n=function(e){return r.string(e)?'"'+e+'"':t(e)},i=function(e){return" "+e+" "},o=function(e){var r,s="";e.subject===e&&(s+="$");var l=t(e.group);for(s+=l.substring(0,l.length-1),r=0;r<e.data.length;r++){var c=e.data[r];s+=c.value?"["+c.field+i(t(c.operator))+n(c.value)+"]":"["+t(c.operator)+c.field+"]"}for(r=0;r<e.meta.length;r++){var u=e.meta[r];s+="[["+u.field+i(t(u.operator))+n(u.value)+"]]"}for(r=0;r<e.colonSelectors.length;r++)s+=e.colonSelectors[a];for(r=0;r<e.ids.length;r++)s+="#"+e.ids[a];for(r=0;r<e.classes.length;r++)s+="."+e.classes[r];return null!=e.parent&&(s=o(e.parent)+" > "+s),null!=e.ancestor&&(s=o(e.ancestor)+" "+s),null!=e.child&&(s+=" > "+o(e.child)),null!=e.descendant&&(s+=" "+o(e.descendant)),s},a=0;a<this.length;a++){var s=this[a];e+=o(s),this.length>1&&a<this.length-1&&(e+=", ")}return e},t.exports=l},{"./is":91,"./util":108}],96:[function(e,t,n){function r(){this._obj={}}var i=r.prototype;i.add=function(e){this._obj[e]=1},i.remove=function(e){this._obj[e]=0},i.has=function(e){return 1===this._obj[e]},t.exports="undefined"!=typeof Set?Set:r},{}],97:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../promise"),a={apply:function(e){var t=this,n=t._private,r=n.cy.collection();n.newStyle&&(n.contextStyles={},n.propDiffs={},t.cleanElements(e,!0));for(var i=0;i<e.length;i++){var o=e[i],a=t.getContextMeta(o);if(!a.empty){r.merge(o);var s=t.getContextStyle(a),l=t.applyContextStyle(a,s,o);n.newStyle||t.updateTransitions(o,l.diffProps),t.updateStyleHints(o)}}return n.newStyle=!1,r},getPropertiesDiff:function(e,t){var n=this,r=n._private.propDiffs=n._private.propDiffs||{},i=e+"-"+t,o=r[i];if(o)return o;for(var a=[],s={},l=0;l<n.length;l++){var c=n[l],u="t"===e[l]!=("t"===t[l]),d=c.mappedProperties.length>0;if(u||d){var p;u&&d||u?p=c.properties:d&&(p=c.mappedProperties);for(var f=0;f<p.length;f++){for(var h=p[f],g=h.name,v=!1,m=l+1;m<n.length;m++){var y=n[m];if("t"===t[m]&&(v=null!=y.properties[h.name]))break}s[g]||v||(s[g]=!0,a.push(g))}}}return r[i]=a,a},getContextMeta:function(e){var t,n=this,r="",i=e._private.styleCxtKey||"";n._private.newStyle&&(i="");for(var o=0;o<n.length;o++){var a=n[o];r+=a.selector&&a.selector.matches(e)?"t":"f"}return t=n.getPropertiesDiff(i,r),e._private.styleCxtKey=r,{key:r,diffPropNames:t,empty:0===t.length}},getContextStyle:function(e){var t=e.key,n=this,r=this._private.contextStyles=this._private.contextStyles||{};if(r[t])return r[t];for(var i={_private:{key:t}},o=0;o<n.length;o++){var a=n[o];if("t"===t[o])for(var s=0;s<a.properties.length;s++){var l=a.properties[s];i[l.name]=l}}return r[t]=i,i},applyContextStyle:function(e,t,n){for(var r=this,i=e.diffPropNames,o={},a=0;a<i.length;a++){var s=i[a],l=t[s],c=n.pstyle(s);if(!l){if(!c)continue;l=c.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(c!==l){var u=o[s]={prev:c};r.applyParsedProperty(n,l),u.next=n.pstyle(s),u.next&&u.next.bypass&&(u.next=u.next.bypassed)}}return{diffProps:o}},updateStyleHints:function(e){var t=e._private,n=this;if(!e.removed()){var r=!1;if("nodes"===t.group)for(var i=1;i<=n.pieBackgroundN;i++)if((u=e.pstyle("pie-"+i+"-background-size").value)>0){r=!0;break}t.hasPie=r;var o=e.pstyle("text-transform").strValue,a=e.pstyle("label").strValue,s=e.pstyle("source-label").strValue,l=e.pstyle("target-label").strValue,c=e.pstyle("font-style").strValue,u=e.pstyle("font-size").pfValue+"px",d=e.pstyle("font-family").strValue,p=e.pstyle("font-weight").strValue,f=c+"$"+u+"$"+d+"$"+p+"$"+o+"$"+e.pstyle("text-valign").strValue+"$"+e.pstyle("text-valign").strValue+"$"+e.pstyle("text-outline-width").pfValue+"$"+e.pstyle("text-wrap").strValue+"$"+e.pstyle("text-max-width").pfValue;t.labelStyleKey=f,t.sourceLabelKey=f+"$"+s,t.targetLabelKey=f+"$"+l,t.labelKey=f+"$"+a,t.fontKey=c+"$"+p+"$"+u+"$"+d,t.styleKey=Date.now()}},applyParsedProperty:function(e,t){var n,o=this,a=t,s=e._private.style,l=o.types,c=o.properties[a.name].type,u=a.bypass,d=s[a.name],p=d&&d.bypass,f=e._private,h="mapping";if("curve-style"===t.name&&"haystack"===t.value&&e.isEdge()&&(e.isLoop()||e.source().isParent()||e.target().isParent())&&(a=t=this.parse(t.name,"bezier",u)),a.delete)return s[a.name]=void 0,!0;if(a.deleteBypassed)return!d||!!d.bypass&&(d.bypassed=void 0,!0);if(a.deleteBypass)return!d||!!d.bypass&&(s[a.name]=d.bypassed,!0);var g=function(){r.error("Do not assign mappings to elements without corresponding data (e.g. ele `"+e.id()+"` for property `"+a.name+"` with data field `"+a.field+"`); try a `["+a.field+"]` selector to limit scope to elements with `"+a.field+"` defined")};switch(a.mapped){case l.mapData:for(var v=a.field.split("."),m=f.data,y=0;y<v.length&&m;y++)m=m[v[y]];var b;if((b=i.number(m)?(m-a.fieldMin)/(a.fieldMax-a.fieldMin):0)<0?b=0:b>1&&(b=1),c.color){var C=a.valueMin[0],x=a.valueMax[0],E=a.valueMin[1],S=a.valueMax[1],w=a.valueMin[2],V=a.valueMax[2],R=null==a.valueMin[3]?1:a.valueMin[3],O=null==a.valueMax[3]?1:a.valueMax[3],A=[Math.round(C+(x-C)*b),Math.round(E+(S-E)*b),Math.round(w+(V-w)*b),Math.round(R+(O-R)*b)];n={bypass:a.bypass,name:a.name,value:A,strValue:"rgb("+A[0]+", "+A[1]+", "+A[2]+")"}}else{if(!c.number)return!1;var k=a.valueMin+(a.valueMax-a.valueMin)*b;n=this.parse(a.name,k,a.bypass,h)}n||(n=this.parse(a.name,d.strValue,a.bypass,h)),n||g(),n.mapping=a,a=n;break;case l.data:if(v=a.field.split("."),m=f.data)for(y=0;y<v.length;y++)m=m[v[y]];if(!(n=this.parse(a.name,m,a.bypass,h))){var T=d?d.strValue:"";n=this.parse(a.name,T,a.bypass,h)}n||g(),n.mapping=a,a=n;break;case l.fn:var N=(0,a.value)(e);(n=this.parse(a.name,N,a.bypass,h)).mapping=a,a=n;break;case void 0:break;default:return!1}return u?(a.bypassed=p?d.bypassed:d,s[a.name]=a):p?d.bypassed=a:s[a.name]=a,this.checkZOrderTrigger(e,a.name,d?d.value:null,a.value),!0},cleanElements:function(e,t){for(var n=this.properties,r=0;r<e.length;r++){var i=e[r];if(t)for(var o=i._private.style,a=0;a<n.length;a++){var s=n[a],l=o[s.name];l&&(l.bypass?l.bypassed=null:o[s.name]=null)}else i._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateMappers:function(e){for(var t=this,n=this._private.cy.collection(),r=0;r<e.length;r++){for(var i=e[r],o=i._private.style,a=!1,s=0;s<t.properties.length;s++){var l=o[t.properties[s].name];if(l&&l.mapping){var c=l.mapping;this.applyParsedProperty(i,c),a=!0}}a&&(this.updateStyleHints(i),n.merge(i))}return n},updateTransitions:function(e,t,n){var r=this,a=e._private,s=e.pstyle("transition-property").value,l=e.pstyle("transition-duration").pfValue,c=e.pstyle("transition-delay").pfValue;if(s.length>0&&l>0){for(var u={},d=!1,p=0;p<s.length;p++){var f=s[p],h=e.pstyle(f),g=t[f];if(g){var v,m=g.prev,y=null!=g.next?g.next:h,b=!1,C=1e-6;m&&(i.number(m.pfValue)&&i.number(y.pfValue)?(b=y.pfValue-m.pfValue,v=m.pfValue+C*b):i.number(m.value)&&i.number(y.value)?(b=y.value-m.value,v=m.value+C*b):i.array(m.value)&&i.array(y.value)&&(b=m.value[0]!==y.value[0]||m.value[1]!==y.value[1]||m.value[2]!==y.value[2],v=m.strValue),b&&(u[f]=y.strValue,this.applyBypass(e,f,v),d=!0))}}if(!d)return;a.transitioning=!0,new o((function(t){c>0?e.delayAnimation(c).play().promise().then(t):t()})).then((function(){return e.animation({style:u,duration:l,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){r.removeBypasses(e,s),e.rtrigger("style"),a.transitioning=!1}))}else a.transitioning&&(this.removeBypasses(e,s),e.rtrigger("style"),a.transitioning=!1)},checkZOrderTrigger:function(e,t,n,r){var i=this.properties[t];i.triggersZOrder&&(null==n||i.triggersZOrder(n,r))&&this._private.cy.notify({type:"zorder",eles:e})}};t.exports=a},{"../is":91,"../promise":94,"../util":108}],98:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o={applyBypass:function(e,t,n,o){var a=this,s=[],l=!0;if("*"===t||"**"===t){if(void 0!==n)for(var c=0;c<a.properties.length;c++)t=(f=a.properties[c]).name,(p=this.parse(t,n,!0))&&s.push(p)}else if(r.string(t))(p=this.parse(t,n,!0))&&s.push(p);else{if(!r.plainObject(t))return!1;var u=t;o=n;var d=Object.keys(u);for(c=0;c<d.length;c++){t=d[c];var p,f=a.properties[t];void 0===(n=u[t])&&(n=u[i.dash2camel(t)]),void 0!==n&&(p=this.parse(t,n,!0))&&s.push(p)}}if(0===s.length)return!1;var h=!1;for(c=0;c<e.length;c++){for(var g,v=e[c],m={},y=0;y<s.length;y++){if(f=s[y],o){var b=v.pstyle(f.name);g=m[f.name]={prev:b}}h=this.applyParsedProperty(v,f)||h,o&&(g.next=v.pstyle(f.name))}h&&this.updateStyleHints(v),o&&this.updateTransitions(v,m,l)}return h},overrideBypass:function(e,t,n){t=i.camel2dash(t);for(var r=0;r<e.length;r++){var o=e[r],a=o._private.style[t],s=this.properties[t].type,l=s.color,c=s.mutiple;if(a&&a.bypass){var u=null!=a.pfValue?a.pfValue:a.value;a.value=n,null!=a.pfValue&&(a.pfValue=n),a.strValue=l?"rgb("+n.join(",")+")":c?n.join(" "):""+n,this.checkZOrderTrigger(o,t,u,n)}else this.applyBypass(o,t,n)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,n){for(var r=!0,i=0;i<e.length;i++){for(var o=e[i],a={},s=0;s<t.length;s++){var l=t[s],c=this.properties[l],u=o.pstyle(c.name);if(u&&u.bypass){var d="",p=this.parse(l,d,!0),f=a[c.name]={prev:u};this.applyParsedProperty(o,p),f.next=o.pstyle(c.name)}}this.updateStyleHints(o),n&&this.updateTransitions(o,a,r)}}};t.exports=o},{"../is":91,"../util":108}],99:[function(e,t,n){"use strict";var r=e("../window"),i={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy.container();if(r&&t&&r.getComputedStyle)return r.getComputedStyle(t).getPropertyValue(e)}};t.exports=i},{"../window":116}],100:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){var n=this;if(e=e[0]){for(var i={},o=0;o<n.properties.length;o++){var a=n.properties[o],s=n.getStylePropertyValue(e,a.name,t);null!=s&&(i[a.name]=s,i[r.dash2camel(a.name)]=s)}return i}},getIndexedStyle:function(e,t,n,r){var i=e.pstyle(t)[n][r];return null!=i?i:e.cy().style().getDefaultProperty(t)[n][0]},getStylePropertyValue:function(e,t,n){var r=this;if(e=e[0]){var i=r.properties[t];i.alias&&(i=i.pointsTo);var o=i.type,a=e.pstyle(i.name),s=e.cy().zoom();if(a){var l=a.units?o.implicitUnits||"px":null,c=l?[].concat(a.pfValue).map((function(e){return e*(n?s:1)+l})).join(" "):a.strValue;return c}}},getAnimationStartStyle:function(e,t){for(var n={},r=0;r<t.length;r++){var o=t[r].name,a=e.pstyle(o);void 0!==a&&(a=i.plainObject(a)?this.parse(o,a.strValue):this.parse(o,a)),a&&(n[o]=a)}return n},getPropsList:function(e){var t=[],n=e,i=this.properties;if(n)for(var o=Object.keys(n),a=0;a<o.length;a++){var s=o[a],l=n[s],c=i[s]||i[r.camel2dash(s)],u=this.parse(c.name,l);u&&t.push(u)}return t}};t.exports=o},{"../is":91,"../util":108}],101:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../selector"),a=function(e){return this instanceof a?r.core(e)?(this._private={cy:e,coreStyle:{}},this.length=0,void this.resetToDefault()):void i.error("A style must have a core reference"):new a(e)},s=a.prototype;s.instanceString=function(){return"style"},s.clear=function(){for(var e=0;e<this.length;e++)this[e]=void 0;return this.length=0,this._private.newStyle=!0,this},s.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},s.core=function(){return this._private.coreStyle},s.selector=function(e){var t="core"===e?null:new o(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},s.css=function(){var e=this,t=arguments;switch(t.length){case 1:for(var n=t[0],r=0;r<e.properties.length;r++){var o=e.properties[r],a=n[o.name];void 0===a&&(a=n[i.dash2camel(o.name)]),void 0!==a&&this.cssRule(o.name,a)}break;case 2:this.cssRule(t[0],t[1])}return this},s.style=s.css,s.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.mapped&&this[r].mappedProperties.push(n),!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},a.fromJson=function(e,t){var n=new a(e);return n.fromJson(t),n},a.fromString=function(e,t){return new a(e).fromString(t)},[e("./apply"),e("./bypass"),e("./container"),e("./get-for-ele"),e("./json"),e("./string-sheet"),e("./properties"),e("./parse")].forEach((function(e){i.extend(s,e)})),a.types=s.types,a.properties=s.properties,t.exports=a},{"../is":91,"../selector":95,"../util":108,"./apply":97,"./bypass":98,"./container":99,"./get-for-ele":100,"./json":102,"./parse":103,"./properties":104,"./string-sheet":105}],102:[function(e,t,n){"use strict";var r={applyFromJson:function(e){for(var t=this,n=0;n<e.length;n++){var r=e[n],i=r.selector,o=r.style||r.css,a=Object.keys(o);t.selector(i);for(var s=0;s<a.length;s++){var l=a[s],c=o[l];t.css(l,c)}}return t},fromJson:function(e){var t=this;return t.resetToDefault(),t.applyFromJson(e),t},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var n=this[t],r=n.selector,i=n.properties,o={},a=0;a<i.length;a++){var s=i[a];o[s.name]=s.strValue}e.push({selector:r?r.toString():"core",style:o})}return e}};t.exports=r},{}],103:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../math"),a={parse:function(e,t,n,o){var a=this;if(i.fn(t))return a.parseImplWarn(e,t,n,o);var s,l=[e,t,n,"mapping"===o||!0===o||!1===o||null==o?"dontcare":o].join("$"),c=a.propCache=a.propCache||{};return(s=c[l])||(s=c[l]=a.parseImplWarn(e,t,n,o)),(n||"mapping"===o)&&(s=r.copy(s))&&(s.value=r.copy(s.value)),s},parseImplWarn:function(e,t,n,i){var o=this.parseImpl(e,t,n,i);return o||null==t||r.error("The style property `%s: %s` is invalid",e,t),o},parseImpl:function(e,t,n,a){var s=this;e=r.camel2dash(e);var l=s.properties[e],c=t,u=s.types;if(!l)return null;if(null==t)return null;l.alias&&(l=l.pointsTo,e=l.name);var d=i.string(t);d&&(t=t.trim());var p,f,h=l.type;if(!h)return null;if(n&&(""===t||null===t))return{name:e,value:t,bypass:!0,deleteBypass:!0};if(i.fn(t))return{name:e,value:t,strValue:"fn",mapped:u.fn,bypass:n};if(!d||a);else{if(p=new RegExp(u.data.regex).exec(t)){if(n)return!1;var g=u.data;return{name:e,value:p,strValue:""+t,mapped:g,field:p[1],bypass:n}}if(f=new RegExp(u.mapData.regex).exec(t)){if(n)return!1;if(h.multiple)return!1;if(g=u.mapData,!h.color&&!h.number)return!1;var v=this.parse(e,f[4]);if(!v||v.mapped)return!1;var m=this.parse(e,f[5]);if(!m||m.mapped)return!1;if(v.value===m.value)return!1;if(h.color){var y=v.value,b=m.value;if(!(y[0]!==b[0]||y[1]!==b[1]||y[2]!==b[2]||y[3]!==b[3]&&(null!=y[3]&&1!==y[3]||null!=b[3]&&1!==b[3])))return!1}return{name:e,value:f,strValue:""+t,mapped:g,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:v.value,valueMax:m.value,bypass:n}}}if(h.multiple&&"multiple"!==a){var C;if(C=d?t.split(/\s+/):i.array(t)?t:[t],h.evenMultiple&&C.length%2!=0)return null;for(var x=[],E=[],S=[],w=!1,V=0;V<C.length;V++){var R=s.parse(e,C[V],n,"multiple");w=w||i.string(R.value),x.push(R.value),S.push(null!=R.pfValue?R.pfValue:R.value),E.push(R.units)}return h.validate&&!h.validate(x,E)?null:h.singleEnum&&w?1===x.length&&i.string(x[0])?{name:e,value:x[0],strValue:x[0],bypass:n}:null:{name:e,value:x,pfValue:S,strValue:x.join(" "),bypass:n,units:E}}var O=function(){for(var r=0;r<h.enums.length;r++)if(h.enums[r]===t)return{name:e,value:t,strValue:""+t,bypass:n};return null};if(h.number){var A,k="px";if(h.units&&(A=h.units),h.implicitUnits&&(k=h.implicitUnits),!h.unitless)if(d){var T="px|em"+(h.allowPercent?"|\\%":"");A&&(T=A);var N=t.match("^("+r.regex.number+")("+T+")?$");N&&(t=N[1],A=N[2]||k)}else A&&!h.implicitUnits||(A=k);if(t=parseFloat(t),isNaN(t)&&void 0===h.enums)return null;if(isNaN(t)&&void 0!==h.enums)return t=c,O();if(h.integer&&!i.integer(t))return null;if(void 0!==h.min&&(t<h.min||h.strictMin&&t===h.min)||void 0!==h.max&&(t>h.max||h.strictMax&&t===h.max))return null;var D={name:e,value:t,strValue:""+t+(A||""),units:A,bypass:n};return h.unitless||"px"!==A&&"em"!==A?D.pfValue=t:D.pfValue="px"!==A&&A?this.getEmSizeInPixels()*t:t,"ms"!==A&&"s"!==A||(D.pfValue="ms"===A?t:1e3*t),"deg"!==A&&"rad"!==A||(D.pfValue="rad"===A?t:o.deg2rad(t)),"%"===A&&(D.pfValue=t/100),D}if(h.propList){var P=[],_=""+t;if("none"===_);else{var B=_.split(",");for(V=0;V<B.length;V++){var M=B[V].trim();s.properties[M]&&P.push(M)}if(0===P.length)return null}return{name:e,value:P,strValue:0===P.length?"none":P.join(", "),bypass:n}}if(h.color){var I=r.color2tuple(t);return I?{name:e,value:I,pfValue:I,strValue:""+t,bypass:n}:null}if(h.regex||h.regexes){if(h.enums){var F=O();if(F)return F}var L=h.regexes?h.regexes:[h.regex];for(V=0;V<L.length;V++){var W=new RegExp(L[V]).exec(t);if(W)return{name:e,value:h.singleRegexMatchValue?W[1]:W,strValue:""+t,bypass:n}}return null}return h.string?{name:e,value:""+t,strValue:""+t,bypass:n}:h.enums?O():null}};t.exports=a},{"../is":91,"../math":93,"../util":108}],104:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={};!function(){var e=r.regex.number,t=r.regex.rgbaNoBackRefs,n=r.regex.hslaNoBackRefs,a=r.regex.hex3,s=r.regex.hex6,l=function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},c=function(r){var i=e+"|\\w+|"+t+"|"+n+"|"+a+"|"+s;return"^"+r+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+e+")\\s*\\,\\s*("+e+")\\s*,\\s*("+i+")\\s*\\,\\s*("+i+")\\)$"},u=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];o.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},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},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},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},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"],multiple:!0},bgClip:{enums:["none","node"]},color:{color:!0},bool:{enums:["yes","no"]},lineStyle:{enums:["solid","dotted","dashed"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontVariant:{enums:["small-caps","normal"]},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"]},textBackgroundShape:{enums:["rectangle","roundrectangle"]},nodeShape:{enums:["rectangle","roundrectangle","cutrectangle","ellipse","triangle","square","pentagon","hexagon","heptagon","octagon","star","diamond","vee","rhomboid","polygon"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","triangle-cross","triangle-backcurve","half-triangle-overshot","vee","square","circle","diamond","none"]},arrowFill:{enums:["filled","hollow"]},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"]},text:{string:!0},data:{mapping:!0,regex:l("data")},layoutData:{mapping:!0,regex:l("layoutData")},scratch:{mapping:!0,regex:l("scratch")},mapData:{mapping:!0,regex:c("mapData")},mapLayoutData:{mapping:!0,regex:c("mapLayoutData")},mapScratch:{mapping:!0,regex:c("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:u,singleRegexMatchValue:!0},urls:{regexes:u,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"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-line"],singleEnum:!0,validate:function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return i.string(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\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"]}};var d={zeroNonZero:function(e,t){return 0===e&&0!==t||0!==e&&0===t},anyDiff:function(e,t){return e!==t}},p=d,f=o.types,h=o.properties=[{name:"label",type:f.text},{name:"text-rotation",type:f.textRotation},{name:"text-margin-x",type:f.bidirectionalSize},{name:"text-margin-y",type:f.bidirectionalSize},{name:"source-label",type:f.text},{name:"source-text-rotation",type:f.textRotation},{name:"source-text-margin-x",type:f.bidirectionalSize},{name:"source-text-margin-y",type:f.bidirectionalSize},{name:"source-text-offset",type:f.size},{name:"target-label",type:f.text},{name:"target-text-rotation",type:f.textRotation},{name:"target-text-margin-x",type:f.bidirectionalSize},{name:"target-text-margin-y",type:f.bidirectionalSize},{name:"target-text-offset",type:f.size},{name:"text-valign",type:f.valign},{name:"text-halign",type:f.halign},{name:"color",type:f.color},{name:"text-outline-color",type:f.color},{name:"text-outline-width",type:f.size},{name:"text-outline-opacity",type:f.zeroOneNumber},{name:"text-opacity",type:f.zeroOneNumber},{name:"text-background-color",type:f.color},{name:"text-background-opacity",type:f.zeroOneNumber},{name:"text-background-padding",type:f.size},{name:"text-border-opacity",type:f.zeroOneNumber},{name:"text-border-color",type:f.color},{name:"text-border-width",type:f.size},{name:"text-border-style",type:f.borderStyle},{name:"text-background-shape",type:f.textBackgroundShape},{name:"text-transform",type:f.textTransform},{name:"text-wrap",type:f.textWrap},{name:"text-max-width",type:f.size},{name:"text-events",type:f.bool},{name:"font-family",type:f.fontFamily},{name:"font-style",type:f.fontStyle},{name:"font-weight",type:f.fontWeight},{name:"font-size",type:f.size},{name:"min-zoomed-font-size",type:f.size},{name:"events",type:f.bool},{name:"display",type:f.display,triggersZOrder:p.anyDiff},{name:"visibility",type:f.visibility,triggersZOrder:p.anyDiff},{name:"opacity",type:f.zeroOneNumber,triggersZOrder:p.zeroNonZero},{name:"z-compound-depth",type:f.zCompoundDepth,triggersZOrder:p.anyDiff},{name:"z-index-compare",type:f.zIndexCompare,triggersZOrder:p.anyDiff},{name:"z-index",type:f.nonNegativeInt,triggersZOrder:p.anyDiff},{name:"overlay-padding",type:f.size},{name:"overlay-color",type:f.color},{name:"overlay-opacity",type:f.zeroOneNumber},{name:"transition-property",type:f.propList},{name:"transition-duration",type:f.time},{name:"transition-delay",type:f.time},{name:"transition-timing-function",type:f.easing},{name:"height",type:f.nodeSize},{name:"width",type:f.nodeSize},{name:"shape",type:f.nodeShape},{name:"shape-polygon-points",type:f.polygonPointList},{name:"background-color",type:f.color},{name:"background-opacity",type:f.zeroOneNumber},{name:"background-blacken",type:f.nOneOneNumber},{name:"padding",type:f.sizeMaybePercent},{name:"padding-relative-to",type:f.paddingRelativeTo},{name:"border-color",type:f.color},{name:"border-opacity",type:f.zeroOneNumber},{name:"border-width",type:f.size},{name:"border-style",type:f.borderStyle},{name:"background-image",type:f.urls},{name:"background-image-crossorigin",type:f.bgCrossOrigin},{name:"background-image-opacity",type:f.zeroOneNumbers},{name:"background-position-x",type:f.bgPos},{name:"background-position-y",type:f.bgPos},{name:"background-width-relative-to",type:f.bgRelativeTo},{name:"background-height-relative-to",type:f.bgRelativeTo},{name:"background-repeat",type:f.bgRepeat},{name:"background-fit",type:f.bgFit},{name:"background-clip",type:f.bgClip},{name:"background-width",type:f.bgWH},{name:"background-height",type:f.bgWH},{name:"position",type:f.position},{name:"compound-sizing-wrt-labels",type:f.compoundIncludeLabels},{name:"min-width",type:f.size},{name:"min-width-bias-left",type:f.sizeMaybePercent},{name:"min-width-bias-right",type:f.sizeMaybePercent},{name:"min-height",type:f.size},{name:"min-height-bias-top",type:f.sizeMaybePercent},{name:"min-height-bias-bottom",type:f.sizeMaybePercent},{name:"line-style",type:f.lineStyle},{name:"line-color",type:f.color},{name:"curve-style",type:f.curveStyle},{name:"haystack-radius",type:f.zeroOneNumber},{name:"source-endpoint",type:f.edgeEndpoint},{name:"target-endpoint",type:f.edgeEndpoint},{name:"control-point-step-size",type:f.size},{name:"control-point-distances",type:f.bidirectionalSizes},{name:"control-point-weights",type:f.numbers},{name:"segment-distances",type:f.bidirectionalSizes},{name:"segment-weights",type:f.numbers},{name:"edge-distances",type:f.edgeDistances},{name:"arrow-scale",type:f.positiveNumber},{name:"loop-direction",type:f.angle},{name:"loop-sweep",type:f.angle},{name:"source-distance-from-node",type:f.size},{name:"target-distance-from-node",type:f.size},{name:"selection-box-color",type:f.color},{name:"selection-box-opacity",type:f.zeroOneNumber},{name:"selection-box-border-color",type:f.color},{name:"selection-box-border-width",type:f.size},{name:"active-bg-color",type:f.color},{name:"active-bg-opacity",type:f.zeroOneNumber},{name:"active-bg-size",type:f.size},{name:"outside-texture-bg-color",type:f.color},{name:"outside-texture-bg-opacity",type:f.zeroOneNumber}],g=o.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{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"}];o.pieBackgroundN=16,h.push({name:"pie-size",type:f.sizeMaybePercent});for(var v=1;v<=o.pieBackgroundN;v++)h.push({name:"pie-"+v+"-background-color",type:f.color}),h.push({name:"pie-"+v+"-background-size",type:f.percent}),h.push({name:"pie-"+v+"-background-opacity",type:f.zeroOneNumber});var m=o.arrowPrefixes=["source","mid-source","target","mid-target"];for([{name:"arrow-shape",type:f.arrowShape},{name:"arrow-color",type:f.color},{name:"arrow-fill",type:f.arrowFill}].forEach((function(e){m.forEach((function(t){var n=t+"-"+e.name,r=e.type;h.push({name:n,type:r})}))}),{}),o.propertyNames=h.map((function(e){return e.name})),v=0;v<h.length;v++){var y=h[v];h[y.name]=y}for(v=0;v<g.length;v++){var b=g[v],C=h[b.pointsTo],x={name:b.name,alias:!0,pointsTo:C};h.push(x),h[b.name]=x}}(),o.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},o.getDefaultProperties=r.memoize((function(){for(var e=r.extend({events:"yes","text-events":"no","text-valign":"top","text-halign":"center",color:"#000","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-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,"transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-position-x":"50%","background-position-y":"50%","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",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1",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%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce((function(e,t){for(var n=1;n<=o.pieBackgroundN;n++){var r=t.name.replace("{{i}}",n),i=t.value;e[r]=i}return e}),{}),{"line-style":"solid","line-color":"#999","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"edge-distances":"intersection","curve-style":"bezier","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"},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"}].reduce((function(e,t){return o.arrowPrefixes.forEach((function(n){var r=n+"-"+t.name,i=t.value;e[r]=i})),e}),{})),t={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var a=i.name,s=e[a],l=this.parse(a,s);t[a]=l}}return t})),o.addDefaultStylesheet=function(){this.selector("$node > node").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3,"curve-style":"haystack"}).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("node:parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}).selector("core").css({"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}),this.defaultLength=this.length},t.exports=o},{"../is":91,"../util":108}],105:[function(e,t,n){"use strict";var r=e("../util"),i=e("../selector"),o={applyFromString:function(e){function t(){u=u.length>o.length?u.substr(o.length):""}function n(){a=a.length>s.length?a.substr(s.length):""}var o,a,s,l=this,c=this,u=""+e;for(u=u.replace(/[\/][*](\s|.)+?[*][\/]/g,"");!u.match(/^\s*$/);){var d=u.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){r.error("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+u);break}o=d[0];var p=d[1];if("core"!==p&&new i(p)._private.invalid)r.error("Skipping parsing of block: Invalid selector found in string stylesheet: "+p),t();else{var f=d[2],h=!1;a=f;for(var g=[];!a.match(/^\s*$/);){var v=a.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!v){r.error("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+f),h=!0;break}s=v[0];var m=v[1],y=v[2];(C=l.properties[m])?c.parse(m,y)?(g.push({name:m,val:y}),n()):(r.error("Skipping property: Invalid property definition in: "+s),n()):(r.error("Skipping property: Invalid property name in: "+s),n())}if(h){t();break}c.selector(p);for(var b=0;b<g.length;b++){var C=g[b];c.css(C.name,C.val)}t()}}return c},fromString:function(e){var t=this;return t.resetToDefault(),t.applyFromString(e),t}};t.exports=o},{"../selector":95,"../util":108}],106:[function(e,t,n){"use strict";var r=e("./is"),i=e("./util"),o=e("./style"),a=function(){return this instanceof a?void(this.length=0):new a},s=a.prototype;s.instanceString=function(){return"stylesheet"},s.selector=function(e){return this[this.length++]={selector:e,properties:[]},this},s.css=function(e,t){var n=this.length-1;if(r.string(e))this[n].properties.push({name:e,value:t});else if(r.plainObject(e))for(var a=e,s=0;s<o.properties.length;s++){var l=o.properties[s],c=a[l.name];void 0===c&&(c=a[i.dash2camel(l.name)]),void 0!==c&&(e=l.name,t=c,this[n].properties.push({name:e,value:t}))}return this},s.style=s.css,s.generateStyle=function(e){for(var t=new o(e),n=0;n<this.length;n++){var r=this[n],i=r.selector,a=r.properties;t.selector(i);for(var s=0;s<a.length;s++){var l=a[s];t.css(l.name,l.value)}}return t},t.exports=a},{"./is":91,"./style":101,"./util":108}],107:[function(e,t,n){"use strict";var r=e("../is");t.exports={hex2tuple:function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t,n,r,i=16;return 4===e.length?(t=parseInt(e[1]+e[1],i),n=parseInt(e[2]+e[2],i),r=parseInt(e[3]+e[3],i)):(t=parseInt(e[1]+e[2],i),n=parseInt(e[3]+e[4],i),r=parseInt(e[5]+e[6],i)),[t,n,r]}},hsl2tuple:function(e){function t(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n,r,i,o,a,s,l,c,u=new RegExp("^"+this.regex.hsla+"$").exec(e);if(u){if((r=parseInt(u[1]))<0?r=(360- -1*r%360)%360:r>360&&(r%=360),r/=360,(i=parseFloat(u[2]))<0||i>100)return;if(i/=100,(o=parseFloat(u[3]))<0||o>100)return;if(o/=100,void 0!==(a=u[4])&&((a=parseFloat(a))<0||a>1))return;if(0===i)s=l=c=Math.round(255*o);else{var d=o<.5?o*(1+i):o+i-o*i,p=2*o-d;s=Math.round(255*t(p,d,r+1/3)),l=Math.round(255*t(p,d,r)),c=Math.round(255*t(p,d,r-1/3))}n=[s,l,c,a]}return n},rgb2tuple:function(e){var t,n=new RegExp("^"+this.regex.rgba+"$").exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var o=n[i];if("%"===o[o.length-1]&&(r[i]=!0),o=parseFloat(o),r[i]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t},colorname2tuple:function(e){return this.colors[e.toLowerCase()]},color2tuple:function(e){return(r.array(e)?e:null)||this.colorname2tuple(e)||this.hex2tuple(e)||this.rgb2tuple(e)||this.hsl2tuple(e)},colors:{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]}}},{"../is":91}],108:[function(e,t,n){"use strict";var r=e("../is"),i=e("../math"),o={trueify:function(){return!0},falsify:function(){return!1},zeroify:function(){return 0},noop:function(){},error:function(e){console.error?(console.error.apply(console,arguments),console.trace&&console.trace()):(console.log.apply(console,arguments),console.trace&&console.trace())},clone:function(e){return this.extend({},e)},copy:function(e){return null==e?e:r.array(e)?e.slice():r.plainObject(e)?this.clone(e):e},clonePosition:function(e){return{x:e.x,y:e.y}},uuid: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}};o.makeBoundingBox=i.makeBoundingBox.bind(i),o._staticEmptyObject={},o.staticEmptyObject=function(){return o._staticEmptyObject},o.extend=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(r)for(var i=Object.keys(r),o=0;o<i.length;o++){var a=i[o];e[a]=r[a]}}return e},o.default=function(e,t){return void 0===e?t:e},o.removeFromArray=function(e,t,n){for(var r=e.length;r>=0&&(e[r]!==t||(e.splice(r,1),n));r--);},o.clearArray=function(e){e.splice(0,e.length)},o.push=function(e){var t=Array.prototype.slice.call(arguments,1);Array.prototype.push.apply(e,t)},o.getPrefixedProperty=function(e,t,n){return n&&(t=this.prependCamel(n,t)),e[t]},o.setPrefixedProperty=function(e,t,n,r){n&&(t=this.prependCamel(n,t)),e[t]=r},[e("./colors"),e("./maps"),{memoize:e("./memoize")},e("./regex"),e("./strings"),e("./timing"),e("./sort")].forEach((function(e){o.extend(o,e)})),t.exports=o},{"../is":91,"../math":93,"./colors":107,"./maps":109,"./memoize":110,"./regex":111,"./sort":112,"./strings":113,"./timing":114}],109:[function(e,t,n){"use strict";var r=e("../is");t.exports={mapEmpty:function(e){var t=!0;return null!=e?0===Object.keys(e).length:t},pushMap:function(e){var t=this.getMap(e);null==t?this.setMap(this.extend({},e,{value:[e.value]})):t.push(e.value)},setMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];r.plainObject(a)&&this.error("Tried to set map with object key"),o<n.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},getMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];if(r.plainObject(a)&&this.error("Tried to get map with object key"),null==(t=t[a]))return t}return t},deleteMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=e.keepChildren,a=0;a<i;a++){var s=n[a];if(r.plainObject(s)&&this.error("Tried to delete map with object key"),a===e.keys.length-1)if(o)for(var l=Object.keys(t),c=0;c<l.length;c++){var u=l[c];o[u]||(t[u]=void 0)}else t[s]=void 0;else t=t[s]}}}},{"../is":91}],110:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")});var n=function(){var r,i=this,o=arguments,a=t.apply(i,o),s=n.cache;return(r=s[a])||(r=s[a]=e.apply(i,o)),r};return n.cache={},n}},{}],111:[function(e,t,n){"use strict";var r="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",i="rgb[a]?\\(("+r+"[%]?)\\s*,\\s*("+r+"[%]?)\\s*,\\s*("+r+"[%]?)(?:\\s*,\\s*("+r+"))?\\)",o="rgb[a]?\\((?:"+r+"[%]?)\\s*,\\s*(?:"+r+"[%]?)\\s*,\\s*(?:"+r+"[%]?)(?:\\s*,\\s*(?:"+r+"))?\\)",a="hsl[a]?\\(("+r+")\\s*,\\s*("+r+"[%])\\s*,\\s*("+r+"[%])(?:\\s*,\\s*("+r+"))?\\)",s="hsl[a]?\\((?:"+r+")\\s*,\\s*(?:"+r+"[%])\\s*,\\s*(?:"+r+"[%])(?:\\s*,\\s*(?:"+r+"))?\\)",l="\\#[0-9a-fA-F]{3}",c="\\#[0-9a-fA-F]{6}";t.exports={regex:{number:r,rgba:i,rgbaNoBackRefs:o,hsla:a,hslaNoBackRefs:s,hex3:l,hex6:c}}},{}],112:[function(e,t,n){function r(e,t){return e<t?-1:e>t?1:0}function i(e,t){return-1*r(e,t)}t.exports={sort:{ascending:r,descending:i}}},{}],113:[function(e,t,n){"use strict";var r=e("./memoize"),i=e("../is");t.exports={camel2dash:r((function(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))})),dash2camel:r((function(e){return e.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}))})),prependCamel:r((function(e,t){return e+t[0].toUpperCase()+t.substring(1)}),(function(e,t){return e+"$"+t})),capitalize:function(e){return i.emptyString(e)?e:e.charAt(0).toUpperCase()+e.substring(1)}}},{"../is":91,"./memoize":110}],114:[function(e,t,n){"use strict";var r=e("../window"),i=e("../is"),o=r?r.performance:null,a={},s=o&&o.now?function(){return o.now()}:function(){return Date.now()},l=function(){if(r){if(r.requestAnimationFrame)return function(e){r.requestAnimationFrame(e)};if(r.mozRequestAnimationFrame)return function(e){r.mozRequestAnimationFrame(e)};if(r.webkitRequestAnimationFrame)return function(e){r.webkitRequestAnimationFrame(e)};if(r.msRequestAnimationFrame)return function(e){r.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(s())}),1e3/60)}}();a.requestAnimationFrame=function(e){l(e)},a.performanceNow=s,a.throttle=function(e,t,n){var r=!0,o=!0;return!1===n?r=!1:i.plainObject(n)&&(r="leading"in n?n.leading:r,o="trailing"in n?n.trailing:o),(n=n||{}).leading=r,n.maxWait=t,n.trailing=o,a.debounce(e,t,n)},a.now=function(){return Date.now()},a.debounce=function(e,t,n){var r,o,a,s,l,c,u,d=this,p=0,f=!1,h=!0;if(i.fn(e)){if(t=Math.max(0,t)||0,!0===n){var g=!0;h=!1}else i.plainObject(n)&&(g=n.leading,f="maxWait"in n&&(Math.max(t,n.maxWait)||0),h="trailing"in n?n.trailing:h);var v=function(){var n=t-(d.now()-s);if(n<=0){o&&clearTimeout(o);var i=u;o=c=u=void 0,i&&(p=d.now(),a=e.apply(l,r),c||o||(r=l=null))}else c=setTimeout(v,n)},m=function(){c&&clearTimeout(c),o=c=u=void 0,(h||f!==t)&&(p=d.now(),a=e.apply(l,r),c||o||(r=l=null))};return function(){if(r=arguments,s=d.now(),l=this,u=h&&(c||!g),!1===f)var n=g&&!c;else{o||g||(p=s);var i=f-(s-p),y=i<=0;y?(o&&(o=clearTimeout(o)),p=s,a=e.apply(l,r)):o||(o=setTimeout(m,i))}return y&&c?c=clearTimeout(c):c||t===f||(c=setTimeout(v,t)),n&&(y=!0,a=e.apply(l,r)),!y||c||o||(r=l=null),a}}},t.exports=a},{"../is":91,"../window":116}],115:[function(e,t,n){t.exports="3.1.0"},{}],116:[function(e,t,n){t.exports="undefined"==typeof window?null:window},{}]},{},[90])(90)},321:function(e,t,n){var r=r||{};r.scope={},r.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},r.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==n.g&&null!=n.g?n.g:e},r.global=r.getGlobal(this),r.polyfill=function(e,t,n,i){if(t){for(n=r.global,e=e.split("."),i=0;i<e.length-1;i++){var o=e[i];o in n||(n[o]={}),n=n[o]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&r.defineProperty(n,e,{configurable:!0,writable:!0,value:t})}},r.polyfill("Object.setPrototypeOf",(function(e){return e||("object"!=typeof"".__proto__?null:function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e})}),"es6","es5");var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function a(e){if(!e)return a.__;Array.prototype.reduce||(Array.prototype.reduce=function(e,t){for(var n=t,r=0;r<this.length;r++)n=e(n,this[r],r,this);return n});var t="";return("."+e).split(".").reduce((function(e,n,r,i){return void 0===(n=e["__"+(t=t?t+"."+n:n)])&&(a.Logger.prototype=e,n=new a.Logger(t),e["__"+t]=n),n}),a.__)}!function(e){function t(e,t,n){void 0!==t[e]&&(null===t[e]?delete n[e]:n[e]=t[e])}function n(t){if(null!=e.enabled&&!e.enabled||null!=e.maxMessages&&1>e.maxMessages)return!1;try{if(t.userAgentRegex&&!new RegExp(t.userAgentRegex).test(navigator.userAgent))return!1}catch(e){}try{if(t.ipRegex&&e.clientIP&&!new RegExp(t.ipRegex).test(e.clientIP))return!1}catch(e){}return!0}function r(e,t){try{if(e.disallow&&new RegExp(e.disallow).test(t))return!1}catch(e){}return!0}function i(e){return"function"==typeof e?e instanceof RegExp?e.toString():e():e}function a(t){switch(typeof(t=i(t))){case"string":return new s(t,null,t);case"number":var n=t.toString();return new s(n,null,n);case"boolean":return n=t.toString(),new s(n,null,n);case"undefined":return new s("undefined",null,"undefined");case"object":return t instanceof RegExp||t instanceof String||t instanceof Number||t instanceof Boolean?(n=t.toString(),new s(n,null,n)):(n="function"==typeof e.serialize?e.serialize.call(this,t):JSON.stringify(t),new s(null,t,n));default:return new s("unknown",null,"unknown")}}e.requestId="";var s=function(e,t,n){this.msg=e,this.meta=t,this.finalString=n};e.setOptions=function(e){return t("enabled",e,this),t("maxMessages",e,this),t("defaultAjaxUrl",e,this),t("clientIP",e,this),t("requestId",e,this),t("defaultBeforeSend",e,this),t("serialize",e,this),this},e.getAllLevel=function(){return-2147483648},e.getTraceLevel=function(){return 1e3},e.getDebugLevel=function(){return 2e3},e.getInfoLevel=function(){return 3e3},e.getWarnLevel=function(){return 4e3},e.getErrorLevel=function(){return 5e3},e.getFatalLevel=function(){return 6e3},e.getOffLevel=function(){return 2147483647};var l=function(e,t){this.inner=t,this.name="JL.Exception",this.message=a(e).finalString};e.Exception=l,l.prototype=Error();var c=function(e,t,n,r){this.l=e,this.m=t,this.n=n,this.t=r};e.LogItem=c,l=function(){function i(t,n){this.appenderName=t,this.sendLogItems=n,this.level=e.getTraceLevel(),this.sendWithBufferLevel=2147483647,this.storeInBufferLevel=-2147483648,this.bufferSize=0,this.batchSize=1,this.batchTimeout=2147483647,this.buffer=[],this.batchBuffer=[],this.batchTimeoutTimer=null}return i.prototype.clearTimeoutTimer=function(){this.batchTimeoutTimer&&(clearTimeout(this.batchTimeoutTimer),this.batchTimeoutTimer=null)},i.prototype.addLogItemToBuffer=function(e){this.batchBuffer.push(e);var t=this;this.batchTimeoutTimer||(this.batchTimeoutTimer=setTimeout((function(){t.sendBatch.call(t)}),this.batchTimeout))},i.prototype.setOptions=function(e){return t("level",e,this),t("ipRegex",e,this),t("userAgentRegex",e,this),t("disallow",e,this),t("sendWithBufferLevel",e,this),t("storeInBufferLevel",e,this),t("bufferSize",e,this),t("batchSize",e,this),t("batchTimeout",e,this),this.bufferSize<this.buffer.length&&(this.buffer.length=this.bufferSize),this},i.prototype.log=function(e,t,i,o,a,s,l){!n(this)||!r(this,s)||a<this.storeInBufferLevel||(e=new c(a,s,l,(new Date).getTime()),a<this.level?0<this.bufferSize&&(this.buffer.push(e),this.buffer.length>this.bufferSize&&this.buffer.shift()):(a<this.sendWithBufferLevel||!this.buffer.length||(this.batchBuffer=this.batchBuffer.concat(this.buffer),this.buffer.length=0),this.addLogItemToBuffer(e),this.batchBuffer.length>=this.batchSize&&this.sendBatch()))},i.prototype.sendBatch=function(){this.clearTimeoutTimer(),0==this.batchBuffer.length||null!=e.maxMessages&&1>e.maxMessages||(null!=e.maxMessages&&(e.maxMessages-=this.batchBuffer.length),this.sendLogItems(this.batchBuffer),this.batchBuffer.length=0)},i}(),e.Appender=l;var u=function(n){function r(e){return n.call(this,e,r.prototype.sendLogItemsAjax)||this}return o(r,n),r.prototype.setOptions=function(e){return t("url",e,this),t("beforeSend",e,this),n.prototype.setOptions.call(this,e),this},r.prototype.sendLogItemsAjax=function(t){try{var n="/jsnlog.logger";null!=e.defaultAjaxUrl&&(n=e.defaultAjaxUrl),this.url&&(n=this.url);var r=this.getXhr(n),i={r:e.requestId,lg:t};"function"==typeof this.beforeSend?this.beforeSend.call(this,r,i):"function"==typeof e.defaultBeforeSend&&e.defaultBeforeSend.call(this,r,i);var o=JSON.stringify(i);r.send(o)}catch(e){}},r.prototype.getXhr=function(t){var n=new XMLHttpRequest;return"withCredentials"in n||"undefined"==typeof XDomainRequest?(n.open("POST",t),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("JSNLog-RequestId",e.requestId),n):((n=new XDomainRequest).open("POST",t),n)},r}(l);e.AjaxAppender=u;var d=function(t){function n(e){return t.call(this,e,n.prototype.sendLogItemsConsole)||this}return o(n,t),n.prototype.clog=function(e){console.log(e)},n.prototype.cerror=function(e){console.error?console.error(e):this.clog(e)},n.prototype.cwarn=function(e){console.warn?console.warn(e):this.clog(e)},n.prototype.cinfo=function(e){console.info?console.info(e):this.clog(e)},n.prototype.cdebug=function(e){console.debug?console.debug(e):this.cinfo(e)},n.prototype.sendLogItemsConsole=function(t){try{var n;if(console)for(n=0;n<t.length;++n){var r=t[n],i=r.n+": "+r.m;"undefined"==typeof window&&(i=new Date(r.t)+" | "+i),r.l<=e.getDebugLevel()?this.cdebug(i):r.l<=e.getInfoLevel()?this.cinfo(i):r.l<=e.getWarnLevel()?this.cwarn(i):this.cerror(i)}}catch(e){}},n}(l);e.ConsoleAppender=d,l=function(){function e(e){this.loggerName=e,this.seenRegexes=[]}return e.prototype.setOptions=function(e){return t("level",e,this),t("userAgentRegex",e,this),t("disallow",e,this),t("ipRegex",e,this),t("appenders",e,this),t("onceOnly",e,this),this.seenRegexes=[],this},e.prototype.buildExceptionObject=function(e){var t={};return e.stack?t.stack=e.stack:t.e=e,e.message&&(t.message=e.message),e.name&&(t.name=e.name),e.data&&(t.data=e.data),e.inner&&(t.inner=this.buildExceptionObject(e.inner)),t},e.prototype.log=function(e,t,o){var s=0;if(!this.appenders)return this;if(e>=this.level&&n(this)&&(o?(s=this.buildExceptionObject(o)).logData=i(t):s=t,r(this,(t=a(s)).finalString))){if(this.onceOnly)for(s=this.onceOnly.length-1;0<=s;){if(new RegExp(this.onceOnly[s]).test(t.finalString)){if(this.seenRegexes[s])return this;this.seenRegexes[s]=!0}s--}for(t.meta=t.meta||{},t.meta.loggerName=this.loggerName,s=this.appenders.length-1;0<=s;)this.appenders[s].log(1e3>=e?"trace":2e3>=e?"debug":3e3>=e?"info":4e3>=e?"warn":5e3>=e?"error":"fatal",t.msg,t.meta,(function(){}),e,t.finalString,this.loggerName),s--}return this},e.prototype.trace=function(e){return this.log(1e3,e)},e.prototype.debug=function(e){return this.log(2e3,e)},e.prototype.info=function(e){return this.log(3e3,e)},e.prototype.warn=function(e){return this.log(4e3,e)},e.prototype.error=function(e){return this.log(5e3,e)},e.prototype.fatal=function(e){return this.log(6e3,e)},e.prototype.fatalException=function(e,t){return this.log(6e3,e,t)},e}(),e.Logger=l,e.createAjaxAppender=function(e){return new u(e)},e.createConsoleAppender=function(e){return new d(e)},l=new u(""),"undefined"==typeof window&&(l=new d("")),e.__=new e.Logger(""),e.__.setOptions({level:e.getDebugLevel(),appenders:[l]})}(a||(a={})),t.JL=a,"function"==typeof __jsnlog_configure&&__jsnlog_configure(a),"undefined"==typeof window||window.onerror||(window.onerror=function(e,t,n,r,i){return a("onerrorLogger").fatalException({msg:"Uncaught Exception",errorMsg:e,url:t,"line number":n,column:r},i),!1}),"undefined"==typeof window||window.onunhandledrejection||(window.onunhandledrejection=function(e){a("onerrorLogger").fatalException({msg:"unhandledrejection",errorMsg:e.reason?e.reason.message:null},e.reason)})},677:(e,t,n)=>{var r;e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){var n=t[a][1][e];return i(n||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({"./aesprim":[function(e,t,n){!function(e,t){"use strict";"function"==typeof r&&r.amd?r(["exports"],t):t(void 0!==n?n:e.esprima={})}(this,(function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function n(e){return e>=48&&e<=57}function r(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function i(e){return"01234567".indexOf(e)>=0}function o(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function a(e){return 10===e||13===e||8232===e||8233===e}function s(e){return 64==e||36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&it.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function l(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&it.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function c(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function u(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function d(e){return"eval"===e||"arguments"===e}function p(e){if(st&&u(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function f(e,n,r,i,o){var a;t("number"==typeof r,"Comment must have valid position"),ht.lastCommentStart>=r||(ht.lastCommentStart=r,a={type:e,value:n},gt.range&&(a.range=[r,i]),gt.loc&&(a.loc=o),gt.comments.push(a),gt.attachComment&&(gt.leadingComments.push(a),gt.trailingComments.push(a)))}function h(e){var t,n,r,i;for(t=lt-e,n={start:{line:ct,column:lt-ut-e}};lt<dt;)if(r=at.charCodeAt(lt),++lt,a(r))return gt.comments&&(i=at.slice(t+e,lt-1),n.end={line:ct,column:lt-ut-1},f("Line",i,t,lt-1,n)),13===r&&10===at.charCodeAt(lt)&&++lt,++ct,void(ut=lt);gt.comments&&(i=at.slice(t+e,lt),n.end={line:ct,column:lt-ut},f("Line",i,t,lt,n))}function g(){var e,t,n,r;for(gt.comments&&(e=lt-2,t={start:{line:ct,column:lt-ut-2}});lt<dt;)if(a(n=at.charCodeAt(lt)))13===n&&10===at.charCodeAt(lt+1)&&++lt,++ct,++lt,ut=lt,lt>=dt&&W({},rt.UnexpectedToken,"ILLEGAL");else if(42===n){if(47===at.charCodeAt(lt+1))return++lt,++lt,void(gt.comments&&(r=at.slice(e+2,lt-2),t.end={line:ct,column:lt-ut},f("Block",r,e,lt,t)));++lt}else++lt;W({},rt.UnexpectedToken,"ILLEGAL")}function v(){var e,t;for(t=0===lt;lt<dt;)if(o(e=at.charCodeAt(lt)))++lt;else if(a(e))++lt,13===e&&10===at.charCodeAt(lt)&&++lt,++ct,ut=lt,t=!0;else if(47===e)if(47===(e=at.charCodeAt(lt+1)))++lt,++lt,h(2),t=!0;else{if(42!==e)break;++lt,++lt,g()}else if(t&&45===e){if(45!==at.charCodeAt(lt+1)||62!==at.charCodeAt(lt+2))break;lt+=3,h(3)}else{if(60!==e)break;if("!--"!==at.slice(lt+1,lt+4))break;++lt,++lt,++lt,++lt,h(4)}}function m(e){var t,n,i,o=0;for(n="u"===e?4:2,t=0;t<n;++t){if(!(lt<dt&&r(at[lt])))return"";i=at[lt++],o=16*o+"0123456789abcdef".indexOf(i.toLowerCase())}return String.fromCharCode(o)}function y(){var e,t;for(e=at.charCodeAt(lt++),t=String.fromCharCode(e),92===e&&(117!==at.charCodeAt(lt)&&W({},rt.UnexpectedToken,"ILLEGAL"),++lt,(e=m("u"))&&"\\"!==e&&s(e.charCodeAt(0))||W({},rt.UnexpectedToken,"ILLEGAL"),t=e);lt<dt&&l(e=at.charCodeAt(lt));)++lt,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==at.charCodeAt(lt)&&W({},rt.UnexpectedToken,"ILLEGAL"),++lt,(e=m("u"))&&"\\"!==e&&l(e.charCodeAt(0))||W({},rt.UnexpectedToken,"ILLEGAL"),t+=e);return t}function b(){var e,t;for(e=lt++;lt<dt;){if(92===(t=at.charCodeAt(lt)))return lt=e,y();if(!l(t))break;++lt}return at.slice(e,lt)}function C(){var e,t;return e=lt,{type:1===(t=92===at.charCodeAt(lt)?y():b()).length?Ke.Identifier:p(t)?Ke.Keyword:"null"===t?Ke.NullLiteral:"true"===t||"false"===t?Ke.BooleanLiteral:Ke.Identifier,value:t,lineNumber:ct,lineStart:ut,start:e,end:lt}}function x(){var e,t,n,r,i=lt,o=at.charCodeAt(lt),a=at[lt];switch(o){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++lt,gt.tokenize&&(40===o?gt.openParenToken=gt.tokens.length:123===o&&(gt.openCurlyToken=gt.tokens.length)),{type:Ke.Punctuator,value:String.fromCharCode(o),lineNumber:ct,lineStart:ut,start:i,end:lt};default:if(61===(e=at.charCodeAt(lt+1)))switch(o){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return lt+=2,{type:Ke.Punctuator,value:String.fromCharCode(o)+String.fromCharCode(e),lineNumber:ct,lineStart:ut,start:i,end:lt};case 33:case 61:return lt+=2,61===at.charCodeAt(lt)&&++lt,{type:Ke.Punctuator,value:at.slice(i,lt),lineNumber:ct,lineStart:ut,start:i,end:lt}}}return">>>="===(r=at.substr(lt,4))?(lt+=4,{type:Ke.Punctuator,value:r,lineNumber:ct,lineStart:ut,start:i,end:lt}):">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?(lt+=3,{type:Ke.Punctuator,value:n,lineNumber:ct,lineStart:ut,start:i,end:lt}):a===(t=n.substr(0,2))[1]&&"+-<>&|".indexOf(a)>=0||"=>"===t?(lt+=2,{type:Ke.Punctuator,value:t,lineNumber:ct,lineStart:ut,start:i,end:lt}):"<>=!+-*%&|^/".indexOf(a)>=0?(++lt,{type:Ke.Punctuator,value:a,lineNumber:ct,lineStart:ut,start:i,end:lt}):void W({},rt.UnexpectedToken,"ILLEGAL")}function E(e){for(var t="";lt<dt&&r(at[lt]);)t+=at[lt++];return 0===t.length&&W({},rt.UnexpectedToken,"ILLEGAL"),s(at.charCodeAt(lt))&&W({},rt.UnexpectedToken,"ILLEGAL"),{type:Ke.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:ct,lineStart:ut,start:e,end:lt}}function S(e){for(var t="0"+at[lt++];lt<dt&&i(at[lt]);)t+=at[lt++];return(s(at.charCodeAt(lt))||n(at.charCodeAt(lt)))&&W({},rt.UnexpectedToken,"ILLEGAL"),{type:Ke.NumericLiteral,value:parseInt(t,8),octal:!0,lineNumber:ct,lineStart:ut,start:e,end:lt}}function w(){var e,r,o;if(t(n((o=at[lt]).charCodeAt(0))||"."===o,"Numeric literal must start with a decimal digit or a decimal point"),r=lt,e="","."!==o){if(e=at[lt++],o=at[lt],"0"===e){if("x"===o||"X"===o)return++lt,E(r);if(i(o))return S(r);o&&n(o.charCodeAt(0))&&W({},rt.UnexpectedToken,"ILLEGAL")}for(;n(at.charCodeAt(lt));)e+=at[lt++];o=at[lt]}if("."===o){for(e+=at[lt++];n(at.charCodeAt(lt));)e+=at[lt++];o=at[lt]}if("e"===o||"E"===o)if(e+=at[lt++],"+"!==(o=at[lt])&&"-"!==o||(e+=at[lt++]),n(at.charCodeAt(lt)))for(;n(at.charCodeAt(lt));)e+=at[lt++];else W({},rt.UnexpectedToken,"ILLEGAL");return s(at.charCodeAt(lt))&&W({},rt.UnexpectedToken,"ILLEGAL"),{type:Ke.NumericLiteral,value:parseFloat(e),lineNumber:ct,lineStart:ut,start:r,end:lt}}function V(){var e,n,r,o,s,l,c,u,d="",p=!1;for(c=ct,u=ut,t("'"===(e=at[lt])||'"'===e,"String literal must starts with a quote"),n=lt,++lt;lt<dt;){if((r=at[lt++])===e){e="";break}if("\\"===r)if((r=at[lt++])&&a(r.charCodeAt(0)))++ct,"\r"===r&&"\n"===at[lt]&&++lt,ut=lt;else switch(r){case"u":case"x":l=lt,(s=m(r))?d+=s:(lt=l,d+=r);break;case"n":d+="\n";break;case"r":d+="\r";break;case"t":d+="\t";break;case"b":d+="\b";break;case"f":d+="\f";break;case"v":d+="\v";break;default:i(r)?(0!==(o="01234567".indexOf(r))&&(p=!0),lt<dt&&i(at[lt])&&(p=!0,o=8*o+"01234567".indexOf(at[lt++]),"0123".indexOf(r)>=0&<<dt&&i(at[lt])&&(o=8*o+"01234567".indexOf(at[lt++]))),d+=String.fromCharCode(o)):d+=r}else{if(a(r.charCodeAt(0)))break;d+=r}}return""!==e&&W({},rt.UnexpectedToken,"ILLEGAL"),{type:Ke.StringLiteral,value:d,octal:p,startLineNumber:c,startLineStart:u,lineNumber:ct,lineStart:ut,start:n,end:lt}}function R(e,t){var n;try{n=new RegExp(e,t)}catch(e){W({},rt.InvalidRegExp)}return n}function O(){var e,n,r,i;for(t("/"===(e=at[lt]),"Regular expression literal must start with a slash"),n=at[lt++],r=!1,i=!1;lt<dt;)if(n+=e=at[lt++],"\\"===e)a((e=at[lt++]).charCodeAt(0))&&W({},rt.UnterminatedRegExp),n+=e;else if(a(e.charCodeAt(0)))W({},rt.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){i=!0;break}"["===e&&(r=!0)}return i||W({},rt.UnterminatedRegExp),{value:n.substr(1,n.length-2),literal:n}}function A(){var e,t,n,r;for(t="",n="";lt<dt&&l((e=at[lt]).charCodeAt(0));)if(++lt,"\\"===e&<<dt)if("u"===(e=at[lt])){if(r=++lt,e=m("u"))for(n+=e,t+="\\u";r<lt;++r)t+=at[r];else lt=r,n+="u",t+="\\u";U({},rt.UnexpectedToken,"ILLEGAL")}else t+="\\",U({},rt.UnexpectedToken,"ILLEGAL");else n+=e,t+=e;return{value:n,literal:t}}function k(){var e,t,n,r;return ft=null,v(),e=lt,t=O(),n=A(),r=R(t.value,n.value),gt.tokenize?{type:Ke.RegularExpression,value:r,lineNumber:ct,lineStart:ut,start:e,end:lt}:{literal:t.literal+n.literal,value:r,start:e,end:lt}}function T(){var e,t,n,r;return v(),e=lt,t={start:{line:ct,column:lt-ut}},n=k(),t.end={line:ct,column:lt-ut},gt.tokenize||(gt.tokens.length>0&&(r=gt.tokens[gt.tokens.length-1]).range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||gt.tokens.pop()),gt.tokens.push({type:"RegularExpression",value:n.literal,range:[e,lt],loc:t})),n}function N(e){return e.type===Ke.Identifier||e.type===Ke.Keyword||e.type===Ke.BooleanLiteral||e.type===Ke.NullLiteral}function D(){var e,t;if(!(e=gt.tokens[gt.tokens.length-1]))return T();if("Punctuator"===e.type){if("]"===e.value)return x();if(")"===e.value)return!(t=gt.tokens[gt.openParenToken-1])||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?x():T();if("}"===e.value){if(gt.tokens[gt.openCurlyToken-3]&&"Keyword"===gt.tokens[gt.openCurlyToken-3].type){if(!(t=gt.tokens[gt.openCurlyToken-4]))return x()}else{if(!gt.tokens[gt.openCurlyToken-4]||"Keyword"!==gt.tokens[gt.openCurlyToken-4].type)return x();if(!(t=gt.tokens[gt.openCurlyToken-5]))return T()}return et.indexOf(t.value)>=0?x():T()}return T()}return"Keyword"===e.type?T():x()}function P(){var e;return v(),lt>=dt?{type:Ke.EOF,lineNumber:ct,lineStart:ut,start:lt,end:lt}:s(e=at.charCodeAt(lt))?C():40===e||41===e||59===e?x():39===e||34===e?V():46===e?n(at.charCodeAt(lt+1))?w():x():n(e)?w():gt.tokenize&&47===e?D():x()}function _(){var e,t,n;return v(),e={start:{line:ct,column:lt-ut}},t=P(),e.end={line:ct,column:lt-ut},t.type!==Ke.EOF&&(n=at.slice(t.start,t.end),gt.tokens.push({type:$e[t.type],value:n,range:[t.start,t.end],loc:e})),t}function B(){var e;return lt=(e=ft).end,ct=e.lineNumber,ut=e.lineStart,ft=void 0!==gt.tokens?_():P(),lt=e.end,ct=e.lineNumber,ut=e.lineStart,e}function M(){var e,t,n;e=lt,t=ct,n=ut,ft=void 0!==gt.tokens?_():P(),lt=e,ct=t,ut=n}function I(e,t){this.line=e,this.column=t}function F(e,t,n,r){this.start=new I(e,t),this.end=new I(n,r)}function L(){var e,t,n,r;return e=lt,t=ct,n=ut,v(),r=ct!==t,lt=e,ct=t,ut=n,r}function W(e,n){var r,i=Array.prototype.slice.call(arguments,2),o=n.replace(/%(\d)/g,(function(e,n){return t(n<i.length,"Message reference must be in range"),i[n]}));throw"number"==typeof e.lineNumber?((r=new Error("Line "+e.lineNumber+": "+o)).index=e.start,r.lineNumber=e.lineNumber,r.column=e.start-ut+1):((r=new Error("Line "+ct+": "+o)).index=lt,r.lineNumber=ct,r.column=lt-ut+1),r.description=o,r}function U(){try{W.apply(null,arguments)}catch(e){if(!gt.errors)throw e;gt.errors.push(e)}}function G(e){if(e.type===Ke.EOF&&W(e,rt.UnexpectedEOS),e.type===Ke.NumericLiteral&&W(e,rt.UnexpectedNumber),e.type===Ke.StringLiteral&&W(e,rt.UnexpectedString),e.type===Ke.Identifier&&W(e,rt.UnexpectedIdentifier),e.type===Ke.Keyword){if(c(e.value))W(e,rt.UnexpectedReserved);else if(st&&u(e.value))return void U(e,rt.StrictReservedWord);W(e,rt.UnexpectedToken,e.value)}W(e,rt.UnexpectedToken,e.value)}function z(e){var t=B();t.type===Ke.Punctuator&&t.value===e||G(t)}function Q(e){var t=B();t.type===Ke.Keyword&&t.value===e||G(t)}function j(e){return ft.type===Ke.Punctuator&&ft.value===e}function H(e){return ft.type===Ke.Keyword&&ft.value===e}function Y(){var e;return ft.type===Ke.Punctuator&&("="===(e=ft.value)||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function J(){var e;return 59===at.charCodeAt(lt)||j(";")?void B():(e=ct,v(),void(ct===e&&(ft.type===Ke.EOF||j("}")||G(ft))))}function X(e){return e.type===tt.Identifier||e.type===tt.MemberExpression}function Z(){var e,t=[];for(e=ft,z("[");!j("]");)j(",")?(B(),t.push(null)):(t.push(ge()),j("]")||z(","));return B(),pt.markEnd(pt.createArrayExpression(t),e)}function q(e,t){var n,r,i;return n=st,i=ft,r=Ge(),t&&st&&d(e[0].name)&&U(t,rt.StrictParamName),st=n,pt.markEnd(pt.createFunctionExpression(null,e,[],r),i)}function K(){var e,t;return t=ft,(e=B()).type===Ke.StringLiteral||e.type===Ke.NumericLiteral?(st&&e.octal&&U(e,rt.StrictOctalLiteral),pt.markEnd(pt.createLiteral(e),t)):pt.markEnd(pt.createIdentifier(e.value),t)}function $(){var e,t,n,r,i,o;return o=ft,(e=ft).type===Ke.Identifier?(n=K(),"get"!==e.value||j(":")?"set"!==e.value||j(":")?(z(":"),r=ge(),pt.markEnd(pt.createProperty("init",n,r),o)):(t=K(),z("("),(e=ft).type!==Ke.Identifier?(z(")"),U(e,rt.UnexpectedToken,e.value),r=q([])):(i=[be()],z(")"),r=q(i,e)),pt.markEnd(pt.createProperty("set",t,r),o)):(t=K(),z("("),z(")"),r=q([]),pt.markEnd(pt.createProperty("get",t,r),o))):e.type!==Ke.EOF&&e.type!==Ke.Punctuator?(t=K(),z(":"),r=ge(),pt.markEnd(pt.createProperty("init",t,r),o)):void G(e)}function ee(){var e,t,n,r,i,o=[],a={},s=String;for(i=ft,z("{");!j("}");)t=(e=$()).key.type===tt.Identifier?e.key.name:s(e.key.value),r="init"===e.kind?nt.Data:"get"===e.kind?nt.Get:nt.Set,n="$"+t,Object.prototype.hasOwnProperty.call(a,n)?(a[n]===nt.Data?st&&r===nt.Data?U({},rt.StrictDuplicateProperty):r!==nt.Data&&U({},rt.AccessorDataProperty):r===nt.Data?U({},rt.AccessorDataProperty):a[n]&r&&U({},rt.AccessorGetSet),a[n]|=r):a[n]=r,o.push(e),j("}")||z(",");return z("}"),pt.markEnd(pt.createObjectExpression(o),i)}function te(){var e;return z("("),e=ve(),z(")"),e}function ne(){var e,t,n,r;if(j("("))return te();if(j("["))return Z();if(j("{"))return ee();if(e=ft.type,r=ft,e===Ke.Identifier)n=pt.createIdentifier(B().value);else if(e===Ke.StringLiteral||e===Ke.NumericLiteral)st&&ft.octal&&U(ft,rt.StrictOctalLiteral),n=pt.createLiteral(B());else if(e===Ke.Keyword){if(H("function"))return je();H("this")?(B(),n=pt.createThisExpression()):G(B())}else e===Ke.BooleanLiteral?((t=B()).value="true"===t.value,n=pt.createLiteral(t)):e===Ke.NullLiteral?((t=B()).value=null,n=pt.createLiteral(t)):j("/")||j("/=")?(n=void 0!==gt.tokens?pt.createLiteral(T()):pt.createLiteral(k()),M()):G(B());return pt.markEnd(n,r)}function re(){var e=[];if(z("("),!j(")"))for(;lt<dt&&(e.push(ge()),!j(")"));)z(",");return z(")"),e}function ie(){var e,t;return t=ft,N(e=B())||G(e),pt.markEnd(pt.createIdentifier(e.value),t)}function oe(){return z("."),ie()}function ae(){var e;return z("["),e=ve(),z("]"),e}function se(){var e,t,n;return n=ft,Q("new"),e=ce(),t=j("(")?re():[],pt.markEnd(pt.createNewExpression(e,t),n)}function le(){var e,t,n,r,i;for(i=ft,e=ht.allowIn,ht.allowIn=!0,t=H("new")?se():ne(),ht.allowIn=e;;){if(j("."))r=oe(),t=pt.createMemberExpression(".",t,r);else if(j("("))n=re(),t=pt.createCallExpression(t,n);else{if(!j("["))break;r=ae(),t=pt.createMemberExpression("[",t,r)}pt.markEnd(t,i)}return t}function ce(){var e,t,n,r;for(r=ft,e=ht.allowIn,t=H("new")?se():ne(),ht.allowIn=e;j(".")||j("[");)j("[")?(n=ae(),t=pt.createMemberExpression("[",t,n)):(n=oe(),t=pt.createMemberExpression(".",t,n)),pt.markEnd(t,r);return t}function ue(){var e,t,n=ft;return e=le(),ft.type===Ke.Punctuator&&(!j("++")&&!j("--")||L()||(st&&e.type===tt.Identifier&&d(e.name)&&U({},rt.StrictLHSPostfix),X(e)||U({},rt.InvalidLHSInAssignment),t=B(),e=pt.markEnd(pt.createPostfixExpression(t.value,e),n))),e}function de(){var e,t,n;return ft.type!==Ke.Punctuator&&ft.type!==Ke.Keyword?t=ue():j("++")||j("--")?(n=ft,e=B(),t=de(),st&&t.type===tt.Identifier&&d(t.name)&&U({},rt.StrictLHSPrefix),X(t)||U({},rt.InvalidLHSInAssignment),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n)):j("+")||j("-")||j("~")||j("!")?(n=ft,e=B(),t=de(),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n)):H("delete")||H("void")||H("typeof")?(n=ft,e=B(),t=de(),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n),st&&"delete"===t.operator&&t.argument.type===tt.Identifier&&U({},rt.StrictDelete)):t=ue(),t}function pe(e,t){var n=0;if(e.type!==Ke.Punctuator&&e.type!==Ke.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function fe(){var e,t,n,r,i,o,a,s,l,c;if(e=ft,l=de(),0===(i=pe(r=ft,ht.allowIn)))return l;for(r.prec=i,B(),t=[e,ft],o=[l,r,a=de()];(i=pe(ft,ht.allowIn))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,l=o.pop(),n=pt.createBinaryExpression(s,l,a),t.pop(),e=t[t.length-1],pt.markEnd(n,e),o.push(n);(r=B()).prec=i,o.push(r),t.push(ft),n=de(),o.push(n)}for(n=o[c=o.length-1],t.pop();c>1;)n=pt.createBinaryExpression(o[c-1].value,o[c-2],n),c-=2,e=t.pop(),pt.markEnd(n,e);return n}function he(){var e,t,n,r,i;return i=ft,e=fe(),j("?")&&(B(),t=ht.allowIn,ht.allowIn=!0,n=ge(),ht.allowIn=t,z(":"),r=ge(),e=pt.createConditionalExpression(e,n,r),pt.markEnd(e,i)),e}function ge(){var e,t,n,r,i;return e=ft,i=ft,r=t=he(),Y()&&(X(t)||U({},rt.InvalidLHSInAssignment),st&&t.type===tt.Identifier&&d(t.name)&&U(e,rt.StrictLHSAssignment),e=B(),n=ge(),r=pt.markEnd(pt.createAssignmentExpression(e.value,t,n),i)),r}function ve(){var e,t=ft;if(e=ge(),j(",")){for(e=pt.createSequenceExpression([e]);lt<dt&&j(",");)B(),e.expressions.push(ge());pt.markEnd(e,t)}return e}function me(){for(var e,t=[];lt<dt&&!j("}")&&void 0!==(e=He());)t.push(e);return t}function ye(){var e,t;return t=ft,z("{"),e=me(),z("}"),pt.markEnd(pt.createBlockStatement(e),t)}function be(){var e,t;return t=ft,(e=B()).type!==Ke.Identifier&&G(e),pt.markEnd(pt.createIdentifier(e.value),t)}function Ce(e){var t,n,r=null;return n=ft,t=be(),st&&d(t.name)&&U({},rt.StrictVarName),"const"===e?(z("="),r=ge()):j("=")&&(B(),r=ge()),pt.markEnd(pt.createVariableDeclarator(t,r),n)}function xe(e){var t=[];do{if(t.push(Ce(e)),!j(","))break;B()}while(lt<dt);return t}function Ee(){var e;return Q("var"),e=xe(),J(),pt.createVariableDeclaration(e,"var")}function Se(e){var t,n;return n=ft,Q(e),t=xe(e),J(),pt.markEnd(pt.createVariableDeclaration(t,e),n)}function we(){return z(";"),pt.createEmptyStatement()}function Ve(){var e=ve();return J(),pt.createExpressionStatement(e)}function Re(){var e,t,n;return Q("if"),z("("),e=ve(),z(")"),t=Ue(),H("else")?(B(),n=Ue()):n=null,pt.createIfStatement(e,t,n)}function Oe(){var e,t,n;return Q("do"),n=ht.inIteration,ht.inIteration=!0,e=Ue(),ht.inIteration=n,Q("while"),z("("),t=ve(),z(")"),j(";")&&B(),pt.createDoWhileStatement(e,t)}function Ae(){var e,t,n;return Q("while"),z("("),e=ve(),z(")"),n=ht.inIteration,ht.inIteration=!0,t=Ue(),ht.inIteration=n,pt.createWhileStatement(e,t)}function ke(){var e,t,n;return n=ft,e=B(),t=xe(),pt.markEnd(pt.createVariableDeclaration(t,e.value),n)}function Te(){var e,t,n,r,i,o,a;return e=t=n=null,Q("for"),z("("),j(";")?B():(H("var")||H("let")?(ht.allowIn=!1,e=ke(),ht.allowIn=!0,1===e.declarations.length&&H("in")&&(B(),r=e,i=ve(),e=null)):(ht.allowIn=!1,e=ve(),ht.allowIn=!0,H("in")&&(X(e)||U({},rt.InvalidLHSInForIn),B(),r=e,i=ve(),e=null)),void 0===r&&z(";")),void 0===r&&(j(";")||(t=ve()),z(";"),j(")")||(n=ve())),z(")"),a=ht.inIteration,ht.inIteration=!0,o=Ue(),ht.inIteration=a,void 0===r?pt.createForStatement(e,t,n,o):pt.createForInStatement(r,i,o)}function Ne(){var e,t=null;return Q("continue"),59===at.charCodeAt(lt)?(B(),ht.inIteration||W({},rt.IllegalContinue),pt.createContinueStatement(null)):L()?(ht.inIteration||W({},rt.IllegalContinue),pt.createContinueStatement(null)):(ft.type===Ke.Identifier&&(e="$"+(t=be()).name,Object.prototype.hasOwnProperty.call(ht.labelSet,e)||W({},rt.UnknownLabel,t.name)),J(),null!==t||ht.inIteration||W({},rt.IllegalContinue),pt.createContinueStatement(t))}function De(){var e,t=null;return Q("break"),59===at.charCodeAt(lt)?(B(),ht.inIteration||ht.inSwitch||W({},rt.IllegalBreak),pt.createBreakStatement(null)):L()?(ht.inIteration||ht.inSwitch||W({},rt.IllegalBreak),pt.createBreakStatement(null)):(ft.type===Ke.Identifier&&(e="$"+(t=be()).name,Object.prototype.hasOwnProperty.call(ht.labelSet,e)||W({},rt.UnknownLabel,t.name)),J(),null!==t||ht.inIteration||ht.inSwitch||W({},rt.IllegalBreak),pt.createBreakStatement(t))}function Pe(){var e=null;return Q("return"),ht.inFunctionBody||U({},rt.IllegalReturn),32===at.charCodeAt(lt)&&s(at.charCodeAt(lt+1))?(e=ve(),J(),pt.createReturnStatement(e)):L()?pt.createReturnStatement(null):(j(";")||j("}")||ft.type===Ke.EOF||(e=ve()),J(),pt.createReturnStatement(e))}function _e(){var e,t;return st&&(v(),U({},rt.StrictModeWith)),Q("with"),z("("),e=ve(),z(")"),t=Ue(),pt.createWithStatement(e,t)}function Be(){var e,t,n,r=[];for(n=ft,H("default")?(B(),e=null):(Q("case"),e=ve()),z(":");lt<dt&&!(j("}")||H("default")||H("case"));)t=Ue(),r.push(t);return pt.markEnd(pt.createSwitchCase(e,r),n)}function Me(){var e,t,n,r,i;if(Q("switch"),z("("),e=ve(),z(")"),z("{"),t=[],j("}"))return B(),pt.createSwitchStatement(e,t);for(r=ht.inSwitch,ht.inSwitch=!0,i=!1;lt<dt&&!j("}");)null===(n=Be()).test&&(i&&W({},rt.MultipleDefaultsInSwitch),i=!0),t.push(n);return ht.inSwitch=r,z("}"),pt.createSwitchStatement(e,t)}function Ie(){var e;return Q("throw"),L()&&W({},rt.NewlineAfterThrow),e=ve(),J(),pt.createThrowStatement(e)}function Fe(){var e,t,n;return n=ft,Q("catch"),z("("),j(")")&&G(ft),e=be(),st&&d(e.name)&&U({},rt.StrictCatchVariable),z(")"),t=ye(),pt.markEnd(pt.createCatchClause(e,t),n)}function Le(){var e,t=[],n=null;return Q("try"),e=ye(),H("catch")&&t.push(Fe()),H("finally")&&(B(),n=ye()),0!==t.length||n||W({},rt.NoCatchOrFinally),pt.createTryStatement(e,[],t,n)}function We(){return Q("debugger"),J(),pt.createDebuggerStatement()}function Ue(){var e,t,n,r,i=ft.type;if(i===Ke.EOF&&G(ft),i===Ke.Punctuator&&"{"===ft.value)return ye();if(r=ft,i===Ke.Punctuator)switch(ft.value){case";":return pt.markEnd(we(),r);case"(":return pt.markEnd(Ve(),r)}if(i===Ke.Keyword)switch(ft.value){case"break":return pt.markEnd(De(),r);case"continue":return pt.markEnd(Ne(),r);case"debugger":return pt.markEnd(We(),r);case"do":return pt.markEnd(Oe(),r);case"for":return pt.markEnd(Te(),r);case"function":return pt.markEnd(Qe(),r);case"if":return pt.markEnd(Re(),r);case"return":return pt.markEnd(Pe(),r);case"switch":return pt.markEnd(Me(),r);case"throw":return pt.markEnd(Ie(),r);case"try":return pt.markEnd(Le(),r);case"var":return pt.markEnd(Ee(),r);case"while":return pt.markEnd(Ae(),r);case"with":return pt.markEnd(_e(),r)}return(e=ve()).type===tt.Identifier&&j(":")?(B(),n="$"+e.name,Object.prototype.hasOwnProperty.call(ht.labelSet,n)&&W({},rt.Redeclaration,"Label",e.name),ht.labelSet[n]=!0,t=Ue(),delete ht.labelSet[n],pt.markEnd(pt.createLabeledStatement(e,t),r)):(J(),pt.markEnd(pt.createExpressionStatement(e),r))}function Ge(){var e,t,n,r,i,o,a,s,l=[];for(s=ft,z("{");lt<dt&&ft.type===Ke.StringLiteral&&(t=ft,e=He(),l.push(e),e.expression.type===tt.Literal);)"use strict"===at.slice(t.start+1,t.end-1)?(st=!0,n&&U(n,rt.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(r=ht.labelSet,i=ht.inIteration,o=ht.inSwitch,a=ht.inFunctionBody,ht.labelSet={},ht.inIteration=!1,ht.inSwitch=!1,ht.inFunctionBody=!0;lt<dt&&!j("}")&&void 0!==(e=He());)l.push(e);return z("}"),ht.labelSet=r,ht.inIteration=i,ht.inSwitch=o,ht.inFunctionBody=a,pt.markEnd(pt.createBlockStatement(l),s)}function ze(e){var t,n,r,i,o,a,s=[];if(z("("),!j(")"))for(i={};lt<dt&&(n=ft,t=be(),o="$"+n.value,st?(d(n.value)&&(r=n,a=rt.StrictParamName),Object.prototype.hasOwnProperty.call(i,o)&&(r=n,a=rt.StrictParamDupe)):e||(d(n.value)?(e=n,a=rt.StrictParamName):u(n.value)?(e=n,a=rt.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,o)&&(e=n,a=rt.StrictParamDupe)),s.push(t),i[o]=!0,!j(")"));)z(",");return z(")"),{params:s,stricted:r,firstRestricted:e,message:a}}function Qe(){var e,t,n,r,i,o,a,s,l,c=[];return l=ft,Q("function"),n=ft,e=be(),st?d(n.value)&&U(n,rt.StrictFunctionName):d(n.value)?(o=n,a=rt.StrictFunctionName):u(n.value)&&(o=n,a=rt.StrictReservedWord),c=(i=ze(o)).params,r=i.stricted,o=i.firstRestricted,i.message&&(a=i.message),s=st,t=Ge(),st&&o&&W(o,a),st&&r&&U(r,a),st=s,pt.markEnd(pt.createFunctionDeclaration(e,c,[],t),l)}function je(){var e,t,n,r,i,o,a,s,l=null,c=[];return s=ft,Q("function"),j("(")||(e=ft,l=be(),st?d(e.value)&&U(e,rt.StrictFunctionName):d(e.value)?(n=e,r=rt.StrictFunctionName):u(e.value)&&(n=e,r=rt.StrictReservedWord)),c=(i=ze(n)).params,t=i.stricted,n=i.firstRestricted,i.message&&(r=i.message),a=st,o=Ge(),st&&n&&W(n,r),st&&t&&U(t,r),st=a,pt.markEnd(pt.createFunctionExpression(l,c,[],o),s)}function He(){if(ft.type===Ke.Keyword)switch(ft.value){case"const":case"let":return Se(ft.value);case"function":return Qe();default:return Ue()}if(ft.type!==Ke.EOF)return Ue()}function Ye(){for(var e,t,n,r=[];lt<dt&&(t=ft).type===Ke.StringLiteral&&(e=He(),r.push(e),e.expression.type===tt.Literal);)"use strict"===at.slice(t.start+1,t.end-1)?(st=!0,n&&U(n,rt.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(;lt<dt&&void 0!==(e=He());)r.push(e);return r}function Je(){var e,t;return v(),M(),t=ft,st=!1,e=Ye(),pt.markEnd(pt.createProgram(e),t)}function Xe(){var e,t,n,r=[];for(e=0;e<gt.tokens.length;++e)n={type:(t=gt.tokens[e]).type,value:t.value},gt.range&&(n.range=t.range),gt.loc&&(n.loc=t.loc),r.push(n);gt.tokens=r}function Ze(e,t){var n;"string"==typeof e||e instanceof String||(e=String(e)),pt=ot,lt=0,ct=(at=e).length>0?1:0,ut=0,dt=at.length,ft=null,ht={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},gt={},(t=t||{}).tokens=!0,gt.tokens=[],gt.tokenize=!0,gt.openParenToken=-1,gt.openCurlyToken=-1,gt.range="boolean"==typeof t.range&&t.range,gt.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(gt.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(gt.errors=[]);try{if(M(),ft.type===Ke.EOF)return gt.tokens;for(B();ft.type!==Ke.EOF;)try{B()}catch(e){if(gt.errors){gt.errors.push(e);break}throw e}Xe(),n=gt.tokens,void 0!==gt.comments&&(n.comments=gt.comments),void 0!==gt.errors&&(n.errors=gt.errors)}catch(e){throw e}finally{gt={}}return n}function qe(e,t){var n,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),pt=ot,lt=0,ct=(at=e).length>0?1:0,ut=0,dt=at.length,ft=null,ht={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},gt={},void 0!==t&&(gt.range="boolean"==typeof t.range&&t.range,gt.loc="boolean"==typeof t.loc&&t.loc,gt.attachComment="boolean"==typeof t.attachComment&&t.attachComment,gt.loc&&null!==t.source&&void 0!==t.source&&(gt.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(gt.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(gt.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(gt.errors=[]),gt.attachComment&&(gt.range=!0,gt.comments=[],gt.bottomRightStack=[],gt.trailingComments=[],gt.leadingComments=[]));try{n=Je(),void 0!==gt.comments&&(n.comments=gt.comments),void 0!==gt.tokens&&(Xe(),n.tokens=gt.tokens),void 0!==gt.errors&&(n.errors=gt.errors)}catch(e){throw e}finally{gt={}}return n}var Ke,$e,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,pt,ft,ht,gt;($e={})[(Ke={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",$e[Ke.EOF]="<end>",$e[Ke.Identifier]="Identifier",$e[Ke.Keyword]="Keyword",$e[Ke.NullLiteral]="Null",$e[Ke.NumericLiteral]="Numeric",$e[Ke.Punctuator]="Punctuator",$e[Ke.StringLiteral]="String",$e[Ke.RegularExpression]="RegularExpression",et=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],tt={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},nt={Data:1,Get:2,Set:4},rt={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},it={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},ot={name:"SyntaxTree",processComment:function(e){var t,n;if(!(e.type===tt.Program&&e.body.length>0)){for(gt.trailingComments.length>0?gt.trailingComments[0].range[0]>=e.range[1]?(n=gt.trailingComments,gt.trailingComments=[]):gt.trailingComments.length=0:gt.bottomRightStack.length>0&>.bottomRightStack[gt.bottomRightStack.length-1].trailingComments&>.bottomRightStack[gt.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(n=gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments,delete gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments);gt.bottomRightStack.length>0&>.bottomRightStack[gt.bottomRightStack.length-1].range[0]>=e.range[0];)t=gt.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):gt.leadingComments.length>0&>.leadingComments[gt.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=gt.leadingComments,gt.leadingComments=[]),n&&(e.trailingComments=n),gt.bottomRightStack.push(e)}},markEnd:function(e,t){return gt.range&&(e.range=[t.start,lt]),gt.loc&&(e.loc=new F(void 0===t.startLineNumber?t.lineNumber:t.startLineNumber,t.start-(void 0===t.startLineStart?t.lineStart:t.startLineStart),ct,lt-ut),this.postProcess(e)),gt.attachComment&&this.processComment(e),e},postProcess:function(e){return gt.source&&(e.loc.source=gt.source),e},createArrayExpression:function(e){return{type:tt.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:tt.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){return{type:"||"===e||"&&"===e?tt.LogicalExpression:tt.BinaryExpression,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:tt.BlockStatement,body:e}},createBreakStatement:function(e){return{type:tt.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:tt.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:tt.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:tt.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:tt.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:tt.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:tt.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:tt.EmptyStatement}},createExpressionStatement:function(e){return{type:tt.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:tt.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:tt.ForInStatement,left:e,right:t,body:n,each:!1}},createFunctionDeclaration:function(e,t,n,r){return{type:tt.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,t,n,r){return{type:tt.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:tt.Identifier,name:e}},createIfStatement:function(e,t,n){return{type:tt.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:tt.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:tt.Literal,value:e.value,raw:at.slice(e.start,e.end)}},createMemberExpression:function(e,t,n){return{type:tt.MemberExpression,computed:"["===e,object:t,property:n}},createNewExpression:function(e,t){return{type:tt.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:tt.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:tt.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:tt.Program,body:e}},createProperty:function(e,t,n){return{type:tt.Property,key:t,value:n,kind:e}},createReturnStatement:function(e){return{type:tt.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:tt.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:tt.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:tt.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:tt.ThisExpression}},createThrowStatement:function(e){return{type:tt.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:tt.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:tt.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:tt.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:tt.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:tt.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:tt.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:tt.WithStatement,object:e,body:t}}},e.version="1.2.2",e.tokenize=Ze,e.parse=qe,e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),tt)tt.hasOwnProperty(e)&&(t[e]=tt[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}))},{}],1:[function(e,t,n){(function(r){var i=function(){function e(){this.yy={}}var t={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(e,t,r,i,o,a,s){i.ast||(i.ast=n,n.initialize());var l=a.length-1;switch(o){case 1:return i.ast.set({expression:{type:"root",value:a[l]}}),i.ast.unshift(),i.ast.yield();case 2:return i.ast.set({expression:{type:"root",value:a[l-1]}}),i.ast.unshift(),i.ast.yield();case 3:return i.ast.unshift(),i.ast.yield();case 4:return i.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:a[l-1]}}),i.ast.unshift(),i.ast.yield();case 5:case 6:case 11:case 13:case 18:case 21:case 22:case 23:break;case 7:i.ast.set({operation:"member"}),i.ast.push();break;case 8:i.ast.set({operation:"subscript"}),i.ast.push();break;case 9:case 19:i.ast.set({scope:"child"});break;case 10:case 20:i.ast.set({scope:"descendant"});break;case 12:i.ast.set({scope:"child",operation:"member"});break;case 14:i.ast.set({expression:{type:"wildcard",value:a[l]}});break;case 15:i.ast.set({expression:{type:"identifier",value:a[l]}});break;case 16:i.ast.set({expression:{type:"script_expression",value:a[l]}});break;case 17:i.ast.set({expression:{type:"numeric_literal",value:parseInt(a[l])}});break;case 24:a[l].length>1?i.ast.set({expression:{type:"union",value:a[l]}}):this.$=a[l];break;case 25:this.$=[a[l]];break;case 26:this.$=a[l-2].concat(a[l]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(a[l])}},i.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:a[l]}},i.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:a[l]}},i.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:a[l]}},i.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:a[l]}},i.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:a[l]}},i.ast.set(this.$);break;case 33:case 34:this.$=a[l]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return"number"!=typeof(e=n.lexer.lex()||p)&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],o=[],a=this.table,s="",l=0,c=0,u=0,d=2,p=1,f=o.slice.call(arguments,1);this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;o.push(h);var g=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,m,y,b,C,x,E,S,w,V={};;){if(y=r[r.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(null!=v||(v=t()),b=a[y]&&a[y][v]),void 0===b||!b.length||!b[0]){var R="";for(x in w=[],a[y])this.terminals_[x]&&x>d&&w.push("'"+this.terminals_[x]+"'");R=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(v==p?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(R,{text:this.lexer.match,token:this.terminals_[v]||v,line:this.lexer.yylineno,loc:h,expected:w})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+v);switch(b[0]){case 1:r.push(v),i.push(this.lexer.yytext),o.push(this.lexer.yylloc),r.push(b[1]),v=null,m?(v=m,m=null):(c=this.lexer.yyleng,s=this.lexer.yytext,l=this.lexer.yylineno,h=this.lexer.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[b[1]][1],V.$=i[i.length-E],V._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},g&&(V._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(C=this.performAction.apply(V,[s,c,l,this.yy,b[1],i,o].concat(f))))return C;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),r.push(this.productions_[b[1]][0]),i.push(V.$),o.push(V._$),S=a[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},n={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(e){for(var t in e)this._node[t]=e[t];return this._node},node:function(e){return arguments.length&&(this._node=e),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var e=this._nodes;return this.initialize(),e}},r=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!t||n[0].length>t[0].length)){if(t=n,r=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return t.yytext=t.yytext.substr(1,t.yyleng-2),32;case 11:return t.yytext=t.yytext.substr(1,t.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e}();return t.lexer=r,e.prototype=t,t.Parser=e,new e}();void 0!==e&&void 0!==n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),r.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return n.parser.parse(i)},void 0!==t&&e.main===t&&n.main(r.argv.slice(1)))}).call(this,e("_process"))},{_process:11,fs:9,path:10}],2:[function(e,t,n){t.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(e,t,n){var r=e("./dict"),i=e("fs"),o={lex:{macros:{esc:"\\\\",int:r.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[r.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[r.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[r.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};i.readFileSync&&(o.moduleInclude=i.readFileSync(e.resolve("../include/module.js")),o.actionInclude=i.readFileSync(e.resolve("../include/action.js"))),t.exports=o},{"./dict":2,fs:9}],4:[function(e,t,n){function r(t,n,r){var i=e("./index"),o=c(p.parse(n).body[0].expression,{"@":t.value}),a=r.replace(/\{\{\s*value\s*\}\}/g,o),s=i.nodes(t.value,a);return s.forEach((function(e){e.path=t.path.concat(e.path.slice(1))})),s}function i(e){return Array.isArray(e)}function o(e){return e&&!(e instanceof Array)&&e instanceof Object}function a(e){return function(t,n,r,a){var s=t.value,l=t.path,c=[],u=function(t,s){i(t)?(t.forEach((function(e,t){c.length>=a||r(t,e,n)&&c.push({path:s.concat(t),value:e})})),t.forEach((function(t,n){c.length>=a||e&&u(t,s.concat(n))}))):o(t)&&(this.keys(t).forEach((function(e){c.length>=a||r(e,t[e],n)&&c.push({path:s.concat(e),value:t[e]})})),this.keys(t).forEach((function(n){c.length>=a||e&&u(t[n],s.concat(n))})))}.bind(this);return u(s,l),c}}function s(e){return function(t,n,r){return this.descend(n,t.expression.value,e,r)}}function l(e){return function(t,n,r){return this.traverse(n,t.expression.value,e,r)}}function c(){try{return h.apply(this,arguments)}catch(e){}}function u(e){return g(e,(function(e){return e.path.map((function(e){return String(e).replace("-","--")})).join("-")}))}function d(e){var t=String(e);return t.match(/^-?[0-9]+$/)?parseInt(t):null}var p=e("./aesprim"),f=e("./slice"),h=e("static-eval"),g=e("underscore").uniq,v=function(){return this.initialize.apply(this,arguments)};v.prototype.initialize=function(){this.traverse=a(!0),this.descend=a()},v.prototype.keys=Object.keys,v.prototype.resolve=function(e){var t=[e.operation,e.scope,e.expression.type].join("-"),n=this._fns[t];if(!n)throw new Error("couldn't resolve key: "+t);return n.bind(this)},v.prototype.register=function(e,t){if(!t instanceof Function)throw new Error("handler must be a function");this._fns[e]=t},v.prototype._fns={"member-child-identifier":function(e,t){var n=e.expression.value,r=t.value;if(r instanceof Object&&n in r)return[{value:r[n],path:t.path.concat(n)}]},"member-descendant-identifier":l((function(e,t,n){return e==n})),"subscript-child-numeric_literal":s((function(e,t,n){return e===n})),"member-child-numeric_literal":s((function(e,t,n){return String(e)===String(n)})),"subscript-descendant-numeric_literal":l((function(e,t,n){return e===n})),"member-child-wildcard":s((function(){return!0})),"member-descendant-wildcard":l((function(){return!0})),"subscript-descendant-wildcard":l((function(){return!0})),"subscript-child-wildcard":s((function(){return!0})),"subscript-child-slice":function(e,t){if(i(t.value)){var n=e.expression.value.split(":").map(d),r=t.value.map((function(e,n){return{value:e,path:t.path.concat(n)}}));return f.apply(null,[r].concat(n))}},"subscript-child-union":function(e,t){var n=[];return e.expression.value.forEach((function(e){var r={operation:"subscript",scope:"child",expression:e.expression},i=this.resolve(r)(r,t);i&&(n=n.concat(i))}),this),u(n)},"subscript-descendant-union":function(t,n,r){var i=e(".."),o=this,a=[];return i.nodes(n,"$..*").slice(1).forEach((function(e){a.length>=r||t.expression.value.forEach((function(t){var n={operation:"subscript",scope:"child",expression:t.expression},r=o.resolve(n)(n,e);a=a.concat(r)}))})),u(a)},"subscript-child-filter_expression":function(e,t,n){var r=e.expression.value.slice(2,-1),i=p.parse(r).body[0].expression,o=function(e,t){return c(i,{"@":t})};return this.descend(t,null,o,n)},"subscript-descendant-filter_expression":function(e,t,n){var r=e.expression.value.slice(2,-1),i=p.parse(r).body[0].expression,o=function(e,t){return c(i,{"@":t})};return this.traverse(t,null,o,n)},"subscript-child-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$..value")}},v.prototype._fns["subscript-child-string_literal"]=v.prototype._fns["member-child-identifier"],v.prototype._fns["member-descendant-numeric_literal"]=v.prototype._fns["subscript-descendant-string_literal"]=v.prototype._fns["member-descendant-identifier"],t.exports=v},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":12,underscore:9}],5:[function(e,t,n){function r(e){return"[object String]"==Object.prototype.toString.call(e)}var i=e("assert"),o=e("./dict"),a=e("./parser"),s=e("./handlers"),l=function(){this.initialize.apply(this,arguments)};l.prototype.initialize=function(){this.parser=new a,this.handlers=new s},l.prototype.parse=function(e){return i.ok(r(e),"we need a path"),this.parser.parse(e)},l.prototype.parent=function(e,t){i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path");var n=this.nodes(e,t)[0];return n.path.pop(),this.value(e,n.path)},l.prototype.apply=function(e,t,n){i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),i.equal(typeof n,"function","fn needs to be function");var r=this.nodes(e,t).sort((function(e,t){return t.path.length-e.path.length}));return r.forEach((function(t){var r=t.path.pop(),i=this.value(e,this.stringify(t.path)),o=t.value=n.call(e,i[r]);i[r]=o}),this),r},l.prototype.value=function(e,t,n){if(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),arguments.length>=3){var r=this.nodes(e,t).shift();if(!r)return this._vivify(e,t,n);var o=r.path.slice(-1).shift();this.parent(e,this.stringify(r.path))[o]=n}return this.query(e,this.stringify(t),1).shift()},l.prototype._vivify=function(e,t,n){var r=this;i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path");var o=this.parser.parse(t).map((function(e){return e.expression.value})),a=function(t,n){var i=t.pop(),o=r.value(e,t);o||(a(t.concat(),"string"==typeof i?{}:[]),o=r.value(e,t)),o[i]=n};return a(o,n),this.query(e,t)[0]},l.prototype.query=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(r(t),"we need a path"),this.nodes(e,t,n).map((function(e){return e.value}))},l.prototype.paths=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),this.nodes(e,t,n).map((function(e){return e.path}))},l.prototype.nodes=function(e,t,n){if(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),0===n)return[];var r=this.parser.parse(t),o=this.handlers,a=[{path:["$"],value:e}],s=[];return r.length&&"root"==r[0].expression.type&&r.shift(),r.length?(r.forEach((function(e,t){if(!(s.length>=n)){var i=o.resolve(e),l=[];a.forEach((function(o){if(!(s.length>=n)){var a=i(e,o,n);t==r.length-1?s=s.concat(a||[]):l=l.concat(a||[])}})),a=l}})),n?s.slice(0,n):s):a},l.prototype.stringify=function(e){i.ok(e,"we need a path");var t="$",n={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(e=this._normalize(e)).forEach((function(e){if("root"!=e.expression.type){var r,i=[e.scope,e.operation].join("-"),o=n[i];if(r="string_literal"==e.expression.type?JSON.stringify(e.expression.value):e.expression.value,!o)throw new Error("couldn't find template "+i);t+=o.replace(/{{value}}/,r)}})),t},l.prototype._normalize=function(e){if(i.ok(e,"we need a path"),"string"==typeof e)return this.parser.parse(e);if(Array.isArray(e)&&"string"==typeof e[0]){var t=[{expression:{type:"root",value:"$"}}];return e.forEach((function(e,n){if("$"!=e||0!==n)if("string"==typeof e&&e.match("^"+o.identifier+"$"))t.push({operation:"member",scope:"child",expression:{value:e,type:"identifier"}});else{var r="number"==typeof e?"numeric_literal":"string_literal";t.push({operation:"subscript",scope:"child",expression:{value:e,type:r}})}})),t}if(Array.isArray(e)&&"object"==typeof e[0])return e;throw new Error("couldn't understand path "+e)},l.Handlers=s,l.Parser=a;var c=new l;c.JSONPath=l,t.exports=c},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(e,t,n){var r=e("./grammar"),i=e("../generated/parser"),o=function(){var e=new i.Parser,t=e.parseError;return e.yy.parseError=function(){e.yy.ast&&e.yy.ast.initialize(),t.apply(e,arguments)},e};o.grammar=r,t.exports=o},{"../generated/parser":1,"./grammar":3}],7:[function(e,t,n){function r(e){return String(e).match(/^[0-9]+$/)?parseInt(e):Number.isFinite(e)?parseInt(e,10):0}t.exports=function(e,t,n,i){if("string"==typeof t)throw new Error("start cannot be a string");if("string"==typeof n)throw new Error("end cannot be a string");if("string"==typeof i)throw new Error("step cannot be a string");var o=e.length;if(0===i)throw new Error("step cannot be zero");if(i=i?r(i):1,n=n<0?o+n:n,t=r(0===(t=t<0?o+t:t)?0:t||(i>0?0:o-1)),n=r(0===n?0:n||(i>0?o:-1)),t=i>0?Math.max(0,t):Math.min(o,t),n=i>0?Math.min(n,o):Math.max(-1,n),i>0&&n<=t)return[];if(i<0&&t<=n)return[];for(var a=[],s=t;s!=n&&!(i<0&&s<=n||i>0&&s>=n);s+=i)a.push(e[s]);return a}},{}],8:[function(e,t,n){function r(e,t){return f.isUndefined(t)?""+t:f.isNumber(t)&&!isFinite(t)||f.isFunction(t)||f.isRegExp(t)?t.toString():t}function i(e,t){return f.isString(e)?e.length<t?e:e.slice(0,t):e}function o(e){return i(JSON.stringify(e.actual,r),128)+" "+e.operator+" "+i(JSON.stringify(e.expected,r),128)}function a(e,t,n,r,i){throw new v.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function s(e,t){e||a(e,!0,t,"==",v.ok)}function l(e,t){if(e===t)return!0;if(f.isBuffer(e)&&f.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return f.isDate(e)&&f.isDate(t)?e.getTime()===t.getTime():f.isRegExp(e)&&f.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:f.isObject(e)||f.isObject(t)?u(e,t):e==t}function c(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function u(e,t){if(f.isNullOrUndefined(e)||f.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(f.isPrimitive(e)||f.isPrimitive(t))return e===t;var n=c(e),r=c(t);if(n&&!r||!n&&r)return!1;if(n)return l(e=h.call(e),t=h.call(t));var i,o,a=m(e),s=m(t);if(a.length!=s.length)return!1;for(a.sort(),s.sort(),o=a.length-1;o>=0;o--)if(a[o]!=s[o])return!1;for(o=a.length-1;o>=0;o--)if(!l(e[i=a[o]],t[i]))return!1;return!0}function d(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function p(e,t,n,r){var i;f.isString(n)&&(r=n,n=null);try{t()}catch(e){i=e}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&a(i,n,"Missing expected exception"+r),!e&&d(i,n)&&a(i,n,"Got unwanted exception"+r),e&&i&&n&&!d(i,n)||!e&&i)throw i}var f=e("util/"),h=Array.prototype.slice,g=Object.prototype.hasOwnProperty,v=t.exports=s;v.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var t=e.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var l=r.indexOf("\n",s+1);r=r.substring(l+1)}this.stack=r}}},f.inherits(v.AssertionError,Error),v.fail=a,v.ok=s,v.equal=function(e,t,n){e!=t&&a(e,t,n,"==",v.equal)},v.notEqual=function(e,t,n){e==t&&a(e,t,n,"!=",v.notEqual)},v.deepEqual=function(e,t,n){l(e,t)||a(e,t,n,"deepEqual",v.deepEqual)},v.notDeepEqual=function(e,t,n){l(e,t)&&a(e,t,n,"notDeepEqual",v.notDeepEqual)},v.strictEqual=function(e,t,n){e!==t&&a(e,t,n,"===",v.strictEqual)},v.notStrictEqual=function(e,t,n){e===t&&a(e,t,n,"!==",v.notStrictEqual)},v.throws=function(e,t,n){p.apply(this,[!0].concat(h.call(arguments)))},v.doesNotThrow=function(e,t){p.apply(this,[!1].concat(h.call(arguments)))},v.ifError=function(e){if(e)throw e};var m=Object.keys||function(e){var t=[];for(var n in e)g.call(e,n)&&t.push(n);return t}},{"util/":15}],9:[function(e,t,n){},{}],10:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return n=t(r(n.split("/"),(function(e){return!!e})),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),o="/"===a(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&o&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l<a;l++)if(i[l]!==o[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push("..");return(c=c.concat(o.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=o(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=o(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return o(e)[3]};var a=function(e,t,n){return e.substr(t,n)}}).call(this,e("_process"))},{_process:11}],11:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(d===setTimeout)return setTimeout(e,0);if((d===r||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function s(){v&&h&&(v=!1,h.length?g=h.concat(g):m=-1,g.length&&l())}function l(){if(!v){var e=o(s);v=!0;for(var t=g.length;t;){for(h=g,g=[];++m<t;)h&&h[m].run();m=-1,t=g.length}h=null,v=!1,a(e)}}function c(e,t){this.fun=e,this.array=t}function u(){}var d,p,f=t.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:r}catch(e){d=r}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var h,g=[],v=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];g.push(new c(e,t)),1!==g.length||v||o(l)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],12:[function(e,t,n){var r=e("escodegen").generate;t.exports=function(e,t){t||(t={});var n={},i=function e(i){if("Literal"===i.type)return i.value;if("UnaryExpression"===i.type){var o=e(i.argument);return"+"===i.operator?+o:"-"===i.operator?-o:"~"===i.operator?~o:"!"===i.operator?!o:n}if("ArrayExpression"===i.type){for(var a=[],s=0,l=i.elements.length;s<l;s++){if((v=e(i.elements[s]))===n)return n;a.push(v)}return a}if("ObjectExpression"===i.type){var c={};for(s=0;s<i.properties.length;s++){var u=null===(m=i.properties[s]).value?m.value:e(m.value);if(u===n)return n;c[m.key.value||m.key.name]=u}return c}if("BinaryExpression"===i.type||"LogicalExpression"===i.type){if((l=e(i.left))===n)return n;var d=e(i.right);if(d===n)return n;var p=i.operator;return"=="===p?l==d:"==="===p?l===d:"!="===p?l!=d:"!=="===p?l!==d:"+"===p?l+d:"-"===p?l-d:"*"===p?l*d:"/"===p?l/d:"%"===p?l%d:"<"===p?l<d:"<="===p?l<=d:">"===p?l>d:">="===p?l>=d:"|"===p?l|d:"&"===p?l&d:"^"===p?l^d:"&&"===p?l&&d:"||"===p?l||d:n}if("Identifier"===i.type)return{}.hasOwnProperty.call(t,i.name)?t[i.name]:n;if("CallExpression"===i.type){var f=e(i.callee);if(f===n)return n;var h=i.callee.object?e(i.callee.object):n;h===n&&(h=null);var g=[];for(s=0,l=i.arguments.length;s<l;s++){var v;if((v=e(i.arguments[s]))===n)return n;g.push(v)}return f.apply(h,g)}var m;return"MemberExpression"===i.type?(c=e(i.object))===n?n:"Identifier"===i.property.type?c[i.property.name]:(m=e(i.property))===n?n:c[m]:"ConditionalExpression"===i.type?(o=e(i.test))===n?n:e(o?i.consequent:i.alternate):"FunctionExpression"===i.type?Function("return "+r(i))():n}(e);return i===n?void 0:i}},{escodegen:9}],13:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],14:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],15:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),l(n,e,n.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}function l(e,t,n){if(e.customInspect&&t&&R(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return b(i)||(i=l(e,i,n)),i}var o=c(e,t);if(o)return o;var a=Object.keys(t),g=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),V(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return u(t);if(0===a.length){if(R(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(V(t))return u(t)}var m,y="",C=!1,x=["{","}"];return h(t)&&(C=!0,x=["[","]"]),R(t)&&(y=" [Function"+(t.name?": "+t.name:"")+"]"),E(t)&&(y=" "+RegExp.prototype.toString.call(t)),w(t)&&(y=" "+Date.prototype.toUTCString.call(t)),V(t)&&(y=" "+u(t)),0!==a.length||C&&0!=t.length?n<0?E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),m=C?d(e,t,n,g,a):a.map((function(r){return p(e,t,n,g,r,C)})),e.seen.pop(),f(m,y,x)):x[0]+y+x[1]}function c(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)N(t,String(a))?o.push(p(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,n,r,i,!0))})),o}function p(e,t,n,r,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),N(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=v(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function f(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function m(e){return null==e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function C(e){return"symbol"==typeof e}function x(e){return void 0===e}function E(e){return S(e)&&"[object RegExp]"===A(e)}function S(e){return"object"==typeof e&&null!==e}function w(e){return S(e)&&"[object Date]"===A(e)}function V(e){return S(e)&&("[object Error]"===A(e)||e instanceof Error)}function R(e){return"function"==typeof e}function O(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function A(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}function T(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),B[e.getMonth()],t].join(" ")}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var D=/%[sdj%]/g;r.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(D,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<o;s=r[++n])a+=v(s)||!S(s)?" "+s:" "+i(s);return a},r.deprecate=function(e,i){function o(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(x(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return o};var P,_={};r.debuglog=function(e){if(x(P)&&(P=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!_[e])if(new RegExp("\\b"+e+"\\b","i").test(P)){var n=t.pid;_[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else _[e]=function(){};return _[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=g,r.isNull=v,r.isNullOrUndefined=m,r.isNumber=y,r.isString=b,r.isSymbol=C,r.isUndefined=x,r.isRegExp=E,r.isObject=S,r.isDate=w,r.isError=V,r.isFunction=R,r.isPrimitive=O,r.isBuffer=e("./support/isBuffer");var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",T(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!S(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":14,_process:11,inherits:13}],jsonpath:[function(e,t,n){t.exports=e("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")},948:function(e,t,n){var r;e=n.nmd(e),function(){function i(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function a(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function s(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function l(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function c(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function u(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function d(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function p(e,t){return!(null==e||!e.length)&&-1<x(e,t,0)}function f(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function h(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function g(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function v(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function m(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function y(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function b(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function C(e,t,n,r){var i=e.length;for(n+=r?1:-1;r?n--:++n<i;)if(t(e[n],n,e))return n;return-1}function x(e,t,n){if(t==t)e:{--n;for(var r=e.length;++n<r;)if(e[n]===t){e=n;break e}e=-1}else e=C(e,S,n);return e}function E(e,t,n,r){--n;for(var i=e.length;++n<i;)if(r(e[n],t))return n;return-1}function S(e){return e!=e}function w(e,t){var n=null==e?0:e.length;return n?A(e,t)/n:Q}function V(e){return function(t){return null==t?G:t[e]}}function R(e){return function(t){return null==e?G:e[t]}}function O(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function A(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);o!==G&&(n=n===G?o:n+o)}return n}function k(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function T(e){return function(t){return e(t)}}function N(e,t){return h(t,(function(t){return e[t]}))}function D(e,t){return e.has(t)}function P(e,t){for(var n=-1,r=e.length;++n<r&&-1<x(t,e[n],0););return n}function _(e,t){for(var n=e.length;n--&&-1<x(t,e[n],0););return n}function B(e){return"\\"+Fe[e]}function M(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function I(e,t){return function(n){return e(t(n))}}function F(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&"__lodash_placeholder__"!==a||(e[n]="__lodash_placeholder__",o[i++]=n)}return o}function L(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function W(e){if(De.test(e)){for(var t=Te.lastIndex=0;Te.test(e);)++t;e=t}else e=et(e);return e}function U(e){return De.test(e)?e.match(Te)||[]:e.split("")}var G,z=1/0,Q=NaN,j=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],H=/\b__p\+='';/g,Y=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,q=RegExp(X.source),K=RegExp(Z.source),$=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,te=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/^\./,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ae=/[\\^$.*+?()[\]{}|]/g,se=RegExp(ae.source),le=/^\s+|\s+$/g,ce=/^\s+/,ue=/\s+$/,de=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pe=/\{\n\/\* \[wrapped with (.+)\] \*/,fe=/,? & /,he=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ge=/\\(\\)?/g,ve=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ye=/^[-+]0x[0-9a-f]+$/i,be=/^0b[01]+$/i,Ce=/^\[object .+?Constructor\]$/,xe=/^0o[0-7]+$/i,Ee=/^(?:0|[1-9]\d*)$/,Se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,Ve=/['\n\r\u2028\u2029\\]/g,Re="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",Oe="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+Re,Ae=RegExp("['’]","g"),ke=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Te=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+Re,"g"),Ne=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",Oe].join("|"),"g"),De=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Pe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_e="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Be={};Be["[object Float32Array]"]=Be["[object Float64Array]"]=Be["[object Int8Array]"]=Be["[object Int16Array]"]=Be["[object Int32Array]"]=Be["[object Uint8Array]"]=Be["[object Uint8ClampedArray]"]=Be["[object Uint16Array]"]=Be["[object Uint32Array]"]=!0,Be["[object Arguments]"]=Be["[object Array]"]=Be["[object ArrayBuffer]"]=Be["[object Boolean]"]=Be["[object DataView]"]=Be["[object Date]"]=Be["[object Error]"]=Be["[object Function]"]=Be["[object Map]"]=Be["[object Number]"]=Be["[object Object]"]=Be["[object RegExp]"]=Be["[object Set]"]=Be["[object String]"]=Be["[object WeakMap]"]=!1;var Me={};Me["[object Arguments]"]=Me["[object Array]"]=Me["[object ArrayBuffer]"]=Me["[object DataView]"]=Me["[object Boolean]"]=Me["[object Date]"]=Me["[object Float32Array]"]=Me["[object Float64Array]"]=Me["[object Int8Array]"]=Me["[object Int16Array]"]=Me["[object Int32Array]"]=Me["[object Map]"]=Me["[object Number]"]=Me["[object Object]"]=Me["[object RegExp]"]=Me["[object Set]"]=Me["[object String]"]=Me["[object Symbol]"]=Me["[object Uint8Array]"]=Me["[object Uint8ClampedArray]"]=Me["[object Uint16Array]"]=Me["[object Uint32Array]"]=!0,Me["[object Error]"]=Me["[object Function]"]=Me["[object WeakMap]"]=!1;var Ie,Fe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Le=parseFloat,We=parseInt,Ue="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ge="object"==typeof self&&self&&self.Object===Object&&self,ze=Ue||Ge||Function("return this")(),Qe=t&&!t.nodeType&&t,je=Qe&&e&&!e.nodeType&&e,He=je&&je.exports===Qe,Ye=He&&Ue.process;e:{try{Ie=Ye&&Ye.binding&&Ye.binding("util");break e}catch(i){}Ie=void 0}var Je=Ie&&Ie.isArrayBuffer,Xe=Ie&&Ie.isDate,Ze=Ie&&Ie.isMap,qe=Ie&&Ie.isRegExp,Ke=Ie&&Ie.isSet,$e=Ie&&Ie.isTypedArray,et=V("length"),tt=R({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nt=R({"&":"&","<":"<",">":">",'"':""","'":"'"}),rt=R({"&":"&","<":"<",">":">",""":'"',"'":"'"}),it=function e(t){function n(e){if(Kr(e)&&!Wa(e)&&!(e instanceof Re)){if(e instanceof R)return e;if(Wi.call(e,"__wrapped__"))return wr(e)}return new R(e)}function r(){}function R(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=G}function Re(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ie;++t<n;)this.add(e[t])}function Ue(e){this.size=(this.__data__=new Te(e)).size}function Ge(e,t){var n,r=Wa(e),i=!r&&La(e),o=!r&&!i&&Ga(e),a=!r&&!i&&!o&&Ya(e),s=(i=(r=r||i||o||a)?k(e.length,_i):[]).length;for(n in e)!t&&!Wi.call(e,n)||r&&("length"==n||o&&("offset"==n||"parent"==n)||a&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||dr(n,s))||i.push(n);return i}function Qe(e){var t=e.length;return t?e[Yt(0,t-1)]:G}function je(e,t){return Cr(wn(e),dt(t,0,e.length))}function Ye(e){return Cr(wn(e))}function et(e,t,n){(n===G||Qr(e[t],n))&&(n!==G||t in e)||ct(e,t,n)}function ot(e,t,n){var r=e[t];Wi.call(e,t)&&Qr(r,n)&&(n!==G||t in e)||ct(e,t,n)}function at(e,t){for(var n=e.length;n--;)if(Qr(e[n][0],t))return n;return-1}function st(e,t,n,r){return Lo(e,(function(e,i,o){t(r,e,n(e),o)})),r}function lt(e,t){return e&&Vn(t,pi(t),e)}function ct(e,t,n){"__proto__"==t&&io?io(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ut(e,t){for(var n=-1,r=t.length,i=Oi(r),o=null==e;++n<r;)i[n]=o?G:ui(e,t[n]);return i}function dt(e,t,n){return e==e&&(n!==G&&(e=e<=n?e:n),t!==G&&(e=e>=t?e:t)),e}function pt(e,t,n,r,i,o){var a,s=1&t,c=2&t,u=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),a!==G)return a;if(!qr(e))return e;if(r=Wa(e)){if(a=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Wi.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return wn(e,a)}else{var d=Zo(e),p="[object Function]"==d||"[object GeneratorFunction]"==d;if(Ga(e))return yn(e,s);if("[object Object]"==d||"[object Arguments]"==d||p&&!i){if(a=c||p?{}:lr(e),!s)return c?function(e,t){return Vn(e,Xo(e),t)}(e,function(e,t){return e&&Vn(t,fi(t),e)}(a,e)):function(e,t){return Vn(e,Jo(e),t)}(e,lt(a,e))}else{if(!Me[d])return i?e:{};a=cr(e,d,pt,s)}}if(o||(o=new Ue),i=o.get(e))return i;o.set(e,a);c=u?c?er:$n:c?fi:pi;var f=r?G:c(e);return l(f||e,(function(r,i){f&&(r=e[i=r]),ot(a,i,pt(r,t,n,i,e,o))})),a}function ft(e,t,n){var r=n.length;if(null==e)return!r;for(e=Di(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===G&&!(i in e)||!o(a))return!1}return!0}function ht(e,t,n){if("function"!=typeof e)throw new Bi("Expected a function");return $o((function(){e.apply(G,n)}),t)}function gt(e,t,n,r){var i=-1,o=p,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=h(t,T(n))),r?(o=f,a=!1):200<=t.length&&(o=D,a=!1,t=new Fe(t));e:for(;++i<s;){var u=e[i],d=null==n?u:n(u);u=r||0!==u?u:0;if(a&&d==d){for(var g=c;g--;)if(t[g]===d)continue e;l.push(u)}else o(t,d,r)||l.push(u)}return l}function vt(e,t){var n=!0;return Lo(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function mt(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(s===G?a==a&&!ni(a):n(a,s)))var s=a,l=o}return l}function yt(e,t){var n=[];return Lo(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function bt(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=ur),i||(i=[]);++o<a;){var s=e[o];0<t&&n(s)?1<t?bt(s,t-1,n,r,i):g(i,s):r||(i[i.length]=s)}return i}function Ct(e,t){return e&&Uo(e,t,pi)}function xt(e,t){return e&&Go(e,t,pi)}function Et(e,t){return d(t,(function(t){return Jr(e[t])}))}function St(e,t){for(var n=0,r=(t=vn(t,e)).length;null!=e&&n<r;)e=e[xr(t[n++])];return n&&n==r?e:G}function wt(e,t,n){return t=t(e),Wa(e)?t:g(t,n(e))}function Vt(e){if(null==e)e=e===G?"[object Undefined]":"[object Null]";else if(ro&&ro in Di(e)){var t=Wi.call(e,ro),n=e[ro];try{e[ro]=G;var r=!0}catch(e){}var i=zi.call(e);r&&(t?e[ro]=n:delete e[ro]),e=i}else e=zi.call(e);return e}function Rt(e,t){return e>t}function Ot(e,t){return null!=e&&Wi.call(e,t)}function At(e,t){return null!=e&&t in Di(e)}function kt(e,t,n){for(var r=n?f:p,i=e[0].length,o=e.length,a=o,s=Oi(o),l=1/0,c=[];a--;){var u=e[a];a&&t&&(u=h(u,T(t))),l=mo(u.length,l),s[a]=!n&&(t||120<=i&&120<=u.length)?new Fe(a&&u):G}u=e[0];var d=-1,g=s[0];e:for(;++d<i&&c.length<l;){var v=u[d],m=t?t(v):v;v=n||0!==v?v:0;if(g?!D(g,m):!r(c,m,n)){for(a=o;--a;){var y=s[a];if(y?!D(y,m):!r(e[a],m,n))continue e}g&&g.push(m),c.push(v)}}return c}function Tt(e,t,n){return null==(t=null==(e=2>(t=vn(t,e)).length?e:St(e,en(t,0,-1)))?e:e[xr(kr(t))])?G:a(t,e,n)}function Nt(e){return Kr(e)&&"[object Arguments]"==Vt(e)}function Dt(e,t,n,r,i){if(e===t)t=!0;else if(null==e||null==t||!Kr(e)&&!Kr(t))t=e!=e&&t!=t;else e:{var o,a,s=Wa(e),l=Wa(t),c="[object Object]"==(o="[object Arguments]"==(o=s?"[object Array]":Zo(e))?"[object Object]":o);l="[object Object]"==(a="[object Arguments]"==(a=l?"[object Array]":Zo(t))?"[object Object]":a);if((a=o==a)&&Ga(e)){if(!Ga(t)){t=!1;break e}s=!0,c=!1}if(a&&!c)i||(i=new Ue),t=s||Ya(e)?qn(e,t,n,r,Dt,i):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new Xi(e),new Xi(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return Qr(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=M;case"[object Set]":if(s||(s=L),e.size!=t.size&&!(1&r))break;return(n=a.get(e))?n==t:(r|=2,a.set(e,t),t=qn(s(e),s(t),r,i,o,a),a.delete(e),t);case"[object Symbol]":if(Mo)return Mo.call(e)==Mo.call(t)}return!1}(e,t,o,n,r,Dt,i);else{if(!(1&n)&&(s=c&&Wi.call(e,"__wrapped__"),o=l&&Wi.call(t,"__wrapped__"),s||o)){e=s?e.value():e,t=o?t.value():t,i||(i=new Ue),t=Dt(e,t,n,r,i);break e}if(a)t:if(i||(i=new Ue),s=1&n,o=$n(e),l=o.length,a=$n(t).length,l==a||s){for(c=l;c--;){var u=o[c];if(!(s?u in t:Wi.call(t,u))){t=!1;break t}}if((a=i.get(e))&&i.get(t))t=a==t;else{a=!0,i.set(e,t),i.set(t,e);for(var d=s;++c<l;){var p=e[u=o[c]],f=t[u];if(r)var h=s?r(f,p,u,t,e,i):r(p,f,u,e,t,i);if(h===G?p!==f&&!Dt(p,f,n,r,i):!h){a=!1;break}d||(d="constructor"==u)}a&&!d&&((n=e.constructor)!=(r=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof n&&n instanceof n&&"function"==typeof r&&r instanceof r)&&(a=!1)),i.delete(e),i.delete(t),t=a}}else t=!1;else t=!1}}return t}function Pt(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Di(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(c===G&&!(l in e))return!1}else{if(s=new Ue,r)var d=r(c,u,l,e,t,s);if(d===G?!Dt(u,c,3,r,s):!d)return!1}}return!0}function _t(e){return!(!qr(e)||Gi&&Gi in e)&&(Jr(e)?Hi:Ce).test(Er(e))}function Bt(e){return"function"==typeof e?e:null==e?Ci:"object"==typeof e?Wa(e)?Wt(e[0],e[1]):Lt(e):wi(e)}function Mt(e){if(!gr(e))return go(e);var t,n=[];for(t in Di(e))Wi.call(e,t)&&"constructor"!=t&&n.push(t);return n}function It(e,t){return e<t}function Ft(e,t){var n=-1,r=jr(e)?Oi(e.length):[];return Lo(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function Lt(e){var t=or(e);return 1==t.length&&t[0][2]?vr(t[0][0],t[0][1]):function(n){return n===e||Pt(n,e,t)}}function Wt(e,t){return fr(e)&&t==t&&!qr(t)?vr(xr(e),t):function(n){var r=ui(n,e);return r===G&&r===t?di(n,e):Dt(t,r,3)}}function Ut(e,t,n,r,i){e!==t&&Uo(t,(function(o,a){if(qr(o)){i||(i=new Ue);var s=i,l=e[a],c=t[a];if(h=s.get(c))et(e,a,h);else{var u=(h=r?r(l,c,a+"",e,t,s):G)===G;if(u){var d=Wa(c),p=!d&&Ga(c),f=!d&&!p&&Ya(c),h=c;d||p||f?Wa(l)?h=l:Hr(l)?h=wn(l):p?(u=!1,h=yn(c,!0)):f?(u=!1,h=Cn(c,!0)):h=[]:ei(c)||La(c)?(h=l,La(l)?h=li(l):(!qr(l)||n&&Jr(l))&&(h=lr(c))):u=!1}u&&(s.set(c,h),Ut(h,c,n,r,s),s.delete(c)),et(e,a,h)}}else(s=r?r(e[a],o,a+"",e,t,i):G)===G&&(s=o),et(e,a,s)}),fi)}function Gt(e,t){var n=e.length;if(n)return dr(t+=0>t?n:0,n)?e[t]:G}function zt(e,t,n){var r=-1;return t=h(t.length?t:[Ci],T(rr())),e=Ft(e,(function(e){return{a:h(t,(function(t){return t(e)})),b:++r,c:e}})),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].c;return e}(e,(function(e,t){var r;e:{r=-1;for(var i=e.a,o=t.a,a=i.length,s=n.length;++r<a;){var l=xn(i[r],o[r]);if(l){r=r>=s?l:l*("desc"==n[r]?-1:1);break e}}r=e.b-t.b}return r}))}function Qt(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=St(e,a);n(s,a)&&Kt(o,vn(a,e),s)}return o}function jt(e,t,n,r){var i=r?E:x,o=-1,a=t.length,s=e;for(e===t&&(t=wn(t)),n&&(s=h(e,T(n)));++o<a;){var l=0,c=t[o];for(c=n?n(c):c;-1<(l=i(s,c,l,r));)s!==e&&eo.call(s,l,1),eo.call(e,l,1)}return e}function Ht(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;dr(i)?eo.call(e,i,1):cn(e,i)}}}function Yt(e,t){return e+co(Co()*(t-e+1))}function Jt(e,t){var n="";if(!e||1>t||9007199254740991<t)return n;do{t%2&&(n+=e),(t=co(t/2))&&(e+=e)}while(t);return n}function Xt(e,t){return ea(mr(e,t,Ci),e+"")}function Zt(e){return Qe(gi(e))}function qt(e,t){var n=gi(e);return Cr(n,dt(t,0,n.length))}function Kt(e,t,n,r){if(!qr(e))return e;for(var i=-1,o=(t=vn(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var l=xr(t[i]),c=n;if(i!=a){var u=s[l];(c=r?r(u,l,s):G)===G&&(c=qr(u)?u:dr(t[i+1])?[]:{})}ot(s,l,c),s=s[l]}return e}function $t(e){return Cr(gi(e))}function en(e,t,n){var r=-1,i=e.length;for(0>t&&(t=-t>i?0:i+t),0>(n=n>i?i:n)&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0,n=Oi(i);++r<i;)n[r]=e[r+t];return n}function tn(e,t){var n;return Lo(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function nn(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&2147483647>=i){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ni(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return rn(e,t,Ci,n)}function rn(e,t,n,r){t=n(t);for(var i=0,o=null==e?0:e.length,a=t!=t,s=null===t,l=ni(t),c=t===G;i<o;){var u=co((i+o)/2),d=n(e[u]),p=d!==G,f=null===d,h=d==d,g=ni(d);(a?r||h:c?h&&(r||p):s?h&&p&&(r||!f):l?h&&p&&!f&&(r||!g):!f&&!g&&(r?d<=t:d<t))?i=u+1:o=u}return mo(o,4294967294)}function on(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Qr(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function an(e){return"number"==typeof e?e:ni(e)?Q:+e}function sn(e){if("string"==typeof e)return e;if(Wa(e))return h(e,sn)+"";if(ni(e))return Io?Io.call(e):"";var t=e+"";return"0"==t&&1/e==-z?"-0":t}function ln(e,t,n){var r=-1,i=p,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=f;else if(200<=o){if(i=t?null:Ho(e))return L(i);a=!1,i=D,l=new Fe}else l=t?[]:s;e:for(;++r<o;){var c=e[r],u=t?t(c):c;c=n||0!==c?c:0;if(a&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue e;t&&l.push(u),s.push(c)}else i(l,u,n)||(l!==s&&l.push(u),s.push(c))}return s}function cn(e,t){return null==(e=2>(t=vn(t,e)).length?e:St(e,en(t,0,-1)))||delete e[xr(kr(t))]}function un(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?en(e,r?0:o,r?o+1:i):en(e,r?o+1:0,r?i:o)}function dn(e,t){var n=e;return n instanceof Re&&(n=n.value()),v(t,(function(e,t){return t.func.apply(t.thisArg,g([e],t.args))}),n)}function pn(e,t,n){var r=e.length;if(2>r)return r?ln(e[0]):[];for(var i=-1,o=Oi(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=gt(o[i]||a,e[s],t,n));return ln(bt(o,1),t,n)}function fn(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;)n(a,e[r],r<o?t[r]:G);return a}function hn(e){return Hr(e)?e:[]}function gn(e){return"function"==typeof e?e:Ci}function vn(e,t){return Wa(e)?e:fr(e,t)?[e]:ta(ci(e))}function mn(e,t,n){var r=e.length;return n=n===G?r:n,!t&&n>=r?e:en(e,t,n)}function yn(e,t){if(t)return e.slice();var n=e.length;n=Zi?Zi(n):new e.constructor(n);return e.copy(n),n}function bn(e){var t=new e.constructor(e.byteLength);return new Xi(t).set(new Xi(e)),t}function Cn(e,t){return new e.constructor(t?bn(e.buffer):e.buffer,e.byteOffset,e.length)}function xn(e,t){if(e!==t){var n=e!==G,r=null===e,i=e==e,o=ni(e),a=t!==G,s=null===t,l=t==t,c=ni(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}function En(e,t,n,r){var i=-1,o=e.length,a=n.length,s=-1,l=t.length,c=vo(o-a,0),u=Oi(l+c);for(r=!r;++s<l;)u[s]=t[s];for(;++i<a;)(r||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function Sn(e,t,n,r){var i=-1,o=e.length,a=-1,s=n.length,l=-1,c=t.length,u=vo(o-s,0),d=Oi(u+c);for(r=!r;++i<u;)d[i]=e[i];for(u=i;++l<c;)d[u+l]=t[l];for(;++a<s;)(r||i<o)&&(d[u+n[a]]=e[i++]);return d}function wn(e,t){var n=-1,r=e.length;for(t||(t=Oi(r));++n<r;)t[n]=e[n];return t}function Vn(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):G;l===G&&(l=e[s]),i?ct(n,s,l):ot(n,s,l)}return n}function Rn(e,t){return function(n,r){var i=Wa(n)?s:st,o=t?t():{};return i(n,e,rr(r,2),o)}}function On(e){return Xt((function(t,n){var r=-1,i=n.length,o=1<i?n[i-1]:G,a=2<i?n[2]:G;o=3<e.length&&"function"==typeof o?(i--,o):G;for(a&&pr(n[0],n[1],a)&&(o=3>i?G:o,i=1),t=Di(t);++r<i;)(a=n[r])&&e(t,a,r,o);return t}))}function An(e,t){return function(n,r){if(null==n)return n;if(!jr(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Di(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function kn(e){return function(t,n,r){for(var i=-1,o=Di(t),a=(r=r(t)).length;a--;){var s=r[e?a:++i];if(!1===n(o[s],s,o))break}return t}}function Tn(e){return function(t){t=ci(t);var n=De.test(t)?U(t):G,r=n?n[0]:t.charAt(0);return t=n?mn(n,1).join(""):t.slice(1),r[e]()+t}}function Nn(e){return function(t){return v(yi(mi(t).replace(Ae,"")),e,"")}}function Dn(e){return function(){switch((t=arguments).length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var t,n=Fo(e.prototype);return qr(t=e.apply(n,t))?t:n}}function Pn(e,t,n){var r=Dn(e);return function i(){for(var o=arguments.length,s=Oi(o),l=o,c=nr(i);l--;)s[l]=arguments[l];return(o-=(l=3>o&&s[0]!==c&&s[o-1]!==c?[]:F(s,c)).length)<n?Qn(e,t,Mn,i.placeholder,G,s,l,G,G,n-o):a(this&&this!==ze&&this instanceof i?r:e,this,s)}}function _n(e){return function(t,n,r){var i=Di(t);if(!jr(t)){var o=rr(n,3);t=pi(t),n=function(e){return o(i[e],e,i)}}return-1<(n=e(t,n,r))?i[o?t[n]:n]:G}}function Bn(e){return Kn((function(t){var n=t.length,r=n,i=R.prototype.thru;for(e&&t.reverse();r--;){if("function"!=typeof(a=t[r]))throw new Bi("Expected a function");if(i&&!o&&"wrapper"==tr(a))var o=new R([],!0)}for(r=o?r:n;++r<n;){var a,s="wrapper"==(i=tr(a=t[r]))?Yo(a):G;o=s&&hr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?o[tr(s[0])].apply(o,s[3]):1==a.length&&hr(a)?o[i]():o.thru(a)}return function(){var e=(i=arguments)[0];if(o&&1==i.length&&Wa(e))return o.plant(e).value();for(var r=0,i=n?t[r].apply(this,i):e;++r<n;)i=t[r].call(this,i);return i}}))}function Mn(e,t,n,r,i,o,a,s,l,c){var u=128&t,d=1&t,p=2&t,f=24&t,h=512&t,g=p?G:Dn(e);return function v(){for(var m=arguments.length,y=Oi(m),b=m;b--;)y[b]=arguments[b];if(f){var C,x=nr(v);b=y.length;for(C=0;b--;)y[b]===x&&++C}if(r&&(y=En(y,r,i,f)),o&&(y=Sn(y,o,a,f)),m-=C,f&&m<c)return x=F(y,x),Qn(e,t,Mn,v.placeholder,n,y,x,s,l,c-m);if(x=d?n:this,b=p?x[e]:e,m=y.length,s){C=y.length;for(var E=mo(s.length,C),S=wn(y);E--;){var w=s[E];y[E]=dr(w,C)?S[w]:G}}else h&&1<m&&y.reverse();return u&&l<m&&(y.length=l),this&&this!==ze&&this instanceof v&&(b=g||Dn(b)),b.apply(x,y)}}function In(e,t){return function(n,r){return function(e,t,n){var r={};return Ct(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r))}}function Fn(e,t){return function(n,r){var i;if(n===G&&r===G)return t;if(n!==G&&(i=n),r!==G){if(i===G)return r;"string"==typeof n||"string"==typeof r?(n=sn(n),r=sn(r)):(n=an(n),r=an(r)),i=e(n,r)}return i}}function Ln(e){return Kn((function(t){return t=h(t,T(rr())),Xt((function(n){var r=this;return e(t,(function(e){return a(e,r,n)}))}))}))}function Wn(e,t){var n=(t=t===G?" ":sn(t)).length;return 2>n?n?Jt(t,e):t:(n=Jt(t,lo(e/W(t))),De.test(t)?mn(U(n),0,e).join(""):n.slice(0,e))}function Un(e,t,n,r){var i=1&t,o=Dn(e);return function t(){for(var s=-1,l=arguments.length,c=-1,u=r.length,d=Oi(u+l),p=this&&this!==ze&&this instanceof t?o:e;++c<u;)d[c]=r[c];for(;l--;)d[c++]=arguments[++s];return a(p,i?n:this,d)}}function Gn(e){return function(t,n,r){r&&"number"!=typeof r&&pr(t,n,r)&&(n=r=G),t=ii(t),n===G?(n=t,t=0):n=ii(n),r=r===G?t<n?1:-1:ii(r);var i=-1;n=vo(lo((n-t)/(r||1)),0);for(var o=Oi(n);n--;)o[e?n:++i]=t,t+=r;return o}}function zn(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=si(t),n=si(n)),e(t,n)}}function Qn(e,t,n,r,i,o,a,s,l,c){var u=8&t;return 4&(t=(t|(u?32:64))&~(u?64:32))||(t&=-4),i=[e,t,i,u?o:G,u?a:G,o=u?G:o,a=u?G:a,s,l,c],n=n.apply(G,i),hr(e)&&Ko(n,i),n.placeholder=r,yr(n,e,t)}function jn(e){var t=Ni[e];return function(e,n){if(e=si(e),n=null==n?0:mo(oi(n),292)){var r=(ci(e)+"e").split("e");return+((r=(ci(r=t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}function Hn(e){return function(t){var n=Zo(t);return"[object Map]"==n?M(t):"[object Set]"==n?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return h(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yn(e,t,n,r,i,o,a,s){var l=2&t;if(!l&&"function"!=typeof e)throw new Bi("Expected a function");var c=r?r.length:0;if(c||(t&=-97,r=i=G),a=a===G?a:vo(oi(a),0),s=s===G?s:oi(s),c-=i?i.length:0,64&t){var u=r,d=i;r=i=G}var p=l?G:Yo(e);return o=[e,t,n,r,i,u,d,o,a,s],p&&(t=(n=o[1])|(e=p[1]),r=128==e&&8==n||128==e&&256==n&&o[7].length<=p[8]||384==e&&p[7].length<=p[8]&&8==n,131>t||r)&&(1&e&&(o[2]=p[2],t|=1&n?0:4),(n=p[3])&&(r=o[3],o[3]=r?En(r,n,p[4]):n,o[4]=r?F(o[3],"__lodash_placeholder__"):p[4]),(n=p[5])&&(r=o[5],o[5]=r?Sn(r,n,p[6]):n,o[6]=r?F(o[5],"__lodash_placeholder__"):p[6]),(n=p[7])&&(o[7]=n),128&e&&(o[8]=null==o[8]?p[8]:mo(o[8],p[8])),null==o[9]&&(o[9]=p[9]),o[0]=p[0],o[1]=t),e=o[0],t=o[1],n=o[2],r=o[3],i=o[4],!(s=o[9]=o[9]===G?l?0:e.length:vo(o[9]-c,0))&&24&t&&(t&=-25),yr((p?zo:Ko)(t&&1!=t?8==t||16==t?Pn(e,t,s):32!=t&&33!=t||i.length?Mn.apply(G,o):Un(e,t,n,r):function(e,t,n){var r=1&t,i=Dn(e);return function t(){return(this&&this!==ze&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n),o),e,t)}function Jn(e,t,n,r){return e===G||Qr(e,Ii[n])&&!Wi.call(r,n)?t:e}function Xn(e,t,n,r,i,o){return qr(e)&&qr(t)&&(o.set(t,e),Ut(e,t,G,Xn,o),o.delete(t)),e}function Zn(e){return ei(e)?G:e}function qn(e,t,n,r,i,o){var a=1&n,s=e.length;if(s!=(l=t.length)&&!(a&&l>s))return!1;if((l=o.get(e))&&o.get(t))return l==t;var l=-1,c=!0,u=2&n?new Fe:G;for(o.set(e,t),o.set(t,e);++l<s;){var d=e[l],p=t[l];if(r)var f=a?r(p,d,l,t,e,o):r(d,p,l,e,t,o);if(f!==G){if(f)continue;c=!1;break}if(u){if(!y(t,(function(e,t){if(!D(u,t)&&(d===e||i(d,e,n,r,o)))return u.push(t)}))){c=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){c=!1;break}}return o.delete(e),o.delete(t),c}function Kn(e){return ea(mr(e,G,Or),e+"")}function $n(e){return wt(e,pi,Jo)}function er(e){return wt(e,fi,Xo)}function tr(e){for(var t=e.name+"",n=ko[t],r=Wi.call(ko,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function nr(e){return(Wi.call(n,"placeholder")?n:e).placeholder}function rr(){var e=(e=n.iteratee||xi)===xi?Bt:e;return arguments.length?e(arguments[0],arguments[1]):e}function ir(e,t){var n=e.__data__,r=typeof t;return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function or(e){for(var t=pi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,i==i&&!qr(i)]}return t}function ar(e,t){var n=null==e?G:e[t];return _t(n)?n:G}function sr(e,t,n){for(var r=-1,i=(t=vn(t,e)).length,o=!1;++r<i;){var a=xr(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Zr(i)&&dr(a,i)&&(Wa(e)||La(e))}function lr(e){return"function"!=typeof e.constructor||gr(e)?{}:Fo(qi(e))}function cr(e,t,n,r){var a=e.constructor;switch(t){case"[object ArrayBuffer]":return bn(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return t=r?bn(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Cn(e,r);case"[object Map]":return v(t=r?n(M(e),1):M(e),i,new e.constructor);case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(t=new e.constructor(e.source,me.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return v(t=r?n(L(e),1):L(e),o,new e.constructor);case"[object Symbol]":return Mo?Di(Mo.call(e)):{}}}function ur(e){return Wa(e)||La(e)||!!(to&&e&&e[to])}function dr(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||Ee.test(e))&&-1<e&&0==e%1&&e<t}function pr(e,t,n){if(!qr(n))return!1;var r=typeof t;return!!("number"==r?jr(n)&&dr(t,n.length):"string"==r&&t in n)&&Qr(n[t],e)}function fr(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ni(e))||re.test(e)||!ne.test(e)||null!=t&&e in Di(t)}function hr(e){var t=tr(e),r=n[t];return"function"==typeof r&&t in Re.prototype&&(e===r||!!(t=Yo(r))&&e===t[0])}function gr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ii)}function vr(e,t){return function(n){return null!=n&&n[e]===t&&(t!==G||e in Di(n))}}function mr(e,t,n){return t=vo(t===G?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=vo(r.length-t,0),s=Oi(o);++i<o;)s[i]=r[t+i];for(i=-1,o=Oi(t+1);++i<t;)o[i]=r[i];return o[t]=n(s),a(e,this,o)}}function yr(e,t,n){var r=t+"";t=ea;var i,o=Sr;return n=o(i=(i=r.match(pe))?i[1].split(fe):[],n),(o=n.length)&&(n[i=o-1]=(1<o?"& ":"")+n[i],n=n.join(2<o?", ":" "),r=r.replace(de,"{\n/* [wrapped with "+n+"] */\n")),t(e,r)}function br(e){var t=0,n=0;return function(){var r=yo(),i=16-(r-n);if(n=r,0<i){if(800<=++t)return arguments[0]}else t=0;return e.apply(G,arguments)}}function Cr(e,t){var n=-1,r=(i=e.length)-1;for(t=t===G?i:t;++n<t;){var i,o=e[i=Yt(n,r)];e[i]=e[n],e[n]=o}return e.length=t,e}function xr(e){if("string"==typeof e||ni(e))return e;var t=e+"";return"0"==t&&1/e==-z?"-0":t}function Er(e){if(null!=e){try{return Li.call(e)}catch(e){}return e+""}return""}function Sr(e,t){return l(j,(function(n){var r="_."+n[0];t&n[1]&&!p(e,r)&&e.push(r)})),e.sort()}function wr(e){if(e instanceof Re)return e.clone();var t=new R(e.__wrapped__,e.__chain__);return t.__actions__=wn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Vr(e,t,n){var r=null==e?0:e.length;return r?(0>(n=null==n?0:oi(n))&&(n=vo(r+n,0)),C(e,rr(t,3),n)):-1}function Rr(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==G&&(i=oi(n),i=0>n?vo(r+i,0):mo(i,r-1)),C(e,rr(t,3),i,!0)}function Or(e){return null!=e&&e.length?bt(e,1):[]}function Ar(e){return e&&e.length?e[0]:G}function kr(e){var t=null==e?0:e.length;return t?e[t-1]:G}function Tr(e,t){return e&&e.length&&t&&t.length?jt(e,t):e}function Nr(e){return null==e?e:xo.call(e)}function Dr(e){if(!e||!e.length)return[];var t=0;return e=d(e,(function(e){if(Hr(e))return t=vo(e.length,t),!0})),k(t,(function(t){return h(e,V(t))}))}function Pr(e,t){if(!e||!e.length)return[];var n=Dr(e);return null==t?n:h(n,(function(e){return a(t,G,e)}))}function _r(e){return(e=n(e)).__chain__=!0,e}function Br(e,t){return t(e)}function Mr(e,t){return(Wa(e)?l:Lo)(e,rr(t,3))}function Ir(e,t){return(Wa(e)?c:Wo)(e,rr(t,3))}function Fr(e,t){return(Wa(e)?h:Ft)(e,rr(t,3))}function Lr(e,t,n){return t=n?G:t,t=e&&null==t?e.length:t,Yn(e,128,G,G,G,G,t)}function Wr(e,t){var n;if("function"!=typeof t)throw new Bi("Expected a function");return e=oi(e),function(){return 0<--e&&(n=t.apply(this,arguments)),1>=e&&(t=G),n}}function Ur(e,t,n){function r(t){var n=l,r=c;return l=c=G,h=t,d=e.apply(r,n)}function i(e){var n=e-f;return e-=h,f===G||n>=t||0>n||v&&e>=u}function o(){var e=Aa();if(i(e))return a(e);var n,r=$o;n=e-h,e=t-(e-f),n=v?mo(e,u-n):e,p=r(o,n)}function a(e){return p=G,m&&l?r(e):(l=c=G,d)}function s(){var e=Aa(),n=i(e);if(l=arguments,c=this,f=e,n){if(p===G)return h=e=f,p=$o(o,t),g?r(e):d;if(v)return p=$o(o,t),r(f)}return p===G&&(p=$o(o,t)),d}var l,c,u,d,p,f,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new Bi("Expected a function");return t=si(t)||0,qr(n)&&(g=!!n.leading,u=(v="maxWait"in n)?vo(si(n.maxWait)||0,t):u,m="trailing"in n?!!n.trailing:m),s.cancel=function(){p!==G&&jo(p),h=0,l=f=c=p=G},s.flush=function(){return p===G?d:a(Aa())},s}function Gr(e,t){function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r)||o,r)}if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Bi("Expected a function");return n.cache=new(Gr.Cache||Ie),n}function zr(e){if("function"!=typeof e)throw new Bi("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Qr(e,t){return e===t||e!=e&&t!=t}function jr(e){return null!=e&&Zr(e.length)&&!Jr(e)}function Hr(e){return Kr(e)&&jr(e)}function Yr(e){if(!Kr(e))return!1;var t=Vt(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ei(e)}function Jr(e){return!!qr(e)&&("[object Function]"==(e=Vt(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Xr(e){return"number"==typeof e&&e==oi(e)}function Zr(e){return"number"==typeof e&&-1<e&&0==e%1&&9007199254740991>=e}function qr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Kr(e){return null!=e&&"object"==typeof e}function $r(e){return"number"==typeof e||Kr(e)&&"[object Number]"==Vt(e)}function ei(e){return!(!Kr(e)||"[object Object]"!=Vt(e))&&(null===(e=qi(e))||"function"==typeof(e=Wi.call(e,"constructor")&&e.constructor)&&e instanceof e&&Li.call(e)==Qi)}function ti(e){return"string"==typeof e||!Wa(e)&&Kr(e)&&"[object String]"==Vt(e)}function ni(e){return"symbol"==typeof e||Kr(e)&&"[object Symbol]"==Vt(e)}function ri(e){if(!e)return[];if(jr(e))return ti(e)?U(e):wn(e);if(no&&e[no]){e=e[no]();for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}return("[object Map]"==(t=Zo(e))?M:"[object Set]"==t?L:gi)(e)}function ii(e){return e?(e=si(e))===z||e===-z?17976931348623157e292*(0>e?-1:1):e==e?e:0:0===e?e:0}function oi(e){var t=(e=ii(e))%1;return e==e?t?e-t:e:0}function ai(e){return e?dt(oi(e),0,4294967295):0}function si(e){if("number"==typeof e)return e;if(ni(e))return Q;if(qr(e)&&(e=qr(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(le,"");var t=be.test(e);return t||xe.test(e)?We(e.slice(2),t?2:8):ye.test(e)?Q:+e}function li(e){return Vn(e,fi(e))}function ci(e){return null==e?"":sn(e)}function ui(e,t,n){return(e=null==e?G:St(e,t))===G?n:e}function di(e,t){return null!=e&&sr(e,t,At)}function pi(e){return jr(e)?Ge(e):Mt(e)}function fi(e){if(jr(e))e=Ge(e,!0);else if(qr(e)){var t,n=gr(e),r=[];for(t in e)("constructor"!=t||!n&&Wi.call(e,t))&&r.push(t);e=r}else{if(t=[],null!=e)for(n in Di(e))t.push(n);e=t}return e}function hi(e,t){if(null==e)return{};var n=h(er(e),(function(e){return[e]}));return t=rr(t),Qt(e,n,(function(e,n){return t(e,n[0])}))}function gi(e){return null==e?[]:N(e,pi(e))}function vi(e){return bs(ci(e).toLowerCase())}function mi(e){return(e=ci(e))&&e.replace(Se,tt).replace(ke,"")}function yi(e,t,n){return e=ci(e),(t=n?G:t)===G?Pe.test(e)?e.match(Ne)||[]:e.match(he)||[]:e.match(t)||[]}function bi(e){return function(){return e}}function Ci(e){return e}function xi(e){return Bt("function"==typeof e?e:pt(e,1))}function Ei(e,t,n){var r=pi(t),i=Et(t,r);null!=n||qr(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Et(t,pi(t)));var o=!(qr(n)&&"chain"in n&&!n.chain),a=Jr(e);return l(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=wn(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,g([this.value()],arguments))})})),e}function Si(){}function wi(e){return fr(e)?V(xr(e)):function(e){return function(t){return St(t,e)}}(e)}function Vi(){return[]}function Ri(){return!1}var Oi=(t=null==t?ze:it.defaults(ze.Object(),t,it.pick(ze,_e))).Array,Ai=t.Date,ki=t.Error,Ti=t.Function,Ni=t.Math,Di=t.Object,Pi=t.RegExp,_i=t.String,Bi=t.TypeError,Mi=Oi.prototype,Ii=Di.prototype,Fi=t["__core-js_shared__"],Li=Ti.prototype.toString,Wi=Ii.hasOwnProperty,Ui=0,Gi=function(){var e=/[^.]+$/.exec(Fi&&Fi.keys&&Fi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),zi=Ii.toString,Qi=Li.call(Di),ji=ze._,Hi=Pi("^"+Li.call(Wi).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Yi=He?t.Buffer:G,Ji=t.Symbol,Xi=t.Uint8Array,Zi=Yi?Yi.f:G,qi=I(Di.getPrototypeOf,Di),Ki=Di.create,$i=Ii.propertyIsEnumerable,eo=Mi.splice,to=Ji?Ji.isConcatSpreadable:G,no=Ji?Ji.iterator:G,ro=Ji?Ji.toStringTag:G,io=function(){try{var e=ar(Di,"defineProperty");return e({},"",{}),e}catch(e){}}(),oo=t.clearTimeout!==ze.clearTimeout&&t.clearTimeout,ao=Ai&&Ai.now!==ze.Date.now&&Ai.now,so=t.setTimeout!==ze.setTimeout&&t.setTimeout,lo=Ni.ceil,co=Ni.floor,uo=Di.getOwnPropertySymbols,po=Yi?Yi.isBuffer:G,fo=t.isFinite,ho=Mi.join,go=I(Di.keys,Di),vo=Ni.max,mo=Ni.min,yo=Ai.now,bo=t.parseInt,Co=Ni.random,xo=Mi.reverse,Eo=ar(t,"DataView"),So=ar(t,"Map"),wo=ar(t,"Promise"),Vo=ar(t,"Set"),Ro=ar(t,"WeakMap"),Oo=ar(Di,"create"),Ao=Ro&&new Ro,ko={},To=Er(Eo),No=Er(So),Do=Er(wo),Po=Er(Vo),_o=Er(Ro),Bo=Ji?Ji.prototype:G,Mo=Bo?Bo.valueOf:G,Io=Bo?Bo.toString:G,Fo=function(){function e(){}return function(t){return qr(t)?Ki?Ki(t):(e.prototype=t,t=new e,e.prototype=G,t):{}}}();n.templateSettings={escape:$,evaluate:ee,interpolate:te,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,R.prototype=Fo(r.prototype),R.prototype.constructor=R,Re.prototype=Fo(r.prototype),Re.prototype.constructor=Re,Oe.prototype.clear=function(){this.__data__=Oo?Oo(null):{},this.size=0},Oe.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Oe.prototype.get=function(e){var t=this.__data__;return Oo?"__lodash_hash_undefined__"===(e=t[e])?G:e:Wi.call(t,e)?t[e]:G},Oe.prototype.has=function(e){var t=this.__data__;return Oo?t[e]!==G:Wi.call(t,e)},Oe.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Oo&&t===G?"__lodash_hash_undefined__":t,this},Te.prototype.clear=function(){this.__data__=[],this.size=0},Te.prototype.delete=function(e){var t=this.__data__;return!(0>(e=at(t,e))||(e==t.length-1?t.pop():eo.call(t,e,1),--this.size,0))},Te.prototype.get=function(e){var t=this.__data__;return 0>(e=at(t,e))?G:t[e][1]},Te.prototype.has=function(e){return-1<at(this.__data__,e)},Te.prototype.set=function(e,t){var n=this.__data__,r=at(n,e);return 0>r?(++this.size,n.push([e,t])):n[r][1]=t,this},Ie.prototype.clear=function(){this.size=0,this.__data__={hash:new Oe,map:new(So||Te),string:new Oe}},Ie.prototype.delete=function(e){return e=ir(this,e).delete(e),this.size-=e?1:0,e},Ie.prototype.get=function(e){return ir(this,e).get(e)},Ie.prototype.has=function(e){return ir(this,e).has(e)},Ie.prototype.set=function(e,t){var n=ir(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Fe.prototype.add=Fe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Fe.prototype.has=function(e){return this.__data__.has(e)},Ue.prototype.clear=function(){this.__data__=new Te,this.size=0},Ue.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},Ue.prototype.get=function(e){return this.__data__.get(e)},Ue.prototype.has=function(e){return this.__data__.has(e)},Ue.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Te){var r=n.__data__;if(!So||199>r.length)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(e,t),this.size=n.size,this};var Lo=An(Ct),Wo=An(xt,!0),Uo=kn(),Go=kn(!0),zo=Ao?function(e,t){return Ao.set(e,t),e}:Ci,Qo=io?function(e,t){return io(e,"toString",{configurable:!0,enumerable:!1,value:bi(t),writable:!0})}:Ci,jo=oo||function(e){return ze.clearTimeout(e)},Ho=Vo&&1/L(new Vo([,-0]))[1]==z?function(e){return new Vo(e)}:Si,Yo=Ao?function(e){return Ao.get(e)}:Si,Jo=uo?function(e){return null==e?[]:(e=Di(e),d(uo(e),(function(t){return $i.call(e,t)})))}:Vi,Xo=uo?function(e){for(var t=[];e;)g(t,Jo(e)),e=qi(e);return t}:Vi,Zo=Vt;(Eo&&"[object DataView]"!=Zo(new Eo(new ArrayBuffer(1)))||So&&"[object Map]"!=Zo(new So)||wo&&"[object Promise]"!=Zo(wo.resolve())||Vo&&"[object Set]"!=Zo(new Vo)||Ro&&"[object WeakMap]"!=Zo(new Ro))&&(Zo=function(e){var t=Vt(e);if(e=(e="[object Object]"==t?e.constructor:G)?Er(e):"")switch(e){case To:return"[object DataView]";case No:return"[object Map]";case Do:return"[object Promise]";case Po:return"[object Set]";case _o:return"[object WeakMap]"}return t});var qo=Fi?Jr:Ri,Ko=br(zo),$o=so||function(e,t){return ze.setTimeout(e,t)},ea=br(Qo),ta=function(e){var t=(e=Gr(e,(function(e){return 500===t.size&&t.clear(),e}))).cache;return e}((function(e){var t=[];return ie.test(e)&&t.push(""),e.replace(oe,(function(e,n,r,i){t.push(r?i.replace(ge,"$1"):n||e)})),t})),na=Xt((function(e,t){return Hr(e)?gt(e,bt(t,1,Hr,!0)):[]})),ra=Xt((function(e,t){var n=kr(t);return Hr(n)&&(n=G),Hr(e)?gt(e,bt(t,1,Hr,!0),rr(n,2)):[]})),ia=Xt((function(e,t){var n=kr(t);return Hr(n)&&(n=G),Hr(e)?gt(e,bt(t,1,Hr,!0),G,n):[]})),oa=Xt((function(e){var t=h(e,hn);return t.length&&t[0]===e[0]?kt(t):[]})),aa=Xt((function(e){var t=kr(e),n=h(e,hn);return t===kr(n)?t=G:n.pop(),n.length&&n[0]===e[0]?kt(n,rr(t,2)):[]})),sa=Xt((function(e){var t=kr(e),n=h(e,hn);return(t="function"==typeof t?t:G)&&n.pop(),n.length&&n[0]===e[0]?kt(n,G,t):[]})),la=Xt(Tr),ca=Kn((function(e,t){var n=null==e?0:e.length,r=ut(e,t);return Ht(e,h(t,(function(e){return dr(e,n)?+e:e})).sort(xn)),r})),ua=Xt((function(e){return ln(bt(e,1,Hr,!0))})),da=Xt((function(e){var t=kr(e);return Hr(t)&&(t=G),ln(bt(e,1,Hr,!0),rr(t,2))})),pa=Xt((function(e){var t="function"==typeof(t=kr(e))?t:G;return ln(bt(e,1,Hr,!0),G,t)})),fa=Xt((function(e,t){return Hr(e)?gt(e,t):[]})),ha=Xt((function(e){return pn(d(e,Hr))})),ga=Xt((function(e){var t=kr(e);return Hr(t)&&(t=G),pn(d(e,Hr),rr(t,2))})),va=Xt((function(e){var t="function"==typeof(t=kr(e))?t:G;return pn(d(e,Hr),G,t)})),ma=Xt(Dr),ya=Xt((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:G)?(e.pop(),t):G;return Pr(e,t)})),ba=Kn((function(e){function t(t){return ut(t,e)}var n=e.length,r=n?e[0]:0,i=this.__wrapped__;return!(1<n||this.__actions__.length)&&i instanceof Re&&dr(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Br,args:[t],thisArg:G}),new R(i,this.__chain__).thru((function(e){return n&&!e.length&&e.push(G),e}))):this.thru(t)})),Ca=Rn((function(e,t,n){Wi.call(e,n)?++e[n]:ct(e,n,1)})),xa=_n(Vr),Ea=_n(Rr),Sa=Rn((function(e,t,n){Wi.call(e,n)?e[n].push(t):ct(e,n,[t])})),wa=Xt((function(e,t,n){var r=-1,i="function"==typeof t,o=jr(e)?Oi(e.length):[];return Lo(e,(function(e){o[++r]=i?a(t,e,n):Tt(e,t,n)})),o})),Va=Rn((function(e,t,n){ct(e,n,t)})),Ra=Rn((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Oa=Xt((function(e,t){if(null==e)return[];var n=t.length;return 1<n&&pr(e,t[0],t[1])?t=[]:2<n&&pr(t[0],t[1],t[2])&&(t=[t[0]]),zt(e,bt(t,1),[])})),Aa=ao||function(){return ze.Date.now()},ka=Xt((function(e,t,n){var r=1;if(n.length){var i=F(n,nr(ka));r=32|r}return Yn(e,r,t,n,i)})),Ta=Xt((function(e,t,n){var r=3;if(n.length){var i=F(n,nr(Ta));r=32|r}return Yn(t,r,e,n,i)})),Na=Xt((function(e,t){return ht(e,1,t)})),Da=Xt((function(e,t,n){return ht(e,si(t)||0,n)}));Gr.Cache=Ie;var Pa=Xt((function(e,t){var n=(t=1==t.length&&Wa(t[0])?h(t[0],T(rr())):h(bt(t,1),T(rr()))).length;return Xt((function(r){for(var i=-1,o=mo(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return a(e,this,r)}))})),_a=Xt((function(e,t){return Yn(e,32,G,t,F(t,nr(_a)))})),Ba=Xt((function(e,t){return Yn(e,64,G,t,F(t,nr(Ba)))})),Ma=Kn((function(e,t){return Yn(e,256,G,G,G,t)})),Ia=zn(Rt),Fa=zn((function(e,t){return e>=t})),La=Nt(function(){return arguments}())?Nt:function(e){return Kr(e)&&Wi.call(e,"callee")&&!$i.call(e,"callee")},Wa=Oi.isArray,Ua=Je?T(Je):function(e){return Kr(e)&&"[object ArrayBuffer]"==Vt(e)},Ga=po||Ri,za=Xe?T(Xe):function(e){return Kr(e)&&"[object Date]"==Vt(e)},Qa=Ze?T(Ze):function(e){return Kr(e)&&"[object Map]"==Zo(e)},ja=qe?T(qe):function(e){return Kr(e)&&"[object RegExp]"==Vt(e)},Ha=Ke?T(Ke):function(e){return Kr(e)&&"[object Set]"==Zo(e)},Ya=$e?T($e):function(e){return Kr(e)&&Zr(e.length)&&!!Be[Vt(e)]},Ja=zn(It),Xa=zn((function(e,t){return e<=t})),Za=On((function(e,t){if(gr(t)||jr(t))Vn(t,pi(t),e);else for(var n in t)Wi.call(t,n)&&ot(e,n,t[n])})),qa=On((function(e,t){Vn(t,fi(t),e)})),Ka=On((function(e,t,n,r){Vn(t,fi(t),e,r)})),$a=On((function(e,t,n,r){Vn(t,pi(t),e,r)})),es=Kn(ut),ts=Xt((function(e){return e.push(G,Jn),a(Ka,G,e)})),ns=Xt((function(e){return e.push(G,Xn),a(ss,G,e)})),rs=In((function(e,t,n){e[t]=n}),bi(Ci)),is=In((function(e,t,n){Wi.call(e,t)?e[t].push(n):e[t]=[n]}),rr),os=Xt(Tt),as=On((function(e,t,n){Ut(e,t,n)})),ss=On((function(e,t,n,r){Ut(e,t,n,r)})),ls=Kn((function(e,t){var n={};if(null==e)return n;var r=!1;t=h(t,(function(t){return t=vn(t,e),r||(r=1<t.length),t})),Vn(e,er(e),n),r&&(n=pt(n,7,Zn));for(var i=t.length;i--;)cn(n,t[i]);return n})),cs=Kn((function(e,t){return null==e?{}:function(e,t){return Qt(e,t,(function(t,n){return di(e,n)}))}(e,t)})),us=Hn(pi),ds=Hn(fi),ps=Nn((function(e,t,n){return t=t.toLowerCase(),e+(n?vi(t):t)})),fs=Nn((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),hs=Nn((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),gs=Tn("toLowerCase"),vs=Nn((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),ms=Nn((function(e,t,n){return e+(n?" ":"")+bs(t)})),ys=Nn((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),bs=Tn("toUpperCase"),Cs=Xt((function(e,t){try{return a(e,G,t)}catch(e){return Yr(e)?e:new ki(e)}})),xs=Kn((function(e,t){return l(t,(function(t){t=xr(t),ct(e,t,ka(e[t],e))})),e})),Es=Bn(),Ss=Bn(!0),ws=Xt((function(e,t){return function(n){return Tt(n,e,t)}})),Vs=Xt((function(e,t){return function(n){return Tt(e,n,t)}})),Rs=Ln(h),Os=Ln(u),As=Ln(y),ks=Gn(),Ts=Gn(!0),Ns=Fn((function(e,t){return e+t}),0),Ds=jn("ceil"),Ps=Fn((function(e,t){return e/t}),1),_s=jn("floor"),Bs=Fn((function(e,t){return e*t}),1),Ms=jn("round"),Is=Fn((function(e,t){return e-t}),0);return n.after=function(e,t){if("function"!=typeof t)throw new Bi("Expected a function");return e=oi(e),function(){if(1>--e)return t.apply(this,arguments)}},n.ary=Lr,n.assign=Za,n.assignIn=qa,n.assignInWith=Ka,n.assignWith=$a,n.at=es,n.before=Wr,n.bind=ka,n.bindAll=xs,n.bindKey=Ta,n.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},n.chain=_r,n.chunk=function(e,t,n){if(t=(n?pr(e,t,n):t===G)?1:vo(oi(t),0),!(n=null==e?0:e.length)||1>t)return[];for(var r=0,i=0,o=Oi(lo(n/t));r<n;)o[i++]=en(e,r,r+=t);return o},n.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},n.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Oi(e-1),n=arguments[0];e--;)t[e-1]=arguments[e];return g(Wa(n)?wn(n):[n],bt(t,1))},n.cond=function(e){var t=null==e?0:e.length,n=rr();return e=t?h(e,(function(e){if("function"!=typeof e[1])throw new Bi("Expected a function");return[n(e[0]),e[1]]})):[],Xt((function(n){for(var r=-1;++r<t;){var i=e[r];if(a(i[0],this,n))return a(i[1],this,n)}}))},n.conforms=function(e){return function(e){var t=pi(e);return function(n){return ft(n,e,t)}}(pt(e,1))},n.constant=bi,n.countBy=Ca,n.create=function(e,t){var n=Fo(e);return null==t?n:lt(n,t)},n.curry=function e(t,n,r){return(t=Yn(t,8,G,G,G,G,G,n=r?G:n)).placeholder=e.placeholder,t},n.curryRight=function e(t,n,r){return(t=Yn(t,16,G,G,G,G,G,n=r?G:n)).placeholder=e.placeholder,t},n.debounce=Ur,n.defaults=ts,n.defaultsDeep=ns,n.defer=Na,n.delay=Da,n.difference=na,n.differenceBy=ra,n.differenceWith=ia,n.drop=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0>(t=n||t===G?1:oi(t))?0:t,r):[]},n.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0,0>(t=r-(t=n||t===G?1:oi(t)))?0:t):[]},n.dropRightWhile=function(e,t){return e&&e.length?un(e,rr(t,3),!0,!0):[]},n.dropWhile=function(e,t){return e&&e.length?un(e,rr(t,3),!0):[]},n.fill=function(e,t,n,r){var i=null==e?0:e.length;if(!i)return[];for(n&&"number"!=typeof n&&pr(e,t,n)&&(n=0,r=i),i=e.length,0>(n=oi(n))&&(n=-n>i?0:i+n),0>(r=r===G||r>i?i:oi(r))&&(r+=i),r=n>r?0:ai(r);n<r;)e[n++]=t;return e},n.filter=function(e,t){return(Wa(e)?d:yt)(e,rr(t,3))},n.flatMap=function(e,t){return bt(Fr(e,t),1)},n.flatMapDeep=function(e,t){return bt(Fr(e,t),z)},n.flatMapDepth=function(e,t,n){return n=n===G?1:oi(n),bt(Fr(e,t),n)},n.flatten=Or,n.flattenDeep=function(e){return null!=e&&e.length?bt(e,z):[]},n.flattenDepth=function(e,t){return null!=e&&e.length?bt(e,t=t===G?1:oi(t)):[]},n.flip=function(e){return Yn(e,512)},n.flow=Es,n.flowRight=Ss,n.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},n.functions=function(e){return null==e?[]:Et(e,pi(e))},n.functionsIn=function(e){return null==e?[]:Et(e,fi(e))},n.groupBy=Sa,n.initial=function(e){return null!=e&&e.length?en(e,0,-1):[]},n.intersection=oa,n.intersectionBy=aa,n.intersectionWith=sa,n.invert=rs,n.invertBy=is,n.invokeMap=wa,n.iteratee=xi,n.keyBy=Va,n.keys=pi,n.keysIn=fi,n.map=Fr,n.mapKeys=function(e,t){var n={};return t=rr(t,3),Ct(e,(function(e,r,i){ct(n,t(e,r,i),e)})),n},n.mapValues=function(e,t){var n={};return t=rr(t,3),Ct(e,(function(e,r,i){ct(n,r,t(e,r,i))})),n},n.matches=function(e){return Lt(pt(e,1))},n.matchesProperty=function(e,t){return Wt(e,pt(t,1))},n.memoize=Gr,n.merge=as,n.mergeWith=ss,n.method=ws,n.methodOf=Vs,n.mixin=Ei,n.negate=zr,n.nthArg=function(e){return e=oi(e),Xt((function(t){return Gt(t,e)}))},n.omit=ls,n.omitBy=function(e,t){return hi(e,zr(rr(t)))},n.once=function(e){return Wr(2,e)},n.orderBy=function(e,t,n,r){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(n=r?G:n)||(n=null==n?[]:[n]),zt(e,t,n))},n.over=Rs,n.overArgs=Pa,n.overEvery=Os,n.overSome=As,n.partial=_a,n.partialRight=Ba,n.partition=Ra,n.pick=cs,n.pickBy=hi,n.property=wi,n.propertyOf=function(e){return function(t){return null==e?G:St(e,t)}},n.pull=la,n.pullAll=Tr,n.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?jt(e,t,rr(n,2)):e},n.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?jt(e,t,G,n):e},n.pullAt=ca,n.range=ks,n.rangeRight=Ts,n.rearg=Ma,n.reject=function(e,t){return(Wa(e)?d:yt)(e,zr(rr(t,3)))},n.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=rr(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Ht(e,i),n},n.rest=function(e,t){if("function"!=typeof e)throw new Bi("Expected a function");return Xt(e,t=t===G?t:oi(t))},n.reverse=Nr,n.sampleSize=function(e,t,n){return t=(n?pr(e,t,n):t===G)?1:oi(t),(Wa(e)?je:qt)(e,t)},n.set=function(e,t,n){return null==e?e:Kt(e,t,n)},n.setWith=function(e,t,n,r){return r="function"==typeof r?r:G,null==e?e:Kt(e,t,n,r)},n.shuffle=function(e){return(Wa(e)?Ye:$t)(e)},n.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&pr(e,t,n)?(t=0,n=r):(t=null==t?0:oi(t),n=n===G?r:oi(n)),en(e,t,n)):[]},n.sortBy=Oa,n.sortedUniq=function(e){return e&&e.length?on(e):[]},n.sortedUniqBy=function(e,t){return e&&e.length?on(e,rr(t,2)):[]},n.split=function(e,t,n){return n&&"number"!=typeof n&&pr(e,t,n)&&(t=n=G),(n=n===G?4294967295:n>>>0)?(e=ci(e))&&("string"==typeof t||null!=t&&!ja(t))&&(!(t=sn(t))&&De.test(e))?mn(U(e),0,n):e.split(t,n):[]},n.spread=function(e,t){if("function"!=typeof e)throw new Bi("Expected a function");return t=null==t?0:vo(oi(t),0),Xt((function(n){var r=n[t];return n=mn(n,0,t),r&&g(n,r),a(e,this,n)}))},n.tail=function(e){var t=null==e?0:e.length;return t?en(e,1,t):[]},n.take=function(e,t,n){return e&&e.length?en(e,0,0>(t=n||t===G?1:oi(t))?0:t):[]},n.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0>(t=r-(t=n||t===G?1:oi(t)))?0:t,r):[]},n.takeRightWhile=function(e,t){return e&&e.length?un(e,rr(t,3),!1,!0):[]},n.takeWhile=function(e,t){return e&&e.length?un(e,rr(t,3)):[]},n.tap=function(e,t){return t(e),e},n.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Bi("Expected a function");return qr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ur(e,t,{leading:r,maxWait:t,trailing:i})},n.thru=Br,n.toArray=ri,n.toPairs=us,n.toPairsIn=ds,n.toPath=function(e){return Wa(e)?h(e,xr):ni(e)?[e]:wn(ta(ci(e)))},n.toPlainObject=li,n.transform=function(e,t,n){var r=Wa(e),i=r||Ga(e)||Ya(e);if(t=rr(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:qr(e)&&Jr(o)?Fo(qi(e)):{}}return(i?l:Ct)(e,(function(e,r,i){return t(n,e,r,i)})),n},n.unary=function(e){return Lr(e,1)},n.union=ua,n.unionBy=da,n.unionWith=pa,n.uniq=function(e){return e&&e.length?ln(e):[]},n.uniqBy=function(e,t){return e&&e.length?ln(e,rr(t,2)):[]},n.uniqWith=function(e,t){return t="function"==typeof t?t:G,e&&e.length?ln(e,G,t):[]},n.unset=function(e,t){return null==e||cn(e,t)},n.unzip=Dr,n.unzipWith=Pr,n.update=function(e,t,n){return null==e?e:Kt(e,t,gn(n)(St(e,t)),void 0)},n.updateWith=function(e,t,n,r){return r="function"==typeof r?r:G,null!=e&&(e=Kt(e,t,gn(n)(St(e,t)),r)),e},n.values=gi,n.valuesIn=function(e){return null==e?[]:N(e,fi(e))},n.without=fa,n.words=yi,n.wrap=function(e,t){return _a(gn(t),e)},n.xor=ha,n.xorBy=ga,n.xorWith=va,n.zip=ma,n.zipObject=function(e,t){return fn(e||[],t||[],ot)},n.zipObjectDeep=function(e,t){return fn(e||[],t||[],Kt)},n.zipWith=ya,n.entries=us,n.entriesIn=ds,n.extend=qa,n.extendWith=Ka,Ei(n,n),n.add=Ns,n.attempt=Cs,n.camelCase=ps,n.capitalize=vi,n.ceil=Ds,n.clamp=function(e,t,n){return n===G&&(n=t,t=G),n!==G&&(n=(n=si(n))==n?n:0),t!==G&&(t=(t=si(t))==t?t:0),dt(si(e),t,n)},n.clone=function(e){return pt(e,4)},n.cloneDeep=function(e){return pt(e,5)},n.cloneDeepWith=function(e,t){return pt(e,5,t="function"==typeof t?t:G)},n.cloneWith=function(e,t){return pt(e,4,t="function"==typeof t?t:G)},n.conformsTo=function(e,t){return null==t||ft(e,t,pi(t))},n.deburr=mi,n.defaultTo=function(e,t){return null==e||e!=e?t:e},n.divide=Ps,n.endsWith=function(e,t,n){e=ci(e),t=sn(t);var r=e.length;r=n=n===G?r:dt(oi(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},n.eq=Qr,n.escape=function(e){return(e=ci(e))&&K.test(e)?e.replace(Z,nt):e},n.escapeRegExp=function(e){return(e=ci(e))&&se.test(e)?e.replace(ae,"\\$&"):e},n.every=function(e,t,n){var r=Wa(e)?u:vt;return n&&pr(e,t,n)&&(t=G),r(e,rr(t,3))},n.find=xa,n.findIndex=Vr,n.findKey=function(e,t){return b(e,rr(t,3),Ct)},n.findLast=Ea,n.findLastIndex=Rr,n.findLastKey=function(e,t){return b(e,rr(t,3),xt)},n.floor=_s,n.forEach=Mr,n.forEachRight=Ir,n.forIn=function(e,t){return null==e?e:Uo(e,rr(t,3),fi)},n.forInRight=function(e,t){return null==e?e:Go(e,rr(t,3),fi)},n.forOwn=function(e,t){return e&&Ct(e,rr(t,3))},n.forOwnRight=function(e,t){return e&&xt(e,rr(t,3))},n.get=ui,n.gt=Ia,n.gte=Fa,n.has=function(e,t){return null!=e&&sr(e,t,Ot)},n.hasIn=di,n.head=Ar,n.identity=Ci,n.includes=function(e,t,n,r){return e=jr(e)?e:gi(e),n=n&&!r?oi(n):0,r=e.length,0>n&&(n=vo(r+n,0)),ti(e)?n<=r&&-1<e.indexOf(t,n):!!r&&-1<x(e,t,n)},n.indexOf=function(e,t,n){var r=null==e?0:e.length;return r?(0>(n=null==n?0:oi(n))&&(n=vo(r+n,0)),x(e,t,n)):-1},n.inRange=function(e,t,n){return t=ii(t),n===G?(n=t,t=0):n=ii(n),(e=si(e))>=mo(t,n)&&e<vo(t,n)},n.invoke=os,n.isArguments=La,n.isArray=Wa,n.isArrayBuffer=Ua,n.isArrayLike=jr,n.isArrayLikeObject=Hr,n.isBoolean=function(e){return!0===e||!1===e||Kr(e)&&"[object Boolean]"==Vt(e)},n.isBuffer=Ga,n.isDate=za,n.isElement=function(e){return Kr(e)&&1===e.nodeType&&!ei(e)},n.isEmpty=function(e){if(null==e)return!0;if(jr(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||Ya(e)||La(e)))return!e.length;var t=Zo(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(gr(e))return!Mt(e).length;for(var n in e)if(Wi.call(e,n))return!1;return!0},n.isEqual=function(e,t){return Dt(e,t)},n.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:G)?n(e,t):G;return r===G?Dt(e,t,G,n):!!r},n.isError=Yr,n.isFinite=function(e){return"number"==typeof e&&fo(e)},n.isFunction=Jr,n.isInteger=Xr,n.isLength=Zr,n.isMap=Qa,n.isMatch=function(e,t){return e===t||Pt(e,t,or(t))},n.isMatchWith=function(e,t,n){return n="function"==typeof n?n:G,Pt(e,t,or(t),n)},n.isNaN=function(e){return $r(e)&&e!=+e},n.isNative=function(e){if(qo(e))throw new ki("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return _t(e)},n.isNil=function(e){return null==e},n.isNull=function(e){return null===e},n.isNumber=$r,n.isObject=qr,n.isObjectLike=Kr,n.isPlainObject=ei,n.isRegExp=ja,n.isSafeInteger=function(e){return Xr(e)&&-9007199254740991<=e&&9007199254740991>=e},n.isSet=Ha,n.isString=ti,n.isSymbol=ni,n.isTypedArray=Ya,n.isUndefined=function(e){return e===G},n.isWeakMap=function(e){return Kr(e)&&"[object WeakMap]"==Zo(e)},n.isWeakSet=function(e){return Kr(e)&&"[object WeakSet]"==Vt(e)},n.join=function(e,t){return null==e?"":ho.call(e,t)},n.kebabCase=fs,n.last=kr,n.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;if(n!==G&&(i=0>(i=oi(n))?vo(r+i,0):mo(i,r-1)),t==t){for(n=i+1;n--&&e[n]!==t;);e=n}else e=C(e,S,i,!0);return e},n.lowerCase=hs,n.lowerFirst=gs,n.lt=Ja,n.lte=Xa,n.max=function(e){return e&&e.length?mt(e,Ci,Rt):G},n.maxBy=function(e,t){return e&&e.length?mt(e,rr(t,2),Rt):G},n.mean=function(e){return w(e,Ci)},n.meanBy=function(e,t){return w(e,rr(t,2))},n.min=function(e){return e&&e.length?mt(e,Ci,It):G},n.minBy=function(e,t){return e&&e.length?mt(e,rr(t,2),It):G},n.stubArray=Vi,n.stubFalse=Ri,n.stubObject=function(){return{}},n.stubString=function(){return""},n.stubTrue=function(){return!0},n.multiply=Bs,n.nth=function(e,t){return e&&e.length?Gt(e,oi(t)):G},n.noConflict=function(){return ze._===this&&(ze._=ji),this},n.noop=Si,n.now=Aa,n.pad=function(e,t,n){e=ci(e);var r=(t=oi(t))?W(e):0;return!t||r>=t?e:Wn(co(t=(t-r)/2),n)+e+Wn(lo(t),n)},n.padEnd=function(e,t,n){e=ci(e);var r=(t=oi(t))?W(e):0;return t&&r<t?e+Wn(t-r,n):e},n.padStart=function(e,t,n){e=ci(e);var r=(t=oi(t))?W(e):0;return t&&r<t?Wn(t-r,n)+e:e},n.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bo(ci(e).replace(ce,""),t||0)},n.random=function(e,t,n){if(n&&"boolean"!=typeof n&&pr(e,t,n)&&(t=n=G),n===G&&("boolean"==typeof t?(n=t,t=G):"boolean"==typeof e&&(n=e,e=G)),e===G&&t===G?(e=0,t=1):(e=ii(e),t===G?(t=e,e=0):t=ii(t)),e>t){var r=e;e=t,t=r}return n||e%1||t%1?(n=Co(),mo(e+n*(t-e+Le("1e-"+((n+"").length-1))),t)):Yt(e,t)},n.reduce=function(e,t,n){var r=Wa(e)?v:O,i=3>arguments.length;return r(e,rr(t,4),n,i,Lo)},n.reduceRight=function(e,t,n){var r=Wa(e)?m:O,i=3>arguments.length;return r(e,rr(t,4),n,i,Wo)},n.repeat=function(e,t,n){return t=(n?pr(e,t,n):t===G)?1:oi(t),Jt(ci(e),t)},n.replace=function(){var e=arguments,t=ci(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},n.result=function(e,t,n){var r=-1,i=(t=vn(t,e)).length;for(i||(i=1,e=G);++r<i;){var o=null==e?G:e[xr(t[r])];o===G&&(r=i,o=n),e=Jr(o)?o.call(e):o}return e},n.round=Ms,n.runInContext=e,n.sample=function(e){return(Wa(e)?Qe:Zt)(e)},n.size=function(e){if(null==e)return 0;if(jr(e))return ti(e)?W(e):e.length;var t=Zo(e);return"[object Map]"==t||"[object Set]"==t?e.size:Mt(e).length},n.snakeCase=vs,n.some=function(e,t,n){var r=Wa(e)?y:tn;return n&&pr(e,t,n)&&(t=G),r(e,rr(t,3))},n.sortedIndex=function(e,t){return nn(e,t)},n.sortedIndexBy=function(e,t,n){return rn(e,t,rr(n,2))},n.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=nn(e,t);if(r<n&&Qr(e[r],t))return r}return-1},n.sortedLastIndex=function(e,t){return nn(e,t,!0)},n.sortedLastIndexBy=function(e,t,n){return rn(e,t,rr(n,2),!0)},n.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=nn(e,t,!0)-1;if(Qr(e[n],t))return n}return-1},n.startCase=ms,n.startsWith=function(e,t,n){return e=ci(e),n=null==n?0:dt(oi(n),0,e.length),t=sn(t),e.slice(n,n+t.length)==t},n.subtract=Is,n.sum=function(e){return e&&e.length?A(e,Ci):0},n.sumBy=function(e,t){return e&&e.length?A(e,rr(t,2)):0},n.template=function(e,t,r){var i=n.templateSettings;r&&pr(e,t,r)&&(t=G),e=ci(e),t=Ka({},t,i,Jn);var o,a,s=pi(r=Ka({},t.imports,i.imports,Jn)),l=N(r,s),c=0;r=t.interpolate||we;var u="__p+='";r=Pi((t.escape||we).source+"|"+r.source+"|"+(r===te?ve:we).source+"|"+(t.evaluate||we).source+"|$","g");var d="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(e.replace(r,(function(t,n,r,i,s,l){return r||(r=i),u+=e.slice(c,l).replace(Ve,B),n&&(o=!0,u+="'+__e("+n+")+'"),s&&(a=!0,u+="';"+s+";\n__p+='"),r&&(u+="'+((__t=("+r+"))==null?'':__t)+'"),c=l+t.length,t})),u+="';",(t=t.variable)||(u="with(obj){"+u+"}"),u=(a?u.replace(H,""):u).replace(Y,"$1").replace(J,"$1;"),u="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(a?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+u+"return __p}",(t=Cs((function(){return Ti(s,d+"return "+u).apply(G,l)}))).source=u,Yr(t))throw t;return t},n.times=function(e,t){if(1>(e=oi(e))||9007199254740991<e)return[];var n=4294967295,r=mo(e,4294967295);for(e-=4294967295,r=k(r,t=rr(t));++n<e;)t(n);return r},n.toFinite=ii,n.toInteger=oi,n.toLength=ai,n.toLower=function(e){return ci(e).toLowerCase()},n.toNumber=si,n.toSafeInteger=function(e){return e?dt(oi(e),-9007199254740991,9007199254740991):0===e?e:0},n.toString=ci,n.toUpper=function(e){return ci(e).toUpperCase()},n.trim=function(e,t,n){return(e=ci(e))&&(n||t===G)?e.replace(le,""):e&&(t=sn(t))?mn(e=U(e),t=P(e,n=U(t)),n=_(e,n)+1).join(""):e},n.trimEnd=function(e,t,n){return(e=ci(e))&&(n||t===G)?e.replace(ue,""):e&&(t=sn(t))?mn(e=U(e),0,t=_(e,U(t))+1).join(""):e},n.trimStart=function(e,t,n){return(e=ci(e))&&(n||t===G)?e.replace(ce,""):e&&(t=sn(t))?mn(e=U(e),t=P(e,U(t))).join(""):e},n.truncate=function(e,t){var n=30,r="...";if(qr(t)){var i="separator"in t?t.separator:i;n="length"in t?oi(t.length):n,r="omission"in t?sn(t.omission):r}var o=(e=ci(e)).length;if(De.test(e)){var a=U(e);o=a.length}if(n>=o)return e;if(1>(o=n-W(r)))return r;if(n=a?mn(a,0,o).join(""):e.slice(0,o),i===G)return n+r;if(a&&(o+=n.length-o),ja(i)){if(e.slice(o).search(i)){var s=n;for(i.global||(i=Pi(i.source,ci(me.exec(i))+"g")),i.lastIndex=0;a=i.exec(s);)var l=a.index;n=n.slice(0,l===G?o:l)}}else e.indexOf(sn(i),o)!=o&&(-1<(i=n.lastIndexOf(i))&&(n=n.slice(0,i)));return n+r},n.unescape=function(e){return(e=ci(e))&&q.test(e)?e.replace(X,rt):e},n.uniqueId=function(e){var t=++Ui;return ci(e)+t},n.upperCase=ys,n.upperFirst=bs,n.each=Mr,n.eachRight=Ir,n.first=Ar,Ei(n,function(){var e={};return Ct(n,(function(t,r){Wi.call(n.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),n.VERSION="4.17.4",l("bind bindKey curry curryRight partial partialRight".split(" "),(function(e){n[e].placeholder=n})),l(["drop","take"],(function(e,t){Re.prototype[e]=function(n){n=n===G?1:vo(oi(n),0);var r=this.__filtered__&&!t?new Re(this):this.clone();return r.__filtered__?r.__takeCount__=mo(n,r.__takeCount__):r.__views__.push({size:mo(n,4294967295),type:e+(0>r.__dir__?"Right":"")}),r},Re.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),l(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Re.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:rr(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),l(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Re.prototype[e]=function(){return this[n](1).value()[0]}})),l(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Re.prototype[e]=function(){return this.__filtered__?new Re(this):this[n](1)}})),Re.prototype.compact=function(){return this.filter(Ci)},Re.prototype.find=function(e){return this.filter(e).head()},Re.prototype.findLast=function(e){return this.reverse().find(e)},Re.prototype.invokeMap=Xt((function(e,t){return"function"==typeof e?new Re(this):this.map((function(n){return Tt(n,e,t)}))})),Re.prototype.reject=function(e){return this.filter(zr(rr(e)))},Re.prototype.slice=function(e,t){e=oi(e);var n=this;return n.__filtered__&&(0<e||0>t)?new Re(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==G&&(n=0>(t=oi(t))?n.dropRight(-t):n.take(t-e)),n)},Re.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Re.prototype.toArray=function(){return this.take(4294967295)},Ct(Re.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=n[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(n.prototype[t]=function(){function t(e){return e=o.apply(n,g([e],l)),i&&p?e[0]:e}var s=this.__wrapped__,l=i?[1]:arguments,c=s instanceof Re,u=l[0],d=c||Wa(s);d&&r&&"function"==typeof u&&1!=u.length&&(c=d=!1);var p=this.__chain__,f=!!this.__actions__.length;u=a&&!p,c=c&&!f;return!a&&d?(s=c?s:new Re(this),(s=e.apply(s,l)).__actions__.push({func:Br,args:[t],thisArg:G}),new R(s,p)):u&&c?e.apply(this,l):(s=this.thru(t),u?i?s.value()[0]:s.value():s)})})),l("pop push shift sort splice unshift".split(" "),(function(e){var t=Mi[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(Wa(n)?n:[],e)}return this[r]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),Ct(Re.prototype,(function(e,t){var r=n[t];if(r){var i=r.name+"";(ko[i]||(ko[i]=[])).push({name:t,func:r})}})),ko[Mn(G,2).name]=[{name:"wrapper",func:G}],Re.prototype.clone=function(){var e=new Re(this.__wrapped__);return e.__actions__=wn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=wn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=wn(this.__views__),e},Re.prototype.reverse=function(){if(this.__filtered__){var e=new Re(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Re.prototype.value=function(){var e,t=this.__wrapped__.value(),n=this.__dir__,r=Wa(t),i=0>n,o=r?t.length:0;e=o;for(var a=this.__views__,s=0,l=-1,c=a.length;++l<c;){var u=a[l],d=u.size;switch(u.type){case"drop":s+=d;break;case"dropRight":e-=d;break;case"take":e=mo(e,s+d);break;case"takeRight":s=vo(s,e-d)}}if(a=(e={start:s,end:e}).start,e=(s=e.end)-a,a=i?s:a-1,l=(s=this.__iteratees__).length,c=0,u=mo(e,this.__takeCount__),!r||!i&&o==e&&u==e)return dn(t,this.__actions__);r=[];e:for(;e--&&c<u;){for(i=-1,o=t[a+=n];++i<l;){d=(p=s[i]).type;var p=(0,p.iteratee)(o);if(2==d)o=p;else if(!p){if(1==d)continue e;break e}}r[c++]=o}return r},n.prototype.at=ba,n.prototype.chain=function(){return _r(this)},n.prototype.commit=function(){return new R(this.value(),this.__chain__)},n.prototype.next=function(){this.__values__===G&&(this.__values__=ri(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?G:this.__values__[this.__index__++]}},n.prototype.plant=function(e){for(var t,n=this;n instanceof r;){var i=wr(n);i.__index__=0,i.__values__=G,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},n.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof Re?(this.__actions__.length&&(e=new Re(this)),(e=e.reverse()).__actions__.push({func:Br,args:[Nr],thisArg:G}),new R(e,this.__chain__)):this.thru(Nr)},n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=function(){return dn(this.__wrapped__,this.__actions__)},n.prototype.first=n.prototype.head,no&&(n.prototype[no]=function(){return this}),n}();ze._=it,void 0===(r=function(){return it}.call(t,n,t,e))||(e.exports=r)}.call(this)},300:t=>{"use strict";t.exports=e},799:e=>{"use strict";e.exports=t},689:(e,t)=>{"use strict";var n={},r={default:function(e,t,r,i,o){var a=new Worker(n[t]||(n[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],o(r,null)}else o(null,t)},a.postMessage(r,i),a}},i=Uint8Array,o=Uint16Array,a=Int32Array,s=new i([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),l=new i([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),c=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(e,t){for(var n=new o(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new a(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return{b:n,r:i}},d=u(s,2),p=d.b,f=d.r;p[28]=258,f[258]=28;for(var h=u(l,0),g=h.b,v=h.r,m=new o(32768),y=0;y<32768;++y){var b=(43690&y)>>1|(21845&y)<<1;b=(61680&(b=(52428&b)>>2|(13107&b)<<2))>>4|(3855&b)<<4,m[y]=((65280&b)>>8|(255&b)<<8)>>1}var C=function(e,t,n){for(var r=e.length,i=0,a=new o(t);i<r;++i)e[i]&&++a[e[i]-1];var s,l=new o(t);for(i=1;i<t;++i)l[i]=l[i-1]+a[i-1]<<1;if(n){s=new o(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],d=t-e[i],p=l[e[i]-1]++<<d,f=p|(1<<d)-1;p<=f;++p)s[m[p]>>c]=u}else for(s=new o(r),i=0;i<r;++i)e[i]&&(s[i]=m[l[e[i]-1]++]>>15-e[i]);return s},x=new i(288);for(y=0;y<144;++y)x[y]=8;for(y=144;y<256;++y)x[y]=9;for(y=256;y<280;++y)x[y]=7;for(y=280;y<288;++y)x[y]=8;var E=new i(32);for(y=0;y<32;++y)E[y]=5;var S=C(x,9,0),w=C(x,9,1),V=C(E,5,0),R=C(E,5,1),O=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},A=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},k=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},T=function(e){return(e+7)/8|0},N=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new i(e.subarray(t,n))};t.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var D=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],P=function(e,t,n){var r=new Error(t||D[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,P),!n)throw r;return r},_=function(e,t,n,r){var o=e.length,a=r?r.length:0;if(!o||t.f&&!t.l)return n||new i(0);var u=!n,d=u||2!=t.i,f=t.i;u&&(n=new i(3*o));var h=function(e){var t=n.length;if(e>t){var r=new i(Math.max(2*t,e));r.set(n),n=r}},v=t.f||0,m=t.p||0,y=t.b||0,b=t.l,x=t.d,E=t.m,S=t.n,V=8*o;do{if(!b){v=A(e,m,1);var D=A(e,m+1,3);if(m+=3,!D){var _=e[(j=T(m)+4)-4]|e[j-3]<<8,B=j+_;if(B>o){f&&P(0);break}d&&h(y+_),n.set(e.subarray(j,B),y),t.b=y+=_,t.p=m=8*B,t.f=v;continue}if(1==D)b=w,x=R,E=9,S=5;else if(2==D){var M=A(e,m,31)+257,I=A(e,m+10,15)+4,F=M+A(e,m+5,31)+1;m+=14;for(var L=new i(F),W=new i(19),U=0;U<I;++U)W[c[U]]=A(e,m+3*U,7);m+=3*I;var G=O(W),z=(1<<G)-1,Q=C(W,G,1);for(U=0;U<F;){var j,H=Q[A(e,m,z)];if(m+=15&H,(j=H>>4)<16)L[U++]=j;else{var Y=0,J=0;for(16==j?(J=3+A(e,m,3),m+=2,Y=L[U-1]):17==j?(J=3+A(e,m,7),m+=3):18==j&&(J=11+A(e,m,127),m+=7);J--;)L[U++]=Y}}var X=L.subarray(0,M),Z=L.subarray(M);E=O(X),S=O(Z),b=C(X,E,1),x=C(Z,S,1)}else P(1);if(m>V){f&&P(0);break}}d&&h(y+131072);for(var q=(1<<E)-1,K=(1<<S)-1,$=m;;$=m){var ee=(Y=b[k(e,m)&q])>>4;if((m+=15&Y)>V){f&&P(0);break}if(Y||P(2),ee<256)n[y++]=ee;else{if(256==ee){$=m,b=null;break}var te=ee-254;if(ee>264){var ne=s[U=ee-257];te=A(e,m,(1<<ne)-1)+p[U],m+=ne}var re=x[k(e,m)&K],ie=re>>4;re||P(3),m+=15&re;Z=g[ie];if(ie>3){ne=l[ie];Z+=k(e,m)&(1<<ne)-1,m+=ne}if(m>V){f&&P(0);break}d&&h(y+131072);var oe=y+te;if(y<Z){var ae=a-Z,se=Math.min(Z,oe);for(ae+y<0&&P(3);y<se;++y)n[y]=r[ae+y]}for(;y<oe;++y)n[y]=n[y-Z]}}t.l=b,t.p=$,t.b=y,t.f=v,b&&(v=1,t.m=E,t.d=x,t.n=S)}while(!v);return y!=n.length&&u?N(n,0,y):n.subarray(0,y)},B=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},M=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},I=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var a=n.length,s=n.slice();if(!a)return{t:Q,l:0};if(1==a){var l=new i(n[0].s+1);return l[n[0].s]=1,{t:l,l:1}}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var c=n[0],u=n[1],d=0,p=1,f=2;for(n[0]={s:-1,f:c.f+u.f,l:c,r:u};p!=a-1;)c=n[n[d].f<n[f].f?d++:f++],u=n[d!=p&&n[d].f<n[f].f?d++:f++],n[p++]={s:-1,f:c.f+u.f,l:c,r:u};var h=s[0].s;for(r=1;r<a;++r)s[r].s>h&&(h=s[r].s);var g=new o(h+1),v=F(n[p-1],g,0);if(v>t){r=0;var m=0,y=v-t,b=1<<y;for(s.sort((function(e,t){return g[t.s]-g[e.s]||e.f-t.f}));r<a;++r){var C=s[r].s;if(!(g[C]>t))break;m+=b-(1<<v-g[C]),g[C]=t}for(m>>=y;m>0;){var x=s[r].s;g[x]<t?m-=1<<t-g[x]++-1:++r}for(;r>=0&&m;--r){var E=s[r].s;g[E]==t&&(--g[E],++m)}v=t}return{t:new i(g),l:v}},F=function(e,t,n){return-1==e.s?Math.max(F(e.l,t,n+1),F(e.r,t,n+1)):t[e.s]=n},L=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new o(++t),r=0,i=e[0],a=1,s=function(e){n[r++]=e},l=1;l<=t;++l)if(e[l]==i&&l!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(i),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(i);a=1,i=e[l]}return{c:n.subarray(0,r),n:t}},W=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},U=function(e,t,n){var r=n.length,i=T(t+2);e[i]=255&r,e[i+1]=r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},G=function(e,t,n,r,i,a,u,d,p,f,h){B(t,h++,n),++i[256];for(var g=I(i,15),v=g.t,m=g.l,y=I(a,15),b=y.t,w=y.l,R=L(v),O=R.c,A=R.n,k=L(b),T=k.c,N=k.n,D=new o(19),P=0;P<O.length;++P)++D[31&O[P]];for(P=0;P<T.length;++P)++D[31&T[P]];for(var _=I(D,7),F=_.t,G=_.l,z=19;z>4&&!F[c[z-1]];--z);var Q,j,H,Y,J=f+5<<3,X=W(i,x)+W(a,E)+u,Z=W(i,v)+W(a,b)+u+14+3*z+W(D,F)+2*D[16]+3*D[17]+7*D[18];if(p>=0&&J<=X&&J<=Z)return U(t,h,e.subarray(p,p+f));if(B(t,h,1+(Z<X)),h+=2,Z<X){Q=C(v,m,0),j=v,H=C(b,w,0),Y=b;var q=C(F,G,0);B(t,h,A-257),B(t,h+5,N-1),B(t,h+10,z-4),h+=14;for(P=0;P<z;++P)B(t,h+3*P,F[c[P]]);h+=3*z;for(var K=[O,T],$=0;$<2;++$){var ee=K[$];for(P=0;P<ee.length;++P){var te=31&ee[P];B(t,h,q[te]),h+=F[te],te>15&&(B(t,h,ee[P]>>5&127),h+=ee[P]>>12)}}}else Q=S,j=x,H=V,Y=E;for(P=0;P<d;++P){var ne=r[P];if(ne>255){M(t,h,Q[(te=ne>>18&31)+257]),h+=j[te+257],te>7&&(B(t,h,ne>>23&31),h+=s[te]);var re=31≠M(t,h,H[re]),h+=Y[re],re>3&&(M(t,h,ne>>5&8191),h+=l[re])}else M(t,h,Q[ne]),h+=j[ne]}return M(t,h,Q[256]),h+j[256]},z=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Q=new i(0),j=function(e,t,n,r,c,u){var d=u.z||e.length,p=new i(r+d+5*(1+Math.ceil(d/7e3))+c),h=p.subarray(r,p.length-c),g=u.l,m=7&(u.r||0);if(t){m&&(h[0]=u.r>>3);for(var y=z[t-1],b=y>>13,C=8191&y,x=(1<<n)-1,E=u.p||new o(32768),S=u.h||new o(x+1),w=Math.ceil(n/3),V=2*w,R=function(t){return(e[t]^e[t+1]<<w^e[t+2]<<V)&x},O=new a(25e3),A=new o(288),k=new o(32),D=0,P=0,_=u.i||0,B=0,M=u.w||0,I=0;_+2<d;++_){var F=R(_),L=32767&_,W=S[F];if(E[L]=W,S[F]=L,M<=_){var Q=d-_;if((D>7e3||B>24576)&&(Q>423||!g)){m=G(e,h,0,O,A,k,P,B,I,_-I,m),B=D=P=0,I=_;for(var j=0;j<286;++j)A[j]=0;for(j=0;j<30;++j)k[j]=0}var H=2,Y=0,J=C,X=L-W&32767;if(Q>2&&F==R(_-X))for(var Z=Math.min(b,Q)-1,q=Math.min(32767,_),K=Math.min(258,Q);X<=q&&--J&&L!=W;){if(e[_+H]==e[_+H-X]){for(var $=0;$<K&&e[_+$]==e[_+$-X];++$);if($>H){if(H=$,Y=X,$>Z)break;var ee=Math.min(X,$-2),te=0;for(j=0;j<ee;++j){var ne=_-X+j&32767,re=ne-E[ne]&32767;re>te&&(te=re,W=ne)}}}X+=(L=W)-(W=E[L])&32767}if(Y){O[B++]=268435456|f[H]<<18|v[Y];var ie=31&f[H],oe=31&v[Y];P+=s[ie]+l[oe],++A[257+ie],++k[oe],M=_+H,++D}else O[B++]=e[_],++A[e[_]]}}for(_=Math.max(_,M);_<d;++_)O[B++]=e[_],++A[e[_]];m=G(e,h,g,O,A,k,P,B,I,_-I,m),g||(u.r=7&m|h[m/8|0]<<3,m-=7,u.h=S,u.p=E,u.i=_,u.w=M)}else{for(_=u.w||0;_<d+g;_+=65535){var ae=_+65535;ae>=d&&(h[m/8|0]=g,ae=d),m=U(h,m+1,e.subarray(_,ae))}u.i=d}return N(p,0,r+T(m)+c)},H=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),Y=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=H[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},J=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,a=0;a!=o;){for(var s=Math.min(a+2655,o);a<s;++a)i+=r+=n[a];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},X=function(e,t,n,r,o){if(!o&&(o={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),s=new i(a.length+e.length);s.set(a),s.set(e,a.length),e=s,o.w=a.length}return j(e,null==t.level?6:t.level,null==t.mem?o.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,o)},Z=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},q=function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var s=r[a],l=o[a];if("function"==typeof s){t+=";"+l+"=";var c=s.toString();if(s.prototype)if(-1!=c.indexOf("[native code]")){var u=c.indexOf(" ",8)+1;t+=c.slice(u,c.indexOf("(",u))}else for(var d in t+=c,s.prototype)t+=";"+l+".prototype."+d+"="+s.prototype[d].toString();else t+=c}else n[l]=s}return t},K=[],$=function(e,t,n,i){if(!K[n]){for(var o="",a={},s=e.length-1,l=0;l<s;++l)o=q(e[l],o,a);K[n]={c:q(e[s],o,a),e:a}}var c=Z({},K[n].e);return(0,r.default)(K[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,c,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(c),i)},ee=function(){return[i,o,a,s,l,c,p,g,w,R,m,D,C,O,A,k,T,N,P,_,ke,ae,se]},te=function(){return[i,o,a,s,l,c,f,v,S,x,V,E,m,z,Q,C,B,M,I,F,L,W,U,G,T,N,j,X,Ve,ae]},ne=function(){return[ge,ye,he,Y,H]},re=function(){return[ve,me]},ie=function(){return[be,he,J]},oe=function(){return[Ce]},ae=function(e){return postMessage(e,[e.buffer])},se=function(e){return e&&{out:e.size&&new i(e.size),dictionary:e.dictionary}},le=function(e,t,n,r,i,o){var a=$(n,r,i,(function(e,t){a.terminate(),o(e,t)}));return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},ce=function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){t.data.length?(e.push(t.data[0],t.data[1]),postMessage([t.data[0].length])):e.flush()}},ue=function(e,t,n,r,i,o,a){var s,l=$(e,r,i,(function(e,n){e?(l.terminate(),t.ondata.call(t,e)):Array.isArray(n)?1==n.length?(t.queuedSize-=n[0],t.ondrain&&t.ondrain(n[0])):(n[1]&&l.terminate(),t.ondata.call(t,e,n[0],n[1])):a(n)}));l.postMessage(n),t.queuedSize=0,t.push=function(e,n){t.ondata||P(5),s&&t.ondata(P(4,0,1),null,!!n),t.queuedSize+=e.length,l.postMessage([e,s=n],[e.buffer])},t.terminate=function(){l.terminate()},o&&(t.flush=function(){l.postMessage([])})},de=function(e,t){return e[t]|e[t+1]<<8},pe=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},fe=function(e,t){return pe(e,t)+4294967296*pe(e,t+4)},he=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},ge=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&he(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},ve=function(e){31==e[0]&&139==e[1]&&8==e[2]||P(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=2+(e[10]|e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},me=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},ye=function(e){return 10+(e.filename?e.filename.length+1:0)},be=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=J();i.p(t.dictionary),he(e,2,i.d())}},Ce=function(e,t){return(8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31)&&P(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&P(6,"invalid zlib data: "+(32&e[1]?"need":"unexpected")+" dictionary"),2+(e[1]>>3&4)};function xe(e,t){return"function"==typeof e&&(t=e,e={}),this.ondata=t,e}var Ee=function(){function e(e,t){if("function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new i(98304),this.o.dictionary){var n=this.o.dictionary.subarray(-32768);this.b.set(n,32768-n.length),this.s.i=32768-n.length}}return e.prototype.p=function(e,t){this.ondata(X(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||P(5),this.s.l&&P(4);var n=e.length+this.s.z;if(n>this.b.length){if(n>2*this.b.length-32768){var r=new i(-32768&n);r.set(this.b.subarray(0,this.s.z)),this.b=r}var o=this.b.length-this.s.z;this.b.set(e.subarray(0,o),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(o),32768),this.s.z=e.length-o+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=1&t,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},e.prototype.flush=function(){this.ondata||P(5),this.s.l&&P(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},e}();t.Deflate=Ee;var Se=function(){return function(e,t){ue([te,function(){return[ce,Ee]}],this,xe.call(this,e,t),(function(e){var t=new Ee(e.data);onmessage=ce(t)}),6,1)}}();function we(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[te],(function(e){return ae(Ve(e.data[0],e.data[1]))}),0,n)}function Ve(e,t){return X(e,t||{},0,0)}t.AsyncDeflate=Se,t.deflate=we,t.deflateSync=Ve;var Re=function(){function e(e,t){"function"==typeof e&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new i(32768),this.p=new i(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||P(5),this.d&&P(4),this.p.length){if(e.length){var t=new i(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}}else this.p=e},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=_(this.p,this.s,this.o);this.ondata(N(n,t,this.s.b),this.d),this.o=N(n,this.s.b-32768),this.s.b=this.o.length,this.p=N(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}();t.Inflate=Re;var Oe=function(){return function(e,t){ue([ee,function(){return[ce,Re]}],this,xe.call(this,e,t),(function(e){var t=new Re(e.data);onmessage=ce(t)}),7,0)}}();function Ae(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[ee],(function(e){return ae(ke(e.data[0],se(e.data[1])))}),1,n)}function ke(e,t){return _(e,{i:2},t&&t.out,t&&t.dictionary)}t.AsyncInflate=Oe,t.inflate=Ae,t.inflateSync=ke;var Te=function(){function e(e,t){this.c=Y(),this.l=0,this.v=1,Ee.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),this.l+=e.length,Ee.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=X(e,this.o,this.v&&ye(this.o),t&&8,this.s);this.v&&(ge(n,this.o),this.v=0),t&&(he(n,n.length-8,this.c.d()),he(n,n.length-4,this.l)),this.ondata(n,t)},e.prototype.flush=function(){Ee.prototype.flush.call(this)},e}();t.Gzip=Te,t.Compress=Te;var Ne=function(){return function(e,t){ue([te,ne,function(){return[ce,Ee,Te]}],this,xe.call(this,e,t),(function(e){var t=new Te(e.data);onmessage=ce(t)}),8,1)}}();function De(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[te,ne,function(){return[Pe]}],(function(e){return ae(Pe(e.data[0],e.data[1]))}),2,n)}function Pe(e,t){t||(t={});var n=Y(),r=e.length;n.p(e);var i=X(e,t,ye(t),8),o=i.length;return ge(i,t),he(i,o-8,n.d()),he(i,o-4,r),i}t.AsyncGzip=Ne,t.AsyncCompress=Ne,t.gzip=De,t.compress=De,t.gzipSync=Pe,t.compressSync=Pe;var _e=function(){function e(e,t){this.v=1,this.r=0,Re.call(this,e,t)}return e.prototype.push=function(e,t){if(Re.prototype.e.call(this,e),this.r+=e.length,this.v){var n=this.p.subarray(this.v-1),r=n.length>3?ve(n):4;if(r>n.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-n.length);this.p=n.subarray(r),this.v=0}Re.prototype.c.call(this,t),!this.s.f||this.s.l||t||(this.v=T(this.s.p)+9,this.s={i:0},this.o=new i(0),this.push(new i(0),t))},e}();t.Gunzip=_e;var Be=function(){return function(e,t){var n=this;ue([ee,re,function(){return[ce,Re,_e]}],this,xe.call(this,e,t),(function(e){var t=new _e(e.data);t.onmember=function(e){return postMessage(e)},onmessage=ce(t)}),9,0,(function(e){return n.onmember&&n.onmember(e)}))}}();function Me(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[ee,re,function(){return[Ie]}],(function(e){return ae(Ie(e.data[0],e.data[1]))}),3,n)}function Ie(e,t){var n=ve(e);return n+8>e.length&&P(6,"invalid gzip data"),_(e.subarray(n,-8),{i:2},t&&t.out||new i(me(e)),t&&t.dictionary)}t.AsyncGunzip=Be,t.gunzip=Me,t.gunzipSync=Ie;var Fe=function(){function e(e,t){this.c=J(),this.v=1,Ee.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),Ee.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=X(e,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&(be(n,this.o),this.v=0),t&&he(n,n.length-4,this.c.d()),this.ondata(n,t)},e.prototype.flush=function(){Ee.prototype.flush.call(this)},e}();t.Zlib=Fe;var Le=function(){return function(e,t){ue([te,ie,function(){return[ce,Ee,Fe]}],this,xe.call(this,e,t),(function(e){var t=new Fe(e.data);onmessage=ce(t)}),10,1)}}();function We(e,t){t||(t={});var n=J();n.p(e);var r=X(e,t,t.dictionary?6:2,4);return be(r,t),he(r,r.length-4,n.d()),r}t.AsyncZlib=Le,t.zlib=function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[te,ie,function(){return[We]}],(function(e){return ae(We(e.data[0],e.data[1]))}),4,n)},t.zlibSync=We;var Ue=function(){function e(e,t){Re.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(Re.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(Ce(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&P(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Re.prototype.c.call(this,t)},e}();t.Unzlib=Ue;var Ge=function(){return function(e,t){ue([ee,oe,function(){return[ce,Re,Ue]}],this,xe.call(this,e,t),(function(e){var t=new Ue(e.data);onmessage=ce(t)}),11,0)}}();function ze(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),le(e,t,[ee,oe,function(){return[Qe]}],(function(e){return ae(Qe(e.data[0],se(e.data[1])))}),5,n)}function Qe(e,t){return _(e.subarray(Ce(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}t.AsyncUnzlib=Ge,t.unzlib=ze,t.unzlibSync=Qe;var je=function(){function e(e,t){this.o=xe.call(this,e,t)||{},this.G=_e,this.I=Re,this.Z=Ue}return e.prototype.i=function(){var e=this;this.s.ondata=function(t,n){e.ondata(t,n)}},e.prototype.push=function(e,t){if(this.ondata||P(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new i(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;this.p.length>2&&(this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(this.o):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,t),this.p=null)}},e}();t.Decompress=je;var He=function(){function e(e,t){je.call(this,e,t),this.queuedSize=0,this.G=Be,this.I=Oe,this.Z=Ge}return e.prototype.i=function(){var e=this;this.s.ondata=function(t,n,r){e.ondata(t,n,r)},this.s.ondrain=function(t){e.queuedSize-=t,e.ondrain&&e.ondrain(t)}},e.prototype.push=function(e,t){this.queuedSize+=e.length,je.prototype.push.call(this,e,t)},e}();t.AsyncDecompress=He,t.decompress=function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),31==e[0]&&139==e[1]&&8==e[2]?Me(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Ae(e,t,n):ze(e,t,n)},t.decompressSync=function(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?Ie(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?ke(e,t):Qe(e,t)};var Ye=function(e,t,n,r){for(var o in e){var a=e[o],s=t+o,l=r;Array.isArray(a)&&(l=Z(r,a[1]),a=a[0]),a instanceof i?n[s]=[a,l]:(n[s+="/"]=[new i(0),l],Ye(a,s,n,r))}},Je="undefined"!=typeof TextEncoder&&new TextEncoder,Xe="undefined"!=typeof TextDecoder&&new TextDecoder,Ze=0;try{Xe.decode(Q,{stream:!0}),Ze=1}catch(e){}var qe=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:N(e,n-1)};i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}},Ke=function(){function e(e){this.ondata=e,Ze?this.t=new TextDecoder:this.p=Q}return e.prototype.push=function(e,t){if(this.ondata||P(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&P(8),this.t=null));this.p||P(4);var n=new i(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=qe(n),o=r.s,a=r.r;t?(a.length&&P(8),this.p=null):this.p=a,this.ondata(o,t)},e}();t.DecodeUTF8=Ke;var $e=function(){function e(e){this.ondata=e}return e.prototype.push=function(e,t){this.ondata||P(5),this.d&&P(4),this.ondata(et(e),this.d=t||!1)},e}();function et(e,t){if(t){for(var n=new i(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Je)return Je.encode(e);var o=e.length,a=new i(e.length+(e.length>>1)),s=0,l=function(e){a[s++]=e};for(r=0;r<o;++r){if(s+5>a.length){var c=new i(s+8+(o-r<<1));c.set(a),a=c}var u=e.charCodeAt(r);u<128||t?l(u):u<2048?(l(192|u>>6),l(128|63&u)):u>55295&&u<57344?(l(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++r))>>18),l(128|u>>12&63),l(128|u>>6&63),l(128|63&u)):(l(224|u>>12),l(128|u>>6&63),l(128|63&u))}return N(a,0,s)}function tt(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(Xe)return Xe.decode(e);var i=qe(e),o=i.s;return(n=i.r).length&&P(8),o}t.EncodeUTF8=$e,t.strToU8=et,t.strFromU8=tt;var nt=function(e){return 1==e?3:e<6?2:9==e?1:0},rt=function(e,t){return t+30+de(e,t+26)+de(e,t+28)},it=function(e,t,n){var r=de(e,t+28),i=tt(e.subarray(t+46,t+46+r),!(2048&de(e,t+8))),o=t+46+r,a=pe(e,t+20),s=n&&4294967295==a?ot(e,o):[a,pe(e,t+24),pe(e,t+42)],l=s[0],c=s[1],u=s[2];return[de(e,t+10),l,c,i,o+de(e,t+30)+de(e,t+32),u]},ot=function(e,t){for(;1!=de(e,t);t+=4+de(e,t+2));return[fe(e,t+12),fe(e,t+4),fe(e,t+20)]},at=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&P(9),t+=r+4}return t},st=function(e,t,n,r,i,o,a,s){var l=r.length,c=n.extra,u=s&&s.length,d=at(c);he(e,t,null!=a?33639248:67324752),t+=4,null!=a&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(o<0&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var p=new Date(null==n.mtime?Date.now():n.mtime),f=p.getFullYear()-1980;if((f<0||f>119)&&P(10),he(e,t,f<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),t+=4,-1!=o&&(he(e,t,n.crc),he(e,t+4,o<0?-o-2:o),he(e,t+8,n.size)),he(e,t+12,l),he(e,t+14,d),t+=16,null!=a&&(he(e,t,u),he(e,t+6,n.attrs),he(e,t+10,a),t+=14),e.set(r,t),t+=l,d)for(var h in c){var g=c[h],v=g.length;he(e,t,+h),he(e,t+2,v),e.set(g,t+4),t+=4+v}return u&&(e.set(s,t),t+=u),t},lt=function(e,t,n,r,i){he(e,t,101010256),he(e,t+8,n),he(e,t+10,n),he(e,t+12,r),he(e,t+16,i)},ct=function(){function e(e){this.filename=e,this.c=Y(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||P(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}();t.ZipPassThrough=ct;var ut=function(){function e(e,t){var n=this;t||(t={}),ct.call(this,e),this.d=new Ee(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=nt(t.level)}return e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){ct.prototype.push.call(this,e,t)},e}();t.ZipDeflate=ut;var dt=function(){function e(e,t){var n=this;t||(t={}),ct.call(this,e),this.d=new Se(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=nt(t.level),this.terminate=this.d.terminate}return e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){ct.prototype.push.call(this,e,t)},e}();t.AsyncZipDeflate=dt;var pt=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return e.prototype.add=function(e){var t=this;if(this.ondata||P(5),2&this.d)this.ondata(P(4+8*(1&this.d),0,1),null,!1);else{var n=et(e.filename),r=n.length,o=e.comment,a=o&&et(o),s=r!=e.filename.length||a&&o.length!=a.length,l=r+at(e.extra)+30;r>65535&&this.ondata(P(11,0,1),null,!1);var c=new i(l);st(c,0,e,n,s,-1);var u=[c],d=function(){for(var e=0,n=u;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}u=[]},p=this.d;this.d=0;var f=this.u.length,h=Z(e,{f:n,u:s,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(d(),p){var e=t.u[f+1];e?e.r():t.d=1}p=1}}),g=0;e.ondata=function(n,r,o){if(n)t.ondata(n,r,o),t.terminate();else if(g+=r.length,u.push(r),o){var a=new i(16);he(a,0,134695760),he(a,4,e.crc),he(a,8,g),he(a,12,e.size),u.push(a),h.c=g,h.b=l+g+16,h.crc=e.crc,h.size=e.size,p&&h.r(),p=1}else p&&d()},this.u.push(h)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(P(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,o=this.u;r<o.length;r++){n+=46+(c=o[r]).f.length+at(c.extra)+(c.o?c.o.length:0)}for(var a=new i(n+22),s=0,l=this.u;s<l.length;s++){var c=l[s];st(a,e,c,c.f,c.u,-c.c-2,t,c.o),e+=46+c.f.length+at(c.extra)+(c.o?c.o.length:0),t+=c.b}lt(a,e,this.u.length,n,t),this.ondata(null,a,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}();t.Zip=pt,t.zip=function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&P(7);var r={};Ye(e,"",r,t);var o=Object.keys(r),a=o.length,s=0,l=0,c=a,u=new Array(a),d=[],p=function(){for(var e=0;e<d.length;++e)d[e]()},f=function(e,t){mt((function(){n(e,t)}))};mt((function(){f=n}));var h=function(){var e=new i(l+22),t=s,n=l-s;l=0;for(var r=0;r<c;++r){var o=u[r];try{var a=o.c.length;st(e,l,o,o.f,o.u,a);var d=30+o.f.length+at(o.extra),p=l+d;e.set(o.c,p),st(e,s,o,o.f,o.u,a,l,o.m),s+=16+d+(o.m?o.m.length:0),l=p+a}catch(e){return f(e,null)}}lt(e,s,u.length,n,t),f(null,e)};a||h();for(var g=function(e){var t=o[e],n=r[t],i=n[0],c=n[1],g=Y(),v=i.length;g.p(i);var m=et(t),y=m.length,b=c.comment,C=b&&et(b),x=C&&C.length,E=at(c.extra),S=0==c.level?0:8,w=function(n,r){if(n)p(),f(n,null);else{var i=r.length;u[e]=Z(c,{size:v,crc:g.d(),c:r,f:m,m:C,u:y!=t.length||C&&b.length!=x,compression:S}),s+=30+y+E+i,l+=76+2*(y+E)+(x||0)+i,--a||h()}};if(y>65535&&w(P(11,0,1),null),S)if(v<16e4)try{w(null,Ve(i,c))}catch(e){w(e,null)}else d.push(we(i,c,w));else w(null,i)},v=0;v<c;++v)g(v);return p},t.zipSync=function(e,t){t||(t={});var n={},r=[];Ye(e,"",n,t);var o=0,a=0;for(var s in n){var l=n[s],c=l[0],u=l[1],d=0==u.level?0:8,p=(w=et(s)).length,f=u.comment,h=f&&et(f),g=h&&h.length,v=at(u.extra);p>65535&&P(11);var m=d?Ve(c,u):c,y=m.length,b=Y();b.p(c),r.push(Z(u,{size:c.length,crc:b.d(),c:m,f:w,m:h,u:p!=s.length||h&&f.length!=g,o,compression:d})),o+=30+p+v+y,a+=76+2*(p+v)+(g||0)+y}for(var C=new i(a+22),x=o,E=a-o,S=0;S<r.length;++S){var w=r[S];st(C,w.o,w,w.f,w.u,w.c.length);var V=30+w.f.length+at(w.extra);C.set(w.c,w.o+V),st(C,o,w,w.f,w.u,w.c.length,w.o,w.m),o+=16+V+(w.m?w.m.length:0)}return lt(C,o,r.length,E,x),C};var ft=function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}();t.UnzipPassThrough=ft;var ht=function(){function e(){var e=this;this.i=new Re((function(t,n){e.ondata(null,t,n)}))}return e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}();t.UnzipInflate=ht;var gt=function(){function e(e,t){var n=this;t<32e4?this.i=new Re((function(e,t){n.ondata(null,e,t)})):(this.i=new Oe((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return e.prototype.push=function(e,t){this.i.terminate&&(e=N(e,0)),this.i.push(e,t)},e.compression=8,e}();t.AsyncUnzipInflate=gt;var vt=function(){function e(e){this.onfile=e,this.k=[],this.o={0:ft},this.p=Q}return e.prototype.push=function(e,t){var n=this;if(this.onfile||P(5),this.p||P(4),this.c>0){var r=Math.min(this.c,e.length),o=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(o,!this.c):this.k[0].push(o),(e=e.subarray(r)).length)return this.push(e,t)}else{var a=0,s=0,l=void 0,c=void 0;this.p.length?e.length?((c=new i(this.p.length+e.length)).set(this.p),c.set(e,this.p.length)):c=this.p:c=e;for(var u=c.length,d=this.c,p=d&&this.d,f=function(){var e,t=pe(c,s);if(67324752==t){a=1,l=s,h.d=null,h.c=0;var r=de(c,s+6),i=de(c,s+8),o=2048&r,p=8&r,f=de(c,s+26),g=de(c,s+28);if(u>s+30+f+g){var v=[];h.k.unshift(v),a=2;var m,y=pe(c,s+18),b=pe(c,s+22),C=tt(c.subarray(s+30,s+=30+f),!o);4294967295==y?(e=p?[-2]:ot(c,s),y=e[0],b=e[1]):p&&(y=-1),s+=g,h.c=y;var x={name:C,compression:i,start:function(){if(x.ondata||P(5),y){var e=n.o[i];e||x.ondata(P(14,"unknown compression type "+i,1),null,!1),(m=y<0?new e(C):new e(C,y,b)).ondata=function(e,t,n){x.ondata(e,t,n)};for(var t=0,r=v;t<r.length;t++){var o=r[t];m.push(o,!1)}n.k[0]==v&&n.c?n.d=m:m.push(Q,!0)}else x.ondata(null,Q,!0)},terminate:function(){m&&m.terminate&&m.terminate()}};y>=0&&(x.size=y,x.originalSize=b),h.onfile(x)}return"break"}if(d){if(134695760==t)return l=s+=12+(-2==d&&8),a=3,h.c=0,"break";if(33639248==t)return l=s-=4,a=3,h.c=0,"break"}},h=this;s<u-4;++s){if("break"===f())break}if(this.p=Q,d<0){var g=a?c.subarray(0,l-12-(-2==d&&8)-(134695760==pe(c,l-16)&&4)):c.subarray(0,s);p?p.push(g,!!a):this.k[+(2==a)].push(g)}if(2&a)return this.push(c.subarray(s),t);this.p=c.subarray(s)}t&&(this.c&&P(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}();t.Unzip=vt;var mt="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};t.unzip=function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&P(7);var r=[],o=function(){for(var e=0;e<r.length;++e)r[e]()},a={},s=function(e,t){mt((function(){n(e,t)}))};mt((function(){s=n}));for(var l=e.length-22;101010256!=pe(e,l);--l)if(!l||e.length-l>65558)return s(P(13,0,1),null),o;var c=de(e,l+8);if(c){var u=c,d=pe(e,l+16),p=4294967295==d||65535==u;if(p){var f=pe(e,l-12);(p=101075792==pe(e,f))&&(u=c=pe(e,f+32),d=pe(e,f+48))}for(var h=t&&t.filter,g=function(t){var n=it(e,d,p),l=n[0],u=n[1],f=n[2],g=n[3],v=n[4],m=n[5],y=rt(e,m);d=v;var b=function(e,t){e?(o(),s(e,null)):(t&&(a[g]=t),--c||s(null,a))};if(!h||h({name:g,size:u,originalSize:f,compression:l}))if(l)if(8==l){var C=e.subarray(y,y+u);if(f<524288||u>.8*f)try{b(null,ke(C,{out:new i(f)}))}catch(e){b(e,null)}else r.push(Ae(C,{size:f},b))}else b(P(14,"unknown compression type "+l,1),null);else b(null,N(e,y,y+u));else b(null,null)},v=0;v<u;++v)g()}else s(null,{});return o},t.unzipSync=function(e,t){for(var n={},r=e.length-22;101010256!=pe(e,r);--r)(!r||e.length-r>65558)&&P(13);var o=de(e,r+8);if(!o)return{};var a=pe(e,r+16),s=4294967295==a||65535==o;if(s){var l=pe(e,r-12);(s=101075792==pe(e,l))&&(o=pe(e,l+32),a=pe(e,l+48))}for(var c=t&&t.filter,u=0;u<o;++u){var d=it(e,a,s),p=d[0],f=d[1],h=d[2],g=d[3],v=d[4],m=d[5],y=rt(e,m);a=v,c&&!c({name:g,size:f,originalSize:h,compression:p})||(p?8==p?n[g]=ke(e.subarray(y,y+f),{out:new i(h)}):P(14,"unknown compression type "+p):n[g]=N(e,y,y+f))}return n}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}return i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i(317)})()));
|