notebook 7.2.3__py3-none-any.whl → 7.3.0a0__py3-none-any.whl
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.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/app.py +6 -0
- notebook/static/113.bundle.js +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/1226.bundle.js +1 -0
- notebook/static/131.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -1
- notebook/static/1584.bundle.js +1 -1
- notebook/static/1601.bundle.js +1 -0
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1684.bundle.js +1 -1
- notebook/static/1750.bundle.js +1 -0
- notebook/static/1809.bundle.js +1 -1
- notebook/static/1827.bundle.js +1 -1
- notebook/static/1833.bundle.js +1 -1
- notebook/static/1884.bundle.js +386 -0
- notebook/static/1958.bundle.js +1 -1
- notebook/static/1962.bundle.js +1 -1
- notebook/static/2007.bundle.js +1 -1
- notebook/static/2088.bundle.js +1 -1
- notebook/static/2089.bundle.js +1 -1
- notebook/static/2122.bundle.js +1 -1
- notebook/static/2167.bundle.js +1 -1
- notebook/static/2184.bundle.js +1 -1
- notebook/static/2311.bundle.js +1 -1
- notebook/static/2401.bundle.js +1 -1
- notebook/static/2479.bundle.js +1 -1
- notebook/static/2489.bundle.js +1 -1
- notebook/static/2552.bundle.js +1 -1
- notebook/static/2607.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/2636.bundle.js +1 -1
- notebook/static/{6593.bundle.js → 2756.bundle.js} +1 -1
- notebook/static/2924.bundle.js +1 -1
- notebook/static/2944.bundle.js +1 -1
- notebook/static/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3187.bundle.js +1 -1
- notebook/static/3213.bundle.js +1 -1
- notebook/static/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/3420.bundle.js +1 -1
- notebook/static/3466.bundle.js +1 -1
- notebook/static/3512.bundle.js +1 -1
- notebook/static/3676.bundle.js +1 -1
- notebook/static/3680.bundle.js +1 -1
- notebook/static/374.bundle.js +1 -1
- notebook/static/3768.bundle.js +1 -1
- notebook/static/377.bundle.js +1 -1
- notebook/static/3863.bundle.js +1 -1
- notebook/static/3881.bundle.js +1 -1
- notebook/static/4042.bundle.js +1 -1
- notebook/static/4045.bundle.js +1 -0
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4382.bundle.js +1 -1
- notebook/static/{7674.bundle.js → 4427.bundle.js} +1 -1
- notebook/static/4434.bundle.js +1 -0
- notebook/static/4588.bundle.js +1 -1
- notebook/static/4645.bundle.js +1 -1
- notebook/static/4811.bundle.js +1 -1
- notebook/static/4837.bundle.js +1 -1
- notebook/static/5018.bundle.js +1 -0
- notebook/static/5099.bundle.js +1 -1
- notebook/static/5135.bundle.js +1 -1
- notebook/static/5254.bundle.js +1 -1
- notebook/static/5261.bundle.js +1 -1
- notebook/static/5313.bundle.js +1 -1
- notebook/static/5325.bundle.js +1 -1
- notebook/static/5346.bundle.js +1 -1
- notebook/static/5426.bundle.js +1 -1
- notebook/static/545.bundle.js +1 -1
- notebook/static/5573.bundle.js +1 -1
- notebook/static/5601.bundle.js +1 -1
- notebook/static/5712.bundle.js +1 -0
- notebook/static/5733.bundle.js +1 -1
- notebook/static/5828.bundle.js +1 -1
- notebook/static/5850.bundle.js +1 -1
- notebook/static/5912.bundle.js +1 -1
- notebook/static/5921.bundle.js +1 -1
- notebook/static/6017.bundle.js +1 -1
- notebook/static/6139.bundle.js +1 -1
- notebook/static/6164.bundle.js +1 -0
- notebook/static/62.bundle.js +1 -1
- notebook/static/6271.bundle.js +1 -1
- notebook/static/6281.bundle.js +1 -1
- notebook/static/6318.bundle.js +1 -0
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6604.bundle.js +1 -1
- notebook/static/6619.bundle.js +1 -0
- notebook/static/6621.bundle.js +1 -1
- notebook/static/6627.bundle.js +1 -1
- notebook/static/6748.bundle.js +1 -1
- notebook/static/677.bundle.js +1 -1
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.bundle.js +1 -1
- notebook/static/6893.bundle.js +1 -1
- notebook/static/6898.bundle.js +1 -0
- notebook/static/690.bundle.js +1 -1
- notebook/static/6962.bundle.js +1 -1
- notebook/static/6999.bundle.js +1 -1
- notebook/static/7226.bundle.js +1 -1
- notebook/static/7252.bundle.js +1 -1
- notebook/static/7259.bundle.js +1 -1
- notebook/static/7302.bundle.js +1 -1
- notebook/static/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7450.bundle.js +1 -1
- notebook/static/7506.bundle.js +703 -0
- notebook/static/7543.bundle.js +1 -1
- notebook/static/755.bundle.js +1 -1
- notebook/static/7579.bundle.js +1 -0
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7655.bundle.js +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/7812.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7854.bundle.js +1 -1
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/7995.bundle.js +1 -1
- notebook/static/8010.bundle.js +1 -1
- notebook/static/8054.bundle.js +1 -0
- notebook/static/8471.bundle.js +1 -1
- notebook/static/85.bundle.js +1 -1
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8647.bundle.js +1 -0
- notebook/static/8723.bundle.js +1 -0
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.bundle.js +1 -1
- notebook/static/8875.bundle.js +1 -1
- notebook/static/8907.bundle.js +1 -1
- notebook/static/8928.bundle.js +1 -1
- notebook/static/893.bundle.js +1 -1
- notebook/static/901.bundle.js +1 -1
- notebook/static/9068.bundle.js +1 -1
- notebook/static/9092.bundle.js +1 -0
- notebook/static/9136.bundle.js +1 -1
- notebook/static/9151.bundle.js +1 -1
- notebook/static/9161.bundle.js +1 -1
- notebook/static/9268.bundle.js +1 -1
- notebook/static/9335.bundle.js +1 -1
- notebook/static/9341.bundle.js +1 -1
- notebook/static/9380.bundle.js +1 -1
- notebook/static/9605.bundle.js +1 -1
- notebook/static/9638.bundle.js +1 -1
- notebook/static/9680.bundle.js +1 -1
- notebook/static/9685.bundle.js +1 -1
- notebook/static/9734.bundle.js +1 -0
- notebook/static/9752.bundle.js +1 -1
- notebook/static/9821.bundle.js +1 -1
- notebook/static/9852.bundle.js +1 -1
- notebook/static/9906.bundle.js +1 -0
- notebook/static/bundle.js +1 -1
- notebook/static/third-party-licenses.json +107 -107
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +4 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +9 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
- notebook-7.2.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.0e9bcd74ae36ad68f70e.js → notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6d49b092e49dc147dc54.js +1 -1
- notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/646.57a345a80ce9f0e64830.js +1 -0
- notebook-7.2.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.768a77db06802599fa5d.js → notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.7bcc163b9139ecb2b25b.js +1 -1
- notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.9381fdb35e72f41d8af1.js +1 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/METADATA +4 -3
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/RECORD +197 -185
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/WHEEL +1 -1
- notebook/static/1718.bundle.js +0 -1
- notebook/static/2955.bundle.js +0 -1
- notebook/static/5263.bundle.js +0 -1
- notebook/static/6743.bundle.js +0 -1
- notebook/static/7866.bundle.js +0 -1
- notebook/static/8787.bundle.js +0 -1
- notebook/static/8896.bundle.js +0 -6025
- notebook/static/9799.bundle.js +0 -1
- notebook-7.2.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/804.2cd86c0d29e544a308c0.js +0 -1
- notebook-7.2.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.8cdb5c12db85ac589ef4.js +0 -1
- /notebook/static/{8896.bundle.js.LICENSE.txt → 7506.bundle.js.LICENSE.txt} +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.2.3.data → notebook-7.3.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/entry_points.txt +0 -0
- {notebook-7.2.3.dist-info → notebook-7.3.0a0.dist-info}/licenses/LICENSE +0 -0
notebook/static/7259.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7259],{7259:(n,e,t)=>{t.d(e,{bK:()=>ge});var r=t(21845),o=t(12451),i=t(36004),u=t(78795),a=t(28099),c=t(12930),s=t(36735),d=t(67406);class f{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,e=n._prev;if(e!==n)return h(e),e}enqueue(n){var e=this._sentinel;n._prev&&n._next&&h(n),n._next=e._next,e._next._prev=n,e._next=n,n._prev=e}toString(){for(var n=[],e=this._sentinel,t=e._prev;t!==e;)n.push(JSON.stringify(t,v)),t=t._prev;return"["+n.join(", ")+"]"}}function h(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function v(n,e){if("_next"!==n&&"_prev"!==n)return e}var l=u.Z(1);function Z(n,e,t,o,i){var u=i?[]:void 0;return r.Z(n.inEdges(o.v),(function(r){var o=n.edge(r),a=n.node(r.v);i&&u.push({v:r.v,w:r.w}),a.out-=o,g(e,t,a)})),r.Z(n.outEdges(o.v),(function(r){var o=n.edge(r),i=r.w,u=n.node(i);u.in-=o,g(e,t,u)})),n.removeNode(o.v),u}function g(n,e,t){t.out?t.in?n[t.out-t.in+e].enqueue(t):n[n.length-1].enqueue(t):n[0].enqueue(t)}function p(n){var e="greedy"===n.graph().acyclicer?function(n,e){if(n.nodeCount()<=1)return[];var t=function(n,e){var t=new d.k,o=0,i=0;r.Z(n.nodes(),(function(n){t.setNode(n,{v:n,in:0,out:0})})),r.Z(n.edges(),(function(n){var r=t.edge(n.v,n.w)||0,u=e(n),a=r+u;t.setEdge(n.v,n.w,a),i=Math.max(i,t.node(n.v).out+=u),o=Math.max(o,t.node(n.w).in+=u)}));var u=s.Z(i+o+3).map((function(){return new f})),a=o+1;return r.Z(t.nodes(),(function(n){g(u,a,t.node(n))})),{graph:t,buckets:u,zeroIdx:a}}(n,e||l),o=function(n,e,t){for(var r,o=[],i=e[e.length-1],u=e[0];n.nodeCount();){for(;r=u.dequeue();)Z(n,e,t,r);for(;r=i.dequeue();)Z(n,e,t,r);if(n.nodeCount())for(var a=e.length-2;a>0;--a)if(r=e[a].dequeue()){o=o.concat(Z(n,e,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return a.Z(c.Z(o,(function(e){return n.outEdges(e.v,e.w)})))}(n,function(n){return function(e){return n.edge(e).weight}}(n)):function(n){var e=[],t={},o={};return r.Z(n.nodes(),(function u(a){i.Z(o,a)||(o[a]=!0,t[a]=!0,r.Z(n.outEdges(a),(function(n){i.Z(t,n.w)?e.push(n):u(n.w)})),delete t[a])})),e}(n);r.Z(e,(function(e){var t=n.edge(e);n.removeEdge(e),t.forwardName=e.name,t.reversed=!0,n.setEdge(e.w,e.v,t,o.Z("rev"))}))}var b=t(18802),w=t(87768),m=t(65479),_=t(59660);const y=function(n,e,t){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=e(i);if(null!=u&&(void 0===a?u==u&&!(0,_.Z)(u):t(u,a)))var a=u,c=i}return c},E=function(n,e){return n>e};var j=t(64056);const k=function(n){return n&&n.length?y(n,j.Z,E):void 0},x=function(n){var e=null==n?0:n.length;return e?n[e-1]:void 0};var N=t(93586),C=t(6202),O=t(11097);const I=function(n,e){var t={};return e=(0,O.Z)(e,3),(0,C.Z)(n,(function(n,r,o){(0,N.Z)(t,r,e(n,r,o))})),t};var L=t(52307);const M=function(n,e){return n<e},R=function(n){return n&&n.length?y(n,j.Z,M):void 0};var A=t(94311);const P=function(){return A.Z.Date.now()};function T(n,e,t,r){var i;do{i=o.Z(r)}while(n.hasNode(i));return t.dummy=e,n.setNode(i,t),i}function S(n){var e=new d.k({multigraph:n.isMultigraph()}).setGraph(n.graph());return r.Z(n.nodes(),(function(t){n.children(t).length||e.setNode(t,n.node(t))})),r.Z(n.edges(),(function(t){e.setEdge(t,n.edge(t))})),e}function F(n,e){var t,r,o=n.x,i=n.y,u=e.x-o,a=e.y-i,c=n.width/2,s=n.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*c>Math.abs(u)*s?(a<0&&(s=-s),t=s*u/a,r=s):(u<0&&(c=-c),t=c,r=c*a/u),{x:o+t,y:i+r}}function D(n){var e=c.Z(s.Z(G(n)+1),(function(){return[]}));return r.Z(n.nodes(),(function(t){var r=n.node(t),o=r.rank;L.Z(o)||(e[o][r.order]=t)})),e}function B(n,e,t,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),T(n,"border",o,e)}function G(n){return k(c.Z(n.nodes(),(function(e){var t=n.node(e).rank;if(!L.Z(t))return t})))}function U(n,e){var t=P();try{return e()}finally{console.log(n+" time: "+(P()-t)+"ms")}}function V(n,e){return e()}function z(n,e,t,r,o,i){var u={width:0,height:0,rank:i,borderType:e},a=o[e][i-1],c=T(n,"border",u,t);o[e][i]=c,n.setParent(c,r),a&&n.setEdge(a,c,{weight:1})}function Y(n){r.Z(n.nodes(),(function(e){q(n.node(e))})),r.Z(n.edges(),(function(e){q(n.edge(e))}))}function q(n){var e=n.width;n.width=n.height,n.height=e}function $(n){n.y=-n.y}function J(n){var e=n.x;n.x=n.y,n.y=e}const K=function(n,e){return n&&n.length?y(n,(0,O.Z)(e,2),M):void 0};function W(n){var e={};r.Z(n.sources(),(function t(r){var o=n.node(r);if(i.Z(e,r))return o.rank;e[r]=!0;var u=R(c.Z(n.outEdges(r),(function(e){return t(e.w)-n.edge(e).minlen})));return u!==Number.POSITIVE_INFINITY&&null!=u||(u=0),o.rank=u}))}function H(n,e){return n.node(e.w).rank-n.node(e.v).rank-n.edge(e).minlen}function Q(n){var e,t,r=new d.k({directed:!1}),o=n.nodes()[0],i=n.nodeCount();for(r.setNode(o,{});X(r,n)<i;)e=nn(r,n),t=r.hasNode(e.v)?H(n,e):-H(n,e),en(r,n,t);return r}function X(n,e){return r.Z(n.nodes(),(function t(o){r.Z(e.nodeEdges(o),(function(r){var i=r.v,u=o===i?r.w:i;n.hasNode(u)||H(e,r)||(n.setNode(u,{}),n.setEdge(o,u,{}),t(u))}))})),n.nodeCount()}function nn(n,e){return K(e.edges(),(function(t){if(n.hasNode(t.v)!==n.hasNode(t.w))return H(e,t)}))}function en(n,e,t){r.Z(n.nodes(),(function(n){e.node(n).rank+=t}))}var tn=t(69959),rn=t(11723);var on=t(9872),un=t(41291);var an=Math.max;const cn=(sn=function(n,e,t){var r=null==n?0:n.length;if(!r)return-1;var o,i,u,a=null==t?0:(o=t,i=(0,un.Z)(o),u=i%1,i==i?u?i-u:i:0);return a<0&&(a=an(r+a,0)),(0,on.Z)(n,(0,O.Z)(e,3),a)},function(n,e,t){var r=Object(n);if(!(0,tn.Z)(n)){var o=(0,O.Z)(e,3);n=(0,rn.Z)(n),e=function(n){return o(r[n],n,r)}}var i=sn(n,e,t);return i>-1?r[o?n[i]:i]:void 0});var sn,dn=t(35090);u.Z(1),u.Z(1),t(45934),t(41182),t(77070);var fn=t(64058);t(9615),(0,t(4561).Z)("length"),RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var hn="\\ud800-\\udfff",vn="["+hn+"]",ln="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Zn="\\ud83c[\\udffb-\\udfff]",gn="[^"+hn+"]",pn="(?:\\ud83c[\\udde6-\\uddff]){2}",bn="[\\ud800-\\udbff][\\udc00-\\udfff]",wn="(?:"+ln+"|"+Zn+")?",mn="[\\ufe0e\\ufe0f]?",_n=mn+wn+"(?:\\u200d(?:"+[gn,pn,bn].join("|")+")"+mn+wn+")*",yn="(?:"+[gn+ln+"?",ln,pn,bn,vn].join("|")+")";function En(n,e,t){fn.Z(e)||(e=[e]);var o=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],u={};return r.Z(e,(function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);jn(n,e,"post"===t,u,o,i)})),i}function jn(n,e,t,o,u,a){i.Z(o,e)||(o[e]=!0,t||a.push(e),r.Z(u(e),(function(e){jn(n,e,t,o,u,a)})),t&&a.push(e))}function kn(n){n=function(n){var e=(new d.k).setGraph(n.graph());return r.Z(n.nodes(),(function(t){e.setNode(t,n.node(t))})),r.Z(n.edges(),(function(t){var r=e.edge(t.v,t.w)||{weight:0,minlen:1},o=n.edge(t);e.setEdge(t.v,t.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),e}(n),W(n);var e,t=Q(n);for(Cn(t),xn(t,n);e=In(t);)Mn(t,n,e,Ln(t,n,e))}function xn(n,e){var t=function(n,e){return En(n,e,"post")}(n,n.nodes());t=t.slice(0,t.length-1),r.Z(t,(function(t){!function(n,e,t){var r=n.node(t).parent;n.edge(t,r).cutvalue=Nn(n,e,t)}(n,e,t)}))}function Nn(n,e,t){var o=n.node(t).parent,i=!0,u=e.edge(t,o),a=0;return u||(i=!1,u=e.edge(o,t)),a=u.weight,r.Z(e.nodeEdges(t),(function(r){var u,c,s=r.v===t,d=s?r.w:r.v;if(d!==o){var f=s===i,h=e.edge(r).weight;if(a+=f?h:-h,u=t,c=d,n.hasEdge(u,c)){var v=n.edge(t,d).cutvalue;a+=f?-v:v}}})),a}function Cn(n,e){arguments.length<2&&(e=n.nodes()[0]),On(n,{},1,e)}function On(n,e,t,o,u){var a=t,c=n.node(o);return e[o]=!0,r.Z(n.neighbors(o),(function(r){i.Z(e,r)||(t=On(n,e,t,r,o))})),c.low=a,c.lim=t++,u?c.parent=u:delete c.parent,t}function In(n){return cn(n.edges(),(function(e){return n.edge(e).cutvalue<0}))}function Ln(n,e,t){var r=t.v,o=t.w;e.hasEdge(r,o)||(r=t.w,o=t.v);var i=n.node(r),u=n.node(o),a=i,c=!1;i.lim>u.lim&&(a=u,c=!0);var s=dn.Z(e.edges(),(function(e){return c===Rn(0,n.node(e.v),a)&&c!==Rn(0,n.node(e.w),a)}));return K(s,(function(n){return H(e,n)}))}function Mn(n,e,t,o){var i=t.v,u=t.w;n.removeEdge(i,u),n.setEdge(o.v,o.w,{}),Cn(n),xn(n,e),function(n,e){var t=cn(n.nodes(),(function(n){return!e.node(n).parent})),o=function(n,e){return En(n,e,"pre")}(n,t);o=o.slice(1),r.Z(o,(function(t){var r=n.node(t).parent,o=e.edge(t,r),i=!1;o||(o=e.edge(r,t),i=!0),e.node(t).rank=e.node(r).rank+(i?o.minlen:-o.minlen)}))}(n,e)}function Rn(n,e,t){return t.low<=e.lim&&e.lim<=t.lim}function An(n){switch(n.graph().ranker){case"network-simplex":default:!function(n){kn(n)}(n);break;case"tight-tree":!function(n){W(n),Q(n)}(n);break;case"longest-path":Pn(n)}}RegExp(Zn+"(?="+Zn+")|"+yn+_n,"g"),new Error,t(24547),kn.initLowLimValues=Cn,kn.initCutValues=xn,kn.calcCutValue=Nn,kn.leaveEdge=In,kn.enterEdge=Ln,kn.exchangeEdges=Mn;var Pn=W;var Tn=t(88873),Sn=t(99413);function Fn(n){var e=T(n,"root",{},"_root"),t=function(n){var e={};function t(o,i){var u=n.children(o);u&&u.length&&r.Z(u,(function(n){t(n,i+1)})),e[o]=i}return r.Z(n.children(),(function(n){t(n,1)})),e}(n),o=k(Tn.Z(t))-1,i=2*o+1;n.graph().nestingRoot=e,r.Z(n.edges(),(function(e){n.edge(e).minlen*=i}));var u=function(n){return Sn.Z(n.edges(),(function(e,t){return e+n.edge(t).weight}),0)}(n)+1;r.Z(n.children(),(function(r){Dn(n,e,i,u,o,t,r)})),n.graph().nodeRankFactor=i}function Dn(n,e,t,o,i,u,a){var c=n.children(a);if(c.length){var s=B(n,"_bt"),d=B(n,"_bb"),f=n.node(a);n.setParent(s,a),f.borderTop=s,n.setParent(d,a),f.borderBottom=d,r.Z(c,(function(r){Dn(n,e,t,o,i,u,r);var c=n.node(r),f=c.borderTop?c.borderTop:r,h=c.borderBottom?c.borderBottom:r,v=c.borderTop?o:2*o,l=f!==h?1:i-u[a]+1;n.setEdge(s,f,{weight:v,minlen:l,nestingEdge:!0}),n.setEdge(h,d,{weight:v,minlen:l,nestingEdge:!0})})),n.parent(a)||n.setEdge(e,s,{weight:0,minlen:i+u[a]})}else a!==e&&n.setEdge(e,a,{weight:0,minlen:t})}var Bn=t(47853);const Gn=function(n){return(0,Bn.Z)(n,5)};var Un=t(15561);const Vn=function(n,e){return function(n,e,t){for(var r=-1,o=n.length,i=e.length,u={};++r<o;){var a=r<i?e[r]:void 0;t(u,n[r],a)}return u}(n||[],e||[],Un.Z)};var zn=t(65029),Yn=t(33043),qn=t(78402),$n=t(15521);var Jn=t(20274);const Kn=function(n,e){if(n!==e){var t=void 0!==n,r=null===n,o=n==n,i=(0,_.Z)(n),u=void 0!==e,a=null===e,c=e==e,s=(0,_.Z)(e);if(!a&&!s&&!i&&n>e||i&&u&&c&&!a&&!s||r&&u&&c||!t&&c||!o)return 1;if(!r&&!i&&!s&&n<e||s&&t&&o&&!r&&!i||a&&t&&o||!u&&o||!c)return-1}return 0},Wn=function(n,e,t){e=e.length?(0,Yn.Z)(e,(function(n){return(0,fn.Z)(n)?function(e){return(0,qn.Z)(e,1===n.length?n[0]:n)}:n})):[j.Z];var r=-1;return e=(0,Yn.Z)(e,(0,Jn.Z)(O.Z)),function(n,e){var t=n.length;for(n.sort(e);t--;)n[t]=n[t].value;return n}((0,$n.Z)(n,(function(n,t,o){return{criteria:(0,Yn.Z)(e,(function(e){return e(n)})),index:++r,value:n}})),(function(n,e){return function(n,e,t){for(var r=-1,o=n.criteria,i=e.criteria,u=o.length,a=t.length;++r<u;){var c=Kn(o[r],i[r]);if(c)return r>=a?c:c*("desc"==t[r]?-1:1)}return n.index-e.index}(n,e,t)}))};var Hn=t(99719),Qn=t(47952);const Xn=(0,Hn.Z)((function(n,e){if(null==n)return[];var t=e.length;return t>1&&(0,Qn.Z)(n,e[0],e[1])?e=[]:t>2&&(0,Qn.Z)(e[0],e[1],e[2])&&(e=[e[0]]),Wn(n,(0,zn.Z)(e,1),[])}));function ne(n,e){for(var t=0,r=1;r<e.length;++r)t+=ee(n,e[r-1],e[r]);return t}function ee(n,e,t){for(var o=Vn(t,c.Z(t,(function(n,e){return e}))),i=a.Z(c.Z(e,(function(e){return Xn(c.Z(n.outEdges(e),(function(e){return{pos:o[e.w],weight:n.edge(e).weight}})),"pos")}))),u=1;u<t.length;)u<<=1;var s=2*u-1;u-=1;var d=c.Z(new Array(s),(function(){return 0})),f=0;return r.Z(i.forEach((function(n){var e=n.pos+u;d[e]+=n.weight;for(var t=0;e>0;)e%2&&(t+=d[e+1]),d[e=e-1>>1]+=n.weight;f+=n.weight*t}))),f}function te(n,e){var t,o=function(n,e){var t={lhs:[],rhs:[]};return r.Z(n,(function(n){var e;e=n,i.Z(e,"barycenter")?t.lhs.push(n):t.rhs.push(n)})),t}(n),u=o.lhs,c=Xn(o.rhs,(function(n){return-n.i})),s=[],d=0,f=0,h=0;u.sort((t=!!e,function(n,e){return n.barycenter<e.barycenter?-1:n.barycenter>e.barycenter?1:t?e.i-n.i:n.i-e.i})),h=re(s,c,h),r.Z(u,(function(n){h+=n.vs.length,s.push(n.vs),d+=n.barycenter*n.weight,f+=n.weight,h=re(s,c,h)}));var v={vs:a.Z(s)};return f&&(v.barycenter=d/f,v.weight=f),v}function re(n,e,t){for(var r;e.length&&(r=x(e)).i<=t;)e.pop(),n.push(r.vs),t++;return t}function oe(n,e,t,o){var u=n.children(e),s=n.node(e),d=s?s.borderLeft:void 0,f=s?s.borderRight:void 0,h={};d&&(u=dn.Z(u,(function(n){return n!==d&&n!==f})));var v=function(n,e){return c.Z(e,(function(e){var t=n.inEdges(e);if(t.length){var r=Sn.Z(t,(function(e,t){var r=n.edge(t),o=n.node(t.v);return{sum:e.sum+r.weight*o.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))}(n,u);r.Z(v,(function(e){if(n.children(e.v).length){var r=oe(n,e.v,t,o);h[e.v]=r,i.Z(r,"barycenter")&&(u=e,a=r,L.Z(u.barycenter)?(u.barycenter=a.barycenter,u.weight=a.weight):(u.barycenter=(u.barycenter*u.weight+a.barycenter*a.weight)/(u.weight+a.weight),u.weight+=a.weight))}var u,a}));var l=function(n,e){var t={};return r.Z(n,(function(n,e){var r=t[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:e};L.Z(n.barycenter)||(r.barycenter=n.barycenter,r.weight=n.weight)})),r.Z(e.edges(),(function(n){var e=t[n.v],r=t[n.w];L.Z(e)||L.Z(r)||(r.indegree++,e.out.push(t[n.w]))})),function(n){var e=[];function t(n){return function(e){var t,r,o,i;e.merged||(L.Z(e.barycenter)||L.Z(n.barycenter)||e.barycenter>=n.barycenter)&&(r=e,o=0,i=0,(t=n).weight&&(o+=t.barycenter*t.weight,i+=t.weight),r.weight&&(o+=r.barycenter*r.weight,i+=r.weight),t.vs=r.vs.concat(t.vs),t.barycenter=o/i,t.weight=i,t.i=Math.min(r.i,t.i),r.merged=!0)}}function o(e){return function(t){t.in.push(e),0==--t.indegree&&n.push(t)}}for(;n.length;){var i=n.pop();e.push(i),r.Z(i.in.reverse(),t(i)),r.Z(i.out,o(i))}return c.Z(dn.Z(e,(function(n){return!n.merged})),(function(n){return w.Z(n,["vs","i","barycenter","weight"])}))}(dn.Z(t,(function(n){return!n.indegree})))}(v,t);!function(n,e){r.Z(n,(function(n){n.vs=a.Z(n.vs.map((function(n){return e[n]?e[n].vs:n})))}))}(l,h);var Z=te(l,o);if(d&&(Z.vs=a.Z([d,Z.vs,f]),n.predecessors(d).length)){var g=n.node(n.predecessors(d)[0]),p=n.node(n.predecessors(f)[0]);i.Z(Z,"barycenter")||(Z.barycenter=0,Z.weight=0),Z.barycenter=(Z.barycenter*Z.weight+g.order+p.order)/(Z.weight+2),Z.weight+=2}return Z}function ie(n,e,t){return c.Z(e,(function(e){return function(n,e,t){var u=function(n){for(var e;n.hasNode(e=o.Z("_root")););return e}(n),a=new d.k({compound:!0}).setGraph({root:u}).setDefaultNodeLabel((function(e){return n.node(e)}));return r.Z(n.nodes(),(function(o){var c=n.node(o),s=n.parent(o);(c.rank===e||c.minRank<=e&&e<=c.maxRank)&&(a.setNode(o),a.setParent(o,s||u),r.Z(n[t](o),(function(e){var t=e.v===o?e.w:e.v,r=a.edge(t,o),i=L.Z(r)?0:r.weight;a.setEdge(t,o,{weight:n.edge(e).weight+i})})),i.Z(c,"minRank")&&a.setNode(o,{borderLeft:c.borderLeft[e],borderRight:c.borderRight[e]}))})),a}(n,e,t)}))}function ue(n,e){var t=new d.k;r.Z(n,(function(n){var o=n.graph().root,i=oe(n,o,t,e);r.Z(i.vs,(function(e,t){n.node(e).order=t})),function(n,e,t){var o,i={};r.Z(t,(function(t){for(var r,u,a=n.parent(t);a;){if((r=n.parent(a))?(u=i[r],i[r]=a):(u=o,o=a),u&&u!==a)return void e.setEdge(u,a);a=r}}))}(n,t,i.vs)}))}function ae(n,e){r.Z(e,(function(e){r.Z(e,(function(e,t){n.node(e).order=t}))}))}var ce=t(87073);const se=function(n,e){return n&&(0,C.Z)(n,(0,ce.Z)(e))};var de=t(49399),fe=t(48441);const he=function(n,e){return null==n?n:(0,de.Z)(n,(0,ce.Z)(e),fe.Z)};function ve(n,e,t){if(e>t){var r=e;e=t,t=r}var o=n[e];o||(n[e]=o={}),o[t]=!0}function le(n,e,t){if(e>t){var r=e;e=t,t=r}return i.Z(n[e],t)}function Ze(n){var e,t=D(n),o=b.Z(function(n,e){var t={};return Sn.Z(e,(function(e,o){var i=0,u=0,a=e.length,c=x(o);return r.Z(o,(function(e,s){var d=function(n,e){if(n.node(e).dummy)return cn(n.predecessors(e),(function(e){return n.node(e).dummy}))}(n,e),f=d?n.node(d).order:a;(d||e===c)&&(r.Z(o.slice(u,s+1),(function(e){r.Z(n.predecessors(e),(function(r){var o=n.node(r),u=o.order;!(u<i||f<u)||o.dummy&&n.node(e).dummy||ve(t,r,e)}))})),u=s+1,i=f)})),o})),t}(n,t),function(n,e){var t={};function o(e,o,i,u,a){var c;r.Z(s.Z(o,i),(function(o){c=e[o],n.node(c).dummy&&r.Z(n.predecessors(c),(function(e){var r=n.node(e);r.dummy&&(r.order<u||r.order>a)&&ve(t,e,c)}))}))}return Sn.Z(e,(function(e,t){var i,u=-1,a=0;return r.Z(t,(function(r,c){if("border"===n.node(r).dummy){var s=n.predecessors(r);s.length&&(i=n.node(s[0]).order,o(t,a,c,u,i),a=c,u=i)}o(t,a,t.length,i,e.length)})),t})),t}(n,t)),u={};r.Z(["u","d"],(function(a){e="u"===a?t:Tn.Z(t).reverse(),r.Z(["l","r"],(function(t){"r"===t&&(e=c.Z(e,(function(n){return Tn.Z(n).reverse()})));var s=("u"===a?n.predecessors:n.successors).bind(n),f=function(n,e,t,o){var i={},u={},a={};return r.Z(e,(function(n){r.Z(n,(function(n,e){i[n]=n,u[n]=n,a[n]=e}))})),r.Z(e,(function(n){var e=-1;r.Z(n,(function(n){var r=o(n);if(r.length){r=Xn(r,(function(n){return a[n]}));for(var c=(r.length-1)/2,s=Math.floor(c),d=Math.ceil(c);s<=d;++s){var f=r[s];u[n]===n&&e<a[f]&&!le(t,n,f)&&(u[f]=n,u[n]=i[n]=i[f],e=a[f])}}}))})),{root:i,align:u}}(0,e,o,s),h=function(n,e,t,o,u){var a={},c=function(n,e,t,o){var u=new d.k,a=n.graph(),c=function(n,e,t){return function(r,o,u){var a,c=r.node(o),s=r.node(u),d=0;if(d+=c.width/2,i.Z(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":a=-c.width/2;break;case"r":a=c.width/2}if(a&&(d+=t?a:-a),a=0,d+=(c.dummy?e:n)/2,d+=(s.dummy?e:n)/2,d+=s.width/2,i.Z(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=s.width/2;break;case"r":a=-s.width/2}return a&&(d+=t?a:-a),a=0,d}}(a.nodesep,a.edgesep,o);return r.Z(e,(function(e){var o;r.Z(e,(function(e){var r=t[e];if(u.setNode(r),o){var i=t[o],a=u.edge(i,r);u.setEdge(i,r,Math.max(c(n,e,o),a||0))}o=e}))})),u}(n,e,t,u),s=u?"borderLeft":"borderRight";function f(n,e){for(var t=c.nodes(),r=t.pop(),o={};r;)o[r]?n(r):(o[r]=!0,t.push(r),t=t.concat(e(r))),r=t.pop()}return f((function(n){a[n]=c.inEdges(n).reduce((function(n,e){return Math.max(n,a[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),f((function(e){var t=c.outEdges(e).reduce((function(n,e){return Math.min(n,a[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=n.node(e);t!==Number.POSITIVE_INFINITY&&r.borderType!==s&&(a[e]=Math.max(a[e],t))}),c.successors.bind(c)),r.Z(o,(function(n){a[n]=a[t[n]]})),a}(n,e,f.root,f.align,"r"===t);"r"===t&&(h=I(h,(function(n){return-n}))),u[a+t]=h}))}));var a=function(n,e){return K(Tn.Z(e),(function(e){var t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return he(e,(function(e,o){var i=function(n,e){return n.node(e).width}(n,o)/2;t=Math.max(e+i,t),r=Math.min(e-i,r)})),t-r}))}(n,u);return function(n,e){var t=Tn.Z(e),o=R(t),i=k(t);r.Z(["u","d"],(function(t){r.Z(["l","r"],(function(r){var u,a=t+r,c=n[a];if(c!==e){var s=Tn.Z(c);(u="l"===r?o-R(s):i-k(s))&&(n[a]=I(c,(function(n){return n+u})))}}))}))}(u,a),function(n,e){return I(n.ul,(function(t,r){if(e)return n[e.toLowerCase()][r];var o=Xn(c.Z(n,r));return(o[1]+o[2])/2}))}(u,n.graph().align)}function ge(n,e){var t=e&&e.debugTiming?U:V;t("layout",(function(){var e=t(" buildLayoutGraph",(function(){return function(n){var e=new d.k({multigraph:!0,compound:!0}),t=xe(n.graph());return e.setGraph(b.Z({},be,ke(t,pe),w.Z(t,we))),r.Z(n.nodes(),(function(t){var r=xe(n.node(t));e.setNode(t,m.Z(ke(r,me),_e)),e.setParent(t,n.parent(t))})),r.Z(n.edges(),(function(t){var r=xe(n.edge(t));e.setEdge(t,b.Z({},Ee,ke(r,ye),w.Z(r,je)))})),e}(n)}));t(" runLayout",(function(){!function(n,e){e(" makeSpaceForEdgeLabels",(function(){!function(n){var e=n.graph();e.ranksep/=2,r.Z(n.edges(),(function(t){var r=n.edge(t);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(n)})),e(" removeSelfEdges",(function(){!function(n){r.Z(n.edges(),(function(e){if(e.v===e.w){var t=n.node(e.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e,label:n.edge(e)}),n.removeEdge(e)}}))}(n)})),e(" acyclic",(function(){p(n)})),e(" nestingGraph.run",(function(){Fn(n)})),e(" rank",(function(){An(S(n))})),e(" injectEdgeLabelProxies",(function(){!function(n){r.Z(n.edges(),(function(e){var t=n.edge(e);if(t.width&&t.height){var r=n.node(e.v),o={rank:(n.node(e.w).rank-r.rank)/2+r.rank,e};T(n,"edge-proxy",o,"_ep")}}))}(n)})),e(" removeEmptyRanks",(function(){!function(n){var e=R(c.Z(n.nodes(),(function(e){return n.node(e).rank}))),t=[];r.Z(n.nodes(),(function(r){var o=n.node(r).rank-e;t[o]||(t[o]=[]),t[o].push(r)}));var o=0,i=n.graph().nodeRankFactor;r.Z(t,(function(e,t){L.Z(e)&&t%i!=0?--o:o&&r.Z(e,(function(e){n.node(e).rank+=o}))}))}(n)})),e(" nestingGraph.cleanup",(function(){!function(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,r.Z(n.edges(),(function(e){n.edge(e).nestingEdge&&n.removeEdge(e)}))}(n)})),e(" normalizeRanks",(function(){!function(n){var e=R(c.Z(n.nodes(),(function(e){return n.node(e).rank})));r.Z(n.nodes(),(function(t){var r=n.node(t);i.Z(r,"rank")&&(r.rank-=e)}))}(n)})),e(" assignRankMinMax",(function(){!function(n){var e=0;r.Z(n.nodes(),(function(t){var r=n.node(t);r.borderTop&&(r.minRank=n.node(r.borderTop).rank,r.maxRank=n.node(r.borderBottom).rank,e=k(e,r.maxRank))})),n.graph().maxRank=e}(n)})),e(" removeEdgeLabelProxies",(function(){!function(n){r.Z(n.nodes(),(function(e){var t=n.node(e);"edge-proxy"===t.dummy&&(n.edge(t.e).labelRank=t.rank,n.removeNode(e))}))}(n)})),e(" normalize.run",(function(){!function(n){n.graph().dummyChains=[],r.Z(n.edges(),(function(e){!function(n,e){var t,r,o,i=e.v,u=n.node(i).rank,a=e.w,c=n.node(a).rank,s=e.name,d=n.edge(e),f=d.labelRank;if(c!==u+1){for(n.removeEdge(e),o=0,++u;u<c;++o,++u)d.points=[],t=T(n,"edge",r={width:0,height:0,edgeLabel:d,edgeObj:e,rank:u},"_d"),u===f&&(r.width=d.width,r.height=d.height,r.dummy="edge-label",r.labelpos=d.labelpos),n.setEdge(i,t,{weight:d.weight},s),0===o&&n.graph().dummyChains.push(t),i=t;n.setEdge(i,a,{weight:d.weight},s)}}(n,e)}))}(n)})),e(" parentDummyChains",(function(){!function(n){var e=function(n){var e={},t=0;return r.Z(n.children(),(function o(i){var u=t;r.Z(n.children(i),o),e[i]={low:u,lim:t++}})),e}(n);r.Z(n.graph().dummyChains,(function(t){for(var r=n.node(t),o=r.edgeObj,i=function(n,e,t,r){var o,i,u=[],a=[],c=Math.min(e[t].low,e[r].low),s=Math.max(e[t].lim,e[r].lim);o=t;do{o=n.parent(o),u.push(o)}while(o&&(e[o].low>c||s>e[o].lim));for(i=o,o=r;(o=n.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(n,e,o.v,o.w),u=i.path,a=i.lca,c=0,s=u[c],d=!0;t!==o.w;){if(r=n.node(t),d){for(;(s=u[c])!==a&&n.node(s).maxRank<r.rank;)c++;s===a&&(d=!1)}if(!d){for(;c<u.length-1&&n.node(s=u[c+1]).minRank<=r.rank;)c++;s=u[c]}n.setParent(t,s),t=n.successors(t)[0]}}))}(n)})),e(" addBorderSegments",(function(){!function(n){r.Z(n.children(),(function e(t){var o=n.children(t),u=n.node(t);if(o.length&&r.Z(o,e),i.Z(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var a=u.minRank,c=u.maxRank+1;a<c;++a)z(n,"borderLeft","_bl",t,u,a),z(n,"borderRight","_br",t,u,a)}}))}(n)})),e(" order",(function(){!function(n){var e=G(n),t=ie(n,s.Z(1,e+1),"inEdges"),o=ie(n,s.Z(e-1,-1,-1),"outEdges"),u=function(n){var e={},t=dn.Z(n.nodes(),(function(e){return!n.children(e).length})),o=k(c.Z(t,(function(e){return n.node(e).rank}))),u=c.Z(s.Z(o+1),(function(){return[]})),a=Xn(t,(function(e){return n.node(e).rank}));return r.Z(a,(function t(o){if(!i.Z(e,o)){e[o]=!0;var a=n.node(o);u[a.rank].push(o),r.Z(n.successors(o),t)}})),u}(n);ae(n,u);for(var a,d=Number.POSITIVE_INFINITY,f=0,h=0;h<4;++f,++h){ue(f%2?t:o,f%4>=2);var v=ne(n,u=D(n));v<d&&(h=0,a=Gn(u),d=v)}ae(n,a)}(n)})),e(" insertSelfEdges",(function(){!function(n){var e=D(n);r.Z(e,(function(e){var t=0;r.Z(e,(function(e,o){var i=n.node(e);i.order=o+t,r.Z(i.selfEdges,(function(e){T(n,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:o+ ++t,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}(n)})),e(" adjustCoordinateSystem",(function(){!function(n){var e=n.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||Y(n)}(n)})),e(" position",(function(){!function(n){(function(n){var e=D(n),t=n.graph().ranksep,o=0;r.Z(e,(function(e){var i=k(c.Z(e,(function(e){return n.node(e).height})));r.Z(e,(function(e){n.node(e).y=o+i/2})),o+=i+t}))})(n=S(n)),se(Ze(n),(function(e,t){n.node(t).x=e}))}(n)})),e(" positionSelfEdges",(function(){!function(n){r.Z(n.nodes(),(function(e){var t=n.node(e);if("selfedge"===t.dummy){var r=n.node(t.e.v),o=r.x+r.width/2,i=r.y,u=t.x-o,a=r.height/2;n.setEdge(t.e,t.label),n.removeNode(e),t.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],t.label.x=t.x,t.label.y=t.y}}))}(n)})),e(" removeBorderNodes",(function(){!function(n){r.Z(n.nodes(),(function(e){if(n.children(e).length){var t=n.node(e),r=n.node(t.borderTop),o=n.node(t.borderBottom),i=n.node(x(t.borderLeft)),u=n.node(x(t.borderRight));t.width=Math.abs(u.x-i.x),t.height=Math.abs(o.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}})),r.Z(n.nodes(),(function(e){"border"===n.node(e).dummy&&n.removeNode(e)}))}(n)})),e(" normalize.undo",(function(){!function(n){r.Z(n.graph().dummyChains,(function(e){var t,r=n.node(e),o=r.edgeLabel;for(n.setEdge(r.edgeObj,o);r.dummy;)t=n.successors(e)[0],n.removeNode(e),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),e=t,r=n.node(e)}))}(n)})),e(" fixupEdgeLabelCoords",(function(){!function(n){r.Z(n.edges(),(function(e){var t=n.edge(e);if(i.Z(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}}))}(n)})),e(" undoCoordinateSystem",(function(){!function(n){var e=n.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(n){r.Z(n.nodes(),(function(e){$(n.node(e))})),r.Z(n.edges(),(function(e){var t=n.edge(e);r.Z(t.points,$),i.Z(t,"y")&&$(t)}))}(n),"lr"!==e&&"rl"!==e||(function(n){r.Z(n.nodes(),(function(e){J(n.node(e))})),r.Z(n.edges(),(function(e){var t=n.edge(e);r.Z(t.points,J),i.Z(t,"x")&&J(t)}))}(n),Y(n))}(n)})),e(" translateGraph",(function(){!function(n){var e=Number.POSITIVE_INFINITY,t=0,o=Number.POSITIVE_INFINITY,u=0,a=n.graph(),c=a.marginx||0,s=a.marginy||0;function d(n){var r=n.x,i=n.y,a=n.width,c=n.height;e=Math.min(e,r-a/2),t=Math.max(t,r+a/2),o=Math.min(o,i-c/2),u=Math.max(u,i+c/2)}r.Z(n.nodes(),(function(e){d(n.node(e))})),r.Z(n.edges(),(function(e){var t=n.edge(e);i.Z(t,"x")&&d(t)})),e-=c,o-=s,r.Z(n.nodes(),(function(t){var r=n.node(t);r.x-=e,r.y-=o})),r.Z(n.edges(),(function(t){var u=n.edge(t);r.Z(u.points,(function(n){n.x-=e,n.y-=o})),i.Z(u,"x")&&(u.x-=e),i.Z(u,"y")&&(u.y-=o)})),a.width=t-e+c,a.height=u-o+s}(n)})),e(" assignNodeIntersects",(function(){!function(n){r.Z(n.edges(),(function(e){var t,r,o=n.edge(e),i=n.node(e.v),u=n.node(e.w);o.points?(t=o.points[0],r=o.points[o.points.length-1]):(o.points=[],t=u,r=i),o.points.unshift(F(i,t)),o.points.push(F(u,r))}))}(n)})),e(" reversePoints",(function(){!function(n){r.Z(n.edges(),(function(e){var t=n.edge(e);t.reversed&&t.points.reverse()}))}(n)})),e(" acyclic.undo",(function(){!function(n){r.Z(n.edges(),(function(e){var t=n.edge(e);if(t.reversed){n.removeEdge(e);var r=t.forwardName;delete t.reversed,delete t.forwardName,n.setEdge(e.w,e.v,t,r)}}))}(n)}))}(e,t)})),t(" updateInputGraph",(function(){!function(n,e){r.Z(n.nodes(),(function(t){var r=n.node(t),o=e.node(t);r&&(r.x=o.x,r.y=o.y,e.children(t).length&&(r.width=o.width,r.height=o.height))})),r.Z(n.edges(),(function(t){var r=n.edge(t),o=e.edge(t);r.points=o.points,i.Z(o,"x")&&(r.x=o.x,r.y=o.y)})),n.graph().width=e.graph().width,n.graph().height=e.graph().height}(n,e)}))}))}var pe=["nodesep","edgesep","ranksep","marginx","marginy"],be={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},we=["acyclicer","ranker","rankdir","align"],me=["width","height"],_e={width:0,height:0},ye=["minlen","weight","width","height","labeloffset"],Ee={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},je=["labelpos"];function ke(n,e){return I(w.Z(n,e),Number)}function xe(n){var e={};return r.Z(n,(function(n,t){e[t.toLowerCase()]=n})),e}},24547:(n,e,t)=>{t.d(e,{k:()=>I});var r=t(36004),o=t(78795),i=t(48489),u=t(11723),a=t(35090),c=t(66400),s=t(21845),d=t(52307),f=t(65029),h=t(99719),v=t(40105),l=t(9872);const Z=function(n){return n!=n},g=function(n,e){return!(null==n||!n.length)&&function(n,e,t){return e==e?function(n,e,t){for(var r=t-1,o=n.length;++r<o;)if(n[r]===e)return r;return-1}(n,e,t):(0,l.Z)(n,Z,t)}(n,e,0)>-1},p=function(n,e,t){for(var r=-1,o=null==n?0:n.length;++r<o;)if(t(e,n[r]))return!0;return!1};var b=t(8142),w=t(16889);var m=t(70035),_=w.Z&&1/(0,m.Z)(new w.Z([,-0]))[1]==1/0?function(n){return new w.Z(n)}:function(){};const y=_;var E=t(60492);const j=(0,h.Z)((function(n){return function(n,e,t){var r=-1,o=g,i=n.length,u=!0,a=[],c=a;if(t)u=!1,o=p;else if(i>=200){var s=e?null:y(n);if(s)return(0,m.Z)(s);u=!1,o=b.Z,c=new v.Z}else c=e?[]:a;n:for(;++r<i;){var d=n[r],f=e?e(d):d;if(d=t||0!==d?d:0,u&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue n;e&&c.push(f),a.push(d)}else o(c,f,t)||(c!==a&&c.push(f),a.push(d))}return a}((0,f.Z)(n,1,E.Z,!0))}));var k=t(88873),x=t(99413),N="\0",C="\0",O="";class I{constructor(n={}){this._isDirected=!r.Z(n,"directed")||n.directed,this._isMultigraph=!!r.Z(n,"multigraph")&&n.multigraph,this._isCompound=!!r.Z(n,"compound")&&n.compound,this._label=void 0,this._defaultNodeLabelFn=o.Z(void 0),this._defaultEdgeLabelFn=o.Z(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[C]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(n){return this._label=n,this}graph(){return this._label}setDefaultNodeLabel(n){return i.Z(n)||(n=o.Z(n)),this._defaultNodeLabelFn=n,this}nodeCount(){return this._nodeCount}nodes(){return u.Z(this._nodes)}sources(){var n=this;return a.Z(this.nodes(),(function(e){return c.Z(n._in[e])}))}sinks(){var n=this;return a.Z(this.nodes(),(function(e){return c.Z(n._out[e])}))}setNodes(n,e){var t=arguments,r=this;return s.Z(n,(function(n){t.length>1?r.setNode(n,e):r.setNode(n)})),this}setNode(n,e){return r.Z(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=e),this):(this._nodes[n]=arguments.length>1?e:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=C,this._children[n]={},this._children[C][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)}node(n){return this._nodes[n]}hasNode(n){return r.Z(this._nodes,n)}removeNode(n){var e=this;if(r.Z(this._nodes,n)){var t=function(n){e.removeEdge(e._edgeObjs[n])};delete this._nodes[n],this._isCompound&&(this._removeFromParentsChildList(n),delete this._parent[n],s.Z(this.children(n),(function(n){e.setParent(n)})),delete this._children[n]),s.Z(u.Z(this._in[n]),t),delete this._in[n],delete this._preds[n],s.Z(u.Z(this._out[n]),t),delete this._out[n],delete this._sucs[n],--this._nodeCount}return this}setParent(n,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(d.Z(e))e=C;else{for(var t=e+="";!d.Z(t);t=this.parent(t))if(t===n)throw new Error("Setting "+e+" as parent of "+n+" would create a cycle");this.setNode(e)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=e,this._children[e][n]=!0,this}_removeFromParentsChildList(n){delete this._children[this._parent[n]][n]}parent(n){if(this._isCompound){var e=this._parent[n];if(e!==C)return e}}children(n){if(d.Z(n)&&(n=C),this._isCompound){var e=this._children[n];if(e)return u.Z(e)}else{if(n===C)return this.nodes();if(this.hasNode(n))return[]}}predecessors(n){var e=this._preds[n];if(e)return u.Z(e)}successors(n){var e=this._sucs[n];if(e)return u.Z(e)}neighbors(n){var e=this.predecessors(n);if(e)return j(e,this.successors(n))}isLeaf(n){return 0===(this.isDirected()?this.successors(n):this.neighbors(n)).length}filterNodes(n){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var t=this;s.Z(this._nodes,(function(t,r){n(r)&&e.setNode(r,t)})),s.Z(this._edgeObjs,(function(n){e.hasNode(n.v)&&e.hasNode(n.w)&&e.setEdge(n,t.edge(n))}));var r={};function o(n){var i=t.parent(n);return void 0===i||e.hasNode(i)?(r[n]=i,i):i in r?r[i]:o(i)}return this._isCompound&&s.Z(e.nodes(),(function(n){e.setParent(n,o(n))})),e}setDefaultEdgeLabel(n){return i.Z(n)||(n=o.Z(n)),this._defaultEdgeLabelFn=n,this}edgeCount(){return this._edgeCount}edges(){return k.Z(this._edgeObjs)}setPath(n,e){var t=this,r=arguments;return x.Z(n,(function(n,o){return r.length>1?t.setEdge(n,o,e):t.setEdge(n,o),o})),this}setEdge(){var n,e,t,o,i=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(n=u.v,e=u.w,t=u.name,2===arguments.length&&(o=arguments[1],i=!0)):(n=u,e=arguments[1],t=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),n=""+n,e=""+e,d.Z(t)||(t=""+t);var a=R(this._isDirected,n,e,t);if(r.Z(this._edgeLabels,a))return i&&(this._edgeLabels[a]=o),this;if(!d.Z(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(e),this._edgeLabels[a]=i?o:this._defaultEdgeLabelFn(n,e,t);var c=function(n,e,t,r){var o=""+e,i=""+t;if(!n&&o>i){var u=o;o=i,i=u}var a={v:o,w:i};return r&&(a.name=r),a}(this._isDirected,n,e,t);return n=c.v,e=c.w,Object.freeze(c),this._edgeObjs[a]=c,L(this._preds[e],n),L(this._sucs[n],e),this._in[e][a]=c,this._out[n][a]=c,this._edgeCount++,this}edge(n,e,t){var r=1===arguments.length?A(this._isDirected,arguments[0]):R(this._isDirected,n,e,t);return this._edgeLabels[r]}hasEdge(n,e,t){var o=1===arguments.length?A(this._isDirected,arguments[0]):R(this._isDirected,n,e,t);return r.Z(this._edgeLabels,o)}removeEdge(n,e,t){var r=1===arguments.length?A(this._isDirected,arguments[0]):R(this._isDirected,n,e,t),o=this._edgeObjs[r];return o&&(n=o.v,e=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],M(this._preds[e],n),M(this._sucs[n],e),delete this._in[e][r],delete this._out[n][r],this._edgeCount--),this}inEdges(n,e){var t=this._in[n];if(t){var r=k.Z(t);return e?a.Z(r,(function(n){return n.v===e})):r}}outEdges(n,e){var t=this._out[n];if(t){var r=k.Z(t);return e?a.Z(r,(function(n){return n.w===e})):r}}nodeEdges(n,e){var t=this.inEdges(n,e);if(t)return t.concat(this.outEdges(n,e))}}function L(n,e){n[e]?n[e]++:n[e]=1}function M(n,e){--n[e]||delete n[e]}function R(n,e,t,r){var o=""+e,i=""+t;if(!n&&o>i){var u=o;o=i,i=u}return o+O+i+O+(d.Z(r)?N:r)}function A(n,e){return R(n,e.v,e.w,e.name)}I.prototype._nodeCount=0,I.prototype._edgeCount=0},67406:(n,e,t)=>{t.d(e,{k:()=>r.k});var r=t(24547)},40105:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(24395);function o(n){var e=-1,t=null==n?0:n.length;for(this.__data__=new r.Z;++e<t;)this.add(n[e])}o.prototype.add=o.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},o.prototype.has=function(n){return this.__data__.has(n)};const i=o},97640:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){for(var t=-1,r=null==n?0:n.length;++t<r&&!1!==e(n[t],t,n););return n}},11819:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){for(var t=-1,r=null==n?0:n.length,o=0,i=[];++t<r;){var u=n[t];e(u,t,n)&&(i[o++]=u)}return i}},33043:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){for(var t=-1,r=null==n?0:n.length,o=Array(r);++t<r;)o[t]=e(n[t],t,n);return o}},47032:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){for(var t=-1,r=e.length,o=n.length;++t<r;)n[o+t]=e[t];return n}},47853:(n,e,t)=>{t.d(e,{Z:()=>V});var r=t(82948),o=t(97640),i=t(15561),u=t(47313),a=t(11723);var c=t(48441);var s=t(64405),d=t(93580),f=t(96346);var h=t(47032),v=t(72784),l=t(99176);const Z=Object.getOwnPropertySymbols?function(n){for(var e=[];n;)(0,h.Z)(e,(0,f.Z)(n)),n=(0,v.Z)(n);return e}:l.Z;var g=t(13911),p=t(47769);const b=function(n){return(0,p.Z)(n,c.Z,Z)};var w=t(41182),m=Object.prototype.hasOwnProperty;var _=t(52049);var y=/\w*$/;var E=t(91642),j=E.Z?E.Z.prototype:void 0,k=j?j.valueOf:void 0;var x=t(61601);const N=function(n,e,t){var r,o,i,u=n.constructor;switch(e){case"[object ArrayBuffer]":return(0,_.Z)(n);case"[object Boolean]":case"[object Date]":return new u(+n);case"[object DataView]":return function(n,e){var t=e?(0,_.Z)(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}(n,t);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(0,x.Z)(n,t);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(n);case"[object RegExp]":return(i=new(o=n).constructor(o.source,y.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return r=n,k?Object(k.call(r)):{}}};var C=t(95764),O=t(64058),I=t(23230),L=t(9615);var M=t(20274),R=t(53594),A=R.Z&&R.Z.isMap;const P=A?(0,M.Z)(A):function(n){return(0,L.Z)(n)&&"[object Map]"==(0,w.Z)(n)};var T=t(60417);var S=R.Z&&R.Z.isSet;const F=S?(0,M.Z)(S):function(n){return(0,L.Z)(n)&&"[object Set]"==(0,w.Z)(n)};var D="[object Arguments]",B="[object Function]",G="[object Object]",U={};U[D]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U[G]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U[B]=U["[object WeakMap]"]=!1;const V=function n(e,t,h,v,l,p){var _,y=1&t,E=2&t,j=4&t;if(h&&(_=l?h(e,v,l,p):h(e)),void 0!==_)return _;if(!(0,T.Z)(e))return e;var k=(0,O.Z)(e);if(k){if(_=function(n){var e=n.length,t=new n.constructor(e);return e&&"string"==typeof n[0]&&m.call(n,"index")&&(t.index=n.index,t.input=n.input),t}(e),!y)return(0,d.Z)(e,_)}else{var x=(0,w.Z)(e),L=x==B||"[object GeneratorFunction]"==x;if((0,I.Z)(e))return(0,s.Z)(e,y);if(x==G||x==D||L&&!l){if(_=E||L?{}:(0,C.Z)(e),!y)return E?function(n,e){return(0,u.Z)(n,Z(n),e)}(e,function(n,e){return n&&(0,u.Z)(e,(0,c.Z)(e),n)}(_,e)):function(n,e){return(0,u.Z)(n,(0,f.Z)(n),e)}(e,function(n,e){return n&&(0,u.Z)(e,(0,a.Z)(e),n)}(_,e))}else{if(!U[x])return l?e:{};_=N(e,x,y)}}p||(p=new r.Z);var M=p.get(e);if(M)return M;p.set(e,_),F(e)?e.forEach((function(r){_.add(n(r,t,h,r,e,p))})):P(e)&&e.forEach((function(r,o){_.set(o,n(r,t,h,o,e,p))}));var R=j?E?b:g.Z:E?c.Z:a.Z,A=k?void 0:R(e);return(0,o.Z)(A||e,(function(r,o){A&&(r=e[o=r]),(0,i.Z)(_,o,n(r,t,h,o,e,p))})),_}},77201:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(6202),o=t(69959);const i=(u=r.Z,function(n,e){if(null==n)return n;if(!(0,o.Z)(n))return u(n,e);for(var t=n.length,r=-1,i=Object(n);++r<t&&!1!==e(i[r],r,i););return n});var u},9872:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e,t,r){for(var o=n.length,i=t+(r?1:-1);r?i--:++i<o;)if(e(n[i],i,n))return i;return-1}},65029:(n,e,t)=>{t.d(e,{Z:()=>s});var r=t(47032),o=t(91642),i=t(9028),u=t(64058),a=o.Z?o.Z.isConcatSpreadable:void 0;const c=function(n){return(0,u.Z)(n)||(0,i.Z)(n)||!!(a&&n&&n[a])},s=function n(e,t,o,i,u){var a=-1,s=e.length;for(o||(o=c),u||(u=[]);++a<s;){var d=e[a];t>0&&o(d)?t>1?n(d,t-1,o,i,u):(0,r.Z)(u,d):i||(u[u.length]=d)}return u}},6202:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(49399),o=t(11723);const i=function(n,e){return n&&(0,r.Z)(n,e,o.Z)}},78402:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(94022),o=t(13550);const i=function(n,e){for(var t=0,i=(e=(0,r.Z)(e,n)).length;null!=n&&t<i;)n=n[(0,o.Z)(e[t++])];return t&&t==i?n:void 0}},47769:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(47032),o=t(64058);const i=function(n,e,t){var i=e(n);return(0,o.Z)(n)?i:(0,r.Z)(i,t(n))}},11097:(n,e,t)=>{t.d(e,{Z:()=>G});var r=t(82948),o=t(40105);const i=function(n,e){for(var t=-1,r=null==n?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1};var u=t(8142);const a=function(n,e,t,r,a,c){var s=1&t,d=n.length,f=e.length;if(d!=f&&!(s&&f>d))return!1;var h=c.get(n),v=c.get(e);if(h&&v)return h==e&&v==n;var l=-1,Z=!0,g=2&t?new o.Z:void 0;for(c.set(n,e),c.set(e,n);++l<d;){var p=n[l],b=e[l];if(r)var w=s?r(b,p,l,e,n,c):r(p,b,l,n,e,c);if(void 0!==w){if(w)continue;Z=!1;break}if(g){if(!i(e,(function(n,e){if(!(0,u.Z)(g,e)&&(p===n||a(p,n,t,r,c)))return g.push(e)}))){Z=!1;break}}else if(p!==b&&!a(p,b,t,r,c)){Z=!1;break}}return c.delete(n),c.delete(e),Z};var c=t(91642),s=t(41049),d=t(35050);const f=function(n){var e=-1,t=Array(n.size);return n.forEach((function(n,r){t[++e]=[r,n]})),t};var h=t(70035),v=c.Z?c.Z.prototype:void 0,l=v?v.valueOf:void 0;var Z=t(13911),g=Object.prototype.hasOwnProperty;var p=t(41182),b=t(64058),w=t(23230),m=t(14923),_="[object Arguments]",y="[object Array]",E="[object Object]",j=Object.prototype.hasOwnProperty;const k=function(n,e,t,o,i,u){var c=(0,b.Z)(n),v=(0,b.Z)(e),k=c?y:(0,p.Z)(n),x=v?y:(0,p.Z)(e),N=(k=k==_?E:k)==E,C=(x=x==_?E:x)==E,O=k==x;if(O&&(0,w.Z)(n)){if(!(0,w.Z)(e))return!1;c=!0,N=!1}if(O&&!N)return u||(u=new r.Z),c||(0,m.Z)(n)?a(n,e,t,o,i,u):function(n,e,t,r,o,i,u){switch(t){case"[object DataView]":if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(n.byteLength!=e.byteLength||!i(new s.Z(n),new s.Z(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,d.Z)(+n,+e);case"[object Error]":return n.name==e.name&&n.message==e.message;case"[object RegExp]":case"[object String]":return n==e+"";case"[object Map]":var c=f;case"[object Set]":var v=1&r;if(c||(c=h.Z),n.size!=e.size&&!v)return!1;var Z=u.get(n);if(Z)return Z==e;r|=2,u.set(n,e);var g=a(c(n),c(e),r,o,i,u);return u.delete(n),g;case"[object Symbol]":if(l)return l.call(n)==l.call(e)}return!1}(n,e,k,t,o,i,u);if(!(1&t)){var I=N&&j.call(n,"__wrapped__"),L=C&&j.call(e,"__wrapped__");if(I||L){var M=I?n.value():n,R=L?e.value():e;return u||(u=new r.Z),i(M,R,t,o,u)}}return!!O&&(u||(u=new r.Z),function(n,e,t,r,o,i){var u=1&t,a=(0,Z.Z)(n),c=a.length;if(c!=(0,Z.Z)(e).length&&!u)return!1;for(var s=c;s--;){var d=a[s];if(!(u?d in e:g.call(e,d)))return!1}var f=i.get(n),h=i.get(e);if(f&&h)return f==e&&h==n;var v=!0;i.set(n,e),i.set(e,n);for(var l=u;++s<c;){var p=n[d=a[s]],b=e[d];if(r)var w=u?r(b,p,d,e,n,i):r(p,b,d,n,e,i);if(!(void 0===w?p===b||o(p,b,t,r,i):w)){v=!1;break}l||(l="constructor"==d)}if(v&&!l){var m=n.constructor,_=e.constructor;m==_||!("constructor"in n)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _||(v=!1)}return i.delete(n),i.delete(e),v}(n,e,t,o,i,u))};var x=t(9615);const N=function n(e,t,r,o,i){return e===t||(null==e||null==t||!(0,x.Z)(e)&&!(0,x.Z)(t)?e!=e&&t!=t:k(e,t,r,o,n,i))};var C=t(60417);const O=function(n){return n==n&&!(0,C.Z)(n)};var I=t(11723);const L=function(n,e){return function(t){return null!=t&&t[n]===e&&(void 0!==e||n in Object(t))}},M=function(n){var e=function(n){for(var e=(0,I.Z)(n),t=e.length;t--;){var r=e[t],o=n[r];e[t]=[r,o,O(o)]}return e}(n);return 1==e.length&&e[0][2]?L(e[0][0],e[0][1]):function(t){return t===n||function(n,e,t,o){var i=t.length,u=i,a=!o;if(null==n)return!u;for(n=Object(n);i--;){var c=t[i];if(a&&c[2]?c[1]!==n[c[0]]:!(c[0]in n))return!1}for(;++i<u;){var s=(c=t[i])[0],d=n[s],f=c[1];if(a&&c[2]){if(void 0===d&&!(s in n))return!1}else{var h=new r.Z;if(o)var v=o(d,f,s,n,e,h);if(!(void 0===v?N(f,d,3,o,h):v))return!1}}return!0}(t,n,e)}};var R=t(78402);var A=t(94180),P=t(3818),T=t(13550);const S=function(n,e){return(0,P.Z)(n)&&O(e)?L((0,T.Z)(n),e):function(t){var r=function(n,e,t){var r=null==n?void 0:(0,R.Z)(n,e);return void 0===r?t:r}(t,n);return void 0===r&&r===e?(0,A.Z)(t,n):N(e,r,3)}};var F=t(64056),D=t(4561);const B=function(n){return(0,P.Z)(n)?(0,D.Z)((0,T.Z)(n)):function(n){return function(e){return(0,R.Z)(e,n)}}(n)},G=function(n){return"function"==typeof n?n:null==n?F.Z:"object"==typeof n?(0,b.Z)(n)?S(n[0],n[1]):M(n):B(n)}},15521:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(77201),o=t(69959);const i=function(n,e){var t=-1,i=(0,o.Z)(n)?Array(n.length):[];return(0,r.Z)(n,(function(n,r,o){i[++t]=e(n,r,o)})),i}},4561:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n){return function(e){return null==e?void 0:e[n]}}},8142:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){return n.has(e)}},87073:(n,e,t)=>{t.d(e,{Z:()=>o});var r=t(64056);const o=function(n){return"function"==typeof n?n:r.Z}},94022:(n,e,t)=>{t.d(e,{Z:()=>h});var r=t(64058),o=t(3818),i=t(86861),u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const c=(s=(0,i.Z)((function(n){var e=[];return 46===n.charCodeAt(0)&&e.push(""),n.replace(u,(function(n,t,r,o){e.push(r?o.replace(a,"$1"):t||n)})),e}),(function(n){return 500===d.size&&d.clear(),n})),d=s.cache,s);var s,d,f=t(70023);const h=function(n,e){return(0,r.Z)(n)?n:(0,o.Z)(n,e)?[n]:c((0,f.Z)(n))}},13911:(n,e,t)=>{t.d(e,{Z:()=>u});var r=t(47769),o=t(96346),i=t(11723);const u=function(n){return(0,r.Z)(n,i.Z,o.Z)}},96346:(n,e,t)=>{t.d(e,{Z:()=>a});var r=t(11819),o=t(99176),i=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols;const a=u?function(n){return null==n?[]:(n=Object(n),(0,r.Z)(u(n),(function(e){return i.call(n,e)})))}:o.Z},18625:(n,e,t)=>{t.d(e,{Z:()=>s});var r=t(94022),o=t(9028),i=t(64058),u=t(8616),a=t(30918),c=t(13550);const s=function(n,e,t){for(var s=-1,d=(e=(0,r.Z)(e,n)).length,f=!1;++s<d;){var h=(0,c.Z)(e[s]);if(!(f=null!=n&&t(n,h)))break;n=n[h]}return f||++s!=d?f:!!(d=null==n?0:n.length)&&(0,a.Z)(d)&&(0,u.Z)(h,d)&&((0,i.Z)(n)||(0,o.Z)(n))}},3818:(n,e,t)=>{t.d(e,{Z:()=>a});var r=t(64058),o=t(59660),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;const a=function(n,e){if((0,r.Z)(n))return!1;var t=typeof n;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=n&&!(0,o.Z)(n))||u.test(n)||!i.test(n)||null!=e&&n in Object(e)}},70035:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n){var e=-1,t=Array(n.size);return n.forEach((function(n){t[++e]=n})),t}},13550:(n,e,t)=>{t.d(e,{Z:()=>o});var r=t(59660);const o=function(n){if("string"==typeof n||(0,r.Z)(n))return n;var e=n+"";return"0"==e&&1/n==-1/0?"-0":e}},65479:(n,e,t)=>{t.d(e,{Z:()=>s});var r=t(99719),o=t(35050),i=t(47952),u=t(48441),a=Object.prototype,c=a.hasOwnProperty;const s=(0,r.Z)((function(n,e){n=Object(n);var t=-1,r=e.length,s=r>2?e[2]:void 0;for(s&&(0,i.Z)(e[0],e[1],s)&&(r=1);++t<r;)for(var d=e[t],f=(0,u.Z)(d),h=-1,v=f.length;++h<v;){var l=f[h],Z=n[l];(void 0===Z||(0,o.Z)(Z,a[l])&&!c.call(n,l))&&(n[l]=d[l])}return n}))},35090:(n,e,t)=>{t.d(e,{Z:()=>c});var r=t(11819),o=t(77201);const i=function(n,e){var t=[];return(0,o.Z)(n,(function(n,r,o){e(n,r,o)&&t.push(n)})),t};var u=t(11097),a=t(64058);const c=function(n,e){return((0,a.Z)(n)?r.Z:i)(n,(0,u.Z)(e,3))}},28099:(n,e,t)=>{t.d(e,{Z:()=>o});var r=t(65029);const o=function(n){return null!=n&&n.length?(0,r.Z)(n,1):[]}},21845:(n,e,t)=>{t.d(e,{Z:()=>a});var r=t(97640),o=t(77201),i=t(87073),u=t(64058);const a=function(n,e){return((0,u.Z)(n)?r.Z:o.Z)(n,(0,i.Z)(e))}},36004:(n,e,t)=>{t.d(e,{Z:()=>u});var r=Object.prototype.hasOwnProperty;const o=function(n,e){return null!=n&&r.call(n,e)};var i=t(18625);const u=function(n,e){return null!=n&&(0,i.Z)(n,e,o)}},94180:(n,e,t)=>{t.d(e,{Z:()=>i});const r=function(n,e){return null!=n&&e in Object(n)};var o=t(18625);const i=function(n,e){return null!=n&&(0,o.Z)(n,e,r)}},59660:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(77070),o=t(9615);const i=function(n){return"symbol"==typeof n||(0,o.Z)(n)&&"[object Symbol]"==(0,r.Z)(n)}},52307:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n){return void 0===n}},11723:(n,e,t)=>{t.d(e,{Z:()=>u});var r=t(40709),o=t(45934),i=t(69959);const u=function(n){return(0,i.Z)(n)?(0,r.Z)(n):(0,o.Z)(n)}},12930:(n,e,t)=>{t.d(e,{Z:()=>a});var r=t(33043),o=t(11097),i=t(15521),u=t(64058);const a=function(n,e){return((0,u.Z)(n)?r.Z:i.Z)(n,(0,o.Z)(e,3))}},87768:(n,e,t)=>{t.d(e,{Z:()=>Z});var r=t(78402),o=t(15561),i=t(94022),u=t(8616),a=t(60417),c=t(13550);const s=function(n,e,t,r){if(!(0,a.Z)(n))return n;for(var s=-1,d=(e=(0,i.Z)(e,n)).length,f=d-1,h=n;null!=h&&++s<d;){var v=(0,c.Z)(e[s]),l=t;if("__proto__"===v||"constructor"===v||"prototype"===v)return n;if(s!=f){var Z=h[v];void 0===(l=r?r(Z,v,h):void 0)&&(l=(0,a.Z)(Z)?Z:(0,u.Z)(e[s+1])?[]:{})}(0,o.Z)(h,v,l),h=h[v]}return n};var d=t(94180);const f=function(n,e){return function(n,e,t){for(var o=-1,u=e.length,a={};++o<u;){var c=e[o],d=(0,r.Z)(n,c);t(d,c)&&s(a,(0,i.Z)(c,n),d)}return a}(n,e,(function(e,t){return(0,d.Z)(n,t)}))};var h=t(28099),v=t(15829),l=t(71649);const Z=(g=function(n,e){return null==n?{}:f(n,e)},(0,l.Z)((0,v.Z)(g,void 0,h.Z),g+""));var g},36735:(n,e,t)=>{t.d(e,{Z:()=>a});var r=Math.ceil,o=Math.max;var i=t(47952),u=t(41291);const a=function(n,e,t){return t&&"number"!=typeof t&&(0,i.Z)(n,e,t)&&(e=t=void 0),n=(0,u.Z)(n),void 0===e?(e=n,n=0):e=(0,u.Z)(e),function(n,e,t,i){for(var u=-1,a=o(r((e-n)/(t||1)),0),c=Array(a);a--;)c[i?a:++u]=n,n+=t;return c}(n,e,t=void 0===t?n<e?1:-1:(0,u.Z)(t),void 0)}},99413:(n,e,t)=>{t.d(e,{Z:()=>c});const r=function(n,e,t,r){var o=-1,i=null==n?0:n.length;for(r&&i&&(t=n[++o]);++o<i;)t=e(t,n[o],o,n);return t};var o=t(77201),i=t(11097);const u=function(n,e,t,r,o){return o(n,(function(n,o,i){t=r?(r=!1,n):e(t,n,o,i)})),t};var a=t(64058);const c=function(n,e,t){var c=(0,a.Z)(n)?r:u,s=arguments.length<3;return c(n,(0,i.Z)(e,4),t,s,o.Z)}},99176:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(){return[]}},41291:(n,e,t)=>{t.d(e,{Z:()=>h});var r=/\s/;var o=/^\s+/;const i=function(n){return n?n.slice(0,function(n){for(var e=n.length;e--&&r.test(n.charAt(e)););return e}(n)+1).replace(o,""):n};var u=t(60417),a=t(59660),c=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,d=/^0o[0-7]+$/i,f=parseInt;const h=function(n){return n?Infinity===(n=function(n){if("number"==typeof n)return n;if((0,a.Z)(n))return NaN;if((0,u.Z)(n)){var e="function"==typeof n.valueOf?n.valueOf():n;n=(0,u.Z)(e)?e+"":e}if("string"!=typeof n)return 0===n?n:+n;n=i(n);var t=s.test(n);return t||d.test(n)?f(n.slice(2),t?2:8):c.test(n)?NaN:+n}(n))||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}},70023:(n,e,t)=>{t.d(e,{Z:()=>d});var r=t(91642),o=t(33043),i=t(64058),u=t(59660),a=r.Z?r.Z.prototype:void 0,c=a?a.toString:void 0;const s=function n(e){if("string"==typeof e)return e;if((0,i.Z)(e))return(0,o.Z)(e,n)+"";if((0,u.Z)(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},d=function(n){return null==n?"":s(n)}},12451:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(70023),o=0;const i=function(n){var e=++o;return(0,r.Z)(n)+e}},88873:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(33043);var o=t(11723);const i=function(n){return null==n?[]:function(n,e){return(0,r.Z)(e,(function(e){return n[e]}))}(n,(0,o.Z)(n))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7259],{7259:(n,e,t)=>{t.d(e,{bK:()=>ge});var r=t(21845),o=t(12451),i=t(36004),u=t(78795),a=t(28099),c=t(12930),s=t(36735),d=t(67406);class f{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,e=n._prev;if(e!==n)return h(e),e}enqueue(n){var e=this._sentinel;n._prev&&n._next&&h(n),n._next=e._next,e._next._prev=n,e._next=n,n._prev=e}toString(){for(var n=[],e=this._sentinel,t=e._prev;t!==e;)n.push(JSON.stringify(t,v)),t=t._prev;return"["+n.join(", ")+"]"}}function h(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function v(n,e){if("_next"!==n&&"_prev"!==n)return e}var l=u.Z(1);function Z(n,e,t,o,i){var u=i?[]:void 0;return r.Z(n.inEdges(o.v),(function(r){var o=n.edge(r),a=n.node(r.v);i&&u.push({v:r.v,w:r.w}),a.out-=o,g(e,t,a)})),r.Z(n.outEdges(o.v),(function(r){var o=n.edge(r),i=r.w,u=n.node(i);u.in-=o,g(e,t,u)})),n.removeNode(o.v),u}function g(n,e,t){t.out?t.in?n[t.out-t.in+e].enqueue(t):n[n.length-1].enqueue(t):n[0].enqueue(t)}function p(n){var e="greedy"===n.graph().acyclicer?function(n,e){if(n.nodeCount()<=1)return[];var t=function(n,e){var t=new d.k,o=0,i=0;r.Z(n.nodes(),(function(n){t.setNode(n,{v:n,in:0,out:0})})),r.Z(n.edges(),(function(n){var r=t.edge(n.v,n.w)||0,u=e(n),a=r+u;t.setEdge(n.v,n.w,a),i=Math.max(i,t.node(n.v).out+=u),o=Math.max(o,t.node(n.w).in+=u)}));var u=s.Z(i+o+3).map((function(){return new f})),a=o+1;return r.Z(t.nodes(),(function(n){g(u,a,t.node(n))})),{graph:t,buckets:u,zeroIdx:a}}(n,e||l),o=function(n,e,t){for(var r,o=[],i=e[e.length-1],u=e[0];n.nodeCount();){for(;r=u.dequeue();)Z(n,e,t,r);for(;r=i.dequeue();)Z(n,e,t,r);if(n.nodeCount())for(var a=e.length-2;a>0;--a)if(r=e[a].dequeue()){o=o.concat(Z(n,e,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return a.Z(c.Z(o,(function(e){return n.outEdges(e.v,e.w)})))}(n,function(n){return function(e){return n.edge(e).weight}}(n)):function(n){var e=[],t={},o={};return r.Z(n.nodes(),(function u(a){i.Z(o,a)||(o[a]=!0,t[a]=!0,r.Z(n.outEdges(a),(function(n){i.Z(t,n.w)?e.push(n):u(n.w)})),delete t[a])})),e}(n);r.Z(e,(function(e){var t=n.edge(e);n.removeEdge(e),t.forwardName=e.name,t.reversed=!0,n.setEdge(e.w,e.v,t,o.Z("rev"))}))}var b=t(18802),w=t(87768),m=t(65479),_=t(59660);const y=function(n,e,t){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=e(i);if(null!=u&&(void 0===a?u==u&&!(0,_.Z)(u):t(u,a)))var a=u,c=i}return c},E=function(n,e){return n>e};var j=t(64056);const k=function(n){return n&&n.length?y(n,j.Z,E):void 0},x=function(n){var e=null==n?0:n.length;return e?n[e-1]:void 0};var N=t(93586),C=t(6202),O=t(11097);const I=function(n,e){var t={};return e=(0,O.Z)(e,3),(0,C.Z)(n,(function(n,r,o){(0,N.Z)(t,r,e(n,r,o))})),t};var L=t(52307);const M=function(n,e){return n<e},R=function(n){return n&&n.length?y(n,j.Z,M):void 0};var A=t(94311);const P=function(){return A.Z.Date.now()};function T(n,e,t,r){var i;do{i=o.Z(r)}while(n.hasNode(i));return t.dummy=e,n.setNode(i,t),i}function S(n){var e=new d.k({multigraph:n.isMultigraph()}).setGraph(n.graph());return r.Z(n.nodes(),(function(t){n.children(t).length||e.setNode(t,n.node(t))})),r.Z(n.edges(),(function(t){e.setEdge(t,n.edge(t))})),e}function F(n,e){var t,r,o=n.x,i=n.y,u=e.x-o,a=e.y-i,c=n.width/2,s=n.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*c>Math.abs(u)*s?(a<0&&(s=-s),t=s*u/a,r=s):(u<0&&(c=-c),t=c,r=c*a/u),{x:o+t,y:i+r}}function D(n){var e=c.Z(s.Z(G(n)+1),(function(){return[]}));return r.Z(n.nodes(),(function(t){var r=n.node(t),o=r.rank;L.Z(o)||(e[o][r.order]=t)})),e}function B(n,e,t,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),T(n,"border",o,e)}function G(n){return k(c.Z(n.nodes(),(function(e){var t=n.node(e).rank;if(!L.Z(t))return t})))}function U(n,e){var t=P();try{return e()}finally{console.log(n+" time: "+(P()-t)+"ms")}}function V(n,e){return e()}function z(n,e,t,r,o,i){var u={width:0,height:0,rank:i,borderType:e},a=o[e][i-1],c=T(n,"border",u,t);o[e][i]=c,n.setParent(c,r),a&&n.setEdge(a,c,{weight:1})}function Y(n){r.Z(n.nodes(),(function(e){q(n.node(e))})),r.Z(n.edges(),(function(e){q(n.edge(e))}))}function q(n){var e=n.width;n.width=n.height,n.height=e}function $(n){n.y=-n.y}function J(n){var e=n.x;n.x=n.y,n.y=e}const K=function(n,e){return n&&n.length?y(n,(0,O.Z)(e,2),M):void 0};function W(n){var e={};r.Z(n.sources(),(function t(r){var o=n.node(r);if(i.Z(e,r))return o.rank;e[r]=!0;var u=R(c.Z(n.outEdges(r),(function(e){return t(e.w)-n.edge(e).minlen})));return u!==Number.POSITIVE_INFINITY&&null!=u||(u=0),o.rank=u}))}function H(n,e){return n.node(e.w).rank-n.node(e.v).rank-n.edge(e).minlen}function Q(n){var e,t,r=new d.k({directed:!1}),o=n.nodes()[0],i=n.nodeCount();for(r.setNode(o,{});X(r,n)<i;)e=nn(r,n),t=r.hasNode(e.v)?H(n,e):-H(n,e),en(r,n,t);return r}function X(n,e){return r.Z(n.nodes(),(function t(o){r.Z(e.nodeEdges(o),(function(r){var i=r.v,u=o===i?r.w:i;n.hasNode(u)||H(e,r)||(n.setNode(u,{}),n.setEdge(o,u,{}),t(u))}))})),n.nodeCount()}function nn(n,e){return K(e.edges(),(function(t){if(n.hasNode(t.v)!==n.hasNode(t.w))return H(e,t)}))}function en(n,e,t){r.Z(n.nodes(),(function(n){e.node(n).rank+=t}))}var tn=t(69959),rn=t(11723);var on=t(9872),un=t(41291);var an=Math.max;const cn=(sn=function(n,e,t){var r=null==n?0:n.length;if(!r)return-1;var o,i,u,a=null==t?0:(o=t,i=(0,un.Z)(o),u=i%1,i==i?u?i-u:i:0);return a<0&&(a=an(r+a,0)),(0,on.Z)(n,(0,O.Z)(e,3),a)},function(n,e,t){var r=Object(n);if(!(0,tn.Z)(n)){var o=(0,O.Z)(e,3);n=(0,rn.Z)(n),e=function(n){return o(r[n],n,r)}}var i=sn(n,e,t);return i>-1?r[o?n[i]:i]:void 0});var sn,dn=t(35090);u.Z(1),u.Z(1),t(45934),t(41182),t(77070);var fn=t(64058);t(9615),(0,t(4561).Z)("length"),RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var hn="\\ud800-\\udfff",vn="["+hn+"]",ln="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Zn="\\ud83c[\\udffb-\\udfff]",gn="[^"+hn+"]",pn="(?:\\ud83c[\\udde6-\\uddff]){2}",bn="[\\ud800-\\udbff][\\udc00-\\udfff]",wn="(?:"+ln+"|"+Zn+")?",mn="[\\ufe0e\\ufe0f]?",_n=mn+wn+"(?:\\u200d(?:"+[gn,pn,bn].join("|")+")"+mn+wn+")*",yn="(?:"+[gn+ln+"?",ln,pn,bn,vn].join("|")+")";function En(n,e,t){fn.Z(e)||(e=[e]);var o=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],u={};return r.Z(e,(function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);jn(n,e,"post"===t,u,o,i)})),i}function jn(n,e,t,o,u,a){i.Z(o,e)||(o[e]=!0,t||a.push(e),r.Z(u(e),(function(e){jn(n,e,t,o,u,a)})),t&&a.push(e))}function kn(n){n=function(n){var e=(new d.k).setGraph(n.graph());return r.Z(n.nodes(),(function(t){e.setNode(t,n.node(t))})),r.Z(n.edges(),(function(t){var r=e.edge(t.v,t.w)||{weight:0,minlen:1},o=n.edge(t);e.setEdge(t.v,t.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),e}(n),W(n);var e,t=Q(n);for(Cn(t),xn(t,n);e=In(t);)Mn(t,n,e,Ln(t,n,e))}function xn(n,e){var t=function(n,e){return En(n,e,"post")}(n,n.nodes());t=t.slice(0,t.length-1),r.Z(t,(function(t){!function(n,e,t){var r=n.node(t).parent;n.edge(t,r).cutvalue=Nn(n,e,t)}(n,e,t)}))}function Nn(n,e,t){var o=n.node(t).parent,i=!0,u=e.edge(t,o),a=0;return u||(i=!1,u=e.edge(o,t)),a=u.weight,r.Z(e.nodeEdges(t),(function(r){var u,c,s=r.v===t,d=s?r.w:r.v;if(d!==o){var f=s===i,h=e.edge(r).weight;if(a+=f?h:-h,u=t,c=d,n.hasEdge(u,c)){var v=n.edge(t,d).cutvalue;a+=f?-v:v}}})),a}function Cn(n,e){arguments.length<2&&(e=n.nodes()[0]),On(n,{},1,e)}function On(n,e,t,o,u){var a=t,c=n.node(o);return e[o]=!0,r.Z(n.neighbors(o),(function(r){i.Z(e,r)||(t=On(n,e,t,r,o))})),c.low=a,c.lim=t++,u?c.parent=u:delete c.parent,t}function In(n){return cn(n.edges(),(function(e){return n.edge(e).cutvalue<0}))}function Ln(n,e,t){var r=t.v,o=t.w;e.hasEdge(r,o)||(r=t.w,o=t.v);var i=n.node(r),u=n.node(o),a=i,c=!1;i.lim>u.lim&&(a=u,c=!0);var s=dn.Z(e.edges(),(function(e){return c===Rn(0,n.node(e.v),a)&&c!==Rn(0,n.node(e.w),a)}));return K(s,(function(n){return H(e,n)}))}function Mn(n,e,t,o){var i=t.v,u=t.w;n.removeEdge(i,u),n.setEdge(o.v,o.w,{}),Cn(n),xn(n,e),function(n,e){var t=cn(n.nodes(),(function(n){return!e.node(n).parent})),o=function(n,e){return En(n,e,"pre")}(n,t);o=o.slice(1),r.Z(o,(function(t){var r=n.node(t).parent,o=e.edge(t,r),i=!1;o||(o=e.edge(r,t),i=!0),e.node(t).rank=e.node(r).rank+(i?o.minlen:-o.minlen)}))}(n,e)}function Rn(n,e,t){return t.low<=e.lim&&e.lim<=t.lim}function An(n){switch(n.graph().ranker){case"network-simplex":default:!function(n){kn(n)}(n);break;case"tight-tree":!function(n){W(n),Q(n)}(n);break;case"longest-path":Pn(n)}}RegExp(Zn+"(?="+Zn+")|"+yn+_n,"g"),new Error,t(7303),kn.initLowLimValues=Cn,kn.initCutValues=xn,kn.calcCutValue=Nn,kn.leaveEdge=In,kn.enterEdge=Ln,kn.exchangeEdges=Mn;var Pn=W;var Tn=t(88873),Sn=t(99413);function Fn(n){var e=T(n,"root",{},"_root"),t=function(n){var e={};function t(o,i){var u=n.children(o);u&&u.length&&r.Z(u,(function(n){t(n,i+1)})),e[o]=i}return r.Z(n.children(),(function(n){t(n,1)})),e}(n),o=k(Tn.Z(t))-1,i=2*o+1;n.graph().nestingRoot=e,r.Z(n.edges(),(function(e){n.edge(e).minlen*=i}));var u=function(n){return Sn.Z(n.edges(),(function(e,t){return e+n.edge(t).weight}),0)}(n)+1;r.Z(n.children(),(function(r){Dn(n,e,i,u,o,t,r)})),n.graph().nodeRankFactor=i}function Dn(n,e,t,o,i,u,a){var c=n.children(a);if(c.length){var s=B(n,"_bt"),d=B(n,"_bb"),f=n.node(a);n.setParent(s,a),f.borderTop=s,n.setParent(d,a),f.borderBottom=d,r.Z(c,(function(r){Dn(n,e,t,o,i,u,r);var c=n.node(r),f=c.borderTop?c.borderTop:r,h=c.borderBottom?c.borderBottom:r,v=c.borderTop?o:2*o,l=f!==h?1:i-u[a]+1;n.setEdge(s,f,{weight:v,minlen:l,nestingEdge:!0}),n.setEdge(h,d,{weight:v,minlen:l,nestingEdge:!0})})),n.parent(a)||n.setEdge(e,s,{weight:0,minlen:i+u[a]})}else a!==e&&n.setEdge(e,a,{weight:0,minlen:t})}var Bn=t(47853);const Gn=function(n){return(0,Bn.Z)(n,5)};var Un=t(15561);const Vn=function(n,e){return function(n,e,t){for(var r=-1,o=n.length,i=e.length,u={};++r<o;){var a=r<i?e[r]:void 0;t(u,n[r],a)}return u}(n||[],e||[],Un.Z)};var zn=t(65029),Yn=t(33043),qn=t(78402),$n=t(15521);var Jn=t(20274);const Kn=function(n,e){if(n!==e){var t=void 0!==n,r=null===n,o=n==n,i=(0,_.Z)(n),u=void 0!==e,a=null===e,c=e==e,s=(0,_.Z)(e);if(!a&&!s&&!i&&n>e||i&&u&&c&&!a&&!s||r&&u&&c||!t&&c||!o)return 1;if(!r&&!i&&!s&&n<e||s&&t&&o&&!r&&!i||a&&t&&o||!u&&o||!c)return-1}return 0},Wn=function(n,e,t){e=e.length?(0,Yn.Z)(e,(function(n){return(0,fn.Z)(n)?function(e){return(0,qn.Z)(e,1===n.length?n[0]:n)}:n})):[j.Z];var r=-1;return e=(0,Yn.Z)(e,(0,Jn.Z)(O.Z)),function(n,e){var t=n.length;for(n.sort(e);t--;)n[t]=n[t].value;return n}((0,$n.Z)(n,(function(n,t,o){return{criteria:(0,Yn.Z)(e,(function(e){return e(n)})),index:++r,value:n}})),(function(n,e){return function(n,e,t){for(var r=-1,o=n.criteria,i=e.criteria,u=o.length,a=t.length;++r<u;){var c=Kn(o[r],i[r]);if(c)return r>=a?c:c*("desc"==t[r]?-1:1)}return n.index-e.index}(n,e,t)}))};var Hn=t(99719),Qn=t(47952);const Xn=(0,Hn.Z)((function(n,e){if(null==n)return[];var t=e.length;return t>1&&(0,Qn.Z)(n,e[0],e[1])?e=[]:t>2&&(0,Qn.Z)(e[0],e[1],e[2])&&(e=[e[0]]),Wn(n,(0,zn.Z)(e,1),[])}));function ne(n,e){for(var t=0,r=1;r<e.length;++r)t+=ee(n,e[r-1],e[r]);return t}function ee(n,e,t){for(var o=Vn(t,c.Z(t,(function(n,e){return e}))),i=a.Z(c.Z(e,(function(e){return Xn(c.Z(n.outEdges(e),(function(e){return{pos:o[e.w],weight:n.edge(e).weight}})),"pos")}))),u=1;u<t.length;)u<<=1;var s=2*u-1;u-=1;var d=c.Z(new Array(s),(function(){return 0})),f=0;return r.Z(i.forEach((function(n){var e=n.pos+u;d[e]+=n.weight;for(var t=0;e>0;)e%2&&(t+=d[e+1]),d[e=e-1>>1]+=n.weight;f+=n.weight*t}))),f}function te(n,e){var t,o=function(n,e){var t={lhs:[],rhs:[]};return r.Z(n,(function(n){var e;e=n,i.Z(e,"barycenter")?t.lhs.push(n):t.rhs.push(n)})),t}(n),u=o.lhs,c=Xn(o.rhs,(function(n){return-n.i})),s=[],d=0,f=0,h=0;u.sort((t=!!e,function(n,e){return n.barycenter<e.barycenter?-1:n.barycenter>e.barycenter?1:t?e.i-n.i:n.i-e.i})),h=re(s,c,h),r.Z(u,(function(n){h+=n.vs.length,s.push(n.vs),d+=n.barycenter*n.weight,f+=n.weight,h=re(s,c,h)}));var v={vs:a.Z(s)};return f&&(v.barycenter=d/f,v.weight=f),v}function re(n,e,t){for(var r;e.length&&(r=x(e)).i<=t;)e.pop(),n.push(r.vs),t++;return t}function oe(n,e,t,o){var u=n.children(e),s=n.node(e),d=s?s.borderLeft:void 0,f=s?s.borderRight:void 0,h={};d&&(u=dn.Z(u,(function(n){return n!==d&&n!==f})));var v=function(n,e){return c.Z(e,(function(e){var t=n.inEdges(e);if(t.length){var r=Sn.Z(t,(function(e,t){var r=n.edge(t),o=n.node(t.v);return{sum:e.sum+r.weight*o.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))}(n,u);r.Z(v,(function(e){if(n.children(e.v).length){var r=oe(n,e.v,t,o);h[e.v]=r,i.Z(r,"barycenter")&&(u=e,a=r,L.Z(u.barycenter)?(u.barycenter=a.barycenter,u.weight=a.weight):(u.barycenter=(u.barycenter*u.weight+a.barycenter*a.weight)/(u.weight+a.weight),u.weight+=a.weight))}var u,a}));var l=function(n,e){var t={};return r.Z(n,(function(n,e){var r=t[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:e};L.Z(n.barycenter)||(r.barycenter=n.barycenter,r.weight=n.weight)})),r.Z(e.edges(),(function(n){var e=t[n.v],r=t[n.w];L.Z(e)||L.Z(r)||(r.indegree++,e.out.push(t[n.w]))})),function(n){var e=[];function t(n){return function(e){var t,r,o,i;e.merged||(L.Z(e.barycenter)||L.Z(n.barycenter)||e.barycenter>=n.barycenter)&&(r=e,o=0,i=0,(t=n).weight&&(o+=t.barycenter*t.weight,i+=t.weight),r.weight&&(o+=r.barycenter*r.weight,i+=r.weight),t.vs=r.vs.concat(t.vs),t.barycenter=o/i,t.weight=i,t.i=Math.min(r.i,t.i),r.merged=!0)}}function o(e){return function(t){t.in.push(e),0==--t.indegree&&n.push(t)}}for(;n.length;){var i=n.pop();e.push(i),r.Z(i.in.reverse(),t(i)),r.Z(i.out,o(i))}return c.Z(dn.Z(e,(function(n){return!n.merged})),(function(n){return w.Z(n,["vs","i","barycenter","weight"])}))}(dn.Z(t,(function(n){return!n.indegree})))}(v,t);!function(n,e){r.Z(n,(function(n){n.vs=a.Z(n.vs.map((function(n){return e[n]?e[n].vs:n})))}))}(l,h);var Z=te(l,o);if(d&&(Z.vs=a.Z([d,Z.vs,f]),n.predecessors(d).length)){var g=n.node(n.predecessors(d)[0]),p=n.node(n.predecessors(f)[0]);i.Z(Z,"barycenter")||(Z.barycenter=0,Z.weight=0),Z.barycenter=(Z.barycenter*Z.weight+g.order+p.order)/(Z.weight+2),Z.weight+=2}return Z}function ie(n,e,t){return c.Z(e,(function(e){return function(n,e,t){var u=function(n){for(var e;n.hasNode(e=o.Z("_root")););return e}(n),a=new d.k({compound:!0}).setGraph({root:u}).setDefaultNodeLabel((function(e){return n.node(e)}));return r.Z(n.nodes(),(function(o){var c=n.node(o),s=n.parent(o);(c.rank===e||c.minRank<=e&&e<=c.maxRank)&&(a.setNode(o),a.setParent(o,s||u),r.Z(n[t](o),(function(e){var t=e.v===o?e.w:e.v,r=a.edge(t,o),i=L.Z(r)?0:r.weight;a.setEdge(t,o,{weight:n.edge(e).weight+i})})),i.Z(c,"minRank")&&a.setNode(o,{borderLeft:c.borderLeft[e],borderRight:c.borderRight[e]}))})),a}(n,e,t)}))}function ue(n,e){var t=new d.k;r.Z(n,(function(n){var o=n.graph().root,i=oe(n,o,t,e);r.Z(i.vs,(function(e,t){n.node(e).order=t})),function(n,e,t){var o,i={};r.Z(t,(function(t){for(var r,u,a=n.parent(t);a;){if((r=n.parent(a))?(u=i[r],i[r]=a):(u=o,o=a),u&&u!==a)return void e.setEdge(u,a);a=r}}))}(n,t,i.vs)}))}function ae(n,e){r.Z(e,(function(e){r.Z(e,(function(e,t){n.node(e).order=t}))}))}var ce=t(87073);const se=function(n,e){return n&&(0,C.Z)(n,(0,ce.Z)(e))};var de=t(49399),fe=t(48441);const he=function(n,e){return null==n?n:(0,de.Z)(n,(0,ce.Z)(e),fe.Z)};function ve(n,e,t){if(e>t){var r=e;e=t,t=r}var o=n[e];o||(n[e]=o={}),o[t]=!0}function le(n,e,t){if(e>t){var r=e;e=t,t=r}return i.Z(n[e],t)}function Ze(n){var e,t=D(n),o=b.Z(function(n,e){var t={};return Sn.Z(e,(function(e,o){var i=0,u=0,a=e.length,c=x(o);return r.Z(o,(function(e,s){var d=function(n,e){if(n.node(e).dummy)return cn(n.predecessors(e),(function(e){return n.node(e).dummy}))}(n,e),f=d?n.node(d).order:a;(d||e===c)&&(r.Z(o.slice(u,s+1),(function(e){r.Z(n.predecessors(e),(function(r){var o=n.node(r),u=o.order;!(u<i||f<u)||o.dummy&&n.node(e).dummy||ve(t,r,e)}))})),u=s+1,i=f)})),o})),t}(n,t),function(n,e){var t={};function o(e,o,i,u,a){var c;r.Z(s.Z(o,i),(function(o){c=e[o],n.node(c).dummy&&r.Z(n.predecessors(c),(function(e){var r=n.node(e);r.dummy&&(r.order<u||r.order>a)&&ve(t,e,c)}))}))}return Sn.Z(e,(function(e,t){var i,u=-1,a=0;return r.Z(t,(function(r,c){if("border"===n.node(r).dummy){var s=n.predecessors(r);s.length&&(i=n.node(s[0]).order,o(t,a,c,u,i),a=c,u=i)}o(t,a,t.length,i,e.length)})),t})),t}(n,t)),u={};r.Z(["u","d"],(function(a){e="u"===a?t:Tn.Z(t).reverse(),r.Z(["l","r"],(function(t){"r"===t&&(e=c.Z(e,(function(n){return Tn.Z(n).reverse()})));var s=("u"===a?n.predecessors:n.successors).bind(n),f=function(n,e,t,o){var i={},u={},a={};return r.Z(e,(function(n){r.Z(n,(function(n,e){i[n]=n,u[n]=n,a[n]=e}))})),r.Z(e,(function(n){var e=-1;r.Z(n,(function(n){var r=o(n);if(r.length){r=Xn(r,(function(n){return a[n]}));for(var c=(r.length-1)/2,s=Math.floor(c),d=Math.ceil(c);s<=d;++s){var f=r[s];u[n]===n&&e<a[f]&&!le(t,n,f)&&(u[f]=n,u[n]=i[n]=i[f],e=a[f])}}}))})),{root:i,align:u}}(0,e,o,s),h=function(n,e,t,o,u){var a={},c=function(n,e,t,o){var u=new d.k,a=n.graph(),c=function(n,e,t){return function(r,o,u){var a,c=r.node(o),s=r.node(u),d=0;if(d+=c.width/2,i.Z(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":a=-c.width/2;break;case"r":a=c.width/2}if(a&&(d+=t?a:-a),a=0,d+=(c.dummy?e:n)/2,d+=(s.dummy?e:n)/2,d+=s.width/2,i.Z(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=s.width/2;break;case"r":a=-s.width/2}return a&&(d+=t?a:-a),a=0,d}}(a.nodesep,a.edgesep,o);return r.Z(e,(function(e){var o;r.Z(e,(function(e){var r=t[e];if(u.setNode(r),o){var i=t[o],a=u.edge(i,r);u.setEdge(i,r,Math.max(c(n,e,o),a||0))}o=e}))})),u}(n,e,t,u),s=u?"borderLeft":"borderRight";function f(n,e){for(var t=c.nodes(),r=t.pop(),o={};r;)o[r]?n(r):(o[r]=!0,t.push(r),t=t.concat(e(r))),r=t.pop()}return f((function(n){a[n]=c.inEdges(n).reduce((function(n,e){return Math.max(n,a[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),f((function(e){var t=c.outEdges(e).reduce((function(n,e){return Math.min(n,a[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=n.node(e);t!==Number.POSITIVE_INFINITY&&r.borderType!==s&&(a[e]=Math.max(a[e],t))}),c.successors.bind(c)),r.Z(o,(function(n){a[n]=a[t[n]]})),a}(n,e,f.root,f.align,"r"===t);"r"===t&&(h=I(h,(function(n){return-n}))),u[a+t]=h}))}));var a=function(n,e){return K(Tn.Z(e),(function(e){var t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return he(e,(function(e,o){var i=function(n,e){return n.node(e).width}(n,o)/2;t=Math.max(e+i,t),r=Math.min(e-i,r)})),t-r}))}(n,u);return function(n,e){var t=Tn.Z(e),o=R(t),i=k(t);r.Z(["u","d"],(function(t){r.Z(["l","r"],(function(r){var u,a=t+r,c=n[a];if(c!==e){var s=Tn.Z(c);(u="l"===r?o-R(s):i-k(s))&&(n[a]=I(c,(function(n){return n+u})))}}))}))}(u,a),function(n,e){return I(n.ul,(function(t,r){if(e)return n[e.toLowerCase()][r];var o=Xn(c.Z(n,r));return(o[1]+o[2])/2}))}(u,n.graph().align)}function ge(n,e){var t=e&&e.debugTiming?U:V;t("layout",(function(){var e=t(" buildLayoutGraph",(function(){return function(n){var e=new d.k({multigraph:!0,compound:!0}),t=xe(n.graph());return e.setGraph(b.Z({},be,ke(t,pe),w.Z(t,we))),r.Z(n.nodes(),(function(t){var r=xe(n.node(t));e.setNode(t,m.Z(ke(r,me),_e)),e.setParent(t,n.parent(t))})),r.Z(n.edges(),(function(t){var r=xe(n.edge(t));e.setEdge(t,b.Z({},Ee,ke(r,ye),w.Z(r,je)))})),e}(n)}));t(" runLayout",(function(){!function(n,e){e(" makeSpaceForEdgeLabels",(function(){!function(n){var e=n.graph();e.ranksep/=2,r.Z(n.edges(),(function(t){var r=n.edge(t);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(n)})),e(" removeSelfEdges",(function(){!function(n){r.Z(n.edges(),(function(e){if(e.v===e.w){var t=n.node(e.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e,label:n.edge(e)}),n.removeEdge(e)}}))}(n)})),e(" acyclic",(function(){p(n)})),e(" nestingGraph.run",(function(){Fn(n)})),e(" rank",(function(){An(S(n))})),e(" injectEdgeLabelProxies",(function(){!function(n){r.Z(n.edges(),(function(e){var t=n.edge(e);if(t.width&&t.height){var r=n.node(e.v),o={rank:(n.node(e.w).rank-r.rank)/2+r.rank,e};T(n,"edge-proxy",o,"_ep")}}))}(n)})),e(" removeEmptyRanks",(function(){!function(n){var e=R(c.Z(n.nodes(),(function(e){return n.node(e).rank}))),t=[];r.Z(n.nodes(),(function(r){var o=n.node(r).rank-e;t[o]||(t[o]=[]),t[o].push(r)}));var o=0,i=n.graph().nodeRankFactor;r.Z(t,(function(e,t){L.Z(e)&&t%i!=0?--o:o&&r.Z(e,(function(e){n.node(e).rank+=o}))}))}(n)})),e(" nestingGraph.cleanup",(function(){!function(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,r.Z(n.edges(),(function(e){n.edge(e).nestingEdge&&n.removeEdge(e)}))}(n)})),e(" normalizeRanks",(function(){!function(n){var e=R(c.Z(n.nodes(),(function(e){return n.node(e).rank})));r.Z(n.nodes(),(function(t){var r=n.node(t);i.Z(r,"rank")&&(r.rank-=e)}))}(n)})),e(" assignRankMinMax",(function(){!function(n){var e=0;r.Z(n.nodes(),(function(t){var r=n.node(t);r.borderTop&&(r.minRank=n.node(r.borderTop).rank,r.maxRank=n.node(r.borderBottom).rank,e=k(e,r.maxRank))})),n.graph().maxRank=e}(n)})),e(" removeEdgeLabelProxies",(function(){!function(n){r.Z(n.nodes(),(function(e){var t=n.node(e);"edge-proxy"===t.dummy&&(n.edge(t.e).labelRank=t.rank,n.removeNode(e))}))}(n)})),e(" normalize.run",(function(){!function(n){n.graph().dummyChains=[],r.Z(n.edges(),(function(e){!function(n,e){var t,r,o,i=e.v,u=n.node(i).rank,a=e.w,c=n.node(a).rank,s=e.name,d=n.edge(e),f=d.labelRank;if(c!==u+1){for(n.removeEdge(e),o=0,++u;u<c;++o,++u)d.points=[],t=T(n,"edge",r={width:0,height:0,edgeLabel:d,edgeObj:e,rank:u},"_d"),u===f&&(r.width=d.width,r.height=d.height,r.dummy="edge-label",r.labelpos=d.labelpos),n.setEdge(i,t,{weight:d.weight},s),0===o&&n.graph().dummyChains.push(t),i=t;n.setEdge(i,a,{weight:d.weight},s)}}(n,e)}))}(n)})),e(" parentDummyChains",(function(){!function(n){var e=function(n){var e={},t=0;return r.Z(n.children(),(function o(i){var u=t;r.Z(n.children(i),o),e[i]={low:u,lim:t++}})),e}(n);r.Z(n.graph().dummyChains,(function(t){for(var r=n.node(t),o=r.edgeObj,i=function(n,e,t,r){var o,i,u=[],a=[],c=Math.min(e[t].low,e[r].low),s=Math.max(e[t].lim,e[r].lim);o=t;do{o=n.parent(o),u.push(o)}while(o&&(e[o].low>c||s>e[o].lim));for(i=o,o=r;(o=n.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(n,e,o.v,o.w),u=i.path,a=i.lca,c=0,s=u[c],d=!0;t!==o.w;){if(r=n.node(t),d){for(;(s=u[c])!==a&&n.node(s).maxRank<r.rank;)c++;s===a&&(d=!1)}if(!d){for(;c<u.length-1&&n.node(s=u[c+1]).minRank<=r.rank;)c++;s=u[c]}n.setParent(t,s),t=n.successors(t)[0]}}))}(n)})),e(" addBorderSegments",(function(){!function(n){r.Z(n.children(),(function e(t){var o=n.children(t),u=n.node(t);if(o.length&&r.Z(o,e),i.Z(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var a=u.minRank,c=u.maxRank+1;a<c;++a)z(n,"borderLeft","_bl",t,u,a),z(n,"borderRight","_br",t,u,a)}}))}(n)})),e(" order",(function(){!function(n){var e=G(n),t=ie(n,s.Z(1,e+1),"inEdges"),o=ie(n,s.Z(e-1,-1,-1),"outEdges"),u=function(n){var e={},t=dn.Z(n.nodes(),(function(e){return!n.children(e).length})),o=k(c.Z(t,(function(e){return n.node(e).rank}))),u=c.Z(s.Z(o+1),(function(){return[]})),a=Xn(t,(function(e){return n.node(e).rank}));return r.Z(a,(function t(o){if(!i.Z(e,o)){e[o]=!0;var a=n.node(o);u[a.rank].push(o),r.Z(n.successors(o),t)}})),u}(n);ae(n,u);for(var a,d=Number.POSITIVE_INFINITY,f=0,h=0;h<4;++f,++h){ue(f%2?t:o,f%4>=2);var v=ne(n,u=D(n));v<d&&(h=0,a=Gn(u),d=v)}ae(n,a)}(n)})),e(" insertSelfEdges",(function(){!function(n){var e=D(n);r.Z(e,(function(e){var t=0;r.Z(e,(function(e,o){var i=n.node(e);i.order=o+t,r.Z(i.selfEdges,(function(e){T(n,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:o+ ++t,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}(n)})),e(" adjustCoordinateSystem",(function(){!function(n){var e=n.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||Y(n)}(n)})),e(" position",(function(){!function(n){(function(n){var e=D(n),t=n.graph().ranksep,o=0;r.Z(e,(function(e){var i=k(c.Z(e,(function(e){return n.node(e).height})));r.Z(e,(function(e){n.node(e).y=o+i/2})),o+=i+t}))})(n=S(n)),se(Ze(n),(function(e,t){n.node(t).x=e}))}(n)})),e(" positionSelfEdges",(function(){!function(n){r.Z(n.nodes(),(function(e){var t=n.node(e);if("selfedge"===t.dummy){var r=n.node(t.e.v),o=r.x+r.width/2,i=r.y,u=t.x-o,a=r.height/2;n.setEdge(t.e,t.label),n.removeNode(e),t.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],t.label.x=t.x,t.label.y=t.y}}))}(n)})),e(" removeBorderNodes",(function(){!function(n){r.Z(n.nodes(),(function(e){if(n.children(e).length){var t=n.node(e),r=n.node(t.borderTop),o=n.node(t.borderBottom),i=n.node(x(t.borderLeft)),u=n.node(x(t.borderRight));t.width=Math.abs(u.x-i.x),t.height=Math.abs(o.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}})),r.Z(n.nodes(),(function(e){"border"===n.node(e).dummy&&n.removeNode(e)}))}(n)})),e(" normalize.undo",(function(){!function(n){r.Z(n.graph().dummyChains,(function(e){var t,r=n.node(e),o=r.edgeLabel;for(n.setEdge(r.edgeObj,o);r.dummy;)t=n.successors(e)[0],n.removeNode(e),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),e=t,r=n.node(e)}))}(n)})),e(" fixupEdgeLabelCoords",(function(){!function(n){r.Z(n.edges(),(function(e){var t=n.edge(e);if(i.Z(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}}))}(n)})),e(" undoCoordinateSystem",(function(){!function(n){var e=n.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(n){r.Z(n.nodes(),(function(e){$(n.node(e))})),r.Z(n.edges(),(function(e){var t=n.edge(e);r.Z(t.points,$),i.Z(t,"y")&&$(t)}))}(n),"lr"!==e&&"rl"!==e||(function(n){r.Z(n.nodes(),(function(e){J(n.node(e))})),r.Z(n.edges(),(function(e){var t=n.edge(e);r.Z(t.points,J),i.Z(t,"x")&&J(t)}))}(n),Y(n))}(n)})),e(" translateGraph",(function(){!function(n){var e=Number.POSITIVE_INFINITY,t=0,o=Number.POSITIVE_INFINITY,u=0,a=n.graph(),c=a.marginx||0,s=a.marginy||0;function d(n){var r=n.x,i=n.y,a=n.width,c=n.height;e=Math.min(e,r-a/2),t=Math.max(t,r+a/2),o=Math.min(o,i-c/2),u=Math.max(u,i+c/2)}r.Z(n.nodes(),(function(e){d(n.node(e))})),r.Z(n.edges(),(function(e){var t=n.edge(e);i.Z(t,"x")&&d(t)})),e-=c,o-=s,r.Z(n.nodes(),(function(t){var r=n.node(t);r.x-=e,r.y-=o})),r.Z(n.edges(),(function(t){var u=n.edge(t);r.Z(u.points,(function(n){n.x-=e,n.y-=o})),i.Z(u,"x")&&(u.x-=e),i.Z(u,"y")&&(u.y-=o)})),a.width=t-e+c,a.height=u-o+s}(n)})),e(" assignNodeIntersects",(function(){!function(n){r.Z(n.edges(),(function(e){var t,r,o=n.edge(e),i=n.node(e.v),u=n.node(e.w);o.points?(t=o.points[0],r=o.points[o.points.length-1]):(o.points=[],t=u,r=i),o.points.unshift(F(i,t)),o.points.push(F(u,r))}))}(n)})),e(" reversePoints",(function(){!function(n){r.Z(n.edges(),(function(e){var t=n.edge(e);t.reversed&&t.points.reverse()}))}(n)})),e(" acyclic.undo",(function(){!function(n){r.Z(n.edges(),(function(e){var t=n.edge(e);if(t.reversed){n.removeEdge(e);var r=t.forwardName;delete t.reversed,delete t.forwardName,n.setEdge(e.w,e.v,t,r)}}))}(n)}))}(e,t)})),t(" updateInputGraph",(function(){!function(n,e){r.Z(n.nodes(),(function(t){var r=n.node(t),o=e.node(t);r&&(r.x=o.x,r.y=o.y,e.children(t).length&&(r.width=o.width,r.height=o.height))})),r.Z(n.edges(),(function(t){var r=n.edge(t),o=e.edge(t);r.points=o.points,i.Z(o,"x")&&(r.x=o.x,r.y=o.y)})),n.graph().width=e.graph().width,n.graph().height=e.graph().height}(n,e)}))}))}var pe=["nodesep","edgesep","ranksep","marginx","marginy"],be={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},we=["acyclicer","ranker","rankdir","align"],me=["width","height"],_e={width:0,height:0},ye=["minlen","weight","width","height","labeloffset"],Ee={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},je=["labelpos"];function ke(n,e){return I(w.Z(n,e),Number)}function xe(n){var e={};return r.Z(n,(function(n,t){e[t.toLowerCase()]=n})),e}},7303:(n,e,t)=>{t.d(e,{k:()=>I});var r=t(36004),o=t(78795),i=t(48489),u=t(11723),a=t(35090),c=t(66400),s=t(21845),d=t(52307),f=t(65029),h=t(99719),v=t(40105),l=t(9872);const Z=function(n){return n!=n},g=function(n,e){return!(null==n||!n.length)&&function(n,e,t){return e==e?function(n,e,t){for(var r=t-1,o=n.length;++r<o;)if(n[r]===e)return r;return-1}(n,e,t):(0,l.Z)(n,Z,t)}(n,e,0)>-1},p=function(n,e,t){for(var r=-1,o=null==n?0:n.length;++r<o;)if(t(e,n[r]))return!0;return!1};var b=t(8142),w=t(16889);var m=t(70035),_=w.Z&&1/(0,m.Z)(new w.Z([,-0]))[1]==1/0?function(n){return new w.Z(n)}:function(){};const y=_;var E=t(60492);const j=(0,h.Z)((function(n){return function(n,e,t){var r=-1,o=g,i=n.length,u=!0,a=[],c=a;if(t)u=!1,o=p;else if(i>=200){var s=e?null:y(n);if(s)return(0,m.Z)(s);u=!1,o=b.Z,c=new v.Z}else c=e?[]:a;n:for(;++r<i;){var d=n[r],f=e?e(d):d;if(d=t||0!==d?d:0,u&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue n;e&&c.push(f),a.push(d)}else o(c,f,t)||(c!==a&&c.push(f),a.push(d))}return a}((0,f.Z)(n,1,E.Z,!0))}));var k=t(88873),x=t(99413),N="\0",C="\0",O="";class I{constructor(n={}){this._isDirected=!r.Z(n,"directed")||n.directed,this._isMultigraph=!!r.Z(n,"multigraph")&&n.multigraph,this._isCompound=!!r.Z(n,"compound")&&n.compound,this._label=void 0,this._defaultNodeLabelFn=o.Z(void 0),this._defaultEdgeLabelFn=o.Z(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[C]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(n){return this._label=n,this}graph(){return this._label}setDefaultNodeLabel(n){return i.Z(n)||(n=o.Z(n)),this._defaultNodeLabelFn=n,this}nodeCount(){return this._nodeCount}nodes(){return u.Z(this._nodes)}sources(){var n=this;return a.Z(this.nodes(),(function(e){return c.Z(n._in[e])}))}sinks(){var n=this;return a.Z(this.nodes(),(function(e){return c.Z(n._out[e])}))}setNodes(n,e){var t=arguments,r=this;return s.Z(n,(function(n){t.length>1?r.setNode(n,e):r.setNode(n)})),this}setNode(n,e){return r.Z(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=e),this):(this._nodes[n]=arguments.length>1?e:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=C,this._children[n]={},this._children[C][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)}node(n){return this._nodes[n]}hasNode(n){return r.Z(this._nodes,n)}removeNode(n){var e=this;if(r.Z(this._nodes,n)){var t=function(n){e.removeEdge(e._edgeObjs[n])};delete this._nodes[n],this._isCompound&&(this._removeFromParentsChildList(n),delete this._parent[n],s.Z(this.children(n),(function(n){e.setParent(n)})),delete this._children[n]),s.Z(u.Z(this._in[n]),t),delete this._in[n],delete this._preds[n],s.Z(u.Z(this._out[n]),t),delete this._out[n],delete this._sucs[n],--this._nodeCount}return this}setParent(n,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(d.Z(e))e=C;else{for(var t=e+="";!d.Z(t);t=this.parent(t))if(t===n)throw new Error("Setting "+e+" as parent of "+n+" would create a cycle");this.setNode(e)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=e,this._children[e][n]=!0,this}_removeFromParentsChildList(n){delete this._children[this._parent[n]][n]}parent(n){if(this._isCompound){var e=this._parent[n];if(e!==C)return e}}children(n){if(d.Z(n)&&(n=C),this._isCompound){var e=this._children[n];if(e)return u.Z(e)}else{if(n===C)return this.nodes();if(this.hasNode(n))return[]}}predecessors(n){var e=this._preds[n];if(e)return u.Z(e)}successors(n){var e=this._sucs[n];if(e)return u.Z(e)}neighbors(n){var e=this.predecessors(n);if(e)return j(e,this.successors(n))}isLeaf(n){return 0===(this.isDirected()?this.successors(n):this.neighbors(n)).length}filterNodes(n){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var t=this;s.Z(this._nodes,(function(t,r){n(r)&&e.setNode(r,t)})),s.Z(this._edgeObjs,(function(n){e.hasNode(n.v)&&e.hasNode(n.w)&&e.setEdge(n,t.edge(n))}));var r={};function o(n){var i=t.parent(n);return void 0===i||e.hasNode(i)?(r[n]=i,i):i in r?r[i]:o(i)}return this._isCompound&&s.Z(e.nodes(),(function(n){e.setParent(n,o(n))})),e}setDefaultEdgeLabel(n){return i.Z(n)||(n=o.Z(n)),this._defaultEdgeLabelFn=n,this}edgeCount(){return this._edgeCount}edges(){return k.Z(this._edgeObjs)}setPath(n,e){var t=this,r=arguments;return x.Z(n,(function(n,o){return r.length>1?t.setEdge(n,o,e):t.setEdge(n,o),o})),this}setEdge(){var n,e,t,o,i=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(n=u.v,e=u.w,t=u.name,2===arguments.length&&(o=arguments[1],i=!0)):(n=u,e=arguments[1],t=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),n=""+n,e=""+e,d.Z(t)||(t=""+t);var a=R(this._isDirected,n,e,t);if(r.Z(this._edgeLabels,a))return i&&(this._edgeLabels[a]=o),this;if(!d.Z(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(e),this._edgeLabels[a]=i?o:this._defaultEdgeLabelFn(n,e,t);var c=function(n,e,t,r){var o=""+e,i=""+t;if(!n&&o>i){var u=o;o=i,i=u}var a={v:o,w:i};return r&&(a.name=r),a}(this._isDirected,n,e,t);return n=c.v,e=c.w,Object.freeze(c),this._edgeObjs[a]=c,L(this._preds[e],n),L(this._sucs[n],e),this._in[e][a]=c,this._out[n][a]=c,this._edgeCount++,this}edge(n,e,t){var r=1===arguments.length?A(this._isDirected,arguments[0]):R(this._isDirected,n,e,t);return this._edgeLabels[r]}hasEdge(n,e,t){var o=1===arguments.length?A(this._isDirected,arguments[0]):R(this._isDirected,n,e,t);return r.Z(this._edgeLabels,o)}removeEdge(n,e,t){var r=1===arguments.length?A(this._isDirected,arguments[0]):R(this._isDirected,n,e,t),o=this._edgeObjs[r];return o&&(n=o.v,e=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],M(this._preds[e],n),M(this._sucs[n],e),delete this._in[e][r],delete this._out[n][r],this._edgeCount--),this}inEdges(n,e){var t=this._in[n];if(t){var r=k.Z(t);return e?a.Z(r,(function(n){return n.v===e})):r}}outEdges(n,e){var t=this._out[n];if(t){var r=k.Z(t);return e?a.Z(r,(function(n){return n.w===e})):r}}nodeEdges(n,e){var t=this.inEdges(n,e);if(t)return t.concat(this.outEdges(n,e))}}function L(n,e){n[e]?n[e]++:n[e]=1}function M(n,e){--n[e]||delete n[e]}function R(n,e,t,r){var o=""+e,i=""+t;if(!n&&o>i){var u=o;o=i,i=u}return o+O+i+O+(d.Z(r)?N:r)}function A(n,e){return R(n,e.v,e.w,e.name)}I.prototype._nodeCount=0,I.prototype._edgeCount=0},67406:(n,e,t)=>{t.d(e,{k:()=>r.k});var r=t(7303)},40105:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(24395);function o(n){var e=-1,t=null==n?0:n.length;for(this.__data__=new r.Z;++e<t;)this.add(n[e])}o.prototype.add=o.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},o.prototype.has=function(n){return this.__data__.has(n)};const i=o},97640:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){for(var t=-1,r=null==n?0:n.length;++t<r&&!1!==e(n[t],t,n););return n}},11819:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){for(var t=-1,r=null==n?0:n.length,o=0,i=[];++t<r;){var u=n[t];e(u,t,n)&&(i[o++]=u)}return i}},33043:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){for(var t=-1,r=null==n?0:n.length,o=Array(r);++t<r;)o[t]=e(n[t],t,n);return o}},47032:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){for(var t=-1,r=e.length,o=n.length;++t<r;)n[o+t]=e[t];return n}},47853:(n,e,t)=>{t.d(e,{Z:()=>V});var r=t(82948),o=t(97640),i=t(15561),u=t(47313),a=t(11723);var c=t(48441);var s=t(64405),d=t(93580),f=t(96346);var h=t(47032),v=t(72784),l=t(99176);const Z=Object.getOwnPropertySymbols?function(n){for(var e=[];n;)(0,h.Z)(e,(0,f.Z)(n)),n=(0,v.Z)(n);return e}:l.Z;var g=t(13911),p=t(47769);const b=function(n){return(0,p.Z)(n,c.Z,Z)};var w=t(41182),m=Object.prototype.hasOwnProperty;var _=t(52049);var y=/\w*$/;var E=t(91642),j=E.Z?E.Z.prototype:void 0,k=j?j.valueOf:void 0;var x=t(61601);const N=function(n,e,t){var r,o,i,u=n.constructor;switch(e){case"[object ArrayBuffer]":return(0,_.Z)(n);case"[object Boolean]":case"[object Date]":return new u(+n);case"[object DataView]":return function(n,e){var t=e?(0,_.Z)(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}(n,t);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(0,x.Z)(n,t);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(n);case"[object RegExp]":return(i=new(o=n).constructor(o.source,y.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return r=n,k?Object(k.call(r)):{}}};var C=t(95764),O=t(64058),I=t(23230),L=t(9615);var M=t(20274),R=t(53594),A=R.Z&&R.Z.isMap;const P=A?(0,M.Z)(A):function(n){return(0,L.Z)(n)&&"[object Map]"==(0,w.Z)(n)};var T=t(60417);var S=R.Z&&R.Z.isSet;const F=S?(0,M.Z)(S):function(n){return(0,L.Z)(n)&&"[object Set]"==(0,w.Z)(n)};var D="[object Arguments]",B="[object Function]",G="[object Object]",U={};U[D]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U[G]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U[B]=U["[object WeakMap]"]=!1;const V=function n(e,t,h,v,l,p){var _,y=1&t,E=2&t,j=4&t;if(h&&(_=l?h(e,v,l,p):h(e)),void 0!==_)return _;if(!(0,T.Z)(e))return e;var k=(0,O.Z)(e);if(k){if(_=function(n){var e=n.length,t=new n.constructor(e);return e&&"string"==typeof n[0]&&m.call(n,"index")&&(t.index=n.index,t.input=n.input),t}(e),!y)return(0,d.Z)(e,_)}else{var x=(0,w.Z)(e),L=x==B||"[object GeneratorFunction]"==x;if((0,I.Z)(e))return(0,s.Z)(e,y);if(x==G||x==D||L&&!l){if(_=E||L?{}:(0,C.Z)(e),!y)return E?function(n,e){return(0,u.Z)(n,Z(n),e)}(e,function(n,e){return n&&(0,u.Z)(e,(0,c.Z)(e),n)}(_,e)):function(n,e){return(0,u.Z)(n,(0,f.Z)(n),e)}(e,function(n,e){return n&&(0,u.Z)(e,(0,a.Z)(e),n)}(_,e))}else{if(!U[x])return l?e:{};_=N(e,x,y)}}p||(p=new r.Z);var M=p.get(e);if(M)return M;p.set(e,_),F(e)?e.forEach((function(r){_.add(n(r,t,h,r,e,p))})):P(e)&&e.forEach((function(r,o){_.set(o,n(r,t,h,o,e,p))}));var R=j?E?b:g.Z:E?c.Z:a.Z,A=k?void 0:R(e);return(0,o.Z)(A||e,(function(r,o){A&&(r=e[o=r]),(0,i.Z)(_,o,n(r,t,h,o,e,p))})),_}},77201:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(6202),o=t(69959);const i=(u=r.Z,function(n,e){if(null==n)return n;if(!(0,o.Z)(n))return u(n,e);for(var t=n.length,r=-1,i=Object(n);++r<t&&!1!==e(i[r],r,i););return n});var u},9872:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e,t,r){for(var o=n.length,i=t+(r?1:-1);r?i--:++i<o;)if(e(n[i],i,n))return i;return-1}},65029:(n,e,t)=>{t.d(e,{Z:()=>s});var r=t(47032),o=t(91642),i=t(9028),u=t(64058),a=o.Z?o.Z.isConcatSpreadable:void 0;const c=function(n){return(0,u.Z)(n)||(0,i.Z)(n)||!!(a&&n&&n[a])},s=function n(e,t,o,i,u){var a=-1,s=e.length;for(o||(o=c),u||(u=[]);++a<s;){var d=e[a];t>0&&o(d)?t>1?n(d,t-1,o,i,u):(0,r.Z)(u,d):i||(u[u.length]=d)}return u}},6202:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(49399),o=t(11723);const i=function(n,e){return n&&(0,r.Z)(n,e,o.Z)}},78402:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(94022),o=t(13550);const i=function(n,e){for(var t=0,i=(e=(0,r.Z)(e,n)).length;null!=n&&t<i;)n=n[(0,o.Z)(e[t++])];return t&&t==i?n:void 0}},47769:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(47032),o=t(64058);const i=function(n,e,t){var i=e(n);return(0,o.Z)(n)?i:(0,r.Z)(i,t(n))}},11097:(n,e,t)=>{t.d(e,{Z:()=>G});var r=t(82948),o=t(40105);const i=function(n,e){for(var t=-1,r=null==n?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1};var u=t(8142);const a=function(n,e,t,r,a,c){var s=1&t,d=n.length,f=e.length;if(d!=f&&!(s&&f>d))return!1;var h=c.get(n),v=c.get(e);if(h&&v)return h==e&&v==n;var l=-1,Z=!0,g=2&t?new o.Z:void 0;for(c.set(n,e),c.set(e,n);++l<d;){var p=n[l],b=e[l];if(r)var w=s?r(b,p,l,e,n,c):r(p,b,l,n,e,c);if(void 0!==w){if(w)continue;Z=!1;break}if(g){if(!i(e,(function(n,e){if(!(0,u.Z)(g,e)&&(p===n||a(p,n,t,r,c)))return g.push(e)}))){Z=!1;break}}else if(p!==b&&!a(p,b,t,r,c)){Z=!1;break}}return c.delete(n),c.delete(e),Z};var c=t(91642),s=t(41049),d=t(35050);const f=function(n){var e=-1,t=Array(n.size);return n.forEach((function(n,r){t[++e]=[r,n]})),t};var h=t(70035),v=c.Z?c.Z.prototype:void 0,l=v?v.valueOf:void 0;var Z=t(13911),g=Object.prototype.hasOwnProperty;var p=t(41182),b=t(64058),w=t(23230),m=t(14923),_="[object Arguments]",y="[object Array]",E="[object Object]",j=Object.prototype.hasOwnProperty;const k=function(n,e,t,o,i,u){var c=(0,b.Z)(n),v=(0,b.Z)(e),k=c?y:(0,p.Z)(n),x=v?y:(0,p.Z)(e),N=(k=k==_?E:k)==E,C=(x=x==_?E:x)==E,O=k==x;if(O&&(0,w.Z)(n)){if(!(0,w.Z)(e))return!1;c=!0,N=!1}if(O&&!N)return u||(u=new r.Z),c||(0,m.Z)(n)?a(n,e,t,o,i,u):function(n,e,t,r,o,i,u){switch(t){case"[object DataView]":if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(n.byteLength!=e.byteLength||!i(new s.Z(n),new s.Z(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,d.Z)(+n,+e);case"[object Error]":return n.name==e.name&&n.message==e.message;case"[object RegExp]":case"[object String]":return n==e+"";case"[object Map]":var c=f;case"[object Set]":var v=1&r;if(c||(c=h.Z),n.size!=e.size&&!v)return!1;var Z=u.get(n);if(Z)return Z==e;r|=2,u.set(n,e);var g=a(c(n),c(e),r,o,i,u);return u.delete(n),g;case"[object Symbol]":if(l)return l.call(n)==l.call(e)}return!1}(n,e,k,t,o,i,u);if(!(1&t)){var I=N&&j.call(n,"__wrapped__"),L=C&&j.call(e,"__wrapped__");if(I||L){var M=I?n.value():n,R=L?e.value():e;return u||(u=new r.Z),i(M,R,t,o,u)}}return!!O&&(u||(u=new r.Z),function(n,e,t,r,o,i){var u=1&t,a=(0,Z.Z)(n),c=a.length;if(c!=(0,Z.Z)(e).length&&!u)return!1;for(var s=c;s--;){var d=a[s];if(!(u?d in e:g.call(e,d)))return!1}var f=i.get(n),h=i.get(e);if(f&&h)return f==e&&h==n;var v=!0;i.set(n,e),i.set(e,n);for(var l=u;++s<c;){var p=n[d=a[s]],b=e[d];if(r)var w=u?r(b,p,d,e,n,i):r(p,b,d,n,e,i);if(!(void 0===w?p===b||o(p,b,t,r,i):w)){v=!1;break}l||(l="constructor"==d)}if(v&&!l){var m=n.constructor,_=e.constructor;m==_||!("constructor"in n)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _||(v=!1)}return i.delete(n),i.delete(e),v}(n,e,t,o,i,u))};var x=t(9615);const N=function n(e,t,r,o,i){return e===t||(null==e||null==t||!(0,x.Z)(e)&&!(0,x.Z)(t)?e!=e&&t!=t:k(e,t,r,o,n,i))};var C=t(60417);const O=function(n){return n==n&&!(0,C.Z)(n)};var I=t(11723);const L=function(n,e){return function(t){return null!=t&&t[n]===e&&(void 0!==e||n in Object(t))}},M=function(n){var e=function(n){for(var e=(0,I.Z)(n),t=e.length;t--;){var r=e[t],o=n[r];e[t]=[r,o,O(o)]}return e}(n);return 1==e.length&&e[0][2]?L(e[0][0],e[0][1]):function(t){return t===n||function(n,e,t,o){var i=t.length,u=i,a=!o;if(null==n)return!u;for(n=Object(n);i--;){var c=t[i];if(a&&c[2]?c[1]!==n[c[0]]:!(c[0]in n))return!1}for(;++i<u;){var s=(c=t[i])[0],d=n[s],f=c[1];if(a&&c[2]){if(void 0===d&&!(s in n))return!1}else{var h=new r.Z;if(o)var v=o(d,f,s,n,e,h);if(!(void 0===v?N(f,d,3,o,h):v))return!1}}return!0}(t,n,e)}};var R=t(78402);var A=t(94180),P=t(3818),T=t(13550);const S=function(n,e){return(0,P.Z)(n)&&O(e)?L((0,T.Z)(n),e):function(t){var r=function(n,e,t){var r=null==n?void 0:(0,R.Z)(n,e);return void 0===r?t:r}(t,n);return void 0===r&&r===e?(0,A.Z)(t,n):N(e,r,3)}};var F=t(64056),D=t(4561);const B=function(n){return(0,P.Z)(n)?(0,D.Z)((0,T.Z)(n)):function(n){return function(e){return(0,R.Z)(e,n)}}(n)},G=function(n){return"function"==typeof n?n:null==n?F.Z:"object"==typeof n?(0,b.Z)(n)?S(n[0],n[1]):M(n):B(n)}},15521:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(77201),o=t(69959);const i=function(n,e){var t=-1,i=(0,o.Z)(n)?Array(n.length):[];return(0,r.Z)(n,(function(n,r,o){i[++t]=e(n,r,o)})),i}},4561:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n){return function(e){return null==e?void 0:e[n]}}},8142:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n,e){return n.has(e)}},87073:(n,e,t)=>{t.d(e,{Z:()=>o});var r=t(64056);const o=function(n){return"function"==typeof n?n:r.Z}},94022:(n,e,t)=>{t.d(e,{Z:()=>h});var r=t(64058),o=t(3818),i=t(86861),u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const c=(s=(0,i.Z)((function(n){var e=[];return 46===n.charCodeAt(0)&&e.push(""),n.replace(u,(function(n,t,r,o){e.push(r?o.replace(a,"$1"):t||n)})),e}),(function(n){return 500===d.size&&d.clear(),n})),d=s.cache,s);var s,d,f=t(70023);const h=function(n,e){return(0,r.Z)(n)?n:(0,o.Z)(n,e)?[n]:c((0,f.Z)(n))}},13911:(n,e,t)=>{t.d(e,{Z:()=>u});var r=t(47769),o=t(96346),i=t(11723);const u=function(n){return(0,r.Z)(n,i.Z,o.Z)}},96346:(n,e,t)=>{t.d(e,{Z:()=>a});var r=t(11819),o=t(99176),i=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols;const a=u?function(n){return null==n?[]:(n=Object(n),(0,r.Z)(u(n),(function(e){return i.call(n,e)})))}:o.Z},18625:(n,e,t)=>{t.d(e,{Z:()=>s});var r=t(94022),o=t(9028),i=t(64058),u=t(8616),a=t(30918),c=t(13550);const s=function(n,e,t){for(var s=-1,d=(e=(0,r.Z)(e,n)).length,f=!1;++s<d;){var h=(0,c.Z)(e[s]);if(!(f=null!=n&&t(n,h)))break;n=n[h]}return f||++s!=d?f:!!(d=null==n?0:n.length)&&(0,a.Z)(d)&&(0,u.Z)(h,d)&&((0,i.Z)(n)||(0,o.Z)(n))}},3818:(n,e,t)=>{t.d(e,{Z:()=>a});var r=t(64058),o=t(59660),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;const a=function(n,e){if((0,r.Z)(n))return!1;var t=typeof n;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=n&&!(0,o.Z)(n))||u.test(n)||!i.test(n)||null!=e&&n in Object(e)}},70035:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n){var e=-1,t=Array(n.size);return n.forEach((function(n){t[++e]=n})),t}},13550:(n,e,t)=>{t.d(e,{Z:()=>o});var r=t(59660);const o=function(n){if("string"==typeof n||(0,r.Z)(n))return n;var e=n+"";return"0"==e&&1/n==-1/0?"-0":e}},65479:(n,e,t)=>{t.d(e,{Z:()=>s});var r=t(99719),o=t(35050),i=t(47952),u=t(48441),a=Object.prototype,c=a.hasOwnProperty;const s=(0,r.Z)((function(n,e){n=Object(n);var t=-1,r=e.length,s=r>2?e[2]:void 0;for(s&&(0,i.Z)(e[0],e[1],s)&&(r=1);++t<r;)for(var d=e[t],f=(0,u.Z)(d),h=-1,v=f.length;++h<v;){var l=f[h],Z=n[l];(void 0===Z||(0,o.Z)(Z,a[l])&&!c.call(n,l))&&(n[l]=d[l])}return n}))},35090:(n,e,t)=>{t.d(e,{Z:()=>c});var r=t(11819),o=t(77201);const i=function(n,e){var t=[];return(0,o.Z)(n,(function(n,r,o){e(n,r,o)&&t.push(n)})),t};var u=t(11097),a=t(64058);const c=function(n,e){return((0,a.Z)(n)?r.Z:i)(n,(0,u.Z)(e,3))}},28099:(n,e,t)=>{t.d(e,{Z:()=>o});var r=t(65029);const o=function(n){return null!=n&&n.length?(0,r.Z)(n,1):[]}},21845:(n,e,t)=>{t.d(e,{Z:()=>a});var r=t(97640),o=t(77201),i=t(87073),u=t(64058);const a=function(n,e){return((0,u.Z)(n)?r.Z:o.Z)(n,(0,i.Z)(e))}},36004:(n,e,t)=>{t.d(e,{Z:()=>u});var r=Object.prototype.hasOwnProperty;const o=function(n,e){return null!=n&&r.call(n,e)};var i=t(18625);const u=function(n,e){return null!=n&&(0,i.Z)(n,e,o)}},94180:(n,e,t)=>{t.d(e,{Z:()=>i});const r=function(n,e){return null!=n&&e in Object(n)};var o=t(18625);const i=function(n,e){return null!=n&&(0,o.Z)(n,e,r)}},59660:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(77070),o=t(9615);const i=function(n){return"symbol"==typeof n||(0,o.Z)(n)&&"[object Symbol]"==(0,r.Z)(n)}},52307:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(n){return void 0===n}},11723:(n,e,t)=>{t.d(e,{Z:()=>u});var r=t(40709),o=t(45934),i=t(69959);const u=function(n){return(0,i.Z)(n)?(0,r.Z)(n):(0,o.Z)(n)}},12930:(n,e,t)=>{t.d(e,{Z:()=>a});var r=t(33043),o=t(11097),i=t(15521),u=t(64058);const a=function(n,e){return((0,u.Z)(n)?r.Z:i.Z)(n,(0,o.Z)(e,3))}},87768:(n,e,t)=>{t.d(e,{Z:()=>Z});var r=t(78402),o=t(15561),i=t(94022),u=t(8616),a=t(60417),c=t(13550);const s=function(n,e,t,r){if(!(0,a.Z)(n))return n;for(var s=-1,d=(e=(0,i.Z)(e,n)).length,f=d-1,h=n;null!=h&&++s<d;){var v=(0,c.Z)(e[s]),l=t;if("__proto__"===v||"constructor"===v||"prototype"===v)return n;if(s!=f){var Z=h[v];void 0===(l=r?r(Z,v,h):void 0)&&(l=(0,a.Z)(Z)?Z:(0,u.Z)(e[s+1])?[]:{})}(0,o.Z)(h,v,l),h=h[v]}return n};var d=t(94180);const f=function(n,e){return function(n,e,t){for(var o=-1,u=e.length,a={};++o<u;){var c=e[o],d=(0,r.Z)(n,c);t(d,c)&&s(a,(0,i.Z)(c,n),d)}return a}(n,e,(function(e,t){return(0,d.Z)(n,t)}))};var h=t(28099),v=t(15829),l=t(71649);const Z=(g=function(n,e){return null==n?{}:f(n,e)},(0,l.Z)((0,v.Z)(g,void 0,h.Z),g+""));var g},36735:(n,e,t)=>{t.d(e,{Z:()=>a});var r=Math.ceil,o=Math.max;var i=t(47952),u=t(41291);const a=function(n,e,t){return t&&"number"!=typeof t&&(0,i.Z)(n,e,t)&&(e=t=void 0),n=(0,u.Z)(n),void 0===e?(e=n,n=0):e=(0,u.Z)(e),function(n,e,t,i){for(var u=-1,a=o(r((e-n)/(t||1)),0),c=Array(a);a--;)c[i?a:++u]=n,n+=t;return c}(n,e,t=void 0===t?n<e?1:-1:(0,u.Z)(t),void 0)}},99413:(n,e,t)=>{t.d(e,{Z:()=>c});const r=function(n,e,t,r){var o=-1,i=null==n?0:n.length;for(r&&i&&(t=n[++o]);++o<i;)t=e(t,n[o],o,n);return t};var o=t(77201),i=t(11097);const u=function(n,e,t,r,o){return o(n,(function(n,o,i){t=r?(r=!1,n):e(t,n,o,i)})),t};var a=t(64058);const c=function(n,e,t){var c=(0,a.Z)(n)?r:u,s=arguments.length<3;return c(n,(0,i.Z)(e,4),t,s,o.Z)}},99176:(n,e,t)=>{t.d(e,{Z:()=>r});const r=function(){return[]}},41291:(n,e,t)=>{t.d(e,{Z:()=>h});var r=/\s/;var o=/^\s+/;const i=function(n){return n?n.slice(0,function(n){for(var e=n.length;e--&&r.test(n.charAt(e)););return e}(n)+1).replace(o,""):n};var u=t(60417),a=t(59660),c=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,d=/^0o[0-7]+$/i,f=parseInt;const h=function(n){return n?Infinity===(n=function(n){if("number"==typeof n)return n;if((0,a.Z)(n))return NaN;if((0,u.Z)(n)){var e="function"==typeof n.valueOf?n.valueOf():n;n=(0,u.Z)(e)?e+"":e}if("string"!=typeof n)return 0===n?n:+n;n=i(n);var t=s.test(n);return t||d.test(n)?f(n.slice(2),t?2:8):c.test(n)?NaN:+n}(n))||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}},70023:(n,e,t)=>{t.d(e,{Z:()=>d});var r=t(91642),o=t(33043),i=t(64058),u=t(59660),a=r.Z?r.Z.prototype:void 0,c=a?a.toString:void 0;const s=function n(e){if("string"==typeof e)return e;if((0,i.Z)(e))return(0,o.Z)(e,n)+"";if((0,u.Z)(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},d=function(n){return null==n?"":s(n)}},12451:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(70023),o=0;const i=function(n){var e=++o;return(0,r.Z)(n)+e}},88873:(n,e,t)=>{t.d(e,{Z:()=>i});var r=t(33043);var o=t(11723);const i=function(n){return null==n?[]:function(n,e){return(0,r.Z)(e,(function(e){return n[e]}))}(n,(0,o.Z)(n))}}}]);
|
notebook/static/7302.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7302,3768],{83768:(e,t,o)=>{o.r(t),o.d(t,{default:()=>F});var n=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7302,3768],{83768:(e,t,o)=>{o.r(t),o.d(t,{default:()=>F});var n=o(72703),r=o(65848),i=o(37383),a=o(89150),s=o(94101),l=o(58326),d=o(70858),c=o(95291),g=o(81997),u=o(63485),w=o(77674),h=o(78156),b=o.n(h);class p{constructor(e){this._onSelectionChanged=()=>{var e,t,o,n,r,i;const a=Array.from(this._browser.selectedItems()),s=a.length>0,l=a.some((e=>"directory"===e.type));null===(e=this._widgets.get("placeholder"))||void 0===e||e.setHidden(s),null===(t=this._widgets.get("delete"))||void 0===t||t.setHidden(!s),null===(o=this._widgets.get("duplicate"))||void 0===o||o.setHidden(!s||l),null===(n=this._widgets.get("download"))||void 0===n||n.setHidden(!s||l),null===(r=this._widgets.get("open"))||void 0===r||r.setHidden(!s||l),null===(i=this._widgets.get("rename"))||void 0===i||i.setHidden(1!==a.length)},this._widgets=new Map,this._browser=e.browser;const{commands:t,selectionChanged:o,translator:r}=e,i=r.load("notebook"),a=n.ReactWidget.create(b().createElement("div",{key:"placeholder"},i.__("Select items to perform actions on them.")));a.id="fileAction-placeholder",this._widgets.set("placeholder",a),["open","download","rename","duplicate","delete"].forEach((e=>{const o=n.ReactWidget.create(b().createElement(n.CommandToolbarButtonComponent,{key:e,commands:t,id:`filebrowser:${e}`,args:{toolbar:!0},icon:void 0}));o.id=`fileAction-${e}`,o.addClass("jp-ToolbarButton"),o.addClass("jp-FileAction"),this._widgets.set(e,o)})),o.connect(this._onSelectionChanged,this),this._onSelectionChanged()}get widgets(){return this._widgets.values()}}const m="FileBrowser";var f;!function(e){e.activate="filebrowser:activate"}(f||(f={}));const _={id:"@jupyter-notebook/tree-extension:new",description:"Plugin to add extra commands to the file browser to create new notebooks, files, consoles and terminals.",requires:[d.ITranslator],optional:[n.IToolbarWidgetRegistry],autoStart:!0,activate:(e,t,o)=>{var n;const{commands:r,serviceManager:i}=e,a=t.load("notebook"),s={overflowMenuOptions:{isVisible:!1}},l=new u.MenuBar(s),d=new u.Menu({commands:r});d.title.label=a.__("New"),d.title.icon=c.caretDownIcon,l.addMenu(d);const g=()=>{var e,t;const o=null===(t=null===(e=i.kernelspecs)||void 0===e?void 0:e.specs)||void 0===t?void 0:t.kernelspecs;for(const e in o)d.addItem({args:{kernelName:e,isLauncher:!0},command:"notebook:create-new"});["terminal:create-new","console:create","filebrowser:create-new-file","filebrowser:create-new-directory"].forEach((e=>{d.addItem({command:e})}))};null===(n=i.kernelspecs)||void 0===n||n.specsChanged.connect((()=>{d.clearItems(),g()})),g(),o&&o.addFactory(m,"new-dropdown",(e=>{const t=new u.MenuBar(s);return t.addMenu(d),t.addClass("jp-DropdownMenu"),t}))}},v={id:"@jupyter-notebook/tree-extension:file-actions",description:"A plugin to add file browser actions to the file browser toolbar.",autoStart:!0,requires:[i.IDefaultFileBrowser,n.IToolbarWidgetRegistry,d.ITranslator],activate:(e,t,o,n)=>{const r=new g.Signal(t);["_selectItem","_handleMultiSelect","handleFileSelect"].forEach((e=>{const o=t.listing[e];t.listing[e]=(...e)=>{o.call(t.listing,...e),r.emit(void 0)}}));const{commands:i}=e,a=new p({commands:i,browser:t,selectionChanged:r,translator:n});for(const e of a.widgets)o.addFactory(m,e.id,(()=>e))}},y={id:"@jupyter-notebook/tree-extension:load-plugins",description:"Plugin to load the default plugins that are loaded on all the Notebook pages (tree, edit, view, etc.) so they are visible in the settings editor.",autoStart:!0,requires:[a.ISettingRegistry],activate(e,t){const{isDisabled:o}=r.PageConfig.Extension,n=t.connector,i=r.PageConfig.getOption("allPlugins");if(!i)return;const a=JSON.parse(i),s=new Set;Object.keys(a).forEach((e=>{const t=a[e];Object.keys(t).forEach((e=>{const o=t[e];"boolean"==typeof o&&o?s.add(e):Array.isArray(o)&&o.forEach((e=>{s.add(e)}))}))})),e.restored.then((async()=>{(await n.list("all")).ids.forEach((async e=>{const[n]=e.split(":");if((s.has(n)||s.has(e))&&!o(e)&&!(e in t.plugins))try{await t.load(e)}catch(t){console.warn(`Settings failed to load for (${e})`,t)}}))}))}},k={id:"@jupyter-notebook/tree-extension:open-file-browser",description:"A plugin to add file browser commands for the tree view.",requires:[w.INotebookTree,i.IDefaultFileBrowser],autoStart:!0,activate:(e,t,o)=>{const{commands:n}=e;n.addCommand(f.activate,{execute:()=>{t.currentWidget=o}})}},S={id:"@jupyter-notebook/tree-extension:widget",description:"A plugin to add the file browser widget to an INotebookShell.",requires:[i.IDefaultFileBrowser,d.ITranslator,a.ISettingRegistry,n.IToolbarWidgetRegistry,i.IFileBrowserFactory],optional:[s.IRunningSessionManagers,l.ISettingEditorTracker,l.IJSONSettingEditorTracker],autoStart:!0,provides:w.INotebookTree,activate:(e,t,o,r,a,l,d,g,u)=>{const h=new w.NotebookTreeWidget,b=o.load("notebook");if(t.title.label=b.__("Files"),t.node.setAttribute("role","region"),t.node.setAttribute("aria-label",b.__("File Browser Section")),t.title.icon=c.folderIcon,h.addWidget(t),h.tabBar.addTab(t.title),h.tabsMovable=!1,a.addFactory(m,"uploader",(e=>new i.Uploader({model:e.model,translator:o,label:b.__("Upload")}))),a.addFactory(m,"fileNameSearcher",(e=>{const t=(0,c.FilenameSearcher)({updateFilter:(t,o)=>{e.model.setFilter((e=>t(e.name.toLowerCase())))},useFuzzyFilter:!0,placeholder:b.__("Filter files by name"),forceRefresh:!0});return t.addClass("jp-FileBrowser-filterBox"),t})),(0,n.setToolbar)(t,(0,n.createToolbarFactory)(a,r,m,S.id,o)),d){const e=new s.RunningSessions(d,o);e.id="jp-running-sessions-tree",e.title.label=b.__("Running"),e.title.icon=c.runningIcon,h.addWidget(e),h.tabBar.addTab(e.title)}const p=r.load("@jupyterlab/filebrowser-extension:browser");Promise.all([p,e.restored]).then((([e])=>{["showFileCheckboxes","showFileSizeColumn","sortNotebooksFirst","showFullPath"].forEach((t=>{void 0===e.user[t]&&e.set(t,!0)}))})).catch((e=>{console.error(e.message)})),e.shell.add(h,"main",{rank:100}),[g,u].forEach((e=>{e&&e.widgetAdded.connect(((e,t)=>{h.addWidget(t),h.tabBar.addTab(t.title),h.currentWidget=t}))}));const{tracker:f}=l,_=()=>{f._pool.current=t};return f.widgetAdded.connect(((e,t)=>_())),_(),h}},F=[_,v,y,k,S]}}]);
|
notebook/static/7386.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7386,4811],{37386:(e,t,o)=>{o.r(t),o.d(t,{CellBarExtension:()=>u,CellToolbarTracker:()=>c});var l=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7386,4811],{37386:(e,t,o)=>{o.r(t),o.d(t,{CellBarExtension:()=>u,CellToolbarTracker:()=>c});var l=o(72703),n=o(83978),a=o(95291),i=o(33625),s=o(81997);const r=["text/plain","application/vnd.jupyter.stdout","application/vnd.jupyter.stderr"],d="jp-toolbar-overlap";class c{constructor(e,t,o){if(this._isDisposed=!1,this._toolbar=null,this._toolbarItems=null,this._toolbarFactory=null,this._panel=e,this._previousActiveCell=this._panel.content.activeCell,this._toolbarItems=null!=t?t:null,this._toolbarFactory=null!=o?o:null,null===this._toolbarItems&&null===this._toolbarFactory)throw Error("You must provide the toolbarFactory or the toolbar items.");!this._toolbarFactory&&this._toolbarItems&&(this._onToolbarChanged(),this._toolbarItems.changed.connect(this._onToolbarChanged,this)),e.revealed.then((()=>{requestAnimationFrame((()=>{const t=e.content;this._onActiveCellChanged(t),t.activeCellChanged.connect(this._onActiveCellChanged,this),t.renderingLayoutChanged.connect(this._onActiveCellChanged,this),t.disposed.connect((()=>{t.activeCellChanged.disconnect(this._onActiveCellChanged)}))}))}))}_onMetadataChanged(e,t){"jupyter"===t.key&&("object"!=typeof t.newValue||!0!==t.newValue.source_hidden||"add"!==t.type&&"change"!==t.type?"object"==typeof t.oldValue&&!0===t.oldValue.source_hidden&&this._addToolbar(e):this._removeToolbar(e))}_onActiveCellChanged(e){this._previousActiveCell&&!this._previousActiveCell.isDisposed&&(this._removeToolbar(this._previousActiveCell.model),this._previousActiveCell.model.metadataChanged.disconnect(this._onMetadataChanged));const t=e.activeCell;this._previousActiveCell=t,null===t||t.inputHidden||(t.model.metadataChanged.connect(this._onMetadataChanged,this),this._addToolbar(t.model))}get isDisposed(){return this._isDisposed}dispose(){var e,t;this.isDisposed||(this._isDisposed=!0,null===(e=this._toolbarItems)||void 0===e||e.changed.disconnect(this._onToolbarChanged,this),null===(t=this._toolbar)||void 0===t||t.dispose(),this._panel=null,s.Signal.clearData(this))}_addToolbar(e){const t=this._getCell(e);if(t&&!t.isDisposed){const e=this._toolbar=new a.Toolbar;e.addClass("jp-cell-menu"),e.addClass("jp-cell-toolbar");const o=[t.ready];if(this._toolbarFactory)(0,l.setToolbar)(t,this._toolbarFactory,e),e.layout.widgets.forEach((e=>{e.update()}));else for(const{name:t,widget:l}of this._toolbarItems)e.addItem(t,l),l instanceof a.ReactWidget&&void 0!==l.renderPromise&&(l.update(),o.push(l.renderPromise));o.push(t.ready),Promise.all(o).then((()=>{var o;t.isDisposed||(null===(o=this._panel)||void 0===o?void 0:o.content.activeCell)!==t?e.dispose():(t.node.classList.add(d),t.inputArea.layout.insertWidget(0,e),t.displayChanged.connect(this._resizeEventCallback,this),t.model.contentChanged.connect(this._changedEventCallback,this),this._updateCellForToolbarOverlap(t))})).catch((e=>{console.error("Error rendering buttons of the cell toolbar: ",e)}))}}_getCell(e){var t;return null===(t=this._panel)||void 0===t?void 0:t.content.widgets.find((t=>t.model===e))}_removeToolbar(e){var t,o;const l=this._getCell(e);l&&!l.isDisposed&&l.displayChanged.disconnect(this._resizeEventCallback,this),e.contentChanged.disconnect(this._changedEventCallback,this),(null===(t=this._toolbar)||void 0===t?void 0:t.parent)===(null==l?void 0:l.inputArea)&&!1===(null===(o=this._toolbar)||void 0===o?void 0:o.isDisposed)&&this._toolbar.dispose()}_onToolbarChanged(){var e;const t=null===(e=this._panel)||void 0===e?void 0:e.content.activeCell;t&&(this._removeToolbar(t.model),this._addToolbar(t.model))}_changedEventCallback(){var e;const t=null===(e=this._panel)||void 0===e?void 0:e.content.activeCell;null!=t&&this._updateCellForToolbarOverlap(t)}_resizeEventCallback(){var e;const t=null===(e=this._panel)||void 0===e?void 0:e.content.activeCell;null!=t&&this._updateCellForToolbarOverlap(t)}_updateCellForToolbarOverlap(e){requestIdleCallback((()=>{const t=e.node;t.classList.remove(d),this._cellToolbarOverlapsContents(e)&&t.classList.add(d)}))}_cellToolbarOverlapsContents(e){var t,o,l,n;const a=e.model.type,i=null===(t=e.editorWidget)||void 0===t?void 0:t.node.getBoundingClientRect(),s=null!==(o=null==i?void 0:i.left)&&void 0!==o?o:0,r=null!==(l=null==i?void 0:i.right)&&void 0!==l?l:0,d=this._cellToolbarLeft(e);return null!==d&&((s+r)/2>d||("markdown"===a&&e.rendered?this._markdownOverlapsToolbar(e):"default"===(null===(n=this._panel)||void 0===n?void 0:n.content.renderingLayout)?this._codeOverlapsToolbar(e):this._outputOverlapsToolbar(e)))}_markdownOverlapsToolbar(e){const t=e.inputArea;if(!t)return!1;const o=t.renderedInput.node.firstElementChild;if(null===o)return!1;const l=o.style.maxWidth;o.style.maxWidth="max-content";const n=o.getBoundingClientRect().right;o.style.maxWidth=l;const a=this._cellToolbarLeft(e);return null!==a&&n>a}_outputOverlapsToolbar(e){const t=e.outputArea.node;if(t){const o=t.querySelectorAll("[data-mime-type]"),l=this._cellToolbarRect(e);if(l){const{left:e,bottom:t}=l;return(0,i.some)(o,(o=>{const l=o.firstElementChild;if(l){const n=new Range;r.includes(o.getAttribute("data-mime-type")||"")?n.selectNodeContents(l):n.selectNode(l);const{right:a,top:i}=n.getBoundingClientRect();return a>e&&i<t}return!1}))}}return!1}_codeOverlapsToolbar(e){const t=e.editorWidget,o=e.editor;if(!t||!o)return!1;if(o.lineCount<1)return!1;const l=t.node.getElementsByClassName("cm-line");if(l.length<1)return!1;let n=l[0].getBoundingClientRect().left;const a=document.createRange();a.selectNodeContents(l[0]),n+=a.getBoundingClientRect().width;const i=this._cellToolbarLeft(e);return null!==i&&n>i}_cellToolbarRect(e){var t;return(null===(t=this._toolbar)||void 0===t?void 0:t.parent)!==e.inputArea?null:this._toolbar.node.getBoundingClientRect()}_cellToolbarLeft(e){var t;return(null===(t=this._cellToolbarRect(e))||void 0===t?void 0:t.left)||null}}const h=[{command:"notebook:duplicate-below",name:"duplicate-cell"},{command:"notebook:move-cell-up",name:"move-cell-up"},{command:"notebook:move-cell-down",name:"move-cell-down"},{command:"notebook:insert-cell-above",name:"insert-cell-above"},{command:"notebook:insert-cell-below",name:"insert-cell-below"},{command:"notebook:delete-cell",name:"delete-cell"}];class u{constructor(e,t){this._commands=e,this._toolbarFactory=null!=t?t:this.defaultToolbarFactory}get defaultToolbarFactory(){const e=(0,l.createDefaultFactory)(this._commands);return t=>new n.ObservableList({values:h.map((o=>({name:o.name,widget:e(u.FACTORY_NAME,t,o)})))})}createNew(e){return new c(e,void 0,this._toolbarFactory)}}u.FACTORY_NAME="Cell"}}]);
|
notebook/static/7391.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7391],{77391:(e,t,i)=>{i.r(t),i.d(t,{COMPLETER_ACTIVE_CLASS:()=>D,COMPLETER_ENABLED_CLASS:()=>E,CodeEditor:()=>o,CodeEditorWrapper:()=>L,CodeViewerWidget:()=>j,IEditorMimeTypeService:()=>s,IEditorServices:()=>S,IPositionModel:()=>N,JSONEditor:()=>m,LineCol:()=>f});var s,o,n=i(57508),r=i(42503),a=i(81997);!function(e){e.defaultMimeType="text/plain"}(s||(s={})),function(e){e.Model=class{constructor(e={}){var t,i;this.standaloneModel=!1,this._isDisposed=!1,this._selections=new r.ObservableMap,this._mimeType=s.defaultMimeType,this._mimeTypeChanged=new a.Signal(this),this.standaloneModel=void 0===e.sharedModel,this.sharedModel=null!==(t=e.sharedModel)&&void 0!==t?t:new n.YFile,this._mimeType=null!==(i=e.mimeType)&&void 0!==i?i:s.defaultMimeType}get mimeTypeChanged(){return this._mimeTypeChanged}get selections(){return this._selections}get mimeType(){return this._mimeType}set mimeType(e){const t=this.mimeType;t!==e&&(this._mimeType=e,this._mimeTypeChanged.emit({name:"mimeType",oldValue:t,newValue:e}))}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._selections.dispose(),this.standaloneModel&&this.sharedModel.dispose(),a.Signal.clearData(this))}}}(o||(o={}));var d=i(90646),l=i(14576),h=i(20998),c=i(63485);const u="jp-mod-error";class m extends c.Widget{constructor(e){super(),this._dataDirty=!1,this._inputDirty=!1,this._source=null,this._originalValue=h.JSONExt.emptyObject,this._changeGuard=!1,this.translator=e.translator||d.nullTranslator,this._trans=this.translator.load("jupyterlab"),this.addClass("jp-JSONEditor"),this.headerNode=document.createElement("div"),this.headerNode.className="jp-JSONEditor-header",this.revertButtonNode=l.undoIcon.element({tag:"span",title:this._trans.__("Revert changes to data")}),this.commitButtonNode=l.checkIcon.element({tag:"span",title:this._trans.__("Commit changes to data"),marginLeft:"8px"}),this.editorHostNode=document.createElement("div"),this.editorHostNode.className="jp-JSONEditor-host",this.headerNode.appendChild(this.revertButtonNode),this.headerNode.appendChild(this.commitButtonNode),this.node.appendChild(this.headerNode),this.node.appendChild(this.editorHostNode);const t=new o.Model({mimeType:"application/json"});t.sharedModel.changed.connect(this._onModelChanged,this),this.model=t,this.editor=e.editorFactory({host:this.editorHostNode,model:t,config:{readOnly:!0}})}get source(){return this._source}set source(e){this._source!==e&&(this._source&&this._source.changed.disconnect(this._onSourceChanged,this),this._source=e,this.editor.setOption("readOnly",null===e),e&&e.changed.connect(this._onSourceChanged,this),this._setValue())}get isDirty(){return this._dataDirty||this._inputDirty}dispose(){var e;this.isDisposed||(null===(e=this.source)||void 0===e||e.dispose(),this.model.dispose(),this.editor.dispose(),super.dispose())}handleEvent(e){switch(e.type){case"blur":this._evtBlur(e);break;case"click":this._evtClick(e)}}onAfterAttach(e){const t=this.editorHostNode;t.addEventListener("blur",this,!0),t.addEventListener("click",this,!0),this.revertButtonNode.hidden=!0,this.commitButtonNode.hidden=!0,this.headerNode.addEventListener("click",this)}onBeforeDetach(e){const t=this.editorHostNode;t.removeEventListener("blur",this,!0),t.removeEventListener("click",this,!0),this.headerNode.removeEventListener("click",this)}_onSourceChanged(e,t){this._changeGuard||(this._inputDirty||this.editor.hasFocus()?this._dataDirty=!0:this._setValue())}_onModelChanged(e,t){if(t.sourceChange){let e=!0;try{const e=JSON.parse(this.editor.model.sharedModel.getSource());this.removeClass(u),this._inputDirty=!this._changeGuard&&!h.JSONExt.deepEqual(e,this._originalValue)}catch(t){this.addClass(u),this._inputDirty=!0,e=!1}this.revertButtonNode.hidden=!this._inputDirty,this.commitButtonNode.hidden=!e||!this._inputDirty}}_evtBlur(e){!this._inputDirty&&this._dataDirty&&this._setValue()}_evtClick(e){const t=e.target;this.revertButtonNode.contains(t)?this._setValue():this.commitButtonNode.contains(t)?this.commitButtonNode.hidden||this.hasClass(u)||(this._changeGuard=!0,this._mergeContent(),this._changeGuard=!1,this._setValue()):this.editorHostNode.contains(t)&&this.editor.focus()}_mergeContent(){const e=this.editor.model,t=this._originalValue,i=JSON.parse(e.sharedModel.getSource()),s=this.source;if(s){for(const e in i)h.JSONExt.deepEqual(i[e],t[e]||null)||s.set(e,i[e]);for(const e in t)e in i||s.delete(e)}}_setValue(){this._dataDirty=!1,this._inputDirty=!1,this.revertButtonNode.hidden=!0,this.commitButtonNode.hidden=!0,this.removeClass(u);const e=this.editor.model,t=this._source?this._source.toJSON():{};if(this._changeGuard=!0,void 0===t)e.sharedModel.setSource(this._trans.__("No data!")),this._originalValue=h.JSONExt.emptyObject;else{const i=JSON.stringify(t,null,4);e.sharedModel.setSource(i),this._originalValue=t,i.length>1&&"{"===i[0]&&this.editor.setCursorPosition({line:0,column:1})}this._changeGuard=!1,this.commitButtonNode.hidden=!0,this.revertButtonNode.hidden=!0}}var p=i(47652),_=i(78156),g=i.n(_),v=i(20005);class C extends g().Component{constructor(e){super(e),this._handleChange=e=>{this.setState({value:e.currentTarget.value})},this._handleSubmit=e=>{e.preventDefault();const t=parseInt(this._textInput.value,10);return!isNaN(t)&&isFinite(t)&&1<=t&&t<=this.props.maxLine&&this.props.handleSubmit(t),!1},this._handleFocus=()=>{this.setState({hasFocus:!0})},this._handleBlur=()=>{this.setState({hasFocus:!1})},this._textInput=null,this.translator=e.translator||d.nullTranslator,this._trans=this.translator.load("jupyterlab"),this.state={value:"",hasFocus:!1,textInputId:v.DOMUtils.createDomID()+"-line-number-input"}}componentDidMount(){this._textInput.focus()}render(){return g().createElement("div",{className:"jp-lineFormSearch"},g().createElement("form",{name:"lineColumnForm",onSubmit:this._handleSubmit,noValidate:!0},g().createElement("div",{className:(0,l.classes)("jp-lineFormWrapper","lm-lineForm-wrapper",this.state.hasFocus?"jp-lineFormWrapperFocusWithin":void 0)},g().createElement("input",{type:"text",id:this.state.textInputId,className:"jp-lineFormInput",onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this._handleBlur,value:this.state.value,ref:e=>{this._textInput=e}}),g().createElement("div",{className:"jp-baseLineForm jp-lineFormButtonContainer"},g().createElement(l.lineFormIcon.react,{className:"jp-baseLineForm jp-lineFormButtonIcon",elementPosition:"center"}),g().createElement("input",{type:"submit",className:"jp-baseLineForm jp-lineFormButton",value:""}))),g().createElement("label",{className:"jp-lineFormCaption",htmlFor:this.state.textInputId},this._trans.__("Go to line number between 1 and %1",this.props.maxLine))))}}function y(e){const t=(e.translator||d.nullTranslator).load("jupyterlab");return g().createElement(p.TextItem,{onClick:e.handleClick,source:t.__("Ln %1, Col %2",e.line,e.column),title:t.__("Go to line number…"),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&"Spacebar"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),e.handleClick())}})}class f extends l.VDomRenderer{constructor(e){super(new f.Model),this._popup=null,this.addClass("jp-mod-highlighted"),this.translator=e||d.nullTranslator}render(){return null===this.model?null:g().createElement(y,{line:this.model.line,column:this.model.column,translator:this.translator,handleClick:()=>this._handleClick()})}_handleClick(){this._popup&&this._popup.dispose();const e=l.ReactWidget.create(g().createElement(C,{handleSubmit:e=>this._handleSubmit(e),currentLine:this.model.line,maxLine:this.model.editor.lineCount,translator:this.translator}));this._popup=(0,p.showPopup)({body:e,anchor:this,align:"right"})}_handleSubmit(e){this.model.editor.setCursorPosition({line:e-1,column:0}),this._popup.dispose(),this.model.editor.focus()}}!function(e){class t extends l.VDomModel{constructor(){super(...arguments),this._onSelectionChanged=()=>{const e=this._getAllState(),t=this.editor.getCursorPosition();this._line=t.line+1,this._column=t.column+1,this._triggerChange(e,this._getAllState())},this._line=1,this._column=1,this._editor=null}get editor(){return this._editor}set editor(e){var t;const i=this._editor;(null===(t=null==i?void 0:i.model)||void 0===t?void 0:t.selections)&&i.model.selections.changed.disconnect(this._onSelectionChanged);const s=this._getAllState();if(this._editor=e,this._editor){this._editor.model.selections.changed.connect(this._onSelectionChanged);const e=this._editor.getCursorPosition();this._column=e.column+1,this._line=e.line+1}else this._column=1,this._line=1;this._triggerChange(s,this._getAllState())}get line(){return this._line}get column(){return this._column}_getAllState(){return[this._line,this._column]}_triggerChange(e,t){e[0]===t[0]&&e[1]===t[1]||this.stateChanged.emit(void 0)}}e.Model=t}(f||(f={}));const E="jp-mod-completer-enabled",D="jp-mod-completer-active",S=new h.Token("@jupyterlab/codeeditor:IEditorServices","A service for the text editor provider\n for the application. Use this to create new text editors and host them in your\n UI elements."),N=new h.Token("@jupyterlab/codeeditor:IPositionModel","A service to handle an code editor cursor position."),T="jp-mod-has-primary-selection",O="jp-mod-in-leading-whitespace",b="jp-mod-dropTarget",x=/^\s+$/;class L extends c.Widget{constructor(e){super();const{factory:t,model:i,editorOptions:s}=e;(this.editor=t({host:this.node,model:i,...s})).model.selections.changed.connect(this._onSelectionsChanged,this)}get model(){return this.editor.model}dispose(){this.isDisposed||(this.editor.dispose(),super.dispose())}handleEvent(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e)}}onActivateRequest(e){this.editor.focus()}onAfterAttach(e){super.onAfterAttach(e);const t=this.node;t.addEventListener("lm-dragenter",this),t.addEventListener("lm-dragleave",this),t.addEventListener("lm-dragover",this),t.addEventListener("lm-drop",this)}onBeforeDetach(e){const t=this.node;t.removeEventListener("lm-dragenter",this),t.removeEventListener("lm-dragleave",this),t.removeEventListener("lm-dragover",this),t.removeEventListener("lm-drop",this)}_onSelectionsChanged(){const{start:e,end:t}=this.editor.getSelection();e.column!==t.column||e.line!==t.line?(this.addClass(T),this.removeClass(O)):(this.removeClass(T),this.editor.getLine(t.line).slice(0,t.column).match(x)?this.addClass(O):this.removeClass(O))}_evtDragEnter(e){!0!==this.editor.getOption("readOnly")&&void 0!==M.findTextData(e.mimeData)&&(e.preventDefault(),e.stopPropagation(),this.addClass("jp-mod-dropTarget"))}_evtDragLeave(e){this.removeClass(b),!0!==this.editor.getOption("readOnly")&&void 0!==M.findTextData(e.mimeData)&&(e.preventDefault(),e.stopPropagation())}_evtDragOver(e){this.removeClass(b),!0!==this.editor.getOption("readOnly")&&void 0!==M.findTextData(e.mimeData)&&(e.preventDefault(),e.stopPropagation(),e.dropAction="copy",this.addClass(b))}_evtDrop(e){if(!0===this.editor.getOption("readOnly"))return;const t=M.findTextData(e.mimeData);if(void 0===t)return;const i={top:e.y,bottom:e.y,left:e.x,right:e.x},s=this.editor.getPositionForCoordinate(i);if(null===s)return;if(this.removeClass(b),e.preventDefault(),e.stopPropagation(),"none"===e.proposedAction)return void(e.dropAction="none");const o=this.editor.getOffsetAt(s);this.model.sharedModel.updateSource(o,o,t)}}var M;!function(e){e.findTextData=function(e){const t=e.types().find((e=>0===e.indexOf("text")));if(void 0!==t)return e.getData(t)}}(M||(M={}));class j extends c.Widget{constructor(e){var t;super(),this.model=e.model;const i=new L({factory:e.factory,model:this.model,editorOptions:{...e.editorOptions,config:{...null===(t=e.editorOptions)||void 0===t?void 0:t.config,readOnly:!0}}});this.editor=i.editor,(this.layout=new c.StackedLayout).addWidget(i)}static createCodeViewer(e){const{content:t,mimeType:i,...s}=e,n=new o.Model({mimeType:i});n.sharedModel.setSource(t);const r=new j({...s,model:n});return r.disposed.connect((()=>{n.dispose()})),r}get content(){return this.model.sharedModel.getSource()}get mimeType(){return this.model.mimeType}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7391],{77391:(e,t,i)=>{i.r(t),i.d(t,{COMPLETER_ACTIVE_CLASS:()=>D,COMPLETER_ENABLED_CLASS:()=>E,CodeEditor:()=>o,CodeEditorWrapper:()=>L,CodeViewerWidget:()=>j,IEditorMimeTypeService:()=>s,IEditorServices:()=>S,IPositionModel:()=>N,JSONEditor:()=>m,LineCol:()=>f});var s,o,n=i(57508),r=i(83978),a=i(81997);!function(e){e.defaultMimeType="text/plain"}(s||(s={})),function(e){e.Model=class{constructor(e={}){var t,i;this.standaloneModel=!1,this._isDisposed=!1,this._selections=new r.ObservableMap,this._mimeType=s.defaultMimeType,this._mimeTypeChanged=new a.Signal(this),this.standaloneModel=void 0===e.sharedModel,this.sharedModel=null!==(t=e.sharedModel)&&void 0!==t?t:new n.YFile,this._mimeType=null!==(i=e.mimeType)&&void 0!==i?i:s.defaultMimeType}get mimeTypeChanged(){return this._mimeTypeChanged}get selections(){return this._selections}get mimeType(){return this._mimeType}set mimeType(e){const t=this.mimeType;t!==e&&(this._mimeType=e,this._mimeTypeChanged.emit({name:"mimeType",oldValue:t,newValue:e}))}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._selections.dispose(),this.standaloneModel&&this.sharedModel.dispose(),a.Signal.clearData(this))}}}(o||(o={}));var d=i(70858),l=i(95291),h=i(20998),c=i(63485);const u="jp-mod-error";class m extends c.Widget{constructor(e){super(),this._dataDirty=!1,this._inputDirty=!1,this._source=null,this._originalValue=h.JSONExt.emptyObject,this._changeGuard=!1,this.translator=e.translator||d.nullTranslator,this._trans=this.translator.load("jupyterlab"),this.addClass("jp-JSONEditor"),this.headerNode=document.createElement("div"),this.headerNode.className="jp-JSONEditor-header",this.revertButtonNode=l.undoIcon.element({tag:"span",title:this._trans.__("Revert changes to data")}),this.commitButtonNode=l.checkIcon.element({tag:"span",title:this._trans.__("Commit changes to data"),marginLeft:"8px"}),this.editorHostNode=document.createElement("div"),this.editorHostNode.className="jp-JSONEditor-host",this.headerNode.appendChild(this.revertButtonNode),this.headerNode.appendChild(this.commitButtonNode),this.node.appendChild(this.headerNode),this.node.appendChild(this.editorHostNode);const t=new o.Model({mimeType:"application/json"});t.sharedModel.changed.connect(this._onModelChanged,this),this.model=t,this.editor=e.editorFactory({host:this.editorHostNode,model:t,config:{readOnly:!0}})}get source(){return this._source}set source(e){this._source!==e&&(this._source&&this._source.changed.disconnect(this._onSourceChanged,this),this._source=e,this.editor.setOption("readOnly",null===e),e&&e.changed.connect(this._onSourceChanged,this),this._setValue())}get isDirty(){return this._dataDirty||this._inputDirty}dispose(){var e;this.isDisposed||(null===(e=this.source)||void 0===e||e.dispose(),this.model.dispose(),this.editor.dispose(),super.dispose())}handleEvent(e){switch(e.type){case"blur":this._evtBlur(e);break;case"click":this._evtClick(e)}}onAfterAttach(e){const t=this.editorHostNode;t.addEventListener("blur",this,!0),t.addEventListener("click",this,!0),this.revertButtonNode.hidden=!0,this.commitButtonNode.hidden=!0,this.headerNode.addEventListener("click",this)}onBeforeDetach(e){const t=this.editorHostNode;t.removeEventListener("blur",this,!0),t.removeEventListener("click",this,!0),this.headerNode.removeEventListener("click",this)}_onSourceChanged(e,t){this._changeGuard||(this._inputDirty||this.editor.hasFocus()?this._dataDirty=!0:this._setValue())}_onModelChanged(e,t){if(t.sourceChange){let e=!0;try{const e=JSON.parse(this.editor.model.sharedModel.getSource());this.removeClass(u),this._inputDirty=!this._changeGuard&&!h.JSONExt.deepEqual(e,this._originalValue)}catch(t){this.addClass(u),this._inputDirty=!0,e=!1}this.revertButtonNode.hidden=!this._inputDirty,this.commitButtonNode.hidden=!e||!this._inputDirty}}_evtBlur(e){!this._inputDirty&&this._dataDirty&&this._setValue()}_evtClick(e){const t=e.target;this.revertButtonNode.contains(t)?this._setValue():this.commitButtonNode.contains(t)?this.commitButtonNode.hidden||this.hasClass(u)||(this._changeGuard=!0,this._mergeContent(),this._changeGuard=!1,this._setValue()):this.editorHostNode.contains(t)&&this.editor.focus()}_mergeContent(){const e=this.editor.model,t=this._originalValue,i=JSON.parse(e.sharedModel.getSource()),s=this.source;if(s){for(const e in i)h.JSONExt.deepEqual(i[e],t[e]||null)||s.set(e,i[e]);for(const e in t)e in i||s.delete(e)}}_setValue(){this._dataDirty=!1,this._inputDirty=!1,this.revertButtonNode.hidden=!0,this.commitButtonNode.hidden=!0,this.removeClass(u);const e=this.editor.model,t=this._source?this._source.toJSON():{};if(this._changeGuard=!0,void 0===t)e.sharedModel.setSource(this._trans.__("No data!")),this._originalValue=h.JSONExt.emptyObject;else{const i=JSON.stringify(t,null,4);e.sharedModel.setSource(i),this._originalValue=t,i.length>1&&"{"===i[0]&&this.editor.setCursorPosition({line:0,column:1})}this._changeGuard=!1,this.commitButtonNode.hidden=!0,this.revertButtonNode.hidden=!0}}var p=i(58515),_=i(78156),g=i.n(_),v=i(72703);class C extends g().Component{constructor(e){super(e),this._handleChange=e=>{this.setState({value:e.currentTarget.value})},this._handleSubmit=e=>{e.preventDefault();const t=parseInt(this._textInput.value,10);return!isNaN(t)&&isFinite(t)&&1<=t&&t<=this.props.maxLine&&this.props.handleSubmit(t),!1},this._handleFocus=()=>{this.setState({hasFocus:!0})},this._handleBlur=()=>{this.setState({hasFocus:!1})},this._textInput=null,this.translator=e.translator||d.nullTranslator,this._trans=this.translator.load("jupyterlab"),this.state={value:"",hasFocus:!1,textInputId:v.DOMUtils.createDomID()+"-line-number-input"}}componentDidMount(){this._textInput.focus()}render(){return g().createElement("div",{className:"jp-lineFormSearch"},g().createElement("form",{name:"lineColumnForm",onSubmit:this._handleSubmit,noValidate:!0},g().createElement("div",{className:(0,l.classes)("jp-lineFormWrapper","lm-lineForm-wrapper",this.state.hasFocus?"jp-lineFormWrapperFocusWithin":void 0)},g().createElement("input",{type:"text",id:this.state.textInputId,className:"jp-lineFormInput",onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this._handleBlur,value:this.state.value,ref:e=>{this._textInput=e}}),g().createElement("div",{className:"jp-baseLineForm jp-lineFormButtonContainer"},g().createElement(l.lineFormIcon.react,{className:"jp-baseLineForm jp-lineFormButtonIcon",elementPosition:"center"}),g().createElement("input",{type:"submit",className:"jp-baseLineForm jp-lineFormButton",value:""}))),g().createElement("label",{className:"jp-lineFormCaption",htmlFor:this.state.textInputId},this._trans.__("Go to line number between 1 and %1",this.props.maxLine))))}}function y(e){const t=(e.translator||d.nullTranslator).load("jupyterlab");return g().createElement(p.TextItem,{onClick:e.handleClick,source:t.__("Ln %1, Col %2",e.line,e.column),title:t.__("Go to line number…"),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&"Spacebar"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),e.handleClick())}})}class f extends l.VDomRenderer{constructor(e){super(new f.Model),this._popup=null,this.addClass("jp-mod-highlighted"),this.translator=e||d.nullTranslator}render(){return null===this.model?null:g().createElement(y,{line:this.model.line,column:this.model.column,translator:this.translator,handleClick:()=>this._handleClick()})}_handleClick(){this._popup&&this._popup.dispose();const e=l.ReactWidget.create(g().createElement(C,{handleSubmit:e=>this._handleSubmit(e),currentLine:this.model.line,maxLine:this.model.editor.lineCount,translator:this.translator}));this._popup=(0,p.showPopup)({body:e,anchor:this,align:"right"})}_handleSubmit(e){this.model.editor.setCursorPosition({line:e-1,column:0}),this._popup.dispose(),this.model.editor.focus()}}!function(e){class t extends l.VDomModel{constructor(){super(...arguments),this._onSelectionChanged=()=>{const e=this._getAllState(),t=this.editor.getCursorPosition();this._line=t.line+1,this._column=t.column+1,this._triggerChange(e,this._getAllState())},this._line=1,this._column=1,this._editor=null}get editor(){return this._editor}set editor(e){var t;const i=this._editor;(null===(t=null==i?void 0:i.model)||void 0===t?void 0:t.selections)&&i.model.selections.changed.disconnect(this._onSelectionChanged);const s=this._getAllState();if(this._editor=e,this._editor){this._editor.model.selections.changed.connect(this._onSelectionChanged);const e=this._editor.getCursorPosition();this._column=e.column+1,this._line=e.line+1}else this._column=1,this._line=1;this._triggerChange(s,this._getAllState())}get line(){return this._line}get column(){return this._column}_getAllState(){return[this._line,this._column]}_triggerChange(e,t){e[0]===t[0]&&e[1]===t[1]||this.stateChanged.emit(void 0)}}e.Model=t}(f||(f={}));const E="jp-mod-completer-enabled",D="jp-mod-completer-active",S=new h.Token("@jupyterlab/codeeditor:IEditorServices","A service for the text editor provider\n for the application. Use this to create new text editors and host them in your\n UI elements."),N=new h.Token("@jupyterlab/codeeditor:IPositionModel","A service to handle an code editor cursor position."),T="jp-mod-has-primary-selection",O="jp-mod-in-leading-whitespace",b="jp-mod-dropTarget",x=/^\s+$/;class L extends c.Widget{constructor(e){super();const{factory:t,model:i,editorOptions:s}=e;(this.editor=t({host:this.node,model:i,...s})).model.selections.changed.connect(this._onSelectionsChanged,this)}get model(){return this.editor.model}dispose(){this.isDisposed||(this.editor.dispose(),super.dispose())}handleEvent(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e)}}onActivateRequest(e){this.editor.focus()}onAfterAttach(e){super.onAfterAttach(e);const t=this.node;t.addEventListener("lm-dragenter",this),t.addEventListener("lm-dragleave",this),t.addEventListener("lm-dragover",this),t.addEventListener("lm-drop",this)}onBeforeDetach(e){const t=this.node;t.removeEventListener("lm-dragenter",this),t.removeEventListener("lm-dragleave",this),t.removeEventListener("lm-dragover",this),t.removeEventListener("lm-drop",this)}_onSelectionsChanged(){const{start:e,end:t}=this.editor.getSelection();e.column!==t.column||e.line!==t.line?(this.addClass(T),this.removeClass(O)):(this.removeClass(T),this.editor.getLine(t.line).slice(0,t.column).match(x)?this.addClass(O):this.removeClass(O))}_evtDragEnter(e){!0!==this.editor.getOption("readOnly")&&void 0!==M.findTextData(e.mimeData)&&(e.preventDefault(),e.stopPropagation(),this.addClass("jp-mod-dropTarget"))}_evtDragLeave(e){this.removeClass(b),!0!==this.editor.getOption("readOnly")&&void 0!==M.findTextData(e.mimeData)&&(e.preventDefault(),e.stopPropagation())}_evtDragOver(e){this.removeClass(b),!0!==this.editor.getOption("readOnly")&&void 0!==M.findTextData(e.mimeData)&&(e.preventDefault(),e.stopPropagation(),e.dropAction="copy",this.addClass(b))}_evtDrop(e){if(!0===this.editor.getOption("readOnly"))return;const t=M.findTextData(e.mimeData);if(void 0===t)return;const i={top:e.y,bottom:e.y,left:e.x,right:e.x},s=this.editor.getPositionForCoordinate(i);if(null===s)return;if(this.removeClass(b),e.preventDefault(),e.stopPropagation(),"none"===e.proposedAction)return void(e.dropAction="none");const o=this.editor.getOffsetAt(s);this.model.sharedModel.updateSource(o,o,t)}}var M;!function(e){e.findTextData=function(e){const t=e.types().find((e=>0===e.indexOf("text")));if(void 0!==t)return e.getData(t)}}(M||(M={}));class j extends c.Widget{constructor(e){var t;super(),this.model=e.model;const i=new L({factory:e.factory,model:this.model,editorOptions:{...e.editorOptions,config:{...null===(t=e.editorOptions)||void 0===t?void 0:t.config,readOnly:!0}}});this.editor=i.editor,(this.layout=new c.StackedLayout).addWidget(i)}static createCodeViewer(e){const{content:t,mimeType:i,...s}=e,n=new o.Model({mimeType:i});n.sharedModel.setSource(t);const r=new j({...s,model:n});return r.disposed.connect((()=>{n.dispose()})),r}get content(){return this.model.sharedModel.getSource()}get mimeType(){return this.model.mimeType}}}}]);
|
notebook/static/7450.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7450],{67450:(e,t,n)=>{n.r(t),n.d(t,{blockComment:()=>h,blockUncomment:()=>m,copyLineDown:()=>Nt,copyLineUp:()=>Vt,cursorCharBackward:()=>ne,cursorCharForward:()=>te,cursorCharLeft:()=>Z,cursorCharRight:()=>ee,cursorDocEnd:()=>ct,cursorDocStart:()=>st,cursorGroupBackward:()=>ae,cursorGroupForward:()=>le,cursorGroupLeft:()=>oe,cursorGroupRight:()=>ie,cursorLineBoundaryBackward:()=>De,cursorLineBoundaryForward:()=>Ee,cursorLineBoundaryLeft:()=>xe,cursorLineBoundaryRight:()=>Le,cursorLineDown:()=>we,cursorLineEnd:()=>Te,cursorLineStart:()=>Me,cursorLineUp:()=>ke,cursorMatchingBracket:()=>Oe,cursorPageDown:()=>Ce,cursorPageUp:()=>Ae,cursorSubwordBackward:()=>de,cursorSubwordForward:()=>fe,cursorSyntaxLeft:()=>pe,cursorSyntaxRight:()=>ge,defaultKeymap:()=>Yt,deleteCharBackward:()=>wt,deleteCharForward:()=>St,deleteGroupBackward:()=>At,deleteGroupForward:()=>Ct,deleteLine:()=>Jt,deleteLineBoundaryBackward:()=>Dt,deleteLineBoundaryForward:()=>xt,deleteToLineEnd:()=>Bt,deleteToLineStart:()=>Et,deleteTrailingWhitespace:()=>Lt,emacsStyleKeymap:()=>qt,history:()=>E,historyField:()=>D,historyKeymap:()=>$,indentLess:()=>$t,indentMore:()=>_t,indentSelection:()=>Wt,indentWithTab:()=>Qt,insertBlankLine:()=>Ft,insertNewline:()=>Pt,insertNewlineAndIndent:()=>Gt,insertTab:()=>jt,invertedEffects:()=>A,isolateHistory:()=>v,lineComment:()=>u,lineUncomment:()=>f,moveLineDown:()=>Rt,moveLineUp:()=>It,redo:()=>M,redoDepth:()=>R,redoSelection:()=>b,selectAll:()=>dt,selectCharBackward:()=>Pe,selectCharForward:()=>Je,selectCharLeft:()=>Ve,selectCharRight:()=>Ne,selectDocEnd:()=>ft,selectDocStart:()=>ut,selectGroupBackward:()=>We,selectGroupForward:()=>ze,selectGroupLeft:()=>Fe,selectGroupRight:()=>He,selectLine:()=>ht,selectLineBoundaryBackward:()=>rt,selectLineBoundaryForward:()=>nt,selectLineBoundaryLeft:()=>ot,selectLineBoundaryRight:()=>it,selectLineDown:()=>Xe,selectLineEnd:()=>at,selectLineStart:()=>lt,selectLineUp:()=>Qe,selectMatchingBracket:()=>Ie,selectPageDown:()=>tt,selectPageUp:()=>et,selectParentSyntax:()=>mt,selectSubwordBackward:()=>je,selectSubwordForward:()=>$e,selectSyntaxLeft:()=>qe,selectSyntaxRight:()=>Ke,simplifySelection:()=>pt,splitLine:()=>Mt,standardKeymap:()=>Kt,toggleBlockComment:()=>d,toggleBlockCommentByLine:()=>p,toggleComment:()=>a,toggleLineComment:()=>c,transposeChars:()=>Tt,undo:()=>L,undoDepth:()=>I,undoSelection:()=>T});var r=n(89843),o=n(3546),i=n(17592),l=n(79352);const a=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=g(e.state,n.from);return r.line?c(e):!!r.block&&p(e)};function s(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=e(t,n);return!!o&&(r(n.update(o)),!0)}}const c=s(w,0),u=s(w,1),f=s(w,2),d=s(k,0),h=s(k,1),m=s(k,2),p=s(((e,t)=>k(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),o=n.to<=r.to?r:e.doc.lineAt(n.to),i=t.length-1;i>=0&&t[i].to>r.from?t[i].to=o.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return t}(t))),0);function g(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const y=50;function k(e,t,n=t.selection.ranges){let r=n.map((e=>g(t,e.from).block));if(!r.every((e=>e)))return null;let o=n.map(((e,n)=>function(e,{open:t,close:n},r,o){let i,l,a=e.sliceDoc(r-y,r),s=e.sliceDoc(o,o+y),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(s)[0].length,f=a.length-c;if(a.slice(f-t.length,f)==t&&s.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:o+u,margin:u&&1}};o-r<=2*y?i=l=e.sliceDoc(r,o):(i=e.sliceDoc(r,r+y),l=e.sliceDoc(o-y,o));let d=/^\s*/.exec(i)[0].length,h=/\s*$/.exec(l)[0].length,m=l.length-h-n.length;return i.slice(d,d+t.length)==t&&l.slice(m,m+n.length)==n?{open:{pos:r+d+t.length,margin:/\s/.test(i.charAt(d+t.length))?1:0},close:{pos:o-h-n.length,margin:/\s/.test(l.charAt(m-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!o.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>o[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&o.some((e=>e))){let e=[];for(let t,n=0;n<o.length;n++)if(t=o[n]){let o=r[n],{open:i,close:l}=t;e.push({from:i.pos-o.open.length,to:i.pos+i.margin},{from:l.pos-l.margin,to:l.pos+o.close.length})}return{changes:e}}return null}function w(e,t,n=t.selection.ranges){let r=[],o=-1;for(let{from:e,to:i}of n){let n=r.length,l=1e9,a=g(t,e).line;if(a){for(let n=e;n<=i;){let s=t.doc.lineAt(n);if(s.from>o&&(e==i||i>s.from)){o=s.from;let e=/^\s*/.exec(s.text)[0].length,t=e==s.length,n=s.text.slice(e,e+a.length)==a?e:-1;e<s.text.length&&e<l&&(l=e),r.push({line:s,comment:n,token:a,indent:e,empty:t,single:!1})}n=s.to+1}if(l<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=l);r.length==n+1&&(r[n].single=!0)}}if(2!=e&&r.some((e=>e.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:o,empty:i,single:l}of r)!l&&i||e.push({from:t.from+o,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:o}of r)if(n>=0){let r=t.from+n,i=r+o.length;" "==t.text[i-t.from]&&i++,e.push({from:r,to:i})}return{changes:e}}return null}const S=r.Annotation.define(),v=r.Annotation.define(),A=r.Facet.define(),C=r.Facet.define({combine:e=>(0,r.combineConfig)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),B=r.StateField.define({create:()=>_.empty,update(e,t){let n=t.state.facet(C),o=t.annotation(S);if(o){let r=U.fromTransaction(t,o.selection),i=o.side,l=0==i?e.undone:e.done;return l=r?V(l,l.length,n.minDepth,r):G(l,t.startState.selection),new _(0==i?o.rest:l,0==i?l:o.rest)}let i=t.annotation(v);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(r.Transaction.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let l=U.fromTransaction(t),a=t.annotation(r.Transaction.time),s=t.annotation(r.Transaction.userEvent);return l?e=e.addChanges(l,a,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new _(e.done.map(U.fromJSON),e.undone.map(U.fromJSON))});function E(e={}){return[B,C.of(e),o.EditorView.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?L:"historyRedo"==e.inputType?M:null;return!!n&&(e.preventDefault(),n(t))}})]}const D=B;function x(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let o=n.field(B,!1);if(!o)return!1;let i=o.pop(e,n,t);return!!i&&(r(i),!0)}}const L=x(0,!1),M=x(1,!1),T=x(0,!0),b=x(1,!0);function O(e){return function(t){let n=t.field(B,!1);if(!n)return 0;let r=0==e?n.done:n.undone;return r.length-(r.length&&!r[0].changes?1:0)}}const I=O(0),R=O(1);class U{constructor(e,t,n,r,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new U(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new U(e.changes&&r.ChangeSet.fromJSON(e.changes),[],e.mapped&&r.ChangeDesc.fromJSON(e.mapped),e.startSelection&&r.EditorSelection.fromJSON(e.startSelection),e.selectionsAfter.map(r.EditorSelection.fromJSON))}static fromTransaction(e,t){let n=J;for(let t of e.startState.facet(A)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new U(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,J)}static selection(e){return new U(void 0,J,void 0,void 0,e)}}function V(e,t,n,r){let o=t+1>n+20?t-n-1:0,i=e.slice(o,t);return i.push(r),i}function N(e,t){return e.length?t.length?e.concat(t):e:t}const J=[],P=200;function G(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-P));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),V(e,e.length-1,1e9,n.setSelAfter(r)))}return[U.selection([t])]}function F(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function H(e,t){if(!e.length)return e;let n=e.length,r=J;for(;n;){let o=z(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,r=o.selectionsAfter}return r.length?[U.selection(r)]:J}function z(e,t,n){let o=N(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):J,n);if(!e.changes)return U.selection(o);let i=e.changes.map(t),l=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(l):l;return new U(i,r.StateEffect.mapEffects(e.effects,t),a,e.startSelection.map(l),o)}const W=/^(input\.type|delete)($|\.)/;class _{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new _(this.done,this.undone):this}addChanges(e,t,n,r,o){let i=this.done,l=i[i.length-1];return i=l&&l.changes&&!l.changes.empty&&e.changes&&(!n||W.test(n))&&(!l.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(o,function(e,t){let n=[],r=!1;return e.iterChangedRanges(((e,t)=>n.push(e,t))),t.iterChangedRanges(((e,t,o,i)=>{for(let e=0;e<n.length;){let t=n[e++],l=n[e++];i>=t&&o<=l&&(r=!0)}})),r}(l.changes,e.changes))||"input.type.compose"==n)?V(i,i.length-1,r.minDepth,new U(e.changes.compose(l.changes),N(e.effects,l.effects),l.mapped,l.startSelection,J)):V(i,i.length,r.minDepth,e),new _(i,J,t,n)}addSelection(e,t,n,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:J;return o.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=o[o.length-1],l=e,i.ranges.length==l.ranges.length&&0===i.ranges.filter(((e,t)=>e.empty!=l.ranges[t].empty)).length)?this:new _(G(this.done,e),this.undone,t,n);var i,l}addMapping(e){return new _(H(this.done,e),H(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let o=r[r.length-1],i=o.selectionsAfter[0]||t.selection;if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:S.of({side:e,rest:F(r),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let n=1==r.length?J:r.slice(0,r.length-1);return o.mapped&&(n=H(n,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:S.of({side:e,rest:n,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}_.empty=new _(J,J);const $=[{key:"Mod-z",run:L,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:M,preventDefault:!0},{linux:"Ctrl-Shift-z",run:M,preventDefault:!0},{key:"Mod-u",run:T,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:b,preventDefault:!0}];function j(e,t){return r.EditorSelection.create(e.ranges.map(t),e.mainIndex)}function q(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function K({state:e,dispatch:t},n){let r=j(e.selection,n);return!r.eq(e.selection,!0)&&(t(q(e,r)),!0)}function Y(e,t){return r.EditorSelection.cursor(t?e.to:e.from)}function Q(e,t){return K(e,(n=>n.empty?e.moveByChar(n,t):Y(n,t)))}function X(e){return e.textDirectionAt(e.state.selection.main.head)==o.Direction.LTR}const Z=e=>Q(e,!X(e)),ee=e=>Q(e,X(e)),te=e=>Q(e,!0),ne=e=>Q(e,!1);function re(e,t){return K(e,(n=>n.empty?e.moveByGroup(n,t):Y(n,t)))}const oe=e=>re(e,!X(e)),ie=e=>re(e,X(e)),le=e=>re(e,!0),ae=e=>re(e,!1),se="undefined"!=typeof Intl&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function ce(e,t,n){let o=e.state.charCategorizer(t.from),i=r.CharCategory.Space,l=t.from,a=0,s=!1,c=!1,u=!1,f=t=>{if(s)return!1;l+=n?t.length:-t.length;let f,d=o(t);if(d==r.CharCategory.Word&&t.charCodeAt(0)<128&&/[\W_]/.test(t)&&(d=-1),i==r.CharCategory.Space&&(i=d),i!=d)return!1;if(i==r.CharCategory.Word)if(t.toLowerCase()==t){if(!n&&c)return!1;u=!0}else if(u){if(n)return!1;s=!0}else{if(c&&n&&o(f=e.state.sliceDoc(l,l+1))==r.CharCategory.Word&&f.toLowerCase()==f)return!1;c=!0}return a++,!0},d=e.moveByChar(t,n,(e=>(f(e),f)));if(se&&i==r.CharCategory.Word&&d.from==t.from+a*(n?1:-1)){let o=Math.min(t.head,d.head),i=Math.max(t.head,d.head),l=e.state.sliceDoc(o,i);if(l.length>1&&/[\u4E00-\uffff]/.test(l)){let e=Array.from(se.segment(l));if(e.length>1)return n?r.EditorSelection.cursor(t.head+e[1].index,-1):r.EditorSelection.cursor(d.head+e[e.length-1].index,1)}}return d}function ue(e,t){return K(e,(n=>n.empty?ce(e,n,t):Y(n,t)))}const fe=e=>ue(e,!0),de=e=>ue(e,!1);function he(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function me(e,t,n){let o,a,s=(0,i.syntaxTree)(e).resolveInner(t.head),c=n?l.NodeProp.closedBy:l.NodeProp.openedBy;for(let r=t.head;;){let t=n?s.childAfter(r):s.childBefore(r);if(!t)break;he(e,t,c)?s=t:r=n?t.to:t.from}return a=s.type.prop(c)&&(o=n?(0,i.matchBrackets)(e,s.from,1):(0,i.matchBrackets)(e,s.to,-1))&&o.matched?n?o.end.to:o.end.from:n?s.to:s.from,r.EditorSelection.cursor(a,n?-1:1)}const pe=e=>K(e,(t=>me(e.state,t,!X(e)))),ge=e=>K(e,(t=>me(e.state,t,X(e))));function ye(e,t){return K(e,(n=>{if(!n.empty)return Y(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}const ke=e=>ye(e,!1),we=e=>ye(e,!0);function Se(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){for(let t of e.state.facet(o.EditorView.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(i=Math.max(null==n?void 0:n.bottom,i))}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function ve(e,t){let n,r=Se(e),{state:i}=e,l=j(i.selection,(n=>n.empty?e.moveVertically(n,t,r.height):Y(n,t)));if(l.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,c=a.bottom-r.marginBottom;t&&t.top>s&&t.bottom<c&&(n=o.EditorView.scrollIntoView(l.main.head,{y:"start",yMargin:t.top-s}))}return e.dispatch(q(i,l),{effects:n}),!0}const Ae=e=>ve(e,!1),Ce=e=>ve(e,!0);function Be(e,t,n){let o=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?o.to:o.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==o.from&&o.length){let n=/^\s*/.exec(e.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;n&&t.head!=o.from+n&&(i=r.EditorSelection.cursor(o.from+n))}return i}const Ee=e=>K(e,(t=>Be(e,t,!0))),De=e=>K(e,(t=>Be(e,t,!1))),xe=e=>K(e,(t=>Be(e,t,!X(e)))),Le=e=>K(e,(t=>Be(e,t,X(e)))),Me=e=>K(e,(t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).from,1))),Te=e=>K(e,(t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).to,-1)));function be(e,t,n){let o=!1,l=j(e.selection,(t=>{let l=(0,i.matchBrackets)(e,t.head,-1)||(0,i.matchBrackets)(e,t.head,1)||t.head>0&&(0,i.matchBrackets)(e,t.head-1,1)||t.head<e.doc.length&&(0,i.matchBrackets)(e,t.head+1,-1);if(!l||!l.end)return t;o=!0;let a=l.start.from==t.head?l.end.to:l.end.from;return n?r.EditorSelection.range(t.anchor,a):r.EditorSelection.cursor(a)}));return!!o&&(t(q(e,l)),!0)}const Oe=({state:e,dispatch:t})=>be(e,t,!1),Ie=({state:e,dispatch:t})=>be(e,t,!0);function Re(e,t){let n=j(e.state.selection,(e=>{let n=t(e);return r.EditorSelection.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(q(e.state,n)),!0)}function Ue(e,t){return Re(e,(n=>e.moveByChar(n,t)))}const Ve=e=>Ue(e,!X(e)),Ne=e=>Ue(e,X(e)),Je=e=>Ue(e,!0),Pe=e=>Ue(e,!1);function Ge(e,t){return Re(e,(n=>e.moveByGroup(n,t)))}const Fe=e=>Ge(e,!X(e)),He=e=>Ge(e,X(e)),ze=e=>Ge(e,!0),We=e=>Ge(e,!1);function _e(e,t){return Re(e,(n=>ce(e,n,t)))}const $e=e=>_e(e,!0),je=e=>_e(e,!1),qe=e=>Re(e,(t=>me(e.state,t,!X(e)))),Ke=e=>Re(e,(t=>me(e.state,t,X(e))));function Ye(e,t){return Re(e,(n=>e.moveVertically(n,t)))}const Qe=e=>Ye(e,!1),Xe=e=>Ye(e,!0);function Ze(e,t){return Re(e,(n=>e.moveVertically(n,t,Se(e).height)))}const et=e=>Ze(e,!1),tt=e=>Ze(e,!0),nt=e=>Re(e,(t=>Be(e,t,!0))),rt=e=>Re(e,(t=>Be(e,t,!1))),ot=e=>Re(e,(t=>Be(e,t,!X(e)))),it=e=>Re(e,(t=>Be(e,t,X(e)))),lt=e=>Re(e,(t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).from))),at=e=>Re(e,(t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).to))),st=({state:e,dispatch:t})=>(t(q(e,{anchor:0})),!0),ct=({state:e,dispatch:t})=>(t(q(e,{anchor:e.doc.length})),!0),ut=({state:e,dispatch:t})=>(t(q(e,{anchor:e.selection.main.anchor,head:0})),!0),ft=({state:e,dispatch:t})=>(t(q(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),dt=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),ht=({state:e,dispatch:t})=>{let n=bt(e).map((({from:t,to:n})=>r.EditorSelection.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:r.EditorSelection.create(n),userEvent:"select"})),!0},mt=({state:e,dispatch:t})=>{let n=j(e.selection,(t=>{var n;for(let o=(0,i.syntaxTree)(e).resolveStack(t.from,1);o;o=o.next){let{node:e}=o;if((e.from<t.from&&e.to>=t.to||e.to>t.to&&e.from<=t.from)&&(null===(n=e.parent)||void 0===n?void 0:n.parent))return r.EditorSelection.range(e.to,e.from)}return t}));return t(q(e,n)),!0},pt=({state:e,dispatch:t})=>{let n=e.selection,o=null;return n.ranges.length>1?o=r.EditorSelection.create([n.main]):n.main.empty||(o=r.EditorSelection.create([r.EditorSelection.cursor(n.main.head)])),!!o&&(t(q(e,o)),!0)};function gt(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:i}=e,l=i.changeByRange((o=>{let{from:i,to:l}=o;if(i==l){let r=t(o);r<i?(n="delete.backward",r=yt(e,r,!1)):r>i&&(n="delete.forward",r=yt(e,r,!0)),i=Math.min(i,r),l=Math.max(l,r)}else i=yt(e,i,!1),l=yt(e,l,!0);return i==l?{range:o}:{changes:{from:i,to:l},range:r.EditorSelection.cursor(i,i<o.head?-1:1)}}));return!l.changes.empty&&(e.dispatch(i.update(l,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?o.EditorView.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function yt(e,t,n){if(e instanceof o.EditorView)for(let r of e.state.facet(o.EditorView.atomicRanges).map((t=>t(e))))r.between(t,t,((e,r)=>{e<t&&r>t&&(t=n?r:e)}));return t}const kt=(e,t)=>gt(e,(n=>{let o,l,a=n.from,{state:s}=e,c=s.doc.lineAt(a);if(!t&&a>c.from&&a<c.from+200&&!/[^ \t]/.test(o=c.text.slice(0,a-c.from))){if("\t"==o[o.length-1])return a-1;let e=(0,r.countColumn)(o,s.tabSize)%(0,i.getIndentUnit)(s)||(0,i.getIndentUnit)(s);for(let t=0;t<e&&" "==o[o.length-1-t];t++)a--;l=a}else l=(0,r.findClusterBreak)(c.text,a-c.from,t,t)+c.from,l==a&&c.number!=(t?s.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(c.text.slice(l-c.from,a-c.from))&&(l=(0,r.findClusterBreak)(c.text,l-c.from,!1,!1)+c.from);return l})),wt=e=>kt(e,!1),St=e=>kt(e,!0),vt=(e,t)=>gt(e,(n=>{let o=n.head,{state:i}=e,l=i.doc.lineAt(o),a=i.charCategorizer(o);for(let e=null;;){if(o==(t?l.to:l.from)){o==n.head&&l.number!=(t?i.doc.lines:1)&&(o+=t?1:-1);break}let s=(0,r.findClusterBreak)(l.text,o-l.from,t)+l.from,c=l.text.slice(Math.min(o,s)-l.from,Math.max(o,s)-l.from),u=a(c);if(null!=e&&u!=e)break;" "==c&&o==n.head||(e=u),o=s}return o})),At=e=>vt(e,!1),Ct=e=>vt(e,!0),Bt=e=>gt(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})),Et=e=>gt(e,(t=>{let n=e.lineBlockAt(t.head).from;return t.head>n?n:Math.max(0,t.head-1)})),Dt=e=>gt(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)})),xt=e=>gt(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})),Lt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=[];for(let t=0,r="",o=e.doc.iter();;){if(o.next(),o.lineBreak||o.done){let e=r.search(/\s+$/);if(e>-1&&n.push({from:t-(r.length-e),to:t}),o.done)break;r=""}else r=o.value;t+=o.value.length}return!!n.length&&(t(e.update({changes:n,userEvent:"delete"})),!0)},Mt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:r.Text.of(["",""])},range:r.EditorSelection.cursor(e.from)})));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Tt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,o=e.doc.lineAt(n),i=n==o.from?n-1:(0,r.findClusterBreak)(o.text,n-o.from,!1)+o.from,l=n==o.to?n+1:(0,r.findClusterBreak)(o.text,n-o.from,!0)+o.from;return{changes:{from:i,to:l,insert:e.doc.slice(n,l).append(e.doc.slice(i,n))},range:r.EditorSelection.cursor(l)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function bt(e){let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.from),i=e.doc.lineAt(r.to);if(r.empty||r.to!=i.from||(i=e.doc.lineAt(r.to-1)),n>=o.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(r)}else t.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return t}function Ot(e,t,n){if(e.readOnly)return!1;let o=[],i=[];for(let t of bt(e)){if(n?t.to==e.doc.length:0==t.from)continue;let l=e.doc.lineAt(n?t.to+1:t.from-1),a=l.length+1;if(n){o.push({from:t.to,to:l.to},{from:t.from,insert:l.text+e.lineBreak});for(let n of t.ranges)i.push(r.EditorSelection.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)))}else{o.push({from:l.from,to:t.from},{from:t.to,insert:e.lineBreak+l.text});for(let e of t.ranges)i.push(r.EditorSelection.range(e.anchor-a,e.head-a))}}return!!o.length&&(t(e.update({changes:o,scrollIntoView:!0,selection:r.EditorSelection.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}const It=({state:e,dispatch:t})=>Ot(e,t,!1),Rt=({state:e,dispatch:t})=>Ot(e,t,!0);function Ut(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of bt(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Vt=({state:e,dispatch:t})=>Ut(e,t,!1),Nt=({state:e,dispatch:t})=>Ut(e,t,!0),Jt=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(bt(t).map((({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n})))),r=j(t.selection,(t=>e.moveVertically(t,!0))).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0},Pt=({state:e,dispatch:t})=>(t(e.update(e.replaceSelection(e.lineBreak),{scrollIntoView:!0,userEvent:"input"})),!0),Gt=Ht(!1),Ft=Ht(!0);function Ht(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let o=t.changeByRange((n=>{let{from:o,to:a}=n,s=t.doc.lineAt(o),c=!e&&o==a&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=(0,i.syntaxTree)(e).resolveInner(t),o=r.childBefore(t),a=r.childAfter(t);return o&&a&&o.to<=t&&a.from>=t&&(n=o.type.prop(l.NodeProp.closedBy))&&n.indexOf(a.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(a.from).from&&!/\S/.test(e.sliceDoc(o.to,a.from))?{from:o.to,to:a.from}:null}(t,o);e&&(o=a=(a<=s.to?s:t.doc.lineAt(a)).to);let u=new i.IndentContext(t,{simulateBreak:o,simulateDoubleBreak:!!c}),f=(0,i.getIndentation)(u,o);for(null==f&&(f=(0,r.countColumn)(/^\s*/.exec(t.doc.lineAt(o).text)[0],t.tabSize));a<s.to&&/\s/.test(s.text[a-s.from]);)a++;c?({from:o,to:a}=c):o>s.from&&o<s.from+100&&!/\S/.test(s.text.slice(0,o))&&(o=s.from);let d=["",(0,i.indentString)(t,f)];return c&&d.push((0,i.indentString)(t,u.lineIndent(s.from,-1))),{changes:{from:o,to:a,insert:r.Text.of(d)},range:r.EditorSelection.cursor(o+1+d[1].length)}}));return n(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}}function zt(e,t){let n=-1;return e.changeByRange((o=>{let i=[];for(let r=o.from;r<=o.to;){let l=e.doc.lineAt(r);l.number>n&&(o.empty||o.to>l.from)&&(t(l,i,o),n=l.number),r=l.to+1}let l=e.changes(i);return{changes:i,range:r.EditorSelection.range(l.mapPos(o.anchor,1),l.mapPos(o.head,1))}}))}const Wt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new i.IndentContext(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),o=zt(e,((t,o,l)=>{let a=(0,i.getIndentation)(r,t.from);if(null==a)return;/\S/.test(t.text)||(a=0);let s=/^\s*/.exec(t.text)[0],c=(0,i.indentString)(e,a);(s!=c||l.from<t.from+s.length)&&(n[t.from]=a,o.push({from:t.from,to:t.from+s.length,insert:c}))}));return o.changes.empty||t(e.update(o,{userEvent:"indent"})),!0},_t=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(zt(e,((t,n)=>{n.push({from:t.from,insert:e.facet(i.indentUnit)})})),{userEvent:"input.indent"})),!0),$t=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(zt(e,((t,n)=>{let o=/^\s*/.exec(t.text)[0];if(!o)return;let l=(0,r.countColumn)(o,e.tabSize),a=0,s=(0,i.indentString)(e,Math.max(0,l-(0,i.getIndentUnit)(e)));for(;a<o.length&&a<s.length&&o.charCodeAt(a)==s.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+o.length,insert:s.slice(a)})})),{userEvent:"delete.dedent"})),!0),jt=({state:e,dispatch:t})=>e.selection.ranges.some((e=>!e.empty))?_t({state:e,dispatch:t}):(t(e.update(e.replaceSelection("\t"),{scrollIntoView:!0,userEvent:"input"})),!0),qt=[{key:"Ctrl-b",run:Z,shift:Ve,preventDefault:!0},{key:"Ctrl-f",run:ee,shift:Ne},{key:"Ctrl-p",run:ke,shift:Qe},{key:"Ctrl-n",run:we,shift:Xe},{key:"Ctrl-a",run:Me,shift:lt},{key:"Ctrl-e",run:Te,shift:at},{key:"Ctrl-d",run:St},{key:"Ctrl-h",run:wt},{key:"Ctrl-k",run:Bt},{key:"Ctrl-Alt-h",run:At},{key:"Ctrl-o",run:Mt},{key:"Ctrl-t",run:Tt},{key:"Ctrl-v",run:Ce}],Kt=[{key:"ArrowLeft",run:Z,shift:Ve,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:oe,shift:Fe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:xe,shift:ot,preventDefault:!0},{key:"ArrowRight",run:ee,shift:Ne,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:ie,shift:He,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Le,shift:it,preventDefault:!0},{key:"ArrowUp",run:ke,shift:Qe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:st,shift:ut},{mac:"Ctrl-ArrowUp",run:Ae,shift:et},{key:"ArrowDown",run:we,shift:Xe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ct,shift:ft},{mac:"Ctrl-ArrowDown",run:Ce,shift:tt},{key:"PageUp",run:Ae,shift:et},{key:"PageDown",run:Ce,shift:tt},{key:"Home",run:De,shift:rt,preventDefault:!0},{key:"Mod-Home",run:st,shift:ut},{key:"End",run:Ee,shift:nt,preventDefault:!0},{key:"Mod-End",run:ct,shift:ft},{key:"Enter",run:Gt},{key:"Mod-a",run:dt},{key:"Backspace",run:wt,shift:wt},{key:"Delete",run:St},{key:"Mod-Backspace",mac:"Alt-Backspace",run:At},{key:"Mod-Delete",mac:"Alt-Delete",run:Ct},{mac:"Mod-Backspace",run:Dt},{mac:"Mod-Delete",run:xt}].concat(qt.map((e=>({mac:e.key,run:e.run,shift:e.shift})))),Yt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:pe,shift:qe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:ge,shift:Ke},{key:"Alt-ArrowUp",run:It},{key:"Shift-Alt-ArrowUp",run:Vt},{key:"Alt-ArrowDown",run:Rt},{key:"Shift-Alt-ArrowDown",run:Nt},{key:"Escape",run:pt},{key:"Mod-Enter",run:Ft},{key:"Alt-l",mac:"Ctrl-l",run:ht},{key:"Mod-i",run:mt,preventDefault:!0},{key:"Mod-[",run:$t},{key:"Mod-]",run:_t},{key:"Mod-Alt-\\",run:Wt},{key:"Shift-Mod-k",run:Jt},{key:"Shift-Mod-\\",run:Oe},{key:"Mod-/",run:a},{key:"Alt-A",run:d}].concat(Kt),Qt={key:"Tab",run:_t,shift:$t}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7450],{67450:(e,t,n)=>{n.r(t),n.d(t,{blockComment:()=>h,blockUncomment:()=>m,copyLineDown:()=>Jt,copyLineUp:()=>Nt,cursorCharBackward:()=>ne,cursorCharForward:()=>te,cursorCharLeft:()=>Z,cursorCharRight:()=>ee,cursorDocEnd:()=>ct,cursorDocStart:()=>st,cursorGroupBackward:()=>ae,cursorGroupForward:()=>le,cursorGroupLeft:()=>oe,cursorGroupRight:()=>ie,cursorLineBoundaryBackward:()=>De,cursorLineBoundaryForward:()=>Ee,cursorLineBoundaryLeft:()=>xe,cursorLineBoundaryRight:()=>Le,cursorLineDown:()=>we,cursorLineEnd:()=>Te,cursorLineStart:()=>Me,cursorLineUp:()=>ke,cursorMatchingBracket:()=>Oe,cursorPageDown:()=>Ce,cursorPageUp:()=>Ae,cursorSubwordBackward:()=>fe,cursorSubwordForward:()=>de,cursorSyntaxLeft:()=>pe,cursorSyntaxRight:()=>ge,defaultKeymap:()=>Xt,deleteCharBackward:()=>wt,deleteCharBackwardStrict:()=>St,deleteCharForward:()=>vt,deleteGroupBackward:()=>Ct,deleteGroupForward:()=>Bt,deleteLine:()=>Pt,deleteLineBoundaryBackward:()=>xt,deleteLineBoundaryForward:()=>Lt,deleteToLineEnd:()=>Et,deleteToLineStart:()=>Dt,deleteTrailingWhitespace:()=>Mt,emacsStyleKeymap:()=>Yt,history:()=>E,historyField:()=>D,historyKeymap:()=>K,indentLess:()=>jt,indentMore:()=>$t,indentSelection:()=>Kt,indentWithTab:()=>Zt,insertBlankLine:()=>zt,insertNewline:()=>Gt,insertNewlineAndIndent:()=>Ht,insertNewlineKeepIndent:()=>Ft,insertTab:()=>qt,invertedEffects:()=>A,isolateHistory:()=>v,lineComment:()=>u,lineUncomment:()=>d,moveLineDown:()=>Ut,moveLineUp:()=>Rt,redo:()=>M,redoDepth:()=>R,redoSelection:()=>b,selectAll:()=>ft,selectCharBackward:()=>Pe,selectCharForward:()=>Je,selectCharLeft:()=>Ve,selectCharRight:()=>Ne,selectDocEnd:()=>dt,selectDocStart:()=>ut,selectGroupBackward:()=>We,selectGroupForward:()=>ze,selectGroupLeft:()=>Fe,selectGroupRight:()=>He,selectLine:()=>ht,selectLineBoundaryBackward:()=>rt,selectLineBoundaryForward:()=>nt,selectLineBoundaryLeft:()=>ot,selectLineBoundaryRight:()=>it,selectLineDown:()=>Xe,selectLineEnd:()=>at,selectLineStart:()=>lt,selectLineUp:()=>Qe,selectMatchingBracket:()=>Ie,selectPageDown:()=>tt,selectPageUp:()=>et,selectParentSyntax:()=>mt,selectSubwordBackward:()=>$e,selectSubwordForward:()=>Ke,selectSyntaxLeft:()=>je,selectSyntaxRight:()=>qe,simplifySelection:()=>pt,splitLine:()=>Tt,standardKeymap:()=>Qt,toggleBlockComment:()=>f,toggleBlockCommentByLine:()=>p,toggleComment:()=>a,toggleLineComment:()=>c,transposeChars:()=>bt,undo:()=>L,undoDepth:()=>I,undoSelection:()=>T});var r=n(89843),o=n(45195),i=n(17592),l=n(79352);const a=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=g(e.state,n.from);return r.line?c(e):!!r.block&&p(e)};function s(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=e(t,n);return!!o&&(r(n.update(o)),!0)}}const c=s(w,0),u=s(w,1),d=s(w,2),f=s(k,0),h=s(k,1),m=s(k,2),p=s(((e,t)=>k(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),o=n.to<=r.to?r:e.doc.lineAt(n.to),i=t.length-1;i>=0&&t[i].to>r.from?t[i].to=o.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return t}(t))),0);function g(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const y=50;function k(e,t,n=t.selection.ranges){let r=n.map((e=>g(t,e.from).block));if(!r.every((e=>e)))return null;let o=n.map(((e,n)=>function(e,{open:t,close:n},r,o){let i,l,a=e.sliceDoc(r-y,r),s=e.sliceDoc(o,o+y),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(s)[0].length,d=a.length-c;if(a.slice(d-t.length,d)==t&&s.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:o+u,margin:u&&1}};o-r<=2*y?i=l=e.sliceDoc(r,o):(i=e.sliceDoc(r,r+y),l=e.sliceDoc(o-y,o));let f=/^\s*/.exec(i)[0].length,h=/\s*$/.exec(l)[0].length,m=l.length-h-n.length;return i.slice(f,f+t.length)==t&&l.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:/\s/.test(i.charAt(f+t.length))?1:0},close:{pos:o-h-n.length,margin:/\s/.test(l.charAt(m-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!o.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>o[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&o.some((e=>e))){let e=[];for(let t,n=0;n<o.length;n++)if(t=o[n]){let o=r[n],{open:i,close:l}=t;e.push({from:i.pos-o.open.length,to:i.pos+i.margin},{from:l.pos-l.margin,to:l.pos+o.close.length})}return{changes:e}}return null}function w(e,t,n=t.selection.ranges){let r=[],o=-1;for(let{from:e,to:i}of n){let n=r.length,l=1e9,a=g(t,e).line;if(a){for(let n=e;n<=i;){let s=t.doc.lineAt(n);if(s.from>o&&(e==i||i>s.from)){o=s.from;let e=/^\s*/.exec(s.text)[0].length,t=e==s.length,n=s.text.slice(e,e+a.length)==a?e:-1;e<s.text.length&&e<l&&(l=e),r.push({line:s,comment:n,token:a,indent:e,empty:t,single:!1})}n=s.to+1}if(l<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=l);r.length==n+1&&(r[n].single=!0)}}if(2!=e&&r.some((e=>e.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:o,empty:i,single:l}of r)!l&&i||e.push({from:t.from+o,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:o}of r)if(n>=0){let r=t.from+n,i=r+o.length;" "==t.text[i-t.from]&&i++,e.push({from:r,to:i})}return{changes:e}}return null}const S=r.Annotation.define(),v=r.Annotation.define(),A=r.Facet.define(),C=r.Facet.define({combine:e=>(0,r.combineConfig)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),B=r.StateField.define({create:()=>_.empty,update(e,t){let n=t.state.facet(C),o=t.annotation(S);if(o){let r=U.fromTransaction(t,o.selection),i=o.side,l=0==i?e.undone:e.done;return l=r?V(l,l.length,n.minDepth,r):G(l,t.startState.selection),new _(0==i?o.rest:l,0==i?l:o.rest)}let i=t.annotation(v);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(r.Transaction.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let l=U.fromTransaction(t),a=t.annotation(r.Transaction.time),s=t.annotation(r.Transaction.userEvent);return l?e=e.addChanges(l,a,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new _(e.done.map(U.fromJSON),e.undone.map(U.fromJSON))});function E(e={}){return[B,C.of(e),o.EditorView.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?L:"historyRedo"==e.inputType?M:null;return!!n&&(e.preventDefault(),n(t))}})]}const D=B;function x(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let o=n.field(B,!1);if(!o)return!1;let i=o.pop(e,n,t);return!!i&&(r(i),!0)}}const L=x(0,!1),M=x(1,!1),T=x(0,!0),b=x(1,!0);function O(e){return function(t){let n=t.field(B,!1);if(!n)return 0;let r=0==e?n.done:n.undone;return r.length-(r.length&&!r[0].changes?1:0)}}const I=O(0),R=O(1);class U{constructor(e,t,n,r,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new U(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new U(e.changes&&r.ChangeSet.fromJSON(e.changes),[],e.mapped&&r.ChangeDesc.fromJSON(e.mapped),e.startSelection&&r.EditorSelection.fromJSON(e.startSelection),e.selectionsAfter.map(r.EditorSelection.fromJSON))}static fromTransaction(e,t){let n=J;for(let t of e.startState.facet(A)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new U(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,J)}static selection(e){return new U(void 0,J,void 0,void 0,e)}}function V(e,t,n,r){let o=t+1>n+20?t-n-1:0,i=e.slice(o,t);return i.push(r),i}function N(e,t){return e.length?t.length?e.concat(t):e:t}const J=[],P=200;function G(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-P));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),V(e,e.length-1,1e9,n.setSelAfter(r)))}return[U.selection([t])]}function F(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function H(e,t){if(!e.length)return e;let n=e.length,r=J;for(;n;){let o=z(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,r=o.selectionsAfter}return r.length?[U.selection(r)]:J}function z(e,t,n){let o=N(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):J,n);if(!e.changes)return U.selection(o);let i=e.changes.map(t),l=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(l):l;return new U(i,r.StateEffect.mapEffects(e.effects,t),a,e.startSelection.map(l),o)}const W=/^(input\.type|delete)($|\.)/;class _{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new _(this.done,this.undone):this}addChanges(e,t,n,r,o){let i=this.done,l=i[i.length-1];return i=l&&l.changes&&!l.changes.empty&&e.changes&&(!n||W.test(n))&&(!l.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(o,function(e,t){let n=[],r=!1;return e.iterChangedRanges(((e,t)=>n.push(e,t))),t.iterChangedRanges(((e,t,o,i)=>{for(let e=0;e<n.length;){let t=n[e++],l=n[e++];i>=t&&o<=l&&(r=!0)}})),r}(l.changes,e.changes))||"input.type.compose"==n)?V(i,i.length-1,r.minDepth,new U(e.changes.compose(l.changes),N(e.effects,l.effects),l.mapped,l.startSelection,J)):V(i,i.length,r.minDepth,e),new _(i,J,t,n)}addSelection(e,t,n,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:J;return o.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=o[o.length-1],l=e,i.ranges.length==l.ranges.length&&0===i.ranges.filter(((e,t)=>e.empty!=l.ranges[t].empty)).length)?this:new _(G(this.done,e),this.undone,t,n);var i,l}addMapping(e){return new _(H(this.done,e),H(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let o=r[r.length-1],i=o.selectionsAfter[0]||t.selection;if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:S.of({side:e,rest:F(r),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let n=1==r.length?J:r.slice(0,r.length-1);return o.mapped&&(n=H(n,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:S.of({side:e,rest:n,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}_.empty=new _(J,J);const K=[{key:"Mod-z",run:L,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:M,preventDefault:!0},{linux:"Ctrl-Shift-z",run:M,preventDefault:!0},{key:"Mod-u",run:T,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:b,preventDefault:!0}];function $(e,t){return r.EditorSelection.create(e.ranges.map(t),e.mainIndex)}function j(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function q({state:e,dispatch:t},n){let r=$(e.selection,n);return!r.eq(e.selection,!0)&&(t(j(e,r)),!0)}function Y(e,t){return r.EditorSelection.cursor(t?e.to:e.from)}function Q(e,t){return q(e,(n=>n.empty?e.moveByChar(n,t):Y(n,t)))}function X(e){return e.textDirectionAt(e.state.selection.main.head)==o.Direction.LTR}const Z=e=>Q(e,!X(e)),ee=e=>Q(e,X(e)),te=e=>Q(e,!0),ne=e=>Q(e,!1);function re(e,t){return q(e,(n=>n.empty?e.moveByGroup(n,t):Y(n,t)))}const oe=e=>re(e,!X(e)),ie=e=>re(e,X(e)),le=e=>re(e,!0),ae=e=>re(e,!1),se="undefined"!=typeof Intl&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function ce(e,t,n){let o=e.state.charCategorizer(t.from),i=r.CharCategory.Space,l=t.from,a=0,s=!1,c=!1,u=!1,d=t=>{if(s)return!1;l+=n?t.length:-t.length;let d,f=o(t);if(f==r.CharCategory.Word&&t.charCodeAt(0)<128&&/[\W_]/.test(t)&&(f=-1),i==r.CharCategory.Space&&(i=f),i!=f)return!1;if(i==r.CharCategory.Word)if(t.toLowerCase()==t){if(!n&&c)return!1;u=!0}else if(u){if(n)return!1;s=!0}else{if(c&&n&&o(d=e.state.sliceDoc(l,l+1))==r.CharCategory.Word&&d.toLowerCase()==d)return!1;c=!0}return a++,!0},f=e.moveByChar(t,n,(e=>(d(e),d)));if(se&&i==r.CharCategory.Word&&f.from==t.from+a*(n?1:-1)){let o=Math.min(t.head,f.head),i=Math.max(t.head,f.head),l=e.state.sliceDoc(o,i);if(l.length>1&&/[\u4E00-\uffff]/.test(l)){let e=Array.from(se.segment(l));if(e.length>1)return n?r.EditorSelection.cursor(t.head+e[1].index,-1):r.EditorSelection.cursor(f.head+e[e.length-1].index,1)}}return f}function ue(e,t){return q(e,(n=>n.empty?ce(e,n,t):Y(n,t)))}const de=e=>ue(e,!0),fe=e=>ue(e,!1);function he(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function me(e,t,n){let o,a,s=(0,i.syntaxTree)(e).resolveInner(t.head),c=n?l.NodeProp.closedBy:l.NodeProp.openedBy;for(let r=t.head;;){let t=n?s.childAfter(r):s.childBefore(r);if(!t)break;he(e,t,c)?s=t:r=n?t.to:t.from}return a=s.type.prop(c)&&(o=n?(0,i.matchBrackets)(e,s.from,1):(0,i.matchBrackets)(e,s.to,-1))&&o.matched?n?o.end.to:o.end.from:n?s.to:s.from,r.EditorSelection.cursor(a,n?-1:1)}const pe=e=>q(e,(t=>me(e.state,t,!X(e)))),ge=e=>q(e,(t=>me(e.state,t,X(e))));function ye(e,t){return q(e,(n=>{if(!n.empty)return Y(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}const ke=e=>ye(e,!1),we=e=>ye(e,!0);function Se(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){for(let t of e.state.facet(o.EditorView.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(i=Math.max(null==n?void 0:n.bottom,i))}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function ve(e,t){let n,r=Se(e),{state:i}=e,l=$(i.selection,(n=>n.empty?e.moveVertically(n,t,r.height):Y(n,t)));if(l.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,c=a.bottom-r.marginBottom;t&&t.top>s&&t.bottom<c&&(n=o.EditorView.scrollIntoView(l.main.head,{y:"start",yMargin:t.top-s}))}return e.dispatch(j(i,l),{effects:n}),!0}const Ae=e=>ve(e,!1),Ce=e=>ve(e,!0);function Be(e,t,n){let o=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?o.to:o.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==o.from&&o.length){let n=/^\s*/.exec(e.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;n&&t.head!=o.from+n&&(i=r.EditorSelection.cursor(o.from+n))}return i}const Ee=e=>q(e,(t=>Be(e,t,!0))),De=e=>q(e,(t=>Be(e,t,!1))),xe=e=>q(e,(t=>Be(e,t,!X(e)))),Le=e=>q(e,(t=>Be(e,t,X(e)))),Me=e=>q(e,(t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).from,1))),Te=e=>q(e,(t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).to,-1)));function be(e,t,n){let o=!1,l=$(e.selection,(t=>{let l=(0,i.matchBrackets)(e,t.head,-1)||(0,i.matchBrackets)(e,t.head,1)||t.head>0&&(0,i.matchBrackets)(e,t.head-1,1)||t.head<e.doc.length&&(0,i.matchBrackets)(e,t.head+1,-1);if(!l||!l.end)return t;o=!0;let a=l.start.from==t.head?l.end.to:l.end.from;return n?r.EditorSelection.range(t.anchor,a):r.EditorSelection.cursor(a)}));return!!o&&(t(j(e,l)),!0)}const Oe=({state:e,dispatch:t})=>be(e,t,!1),Ie=({state:e,dispatch:t})=>be(e,t,!0);function Re(e,t){let n=$(e.state.selection,(e=>{let n=t(e);return r.EditorSelection.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(j(e.state,n)),!0)}function Ue(e,t){return Re(e,(n=>e.moveByChar(n,t)))}const Ve=e=>Ue(e,!X(e)),Ne=e=>Ue(e,X(e)),Je=e=>Ue(e,!0),Pe=e=>Ue(e,!1);function Ge(e,t){return Re(e,(n=>e.moveByGroup(n,t)))}const Fe=e=>Ge(e,!X(e)),He=e=>Ge(e,X(e)),ze=e=>Ge(e,!0),We=e=>Ge(e,!1);function _e(e,t){return Re(e,(n=>ce(e,n,t)))}const Ke=e=>_e(e,!0),$e=e=>_e(e,!1),je=e=>Re(e,(t=>me(e.state,t,!X(e)))),qe=e=>Re(e,(t=>me(e.state,t,X(e))));function Ye(e,t){return Re(e,(n=>e.moveVertically(n,t)))}const Qe=e=>Ye(e,!1),Xe=e=>Ye(e,!0);function Ze(e,t){return Re(e,(n=>e.moveVertically(n,t,Se(e).height)))}const et=e=>Ze(e,!1),tt=e=>Ze(e,!0),nt=e=>Re(e,(t=>Be(e,t,!0))),rt=e=>Re(e,(t=>Be(e,t,!1))),ot=e=>Re(e,(t=>Be(e,t,!X(e)))),it=e=>Re(e,(t=>Be(e,t,X(e)))),lt=e=>Re(e,(t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).from))),at=e=>Re(e,(t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).to))),st=({state:e,dispatch:t})=>(t(j(e,{anchor:0})),!0),ct=({state:e,dispatch:t})=>(t(j(e,{anchor:e.doc.length})),!0),ut=({state:e,dispatch:t})=>(t(j(e,{anchor:e.selection.main.anchor,head:0})),!0),dt=({state:e,dispatch:t})=>(t(j(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),ft=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),ht=({state:e,dispatch:t})=>{let n=Ot(e).map((({from:t,to:n})=>r.EditorSelection.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:r.EditorSelection.create(n),userEvent:"select"})),!0},mt=({state:e,dispatch:t})=>{let n=$(e.selection,(t=>{var n;for(let o=(0,i.syntaxTree)(e).resolveStack(t.from,1);o;o=o.next){let{node:e}=o;if((e.from<t.from&&e.to>=t.to||e.to>t.to&&e.from<=t.from)&&(null===(n=e.parent)||void 0===n?void 0:n.parent))return r.EditorSelection.range(e.to,e.from)}return t}));return t(j(e,n)),!0},pt=({state:e,dispatch:t})=>{let n=e.selection,o=null;return n.ranges.length>1?o=r.EditorSelection.create([n.main]):n.main.empty||(o=r.EditorSelection.create([r.EditorSelection.cursor(n.main.head)])),!!o&&(t(j(e,o)),!0)};function gt(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:i}=e,l=i.changeByRange((o=>{let{from:i,to:l}=o;if(i==l){let r=t(o);r<i?(n="delete.backward",r=yt(e,r,!1)):r>i&&(n="delete.forward",r=yt(e,r,!0)),i=Math.min(i,r),l=Math.max(l,r)}else i=yt(e,i,!1),l=yt(e,l,!0);return i==l?{range:o}:{changes:{from:i,to:l},range:r.EditorSelection.cursor(i,i<o.head?-1:1)}}));return!l.changes.empty&&(e.dispatch(i.update(l,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?o.EditorView.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function yt(e,t,n){if(e instanceof o.EditorView)for(let r of e.state.facet(o.EditorView.atomicRanges).map((t=>t(e))))r.between(t,t,((e,r)=>{e<t&&r>t&&(t=n?r:e)}));return t}const kt=(e,t,n)=>gt(e,(o=>{let l,a,s=o.from,{state:c}=e,u=c.doc.lineAt(s);if(n&&!t&&s>u.from&&s<u.from+200&&!/[^ \t]/.test(l=u.text.slice(0,s-u.from))){if("\t"==l[l.length-1])return s-1;let e=(0,r.countColumn)(l,c.tabSize)%(0,i.getIndentUnit)(c)||(0,i.getIndentUnit)(c);for(let t=0;t<e&&" "==l[l.length-1-t];t++)s--;a=s}else a=(0,r.findClusterBreak)(u.text,s-u.from,t,t)+u.from,a==s&&u.number!=(t?c.doc.lines:1)?a+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(u.text.slice(a-u.from,s-u.from))&&(a=(0,r.findClusterBreak)(u.text,a-u.from,!1,!1)+u.from);return a})),wt=e=>kt(e,!1,!0),St=e=>kt(e,!1,!1),vt=e=>kt(e,!0,!1),At=(e,t)=>gt(e,(n=>{let o=n.head,{state:i}=e,l=i.doc.lineAt(o),a=i.charCategorizer(o);for(let e=null;;){if(o==(t?l.to:l.from)){o==n.head&&l.number!=(t?i.doc.lines:1)&&(o+=t?1:-1);break}let s=(0,r.findClusterBreak)(l.text,o-l.from,t)+l.from,c=l.text.slice(Math.min(o,s)-l.from,Math.max(o,s)-l.from),u=a(c);if(null!=e&&u!=e)break;" "==c&&o==n.head||(e=u),o=s}return o})),Ct=e=>At(e,!1),Bt=e=>At(e,!0),Et=e=>gt(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})),Dt=e=>gt(e,(t=>{let n=e.lineBlockAt(t.head).from;return t.head>n?n:Math.max(0,t.head-1)})),xt=e=>gt(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)})),Lt=e=>gt(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})),Mt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=[];for(let t=0,r="",o=e.doc.iter();;){if(o.next(),o.lineBreak||o.done){let e=r.search(/\s+$/);if(e>-1&&n.push({from:t-(r.length-e),to:t}),o.done)break;r=""}else r=o.value;t+=o.value.length}return!!n.length&&(t(e.update({changes:n,userEvent:"delete"})),!0)},Tt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:r.Text.of(["",""])},range:r.EditorSelection.cursor(e.from)})));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},bt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,o=e.doc.lineAt(n),i=n==o.from?n-1:(0,r.findClusterBreak)(o.text,n-o.from,!1)+o.from,l=n==o.to?n+1:(0,r.findClusterBreak)(o.text,n-o.from,!0)+o.from;return{changes:{from:i,to:l,insert:e.doc.slice(n,l).append(e.doc.slice(i,n))},range:r.EditorSelection.cursor(l)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ot(e){let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.from),i=e.doc.lineAt(r.to);if(r.empty||r.to!=i.from||(i=e.doc.lineAt(r.to-1)),n>=o.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(r)}else t.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return t}function It(e,t,n){if(e.readOnly)return!1;let o=[],i=[];for(let t of Ot(e)){if(n?t.to==e.doc.length:0==t.from)continue;let l=e.doc.lineAt(n?t.to+1:t.from-1),a=l.length+1;if(n){o.push({from:t.to,to:l.to},{from:t.from,insert:l.text+e.lineBreak});for(let n of t.ranges)i.push(r.EditorSelection.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)))}else{o.push({from:l.from,to:t.from},{from:t.to,insert:e.lineBreak+l.text});for(let e of t.ranges)i.push(r.EditorSelection.range(e.anchor-a,e.head-a))}}return!!o.length&&(t(e.update({changes:o,scrollIntoView:!0,selection:r.EditorSelection.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}const Rt=({state:e,dispatch:t})=>It(e,t,!1),Ut=({state:e,dispatch:t})=>It(e,t,!0);function Vt(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of Ot(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Nt=({state:e,dispatch:t})=>Vt(e,t,!1),Jt=({state:e,dispatch:t})=>Vt(e,t,!0),Pt=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Ot(t).map((({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n})))),r=$(t.selection,(t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),o=e.coordsAtPos(t.head,t.assoc||1);o&&(n=r.bottom+e.documentTop-o.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)})).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0},Gt=({state:e,dispatch:t})=>(t(e.update(e.replaceSelection(e.lineBreak),{scrollIntoView:!0,userEvent:"input"})),!0),Ft=({state:e,dispatch:t})=>(t(e.update(e.changeByRange((t=>{let n=/^\s*/.exec(e.doc.lineAt(t.from).text)[0];return{changes:{from:t.from,to:t.to,insert:e.lineBreak+n},range:r.EditorSelection.cursor(t.from+n.length+1)}})),{scrollIntoView:!0,userEvent:"input"})),!0),Ht=Wt(!1),zt=Wt(!0);function Wt(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let o=t.changeByRange((n=>{let{from:o,to:a}=n,s=t.doc.lineAt(o),c=!e&&o==a&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=(0,i.syntaxTree)(e).resolveInner(t),o=r.childBefore(t),a=r.childAfter(t);return o&&a&&o.to<=t&&a.from>=t&&(n=o.type.prop(l.NodeProp.closedBy))&&n.indexOf(a.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(a.from).from&&!/\S/.test(e.sliceDoc(o.to,a.from))?{from:o.to,to:a.from}:null}(t,o);e&&(o=a=(a<=s.to?s:t.doc.lineAt(a)).to);let u=new i.IndentContext(t,{simulateBreak:o,simulateDoubleBreak:!!c}),d=(0,i.getIndentation)(u,o);for(null==d&&(d=(0,r.countColumn)(/^\s*/.exec(t.doc.lineAt(o).text)[0],t.tabSize));a<s.to&&/\s/.test(s.text[a-s.from]);)a++;c?({from:o,to:a}=c):o>s.from&&o<s.from+100&&!/\S/.test(s.text.slice(0,o))&&(o=s.from);let f=["",(0,i.indentString)(t,d)];return c&&f.push((0,i.indentString)(t,u.lineIndent(s.from,-1))),{changes:{from:o,to:a,insert:r.Text.of(f)},range:r.EditorSelection.cursor(o+1+f[1].length)}}));return n(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}}function _t(e,t){let n=-1;return e.changeByRange((o=>{let i=[];for(let r=o.from;r<=o.to;){let l=e.doc.lineAt(r);l.number>n&&(o.empty||o.to>l.from)&&(t(l,i,o),n=l.number),r=l.to+1}let l=e.changes(i);return{changes:i,range:r.EditorSelection.range(l.mapPos(o.anchor,1),l.mapPos(o.head,1))}}))}const Kt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new i.IndentContext(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),o=_t(e,((t,o,l)=>{let a=(0,i.getIndentation)(r,t.from);if(null==a)return;/\S/.test(t.text)||(a=0);let s=/^\s*/.exec(t.text)[0],c=(0,i.indentString)(e,a);(s!=c||l.from<t.from+s.length)&&(n[t.from]=a,o.push({from:t.from,to:t.from+s.length,insert:c}))}));return o.changes.empty||t(e.update(o,{userEvent:"indent"})),!0},$t=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(_t(e,((t,n)=>{n.push({from:t.from,insert:e.facet(i.indentUnit)})})),{userEvent:"input.indent"})),!0),jt=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(_t(e,((t,n)=>{let o=/^\s*/.exec(t.text)[0];if(!o)return;let l=(0,r.countColumn)(o,e.tabSize),a=0,s=(0,i.indentString)(e,Math.max(0,l-(0,i.getIndentUnit)(e)));for(;a<o.length&&a<s.length&&o.charCodeAt(a)==s.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+o.length,insert:s.slice(a)})})),{userEvent:"delete.dedent"})),!0),qt=({state:e,dispatch:t})=>e.selection.ranges.some((e=>!e.empty))?$t({state:e,dispatch:t}):(t(e.update(e.replaceSelection("\t"),{scrollIntoView:!0,userEvent:"input"})),!0),Yt=[{key:"Ctrl-b",run:Z,shift:Ve,preventDefault:!0},{key:"Ctrl-f",run:ee,shift:Ne},{key:"Ctrl-p",run:ke,shift:Qe},{key:"Ctrl-n",run:we,shift:Xe},{key:"Ctrl-a",run:Me,shift:lt},{key:"Ctrl-e",run:Te,shift:at},{key:"Ctrl-d",run:vt},{key:"Ctrl-h",run:wt},{key:"Ctrl-k",run:Et},{key:"Ctrl-Alt-h",run:Ct},{key:"Ctrl-o",run:Tt},{key:"Ctrl-t",run:bt},{key:"Ctrl-v",run:Ce}],Qt=[{key:"ArrowLeft",run:Z,shift:Ve,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:oe,shift:Fe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:xe,shift:ot,preventDefault:!0},{key:"ArrowRight",run:ee,shift:Ne,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:ie,shift:He,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Le,shift:it,preventDefault:!0},{key:"ArrowUp",run:ke,shift:Qe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:st,shift:ut},{mac:"Ctrl-ArrowUp",run:Ae,shift:et},{key:"ArrowDown",run:we,shift:Xe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ct,shift:dt},{mac:"Ctrl-ArrowDown",run:Ce,shift:tt},{key:"PageUp",run:Ae,shift:et},{key:"PageDown",run:Ce,shift:tt},{key:"Home",run:De,shift:rt,preventDefault:!0},{key:"Mod-Home",run:st,shift:ut},{key:"End",run:Ee,shift:nt,preventDefault:!0},{key:"Mod-End",run:ct,shift:dt},{key:"Enter",run:Ht},{key:"Mod-a",run:ft},{key:"Backspace",run:wt,shift:wt},{key:"Delete",run:vt},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ct},{key:"Mod-Delete",mac:"Alt-Delete",run:Bt},{mac:"Mod-Backspace",run:xt},{mac:"Mod-Delete",run:Lt}].concat(Yt.map((e=>({mac:e.key,run:e.run,shift:e.shift})))),Xt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:pe,shift:je},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:ge,shift:qe},{key:"Alt-ArrowUp",run:Rt},{key:"Shift-Alt-ArrowUp",run:Nt},{key:"Alt-ArrowDown",run:Ut},{key:"Shift-Alt-ArrowDown",run:Jt},{key:"Escape",run:pt},{key:"Mod-Enter",run:zt},{key:"Alt-l",mac:"Ctrl-l",run:ht},{key:"Mod-i",run:mt,preventDefault:!0},{key:"Mod-[",run:jt},{key:"Mod-]",run:$t},{key:"Mod-Alt-\\",run:Kt},{key:"Shift-Mod-k",run:Pt},{key:"Shift-Mod-\\",run:Oe},{key:"Mod-/",run:a},{key:"Alt-A",run:f}].concat(Qt),Zt={key:"Tab",run:$t,shift:jt}}}]);
|