@sme.up/ketchup2 2.0.0-SNAPSHOT-20250908152453 → 2.0.0-SNAPSHOT-20250909100819

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.
Files changed (120) hide show
  1. package/dist/{_basePickBy-DNewzgl9.cjs → _basePickBy-Ca1ngxe-.cjs} +1 -1
  2. package/dist/{_basePickBy-Bq-OHVlJ.js → _basePickBy-CnPX6Bdb.js} +23 -23
  3. package/dist/{_baseUniq-DUO9awf7.js → _baseUniq-CQt2p9Xf.js} +40 -40
  4. package/dist/{_baseUniq-CQ7AOjch.cjs → _baseUniq-bHS4L6X9.cjs} +1 -1
  5. package/dist/{arc-BC6Mnh_l.js → arc-B2BtxFI4.js} +1 -1
  6. package/dist/{arc-H_1C-9yW.cjs → arc-Bg-chCuU.cjs} +1 -1
  7. package/dist/{architecture-O4VJ6CD3-Bfi1Y3W3.cjs → architecture-O4VJ6CD3-Bogzr-i1.cjs} +1 -1
  8. package/dist/{architecture-O4VJ6CD3-B2_zBkXA.js → architecture-O4VJ6CD3-DYTHPFXy.js} +1 -1
  9. package/dist/{architectureDiagram-KFL7JDKH-DOaG_WZV.cjs → architectureDiagram-W76B3OCA-BUHj3Zr2.cjs} +1 -1
  10. package/dist/{architectureDiagram-KFL7JDKH-Dzqraep6.js → architectureDiagram-W76B3OCA-Bj05bf6s.js} +132 -132
  11. package/dist/basic-components/typography/typography.d.ts.map +1 -1
  12. package/dist/{blockDiagram-ZYB65J3Q-0TfXbzbL.cjs → blockDiagram-QIGZ2CNN-BAiichlp.cjs} +4 -4
  13. package/dist/{blockDiagram-ZYB65J3Q-BF5gB3wI.js → blockDiagram-QIGZ2CNN-CwpHAq1V.js} +5 -5
  14. package/dist/{c4Diagram-AAMF2YG6-BUdDUCAg.cjs → c4Diagram-FPNF74CW-De8NL9Id.cjs} +4 -4
  15. package/dist/{c4Diagram-AAMF2YG6-CZutQWdQ.js → c4Diagram-FPNF74CW-DiSLBa6J.js} +2 -2
  16. package/dist/channel-C-hM23ua.cjs +1 -0
  17. package/dist/channel-Cn_5XvBc.js +5 -0
  18. package/dist/{chunk-ANTBXLJU-DqW7nBC-.cjs → chunk-4BX2VUAB-D2Fra4jo.cjs} +1 -1
  19. package/dist/{chunk-ANTBXLJU-BdaEgFx7.js → chunk-4BX2VUAB-Dc8D0um4.js} +1 -1
  20. package/dist/{chunk-WVR4S24B-Chw9GJ4r.cjs → chunk-55IACEB6-B9OyHdBl.cjs} +1 -1
  21. package/dist/{chunk-WVR4S24B-DkA4uS4H.js → chunk-55IACEB6-WLFUV7oZ.js} +1 -1
  22. package/dist/{chunk-GLLZNHP4-DiiaqYXe.js → chunk-FMBD7UC4-CB2wfBwS.js} +1 -1
  23. package/dist/{chunk-GLLZNHP4-BA8r1pFP.cjs → chunk-FMBD7UC4-gecPdlnv.cjs} +1 -1
  24. package/dist/{chunk-JBRWN2VN-BaREAv8H.js → chunk-K7UQS3LO-Ct-3gwwe.js} +176 -176
  25. package/dist/chunk-K7UQS3LO-DlKvL8UP.cjs +165 -0
  26. package/dist/{chunk-NRVI72HA-DLE8wk3-.js → chunk-QN33PNHL-D4Q8z0QK.js} +1 -1
  27. package/dist/{chunk-NRVI72HA-DRmCDH9L.cjs → chunk-QN33PNHL-DnwK1wh-.cjs} +1 -1
  28. package/dist/{chunk-FHKO5MBM-CzQq96F_.js → chunk-QZHKN3VN-BQc1ljoT.js} +1 -1
  29. package/dist/{chunk-FHKO5MBM-DXqhRcMm.cjs → chunk-QZHKN3VN-cx48mWRx.cjs} +1 -1
  30. package/dist/{chunk-LXBSTHXV-DFifdLZK.js → chunk-TVAH2DTR-C6i3nG3J.js} +3 -3
  31. package/dist/{chunk-LXBSTHXV-B0scQvN2.cjs → chunk-TVAH2DTR-Cln0v1mj.cjs} +3 -3
  32. package/dist/{chunk-OMD6QJNC-RjSGzdd8.cjs → chunk-TZMSLE5B-B512fbOf.cjs} +1 -1
  33. package/dist/{chunk-OMD6QJNC-BYvyUH2d.js → chunk-TZMSLE5B-Ch4jqMvo.js} +1 -1
  34. package/dist/{classDiagram-3BZAVTQC-BOmQDPcS.cjs → classDiagram-KNZD7YFC-BoArhhwm.cjs} +1 -1
  35. package/dist/{classDiagram-v2-QTMF73CY-CAtFVXFw.js → classDiagram-KNZD7YFC-CDc6SE_W.js} +2 -2
  36. package/dist/{classDiagram-v2-QTMF73CY-BOmQDPcS.cjs → classDiagram-v2-RKCZMP56-BoArhhwm.cjs} +1 -1
  37. package/dist/{classDiagram-3BZAVTQC-CAtFVXFw.js → classDiagram-v2-RKCZMP56-CDc6SE_W.js} +2 -2
  38. package/dist/{clone-B-bAOLls.js → clone-CP0dShvp.js} +1 -1
  39. package/dist/clone-DxIwbnXb.cjs +1 -0
  40. package/dist/cose-bilkent-S5V4N54A-Bx4ACTR3.js +2608 -0
  41. package/dist/cose-bilkent-S5V4N54A-DLiy4Dys.cjs +1 -0
  42. package/dist/{dagre-2BBEFEWP-CLTO8d-K.js → dagre-5GWH7T2D-B_9p1wnG.js} +108 -108
  43. package/dist/{dagre-2BBEFEWP-BCS301Dq.cjs → dagre-5GWH7T2D-XNzFQlw3.cjs} +1 -1
  44. package/dist/{diagram-4IRLE6MV-_WYVJBfL.cjs → diagram-N5W7TBWH-CELy5R0I.cjs} +2 -2
  45. package/dist/{diagram-4IRLE6MV-Cz4wPwXi.js → diagram-N5W7TBWH-DgzCbhxK.js} +23 -23
  46. package/dist/{diagram-RP2FKANI-C_dWK3j7.cjs → diagram-QEK2KX5R-CWUJhJRb.cjs} +4 -4
  47. package/dist/{diagram-RP2FKANI-CXmRNmBu.js → diagram-QEK2KX5R-DDJzGT4e.js} +15 -15
  48. package/dist/{diagram-GUPCWM2R-CH-4x3WD.js → diagram-S2PKOQOG-CGS6jThV.js} +10 -10
  49. package/dist/{diagram-GUPCWM2R-O4fOIHyx.cjs → diagram-S2PKOQOG-CxivHA5Z.cjs} +1 -1
  50. package/dist/{erDiagram-HZWUO2LU-uRisj4mV.cjs → erDiagram-AWTI2OKA-Bm9UKu4a.cjs} +4 -4
  51. package/dist/{erDiagram-HZWUO2LU-Dqt1BE2C.js → erDiagram-AWTI2OKA-uK37swgK.js} +4 -4
  52. package/dist/{flowDiagram-THRYKUMA-bRWo210y.cjs → flowDiagram-PVAE7QVJ-BoifHLur.cjs} +7 -7
  53. package/dist/{flowDiagram-THRYKUMA-C-r5MZds.js → flowDiagram-PVAE7QVJ-CseXgbf4.js} +5 -5
  54. package/dist/{ganttDiagram-WV7ZQ7D5-BVe9Yi12.js → ganttDiagram-OWAHRB6G-DBcQE30n.js} +57 -57
  55. package/dist/{ganttDiagram-WV7ZQ7D5-Dh9UR52T.cjs → ganttDiagram-OWAHRB6G-DxrVdbSN.cjs} +1 -1
  56. package/dist/{gitGraph-ZV4HHKMB-rHh_4sTF.cjs → gitGraph-ZV4HHKMB--W5fvjOe.cjs} +1 -1
  57. package/dist/{gitGraph-ZV4HHKMB-Bwp8pNLp.js → gitGraph-ZV4HHKMB-DI7K1S9a.js} +1 -1
  58. package/dist/{gitGraphDiagram-OJR772UL-Bq60AaCq.cjs → gitGraphDiagram-NY62KEGX-C8IAHC2w.cjs} +4 -4
  59. package/dist/{gitGraphDiagram-OJR772UL-BNm74Q9n.js → gitGraphDiagram-NY62KEGX-_dzUqzP_.js} +4 -4
  60. package/dist/{graph-CMnK4YO3.js → graph-BoeGwTWO.js} +4 -4
  61. package/dist/{graph-BrGj_Gfv.cjs → graph-v1PSEGdd.cjs} +1 -1
  62. package/dist/index-CdZgX2Ma.cjs +301 -0
  63. package/dist/{index-VJw3klPt.js → index-kj0EuvQM.js} +10116 -9505
  64. package/dist/{info-63CPKGFF-0H7FGkBP.cjs → info-63CPKGFF-DExJutq3.cjs} +1 -1
  65. package/dist/info-63CPKGFF-_OKf26EF.js +5 -0
  66. package/dist/{infoDiagram-DDUCL6P7-Cf77NdxY.js → infoDiagram-STP46IZ2-BybsRpjy.js} +2 -2
  67. package/dist/{infoDiagram-DDUCL6P7-DjqD8eRi.cjs → infoDiagram-STP46IZ2-ylOwUZka.cjs} +1 -1
  68. package/dist/{journeyDiagram-FFXJYRFH-DtxrMVYZ.cjs → journeyDiagram-BIP6EPQ6-B8QfAOqB.cjs} +4 -4
  69. package/dist/{journeyDiagram-FFXJYRFH-C7_bJR3c.js → journeyDiagram-BIP6EPQ6-aD-qICsN.js} +4 -4
  70. package/dist/{kanban-definition-KOZQBZVT-Bo9dRDl_.js → kanban-definition-6OIFK2YF-C0EFe9JN.js} +24 -24
  71. package/dist/{kanban-definition-KOZQBZVT-Bel-f3_i.cjs → kanban-definition-6OIFK2YF-Dxddoy_3.cjs} +5 -5
  72. package/dist/ketchup2.cjs.js +1 -1
  73. package/dist/ketchup2.es.js +9 -9
  74. package/dist/{layout-Bt4IJcSa.cjs → layout-CwMglWfT.cjs} +1 -1
  75. package/dist/{layout-kUC11kUc.js → layout-D6agY5Ds.js} +32 -32
  76. package/dist/{linear-BDcEY_LY.js → linear-CHZKZE-6.js} +12 -12
  77. package/dist/{linear-50cMYwZQ.cjs → linear-zcj9uSLT.cjs} +1 -1
  78. package/dist/{mermaid-parser.core-Bxkmx2-5.cjs → mermaid-parser.core-BFoNlVio.cjs} +2 -2
  79. package/dist/{mermaid-parser.core-BnvQOoyE.js → mermaid-parser.core-Blpz4SbD.js} +11 -11
  80. package/dist/mindmap-definition-Q6HEUPPD-BdQ8h5vs.js +755 -0
  81. package/dist/mindmap-definition-Q6HEUPPD-low7Mewd.cjs +68 -0
  82. package/dist/{packet-HUATNLJX-6TXP1bqK.cjs → packet-HUATNLJX-BmvldEFD.cjs} +1 -1
  83. package/dist/{packet-HUATNLJX-DaHhWwAU.js → packet-HUATNLJX-TyfgX3j3.js} +1 -1
  84. package/dist/{pie-WTHONI2E-AzeewyiY.cjs → pie-WTHONI2E-BltdTNxf.cjs} +1 -1
  85. package/dist/pie-WTHONI2E-Dt2hdV7w.js +5 -0
  86. package/dist/{pieDiagram-DBDJKBY4-W8GACAWO.cjs → pieDiagram-ADFJNKIX-CzvxfXwl.cjs} +3 -3
  87. package/dist/{pieDiagram-DBDJKBY4-DBzbWAu9.js → pieDiagram-ADFJNKIX-ExzVUSNO.js} +25 -25
  88. package/dist/{quadrantDiagram-YPSRARAO-BjYPzvUJ.cjs → quadrantDiagram-LMRXKWRM-Bi7EaXZ7.cjs} +1 -1
  89. package/dist/{quadrantDiagram-YPSRARAO-mnX6YljL.js → quadrantDiagram-LMRXKWRM-DqMz0iQn.js} +2 -2
  90. package/dist/radar-NJJJXTRR-BWXgZsQ6.js +5 -0
  91. package/dist/{radar-NJJJXTRR-BocemfZ8.cjs → radar-NJJJXTRR-DduW7l7R.cjs} +1 -1
  92. package/dist/{requirementDiagram-EGVEC5DT-B9Bwf2ay.js → requirementDiagram-4UW4RH46-DykQlAiG.js} +3 -3
  93. package/dist/{requirementDiagram-EGVEC5DT-Bimu3sL7.cjs → requirementDiagram-4UW4RH46-ud4W-Zp9.cjs} +4 -4
  94. package/dist/{sankeyDiagram-HRAUVNP4-DJiyVYTm.cjs → sankeyDiagram-GR3RE2ED-CUj9_a8o.cjs} +1 -1
  95. package/dist/{sankeyDiagram-HRAUVNP4-DzXnX0Ga.js → sankeyDiagram-GR3RE2ED-RK19iv1u.js} +1 -1
  96. package/dist/sequenceDiagram-C3RYC4MD-BuBk17RB.js +2511 -0
  97. package/dist/sequenceDiagram-C3RYC4MD-CcM-9wjX.cjs +145 -0
  98. package/dist/{stateDiagram-UUKSUZ4H-BfB7OKY5.js → stateDiagram-KXAO66HF-C_vpiwWi.js} +4 -4
  99. package/dist/{stateDiagram-UUKSUZ4H-DNsbUQC8.cjs → stateDiagram-KXAO66HF-leA_Ugq1.cjs} +1 -1
  100. package/dist/{stateDiagram-v2-EYPG3UTE-k2P5SO6h.cjs → stateDiagram-v2-UMBNRL4Z-DMn1PJJZ.cjs} +1 -1
  101. package/dist/{stateDiagram-v2-EYPG3UTE-CrbgZXhp.js → stateDiagram-v2-UMBNRL4Z-krzWPwwC.js} +2 -2
  102. package/dist/{timeline-definition-3HZDQTIS-TVmN8Z80.js → timeline-definition-XQNQX7LJ-CbPKkQDk.js} +2 -2
  103. package/dist/{timeline-definition-3HZDQTIS-CJz-ObCi.cjs → timeline-definition-XQNQX7LJ-DbVINiOM.cjs} +1 -1
  104. package/dist/{treemap-75Q7IDZK-CbpJhl6F.js → treemap-75Q7IDZK-CRSsbp2b.js} +1 -1
  105. package/dist/{treemap-75Q7IDZK-MVFNLG-W.cjs → treemap-75Q7IDZK-CcdS7WCH.cjs} +1 -1
  106. package/dist/{xychartDiagram-FDP5SA34-kb-QmiwQ.cjs → xychartDiagram-6GGTOJPD-8fzwt7BJ.cjs} +1 -1
  107. package/dist/{xychartDiagram-FDP5SA34-QzZvVH2o.js → xychartDiagram-6GGTOJPD-CGq5lmkW.js} +2 -2
  108. package/package.json +13 -13
  109. package/dist/channel-D7-lFnTD.js +0 -5
  110. package/dist/channel-DveM5GOL.cjs +0 -1
  111. package/dist/chunk-JBRWN2VN-4oDxplqY.cjs +0 -165
  112. package/dist/clone-C0dQSPFZ.cjs +0 -1
  113. package/dist/index-BA07EijG.cjs +0 -266
  114. package/dist/info-63CPKGFF-CV7HrEKO.js +0 -5
  115. package/dist/mindmap-definition-LNHGMQRG-CVh0vQd5.js +0 -3230
  116. package/dist/mindmap-definition-LNHGMQRG-qQmqPKl8.cjs +0 -95
  117. package/dist/pie-WTHONI2E-Cq9zrqsG.js +0 -5
  118. package/dist/radar-NJJJXTRR-Yz9jsEDT.js +0 -5
  119. package/dist/sequenceDiagram-4MX5Z3NR-DHUCnBgG.cjs +0 -122
  120. package/dist/sequenceDiagram-4MX5Z3NR-DuaMVfG7.js +0 -2281
@@ -1,266 +0,0 @@
1
- "use strict";const z=require("react"),s1=require("react-dom");function a1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const xs=a1(z);function Ed(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bs={exports:{}},on={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var cu;function o1(){if(cu)return on;cu=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,n,s){var o=null;if(s!==void 0&&(o=""+s),n.key!==void 0&&(o=""+n.key),"key"in n){s={};for(var a in n)a!=="key"&&(s[a]=n[a])}else s=n;return n=s.ref,{$$typeof:e,type:i,key:o,ref:n!==void 0?n:null,props:s}}return on.Fragment=t,on.jsx=r,on.jsxs=r,on}var ln={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var hu;function l1(){return hu||(hu=1,process.env.NODE_ENV!=="production"&&function(){function e(_){if(_==null)return null;if(typeof _=="function")return _.$$typeof===I?null:_.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case g:return"Fragment";case x:return"Profiler";case y:return"StrictMode";case v:return"Suspense";case E:return"SuspenseList";case W:return"Activity"}if(typeof _=="object")switch(typeof _.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case p:return"Portal";case w:return(_.displayName||"Context")+".Provider";case b:return(_._context.displayName||"Context")+".Consumer";case C:var M=_.render;return _=_.displayName,_||(_=M.displayName||M.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case T:return M=_.displayName||null,M!==null?M:e(_.type)||"Memo";case N:M=_._payload,_=_._init;try{return e(_(M))}catch{}}return null}function t(_){return""+_}function r(_){try{t(_);var M=!1}catch{M=!0}if(M){M=console;var H=M.error,P=typeof Symbol=="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object";return H.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",P),t(_)}}function i(_){if(_===g)return"<>";if(typeof _=="object"&&_!==null&&_.$$typeof===N)return"<...>";try{var M=e(_);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function n(){var _=k.A;return _===null?null:_.getOwner()}function s(){return Error("react-stack-top-frame")}function o(_){if(L.call(_,"key")){var M=Object.getOwnPropertyDescriptor(_,"key").get;if(M&&M.isReactWarning)return!1}return _.key!==void 0}function a(_,M){function H(){O||(O=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}H.isReactWarning=!0,Object.defineProperty(_,"key",{get:H,configurable:!0})}function l(){var _=e(this.type);return $[_]||($[_]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),_=this.props.ref,_!==void 0?_:null}function c(_,M,H,P,U,Y,K,Z){return H=Y.ref,_={$$typeof:d,type:_,key:M,props:Y,_owner:U},(H!==void 0?H:null)!==null?Object.defineProperty(_,"ref",{enumerable:!1,get:l}):Object.defineProperty(_,"ref",{enumerable:!1,value:null}),_._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(_,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(_,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(_,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_}function h(_,M,H,P,U,Y,K,Z){var Q=M.children;if(Q!==void 0)if(P)if(R(Q)){for(P=0;P<Q.length;P++)u(Q[P]);Object.freeze&&Object.freeze(Q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(Q);if(L.call(M,"key")){Q=e(_);var ot=Object.keys(M).filter(function(wt){return wt!=="key"});P=0<ot.length?"{key: someKey, "+ot.join(": ..., ")+": ...}":"{key: someKey}",D[Q+P]||(ot=0<ot.length?"{"+ot.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
- let props = %s;
19
- <%s {...props} />
20
- React keys must be passed directly to JSX without using spread:
21
- let props = %s;
22
- <%s key={someKey} {...props} />`,P,Q,ot,Q),D[Q+P]=!0)}if(Q=null,H!==void 0&&(r(H),Q=""+H),o(M)&&(r(M.key),Q=""+M.key),"key"in M){H={};for(var et in M)et!=="key"&&(H[et]=M[et])}else H=M;return Q&&a(H,typeof _=="function"?_.displayName||_.name||"Unknown":_),c(_,Q,Y,U,n(),H,K,Z)}function u(_){typeof _=="object"&&_!==null&&_.$$typeof===d&&_._store&&(_._store.validated=1)}var f=z,d=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),w=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),k=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,R=Array.isArray,B=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(_){return _()}};var O,$={},q=f.react_stack_bottom_frame.bind(f,s)(),A=B(i(s)),D={};ln.Fragment=g,ln.jsx=function(_,M,H,P,U){var Y=1e4>k.recentlyCreatedOwnerStacks++;return h(_,M,H,!1,P,U,Y?Error("react-stack-top-frame"):q,Y?B(i(_)):A)},ln.jsxs=function(_,M,H,P,U){var Y=1e4>k.recentlyCreatedOwnerStacks++;return h(_,M,H,!0,P,U,Y?Error("react-stack-top-frame"):q,Y?B(i(_)):A)}}()),ln}var uu;function c1(){return uu||(uu=1,process.env.NODE_ENV==="production"?bs.exports=o1():bs.exports=l1()),bs.exports}var S=c1();function h1(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function ea(){return ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ea.apply(null,arguments)}function ul(e,t){return ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ul(e,t)}function u1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ul(e,t)}function Bo(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,s;i<n;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}var vs={};/*!
23
- * content-type
24
- * Copyright(c) 2015 Douglas Christopher Wilson
25
- * MIT Licensed
26
- */var fu;function f1(){if(fu)return vs;fu=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,i=/\\([\u000b\u0020-\u00ff])/g,n=/([\\"])/g,s=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;vs.format=o,vs.parse=a;function o(u){if(!u||typeof u!="object")throw new TypeError("argument obj is required");var f=u.parameters,d=u.type;if(!d||!s.test(d))throw new TypeError("invalid type");var p=d;if(f&&typeof f=="object")for(var g,y=Object.keys(f).sort(),x=0;x<y.length;x++){if(g=y[x],!r.test(g))throw new TypeError("invalid parameter name");p+="; "+g+"="+c(f[g])}return p}function a(u){if(!u)throw new TypeError("argument string is required");var f=typeof u=="object"?l(u):u;if(typeof f!="string")throw new TypeError("argument string is required to be a string");var d=f.indexOf(";"),p=d!==-1?f.slice(0,d).trim():f.trim();if(!s.test(p))throw new TypeError("invalid media type");var g=new h(p.toLowerCase());if(d!==-1){var y,x,b;for(e.lastIndex=d;x=e.exec(f);){if(x.index!==d)throw new TypeError("invalid parameter format");d+=x[0].length,y=x[1].toLowerCase(),b=x[2],b.charCodeAt(0)===34&&(b=b.slice(1,-1),b.indexOf("\\")!==-1&&(b=b.replace(i,"$1"))),g.parameters[y]=b}if(d!==f.length)throw new TypeError("invalid parameter format")}return g}function l(u){var f;if(typeof u.getHeader=="function"?f=u.getHeader("content-type"):typeof u.headers=="object"&&(f=u.headers&&u.headers["content-type"]),typeof f!="string")throw new TypeError("content-type header is missing from object");return f}function c(u){var f=String(u);if(r.test(f))return f;if(f.length>0&&!t.test(f))throw new TypeError("invalid parameter value");return'"'+f.replace(n,"\\$1")+'"'}function h(u){this.parameters=Object.create(null),this.type=u}return vs}var d1=f1(),bi=new Map,Ld=function(t){return t.cloneNode(!0)},du=function(){return window.location.protocol==="file:"},Ad=function(t,r,i){var n=new XMLHttpRequest;n.onreadystatechange=function(){try{if(!/\.svg/i.test(t)&&n.readyState===2){var s=n.getResponseHeader("Content-Type");if(!s)throw new Error("Content type not found");var o=d1.parse(s).type;if(!(o==="image/svg+xml"||o==="text/plain"))throw new Error("Invalid content type: ".concat(o))}if(n.readyState===4){if(n.status===404||n.responseXML===null)throw new Error(du()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+t);if(n.status===200||du()&&n.status===0)i(null,n);else throw new Error("There was a problem injecting the SVG: "+n.status+" "+n.statusText)}}catch(a){if(n.abort(),a instanceof Error)i(a,n);else throw a}},n.open("GET",t),n.withCredentials=r,n.overrideMimeType&&n.overrideMimeType("text/xml"),n.send()},vr={},pu=function(t,r){vr[t]=vr[t]||[],vr[t].push(r)},p1=function(t){for(var r=function(o,a){setTimeout(function(){if(Array.isArray(vr[t])){var l=bi.get(t),c=vr[t][o];l instanceof SVGSVGElement&&c(null,Ld(l)),l instanceof Error&&c(l),o===vr[t].length-1&&delete vr[t]}},0)},i=0,n=vr[t].length;i<n;i++)r(i)},g1=function(t,r,i){if(bi.has(t)){var n=bi.get(t);if(n===void 0){pu(t,i);return}if(n instanceof SVGSVGElement){i(null,Ld(n));return}}bi.set(t,void 0),pu(t,i),Ad(t,r,function(s,o){var a;s?bi.set(t,s):((a=o.responseXML)===null||a===void 0?void 0:a.documentElement)instanceof SVGSVGElement&&bi.set(t,o.responseXML.documentElement),p1(t)})},m1=function(t,r,i){Ad(t,r,function(n,s){var o;n?i(n):((o=s.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&i(null,s.responseXML.documentElement)})},y1=0,x1=function(){return++y1},Pe=[],gu={},b1="http://www.w3.org/2000/svg",Oo="http://www.w3.org/1999/xlink",mu=function(t,r,i,n,s,o,a){var l=t.getAttribute("data-src")||t.getAttribute("src");if(!l){a(new Error("Invalid data-src or src attribute"));return}if(Pe.indexOf(t)!==-1){Pe.splice(Pe.indexOf(t),1),t=null;return}Pe.push(t),t.setAttribute("src","");var c=n?g1:m1;c(l,s,function(h,u){if(!u){Pe.splice(Pe.indexOf(t),1),t=null,a(h);return}var f=t.getAttribute("id");f&&u.setAttribute("id",f);var d=t.getAttribute("title");d&&u.setAttribute("title",d);var p=t.getAttribute("width");p&&u.setAttribute("width",p);var g=t.getAttribute("height");g&&u.setAttribute("height",g);var y=Array.from(new Set(Bo(Bo(Bo([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(t.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",y);var x=t.getAttribute("style");x&&u.setAttribute("style",x),u.setAttribute("data-src",l);var b=[].filter.call(t.attributes,function(A){return/^data-\w[\w-]*$/.test(A.name)});if(Array.prototype.forEach.call(b,function(A){A.name&&A.value&&u.setAttribute(A.name,A.value)}),i){var w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},C,v,E,T,N;Object.keys(w).forEach(function(A){C=A,E=w[A],v=u.querySelectorAll(C+"[id]");for(var D=function(P,U){T=v[P].id,N=T+"-"+x1();var Y;Array.prototype.forEach.call(E,function(rt){Y=u.querySelectorAll("["+rt+'*="'+T+'"]');for(var yt=0,tt=Y.length;yt<tt;yt++){var pt=Y[yt].getAttribute(rt);pt&&!pt.match(new RegExp('url\\("?#'+T+'"?\\)'))||Y[yt].setAttribute(rt,"url(#"+N+")")}});for(var K=u.querySelectorAll("[*|href]"),Z=[],Q=0,ot=K.length;Q<ot;Q++){var et=K[Q].getAttributeNS(Oo,"href");et&&et.toString()==="#"+v[P].id&&Z.push(K[Q])}for(var wt=0,G=Z.length;wt<G;wt++)Z[wt].setAttributeNS(Oo,"href","#"+N);v[P].id=N},_=0,M=v.length;_<M;_++)D(_)})}u.removeAttribute("xmlns:a");for(var W=u.querySelectorAll("script"),I=[],k,L,R=0,B=W.length;R<B;R++)L=W[R].getAttribute("type"),(!L||L==="application/ecmascript"||L==="application/javascript"||L==="text/javascript")&&(k=W[R].innerText||W[R].textContent,k&&I.push(k),u.removeChild(W[R]));if(I.length>0&&(r==="always"||r==="once"&&!gu[l])){for(var O=0,$=I.length;O<$;O++)new Function(I[O])(window);gu[l]=!0}var q=u.querySelectorAll("style");if(Array.prototype.forEach.call(q,function(A){A.textContent+=""}),u.setAttribute("xmlns",b1),u.setAttribute("xmlns:xlink",Oo),o(u),!t.parentNode){Pe.splice(Pe.indexOf(t),1),t=null,a(new Error("Parent node is null"));return}t.parentNode.replaceChild(u,t),Pe.splice(Pe.indexOf(t),1),t=null,a(null,u)})},v1=function(t,r){var i=r===void 0?{}:r,n=i.afterAll,s=n===void 0?function(){}:n,o=i.afterEach,a=o===void 0?function(){}:o,l=i.beforeEach,c=l===void 0?function(){}:l,h=i.cacheRequests,u=h===void 0?!0:h,f=i.evalScripts,d=f===void 0?"never":f,p=i.httpRequestWithCredentials,g=p===void 0?!1:p,y=i.renumerateIRIElements,x=y===void 0?!0:y;if(t&&"length"in t)for(var b=0,w=0,C=t.length;w<C;w++)mu(t[w],d,x,u,g,c,function(v,E){a(v,E),t&&"length"in t&&t.length===++b&&s(b)});else t?mu(t,d,x,u,g,c,function(v,E){a(v,E),s(1),t=null}):s(0)},ws={exports:{}},Cs={exports:{}},At={};/** @license React v16.13.1
27
- * react-is.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var yu;function w1(){if(yu)return At;yu=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(v){if(typeof v=="object"&&v!==null){var E=v.$$typeof;switch(E){case t:switch(v=v.type,v){case l:case c:case i:case s:case n:case u:return v;default:switch(v=v&&v.$$typeof,v){case a:case h:case p:case d:case o:return v;default:return E}}case r:return E}}}function C(v){return w(v)===c}return At.AsyncMode=l,At.ConcurrentMode=c,At.ContextConsumer=a,At.ContextProvider=o,At.Element=t,At.ForwardRef=h,At.Fragment=i,At.Lazy=p,At.Memo=d,At.Portal=r,At.Profiler=s,At.StrictMode=n,At.Suspense=u,At.isAsyncMode=function(v){return C(v)||w(v)===l},At.isConcurrentMode=C,At.isContextConsumer=function(v){return w(v)===a},At.isContextProvider=function(v){return w(v)===o},At.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},At.isForwardRef=function(v){return w(v)===h},At.isFragment=function(v){return w(v)===i},At.isLazy=function(v){return w(v)===p},At.isMemo=function(v){return w(v)===d},At.isPortal=function(v){return w(v)===r},At.isProfiler=function(v){return w(v)===s},At.isStrictMode=function(v){return w(v)===n},At.isSuspense=function(v){return w(v)===u},At.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===i||v===c||v===s||v===n||v===u||v===f||typeof v=="object"&&v!==null&&(v.$$typeof===p||v.$$typeof===d||v.$$typeof===o||v.$$typeof===a||v.$$typeof===h||v.$$typeof===y||v.$$typeof===x||v.$$typeof===b||v.$$typeof===g)},At.typeOf=w,At}var Mt={};/** @license React v16.13.1
34
- * react-is.development.js
35
- *
36
- * Copyright (c) Facebook, Inc. and its affiliates.
37
- *
38
- * This source code is licensed under the MIT license found in the
39
- * LICENSE file in the root directory of this source tree.
40
- */var xu;function C1(){return xu||(xu=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(G){return typeof G=="string"||typeof G=="function"||G===i||G===c||G===s||G===n||G===u||G===f||typeof G=="object"&&G!==null&&(G.$$typeof===p||G.$$typeof===d||G.$$typeof===o||G.$$typeof===a||G.$$typeof===h||G.$$typeof===y||G.$$typeof===x||G.$$typeof===b||G.$$typeof===g)}function C(G){if(typeof G=="object"&&G!==null){var rt=G.$$typeof;switch(rt){case t:var yt=G.type;switch(yt){case l:case c:case i:case s:case n:case u:return yt;default:var tt=yt&&yt.$$typeof;switch(tt){case a:case h:case p:case d:case o:return tt;default:return rt}}case r:return rt}}}var v=l,E=c,T=a,N=o,W=t,I=h,k=i,L=p,R=d,B=r,O=s,$=n,q=u,A=!1;function D(G){return A||(A=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(G)||C(G)===l}function _(G){return C(G)===c}function M(G){return C(G)===a}function H(G){return C(G)===o}function P(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function U(G){return C(G)===h}function Y(G){return C(G)===i}function K(G){return C(G)===p}function Z(G){return C(G)===d}function Q(G){return C(G)===r}function ot(G){return C(G)===s}function et(G){return C(G)===n}function wt(G){return C(G)===u}Mt.AsyncMode=v,Mt.ConcurrentMode=E,Mt.ContextConsumer=T,Mt.ContextProvider=N,Mt.Element=W,Mt.ForwardRef=I,Mt.Fragment=k,Mt.Lazy=L,Mt.Memo=R,Mt.Portal=B,Mt.Profiler=O,Mt.StrictMode=$,Mt.Suspense=q,Mt.isAsyncMode=D,Mt.isConcurrentMode=_,Mt.isContextConsumer=M,Mt.isContextProvider=H,Mt.isElement=P,Mt.isForwardRef=U,Mt.isFragment=Y,Mt.isLazy=K,Mt.isMemo=Z,Mt.isPortal=Q,Mt.isProfiler=ot,Mt.isStrictMode=et,Mt.isSuspense=wt,Mt.isValidElementType=w,Mt.typeOf=C}()),Mt}var bu;function Md(){return bu||(bu=1,process.env.NODE_ENV==="production"?Cs.exports=w1():Cs.exports=C1()),Cs.exports}/*
41
- object-assign
42
- (c) Sindre Sorhus
43
- @license MIT
44
- */var Ro,vu;function _1(){if(vu)return Ro;vu=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function n(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(h){return o[h]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(h){c[h]=h}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ro=n()?Object.assign:function(s,o){for(var a,l=i(s),c,h=1;h<arguments.length;h++){a=Object(arguments[h]);for(var u in a)t.call(a,u)&&(l[u]=a[u]);if(e){c=e(a);for(var f=0;f<c.length;f++)r.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Ro}var Do,wu;function Lc(){if(wu)return Do;wu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Do=e,Do}var Fo,Cu;function $d(){return Cu||(Cu=1,Fo=Function.call.bind(Object.prototype.hasOwnProperty)),Fo}var Io,_u;function S1(){if(_u)return Io;_u=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Lc(),r={},i=$d();e=function(s){var o="Warning: "+s;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function n(s,o,a,l,c){if(process.env.NODE_ENV!=="production"){for(var h in s)if(i(s,h)){var u;try{if(typeof s[h]!="function"){var f=Error((l||"React class")+": "+a+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}u=s[h](o,h,l,a,null,t)}catch(p){u=p}if(u&&!(u instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in r)){r[u.message]=!0;var d=c?c():"";e("Failed "+a+" type: "+u.message+(d??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Io=n,Io}var No,Su;function k1(){if(Su)return No;Su=1;var e=Md(),t=_1(),r=Lc(),i=$d(),n=S1(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return No=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function u(_){var M=_&&(c&&_[c]||_[h]);if(typeof M=="function")return M}var f="<<anonymous>>",d={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:b(),arrayOf:w,element:C(),elementType:v(),instanceOf:E,node:I(),objectOf:N,oneOf:T,oneOfType:W,shape:L,exact:R};function p(_,M){return _===M?_!==0||1/_===1/M:_!==_&&M!==M}function g(_,M){this.message=_,this.data=M&&typeof M=="object"?M:{},this.stack=""}g.prototype=Error.prototype;function y(_){if(process.env.NODE_ENV!=="production")var M={},H=0;function P(Y,K,Z,Q,ot,et,wt){if(Q=Q||f,et=et||Z,wt!==r){if(l){var G=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var rt=Q+":"+Z;!M[rt]&&H<3&&(s("You are manually calling a React.PropTypes validation function for the `"+et+"` prop on `"+Q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[rt]=!0,H++)}}return K[Z]==null?Y?K[Z]===null?new g("The "+ot+" `"+et+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new g("The "+ot+" `"+et+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:_(K,Z,Q,ot,et)}var U=P.bind(null,!1);return U.isRequired=P.bind(null,!0),U}function x(_){function M(H,P,U,Y,K,Z){var Q=H[P],ot=$(Q);if(ot!==_){var et=q(Q);return new g("Invalid "+Y+" `"+K+"` of type "+("`"+et+"` supplied to `"+U+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return y(M)}function b(){return y(o)}function w(_){function M(H,P,U,Y,K){if(typeof _!="function")return new g("Property `"+K+"` of component `"+U+"` has invalid PropType notation inside arrayOf.");var Z=H[P];if(!Array.isArray(Z)){var Q=$(Z);return new g("Invalid "+Y+" `"+K+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected an array."))}for(var ot=0;ot<Z.length;ot++){var et=_(Z,ot,U,Y,K+"["+ot+"]",r);if(et instanceof Error)return et}return null}return y(M)}function C(){function _(M,H,P,U,Y){var K=M[H];if(!a(K)){var Z=$(K);return new g("Invalid "+U+" `"+Y+"` of type "+("`"+Z+"` supplied to `"+P+"`, expected a single ReactElement."))}return null}return y(_)}function v(){function _(M,H,P,U,Y){var K=M[H];if(!e.isValidElementType(K)){var Z=$(K);return new g("Invalid "+U+" `"+Y+"` of type "+("`"+Z+"` supplied to `"+P+"`, expected a single ReactElement type."))}return null}return y(_)}function E(_){function M(H,P,U,Y,K){if(!(H[P]instanceof _)){var Z=_.name||f,Q=D(H[P]);return new g("Invalid "+Y+" `"+K+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected ")+("instance of `"+Z+"`."))}return null}return y(M)}function T(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function M(H,P,U,Y,K){for(var Z=H[P],Q=0;Q<_.length;Q++)if(p(Z,_[Q]))return null;var ot=JSON.stringify(_,function(wt,G){var rt=q(G);return rt==="symbol"?String(G):G});return new g("Invalid "+Y+" `"+K+"` of value `"+String(Z)+"` "+("supplied to `"+U+"`, expected one of "+ot+"."))}return y(M)}function N(_){function M(H,P,U,Y,K){if(typeof _!="function")return new g("Property `"+K+"` of component `"+U+"` has invalid PropType notation inside objectOf.");var Z=H[P],Q=$(Z);if(Q!=="object")return new g("Invalid "+Y+" `"+K+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected an object."));for(var ot in Z)if(i(Z,ot)){var et=_(Z,ot,U,Y,K+"."+ot,r);if(et instanceof Error)return et}return null}return y(M)}function W(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var M=0;M<_.length;M++){var H=_[M];if(typeof H!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+A(H)+" at index "+M+"."),o}function P(U,Y,K,Z,Q){for(var ot=[],et=0;et<_.length;et++){var wt=_[et],G=wt(U,Y,K,Z,Q,r);if(G==null)return null;G.data&&i(G.data,"expectedType")&&ot.push(G.data.expectedType)}var rt=ot.length>0?", expected one of type ["+ot.join(", ")+"]":"";return new g("Invalid "+Z+" `"+Q+"` supplied to "+("`"+K+"`"+rt+"."))}return y(P)}function I(){function _(M,H,P,U,Y){return B(M[H])?null:new g("Invalid "+U+" `"+Y+"` supplied to "+("`"+P+"`, expected a ReactNode."))}return y(_)}function k(_,M,H,P,U){return new g((_||"React class")+": "+M+" type `"+H+"."+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+U+"`.")}function L(_){function M(H,P,U,Y,K){var Z=H[P],Q=$(Z);if(Q!=="object")return new g("Invalid "+Y+" `"+K+"` of type `"+Q+"` "+("supplied to `"+U+"`, expected `object`."));for(var ot in _){var et=_[ot];if(typeof et!="function")return k(U,Y,K,ot,q(et));var wt=et(Z,ot,U,Y,K+"."+ot,r);if(wt)return wt}return null}return y(M)}function R(_){function M(H,P,U,Y,K){var Z=H[P],Q=$(Z);if(Q!=="object")return new g("Invalid "+Y+" `"+K+"` of type `"+Q+"` "+("supplied to `"+U+"`, expected `object`."));var ot=t({},H[P],_);for(var et in ot){var wt=_[et];if(i(_,et)&&typeof wt!="function")return k(U,Y,K,et,q(wt));if(!wt)return new g("Invalid "+Y+" `"+K+"` key `"+et+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify(H[P],null," ")+`
45
- Valid keys: `+JSON.stringify(Object.keys(_),null," "));var G=wt(Z,et,U,Y,K+"."+et,r);if(G)return G}return null}return y(M)}function B(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(B);if(_===null||a(_))return!0;var M=u(_);if(M){var H=M.call(_),P;if(M!==_.entries){for(;!(P=H.next()).done;)if(!B(P.value))return!1}else for(;!(P=H.next()).done;){var U=P.value;if(U&&!B(U[1]))return!1}}else return!1;return!0;default:return!1}}function O(_,M){return _==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function $(_){var M=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":O(M,_)?"symbol":M}function q(_){if(typeof _>"u"||_===null)return""+_;var M=$(_);if(M==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return M}function A(_){var M=q(_);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function D(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return d.checkPropTypes=n,d.resetWarningCache=n.resetWarningCache,d.PropTypes=d,d},No}var Po,ku;function T1(){if(ku)return Po;ku=1;var e=Lc();function t(){}function r(){}return r.resetWarningCache=t,Po=function(){function i(o,a,l,c,h,u){if(u!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}i.isRequired=i;function n(){return i}var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:n,element:i,elementType:i,instanceOf:n,node:i,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},Po}var Tu;function E1(){if(Tu)return ws.exports;if(Tu=1,process.env.NODE_ENV!=="production"){var e=Md(),t=!0;ws.exports=k1()(e.isElement,t)}else ws.exports=T1()();return ws.exports}var Ht=E1(),L1=function(t){var r=t?.ownerDocument||document;return r.defaultView||window},A1=function(t,r){for(var i in t)if(!(i in r))return!0;for(var n in r)if(t[n]!==r[n])return!0;return!1},M1=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],_s="http://www.w3.org/2000/svg",Eu="http://www.w3.org/1999/xlink",Ac=function(e){function t(){for(var i,n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return i=e.call.apply(e,[this].concat(s))||this,i.initialState={hasError:!1,isLoading:!0},i.state=i.initialState,i._isMounted=!1,i.reactWrapper=void 0,i.nonReactWrapper=void 0,i.refCallback=function(a){i.reactWrapper=a},i}u1(t,e);var r=t.prototype;return r.renderSVG=function(){var n=this;if(this.reactWrapper instanceof L1(this.reactWrapper).Node){var s=this.props,o=s.desc,a=s.evalScripts,l=s.httpRequestWithCredentials,c=s.renumerateIRIElements,h=s.src,u=s.title,f=s.useRequestCache,d=this.props.onError,p=this.props.beforeInjection,g=this.props.afterInjection,y=this.props.wrapper,x,b;y==="svg"?(x=document.createElementNS(_s,y),x.setAttribute("xmlns",_s),x.setAttribute("xmlns:xlink",Eu),b=document.createElementNS(_s,y)):(x=document.createElement(y),b=document.createElement(y)),x.appendChild(b),b.dataset.src=h,this.nonReactWrapper=this.reactWrapper.appendChild(x);var w=function(T){if(n.removeSVG(),!n._isMounted){d(T);return}n.setState(function(){return{hasError:!0,isLoading:!1}},function(){d(T)})},C=function(T,N){if(T){w(T);return}n._isMounted&&n.setState(function(){return{isLoading:!1}},function(){try{g(N)}catch(W){w(W)}})},v=function(T){if(T.setAttribute("role","img"),o){var N=T.querySelector(":scope > desc");N&&T.removeChild(N);var W=document.createElement("desc");W.innerHTML=o,T.prepend(W)}if(u){var I=T.querySelector(":scope > title");I&&T.removeChild(I);var k=document.createElement("title");k.innerHTML=u,T.prepend(k)}try{p(T)}catch(L){w(L)}};v1(b,{afterEach:C,beforeEach:v,cacheRequests:f,evalScripts:a,httpRequestWithCredentials:l,renumerateIRIElements:c})}},r.removeSVG=function(){var n;(n=this.nonReactWrapper)!=null&&n.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},r.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},r.componentDidUpdate=function(n){var s=this;A1(ea({},n),this.props)&&this.setState(function(){return s.initialState},function(){s.removeSVG(),s.renderSVG()})},r.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},r.render=function(){var n=this.props;n.afterInjection,n.beforeInjection,n.desc,n.evalScripts;var s=n.fallback;n.httpRequestWithCredentials;var o=n.loading;n.renumerateIRIElements,n.src,n.title,n.useRequestCache;var a=n.wrapper,l=h1(n,M1),c=a;return xs.createElement(c,ea({},l,{ref:this.refCallback},a==="svg"?{xmlns:_s,xmlnsXlink:Eu}:{}),this.state.isLoading&&o&&xs.createElement(o,null),this.state.hasError&&s&&xs.createElement(s,null))},t}(xs.Component);Ac.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Ac.propTypes={afterInjection:Ht.func,beforeInjection:Ht.func,desc:Ht.string,evalScripts:Ht.oneOf(["always","once","never"]),fallback:Ht.oneOfType([Ht.func,Ht.object,Ht.string]),httpRequestWithCredentials:Ht.bool,loading:Ht.oneOfType([Ht.func,Ht.object,Ht.string]),onError:Ht.func,renumerateIRIElements:Ht.bool,src:Ht.string.isRequired,title:Ht.string,useRequestCache:Ht.bool,wrapper:Ht.oneOf(["div","span","svg"])};let fl={assets:"/"};const $1=e=>{fl={...fl,...e}},B1=e=>{const t=`${fl.assets}/${e}`.replace(/\/+/g,"/");return t.endsWith(".svg")?t:t+".svg"},Ot=z.memo(({icon:e,width:t,height:r,placeholderIcon:i,color:n,disabled:s,state:o="base",rotated:a=!1,onClick:l,isInteractable:c=!1,spin:h=!1,title:u,tabIndex:f,link:d})=>{const[p,g]=z.useState(!1),y=L=>L?.toLowerCase().endsWith(".svg")||!L?.includes("/"),x=L=>L?.startsWith("http")||L?.startsWith("/"),b={img:`${c?"smp-image-interactable":""}`,svg:`smp-icon ${o?`smp-icon-${o}`:""} ${a?"smp-icon-rotated":""} ${c?"smp-icon-interactable":""} ${h?"smp-icon-spin":""}`},w=L=>{!s&&c&&l&&l(L)},C=L=>{!s&&c&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),w(L))},v=p?i:e,E=y(v),N=x(v)?v:B1(`assets/svg/${v}`),W=()=>S.jsx(Ac,{src:N,onError:()=>g(!0),width:t||"1rem",height:r||"1rem",wrapper:"svg",title:u,role:"application",fill:n,"aria-disabled":s,className:b.svg,onClick:w,onKeyDown:C,tabIndex:f}),I=()=>S.jsx("img",{src:v,width:t||"16px",height:r||"auto",alt:u,onError:()=>g(!0),onClick:w,className:b.img,title:u,onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&w(L)}});return(()=>{const L=d?.startsWith("https://")||d?.startsWith("http://")||d?.startsWith("#")||d?.startsWith("/"),R=E?W():I(),B=u?S.jsx("span",{title:u,children:R}):R;return L?S.jsx("a",{href:d,children:B}):B})()});function _r({children:e}){const[t,r]=z.useState(!1);return z.useEffect(()=>{r(!0)},[]),t?s1.createPortal(e,document.body):null}function Sr({position:e="bottom",open:t=!1}){const r=z.useRef(null),i=z.useRef(null),[n,s]=z.useState(0),o=z.useCallback(()=>{const a=r.current,l=i.current;if(!a||!l)return;const{top:c,left:h,width:u,height:f}=a.getBoundingClientRect();s(u);const d=l.offsetHeight,p=l.offsetWidth;if(p===0||d===0){requestAnimationFrame(o);return}const g=window.scrollY,y=window.scrollX,x=window.innerWidth,b=window.innerHeight;let w=c+g,C=h+y,v=e;const E={top:c-d<0,bottom:c+f+d>b,left:h-p<0,right:h+u+p>x};switch(e){case"top":E.top&&!E.bottom&&(v="bottom");break;case"bottom":E.bottom&&!E.top&&(v="top");break;case"left":E.left&&!E.right&&(v="right");break;case"right":E.right&&!E.left&&(v="left");break}switch(v){case"top":w=c+g-d;break;case"bottom":w=c+g+f;break;case"left":C=h+y-p;break;case"right":C=h+y+u;break}w=Math.max(g,Math.min(w,g+b-d)),C=Math.max(y,Math.min(C,y+x-p)),requestAnimationFrame(()=>{l.style.transform=`translate(${C}px, ${w}px)`,l.style.opacity="1"})},[e]);return z.useLayoutEffect(()=>{if(!t)return;let a;const l=()=>{const h=r.current,u=i.current;h&&u?o():a=requestAnimationFrame(l)};a=requestAnimationFrame(l);const c=new MutationObserver(()=>{o()});return i.current&&c.observe(i.current,{childList:!0,subtree:!0}),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(a),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0),c.disconnect()}},[o,t]),{anchorRef:r,targetRef:i,anchorWidth:n}}const jo={"smp-label":"_smp-label_zl3eb_1","smp-label-disabled":"_smp-label-disabled_zl3eb_6","smp-label-wrapper":"_smp-label-wrapper_zl3eb_10"},Mc=({helperText:e,disabled:t,state:r,id:i})=>{const n={container:`smp-helper-text ${t?"smp-helper-text-disabled":""} ${r?`smp-helper-text-${r}`:""}`};return S.jsx("label",{className:n.container,id:i,children:e})},O1={"smp-helper-tooltip":"_smp-helper-tooltip_2mlq3_1"},R1=({helperTooltip:e,ref:t})=>{const r={container:`${O1["smp-helper-tooltip"]}`};return S.jsx("div",{className:r.container,ref:t,children:S.jsx(Mc,{helperText:e})})},Ar=({label:e,disabled:t,htmlFor:r,helper:i=""})=>{const[n,s]=z.useState(!1),{anchorRef:o,targetRef:a}=Sr({position:"right",open:n}),l={container:`${jo["smp-label"]} ${t?jo["smp-label-disabled"]:""}`,labelWrapper:jo["smp-label-wrapper"]};return S.jsxs("div",{className:l.labelWrapper,children:[S.jsx("label",{className:l.container,htmlFor:r,children:e}),i&&S.jsx("div",{ref:o,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:S.jsx(Ot,{icon:"info_outline",tabIndex:0,width:14,isInteractable:!0,onClick:()=>{s(c=>!c)}})}),S.jsx(_r,{children:n&&i&&S.jsx(R1,{helperTooltip:i,ref:a})})]})},ve={"smp-layout":"_smp-layout_wqmhx_1","smp-layout-horizontal":"_smp-layout-horizontal_wqmhx_9","smp-layout-vertical":"_smp-layout-vertical_wqmhx_15","smp-layout-section-grid":"_smp-layout-section-grid_wqmhx_20","smp-layout-section-vertical":"_smp-layout-section-vertical_wqmhx_24","smp-layout-section-horizontal":"_smp-layout-section-horizontal_wqmhx_28","smp-layout-cell-container":"_smp-layout-cell-container_wqmhx_33","smp-layout-section-flex":"_smp-layout-section-flex_wqmhx_37","smp-grid-template-cols":"_smp-grid-template-cols_wqmhx_55","smp-grid-template-rows":"_smp-grid-template-rows_wqmhx_59","smp-layout-section-with-title":"_smp-layout-section-with-title_wqmhx_63","smp-layout-section-title":"_smp-layout-section-title_wqmhx_69","smp-layout-inline":"_smp-layout-inline_wqmhx_75"},D1=(e,t)=>{const r=[];for(let i=0;i<e.length;i+=t)r.push(e.slice(i,i+t));return r},Bd=(e,t)=>e.map(r=>{if(r.sections?.length)return{...r,sections:Bd(r.sections,t),content:r.content};let i=r.sections,n=r.content;return r.content?.length&&r.columns&&+r.columns>1&&(i=D1(r.content.filter(o=>t.includes(o.id)),+r.columns).map((o,a)=>({...r,id:`${r.id}-${a}`,content:o,gridCols:r.columns,horizontal:!0})),n=[]),{...r,sections:i,content:n}}),Lu=(e,t)=>{if(!t)return{};const r=e.some(i=>i.dim)?e.map(i=>i.dim||"auto").join(" "):`repeat(${e.length}, 1fr)`;return{[t]:r}},Au=e=>e.some(t=>t.dim&&!t.dim.endsWith("%")),Mu=e=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[e],$u=e=>({primary:"onPrimary",danger:"onDanger",base:"base"})[e],Qt=({bindValue:e,onClick:t,ariaLabel:r,icon:i,placeholderIcon:n,disabled:s,sizing:o="base",variant:a="primary",appearance:l="raised",showIcon:c=!0,showText:h=!0,fullWidth:u=!1,loading:f=!1,justify:d="center",title:p,optionalDisplayValue:g,squared:y=!1,submit:x=!1,active:b=!1,buttonExt:w})=>{const C={container:`smp-button smp-button-container ${o?`smp-button-${o}`:""} ${a?`smp-buttonVariant-${a}`:""} ${l?`smp-buttonType-${l}`:""} ${u?"smp-button-fullWidth":""} smp-justifyContent-${d} ${y&&!h?"smp-button-squared":""} ${b?"smp-buttonActive":""} ${w?`smp-buttonExt-${w}`:""}`};return S.jsx("button",{"data-component":"button",type:x?"submit":"button",className:C.container,onClick:t,"aria-label":r,disabled:s,"aria-busy":f,title:p||g,children:f?S.jsx(Ot,{icon:"spinner",state:$u(a),spin:!0}):S.jsxs(S.Fragment,{children:[i&&c&&S.jsx(Ot,{icon:i,placeholderIcon:n,disabled:s,state:$u(a),width:Mu(o),height:Mu(o)}),h&&S.jsx("span",{children:g||e})]})})},F1={titleLarge:"h2",title:"h3",body:"h6",label:"label"},Dr={"smp-toolbar-node-content":"_smp-toolbar-node-content_dcszf_21","smp-clickable":"_smp-clickable_dcszf_43","smp-not-clickable":"_smp-not-clickable_dcszf_53","smp-toolbar-node-children-container":"_smp-toolbar-node-children-container_dcszf_63","smp-toolbar-node":"_smp-toolbar-node_dcszf_21","smp-toolbar-node-icon-text-container":"_smp-toolbar-node-icon-text-container_dcszf_139","smp-toolbar-node-text":"_smp-toolbar-node-text_dcszf_153"},$c="smp-toolbar",I1=["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter","Escape"," "],dl=e=>e.replace(`${$c}-`,"").split("-").map(t=>parseInt(t,10)).filter(t=>!isNaN(t)),N1=e=>`${$c}-${e.filter(t=>!isNaN(t)).join("-")}`,pl=(e,t)=>t?`${t}-${e}`:`${$c}-${e}`,gl=e=>!!e.fun&&e.forcedLeaf===!1&&!(e.children&&e.children.length>0),ml=(e,t,r,i)=>{if(!e||t.length===0)return e;const n={...e};n.children=[...e.children??[]];let s=n.children;const o=[],a=[];for(let l=0;l<t.length;l++){const c=t[l],h=s[c];if(!h)break;const u={...h};if(l===t.length-1){if(s[c]=r(u),i){const f=s.map((d,p)=>p===c?s[p]:i({...d}));if(l===0)n.children=f;else{const d=o[o.length-1],p=a[a.length-1];d[p]={...d[p],children:f}}}}else u.children=[...u.children??[]],s[c]=u,o.push(s),a.push(c),s=u.children}return n},Ns=(e,t)=>{e.current.has(t)&&requestAnimationFrame(()=>{e.current.get(t)?.focus()})};function P1(e,t,r){return{handleKeyDown:z.useCallback(async(n,s,o)=>{if(!I1.includes(n.key))return;n.preventDefault(),n.stopPropagation();const a=t.current.get(o),l=dl(o);if(a)switch(n.key){case"ArrowDown":case"ArrowUp":{const h=l[l.length-1]+(n.key==="ArrowDown"?1:-1);if(h>=0){const u=o.split("-");u.pop();const f=`${u.join("-")}-${h}`;Ns(t,f)}break}case"ArrowRight":{r(s,o),Ns(t,pl(0,o));break}case"ArrowLeft":case"Escape":{l.pop();const c=N1(l);t.current.has(c)&&(e(h=>h&&ml(h,l,u=>({...u,isExpanded:!1}))),Ns(t,c));break}}},[r,t,e])}}const kt={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",EDITOR:"EDT",ICON:"ICO",IMAGE:"IMG",INPUT_NUMBER:"INR",MEMO:"MEM",MULTI_AUTOCOMPLETE:"AML",MULTI_CONFIG:"CFM",RADIO:"RAD",SPOTLIGHT:"SPL",SWITCH:"SWT",TEXT_FIELD:"ITX",BUTTON_GROUP:"BTO",TIME:"TIM",PASSWORD:"PWD",TREE:"TRE"},Sn={CODE_ONLY:"CodeOnly",DESC_ONLY:"DescOnly",BOTH:"Both"},j1={obj:{t:"",p:"",k:""},fun:"",isEditable:!1,shape:kt.TEXT_FIELD,icon:"error",value:"No data found"};function z1(e,t,r){const i=async(a,l)=>{if(!gl(a))s(l,{isExpanded:!0});else if(t){s(l,{isLoading:!0});try{const c=await t(a);s(l,{isLoading:!1,children:c?.children&&c.children.length>0?c.children:[j1],isExpanded:!0},{isExpanded:!1})}catch(c){console.error("Failed to load dynamic node data:",c),s(l,{isLoading:!1})}}},n=a=>{s(a,{isExpanded:!1})},s=(a,l,c)=>{e(h=>h&&ml(h,dl(a),f=>({...f,...l}),c?f=>({...f,...c}):void 0))};return{handleNodeExpand:i,handleMouseLeave:n,onToolbarRadioLeafNodeClick:(a,l,c)=>{e(h=>h&&ml(h,dl(l),f=>{const d={...f,obj:{...f.obj,k:c.obj.k}};return r?.(d),d}))}}}const Od=e=>{const t=z.useRef(null);return z.useEffect(()=>()=>{t.current&&clearTimeout(t.current)},[]),i=>{t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{i()},e)}},ns=(e,t,r)=>{if(e==""&&(t==""||t==null))return"";if(r)switch(r){case"CodeOnly":return e;case"DescOnly":return t||"";case"Both":return`${e} - ${t}`}return e},we={"smp-textfield-wrapper":"_smp-textfield-wrapper_1w0g1_4","smp-textfield":"_smp-textfield_1w0g1_4","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_1w0g1_29","smp-textfield-extraSmall":"_smp-textfield-extraSmall_1w0g1_35","smp-textfield-small":"_smp-textfield-small_1w0g1_40","smp-textfield-medium":"_smp-textfield-medium_1w0g1_45","smp-textfield-large":"_smp-textfield-large_1w0g1_50","smp-textfield-extraLarge":"_smp-textfield-extraLarge_1w0g1_55","smp-textfield-input":"_smp-textfield-input_1w0g1_61","smp-textfield-decode-wrapper":"_smp-textfield-decode-wrapper_1w0g1_82","smp-textfield-outlined":"_smp-textfield-outlined_1w0g1_91","smp-textfield-danger":"_smp-textfield-danger_1w0g1_102","smp-textfield-readOnly":"_smp-textfield-readOnly_1w0g1_106","smp-textfield-disabled":"_smp-textfield-disabled_1w0g1_121","smp-textfield-fullWidth":"_smp-textfield-fullWidth_1w0g1_130","smp-textfield-top-right-indicator":"_smp-textfield-top-right-indicator_1w0g1_134"},Fe=({id:e,disabled:t,bindValue:r,optionalDisplayValue:i,icon:n,placeholder:s,isEditable:o=!0,shapeIcon:a,sizing:l,state:c,variant:h,tooltip:u=!1,rotatedShapeIcon:f=!1,ref:d,inputRef:p,inputType:g="text",ariaLabel:y="input field",label:x,helperText:b=!1,error:w,appearance:C="base",isClearable:v=!1,fullWidth:E=!1,_dataComponent:T="textfield",min:N,max:W,step:I,inputMode:k="text",width:L,autocomplete:R,size:B,maxLength:O,style:$,onBlur:q,onChange:A,onKeyDown:D,onShapeIconClick:_,onClick:M,...H})=>{const P=z.useId(),U=`${P}-helper`,Y=w?"danger":c,K=b||!!w,Z=G=>{A?.(G.target.value)},Q=()=>{r&&r!=""&&A?.("")},ot={wrapper:`${we["smp-textfield-wrapper"]} ${E?we["smp-textfield-fullWidth"]:""}`,container:`${we["smp-textfield"]} ${t?we["smp-textfield-disabled"]:""} ${s?we["smp-textfield-placeholder"]:""} ${l?we[`smp-textfield-${l}`]:""} ${Y?we[`smp-textfield-${Y}`]:""} ${C?we[`smp-textfield-${C}`]:""} ${o?"":we["smp-textfield-readOnly"]} ${u?we["smp-textfield-top-right-indicator"]:""}`,input:`${we["smp-textfield-input"]}`,decodeWrapper:` ${i?we["smp-textfield-decode-wrapper"]:""}`};if(h&&(h!=="notSelectable"||o)){const G=we[`smp-textfield-variant-${h}`];G&&(ot.container+=` ${G}`)}const et=L?{"--smp-textField-width-base":L,...$}:$,wt=S.jsxs("div",{className:ot.container,ref:d,style:et,children:[n&&S.jsx(Ot,{icon:n,disabled:t}),S.jsx("input",{id:P,name:e,type:g,value:r,placeholder:s,onChange:Z,onBlur:q,className:ot.input,disabled:t,readOnly:!o,onKeyDown:D,"aria-label":y,ref:p,"aria-describedby":K?U:void 0,min:N,max:W,step:I,inputMode:k,autoComplete:R,size:B,maxLength:O,onClick:M}),v&&S.jsx(Ot,{icon:"clear",onClick:Q,tabIndex:0,isInteractable:!0}),a&&S.jsx(Ot,{icon:a,disabled:t,onClick:_,rotated:f,isInteractable:o,tabIndex:0})]});return S.jsxs("div",{className:ot.wrapper,"data-component":T,children:[x&&S.jsx(Ar,{label:x,disabled:t,htmlFor:P,helper:H.helper}),S.jsxs("div",{className:ot.decodeWrapper,children:[wt,S.jsx(Ge,{bindValue:i||"",variant:"body",role:"note"})]}),K&&S.jsx(Mc,{helperText:w,disabled:t,state:Y,id:U})]})};function Rd({items:e,itemHeight:t,containerHeight:r,overscan:i=5}){const[n,s]=z.useState(0),o=z.useRef(null),a=e.length*t,l=Math.max(0,Math.floor(n/t)-i),c=Math.min(e.length-1,Math.floor((n+r)/t)+i),h=[];for(let d=l;d<=c;d++)h.push({item:e[d],index:d,offsetTop:d*t});const u=z.useCallback(d=>{const p=d.target.scrollTop;s(p)},[]),f=d=>{if(!o.current)return;const p=d*t,g=p+t,y=o.current,x=y.scrollTop,b=x+r;p<x?y.scrollTop=p:g>b&&(y.scrollTop=g-r)};return{virtualItems:h,containerProps:{ref:o,style:{maxHeight:`${r}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:u},innerProps:{style:{height:`${a}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:n,viewportHeight:r,totalHeight:a,startIndex:l,endIndex:c},scrollToIndex:f}}const cn={"smp-list":"_smp-list_1mnl7_1","smp-list-floating":"_smp-list-floating_1mnl7_7","smp-list-container":"_smp-list-container_1mnl7_15","smp-list-listItem":"_smp-list-listItem_1mnl7_20"};function W1(e,t,r="14px IBM Plex Sans, sans-serif",i=32){const s=document.createElement("canvas").getContext("2d");if(!s)return 200;s.font=r;let o=0;for(const a of e){const l=ns(a.obj.k,a.decode,t),c=s.measureText(l);o=Math.max(o,c.width)}return Math.ceil(o+i)}const q1=10,Bc=({id:e,options:t,displayMode:r="Both",ref:i,showFilter:n,selectedIndex:s=null,activeIndex:o=[],width:a,onClick:l,onKeyDown:c,isOpen:h,floating:u=!1})=>{const[f,d]=z.useState(""),p=40,[g,y]=z.useState(s!==null?s:-1),[x,b]=z.useState(a||200),w=z.useRef(null),C=n!==void 0?n:t.length>q1,v=f?t.filter(O=>O.decode?.toLowerCase()?.includes(f.toLowerCase())):t,E=O=>{d(O)},{virtualItems:T,containerProps:N,innerProps:W,scrollToIndex:I}=Rd({items:v,itemHeight:p,containerHeight:200,overscan:5});z.useEffect(()=>{s!==null&&s!==g&&y(s)},[s]),z.useEffect(()=>{g>=0&&g<v.length&&I(g)},[g,v]),z.useEffect(()=>{h&&w?.current&&w.current.focus()},[h,w]),z.useEffect(()=>{const O=W1(t,r);b(O)},[t,r]);const k=O=>{if(O.key==="ArrowDown"||O.key==="ArrowUp"){O.preventDefault();let $=g;O.key==="ArrowDown"?$=g<v.length-1?g+1:0:O.key==="ArrowUp"&&($=g>0?g-1:v.length-1),y($)}else O.key==="Enter"?g>=0&&g<v.length&&l?.(v[g]):O.key==="Escape"&&(O.preventDefault(),O.stopPropagation());c&&c(O)},L=O=>{k(O)},R=O=>{k(O)},B={wrapper:`${cn["smp-list"]} ${u?cn["smp-list-floating"]:""}`,container:`${cn["smp-list-container"]}`,virtualScroll:`${cn["smp-list-virtualScroll"]}`,listItem:`${cn["smp-list-listItem"]}`};return S.jsxs("div",{id:e,ref:i,className:B.wrapper,"data-component":"list",style:{width:u?x:"200px",minWidth:a},children:[C&&S.jsx(Fe,{bindValue:f,placeholder:"Search...",fullWidth:!0,onChange:E,onKeyDown:L,inputRef:w}),S.jsx("div",{...N,className:B.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:R,"aria-activedescendant":g>=0&&g<v.length?v[g]?.obj?.k:void 0,children:S.jsx("div",{...W,className:B.virtualScroll,children:T.map(({item:O,index:$,offsetTop:q})=>{const A=o.includes(O.obj?.k);return S.jsxs("li",{role:"option",id:$+"li","aria-selected":g===$?"true":"false",tabIndex:-1,className:`${B.listItem} ${g===$?"selected-item":""}`,"aria-label":O.obj?.k+"-"+O.decode,style:{height:`${p}px`,lineHeight:`calc(${p}px - 2*2px)`,transform:`translateY(${q}px)`},onClick:()=>{l?.(O),y($)},children:[ns(O.obj?.k,O.decode,r),A&&S.jsx(Ot,{icon:"check",width:16})]},$+"li")})})})]})},Dd=({data:e,ref:t,onToolbarLoadNodeData:r,onToolbarLeafNodeClick:i,onToolbarLoadInitialData:n})=>{const s=z.useRef(new Map),[o,a]=z.useState(e),{handleNodeExpand:l,handleMouseLeave:c,onToolbarRadioLeafNodeClick:h}=z1(a,r,i),{handleKeyDown:u}=P1(a,s,l),f=Od(400),d={node:Dr["smp-toolbar-node"],nodeContent:Dr["smp-toolbar-node-content"],clickable:Dr["smp-clickable"],notClickable:Dr["smp-not-clickable"],iconTextContainer:Dr["smp-toolbar-node-icon-text-container"],nodeText:Dr["smp-toolbar-node-text"],childrenContainer:Dr["smp-toolbar-node-children-container"]};z.useEffect(()=>{!o&&n&&(n().then(g=>a(g)).catch(g=>{console.error("Errore nel caricamento dati iniziali - Toolbar",g)}),Ns(s,pl(0)))},[e,f,n,o]);const p=z.useCallback((g,y=null)=>g?.length?S.jsx(S.Fragment,{children:g.map((x,b)=>{const w=pl(b,y??""),C=(x.children?.length??0)>0,v=!C&&!x?.isLoading&&!gl(x);return x?.shape!=="RAD"?S.jsxs("div",{ref:E=>{E&&s.current.set(w,E)},className:d.node,tabIndex:0,role:"menuitem","data-nodeid":w,"smp-id":`toolbar-item-${b}`,"aria-expanded":x?.isExpanded,onKeyDown:E=>u(E,x,w),onMouseEnter:()=>l(x,w),onMouseLeave:()=>{c(w)},onClick:()=>{v&&x.fun&&i?.(x)},children:[S.jsxs("div",{className:`${d.nodeContent} ${v?d.clickable:d.notClickable}`,children:[S.jsxs("div",{className:d.iconTextContainer,children:[S.jsx(Ot,{icon:x.icon??""}),S.jsx("span",{className:d.nodeText,children:S.jsx(Ge,{variant:"body",bindValue:x.value||""})})]}),x.isLoading?S.jsx(Ot,{icon:"spinner",spin:!0}):C||gl(x)?S.jsx(Ot,{icon:"chevron-right"}):S.jsx(Ot,{icon:""})]}),C&&S.jsx("div",{className:d.childrenContainer,children:p(x.children??[],w)})]},w):S.jsx("div",{className:d.node,role:"radiogroup","data-node-id":w,tabIndex:-1,"smp-id":`toolbar-item-${b}`,children:S.jsx(Bc,{options:x.options?x.options:[],isOpen:!0,"data-node-id":w,displayMode:Sn.DESC_ONLY,selectedIndex:x.options?.findIndex(E=>E.obj?.k===x.obj?.k),activeIndex:[x.obj.k],onClick:E=>{h(x,w,E)}},w)},w)})}):null,[d.node,d.nodeContent,d.clickable,d.notClickable,d.iconTextContainer,d.nodeText,d.childrenContainer,u,l,c,i,h]);return!o||!o?.children?.length?null:S.jsx("div",{style:t?{position:"absolute",opacity:0}:void 0,ref:t,"aria-label":"Toolbar","data-component":"toolbar","smp-id":"toolbar-menu",children:p(o.children)})},ss=(e,t,r)=>{z.useEffect(()=>{if(!t)return;const i=n=>{e?.some(o=>{if(typeof o=="object"&&o!==null&&"current"in o){const a=o?.current;return a&&a.contains(n.target)}})||r()};return document.addEventListener("mousedown",i),()=>{document.removeEventListener("mousedown",i)}},[e,r,t])},Ge=({variant:e="body",bindValue:t,color:r,role:i,className:n,style:s,toolbar:o,onToolbarLeafNodeClick:a,onToolbarLoadInitialData:l,onToolbarLoadNodeData:c,...h})=>{const u=F1[e],[f,d]=z.useState(!1),{anchorRef:p,targetRef:g}=Sr({position:"bottom",open:f});ss([g],f,()=>d(!1));const y={container:`smp-typography ${e?`smp-typography-${e}`:""} ${h.disabled?"smp-typography-disabled":""} ${n??""}`},x=b=>{a&&a(b),d(!1)};return S.jsxs(S.Fragment,{children:[S.jsxs(u,{className:y.container,disabled:h.disabled,style:{"--smp-typography-color-base":r,...s},role:i,children:[t,o?S.jsx("div",{"smp-id":"toolbar-button",ref:p,children:S.jsx(Ot,{icon:"more_vert",isInteractable:!0,onClick:b=>{b.stopPropagation(),d(!0)}})}):S.jsx("span",{style:{width:"1rem"}})]}),f&&S.jsx(_r,{children:S.jsx(Dd,{ref:g,onToolbarLeafNodeClick:x,onToolbarLoadNodeData:c,onToolbarLoadInitialData:l})})]})},je={"smp-tabbar-container":"_smp-tabbar-container_ly1md_1","smp-tabbar-scroll-button":"_smp-tabbar-scroll-button_ly1md_9","smp-tabbar-scroll-buttonRight":"_smp-tabbar-scroll-buttonRight_ly1md_14","smp-tabbar-scroll-buttonLeft":"_smp-tabbar-scroll-buttonLeft_ly1md_18","smp-tabbar-list-wrapper":"_smp-tabbar-list-wrapper_ly1md_22","smp-tabbar-list":"_smp-tabbar-list_ly1md_22","smp-tabbar-tab":"_smp-tabbar-tab_ly1md_39","smp-active":"_smp-active_ly1md_63","smp-tabbar-tab-extraSmall":"_smp-tabbar-tab-extraSmall_ly1md_76","smp-tabbar-tab-small":"_smp-tabbar-tab-small_ly1md_81","smp-tabbar-tab-base":"_smp-tabbar-tab-base_ly1md_86","smp-tabbar-tab-large":"_smp-tabbar-tab-large_ly1md_91","smp-tabbar-tab-extraLarge":"_smp-tabbar-tab-extraLarge_ly1md_96"},Fd=({data:e,sizing:t="large",toolbar:r=!0,selectedIndex:i,onTabChange:n,onToolbarLoadInitialData:s,onToolbarLoadNodeData:o,onToolbarLeafNodeClick:a})=>{const[l,c]=z.useState(i??0),[h,u]=z.useState(!1),[f,d]=z.useState(!1),p=z.useRef(null);if(z.useEffect(()=>{const v=p.current;if(!v)return;b();const E=()=>b();return v.addEventListener("scroll",E),window.addEventListener("resize",b),()=>{v.removeEventListener("scroll",E),window.removeEventListener("resize",b)}},[]),z.useEffect(()=>{i!==void 0&&c(i)},[i]),!e.children||e.children.length===0)return S.jsx("div",{className:"tab-bar-empty",children:"No tabs available"});const g={container:je["smp-tabbar-container"],listWrapper:je["smp-tabbar-list-wrapper"],list:je["smp-tabbar-list"],tab:`${je["smp-tabbar-tab"]} ${t?je[`smp-tabbar-tab-${t}`]:""}`,scrollButtonRight:`${je["smp-tabbar-scroll-button"]} ${je["smp-tabbar-scroll-buttonRight"]}`,scrollButtonLeft:`${je["smp-tabbar-scroll-button"]} ${je["smp-tabbar-scroll-buttonLeft"]}`,active:je["smp-active"]},y=100,x=2,b=()=>{const v=p.current;v&&(u(v.scrollLeft>0),d(v.scrollLeft+v.clientWidth<v.scrollWidth-x))},w=()=>{p.current?.scrollBy({left:-y,behavior:"smooth"})},C=()=>{p.current?.scrollBy({left:y,behavior:"smooth"})};return S.jsxs("div",{className:g.container,role:"tabpanel","data-component":"tab-bar",children:[h&&S.jsx("div",{className:g.scrollButtonLeft,children:S.jsx(Qt,{bindValue:"",optionalDisplayValue:"<",onClick:w,variant:"base",sizing:t})}),S.jsx("div",{className:g.listWrapper,children:S.jsx("div",{className:g.list,ref:p,role:"tablist",children:e.children.map((v,E)=>S.jsxs("button",{type:"button","data-comp-id-tab":v.data?.["data-comp-id"]??void 0,className:`${E===l?g.active:""} ${g.tab} `,role:"tab","aria-selected":E===l,tabIndex:E===l?0:-1,onClick:()=>{n?.(E,v),c(E)},children:[v.icon&&S.jsx(Ot,{icon:v.icon,placeholderIcon:v.placeholderIcon}),S.jsx(Ge,{variant:"body",bindValue:v.decode||`Tab ${E+1}`,...r&&l===E?{toolbar:r,onToolbarLeafNodeClick:a,onToolbarLoadInitialData:s,onToolbarLoadNodeData:o}:{}})]},E))})}),f&&S.jsx("div",{className:g.scrollButtonRight,children:S.jsx(Qt,{bindValue:"",optionalDisplayValue:">",onClick:C,variant:"base",sizing:t})})]})},ra=({children:e,layout:t={horizontal:!1,sectionsType:"tab",sections:[{id:"1",content:Array.isArray(e)?e.map(r=>({id:r.props.id})):[{id:e.props.id}]}]}})=>{const[r,i]=z.useState(0),n={};z.Children.forEach(e,p=>{z.isValidElement(p)&&(n[p.props.id]=p)});const s="--smp-grid-template-cols",o="--smp-grid-template-rows",a=Bd(t.sections??[],Object.keys(n)),l=p=>p.reduce((g,y)=>{let x="",b={},w={},C="";return y.sections?.length?(x=ve["smp-layout-section-grid"],b=l(y.sections),y.gridCols===void 0&&(C=ve[y.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],y.horizontal||Au(y.sections)?w=Lu(y.sections,y.horizontal?s:o):w={[s]:"auto",[o]:"auto"})):y.content?.length&&(y.gridCols!==void 0&&y.gridCols>0?(x=ve["smp-layout-section-grid"],C=ve["smp-grid-template-cols"],w={[s]:`repeat(${y.gridCols}, 1fr)`}):x=ve["smp-layout-section-flex"]),{...g,...b,[y.id]:{classes:`${x} ${ve[y.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${C} ${y.justify?`smp-justifyContent-${y.justify}`:""} ${y.align?`smp-alignItems-${y.align}`:""}`,styles:w}}},{}),c=l(a),h=`${ve["smp-layout"]} ${t.horizontal?ve["smp-layout-horizontal"]:ve["smp-layout-vertical"]} ${t.inline?ve["smp-layout-inline"]:""}`;let u={};(t.horizontal||Au(t.sections||[]))&&(u=Lu(a,t.horizontal?s:o));const f=(p,g)=>{const y=S.jsx("div",{"smp-id":`section-${p.id}`,className:c[p.id].classes,style:c[p.id].styles,children:p.sections?.length?p.sections.map(x=>f(x)):p.content?.map(x=>d(x,p.justify,p.align))},`section-${p.id}`);return p.title&&!g?S.jsxs("div",{className:ve["smp-layout-section-with-title"],children:[S.jsx("span",{className:`${ve["smp-layout-section-title"]} ${p.justify?`smp-justifyContent-${p.justify}`:""} ${p.align?`smp-alignItems-${p.align}`:""}`,children:S.jsx(Ar,{label:p.title})}),y]},`title-section-${p.id}`):y},d=(p,g,y)=>{const x=n[p.id];if(!x)return null;const w={gridColumnStart:(p.colSpan&&p.colSpan>0?`span ${p.colSpan}`:p.colStart&&p.colStart<1?"1":void 0)??p.colStart,gridColumnEnd:p.colEnd&&p.colEnd>0?p.colEnd:void 0},C=`${ve["smp-layout-cell-container"]} ${g?`smp-justifyContent-${g}`:""} ${y?`smp-alignItems-${y}`:""}`;return S.jsx("div",{className:C,style:w,"smp-id":p.id,children:x},p.id)};return S.jsxs("div",{className:h,style:u,"smp-id":"layout",children:[t.sectionsType==="tab"&&t.sections&&t?.sections.length>1&&S.jsx(Fd,{data:{type:"SmeupDataTree",children:a.map(p=>({decode:p.title||p.id||"Tab",obj:{t:"",p:"",k:""},placeholderIcon:"tab",cells:{},children:[],shape:void 0}))},selectedIndex:r,onTabChange:i,toolbar:!1}),t.sectionsType?f(a[r],!0):a.map(p=>f(p))]})},yl=e=>e.t=="D8"||e.t=="A8",Id=e=>e.t=="NR",H1=e=>e.t=="I1",U1=e=>{if(e){const t=e.split(";");if(t.length==3)return{t:t[0],p:t[1],k:t[2]}}return{t:"",p:"",k:""}};class ia{class;value;constructor(t,r){this.class=t,this.value=r}static fromDataObj(t){return new ia(t,t.k=="1"||t.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function Y1(e,t){if(Oc(e)){const h=new Date(e);if(!isNaN(h.getTime()))return h}const r=new Date;let i;/[/-]/.test(e)?i=e.split(/[/-]/).map((u,f)=>f<2&&u.length===1?"0"+u:u).join(""):i=e.replaceAll("/","").replaceAll("-","");let n="DDMMYYYY";t==="en"&&(n="MMDDYYYY");const s=n.indexOf("DD"),o=n.indexOf("MM");let a=0,l=0,c="";switch(i.length){case 1:case 2:return a=parseInt(i),r.setDate(a),Ss(r)?r:e;case 3:case 4:return a=parseInt(i.substring(0,2)),l=parseInt(i.substring(2,4)),o===0?(r.setMonth(a-1),r.setDate(l)):s===0&&(r.setMonth(l-1),r.setDate(a)),Ss(r)?r:e;case 5:case 6:{a=parseInt(i.substring(0,2)),l=parseInt(i.substring(2,4)),Number(i.substring(4))>=50?c="19"+i.substring(4):c="20"+i.substring(4);let h=0,u=0;return o===0?(h=l,u=a-1,r.setFullYear(parseInt(c),u,h)):s===0&&(h=a,u=l-1,r.setFullYear(parseInt(c),u,h)),xl(a,u,parseInt(c))&&Ss(r)?r:e}case 7:case 8:{a=parseInt(i.substring(0,2)),l=parseInt(i.substring(2,4)),c=i.substring(4);let h=0,u=0;return o===0?(h=l,u=a-1,r.setFullYear(parseInt(c),u,h)):s===0&&(h=a,u=l-1,r.setFullYear(parseInt(c),u,h)),xl(h,u,parseInt(c))&&Ss(r)?r:e}}return e}function Oc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)&&e.length===10}function Ss(e){return e instanceof Date&&!isNaN(e.getTime())}function V1(e){if(!/^\d{8}$/.test(e))return!1;const t=parseInt(e.slice(0,4),10),r=parseInt(e.slice(4,6),10),i=parseInt(e.slice(6,8),10);return xl(i,r-1,t)}function xl(e,t,r){const i=[31,G1(r)?29:28,31,30,31,30,31,31,30,31,30,31];return!(t<0||t>11||e<1||e>i[t])}function G1(e){return e%4===0&&(e%100!==0||e%400===0)}function X1(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return isNaN(t)||isNaN(Number(r))||isNaN(Number(i))?e.toString():`${t}-${r}-${i}`}class na{class;date;constructor(t,r){this.class=t,this.date=r}static fromDataObj(t){const r=Bu.get(`${t.t}${t.p}`);if(r)return new na(t,r.legacyToIso(t.k));throw new Error(`Date creation from ${t.t}${t.p} not implemented yet`)}getLegacyValue(){const t=Bu.get(`${this.class.t}${this.class.p}`);if(t)return t.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const Bu=new Map([["D8*YYMD",{legacyToIso(e){return V1(e)&&`${e.substring(0,4)}-${e.substring(4,6)}-${e.substring(6,8)}`||e},isoToLegacy(e){return Oc(e)&&e.replaceAll("-","")||e}}],["A8",{legacyToIso(e){return e},isoToLegacy(e){return e}}]]),vt=e=>typeof e=="string",hn=()=>{let e,t;const r=new Promise((i,n)=>{e=i,t=n});return r.resolve=e,r.reject=t,r},Ou=e=>e==null?"":""+e,K1=(e,t,r)=>{e.forEach(i=>{t[i]&&(r[i]=t[i])})},Z1=/###/g,Ru=e=>e&&e.indexOf("###")>-1?e.replace(Z1,"."):e,Du=e=>!e||vt(e),On=(e,t,r)=>{const i=vt(t)?t.split("."):t;let n=0;for(;n<i.length-1;){if(Du(e))return{};const s=Ru(i[n]);!e[s]&&r&&(e[s]=new r),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++n}return Du(e)?{}:{obj:e,k:Ru(i[n])}},Fu=(e,t,r)=>{const{obj:i,k:n}=On(e,t,Object);if(i!==void 0||t.length===1){i[n]=r;return}let s=t[t.length-1],o=t.slice(0,t.length-1),a=On(e,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=On(e,o,Object),a?.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=r},Q1=(e,t,r,i)=>{const{obj:n,k:s}=On(e,t,Object);n[s]=n[s]||[],n[s].push(r)},sa=(e,t)=>{const{obj:r,k:i}=On(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,i))return r[i]},J1=(e,t,r)=>{const i=sa(e,r);return i!==void 0?i:sa(t,r)},Nd=(e,t,r)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(i in e?vt(e[i])||e[i]instanceof String||vt(t[i])||t[i]instanceof String?r&&(e[i]=t[i]):Nd(e[i],t[i],r):e[i]=t[i]);return e},mi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var tv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const ev=e=>vt(e)?e.replace(/[&<>"'\/]/g,t=>tv[t]):e;class rv{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const iv=[" ",",","?","!",";"],nv=new rv(20),sv=(e,t,r)=>{t=t||"",r=r||"";const i=iv.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(i.length===0)return!0;const n=nv.getRegExp(`(${i.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!n.test(e);if(!s){const o=e.indexOf(r);o>0&&!n.test(e.substring(0,o))&&(s=!0)}return s},bl=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const i=t.split(r);let n=e;for(let s=0;s<i.length;){if(!n||typeof n!="object")return;let o,a="";for(let l=s;l<i.length;++l)if(l!==s&&(a+=r),a+=i[l],o=n[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<i.length-1)continue;s+=l-s+1;break}n=o}return n},jn=e=>e?.replace("_","-"),av={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class aa{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||av,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,i,n){return n&&!this.debug?null:(vt(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new aa(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new aa(this.logger,t)}}var Ye=new aa;class qa{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const n=this.observers[i].get(r)||0;this.observers[i].set(r,n+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([n,s])=>{for(let o=0;o<s;o++)n(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,s])=>{for(let o=0;o<s;o++)n.apply(n,[t,...r])})}}class Iu extends qa{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,i,n={}){const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,o=n.ignoreJSONStructure!==void 0?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,r],i&&(Array.isArray(i)?a.push(...i):vt(i)&&s?a.push(...i.split(s)):a.push(i)));const l=sa(this.data,a);return!l&&!r&&!i&&t.indexOf(".")>-1&&(t=a[0],r=a[1],i=a.slice(2).join(".")),l||!o||!vt(i)?l:bl(this.data?.[t]?.[r],i,s)}addResource(t,r,i,n,s={silent:!1}){const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[t,r];i&&(a=a.concat(o?i.split(o):i)),t.indexOf(".")>-1&&(a=t.split("."),n=r,r=a[1]),this.addNamespaces(r),Fu(this.data,a,n),s.silent||this.emit("added",t,r,i,n)}addResources(t,r,i,n={silent:!1}){for(const s in i)(vt(i[s])||Array.isArray(i[s]))&&this.addResource(t,r,s,i[s],{silent:!0});n.silent||this.emit("added",t,r,i)}addResourceBundle(t,r,i,n,s,o={silent:!1,skipCopy:!1}){let a=[t,r];t.indexOf(".")>-1&&(a=t.split("."),n=i,i=r,r=a[1]),this.addNamespaces(r);let l=sa(this.data,a)||{};o.skipCopy||(i=JSON.parse(JSON.stringify(i))),n?Nd(l,i,s):l={...l,...i},Fu(this.data,a,l),o.silent||this.emit("added",t,r,i)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(n=>r[n]&&Object.keys(r[n]).length>0)}toJSON(){return this.data}}var Pd={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,i,n){return e.forEach(s=>{t=this.processors[s]?.process(t,r,i,n)??t}),t}};const jd=Symbol("i18next/PATH_KEY");function ov(){const e=[],t=Object.create(null);let r;return t.get=(i,n)=>(r?.revoke?.(),n===jd?e:(e.push(n),r=Proxy.revocable(i,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}function vl(e,t){const{[jd]:r}=e(ov());return r.join(t?.keySeparator??".")}const Nu={},Pu=e=>!vt(e)&&typeof e!="boolean"&&typeof e!="number";class oa extends qa{constructor(t,r={}){super(),K1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ye.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const i={...r};return t==null?!1:this.resolve(t,i)?.res!==void 0}extractFromKey(t,r){let i=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const n=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const o=i&&t.indexOf(i)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!sv(t,i,n);if(o&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:vt(s)?[s]:s};const c=t.split(i);(i!==n||i===n&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(n)}return{key:t,namespaces:vt(s)?[s]:s}}translate(t,r,i){let n=typeof r=="object"?{...r}:r;if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";typeof t=="function"&&(t=vl(t,{...this.options,...n})),Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(t[t.length-1],n),c=l[l.length-1];let h=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;h===void 0&&(h=":");const u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u?.toLowerCase()==="cimode")return f?s?{res:`${c}${h}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${h}${a}`:s?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a;const d=this.resolve(t,n);let p=d?.res;const g=d?.usedKey||a,y=d?.exactUsedKey||a,x=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,C=n.count!==void 0&&!vt(n.count),v=oa.hasDefaultValue(n),E=C?this.pluralResolver.getSuffix(u,n.count,n):"",T=n.ordinal&&C?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",N=C&&!n.ordinal&&n.count===0,W=N&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${T}`]||n.defaultValue;let I=p;w&&!p&&v&&(I=W);const k=Pu(I),L=Object.prototype.toString.apply(I);if(w&&I&&k&&x.indexOf(L)<0&&!(vt(b)&&Array.isArray(I))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const R=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,I,{...n,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(d.res=R,d.usedParams=this.getUsedParamsDetails(n),d):R}if(o){const R=Array.isArray(I),B=R?[]:{},O=R?y:g;for(const $ in I)if(Object.prototype.hasOwnProperty.call(I,$)){const q=`${O}${o}${$}`;v&&!p?B[$]=this.translate(q,{...n,defaultValue:Pu(W)?W[$]:void 0,joinArrays:!1,ns:l}):B[$]=this.translate(q,{...n,joinArrays:!1,ns:l}),B[$]===q&&(B[$]=I[$])}p=B}}else if(w&&vt(b)&&Array.isArray(p))p=p.join(b),p&&(p=this.extendTranslation(p,t,n,i));else{let R=!1,B=!1;!this.isValidLookup(p)&&v&&(R=!0,p=W),this.isValidLookup(p)||(B=!0,p=a);const $=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:p,q=v&&W!==p&&this.options.updateMissing;if(B||R||q){if(this.logger.log(q?"updateKey":"missingKey",u,c,a,q?W:p),o){const M=this.resolve(a,{...n,keySeparator:!1});M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let A=[];const D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(let M=0;M<D.length;M++)A.push(D[M]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(n.lng||this.language):A.push(n.lng||this.language);const _=(M,H,P)=>{const U=v&&P!==p?P:$;this.options.missingKeyHandler?this.options.missingKeyHandler(M,c,H,U,q,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(M,c,H,U,q,n),this.emit("missingKey",M,c,H,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?A.forEach(M=>{const H=this.pluralResolver.getSuffixes(M,n);N&&n[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(P=>{_([M],a+P,n[`defaultValue${P}`]||W)})}):_(A,a,W))}p=this.extendTranslation(p,t,n,d,i),B&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${c}${h}${a}`),(B||R)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${h}${a}`:a,R?p:void 0,n))}return s?(d.res=p,d.usedParams=this.getUsedParamsDetails(n),d):p}extendTranslation(t,r,i,n,s){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const l=vt(t)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const u=t.match(this.interpolator.nestingRegexp);c=u&&u.length}let h=i.replace&&!vt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,i.lng||this.language||n.usedLng,i),l){const u=t.match(this.interpolator.nestingRegexp),f=u&&u.length;c<f&&(i.nest=!1)}!i.lng&&n&&n.res&&(i.lng=this.language||n.usedLng),i.nest!==!1&&(t=this.interpolator.nest(t,(...u)=>s?.[0]===u[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${u[0]} in key: ${r[0]}`),null):this.translate(...u,r),i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,a=vt(o)?[o]:o;return t!=null&&a?.length&&i.applyPostProcessor!==!1&&(t=Pd.handle(a,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,r={}){let i,n,s,o,a;return vt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(i))return;const c=this.extractFromKey(l,r),h=c.key;n=h;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const f=r.count!==void 0&&!vt(r.count),d=f&&!r.ordinal&&r.count===0,p=r.context!==void 0&&(vt(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);u.forEach(y=>{this.isValidLookup(i)||(a=y,!Nu[`${g[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(Nu[`${g[0]}-${y}`]=!0,this.logger.warn(`key "${n}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(x=>{if(this.isValidLookup(i))return;o=x;const b=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(b,h,x,y,r);else{let C;f&&(C=this.pluralResolver.getSuffix(x,r.count,r));const v=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&C.indexOf(E)===0&&b.push(h+C.replace(E,this.options.pluralSeparator)),b.push(h+C),d&&b.push(h+v)),p){const T=`${h}${this.options.contextSeparator||"_"}${r.context}`;b.push(T),f&&(r.ordinal&&C.indexOf(E)===0&&b.push(T+C.replace(E,this.options.pluralSeparator)),b.push(T+C),d&&b.push(T+v))}}let w;for(;w=b.pop();)this.isValidLookup(i)||(s=w,i=this.getResource(x,y,w,r))}))})}),{res:i,usedKey:n,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,i,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,r,i,n):this.resourceStore.getResource(t,r,i,n)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!vt(t.replace);let n=i?t.replace:t;if(i&&typeof t.count<"u"&&(n.count=t.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!i){n={...n};for(const s of r)delete n[s]}return n}static hasDefaultValue(t){const r="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&r===i.substring(0,r.length)&&t[i]!==void 0)return!0;return!1}}class ju{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ye.create("languageUtils")}getScriptPartFromCode(t){if(t=jn(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=jn(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(vt(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(i=>{if(r)return;const n=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(n))&&(r=n)}),!r&&this.options.supportedLngs&&t.forEach(i=>{if(r)return;const n=this.getScriptPartFromCode(i);if(this.isSupportedCode(n))return r=n;const s=this.getLanguagePartFromCode(i);if(this.isSupportedCode(s))return r=s;r=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),vt(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let i=t[r];return i||(i=t[this.getScriptPartFromCode(r)]),i||(i=t[this.formatLanguageCode(r)]),i||(i=t[this.getLanguagePartFromCode(r)]),i||(i=t.default),i||[]}toResolveHierarchy(t,r){const i=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),n=[],s=o=>{o&&(this.isSupportedCode(o)?n.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return vt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):vt(t)&&s(this.formatLanguageCode(t)),i.forEach(o=>{n.indexOf(o)<0&&s(this.formatLanguageCode(o))}),n}}const zu={zero:0,one:1,two:2,few:3,many:4,other:5},Wu={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class lv{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=Ye.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const i=jn(t==="dev"?"en":t),n=r.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:n});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(i,{type:n})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Wu;if(!t.match(/-|_/))return Wu;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,r)}return this.pluralRulesCache[s]=o,o}needsPlural(t,r={}){let i=this.getRule(t,r);return i||(i=this.getRule("dev",r)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,r,i={}){return this.getSuffixes(t,i).map(n=>`${r}${n}`)}getSuffixes(t,r={}){let i=this.getRule(t,r);return i||(i=this.getRule("dev",r)),i?i.resolvedOptions().pluralCategories.sort((n,s)=>zu[n]-zu[s]).map(n=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n}`):[]}getSuffix(t,r,i={}){const n=this.getRule(t,i);return n?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${n.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,i))}}const qu=(e,t,r,i=".",n=!0)=>{let s=J1(e,t,r);return!s&&n&&vt(r)&&(s=bl(e,r,i),s===void 0&&(s=bl(t,r,i))),s},zo=e=>e.replace(/\$/g,"$$$$");class cv{constructor(t={}){this.logger=Ye.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:i,useRawValueToEscape:n,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:h,unescapePrefix:u,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:y,maxReplaces:x,alwaysFormat:b}=t.interpolation;this.escape=r!==void 0?r:ev,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=n!==void 0?n:!1,this.prefix=s?mi(s):o||"{{",this.suffix=a?mi(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=h?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=f?mi(f):d||mi("$t("),this.nestingSuffix=p?mi(p):g||mi(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=x||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,i)=>r?.source===i?(r.lastIndex=0,r):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,i,n){let s,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=d=>{if(d.indexOf(this.formatSeparator)<0){const x=qu(r,l,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,i,{...n,...r,interpolationkey:d}):x}const p=d.split(this.formatSeparator),g=p.shift().trim(),y=p.join(this.formatSeparator).trim();return this.format(qu(r,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),y,i,{...n,...r,interpolationkey:g})};this.resetRegExp();const h=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>zo(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?zo(this.escape(d)):zo(d)}].forEach(d=>{for(a=0;s=d.regex.exec(t);){const p=s[1].trim();if(o=c(p),o===void 0)if(typeof h=="function"){const y=h(t,s,n);o=vt(y)?y:""}else if(n&&Object.prototype.hasOwnProperty.call(n,p))o="";else if(u){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),o="";else!vt(o)&&!this.useRawValueToEscape&&(o=Ou(o));const g=d.safeValue(o);if(t=t.replace(s[0],g),u?(d.regex.lastIndex+=o.length,d.regex.lastIndex-=s[0].length):d.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,r,i={}){let n,s,o;const a=(l,c)=>{const h=this.nestingOptionsSeparator;if(l.indexOf(h)<0)return l;const u=l.split(new RegExp(`${h}[ ]*{`));let f=`{${u[1]}`;l=u[0],f=this.interpolate(f,o);const d=f.match(/'/g),p=f.match(/"/g);((d?.length??0)%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),c&&(o={...c,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${h}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;n=this.nestingRegexp.exec(t);){let l=[];o={...i},o=o.replace&&!vt(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const c=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(c!==-1&&(l=n[1].slice(c).split(this.formatSeparator).map(h=>h.trim()).filter(Boolean),n[1]=n[1].slice(0,c)),s=r(a.call(this,n[1].trim(),o),o),s&&n[0]===t&&!vt(s))return s;vt(s)||(s=Ou(s)),s||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),s=""),l.length&&(s=l.reduce((h,u)=>this.format(h,u,i.lng,{...i,interpolationkey:n[1].trim()}),s.trim())),t=t.replace(n[0],s),this.regexp.lastIndex=0}return t}}const hv=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const n=i[1].substring(0,i[1].length-1);t==="currency"&&n.indexOf(":")<0?r.currency||(r.currency=n.trim()):t==="relativetime"&&n.indexOf(":")<0?r.range||(r.range=n.trim()):n.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),h=a.trim();r[h]||(r[h]=c),c==="false"&&(r[h]=!1),c==="true"&&(r[h]=!0),isNaN(c)||(r[h]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},Hu=e=>{const t={};return(r,i,n)=>{let s=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(s={...s,[n.interpolationkey]:void 0});const o=i+JSON.stringify(s);let a=t[o];return a||(a=e(jn(i),n),t[o]=a),a(r)}},uv=e=>(t,r,i)=>e(jn(r),i)(t);class fv{constructor(t={}){this.logger=Ye.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const i=r.cacheInBuiltFormats?Hu:uv;this.formats={number:i((n,s)=>{const o=new Intl.NumberFormat(n,{...s});return a=>o.format(a)}),currency:i((n,s)=>{const o=new Intl.NumberFormat(n,{...s,style:"currency"});return a=>o.format(a)}),datetime:i((n,s)=>{const o=new Intl.DateTimeFormat(n,{...s});return a=>o.format(a)}),relativetime:i((n,s)=>{const o=new Intl.RelativeTimeFormat(n,{...s});return a=>o.format(a,s.range||"day")}),list:i((n,s)=>{const o=new Intl.ListFormat(n,{...s});return a=>o.format(a)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=Hu(r)}format(t,r,i,n={}){const s=r.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(a=>a.indexOf(")")>-1)){const a=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,a)].join(this.formatSeparator)}return s.reduce((a,l)=>{const{formatName:c,formatOptions:h}=hv(l);if(this.formats[c]){let u=a;try{const f=n?.formatParams?.[n.interpolationkey]||{},d=f.locale||f.lng||n.locale||n.lng||i;u=this.formats[c](a,d,{...h,...n,...f})}catch(f){this.logger.warn(f)}return u}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}const dv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class pv extends qa{constructor(t,r,i,n={}){super(),this.backend=t,this.store=r,this.services=i,this.languageUtils=i.languageUtils,this.options=n,this.logger=Ye.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,n.backend,n)}queueLoad(t,r,i,n){const s={},o={},a={},l={};return t.forEach(c=>{let h=!0;r.forEach(u=>{const f=`${c}|${u}`;!i.reload&&this.store.hasResourceBundle(c,u)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,h=!1,o[f]===void 0&&(o[f]=!0),s[f]===void 0&&(s[f]=!0),l[u]===void 0&&(l[u]=!0)))}),h||(a[c]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,r,i){const n=t.split("|"),s=n[0],o=n[1];r&&this.emit("failedLoading",s,o,r),!r&&i&&this.store.addResourceBundle(s,o,i,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&i&&(this.state[t]=0);const a={};this.queue.forEach(l=>{Q1(l.loaded,[s],o),dv(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const h=l.loaded[c];h.length&&h.forEach(u=>{a[c][u]===void 0&&(a[c][u]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,r,i,n=0,s=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:i,tried:n,wait:s,callback:o});return}this.readingCalls++;const a=(c,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(c&&h&&n<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,i,n+1,s*2,o)},s);return}o(c,h)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const c=l(t,r);c&&typeof c.then=="function"?c.then(h=>a(null,h)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,r,a)}prepareLoading(t,r,i={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();vt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),vt(r)&&(r=[r]);const s=this.queueLoad(t,r,i,n);if(!s.toLoad.length)return s.pending.length||n(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,i){this.prepareLoading(t,r,{},i)}reload(t,r,i){this.prepareLoading(t,r,{reload:!0},i)}loadOne(t,r=""){const i=t.split("|"),n=i[0],s=i[1];this.read(n,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${r}loading namespace ${s} for language ${n} failed`,o),!o&&a&&this.logger.log(`${r}loaded namespace ${s} for language ${n}`,a),this.loaded(t,o,a)})}saveMissing(t,r,i,n,s,o={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${i}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const l={...o,isUpdate:s},c=this.backend.create.bind(this.backend);if(c.length<6)try{let h;c.length===5?h=c(t,r,i,n,l):h=c(t,r,i,n),h&&typeof h.then=="function"?h.then(u=>a(null,u)).catch(a):a(null,h)}catch(h){a(h)}else c(t,r,i,n,a,l)}!t||!t[0]||this.store.addResource(t[0],r,i,n)}}}const Uu=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),vt(e[1])&&(t.defaultValue=e[1]),vt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(i=>{t[i]=r[i]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Yu=e=>(vt(e.ns)&&(e.ns=[e.ns]),vt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),vt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),ks=()=>{},gv=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class zn extends qa{constructor(t={},r){if(super(),this.options=Yu(t),this.services={},this.logger=Ye,this.modules={external:[]},gv(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(vt(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=Uu();this.options={...i,...this.options,...Yu(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const n=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Ye.init(n(this.modules.logger),this.options):Ye.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=fv;const h=new ju(this.options);this.store=new Iu(this.options.resources,this.options);const u=this.services;u.logger=Ye,u.resourceStore=this.store,u.languageUtils=h,u.pluralResolver=new lv(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(u.formatter=n(c),u.formatter.init&&u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new cv(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new pv(n(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.languageDetector&&(u.languageDetector=n(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=n(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new oa(this.services,this.options),this.translator.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ks),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...h)=>this.store[c](...h)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...h)=>(this.store[c](...h),this)});const a=hn(),l=()=>{const c=(h,u)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(u),r(h,u)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(t,r=ks){let i=r;const n=vt(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&s.indexOf(c)<0&&s.push(c)})};n?o(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload?.forEach?.(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(a)})}else i(null)}reloadResources(t,r,i){const n=hn();return typeof t=="function"&&(i=t,t=void 0),typeof r=="function"&&(i=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),i||(i=ks),this.services.backendConnector.reload(t,r,s=>{n.resolve(),i(s)}),n}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Pd.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const i=this.languages[r];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const i=hn();this.emit("languageChanging",t);const n=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},s=(a,l)=>{l?this.isLanguageChangingTo===t&&(n(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve((...c)=>this.t(...c)),r&&r(a,(...c)=>this.t(...c))},o=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const l=vt(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(vt(a)?[a]:a);c&&(this.language||n(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,h=>{s(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),i}getFixedT(t,r,i){const n=(s,o,...a)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([s,o].concat(a)):l={...o},l.lng=l.lng||n.lng,l.lngs=l.lngs||n.lngs,l.ns=l.ns||n.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||i||n.keyPrefix);const c=this.options.keySeparator||".";let h;return l.keyPrefix&&Array.isArray(s)?h=s.map(u=>(typeof u=="function"&&(u=vl(u,{...this.options,...o})),`${l.keyPrefix}${c}${u}`)):(typeof s=="function"&&(s=vl(s,{...this.options,...o})),h=l.keyPrefix?`${l.keyPrefix}${c}${s}`:s),this.t(h,l)};return vt(t)?n.lng=t:n.lngs=t,n.ns=r,n.keyPrefix=i,n}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=r.lng||this.resolvedLanguage||this.languages[0],n=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(r.precheck){const a=r.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,t)&&(!n||o(s,t)))}loadNamespaces(t,r){const i=hn();return this.options.ns?(vt(t)&&(t=[t]),t.forEach(n=>{this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}),this.loadResources(n=>{i.resolve(),r&&r(n)}),i):(r&&r(),Promise.resolve())}loadLanguages(t,r){const i=hn();vt(t)&&(t=[t]);const n=this.options.preload||[],s=t.filter(o=>n.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=n.concat(s),this.loadResources(o=>{i.resolve(),r&&r(o)}),i):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const n=new Intl.Locale(t);if(n&&n.getTextInfo){const s=n.getTextInfo();if(s&&s.direction)return s.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services?.languageUtils||new ju(Uu());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){return new zn(t,r)}cloneInstance(t={},r=ks){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const n={...this.options,...t,isClone:!0},s=new zn(n);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i){const a=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((h,u)=>(h[u]={...l[c][u]},h),l[c]),l),{});s.store=new Iu(a,n),s.services.resourceStore=s.store}return s.translator=new oa(s.services,n),s.translator.on("*",(a,...l)=>{s.emit(a,...l)}),s.init(n,r),s.translator.options=n,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const zt=zn.createInstance();zt.createInstance=zn.createInstance;zt.createInstance;zt.dir;zt.init;zt.loadResources;zt.reloadResources;zt.use;zt.changeLanguage;zt.getFixedT;zt.t;zt.exists;zt.setDefaultNamespace;zt.hasLoadedNamespace;zt.loadNamespaces;zt.loadLanguages;const mv={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},yv={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},xv={AddSubGroup:"Aggiungi sottogruppo",AddFilter:"Aggiungi Filtro",Operator:{String:{Starts:"Inizia per",Contains:"Contiene",Equals:"È uguale a"},Number:{Greater:"Maggiore di",GreaterOrEqual:"Maggiore o uguale a",Less:"Minore di",LessOrEqual:"Minore o uguale a",Equals:"Uguale a",NotEquals:"Diverso da"},Date:{Before:"Prima del",After:"Dopo del",On:"Il giorno"}}},bv={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando",CheckObjectWrongValidation:"Oggetto non valido",ConfirmButton:"Conferma",AutocompleteDefaultPlaceholder:"Inserisci codice o descrizione"},vv={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:mv,Month:yv,FilterBuilder:xv,Generic:bv},wv={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},Cv={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},_v={AddSubGroup:"Add Sub Group",AddFilter:"Add Filter",Operator:{String:{Starts:"Starts with",Contains:"Contains",Equals:"Equal to"},Number:{Greater:"Greater than",GreaterOrEqual:"Greater or equal than",Less:"Less than",LessOrEqual:"Less or equal than",Equals:"Equal to",NotEquals:"Other than"},Date:{Before:"Before date",After:"After date",On:"On"}}},Sv={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command",CheckObjectWrongValidation:"Object not valid",ConfirmButton:"Confirm",AutocompleteDefaultPlaceholder:"Type code or description"},kv={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:wv,Month:Cv,FilterBuilder:_v,Generic:Sv};function Vu(e,t){return new RegExp(Tv(e),t)}function Tv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Ev=(e,t,r)=>{let i=e;return isNaN(i)||(t!=null&&(i=Math.max(i,t)),r!=null&&(i=Math.min(i,r))),i},Lv=(e,t)=>{const i=Intl.NumberFormat(e).formatToParts(1000.1),n=i.find(o=>o.type==="group")?.value??",",s=t??i.find(o=>o.type==="decimal")?.value??".";return{groupingChar:n,decimalChar:s}};function Av(e,t,r,i){let n=t;const s=Bv(e,r);if(!n){const a=Math.abs(s);a-Math.floor(a)?n="0,0.00":n="0,0"}const o=Ov(n);return new Intl.NumberFormat(i,o).format(s)}const Mv=(e,t,r)=>{const i=e.lastIndexOf(r);if(i!==-1)return e.length-i-1;const n=r==="."?",":".",s=e.lastIndexOf(n);return s!==-1&&!(n===t&&e.length-s-1===3)?e.length-s-1:0},$v=(e,t,r)=>{if(!e)return NaN;let i=e.replace(/\s/g,""),n=r;const s=(i.match(/\./g)||[]).length,o=(i.match(/,/g)||[]).length;if(s&&o)n=i.lastIndexOf(".")>i.lastIndexOf(",")?".":",";else if(!i.includes(r)){const l=i.includes(".")?".":",",c=l==="."?s:o;c>1||c===1&&l===t&&i.length-i.lastIndexOf(l)-1===3||(n=l)}const a=n==="."?",":".";return i=i.replace(new RegExp(`\\${a}`,"g"),""),n!=="."&&(i=i.replace(new RegExp(`\\${n}`,"g"),".")),parseFloat(i)};function Bv(e,t,r,i,n){let s=e;if(typeof s!="number"){let a;t&&i===void 0?a=",":a=".";const l=a=="."?",":".";s=s.replace(Vu(l,"g"),""),s=s.replace(Vu(a,"g"),"."),s=Number(s)}const o=Number(s);return isNaN(o)?NaN:o}function Ov(e){const t={};e.includes(",")?t.useGrouping=!0:t.useGrouping=!1;const r=e.indexOf(".");if(r>-1){const n=(e.substring(r+1).match(/0/g)||[]).length;t.minimumFractionDigits=n,t.maximumFractionDigits=n}else t.minimumFractionDigits=0,t.maximumFractionDigits=0;return t}zt.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(e,t,r,i)=>{const n=i?.type??"number";try{switch(n){case"date":{const s=e instanceof Date?e:new Date(e);return new Intl.DateTimeFormat(r,{dateStyle:t||"short"}).format(s)}default:case"number":{const s=i?.inputIsLocalized??!1;return Av(e,t,s,r)}}}catch{return e}}},resources:{en:{translation:kv},it:{translation:vv}}});const Rv=(e,t,r,i)=>zt.format(e,t,r||zt.language,i),Dv=(e,t)=>zt.t(e,t);function gr(){const e=z.useCallback((i,n,s,o)=>Rv(i,n,s||void 0,o),[]),t=z.useCallback(()=>zt.languages[0],[]),r=z.useCallback((i,n)=>Dv(i,n),[]);return{format:e,getCurrentLanguage:t,translate:r}}var lr=(e=>(e.CALENDAR_FOR="Date.CalendarFor",e.CLOSE="Generic.Close",e.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",e.CHECK_OBJECT_WRONG_VALIDATION="Generic.CheckObjectWrongValidation",e.CONFIRM_BUTTON="Generic.ConfirmButton",e.AUTOCOMPLETE_DEFAULT_PLACEHOLDER="Generic.AutocompleteDefaultPlaceholder",e))(lr||{}),me=(e=>(e.ADD_SUB_GROUP="FilterBuilder.AddSubGroup",e.ADD_FILTER="FilterBuilder.AddFilter",e.STRING_STARTS="FilterBuilder.Operator.String.Starts",e.STRING_CONTAINS="FilterBuilder.Operator.String.Contains",e.STRING_EQUALS="FilterBuilder.Operator.String.Equals",e.NUMBER_EQUALS="FilterBuilder.Operator.Number.Equals",e.NUMBER_NOTEQUALS="FilterBuilder.Operator.Number.NotEquals",e.NUMBER_GREATER="FilterBuilder.Operator.Number.Greater",e.NUMBER_GREATER_OR_EQUAL="FilterBuilder.Operator.Number.GreaterOrEqual",e.NUMBER_LESS="FilterBuilder.Operator.Number.Less",e.NUMBER_LESS_OR_EQUAL="FilterBuilder.Operator.Number.LessOrEqual",e.DATE_BEFORE="FilterBuilder.Operator.Date.Before",e.DATE_AFTER="FilterBuilder.Operator.Date.After",e.DATE_ON="FilterBuilder.Operator.Date.On",e))(me||{}),ae=(e=>(e.MONDAY="Day.Monday",e.MONDAY_SHORT="Day.MondayShort",e.TUESDAY="Day.Tuesday",e.TUESDAY_SHORT="Day.TuesdayShort",e.WEDNESDAY="Day.Wednesday",e.WEDNESDAY_SHORT="Day.WednesdayShort",e.THURSDAY="Day.Thursday",e.THURSDAY_SHORT="Day.ThursdayShort",e.FRIDAY="Day.Friday",e.FRIDAY_SHORT="Day.FridayShort",e.SATURDAY="Day.Saturday",e.SATURDAY_SHORT="Day.SaturdayShort",e.SUNDAY="Day.Sunday",e.SUNDAY_SHORT="Day.SundayShort",e))(ae||{}),_e=(e=>(e.JANUARY="Month.January",e.FEBRUARY="Month.February",e.MARCH="Month.March",e.APRIL="Month.April",e.MAY="Month.May",e.JUNE="Month.June",e.JULY="Month.July",e.AUGUST="Month.August",e.SEPTEMBER="Month.September",e.OCTOBER="Month.October",e.NOVEMBER="Month.November",e.DECEMBER="Month.December",e))(_e||{}),wl=(e=>(e.PREVIOUS_DAY="Date.PreviousDay",e.PREVIOUS_WEEK="Date.PreviousWeek",e.PREVIOUS_MONTH="Date.PreviousMonth",e.PREVIOUS_YEAR="Date.PreviousYear",e.NEXT_DAY="Date.NextDay",e.NEXT_WEEK="Date.NextWeek",e.NEXT_MONTH="Date.NextMonth",e.NEXT_YEAR="Date.NextYear",e.YESTERDAY="Date.Yesterday",e.TODAY="Date.Today",e.TOMORROW="Date.Tomorrow",e))(wl||{});const Fv=e=>e?.type==="SmeupDataTree",Iv=e=>e?.type==="SmeupDataTable",Ps={obj:{t:"",p:"",k:""},decode:"",shape:void 0},Vi=e=>{if(Iv(e)){const t=e,r=t.columns.filter(s=>s.visible!==!1),i=r[0]?.name??"",n=r[1]?.name??i;return t.rows.reduce((s,o)=>{const a={...o.cells[i],decode:o.cells[n]?.value||o.cells[i].obj.k};return[...s,a]},[])}else if(Fv(e))return zd(e.children??[])},zd=e=>e?.map(t=>({...t,decode:t.decode||t.value||t.obj?.k||"",children:zd(t.children??[])})),Rc=({bindValue:e,optionalDisplayValue:t,options:r,listDisplayMode:i="Both",isClearable:n=!1,minimumChars:s=1,isEditable:o=!0,fun:a,_changeOnEnter:l=!1,onChange:c,onOptionsRequest:h,onBlur:u,_multiActiveIndex:f,...d})=>{const p=z.useRef(null),[g,y]=z.useState(e),[x,b]=z.useState(t),{translate:w}=gr(),[C,v]=z.useState(!1),[E,T]=z.useState(r||[]),[N,W]=z.useState(0),[I,k]=z.useState([e]),{anchorRef:L,targetRef:R,anchorWidth:B}=Sr({position:"bottom",open:C}),O=z.useCallback(()=>{v(!1),p?.current?.focus()},[]);ss([R],C,()=>O());const $=Od(400),q=P=>{P.length>=s?A(P):O(),y(P),b(""),l||c?.(P,t)},A=P=>{$(async()=>{if(a&&h){const U=await h(a,P),Y=Vi(U)||[];T(Y),W(Y.length>0?0:-1),v(!0)}})},D=()=>{C||u?.()},_=P=>{l?(y(""),b("")):(y(P.obj?.k),b(P.decode)),c?.(P.obj?.k,P.decode);const U=E.findIndex(Y=>Y.obj?.k===P.obj?.k);W(U),k([P.obj?.k]),O()},M=P=>{P.key==="Escape"&&(O(),W(-1))},H=P=>{if((P.key==="ArrowDown"||P.key==="ArrowUp")&&(P.preventDefault(),C)){const U=P.key==="ArrowDown"?(N+1)%E.length:(N-1+E.length)%E.length;W(U)}switch(P.key){case"Enter":N>=0&&N<E.length?_(E[N]):l&&(c?.(g,""),O(),y(""),b(""));break;case"Escape":O(),W(-1);break}};return S.jsxs("div",{"data-component":"autocomplete",children:[S.jsx(Fe,{...d,bindValue:g,optionalDisplayValue:x,isEditable:o,shapeIcon:"magnify",placeholder:w(lr.AUTOCOMPLETE_DEFAULT_PLACEHOLDER),ref:L,isClearable:n,inputRef:p,onChange:q,onKeyDown:H,onBlur:D,onShapeIconClick:()=>A(g),"aria-autocomplete":"list",maxLength:-1}),C&&S.jsx(_r,{children:S.jsx(Bc,{options:E,displayMode:i,onClick:_,ref:R,selectedIndex:N,activeIndex:f||I,width:B,showFilter:!1,onKeyDown:M,isOpen:C,floating:!0})})]})},Wd=({options:e,fun:t,direction:r="row",disposition:i="start",sizing:n,variant:s,appearance:o,showText:a,showIcon:l,fullWidth:c,disabled:h,justify:u,squared:f,onClick:d,onOptionsRequest:p})=>{const[g,y]=z.useState(e);z.useEffect(()=>{!g&&p&&t&&p(t,void 0).then(w=>y(Vi(w))).catch(w=>{console.error("Errore nel caricamento delle opzioni per ButtonList",w)})},[g,t,p]);const x={container:`smp-button-list smp-button-list-${r} smp-justifyContent-${i}`},b=g?.map((w,C)=>{const v={bindValue:w.obj.k,optionalDisplayValue:w.decode,fun:w.fun,icon:w.icon,variant:s,appearance:o,showText:a,showIcon:l,fullWidth:c,disabled:h,sizing:n,justify:u,squared:f,onClick:()=>{d?.(w.obj.k,w.fun)}};return S.jsx(Qt,{...v},`button-${C}`)});return S.jsx("div",{role:"list","data-component":"button-list",className:x.container,children:b})},Nv={"smp-checkbox-wrapper":"_smp-checkbox-wrapper_d8uan_2"},Ha=({bindValue:e,_dataComponent:t="checkbox",disabled:r,label:i,isEditable:n=!0,onChange:s,onBlur:o,variant:a="checkbox",...l})=>{const c=z.useId(),h=f=>{n&&s&&s(f.target.checked)},u={wrapper:`${Nv["smp-checkbox-wrapper"]}`};return S.jsxs("div",{className:u.wrapper,"data-component":t,children:[i&&S.jsx(Ar,{label:i,disabled:r,htmlFor:c,helper:l.helper}),S.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:e,onChange:h,onBlur:o,role:a==="switch"?"switch":"checkbox",id:c})]})};function Dc(e,t){const r=z.useRef(null);z.useEffect(()=>{if(!e)return;const i=typeof t=="object"&&t!==null&&"current"in t?t.current:null;if(!i)return;r.current=document.activeElement;const n=()=>i?Array.from(i.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null):[];(()=>{const c=n();c.length>0&&requestAnimationFrame(()=>c[0].focus())})();const o=c=>{if(c.key==="Escape"||c.key!=="Tab")return;const h=n();if(h.length===0)return;const u=h[0],f=h[h.length-1];c.shiftKey&&document.activeElement===u?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),u.focus())},a=c=>{if(i&&!i.contains(c.target)){c.preventDefault();const h=n();h.length>0&&h[0].focus()}};document.addEventListener("keydown",o),document.addEventListener("mousedown",a);const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.removeEventListener("mousedown",a),document.body.style.overflow=l,r.current&&requestAnimationFrame(()=>{r.current?.focus()})}},[e,t])}const la=({bindValue:e,onChange:t,options:r=[],optionalDisplayValue:i,isEditable:n,listDisplayMode:s="Both",fun:o,onOptionsRequest:a,multiActiveIndex:l,...c})=>{const h=z.useRef(null),[u,f]=z.useState(!1),[d,p]=z.useState(r),[g,y]=z.useState(-1),[x,b]=z.useState([e]),w=z.useId(),{anchorRef:C,targetRef:v,anchorWidth:E}=Sr({position:"bottom",open:u}),T=z.useCallback(()=>{f(!1),h?.current?.focus()},[]);ss([v,C],u,()=>T()),Dc(u,v);const N=L=>{t?.(L.obj.k,L.decode);const R=d.findIndex(B=>B.obj.k===L.obj.k);y(R),b([L.obj.k]),T()},W=L=>{L.key==="Escape"&&(T(),y(-1))},I=L=>{(L.key==="ArrowDown"||L.key==="ArrowUp")&&(L.preventDefault(),k())},k=()=>{n&&(o&&a?u?f(!1):a(o,void 0).then(L=>{const R=Vi(L)||[];p(R),y(R.length>0?0:-1),f(!0)}):f(L=>!L))};return S.jsxs("div",{role:"combobox","aria-expanded":u,"aria-controls":w,"aria-owns":w,"data-component":"combobox",children:[S.jsx(Fe,{...c,bindValue:e,optionalDisplayValue:i,onShapeIconClick:k,onKeyDown:I,onClick:k,shapeIcon:"arrow_drop_down",rotatedShapeIcon:u,isEditable:n,ref:C,inputRef:h,"aria-autocomplete":"list",variant:"notSelectable"}),u&&S.jsx(_r,{children:S.jsx(Bc,{id:w,options:d,displayMode:s,ref:v,isOpen:u,selectedIndex:g,activeIndex:l||x,width:E,onClick:N,onKeyDown:W,floating:!0})})]})},Pv={"smp-datepickercalendar-position":"_smp-datepickercalendar-position_1lf9g_1"};function jv({selectedDate:e,onDateChange:t,disabledDateRanges:r=[],initialValue:i,targetRef:n}){const{translate:s}=gr(),o=()=>{if(!i)return;const D=new Date(i);return isNaN(D.getTime())?void 0:D},[a]=z.useState(new Date),[l,c]=z.useState(e||o()||new Date),[h,u]=z.useState(l?l.getMonth():new Date().getMonth()),[f,d]=z.useState(l?l.getFullYear():new Date().getFullYear()),[p,g]=z.useState(l?l.getDate():null),y=z.useRef(null),x=z.useRef([]),b=[s(_e.JANUARY),s(_e.FEBRUARY),s(_e.MARCH),s(_e.APRIL),s(_e.MAY),s(_e.JUNE),s(_e.JULY),s(_e.AUGUST),s(_e.SEPTEMBER),s(_e.OCTOBER),s(_e.NOVEMBER),s(_e.DECEMBER)],w=[{value:s(ae.SUNDAY_SHORT),full:s(ae.SUNDAY)},{value:s(ae.MONDAY_SHORT),full:s(ae.MONDAY)},{value:s(ae.TUESDAY_SHORT),full:s(ae.TUESDAY)},{value:s(ae.WEDNESDAY_SHORT),full:s(ae.WEDNESDAY)},{value:s(ae.THURSDAY_SHORT),full:s(ae.THURSDAY)},{value:s(ae.FRIDAY_SHORT),full:s(ae.FRIDAY)},{value:s(ae.SATURDAY_SHORT),full:s(ae.SATURDAY)}],C=D=>r.some(_=>{const M=_.start.getTime(),H=_.end.getTime(),P=D.getTime();return P>=M&&P<=H}),v=D=>{C(D)||(c(D),g(D.getDate()),t&&t(X1(D)))},E=()=>{h===0?(u(11),d(f-1)):u(h-1),g(1)},T=()=>{h===11?(u(0),d(f+1)):u(h+1),g(1)},N=(D,_)=>new Date(D,_+1,0).getDate(),W=(D,_)=>new Date(D,_,1).getDay(),I=D=>{const _=B.findIndex(M=>M!==null&&M.getDate()===D);_!==-1&&x.current[_]&&(x.current[_]?.focus(),g(D))},k=(D,_)=>{const M=B[_];if(!M)return;const H=N(f,h),P=M.getDate();switch(D.key){case"ArrowRight":D.preventDefault();{let U=P+1,Y=new Date(f,h,U);if(U>H){const K=h===11?f+1:f,Z=h===11?0:h+1;U=1,Y=new Date(K,Z,U),T(),setTimeout(()=>{L(1,"forward")},0);return}C(Y)?L(U,"forward"):I(U)}break;case"Tab":break;case"ArrowLeft":D.preventDefault();{let U=P-1,Y=new Date(f,h,U);if(U<1){const K=h===0?f-1:f,Z=h===0?11:h-1,Q=N(K,Z);U=Q,Y=new Date(K,Z,U),E(),setTimeout(()=>{L(Q,"backward")},0);return}C(Y)?L(U,"backward"):I(U)}break;case"ArrowUp":D.preventDefault();{let U=P-7,Y=new Date(f,h,U);if(U<1){const K=h===0?f-1:f,Z=h===0?11:h-1;U=N(K,Z)+U,Y=new Date(K,Z,U),E(),setTimeout(()=>{L(U,"backward")},0);return}C(Y)?L(U,"backward"):I(U)}break;case"ArrowDown":D.preventDefault();{let U=P+7,Y=new Date(f,h,U);if(U>H){const K=h===11?f+1:f,Z=h===11?0:h+1;U=U-H,Y=new Date(K,Z,U),T(),setTimeout(()=>{L(U,"forward")},0);return}C(Y)?L(U,"forward"):I(U)}break;case"Home":D.preventDefault(),L(1,"forward");break;case"End":D.preventDefault(),L(H,"backward");break;case"PageUp":D.preventDefault(),E(),setTimeout(()=>{const U=N(h===0?f-1:f,h===0?11:h-1),Y=Math.min(P,U);L(Y,"forward")},0);break;case"PageDown":D.preventDefault(),T(),setTimeout(()=>{const U=N(h===11?f+1:f,h===11?0:h+1),Y=Math.min(P,U);L(Y,"forward")},0);break;case" ":case"Space":if(C(M))return;g(M.getDate()),c(M);break;case"Enter":D.preventDefault(),v(M);break}},L=(D,_)=>{const M=N(f,h);if(_==="forward"){for(let H=D;H<=M;H++){const P=new Date(f,h,H);if(!C(P)){I(H);return}}T(),setTimeout(()=>{L(1,"forward")},0)}else{for(let Y=D;Y>=1;Y--){const K=new Date(f,h,Y);if(!C(K)){I(Y);return}}const H=h===0?f-1:f,P=h===0?11:h-1,U=N(H,P);E(),setTimeout(()=>{L(U,"backward")},0)}},B=(()=>{const D=N(f,h),_=W(f,h),M=[];for(let H=0;H<_;H++)M.push(null);for(let H=1;H<=D;H++){const P=new Date(f,h,H);M.push(P)}return M})(),O=[];let $=[];B.forEach((D,_)=>{if($.push(D),$.length===7||_===B.length-1){for(;$.length<7;)$.push(null);O.push($),$=[]}}),z.useEffect(()=>{if(p!==null){const D=B.findIndex(_=>_!==null&&_.getDate()===p);D!==-1&&x.current[D]&&x.current[D]?.focus()}},[h,f,p,B]);const q={label:"smp-datepickercalendar-label",wrapper:`smp-datepickercalendar ${Pv["smp-datepickercalendar-position"]}`,calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(D,_,M,H)=>`smp-datepickercalendar-td
46
- ${D?"smp-datepickercalendar-td-today":""}
47
- ${_?"smp-datepickercalendar-td-selected":""}
48
- ${M?"smp-datepickercalendar-td-focused":""}
49
- ${H?"smp-datepickercalendar-td-disabled":""}`},A=()=>`${b[h]} ${f.toString()}`;return S.jsxs("div",{className:q.wrapper,ref:n,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[S.jsx(Qt,{onClick:E,ariaLabel:s(wl.PREVIOUS_MONTH),optionalDisplayValue:"<",appearance:"ghost",variant:"base",bindValue:"<"}),S.jsx("div",{"aria-label":A(),className:q.label,children:A()}),S.jsx(Qt,{onClick:T,ariaLabel:s(wl.NEXT_MONTH),bindValue:">",optionalDisplayValue:">",appearance:"ghost",variant:"base"})]}),S.jsxs("table",{ref:y,role:"grid","aria-label":`${s(lr.CALENDAR_FOR)} ${b[h]} ${f}`,className:q.table,children:[S.jsx("thead",{children:S.jsx("tr",{children:w.map(D=>S.jsx("th",{scope:"col",abbr:D.full,className:q.th,children:D.value},D.value))})}),S.jsx("tbody",{children:O.map((D,_)=>S.jsx("tr",{children:D.map((M,H)=>{const P=_*7+H;if(M===null)return S.jsx("td",{className:q.td(!1,!1,!1,!0)},`empty-${H}`);const U=M.getDate()===a.getDate()&&M.getMonth()===a.getMonth()&&M.getFullYear()===a.getFullYear(),Y=l&&M.getDate()===l.getDate()&&M.getMonth()===l.getMonth()&&M.getFullYear()===l.getFullYear(),K=p===M.getDate(),Z=C(M);return S.jsx("td",{role:"gridcell","aria-selected":Y,tabIndex:K?0:-1,onClick:()=>v(M),onKeyDown:Q=>k(Q,P),"aria-label":`${M.getDate()} ${b[M.getMonth()]} ${M.getFullYear()}`,"data-selected":Y,"aria-disabled":Z,ref:Q=>{x.current[P]=Q},className:q.td(U,Y,K,Z),children:M.getDate()},`day-${H}`)})},`week-${_}`))})]})]})}const Fc=({bindValue:e,optionalDisplayValue:t,label:r,className:i,style:n,...s})=>{const o={wrapper:"smp-text-wrapper"};return r?S.jsxs("div",{className:o.wrapper,children:[S.jsx(Ar,{label:r,helper:s.helper}),S.jsx(Ge,{variant:"body",bindValue:t||e,className:i,style:n})]}):S.jsx(Ge,{variant:"body",bindValue:t||e,className:i,style:n})},Ic=({bindValue:e,placeholder:t,onChange:r,disabledDateRanges:i,isEditable:n=!0,isOptimized:s,...o})=>{const a=z.useRef(null),[l,c]=z.useState(!1),[h,u]=z.useState(e||""),[f,d]=z.useState(""),{anchorRef:p,targetRef:g}=Sr({position:"bottom",open:l}),y=z.useCallback(()=>{c(!1),a?.current?.focus()},[]);ss([g,p],l,()=>{y()}),Dc(l,g);const{format:x,getCurrentLanguage:b}=gr(),w=z.useCallback(I=>{const k=I.length>5&&Y1(I,b())||I,L=x(k,void 0,void 0,{type:"date"}),R=typeof k!="string",B=R&&k.toISOString().substring(0,10)||"";return{isValid:R,formattedDate:L,isoDate:B,normalizedDate:k}},[b,x]);z.useEffect(()=>{const{formattedDate:I,isoDate:k,isValid:L}=w(e);u(L&&k||e),d(L&&I||e)},[e,x,w]);const C=()=>c(I=>!I),v=()=>{T(f)},E=I=>{T(I),y()},T=I=>{const{isoDate:k,isValid:L}=w(I);r&&r(L&&k||I)},N=I=>{d(I)},W=I=>{I.key==="Enter"&&(I.preventDefault(),T(f))};return S.jsx("div",{"data-component":"date-picker",children:s?S.jsx(Fc,{bindValue:f}):S.jsxs(S.Fragment,{children:[S.jsx(Fe,{...o,bindValue:f,placeholder:t,onBlur:v,onChange:N,onKeyDown:W,shapeIcon:"calendar",onShapeIconClick:C,ref:p,inputRef:a,isEditable:n,size:10,maxLength:o.maxLength?o.maxLength:10}),l&&S.jsx(_r,{children:S.jsx(jv,{disabledDateRanges:i,onDateChange:E,initialValue:Oc(h)&&h||"",targetRef:g})})]})})},Nc=({elements:e,isEditable:t=!1,displayMode:r="Both",onChange:i,color:n,backgroundColor:s,isDraggable:o=!1})=>{const[a,l]=z.useState(null),c={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},h=d=>{i?.(e.filter((p,g)=>g!==d))},u=d=>{l(d)},f=d=>{if(a===null||a===d)return;const p=[...e],[g]=p.splice(a,1);p.splice(d,0,g),i?.(p),l(null)};return S.jsx("div",{className:c.container,role:"list","data-component":"chip",children:e.flatMap((d,p)=>{const g=ns(d.bindValue,d.optionalDisplayValue,r),y=S.jsxs("div",{className:c.element,role:"listitem",draggable:o,onDragStart:()=>u(p),onDragOver:b=>o&&b.preventDefault(),onDrop:()=>o&&f(p),style:{"--smp-chips-backgroundColor-base":s},children:[o&&S.jsx(Ot,{icon:"drag_indicator_horizontal",isInteractable:!0}),S.jsx(Ge,{variant:"label",bindValue:g,color:n}),t&&S.jsx(Ot,{icon:"close",isInteractable:!0,onClick:()=>h(p),color:n})]},`chip-${p}`),x=o&&p<e.length-1?S.jsx(Ot,{icon:"chevron-right",color:n},`separator-${p}`):null;return[y,x].filter(Boolean)})})},zv=({elements:e,displayMode:t,minimumChars:r,listDisplayMode:i,isEditable:n=!0,placeholder:s,label:o,disabled:a,fun:l,error:c,onOptionsRequest:h,onChange:u,onBlur:f,autocomplete:d=!0,...p})=>{const g=e.map(b=>b.bindValue),y=(b,w)=>{const C=[...e];if(b=="")C.pop();else{const v=C.findIndex(E=>E.bindValue===b&&E.optionalDisplayValue===w);v>=0?C.splice(v,1):C.push({bindValue:b,optionalDisplayValue:w})}u?.(C)},x={container:"smp-multipleAutocomplete-container"};return S.jsxs("div",{className:x.container,"data-component":"multiple-autocomplete",children:[o&&S.jsx(Ar,{label:o,disabled:a,helper:p.helper}),S.jsx(Nc,{elements:e,displayMode:t,isEditable:n,onChange:b=>{u?.(b)}}),d&&S.jsx(Rc,{...p,bindValue:"",fun:l,isEditable:n,onChange:y,_changeOnEnter:!0,listDisplayMode:i,minimumChars:r,placeholder:s,onOptionsRequest:h,_multiActiveIndex:g,error:c,onBlur:f})]})},qd=({...e})=>{const[t,r]=z.useState(!1),i=t?"visibility-off":"visibility";return S.jsx(Fe,{...e,inputType:t?"text":"password",shapeIcon:i,onShapeIconClick:()=>r(!t),ariaLabel:"password","data-component":"password"})},Wv=({...e})=>{const[t,r]=z.useState(e.bindValue),{translate:i}=gr(),n=o=>{o.key==="Enter"&&(o.preventDefault(),e.onEnter?.(t))},s=o=>{r(o),e.onChange?.(o)};return S.jsx(Fe,{...e,placeholder:e.placeholder?e.placeholder:i(lr.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:t,onChange:s,onKeyDown:n,ariaLabel:"search bar",_dataComponent:"search-bar"})};class Kr{class;value;constructor(t,r){this.class=t,this.value=r}static fromDataObj(t){return new Kr(t,t.k==""?[]:t.k.split(";"))}static fromString(t){return new Kr({t:"",p:""},t.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const Nr=(e,t,r)=>({obj:{t:e.obj.t,p:e.obj.p,k:t},decode:r??e.decode,shape:e.shape,fun:e.fun,data:e.data}),qv=e=>{const t=Kr.fromDataObj(e.obj),r=e.decode?Kr.fromString(e.decode).getValue():[];return t.getValue().map((i,n)=>({bindValue:i,optionalDisplayValue:r.length>=n?r[n]:""}))},Hv=(e,t)=>{const r=new Kr(e.obj,t.map(n=>n.bindValue)).getLegacyValue(),i=new Kr(e.obj,t.map(n=>n.optionalDisplayValue?n.optionalDisplayValue:"")).getLegacyValue();return Nr(e,r,i)},Hd=({min:e,max:t,step:r=1,inputMode:i="decimal",dSep:n,bindValue:s,onChange:o,onEnter:a,isOptimized:l,...c})=>{const{getCurrentLanguage:h}=gr(),u=z.useRef(null),f=h(),{groupingChar:d,decimalChar:p}=z.useMemo(()=>Lv(f,n),[f,n]),g=z.useCallback((R,B)=>new Intl.NumberFormat(f,{minimumFractionDigits:B,maximumFractionDigits:B,useGrouping:!0}).format(R),[f]),y=z.useCallback($v,[d,p]),x=z.useCallback(Ev,[e,t]),b=s!=null&&s.toString().includes(".")?s.toString().split(".")[1].length:0,[w,C]=z.useState(b),[v,E]=z.useState(s!=null?g(s,w):""),T=z.useRef(s??null);z.useEffect(()=>{if(s==null){E(""),T.current=null;return}const R=s.toString().includes(".")?s.toString().split(".")[1].length:0,B=R===0?w:R;B!==w&&C(B),E(g(s,B)),T.current=s},[s,g]);const N=z.useCallback((R,B=!1)=>{if(R.trim()===""){E(""),T.current=null,o?.(void 0,""),B&&a?.(void 0);return}const O=y(R,d,p);if(isNaN(O))if(T.current!=null){const $=g(T.current,w);E($)}else E("");else{const $=x(O,e,t),q=Mv(R,d,p);C(q);const A=g($,q);E(A),T.current=$,o?.($,A),B&&a?.($)}},[y,d,p,x,e,t,g,o,a,w]),W=R=>E(R),I=()=>N(v),k=R=>{if(R.key==="Enter"){R.preventDefault(),N(v,!0);return}if(R.key==="ArrowUp"||R.key==="ArrowDown"){R.preventDefault();const B=R.key==="ArrowUp"?1:-1,O=T.current??0,$=x(O+B*r,e,t);N(g($,w))}},L=R=>{if(!R.currentTarget.contains(document.activeElement))return;R.preventDefault();const B=R.deltaY<0?1:-1,O=T.current??0,$=x(O+B*r,e,t);N(g($,w))};return S.jsx("div",{ref:u,"data-component":"input-number",onWheel:L,children:l?S.jsx(Fc,{bindValue:v,className:`smp-text-number${T.current!=null&&T.current<0?" smp-text-negative":""}`}):S.jsx(Fe,{...c,"aria-valuemin":e,"aria-valuemax":t,"aria-valuenow":T.current??void 0,bindValue:v,inputType:"text",inputMode:i,min:e,max:t,step:r,onChange:W,onBlur:I,onKeyDown:k})})};class Wn{class;value;decimalSeparator;constructor(t,r,i="."){this.class=t,this.value=r,this.decimalSeparator=i}static fromDataObj(t,r){const i=r==="."?",":".";if(t.k==="")return new Wn(t,void 0,r);let n=t.k.trim();const s=n.endsWith("-");s&&(n=n.slice(0,-1));const a=n.replace(new RegExp(`\\${i}`,"g"),"").replace(r,"."),l=parseFloat(a),c=s?-l:l;return new Wn(t,c,r)}getLegacyValue(){return this.value!=null?this.value.toString().replace(".",this.decimalSeparator):""}getValue(){return this.value}}const Ud=({disabled:e,bindValue:t,onChange:r,placeholder:i,state:n,appearance:s,isEditable:o,inputRef:a,label:l,ariaLabel:c,helperText:h,style:u,error:f,onBlur:d,onKeyDown:p,rows:g=10,cols:y=35,...x})=>{const b=z.useId(),w=`${b}-helper`,C=f?"danger":n,v=h||!!f,E=N=>{r?.(N.target.value)},T={wrapper:"smp-textarea-wrapper",container:`smp-textarea ${e?"smp-textarea-disabled":""} ${i?"smp-textarea-placeholder":""} ${C?`smp-textarea-${C}`:""} ${s?`smp-textarea-${s}`:""} ${o?"":"smp-textarea-readOnly"}`};return S.jsxs("div",{className:T.wrapper,"data-component":"textarea",children:[l&&S.jsx(Ar,{htmlFor:b,label:l,disabled:e,helper:x.helper}),S.jsx("textarea",{id:b,value:t,placeholder:i,onChange:E,onBlur:d,className:T.container,disabled:e,readOnly:!o,onKeyDown:p,style:u,"aria-label":l?void 0:c,"aria-labelledby":l?b:void 0,"aria-describedby":v?w:void 0,rows:g,cols:y,ref:a}),v&&S.jsx(Mc,{id:w,helperText:f,disabled:e,state:C})]})};var Cl=(e=>(e.PAGE_DIRECTION="pageDirection",e.LINE_DIRECTION="lineDirection",e))(Cl||{});const yi={"smp-radio":"_smp-radio_1fqe8_1","smp-radio-options-container":"_smp-radio-options-container_1fqe8_10","smp-radio-horizontal":"_smp-radio-horizontal_1fqe8_16","smp-radio-element":"_smp-radio-element_1fqe8_20","smp-radio-disabled":"_smp-radio-disabled_1fqe8_26","smp-radio-horizontal-grid":"_smp-radio-horizontal-grid_1fqe8_32"},Uv=({disabled:e=!1,displayMode:t="DescOnly",RadLay:r=Cl.PAGE_DIRECTION,RadCol:i,options:n,onOptionsRequest:s,fun:o,label:a,...l})=>{const[c,h]=z.useState(n),u=z.useId();z.useEffect(()=>{!c&&s&&o&&s(o,void 0).then(v=>h(Vi(v))).catch(v=>{console.error("Error during loading options (radio)",v)})},[c,s,o]);const f=parseInt(i??"",10),d=r===Cl.LINE_DIRECTION,p=d&&!isNaN(f),g=p?yi["smp-radio-horizontal-grid"]:d?yi["smp-radio-horizontal"]:"",y=p?{gridTemplateColumns:`repeat(${f}, 1fr)`}:void 0,x={container:yi["smp-radio"],optionsContainer:`${yi["smp-radio-options-container"]} ${g}`,option:`${yi["smp-radio-element"]} ${e?yi["smp-radio-disabled"]:""}`},b=()=>{e||l.onBlur?.()},w=v=>{e||l.onChange?.(v.obj.k,v.decode)},C=z.useId();return S.jsxs("div",{"smp-id":"radio-container",className:x.container,id:u,children:[a&&S.jsx(Ar,{label:a,disabled:e,htmlFor:u,helper:l.helper}),S.jsx("div",{className:x.optionsContainer,style:y,children:c?.map((v,E)=>S.jsxs("label",{className:x.option,children:[S.jsx("input",{type:"radio",name:C,value:v.obj.k,disabled:e,checked:v.obj.k===l.bindValue,onChange:()=>w(v),onBlur:b}),S.jsx(Ge,{variant:"body",bindValue:ns(v.obj.k,v.decode,t)})]},E))})]})},Yv=({value:e,onChange:t,targetRef:r,isOpen:i})=>{const n=z.useRef(null);z.useEffect(()=>{i&&n?.current&&n.current.focus()},[i,n]);const[s,o,a]=e,l=c=>Array.from({length:c},(h,u)=>S.jsx("option",{value:u,children:u.toString().padStart(2,"0")},u));return S.jsxs("div",{className:"smp-timepicker-widget",ref:r,children:[S.jsx("select",{value:s,ref:n,onChange:c=>t(+c.target.value,o,a),id:"time-picker-hours",children:l(24)}),":",S.jsx("select",{value:o,onChange:c=>t(s,+c.target.value,a),id:"time-picker-minutes",children:l(60)}),":",S.jsx("select",{value:a||0,onChange:c=>t(s,o,+c.target.value),id:"time-picker-seconds",children:l(60)})]})},Gu=e=>{const t=e.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);if(!t)return!1;const[,r,i,n]=t,s=parseInt(r,10),o=parseInt(i,10),a=n?parseInt(n,10):0;return s>=0&&s<=23&&o>=0&&o<=59&&(n===void 0||a>=0&&a<=59)},Vv=e=>{const t=e.split(":").map(r=>parseInt(r,10));return[t[0]||0,t[1]||0,t[2]||0]},Gv=(e,t,r)=>{const i=e!=null&&!isNaN(e)?e.toString().padStart(2,"0"):"",n=t!=null&&!isNaN(t)?t.toString().padStart(2,"0"):"",s=r!=null&&!isNaN(r)?r.toString().padStart(2,"0"):"";return i&&n?`${i}:${n}:${s}`:n?`${n}:${s}`:s},Xv=({bindValue:e,placeholder:t="HH:MM:SS",onChange:r,isEditable:i=!0,...n})=>{const s=z.useRef(null),[o,a]=z.useState(!1),[l,c]=z.useState(e||""),[h,u]=z.useState(""),{anchorRef:f,targetRef:d}=Sr({position:"bottom",open:o}),p=z.useCallback(()=>{a(!1),s?.current?.focus()},[]);ss([d,f],o,()=>a(!1)),Dc(o,d),z.useEffect(()=>{const v=e||"",E=Gu(v)?v:e||"";c(v),u(E)},[e]),z.useEffect(()=>{const v=E=>{E.key==="Escape"&&a(!1)};return o&&document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v)}},[o]);const g=()=>{i&&a(v=>!v)},y=v=>{u(v)},x=(v,E,T)=>{const N=Gv(v,E,T);c(N),u(N),r?.(N),p()},b=()=>{C(h)},w=v=>{v.key==="Enter"&&(v.preventDefault(),C(h))},C=v=>{if(v.trim()===""){c(""),u(""),r?.("");return}Gu(v)?(c(v),u(v),r?.(v)):u(v)};return S.jsxs("div",{"data-component":"time-picker",children:[S.jsx(Fe,{...n,bindValue:h,placeholder:t,onChange:y,onBlur:b,onKeyDown:w,shapeIcon:"clock",onShapeIconClick:g,isEditable:i,ref:f,inputRef:s}),o&&S.jsx(_r,{children:S.jsx(Yv,{value:Vv(l),onChange:x,targetRef:d,isOpen:o})})]})};function Kv(e){return typeof e=="string"&&/^\d{6}$/.test(e)}class ca{class;time;constructor(t,r){this.class=t,this.time=r}static fromDataObj(t){const r=Xu.get(`${t.t}${t.p}`);if(r)return new ca(t,r.legacyToIso(t.k));throw new Error(`time creation from ${t.t}${t.p} not implemented yet`)}getLegacyValue(){const t=Xu.get(`${this.class.t}${this.class.p}`);if(t)return t.isoToLegacy(this.time);throw new Error(`Time object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.time}}const Xu=new Map([["I12",{legacyToIso(e){return Kv(e)&&`${e.substring(0,2)}:${e.substring(2,4)}:${e.substring(4,6)}`||e},isoToLegacy(e){return e.replaceAll(":","")||e}}]]),Zv={"smp-cell-wrapper":"_smp-cell-wrapper_mdlkz_1"},Nt=e=>e==null?!1:typeof e=="string"?e.toLocaleLowerCase()=="yes"||e.toLocaleLowerCase()=="true":e,Yd=({bindValue:e,disabled:t=!1,label:r,displayMode:i="DescOnly",BtoVer:n="false",options:s,onOptionsRequest:o,fun:a,helper:l,...c})=>{const[h,u]=z.useState(s),f=z.useId(),d=g=>{t||c.onChange?.(g.obj.k,g.decode)};z.useEffect(()=>{!h&&o&&a&&o(a,void 0).then(g=>u(Vi(g))).catch(g=>{console.error("Error during loading options (button group)",g)})},[h,o,a]);const p={container:`smp-button-group-container ${Nt(n)?"smp-button-group-vertical":""}`,optionsContainer:`smp-button-group-options-container ${Nt(n)?"smp-button-group-vertical":""}`};return S.jsxs("div",{"smp-id":"buttonGroup-container",className:p.container,id:f,children:[r&&S.jsx(Ar,{label:r,disabled:t,htmlFor:f,helper:l}),S.jsx("div",{className:p.optionsContainer,children:h?.map(g=>S.jsx(Qt,{appearance:"raised",variant:"base",active:e===g.obj.k,onClick:()=>d(g),bindValue:g.obj.k,optionalDisplayValue:ns(g.obj.k,g.decode,i),disabled:t,justify:Nt(n)?"start":"center",icon:g.icon,buttonExt:`oneButton-${Nt(n)?"vertical":"horizontal"}`},g.obj.k))})]})};function vi(e){return!!e&&"children"in e}function Ts(e){return!vi(e)}const ze={"smp-row":"_smp-row_qr95z_2","smp-row-data":"_smp-row-data_qr95z_15","smp-row-selected":"_smp-row-selected_qr95z_26","smp-row-clickable":"_smp-row-clickable_qr95z_36","smp-row-indent":"_smp-row-indent_qr95z_41","smp-row-toggle":"_smp-row-toggle_qr95z_47","smp-row-icon":"_smp-row-icon_qr95z_52","smp-row-wrapperCell":"_smp-row-wrapperCell_qr95z_58","smp-row-leftSection":"_smp-row-leftSection_qr95z_65","smp-row-node-label":"_smp-row-node-label_qr95z_73"},Pc=({row:e,columns:t,columnWidths:r={},level:i=0,rowHeight:n=26,offsetTop:s,enableSelection:o,isSelected:a=!1,onToggleSelect:l,onRowClick:c,onNodeClick:h,onContextMenu:u})=>{const[f,d]=z.useState(vi(e)),p=vi(e)&&!!e.children?.length,g=e.cells&&Object.keys(e.cells).length>0,y=p,x=i*16,b=()=>{p&&d(!f)},w={content:`${ze["smp-row"]} ${Ts(e)?ze["smp-row-data"]:""} ${vi(e)?ze["smp-row-clickable"]:""} ${a?ze["smp-row-selected"]:""}`,toggle:`${ze["smp-row-toggle"]} ${ze["smp-row-icon"]}`,indent:`${ze["smp-row-indent"]}`,cell:`${ze["smp-row-wrapperCell"]}`,leftSection:`${ze["smp-row-leftSection"]}`,nodeLabel:ze["smp-row-node-label"]},C=k=>{let L=k.shape;return k.shape==="ACP"||k.shape==="CMB"||k.shape==="ITX"?L="LBL":k.shape==="AML"&&(L="CHI"),S.jsx(Vr,{...k,shape:L,onContextMenu:u,data:{...k.data,isOptimized:!0}})},v=()=>S.jsx("span",{className:w.toggle,children:y&&S.jsx(Ot,{icon:f?"arrow_drop_right":"arrow_drop_down",width:16})}),E=(k,L)=>S.jsx("span",{className:w.toggle,children:S.jsx(Ot,{icon:k,placeholderIcon:L,width:16})}),T=()=>S.jsx("span",{className:w.indent,style:{width:`${x}px`},"aria-hidden":"true"}),N=()=>{if(l)return S.jsx(Ha,{bindValue:a,onChange:()=>{l()}})},W=()=>{const k=Ts(e)?"":e.decode||(g?"":"Untitled"),L=s??n*i,R={height:`${n}px`,lineHeight:`calc(${n}px - 2*2px)`,...Ts(e)&&{transform:`translateY(${L}px)`}};return S.jsxs("tr",{className:w.content,onClick:b,role:vi(e)?"button":"row","aria-expanded":p?!f:void 0,style:R,children:[o&&S.jsx("td",{className:w.cell,style:{height:`${n}px`,minWidth:40,justifyContent:"center"},children:N()}),vi(e)&&S.jsxs("td",{className:w.leftSection,style:{height:`${n}px`},onClick:()=>h?.(e),children:[T(),v(),e.icon&&E(e.icon,e.placeholderIcon),S.jsx("span",{className:w.nodeLabel,children:k})]}),t&&t.length>0?t.filter(B=>B.visible!==!1).map((B,O)=>{const $=e.cells?.[B.name];return $?S.jsx("td",{className:w.cell,onClick:()=>{c?.(e,B.name)},style:{width:r[B.name],minWidth:r[B.name],height:`${n}px`},children:C({...$,id:B.name})},B.name+O):null}):e.cells&&Object.entries(e.cells).map(([B,O])=>{const $=e.cells?.[B];return $?S.jsx("td",{className:w.cell,style:{height:`${n}px`},children:C({...$,id:B})},B+O):null})]})},I=()=>f||!p||Ts(e)?null:S.jsx(S.Fragment,{children:e.children?.map((k,L)=>S.jsx(Pc,{row:k,level:i+1,columns:t,columnWidths:r,onNodeClick:()=>h?.(k),onContextMenu:u},`child-${L}`))});return S.jsxs(S.Fragment,{children:[W(),I()]})},Qv={"smp-tree":"_smp-tree_19u9h_1"},Jv=({fun:e,onOptionsRequest:t,onClick:r})=>{const[i,n]=z.useState(void 0);z.useEffect(()=>{!i&&t&&e&&t(e,void 0).then(o=>n(Vi(o))).catch(o=>{console.error("Errore nel caricamento delle opzioni per il Tree",o)})},[i,e,t]);const s={table:Qv["smp-tree"]};return i&&i.length&&S.jsx("table",{className:s.table,children:S.jsx("tbody",{children:i.map((o,a)=>S.jsx(Pc,{row:o,onNodeClick:r},a))})})},Vr=({id:e,decode:t,shape:r,obj:i,data:n,icon:s,fun:o,placeholderIcon:a,label:l,helper:c,tooltip:h,options:u,inputSettings:f,style:d,onChange:p,onClick:g,onEnter:y,onBlur:x,onOptionsRequest:b,onContextMenu:w,isEditable:C,dSep:v=".",value:E})=>{const T={obj:{...i,k:f?.forceUppercase?i.k.toLocaleUpperCase():i.k},shape:r,decode:t,icon:s,fun:o,data:n,style:d},N=()=>Id(T.obj)?"INR":yl(T.obj)?"CAL":r,W=T.data&&T.data.size&&T.data.size>=256&&(N()==="ITX"||!N())?"MEM":N(),I=t||E,k={id:e,onBlur:x,onOptionsRequest:b,fun:o,icon:s,placeholderIcon:a,tooltip:h,label:l,helper:c,isEditable:C,style:d,size:T.data&&T.data.size?T.data.size:20,isOptimized:T.data?.isOptimized,...n},L=(A,D,_)=>yl(i)?Nr(A,new na(i,D).getLegacyValue()):H1(i)?Nr(A,new ca(i,D).getLegacyValue()):f?.forceUppercase?Nr(A,D.toLocaleUpperCase(),_):Nr(A,D,_),R=(A,D)=>Nr(A,new Wn(i,D,v).getLegacyValue()),B=A=>Nr(T,new ia(i,A).getLegacyValue()),O=A=>Hv(T,A),$=()=>{switch(W){case kt.AUTOCOMPLETE:{const A={...k,bindValue:T.obj.k,optionalDisplayValue:I,onChange:(D,_)=>{p?.(L(T,D,_))}};return S.jsx(Rc,{...A})}case kt.BUTTON:{const A=n?.label&&typeof n.label=="string"?n.label:void 0,D={...k,bindValue:A||"",showText:!!A,onClick:()=>{g?.(L(T,i.k))}};return S.jsx(Qt,{...D})}case kt.BUTTON_LIST:{const A={...k,options:u,onClick:(D,_)=>{const M={...T,fun:_};g?.(L(M,D))}};return S.jsx(Wd,{...A})}case kt.CHECKBOX:case kt.SWITCH:{const A=r===kt.SWITCH,D={...k,bindValue:ia.fromDataObj(i).getValue(),optionalDisplayValue:I,onChange:_=>{p?.(B(_))},...A&&{variant:"switch"}};return S.jsx(Ha,{...D})}case kt.COMBOBOX:{const A={...k,bindValue:T.obj.k,optionalDisplayValue:I,onChange:(D,_)=>{p?.(L(T,D,_))}};return S.jsx(la,{...A})}case kt.DATE:{const A={...k,bindValue:na.fromDataObj(i).getValue(),onChange:D=>{p?.(L(T,D))}};return S.jsx(Ic,{...A})}case kt.ICON:case kt.IMAGE:{const A={...k,icon:s,isInteractable:!!k.fun,onClick:()=>{g?.(L(T,i.k))}};return S.jsx(Ot,{...A})}case kt.INPUT_NUMBER:{const A={...k,bindValue:Wn.fromDataObj(i,v).getValue(),onChange:D=>{p?.(R(T,D))}};return S.jsx(Hd,{...A})}case kt.EDITOR:case kt.MEMO:{const A={...k,bindValue:i.k,optionalDisplayValue:I,onChange:D=>{p?.(L(T,D))}};return S.jsx(Ud,{...A})}case kt.CHIP:case kt.MULTI_AUTOCOMPLETE:{const A=r===kt.CHIP,D={...k,elements:qv(T),onChange:_=>{p?.(O(_))},...A&&!C&&{autocomplete:!1}};return S.jsx(zv,{...D})}case kt.MULTI_CONFIG:{const A={...k,bindValue:l||"",showText:!!l,icon:s??"list",onClick:()=>{g?.(L(T,i.k))}};return S.jsx(Qt,{...A})}case kt.PASSWORD:{const A={...k,bindValue:T.obj.k,onChange:D=>{p?.(L(T,D))}};return S.jsx(qd,{...A})}case kt.RADIO:{const A={...k,bindValue:i.k,onChange:(D,_)=>{p?.(L(T,D,_))}};return S.jsx(Uv,{...A})}case kt.SPOTLIGHT:{const A={...k,bindValue:T.obj.k,onEnter:D=>{y?.(L(T,D))},onChange:(D,_)=>{p?.(L(T,D,_))}};return S.jsx(Wv,{...A})}case kt.TEXT_FIELD:{const A={...k,bindValue:T.obj.k,optionalDisplayValue:I,onChange:D=>{p?.(L(T,D))}};return S.jsx(Fe,{...A})}case kt.BUTTON_GROUP:{const A={...k,bindValue:i.k,onChange:(D,_)=>{p?.(L(T,D,_))}};return S.jsx(Yd,{...A})}case kt.TIME:{const A={...k,bindValue:ca.fromDataObj(i).getValue(),onChange:D=>{p?.(L(T,D))}};return S.jsx(Xv,{...A})}case kt.TREE:{const A={...k,onClick:D=>{g?.(D)}};return S.jsx(Jv,{...A})}default:{const A={...k,bindValue:T.obj.k,optionalDisplayValue:I};return S.jsx(Fc,{...A})}}},q={wrapper:`${Zv["smp-cell-wrapper"]}`};return S.jsx("span",{className:q.wrapper,onContextMenu:A=>{w&&h&&(A.preventDefault(),w(T,A.currentTarget))},children:$()})},tw=({data:e,onClick:t,onEnter:r,onContextMenu:i})=>{const[n,s]=z.useState(),o=z.useCallback(a=>{if(!a.rows?.length||!a.columns?.length)return{};const l=a.rows[0];return a.columns.filter(c=>c.visible).reduce((c,h)=>{const u=l.cells[h.name],f={...u,id:h.name,onChange:d=>{s(p=>p&&{...p,[h.name]:{...p[h.name],obj:{...p[h.name].obj,k:d.obj.k}}})},onClick:()=>{u.fun&&t&&t({...u})},onEnter:d=>{r&&r(d)},onContextMenu:(d,p)=>{i&&i(d,p)}};return{...c,[h.name]:f}},{})},[t,r,i]);return z.useEffect(()=>{e&&s(o(e))},[e,o]),!e?.rows?.length||!e.columns?.length?null:n&&S.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:S.jsx(ra,{layout:e.rows[0].layout,children:Object.values(n).map(a=>S.jsx(Vr,{...a}))})})},ew=({ColumnsNumber:e=1,data:t={},ForceText:r,TextColName:i,TextColor:n="var(--smp-dashList-color-base)",Fillspace:s,FontSize:o,Horizontal:a,ForceIcon:l,IconColName:c,IconColor:h="var(--smp-dashList-color-base)",NumberFormat:u,ForceUM:f,UmColName:d,UmColor:p="var(--smp-dashList-color-base)",ForceValue:g,ValueColName:y,ValueColor:x="var(--smp-dashList-color-base)",SelectLayout:b="1",onClick:w})=>{const C="N/A",v=t?.columns||[],E=t?.rows||[],T=E.length>0,N="--smp-dashList-color",W="smp-layout",I="descr",k="icon",L="um",R="value",B=o||"1em",O="18px",$="--smp-dashList-columns",q="--smp-dashList-fontSize",A={dash:(rt="1")=>{const yt=_(rt),tt=yt,pt=M(yt,I),Tt=M(yt,k),It=M(yt,L),Lt=M(yt,R);return{container:tt,descr:pt,icon:Tt,um:It,value:Lt}},dashList:`smp-dash-list ${Nt(s)?"smp-dash-list-fill-space":""}
50
- ${Nt(a)?"smp-dash-list-horizontal":""}`},{format:D}=gr(),_=rt=>`${W}-${rt}`,M=(rt,yt)=>`${rt}__${yt}`,H=rt=>`${N}-${rt}`,P=rt=>{const yt=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(yt.test(rt)){const pt=rt.match(yt)||[];if(pt?.length>3)return"rgb("+pt[1]+","+pt[2]+","+pt[3]+")"}return rt},U=rt=>{if(!u)return rt;const[yt,tt]=Y(u).map(de=>parseInt(de||"0")),pt="0,0"+(tt?"."+"0".repeat(tt):""),Tt=D(rt,pt,"it");if(!yt)return Tt;const[It,Lt]=Tt.split(",");return It+(Lt?`,${Lt}`:"")},Y=rt=>rt.includes(";")?rt.split(";"):[rt],K=rt=>{const yt=pt=>{if(pt)return rt?.cells[pt]?.obj.k},tt=pt=>{if(!(v.length<=pt))return rt?.cells[v[pt].name]?.obj?.k};return{descr:r||yt(i)||tt(2)||"",icon:l||yt(c)||tt(3)||"",um:f||yt(d)||tt(1)||"",value:g||yt(y)||tt(0)||""}},Z=rt=>{w?.(rt)},Q=(rt,yt)=>{(rt.key==="Enter"||rt.key===" ")&&(rt.preventDefault(),rt.stopPropagation(),Z(yt))},et=(rt=>{const yt=A.dash(rt);return{className:yt,descr:tt=>S.jsx("div",{className:yt.descr,children:tt},`${rt}-${I}`),icon:tt=>S.jsx("div",{className:yt.icon,children:S.jsx(Ot,{color:h,height:O,icon:tt,width:O})},`${rt}-${k}`),um:tt=>S.jsx("div",{className:yt.um,children:tt},`${rt}-${L}`),value:tt=>S.jsx("div",{className:yt.value,children:tt},`${rt}-${R}`)}})(b),wt=rt=>{const{descr:yt,icon:tt,um:pt,value:Tt}=K(rt),It={[H(I)]:P(n),[H(L)]:P(p),[H(R)]:P(x)},Lt=[],de=U(Tt);switch(b){case"2":tt&&Lt.push(et.icon(tt)),Lt.push(et.descr(yt)),Lt.push(et.value(pt?de+" "+pt:de));break;default:case"1":Lt.push(et.descr(yt)),Lt.push(et.value(pt?de+" "+pt:de))}return S.jsx("div",{className:et.className.container,role:"button",style:It,tabIndex:0,onClick:()=>Z(rt),onKeyDown:hi=>Q(hi,rt),children:Lt},rt.rowId)},G={[$]:String(e),[q]:B};return S.jsx("div",{className:A.dashList,style:G,children:T?E.map(rt=>wt(rt)):C})},Vd={"smp-table":"_smp-table_v715o_1"};function rw(e,t){const r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function iw(e,t){return e.map(r=>{const i=t.find(n=>n.column===r.bindValue);return{column:r.bindValue,visible:i?.visible??!0}})}function nw(e,t,r,i){const n=[];let s=0;return o(e,0,[]),{flatRows:n,offset:s};function o(u,f,d){if(f>=t.length){h(u);return}const p=t[f].column,g=a(u,p);for(const[y,x]of g){const b=[...d,y],w=l(b,f),C=i.has(w);n.push(c(y,w,f,C)),s+=r,C&&o(x,f+1,b)}}function a(u,f){const d=new Map;for(const p of u){const g=(p.cells[f]?.decode||p.cells[f]?.value)??"N/D";d.has(g)||d.set(g,[]),d.get(g).push(p)}return d}function l(u,f){return`group-${u.join("-")}-${f}`}function c(u,f,d,p){return{isGroup:!0,value:u,cells:{},id:f,level:d,isExpanded:p}}function h(u){for(const f of u)n.push(f),s+=r}}const sw=({columns:e,rows:t,containerRef:r,sizingMode:i})=>{const[n,s]=z.useState({}),o=3,a=7;return z.useEffect(()=>{if(!(!e||e.length===0)){if(i==="fixed"){const c=Object.fromEntries(e.map(h=>[h.name,120]));s(c)}else if(i==="fit-grid"){const l=r.current?.offsetWidth||800,c=e.filter(f=>f.visible!==!1),h=l/c.length,u=Object.fromEntries(c.map(f=>[f.name,h]));s(u)}else if(i==="fit-content"){const l={},c=[...t].sort(()=>.5-Math.random()).slice(0,100),h=t.slice(0,100).concat(c);for(const u of e){if(!u.visible)continue;const f=u.title?.length+o*2||0,d=Math.max(f,...h.map(p=>{const g=p.cells?.[u.name];return`${g?.decode??g?.value??""}`.length}));l[u.name]=d*a+24}s(l)}}},[e,t,r,i]),[n,s]};function aw(e,t){return e.map(r=>{const i=t?.[r.name],n=ow(r);return{obj:{t:"",p:"",k:r.name},decode:r.title,shape:void 0,type:i??n}})}function ow(e){return e.obj&&Id(e.obj)?"number":e.obj&&yl(e.obj)?"date":"string"}function Ku(e,t){return e?typeof e=="object"&&"logic"in e&&"filters"in e?e:typeof e=="string"?lw(e,t):{logic:"and",filters:[]}:{logic:"and",filters:[]}}function lw(e,t){const r=e.split("|").map(n=>n.trim()).filter(Boolean),i=[];for(const n of r){const s=cw(n,t);s&&i.push(s)}return{logic:"and",filters:i}}function cw(e,t){if(!e.trim())return null;if(e.includes(";OR;")){const i=e.split(";OR;").map(l=>l.trim()).filter(Boolean);if(i.length===0)return null;const n=Wo(i[0],t);if(!n)return null;const s=n.field,o=n.columnsType,a=i.slice(1).map(l=>Wo(l,t,s?.obj?.k,o)).filter(l=>l!==null);return{logic:"or",filters:[n,...a]}}else{const i=Wo(e,t);return i?{logic:"and",filters:[i]}:null}}function Wo(e,t,r,i){const n=e.split(";").map(u=>u.trim());let s,o,a;if(n.length===3)[s,o,a]=n;else if(n.length===2&&r&&i)[o,a]=n,s=r;else return null;const l=t.find(u=>u?.obj?.k===s)??(r&&i?{obj:{t:"",p:"",k:r},decode:r,type:i,shape:void 0}:void 0);if(!l)throw new Error(`Campo '${s}' non trovato nei FieldOption.`);const c={...Ps,obj:{t:"",p:"",k:o}},h=hw(a,l.type);return{field:l,columnsType:l.type,operator:c,value:h}}function hw(e,t){switch(t){case"number":return Number(e);case"date":return new Date(e);default:return e}}function uw(e,t){return!t||"filters"in t&&t.filters.length===0?e:e.filter(r=>Gd(t,r))}function Gd(e,t){if("filters"in e){const{logic:r,filters:i}=e;if(i.length===0)return!0;const n=i.map(s=>Gd(s,t));return r==="and"?n.every(Boolean):n.some(Boolean)}return fw(e,t)}function fw(e,t){const{field:r,operator:i,value:n,columnsType:s}=e,o=t.cells?.[r?.obj?.k],a=dw(o);if(a==null)return!1;switch(s){case"string":return pw(a,i.obj.k,n);case"number":return gw(a,i.obj.k,n);case"date":return mw(a,i.obj.k,n);default:return!1}}function dw(e){if(e==null||typeof e!="object")return e;if("value"in e)return e.value;if("decode"in e)return e.decode}function pw(e,t,r){const i=String(e).toLowerCase(),n=String(r).toLowerCase();switch(t.toLowerCase()){case"contains":return i.includes(n);case"starts":return i.startsWith(n);case"eq":return i===n;case"neq":return i!==n;default:return!1}}function gw(e,t,r){const i=Number(e),n=Number(r);if(isNaN(i)||isNaN(n))return!1;switch(t.toLowerCase()){case"eq":return i===n;case"neq":return i!==n;case"gt":return i>n;case"lt":return i<n;case"gte":return i>=n;case"lte":return i<=n;default:return!1}}function mw(e,t,r){const i=new Date(e),n=new Date(r);if(isNaN(i.getTime())||isNaN(n.getTime()))return!1;switch(t.toLowerCase()){case"eq":case"on":return i.toDateString()===n.toDateString();case"after":return i>n;case"before":return i<n;case"onorafter":return i>=n;case"onorbefore":return i<=n;default:return!1}}const yw=(e,t)=>{const r=i=>i.filters.some(n=>"filters"in n?r(n):n.field?.obj?.k===e&&n.operator&&n.value!=="");return r(t)},xw=e=>{const t=r=>r.filters.reduce((i,n)=>"filters"in n?i+t(n):i+1,0);return t(e)};function bw(e,t){const r=z.useRef(null),i=z.useCallback(o=>{r.current=o},[]),n=z.useCallback(o=>{o.preventDefault(),o.dataTransfer.dropEffect="move"},[]),s=z.useCallback(o=>{const a=r.current;if(!a||a===o)return;const l=e.findIndex(f=>f.name===a),c=e.findIndex(f=>f.name===o);if(l===-1||c===-1)return;const h=[...e],[u]=h.splice(l,1);h.splice(c,0,u),t(h),r.current=null},[e,t]);return{handleDragStart:i,handleDragOver:n,handleDrop:s}}function Xd(e,t,r){const n=e.columns.find(o=>o.name===t)?.obj?.t,s=[...e.rows].sort((o,a)=>{const l=o.cells[t]?.obj?.k,c=a.cells[t]?.obj?.k;if(l==null&&c!=null)return r==="asc"?1:-1;if(l!=null&&c==null)return r==="asc"?-1:1;if(l==null&&c==null)return 0;switch(n){case"NR":{const h=Number(l),u=Number(c);return r==="asc"?h-u:u-h}case"DATE":{const h=new Date(l),u=new Date(c);return r==="asc"?h.getTime()-u.getTime():u.getTime()-h.getTime()}default:return r==="asc"?String(l).localeCompare(String(c)):String(c).localeCompare(String(l))}});return{...e,rows:s}}function vw(e){const[t,r]=z.useState(null),[i,n]=z.useState("asc");return{sortedRows:z.useMemo(()=>t?Xd({...e,rows:e.rows},t,i).rows:e.rows,[e,t,i]),sortBy:t,sortOrder:i,handleSort:a=>{r(l=>l===a?(n(c=>c==="asc"?"desc":"asc"),a):(n("asc"),a))}}}const ww=({columns:e,columnWidths:t})=>S.jsx("tfoot",{children:S.jsx("tr",{children:e.map(r=>r.visible&&S.jsx("td",{className:Vd["smp-headerCell"],style:{width:t[r.name],minWidth:t[r.name],maxWidth:t[r.name]}},r.name))})}),Cw=({label:e,rowHeight:t=28,offsetTop:r=0,level:i=0,onClick:n,isExpanded:s})=>{const o={tr:"smp-groupRow-tr",td:"smp-groupRow-td"};return S.jsx("tr",{className:o.tr,style:{height:t,top:r,lineHeight:`${t}px`},onClick:n,children:S.jsxs("td",{className:o.td,style:{paddingLeft:10+i*20},children:[S.jsx(Ot,{icon:s?"arrow_drop_down":"arrow_drop_right",width:16}),S.jsx(Ge,{variant:"title",bindValue:e})]})})};function _w(e){return e.split("|")}function Sw(e,t){return e.columns.map(r=>({...r,visible:t.includes(r.name)}))}const _i={"smp-filter-wrapper":"_smp-filter-wrapper_1dest_1","smp-filter-group":"_smp-filter-group_1dest_10","smp-filter-row":"_smp-filter-row_1dest_18","smp-filter-list":"_smp-filter-list_1dest_24","smp-filter-toolbar":"_smp-filter-toolbar_1dest_31","smp-filter-actionButtons":"_smp-filter-actionButtons_1dest_41"},kw=({filter:e,onChange:t,onDelete:r,fieldOptions:i,hasCurrentColumn:n})=>{const{translate:s}=gr(),o={string:[{obj:{t:"",p:"",k:"st"},shape:void 0,decode:s(me.STRING_STARTS)},{obj:{t:"",p:"",k:"contains"},shape:void 0,decode:s(me.STRING_CONTAINS)},{obj:{t:"",p:"",k:"eq"},shape:void 0,decode:s(me.STRING_EQUALS)}],number:[{obj:{t:"",p:"",k:"eq"},shape:void 0,decode:s(me.NUMBER_EQUALS)},{obj:{t:"",p:"",k:"gt"},shape:void 0,decode:s(me.NUMBER_GREATER)},{obj:{t:"",p:"",k:"ge"},shape:void 0,decode:s(me.NUMBER_GREATER_OR_EQUAL)},{obj:{t:"",p:"",k:"lt"},shape:void 0,decode:s(me.NUMBER_LESS)},{obj:{t:"",p:"",k:"le"},shape:void 0,decode:s(me.NUMBER_LESS_OR_EQUAL)}],date:[{obj:{t:"",p:"",k:"before"},shape:void 0,decode:s(me.DATE_BEFORE)},{obj:{t:"",p:"",k:"after"},shape:void 0,decode:s(me.DATE_AFTER)},{obj:{t:"",p:"",k:"on"},shape:void 0,decode:s(me.DATE_ON)}]},a=f=>{const d=i.find(g=>g?.obj?.k===f);if(!d)return;const p=o[d.type]?.[0]||{obj:{t:"",p:"",k:""},decode:"",shape:void 0};t({...e,field:d,columnsType:d.type,operator:p,value:""})},l=f=>{const d=o[e.columnsType]?.find(p=>p.obj.k===f);d&&t({...e,operator:d})},c=f=>{t({...e,value:f})},h=()=>{switch(e.columnsType){case"string":return S.jsx(Fe,{bindValue:e.value,onChange:c});case"number":return S.jsx(Hd,{bindValue:e.value,onChange:c});case"date":return S.jsx(Ic,{bindValue:e.value,onChange:c})}},u={row:`${_i["smp-filter-row"]}`};return S.jsxs("div",{className:u.row,children:[!n&&S.jsx(la,{bindValue:e.field.obj.k,options:i.map(f=>({obj:{t:"",p:"",k:f?.obj?.k},decode:f.decode,shape:void 0})),onChange:a,listDisplayMode:Sn.BOTH,displayMode:Sn.CODE_ONLY,isEditable:!0}),S.jsx(la,{bindValue:e.operator?.obj?.k,options:o[e.columnsType],onChange:l,listDisplayMode:Sn.BOTH,displayMode:Sn.CODE_ONLY,isEditable:!0},e.columnsType),h(),S.jsx(Qt,{bindValue:"",showText:!1,label:"Delete",onClick:r,appearance:"ghost",variant:"base",icon:"delete"})]})},Kd=({group:e,onChange:t,onDelete:r,onClose:i,level:n=0,fieldOptions:s,hasSubGroups:o=!0,hasSubFilters:a=!0,currentColumnName:l,hasButtonGroup:c=!0})=>{const{translate:h}=gr(),u=(x,b)=>{const w=[...e.filters];w[x]=b,t({...e,filters:w})},f=x=>{const b=[...e.filters];b.splice(x,1),t({...e,filters:b})},d=()=>{const x=s[0],b={...Ps},w={field:x,columnsType:x?.type||"string",operator:b,value:""};t({...e,filters:[...e.filters,w]})},p=()=>{let x;if(l){const w=s.find(v=>v.obj.k===l),C={...Ps};x={field:w||s[0]||"",columnsType:w?.type||s[0]?.type||"string",operator:C,value:""}}else{const w={...Ps};x={field:s[0]||"",columnsType:s[0]?.type||"string",operator:w,value:""}}const b={logic:"and",filters:[x]};t({...e,filters:[...e.filters,b]})},g=x=>{t({...e,logic:x})},y={filterGroup:`${_i["smp-filter-group"]}`,filterToolbar:`${_i["smp-filter-toolbar"]}`,filterList:`${_i["smp-filter-list"]}`,actionButtons:`${_i["smp-filter-actionButtons"]}`};return S.jsxs("div",{className:y.filterGroup,style:n!=0?{marginLeft:20}:void 0,"data-component":n===0?"filter":void 0,children:[S.jsxs("div",{className:y.filterToolbar,children:[c&&S.jsx(Yd,{options:[{shape:void 0,decode:"AND",obj:{t:"",p:"",k:"and"}},{shape:void 0,decode:"OR",obj:{t:"",p:"",k:"or"}}],bindValue:e.logic,onChange:g}),S.jsxs("div",{className:y.actionButtons,children:[a&&S.jsx(Qt,{onClick:d,bindValue:h(me.ADD_FILTER),icon:"plus",appearance:"outlined",variant:"base"}),o&&S.jsx(Qt,{onClick:p,bindValue:h(me.ADD_SUB_GROUP),icon:"plus",appearance:"outlined",variant:"base"}),r&&S.jsx(Qt,{bindValue:"",showText:!1,label:"Delete",onClick:r,appearance:"outlined",variant:"base",icon:"delete"}),i&&S.jsx(Qt,{bindValue:h(lr.CLOSE),showText:!0,label:"Delete",onClick:i,icon:"close",appearance:"outlined",variant:"base"})]})]}),S.jsx("div",{className:y.filterList,children:e.filters.map((x,b)=>({filter:x,index:b})).filter(({filter:x})=>l?"logic"in x?x.filters.some(b=>"logic"in b?!1:b.field?.obj?.k===l):x.field?.obj?.k===l:!0).map(({filter:x,index:b})=>"logic"in x?S.jsx(Kd,{group:x,onChange:w=>u(b,w),onDelete:()=>f(b),level:n+1,fieldOptions:s,hasSubGroups:!1,hasSubFilters:!0,currentColumnName:l,hasButtonGroup:!0},b):S.jsx(kw,{filter:x,onChange:w=>u(b,w),onDelete:()=>f(b),fieldOptions:s,hasCurrentColumn:!!l},b))})]})},Zu=({filters:e,onChange:t,fieldOptions:r,hasSubGroups:i,hasSubFilters:n,ref:s,currentColumnName:o,hasButtonGroup:a,onClose:l})=>{const c={filterWrapper:`${_i["smp-filter-wrapper"]}`};return S.jsx("div",{className:c.filterWrapper,ref:s,children:S.jsx(Kd,{group:e,onChange:t,fieldOptions:r,hasSubFilters:n,hasSubGroups:i,currentColumnName:o,hasButtonGroup:a,onClose:l})})},Tw=({groups:e=[],isDraggable:t=!0,isEditable:r=!0,onChange:i,onDrop:n,onDragOver:s})=>{const o=e.map(a=>({bindValue:a.column}));return S.jsxs("th",{className:"smp-groupBar-container",onDragOver:s,onDrop:n,children:[S.jsx(Ot,{icon:"groups"}),S.jsx(Nc,{elements:o,isEditable:r,isDraggable:t,displayMode:"CodeOnly",onChange:i})]})},Fr={"smp-headerCell":"_smp-headerCell_laepr_1","smp-headerCell-container":"_smp-headerCell-container_laepr_9","smp-headerCell-iconNotification":"_smp-headerCell-iconNotification_laepr_16","smp-resizer":"_smp-resizer_laepr_34","smp-datatable-toolbar":"_smp-datatable-toolbar_laepr_52","smp-datatable-filter":"_smp-datatable-filter_laepr_53"},Ew=({columns:e,columnWidths:t,groups:r,groupState:i,showGroupBar:n,showFilter:s,filterColumn:o,activeFilters:a,fieldOptions:l,Filter:c,enableSelection:h,allVisibleRowsSelected:u,sortBy:f,sortOrder:d,onToggleFilter:p,onToggleColumnFilter:g,onFiltersChange:y,onResetFilters:x,onGroupChange:b,onGroupDrop:w,onGroupDragOver:C,onMouseDown:v,onToggleAllRows:E,onSort:T,onDragStart:N,onDragOver:W,onDrop:I})=>{const k=z.useRef({}),{anchorRef:L,targetRef:R}=Sr({position:"bottom",open:s}),{anchorRef:B,targetRef:O}=Sr({position:"bottom",open:o!==null}),$=z.useCallback(D=>yw(D,a),[a]),q=z.useMemo(()=>xw(a),[a]),A={headerCell:`${Fr["smp-headerCell"]}`,headerCellContainer:`${Fr["smp-headerCell-container"]}`,resizer:`${Fr["smp-resizer"]}`,datatableToolbar:`${Fr["smp-datatable-toolbar"]} ${Fr["smp-headerCell-"]}`,datatableFilter:`${Fr["smp-datatable-filter"]}`};return S.jsxs("thead",{children:[S.jsxs("tr",{className:A.datatableToolbar,children:[S.jsx("th",{children:S.jsxs("div",{ref:L,className:A.datatableFilter,children:[S.jsx(Qt,{onClick:p,bindValue:`${q}`,label:s?"Nascondi filtri":"Mostra filtri",icon:"filter_list",variant:"base"}),(c||q>0)&&S.jsx(S.Fragment,{children:S.jsx(Qt,{onClick:x,bindValue:"Reset",icon:"cancel",appearance:"ghost",variant:"base",label:"Rimuovi tutti i filtri"})})]})}),(r||n)&&S.jsx(Tw,{groups:i,onChange:b,onDrop:w,onDragOver:C})]}),s&&S.jsx(_r,{children:S.jsx(Zu,{filters:a,fieldOptions:l,onChange:y,hasSubGroups:!0,ref:R,hasSubFilters:!1,onClose:p})}),S.jsxs("tr",{children:[h&&S.jsx("th",{className:A.headerCell,style:{minWidth:40,justifyContent:"center"},children:S.jsx(Ha,{bindValue:u,onChange:E})}),e&&e?.map(D=>D.visible&&S.jsx("th",{tabIndex:0,role:"columnheader",onClick:()=>T(D.name),onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),T(D.name))},onDragStart:()=>N(D.name),onDragOver:W,onDrop:()=>I(D.name),className:A.headerCell,style:{width:t[D.name],minWidth:t[D.name],maxWidth:t[D.name]},ref:_=>{k.current[D.name]=_,o===D.name&&_&&(typeof B=="function"?B(_):B&&"current"in B&&(B.current=_))},children:S.jsxs("div",{draggable:!0,onDragStart:_=>{_.dataTransfer.setData("text/plain",D.name)},className:A.headerCellContainer,children:[S.jsx(Ge,{variant:"title",bindValue:D.title}),S.jsxs("div",{children:[f===D.name?S.jsx(Ot,{icon:d==="asc"?"arrow-up":"arrow-down",isInteractable:!0}):S.jsx("span",{style:{minWidth:"1rem",minHeight:"1rem"}}),S.jsx("span",{className:`${$(D.name)?Fr["smp-headerCell-iconNotification"]:""}`,children:S.jsx(Ot,{icon:"filter_list",onClick:_=>{g(D.name),_.stopPropagation()},tabIndex:0,isInteractable:!0})})]}),o===D.name&&S.jsx(_r,{children:S.jsx(Zu,{filters:a,fieldOptions:l.filter(_=>_.obj.k===o),onChange:y,hasSubGroups:!0,ref:O,hasSubFilters:!1,currentColumnName:o,hasButtonGroup:!1,onClose:()=>g(D.name)})}),S.jsx("div",{className:A.resizer,onMouseDown:_=>{v(_,D.name)},role:"region"})]})},D.name))]})]})},Lw=({data:e,lineHeight:t=28,TableHeight:r=400,groups:i,columnSizingMode:n="fit-content",ShowGroup:s="Yes",Filter:o,MultiSelect:a="No",Columns:l,onRowClick:c,onMultiSelectionChange:h,onContextMenu:u})=>{const[f,d]=z.useState(()=>e?{columns:l?Sw(e,_w(l)):e.columns,rows:e.rows??[]}:{columns:[],rows:[]}),[p,g]=z.useState(i||[]),[y,x]=z.useState(new Set),[b,w]=z.useState(!1),[C,v]=z.useState(new Set),[E,T]=z.useState(null),N=z.useMemo(()=>aw(e?.columns||[]),[e?.columns]),[W,I]=z.useState(()=>Ku(o,N)),k=z.useRef(null),[L,R]=sw({columns:f?.columns??[],rows:f?.rows??[],containerRef:k,sizingMode:n}),{handleDragStart:B,handleDragOver:O,handleDrop:$}=bw(f.columns,tt=>d(pt=>({...pt,columns:tt}))),q=z.useMemo(()=>{const tt=f.rows.map((pt,Tt)=>Tt);return tt.every(pt=>C.has(pt))&&tt.length>0},[C,f.rows]),{sortBy:A,sortOrder:D,handleSort:_}=vw({...f,rows:f.rows}),{virtualItems:M,containerProps:H,innerProps:P}=Rd({items:f?.rows??[],itemHeight:t,containerHeight:r,overscan:5});z.useEffect(()=>{if(Nt(a)&&h){const tt=Array.from(C).map(pt=>f.rows[pt]).filter(Boolean);h(tt)}},[C,a,f.rows,h]),z.useEffect(()=>{let tt=e?.rows??[];W?.filters?.length>0&&(tt=uw(tt,W));let pt=tt;A&&(pt=Xd({...e??{columns:[],rows:[]},rows:tt},A,D).rows);let Tt=pt;if(p?.length&&pt.length>0){const{flatRows:It}=nw(pt,p,t,y);Tt=It}d(It=>({...It,rows:Tt}))},[e,p,y,t,W,A,D]);const U=z.useCallback(tt=>{I(tt)},[]),Y=z.useCallback(()=>{I(Ku(o,N))},[o,N]),K=z.useCallback(()=>{w(tt=>!tt)},[]),Z=z.useCallback(tt=>{T(pt=>pt===tt?null:tt)},[]),Q=tt=>{g(iw(tt,p))},ot=tt=>{tt.preventDefault();const pt=tt.dataTransfer.getData("text/plain");if(!pt||p.some(Lt=>Lt.column===pt))return;const It=[...p,{column:pt,visible:!0}];g(It)},et=tt=>{tt.preventDefault()},wt=(tt,pt)=>{const Tt=tt.clientX,It=L[pt],Lt=hi=>{const ko=hi.clientX-Tt,nn=Math.max(50,It+ko);R(Rr=>({...Rr,[pt]:nn}))},de=()=>{window.removeEventListener("mousemove",Lt),window.removeEventListener("mouseup",de)};window.addEventListener("mousemove",Lt),window.addEventListener("mouseup",de)},G=tt=>{v(pt=>{const Tt=new Set(pt);return tt.every(Lt=>Tt.has(Lt))?tt.forEach(Lt=>Tt.delete(Lt)):tt.forEach(Lt=>Tt.add(Lt)),Tt})},rt=()=>{const tt=f.rows.map((pt,Tt)=>Tt);G(tt)},yt={smpTable:`${Vd["smp-table"]}`};return f&&S.jsx("div",{className:yt.smpTable,...H,ref:k,children:S.jsxs("table",{children:[S.jsx(Ew,{columns:f.columns,columnWidths:L,groups:i,groupState:p,showGroupBar:Nt(s),showFilter:b,filterColumn:E,activeFilters:W,fieldOptions:N,Filter:o,enableSelection:Nt(a),allVisibleRowsSelected:q,sortBy:A,sortOrder:D,onToggleFilter:K,onToggleColumnFilter:Z,onFiltersChange:U,onResetFilters:Y,onGroupChange:Q,onGroupDrop:ot,onGroupDragOver:et,onMouseDown:wt,onToggleAllRows:rt,onSort:_,onDragStart:B,onDragOver:O,onDrop:$}),S.jsx("tbody",{...P,children:M.map(({item:tt,index:pt,offsetTop:Tt})=>{const It=tt.id||tt.value||`${tt.isGroup?"group":"row"}-${pt}`;return tt.isGroup?S.jsx(Cw,{label:tt.value||"",rowHeight:t,offsetTop:Tt,level:tt.level,onClick:()=>{const Lt=tt.id;Lt&&x(de=>rw(de,Lt))},isExpanded:tt.isExpanded},`group-${It}`):S.jsx(Pc,{row:tt,columns:f.columns,columnWidths:L,rowHeight:t,offsetTop:Tt,isGroup:!1,enableSelection:Nt(a),isSelected:C.has(pt),onToggleSelect:()=>{G([pt])},onRowClick:c,onContextMenu:u},`row-${It}`)})}),S.jsx(ww,{columns:f.columns,columnWidths:L})]})})},Aw=({data:e,logo:t,open:r,minifiedOnClose:i=!0,customHeight:n="100vh",onClick:s,onEnter:o,onClose:a,loadOptions:l,onContextMenu:c})=>{const[h,u]=z.useState(),[f,d]=z.useState(r??!0),p=z.useRef(null),g=n.trim()?n:"100vh",y=z.useCallback(C=>{if(!C?.rows?.length||!C?.columns?.length)return{};const v=C.rows[0];return C.columns.filter(E=>E.visible??!0).reduce((E,T)=>{const N=v.cells[T.name];if(!N||!f&&Nt(i)&&N.shape!==kt.BUTTON&&N.shape!==kt.BUTTON_LIST)return E;const W={...N,id:T.name,onOptionsRequest:l,onChange:I=>{u(k=>{const L={...k};return L?.[T.name]&&(L[T.name].obj.k=I.obj.k),L})},onClick:I=>{I.fun&&s&&s(I)},onEnter:I=>{o&&o(I)},onContextMenu:(I,k)=>{c&&c(I,k)}};return!f&&Nt(i)&&(W.data={...W.data,showText:!1,justify:"center",squared:!0}),{...E,[T.name]:W}},{})},[f,i,s,o,l,c]),x=z.useCallback(()=>{a?.()},[a]),b=()=>{Nt(i)?d(C=>!C):(d(!1),a?.())};if(z.useEffect(()=>{u(y(e))},[e]),z.useEffect(()=>{if(!p.current)return;if(!Nt(i)){u(y(e));return}const C=getComputedStyle(p.current).getPropertyValue("--smp-drawer-slide-transition");let v=Number(C);C.endsWith("ms")?v=parseFloat(C):C.endsWith("s")&&(v=parseFloat(C)*1e3),setTimeout(()=>{u(y(e))},v/2)},[f,i]),z.useEffect(()=>{r!==void 0&&!Nt(i)&&d(r)},[i,r]),!e?.rows?.length||!e.columns?.length)return null;const w={drawer:`smp-drawer ${Nt(i)?"smp-drawer-minified":"smp-drawer-fixed"} ${f?"smp-drawer-open":""} ${!Nt(i)&&!f?"smp-drawer-no-border":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${f?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${f?"smp-drawer-backdrop-open":""}`};return h&&S.jsxs(S.Fragment,{children:[!Nt(i)&&S.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:w.backdrop,onClick:x}),S.jsx("aside",{ref:p,className:w.drawer,style:{height:g},"aria-label":"Drawer","smp-id":"drawer",children:S.jsxs("div",{className:w.container,children:[S.jsxs("div",{className:w.containerHeader,children:[t&&S.jsx("div",{className:w.containerLogo,children:S.jsx(Ot,{icon:t,title:"drawer_logo",width:"100%",height:24})}),S.jsx("div",{className:w.containerIcon,children:S.jsx(Ot,{icon:Nt(i)?"menu_close":"close",title:"drawer_icon",rotated:!f,isInteractable:!0,onClick:b,width:20,height:20})})]}),S.jsx("div",{className:w.containerLayout,children:S.jsx(ra,{layout:e.rows[0].layout,children:Object.values(h).map(C=>S.jsx(Vr,{...C}))})})]})})]})},Mw=({data:e,Type:t,ShowSubmit:r=!1,SubmitPosition:i="Right",DefaultValue:n,Label:s,LabelPosition:o="Left",Helper:a,onBlur:l,onClick:c,onOptionsRequest:h})=>{const[u,f]=z.useState();z.useEffect(()=>{f(()=>{if(!e)return;const y={...e};return t&&(y.shape=t),y.shape==null&&(y.shape=kt.TEXT_FIELD),n&&(y.obj=U1(n)),y})},[e,n,t]);const p={container:`smp-field-container ${Nt(r)?`smp-field-position-${i}`:""}`},g=()=>{Nt(r)||l?.(u)};if(u)return S.jsxs("div",{className:p.container,children:[S.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:S.jsx(Vr,{...u,id:"FLD",onChange:f,onOptionsRequest:h,fun:e?.fun,onBlur:g,label:s,labelPosition:o,helper:a})}),Nt(r)&&S.jsx(Qt,{optionalDisplayValue:"Confirm",onClick:()=>c?.(u),bindValue:"Confirm"})]})},_l="command-submit",qo=(e,t)=>({before:e,after:{type:"SmeupDataTable",columns:JSON.parse(JSON.stringify(e.columns)),rows:[{cells:JSON.parse(JSON.stringify(t)),id:"1"}]}}),Qu=(e,t,r)=>{if(!e.rows?.length||!e.columns?.length)return{};const i=e.rows?.[0];return e.columns.filter(n=>n.visible??!0).reduce((n,s)=>{const o={...i.cells[s.name],id:s.name,label:s.title,dSep:t,helper:s.helper,data:{...i.cells[s.name].data,dSep:t}};return o.isEditable==null&&(o.isEditable=!0),r&&(o.isEditable=!1),o.isEditable&&o.shape==null&&(o.shape=kt.TEXT_FIELD),{...n,[s.name]:o}},{})},$w={"smp-form":"_smp-form_9ox03_1"},Bw=({data:e,id:t,readOnly:r=!1,hiddenSubmitButton:i=!1,updateOnClick:n=!1,decimalSeparator:s=".",autoFocus:o,autoSkip:a,optionsHandler:l,onSubmit:c,onCheck:h,onCheckObj:u,onContextMenu:f,onButtonClick:d})=>{const p=z.useRef(!1),g=z.useRef([]),[y,x]=z.useState(()=>Qu(e,s,r)),{translate:b}=gr(),w=z.useId(),C=z.useRef(null);z.useEffect(()=>{const k=C.current;if(!k)return;const L=R=>{E(R.detail.id)};return k.addEventListener(_l,L),()=>{k.removeEventListener(_l,L)}},[]),z.useEffect(()=>{p.current?x(Qu(e,s,r)):(p.current=!0,C.current&&C.current.querySelectorAll('[type="text"]').forEach(L=>{L instanceof HTMLInputElement&&g.current.push(L)}))},[e]),z.useEffect(()=>{o&&C.current&&g.current.length>0&&g.current[0].focus()},[o]);const v=(k,L)=>{if(x(R=>({...R,[k]:{...R[k],obj:{...R[k].obj,k:L.obj.k},decode:L.decode,data:{...R[k].data,error:void 0},value:L.obj.k}})),n&&(L.shape==kt.CHECKBOX||L.shape==kt.SWITCH)){const R=structuredClone(y);R[k].obj.k=L.obj.k,R[k].value=L.obj.k,c({value:qo(e,R),cell:k})}if(a&&L.data?.maxLength&&L.data.maxLength<=L.obj.k.length){const R=g.current.findIndex(B=>B.name==k);R<g.current.length-1&&g.current[R+1].focus()}},E=k=>{const L=qo(e,y);c({value:L,cell:k})},T=(k,L)=>{d?.({cellId:k,currentState:{type:"SmeupDataTable",columns:e.columns,rows:[{cells:y,id:"1"}]},fun:L||""})},N=async k=>{if(y[k].obj.k!=e.rows[0].cells[k].obj.k&&(y[k].inputSettings?.checkObject&&u&&((await u({obj:y[k].obj,fun:y[k].fun,cellId:k})).valid||x(R=>({...R,[k]:{...R[k],data:{...R[k].data,error:b(lr.CHECK_OBJECT_WRONG_VALIDATION)}}}))),y[k].inputSettings?.checkValueOnExit)){const L=qo(e,y);h?.({value:L,cell:k})}},W=e.setup?.commands?.map((k,L)=>z.createElement(Vr,{...k,decode:k.value,data:{label:k.value},id:`command-${L}`,key:`command-${L}`,shape:kt.BUTTON,onClick:()=>E(k.obj.k)}))||[];i||W.unshift(S.jsx(Vr,{decode:b(lr.CONFIRM_BUTTON),shape:kt.BUTTON,id:"",obj:{t:"",p:"",k:""},data:{submit:!0,label:b(lr.CONFIRM_BUTTON),title:b(lr.CONFIRM_BUTTON)}},"submit-command"));const I={smpForm:`${$w["smp-form"]}`};return y&&S.jsxs("form",{"data-component":"input-panel",className:I.smpForm,id:t||w,onSubmit:k=>{k.preventDefault(),E()},ref:C,role:"form",children:[e.rows?.length>0&&S.jsx(ra,{layout:e.rows[0].layout,children:Object.values(y).map(k=>S.jsx(Vr,{...k,onOptionsRequest:k.fun?async(L,R)=>await l(L,R,e,k.id):void 0,onChange:L=>v(k.id,L),onBlur:()=>N(k.id),onContextMenu:f,onClick:()=>{(k.shape=="BTN"||k.shape=="CFM")&&T(k.id,k.fun)},data:{...k.data,autocomplete:"off"}}))}),W.length>0&&S.jsx(ra,{layout:{sections:[{id:"1",horizontal:!0,justify:"start",content:W.map(k=>({id:k.props.id}))}]},children:W})]})};var js={exports:{}},Ow=js.exports,Ju;function Rw(){return Ju||(Ju=1,function(e,t){(function(r,i){e.exports=i()})(Ow,function(){var r=1e3,i=6e4,n=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",p="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var O=["th","st","nd","rd"],$=B%100;return"["+B+(O[($-20)%10]||O[$]||O[0])+"]"}},w=function(B,O,$){var q=String(B);return!q||q.length>=O?B:""+Array(O+1-q.length).join($)+B},C={s:w,z:function(B){var O=-B.utcOffset(),$=Math.abs(O),q=Math.floor($/60),A=$%60;return(O<=0?"+":"-")+w(q,2,"0")+":"+w(A,2,"0")},m:function B(O,$){if(O.date()<$.date())return-B($,O);var q=12*($.year()-O.year())+($.month()-O.month()),A=O.clone().add(q,u),D=$-A<0,_=O.clone().add(q+(D?-1:1),u);return+(-(q+($-A)/(D?A-_:_-A))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:u,y:d,w:h,d:c,D:p,h:l,m:a,s:o,ms:s,Q:f}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},v="en",E={};E[v]=b;var T="$isDayjsObject",N=function(B){return B instanceof L||!(!B||!B[T])},W=function B(O,$,q){var A;if(!O)return v;if(typeof O=="string"){var D=O.toLowerCase();E[D]&&(A=D),$&&(E[D]=$,A=D);var _=O.split("-");if(!A&&_.length>1)return B(_[0])}else{var M=O.name;E[M]=O,A=M}return!q&&A&&(v=A),A||!q&&v},I=function(B,O){if(N(B))return B.clone();var $=typeof O=="object"?O:{};return $.date=B,$.args=arguments,new L($)},k=C;k.l=W,k.i=N,k.w=function(B,O){return I(B,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var L=function(){function B($){this.$L=W($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[T]=!0}var O=B.prototype;return O.parse=function($){this.$d=function(q){var A=q.date,D=q.utc;if(A===null)return new Date(NaN);if(k.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var _=A.match(y);if(_){var M=_[2]-1||0,H=(_[7]||"0").substring(0,3);return D?new Date(Date.UTC(_[1],M,_[3]||1,_[4]||0,_[5]||0,_[6]||0,H)):new Date(_[1],M,_[3]||1,_[4]||0,_[5]||0,_[6]||0,H)}}return new Date(A)}($),this.init()},O.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},O.$utils=function(){return k},O.isValid=function(){return this.$d.toString()!==g},O.isSame=function($,q){var A=I($);return this.startOf(q)<=A&&A<=this.endOf(q)},O.isAfter=function($,q){return I($)<this.startOf(q)},O.isBefore=function($,q){return this.endOf(q)<I($)},O.$g=function($,q,A){return k.u($)?this[q]:this.set(A,$)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function($,q){var A=this,D=!!k.u(q)||q,_=k.p($),M=function(ot,et){var wt=k.w(A.$u?Date.UTC(A.$y,et,ot):new Date(A.$y,et,ot),A);return D?wt:wt.endOf(c)},H=function(ot,et){return k.w(A.toDate()[ot].apply(A.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(et)),A)},P=this.$W,U=this.$M,Y=this.$D,K="set"+(this.$u?"UTC":"");switch(_){case d:return D?M(1,0):M(31,11);case u:return D?M(1,U):M(0,U+1);case h:var Z=this.$locale().weekStart||0,Q=(P<Z?P+7:P)-Z;return M(D?Y-Q:Y+(6-Q),U);case c:case p:return H(K+"Hours",0);case l:return H(K+"Minutes",1);case a:return H(K+"Seconds",2);case o:return H(K+"Milliseconds",3);default:return this.clone()}},O.endOf=function($){return this.startOf($,!1)},O.$set=function($,q){var A,D=k.p($),_="set"+(this.$u?"UTC":""),M=(A={},A[c]=_+"Date",A[p]=_+"Date",A[u]=_+"Month",A[d]=_+"FullYear",A[l]=_+"Hours",A[a]=_+"Minutes",A[o]=_+"Seconds",A[s]=_+"Milliseconds",A)[D],H=D===c?this.$D+(q-this.$W):q;if(D===u||D===d){var P=this.clone().set(p,1);P.$d[M](H),P.init(),this.$d=P.set(p,Math.min(this.$D,P.daysInMonth())).$d}else M&&this.$d[M](H);return this.init(),this},O.set=function($,q){return this.clone().$set($,q)},O.get=function($){return this[k.p($)]()},O.add=function($,q){var A,D=this;$=Number($);var _=k.p(q),M=function(U){var Y=I(D);return k.w(Y.date(Y.date()+Math.round(U*$)),D)};if(_===u)return this.set(u,this.$M+$);if(_===d)return this.set(d,this.$y+$);if(_===c)return M(1);if(_===h)return M(7);var H=(A={},A[a]=i,A[l]=n,A[o]=r,A)[_]||1,P=this.$d.getTime()+$*H;return k.w(P,this)},O.subtract=function($,q){return this.add(-1*$,q)},O.format=function($){var q=this,A=this.$locale();if(!this.isValid())return A.invalidDate||g;var D=$||"YYYY-MM-DDTHH:mm:ssZ",_=k.z(this),M=this.$H,H=this.$m,P=this.$M,U=A.weekdays,Y=A.months,K=A.meridiem,Z=function(et,wt,G,rt){return et&&(et[wt]||et(q,D))||G[wt].slice(0,rt)},Q=function(et){return k.s(M%12||12,et,"0")},ot=K||function(et,wt,G){var rt=et<12?"AM":"PM";return G?rt.toLowerCase():rt};return D.replace(x,function(et,wt){return wt||function(G){switch(G){case"YY":return String(q.$y).slice(-2);case"YYYY":return k.s(q.$y,4,"0");case"M":return P+1;case"MM":return k.s(P+1,2,"0");case"MMM":return Z(A.monthsShort,P,Y,3);case"MMMM":return Z(Y,P);case"D":return q.$D;case"DD":return k.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return Z(A.weekdaysMin,q.$W,U,2);case"ddd":return Z(A.weekdaysShort,q.$W,U,3);case"dddd":return U[q.$W];case"H":return String(M);case"HH":return k.s(M,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return ot(M,H,!0);case"A":return ot(M,H,!1);case"m":return String(H);case"mm":return k.s(H,2,"0");case"s":return String(q.$s);case"ss":return k.s(q.$s,2,"0");case"SSS":return k.s(q.$ms,3,"0");case"Z":return _}return null}(et)||_.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function($,q,A){var D,_=this,M=k.p(q),H=I($),P=(H.utcOffset()-this.utcOffset())*i,U=this-H,Y=function(){return k.m(_,H)};switch(M){case d:D=Y()/12;break;case u:D=Y();break;case f:D=Y()/3;break;case h:D=(U-P)/6048e5;break;case c:D=(U-P)/864e5;break;case l:D=U/n;break;case a:D=U/i;break;case o:D=U/r;break;default:D=U}return A?D:k.a(D)},O.daysInMonth=function(){return this.endOf(u).$D},O.$locale=function(){return E[this.$L]},O.locale=function($,q){if(!$)return this.$L;var A=this.clone(),D=W($,q,!0);return D&&(A.$L=D),A},O.clone=function(){return k.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},B}(),R=L.prototype;return I.prototype=R,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",u],["$y",d],["$D",p]].forEach(function(B){R[B[1]]=function(O){return this.$g(O,B[0],B[1])}}),I.extend=function(B,O){return B.$i||(B(O,L,I),B.$i=!0),I},I.locale=W,I.isDayjs=N,I.unix=function(B){return I(1e3*B)},I.en=E[v],I.Ls=E,I.p={},I})}(js)),js.exports}var Dw=Rw();const Zd=Ed(Dw),zs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;switch(i){case"r":return zs.hue2rgb(s,n,e+1/3)*255;case"g":return zs.hue2rgb(s,n,e)*255;case"b":return zs.hue2rgb(s,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),s=Math.min(e,t,r),o=(n+s)/2;if(i==="l")return o*100;if(n===s)return 0;const a=n-s,l=o>.5?a/(2-n-s):a/(n+s);if(i==="s")return l*100;switch(n){case e:return((t-r)/a+(t<r?6:0))*60;case t:return((r-e)/a+2)*60;case r:return((e-t)/a+4)*60;default:return-1}}},Fw={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Iw={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},xt={channel:zs,lang:Fw,unit:Iw},br={};for(let e=0;e<=255;e++)br[e]=xt.unit.dec2hex(e);const re={ALL:0,RGB:1,HSL:2};class Nw{constructor(){this.type=re.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=re.ALL}is(t){return this.type===t}}class Pw{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Nw}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=re.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=xt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=xt.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=xt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=xt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=xt.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=xt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(re.HSL)&&r!==void 0?r:(this._ensureHSL(),xt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(re.HSL)&&r!==void 0?r:(this._ensureHSL(),xt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(re.HSL)&&r!==void 0?r:(this._ensureHSL(),xt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(re.RGB)&&r!==void 0?r:(this._ensureRGB(),xt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(re.RGB)&&r!==void 0?r:(this._ensureRGB(),xt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(re.RGB)&&r!==void 0?r:(this._ensureRGB(),xt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(re.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(re.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(re.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(re.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(re.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(re.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ua=new Pw({r:0,g:0,b:0,a:0},"transparent"),ki={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ki.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,s=n%4===0,o=n>4,a=o?1:17,l=o?8:4,c=s?0:-1,h=o?255:15;return Ua.set({r:(i>>l*(c+3)&h)*a,g:(i>>l*(c+2)&h)*a,b:(i>>l*(c+1)&h)*a,a:s?(i&h)*a/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${br[Math.round(t)]}${br[Math.round(r)]}${br[Math.round(i)]}${br[Math.round(n*255)]}`:`#${br[Math.round(t)]}${br[Math.round(r)]}${br[Math.round(i)]}`}},Wr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Wr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return xt.channel.clamp.h(parseFloat(r)*.9);case"rad":return xt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return xt.channel.clamp.h(parseFloat(r)*360)}}return xt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Wr.re);if(!r)return;const[,i,n,s,o,a]=r;return Ua.set({h:Wr._hue2deg(i),s:xt.channel.clamp.s(parseFloat(n)),l:xt.channel.clamp.l(parseFloat(s)),a:o?xt.channel.clamp.a(a?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${xt.lang.round(t)}, ${xt.lang.round(r)}%, ${xt.lang.round(i)}%, ${n})`:`hsl(${xt.lang.round(t)}, ${xt.lang.round(r)}%, ${xt.lang.round(i)}%)`}},Rn={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Rn.colors[e];if(t)return ki.parse(t)},stringify:e=>{const t=ki.stringify(e);for(const r in Rn.colors)if(Rn.colors[r]===t)return r}},kn={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(kn.re);if(!r)return;const[,i,n,s,o,a,l,c,h]=r;return Ua.set({r:xt.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:xt.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:xt.channel.clamp.b(l?parseFloat(a)*2.55:parseFloat(a)),a:c?xt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${xt.lang.round(t)}, ${xt.lang.round(r)}, ${xt.lang.round(i)}, ${xt.lang.round(n)})`:`rgb(${xt.lang.round(t)}, ${xt.lang.round(r)}, ${xt.lang.round(i)})`}},De={format:{keyword:Rn,hex:ki,rgb:kn,rgba:kn,hsl:Wr,hsla:Wr},parse:e=>{if(typeof e!="string")return e;const t=ki.parse(e)||kn.parse(e)||Wr.parse(e)||Rn.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(re.HSL)||e.data.r===void 0?Wr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?kn.stringify(e):ki.stringify(e)},Qd=(e,t)=>{const r=De.parse(e);for(const i in t)r[i]=xt.channel.clamp[i](t[i]);return De.stringify(r)},Ti=(e,t,r=0,i=1)=>{if(typeof e!="number")return Qd(e,{a:t});const n=Ua.set({r:xt.channel.clamp.r(e),g:xt.channel.clamp.g(t),b:xt.channel.clamp.b(r),a:xt.channel.clamp.a(i)});return De.stringify(n)},jw=e=>{const{r:t,g:r,b:i}=De.parse(e),n=.2126*xt.channel.toLinear(t)+.7152*xt.channel.toLinear(r)+.0722*xt.channel.toLinear(i);return xt.lang.round(n)},zw=e=>jw(e)>=.5,Gi=e=>!zw(e),Jd=(e,t,r)=>{const i=De.parse(e),n=i[t],s=xt.channel.clamp[t](n+r);return n!==s&&(i[t]=s),De.stringify(i)},it=(e,t)=>Jd(e,"l",t),ft=(e,t)=>Jd(e,"l",-t),j=(e,t)=>{const r=De.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return Qd(e,i)},Ww=(e,t,r=50)=>{const{r:i,g:n,b:s,a:o}=De.parse(e),{r:a,g:l,b:c,a:h}=De.parse(t),u=r/100,f=u*2-1,d=o-h,g=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-g,x=i*g+a*y,b=n*g+l*y,w=s*g+c*y,C=o*u+h*(1-u);return Ti(x,b,w,C)},J=(e,t=100)=>{const r=De.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ww(r,e,t)};/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:tp,setPrototypeOf:tf,isFrozen:qw,getPrototypeOf:Hw,getOwnPropertyDescriptor:Uw}=Object;let{freeze:ue,seal:Ae,create:ep}=Object,{apply:Sl,construct:kl}=typeof Reflect<"u"&&Reflect;ue||(ue=function(t){return t});Ae||(Ae=function(t){return t});Sl||(Sl=function(t,r,i){return t.apply(r,i)});kl||(kl=function(t,r){return new t(...r)});const Es=fe(Array.prototype.forEach),Yw=fe(Array.prototype.lastIndexOf),ef=fe(Array.prototype.pop),un=fe(Array.prototype.push),Vw=fe(Array.prototype.splice),Ws=fe(String.prototype.toLowerCase),Ho=fe(String.prototype.toString),rf=fe(String.prototype.match),fn=fe(String.prototype.replace),Gw=fe(String.prototype.indexOf),Xw=fe(String.prototype.trim),$e=fe(Object.prototype.hasOwnProperty),se=fe(RegExp.prototype.test),dn=Kw(TypeError);function fe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return Sl(e,t,i)}}function Kw(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return kl(e,r)}}function Ct(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ws;tf&&tf(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const s=r(n);s!==n&&(qw(t)||(t[i]=s),n=s)}e[n]=!0}return e}function Zw(e){for(let t=0;t<e.length;t++)$e(e,t)||(e[t]=null);return e}function nr(e){const t=ep(null);for(const[r,i]of tp(e))$e(e,r)&&(Array.isArray(i)?t[r]=Zw(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=nr(i):t[r]=i);return t}function pn(e,t){for(;e!==null;){const i=Uw(e,t);if(i){if(i.get)return fe(i.get);if(typeof i.value=="function")return fe(i.value)}e=Hw(e)}function r(){return null}return r}const nf=ue(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Uo=ue(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Yo=ue(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Qw=ue(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Vo=ue(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Jw=ue(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),sf=ue(["#text"]),af=ue(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Go=ue(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),of=ue(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ls=ue(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tC=Ae(/\{\{[\w\W]*|[\w\W]*\}\}/gm),eC=Ae(/<%[\w\W]*|[\w\W]*%>/gm),rC=Ae(/\$\{[\w\W]*/gm),iC=Ae(/^data-[\-\w.\u00B7-\uFFFF]+$/),nC=Ae(/^aria-[\-\w]+$/),rp=Ae(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sC=Ae(/^(?:\w+script|data):/i),aC=Ae(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ip=Ae(/^html$/i),oC=Ae(/^[a-z][.\w]*(-[.\w]+)+$/i);var lf=Object.freeze({__proto__:null,ARIA_ATTR:nC,ATTR_WHITESPACE:aC,CUSTOM_ELEMENT:oC,DATA_ATTR:iC,DOCTYPE_NAME:ip,ERB_EXPR:eC,IS_ALLOWED_URI:rp,IS_SCRIPT_OR_DATA:sC,MUSTACHE_EXPR:tC,TMPLIT_EXPR:rC});const gn={element:1,text:3,progressingInstruction:7,comment:8,document:9},lC=function(){return typeof window>"u"?null:window},cC=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},cf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function np(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lC();const t=dt=>np(dt);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==gn.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,p=l.prototype,g=pn(p,"cloneNode"),y=pn(p,"remove"),x=pn(p,"nextSibling"),b=pn(p,"childNodes"),w=pn(p,"parentNode");if(typeof o=="function"){const dt=r.createElement("template");dt.content&&dt.content.ownerDocument&&(r=dt.content.ownerDocument)}let C,v="";const{implementation:E,createNodeIterator:T,createDocumentFragment:N,getElementsByTagName:W}=r,{importNode:I}=i;let k=cf();t.isSupported=typeof tp=="function"&&typeof w=="function"&&E&&E.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:R,TMPLIT_EXPR:B,DATA_ATTR:O,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:A,CUSTOM_ELEMENT:D}=lf;let{IS_ALLOWED_URI:_}=lf,M=null;const H=Ct({},[...nf,...Uo,...Yo,...Vo,...sf]);let P=null;const U=Ct({},[...af,...Go,...of,...Ls]);let Y=Object.seal(ep(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),K=null,Z=null,Q=!0,ot=!0,et=!1,wt=!0,G=!1,rt=!0,yt=!1,tt=!1,pt=!1,Tt=!1,It=!1,Lt=!1,de=!0,hi=!1;const ko="user-content-";let nn=!0,Rr=!1,ui={},fi=null;const Vh=Ct({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Gh=null;const Xh=Ct({},["audio","video","img","source","image","track"]);let To=null;const Kh=Ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ps="http://www.w3.org/1998/Math/MathML",gs="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let di=Je,Eo=!1,Lo=null;const Qb=Ct({},[ps,gs,Je],Ho);let ms=Ct({},["mi","mo","mn","ms","mtext"]),ys=Ct({},["annotation-xml"]);const Jb=Ct({},["title","style","font","a","script"]);let sn=null;const t1=["application/xhtml+xml","text/html"],e1="text/html";let Vt=null,pi=null;const r1=r.createElement("form"),Zh=function(F){return F instanceof RegExp||F instanceof Function},Ao=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(pi&&pi===F)){if((!F||typeof F!="object")&&(F={}),F=nr(F),sn=t1.indexOf(F.PARSER_MEDIA_TYPE)===-1?e1:F.PARSER_MEDIA_TYPE,Vt=sn==="application/xhtml+xml"?Ho:Ws,M=$e(F,"ALLOWED_TAGS")?Ct({},F.ALLOWED_TAGS,Vt):H,P=$e(F,"ALLOWED_ATTR")?Ct({},F.ALLOWED_ATTR,Vt):U,Lo=$e(F,"ALLOWED_NAMESPACES")?Ct({},F.ALLOWED_NAMESPACES,Ho):Qb,To=$e(F,"ADD_URI_SAFE_ATTR")?Ct(nr(Kh),F.ADD_URI_SAFE_ATTR,Vt):Kh,Gh=$e(F,"ADD_DATA_URI_TAGS")?Ct(nr(Xh),F.ADD_DATA_URI_TAGS,Vt):Xh,fi=$e(F,"FORBID_CONTENTS")?Ct({},F.FORBID_CONTENTS,Vt):Vh,K=$e(F,"FORBID_TAGS")?Ct({},F.FORBID_TAGS,Vt):nr({}),Z=$e(F,"FORBID_ATTR")?Ct({},F.FORBID_ATTR,Vt):nr({}),ui=$e(F,"USE_PROFILES")?F.USE_PROFILES:!1,Q=F.ALLOW_ARIA_ATTR!==!1,ot=F.ALLOW_DATA_ATTR!==!1,et=F.ALLOW_UNKNOWN_PROTOCOLS||!1,wt=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,G=F.SAFE_FOR_TEMPLATES||!1,rt=F.SAFE_FOR_XML!==!1,yt=F.WHOLE_DOCUMENT||!1,Tt=F.RETURN_DOM||!1,It=F.RETURN_DOM_FRAGMENT||!1,Lt=F.RETURN_TRUSTED_TYPE||!1,pt=F.FORCE_BODY||!1,de=F.SANITIZE_DOM!==!1,hi=F.SANITIZE_NAMED_PROPS||!1,nn=F.KEEP_CONTENT!==!1,Rr=F.IN_PLACE||!1,_=F.ALLOWED_URI_REGEXP||rp,di=F.NAMESPACE||Je,ms=F.MATHML_TEXT_INTEGRATION_POINTS||ms,ys=F.HTML_INTEGRATION_POINTS||ys,Y=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&Zh(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Y.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&Zh(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Y.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Y.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(ot=!1),It&&(Tt=!0),ui&&(M=Ct({},sf),P=[],ui.html===!0&&(Ct(M,nf),Ct(P,af)),ui.svg===!0&&(Ct(M,Uo),Ct(P,Go),Ct(P,Ls)),ui.svgFilters===!0&&(Ct(M,Yo),Ct(P,Go),Ct(P,Ls)),ui.mathMl===!0&&(Ct(M,Vo),Ct(P,of),Ct(P,Ls))),F.ADD_TAGS&&(M===H&&(M=nr(M)),Ct(M,F.ADD_TAGS,Vt)),F.ADD_ATTR&&(P===U&&(P=nr(P)),Ct(P,F.ADD_ATTR,Vt)),F.ADD_URI_SAFE_ATTR&&Ct(To,F.ADD_URI_SAFE_ATTR,Vt),F.FORBID_CONTENTS&&(fi===Vh&&(fi=nr(fi)),Ct(fi,F.FORBID_CONTENTS,Vt)),nn&&(M["#text"]=!0),yt&&Ct(M,["html","head","body"]),M.table&&(Ct(M,["tbody"]),delete K.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=F.TRUSTED_TYPES_POLICY,v=C.createHTML("")}else C===void 0&&(C=cC(d,n)),C!==null&&typeof v=="string"&&(v=C.createHTML(""));ue&&ue(F),pi=F}},Qh=Ct({},[...Uo,...Yo,...Qw]),Jh=Ct({},[...Vo,...Jw]),i1=function(F){let X=w(F);(!X||!X.tagName)&&(X={namespaceURI:di,tagName:"template"});const lt=Ws(F.tagName),Dt=Ws(X.tagName);return Lo[F.namespaceURI]?F.namespaceURI===gs?X.namespaceURI===Je?lt==="svg":X.namespaceURI===ps?lt==="svg"&&(Dt==="annotation-xml"||ms[Dt]):!!Qh[lt]:F.namespaceURI===ps?X.namespaceURI===Je?lt==="math":X.namespaceURI===gs?lt==="math"&&ys[Dt]:!!Jh[lt]:F.namespaceURI===Je?X.namespaceURI===gs&&!ys[Dt]||X.namespaceURI===ps&&!ms[Dt]?!1:!Jh[lt]&&(Jb[lt]||!Qh[lt]):!!(sn==="application/xhtml+xml"&&Lo[F.namespaceURI]):!1},Ne=function(F){un(t.removed,{element:F});try{w(F).removeChild(F)}catch{y(F)}},gi=function(F,X){try{un(t.removed,{attribute:X.getAttributeNode(F),from:X})}catch{un(t.removed,{attribute:null,from:X})}if(X.removeAttribute(F),F==="is")if(Tt||It)try{Ne(X)}catch{}else try{X.setAttribute(F,"")}catch{}},tu=function(F){let X=null,lt=null;if(pt)F="<remove></remove>"+F;else{const qt=rf(F,/^[\r\n\t ]+/);lt=qt&&qt[0]}sn==="application/xhtml+xml"&&di===Je&&(F='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+F+"</body></html>");const Dt=C?C.createHTML(F):F;if(di===Je)try{X=new f().parseFromString(Dt,sn)}catch{}if(!X||!X.documentElement){X=E.createDocument(di,"template",null);try{X.documentElement.innerHTML=Eo?v:Dt}catch{}}const te=X.body||X.documentElement;return F&&lt&&te.insertBefore(r.createTextNode(lt),te.childNodes[0]||null),di===Je?W.call(X,yt?"html":"body")[0]:yt?X.documentElement:te},eu=function(F){return T.call(F.ownerDocument||F,F,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Mo=function(F){return F instanceof u&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},ru=function(F){return typeof a=="function"&&F instanceof a};function tr(dt,F,X){Es(dt,lt=>{lt.call(t,F,X,pi)})}const iu=function(F){let X=null;if(tr(k.beforeSanitizeElements,F,null),Mo(F))return Ne(F),!0;const lt=Vt(F.nodeName);if(tr(k.uponSanitizeElement,F,{tagName:lt,allowedTags:M}),rt&&F.hasChildNodes()&&!ru(F.firstElementChild)&&se(/<[/\w!]/g,F.innerHTML)&&se(/<[/\w!]/g,F.textContent)||F.nodeType===gn.progressingInstruction||rt&&F.nodeType===gn.comment&&se(/<[/\w]/g,F.data))return Ne(F),!0;if(!M[lt]||K[lt]){if(!K[lt]&&su(lt)&&(Y.tagNameCheck instanceof RegExp&&se(Y.tagNameCheck,lt)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(lt)))return!1;if(nn&&!fi[lt]){const Dt=w(F)||F.parentNode,te=b(F)||F.childNodes;if(te&&Dt){const qt=te.length;for(let pe=qt-1;pe>=0;--pe){const er=g(te[pe],!0);er.__removalCount=(F.__removalCount||0)+1,Dt.insertBefore(er,x(F))}}}return Ne(F),!0}return F instanceof l&&!i1(F)||(lt==="noscript"||lt==="noembed"||lt==="noframes")&&se(/<\/no(script|embed|frames)/i,F.innerHTML)?(Ne(F),!0):(G&&F.nodeType===gn.text&&(X=F.textContent,Es([L,R,B],Dt=>{X=fn(X,Dt," ")}),F.textContent!==X&&(un(t.removed,{element:F.cloneNode()}),F.textContent=X)),tr(k.afterSanitizeElements,F,null),!1)},nu=function(F,X,lt){if(de&&(X==="id"||X==="name")&&(lt in r||lt in r1))return!1;if(!(ot&&!Z[X]&&se(O,X))){if(!(Q&&se($,X))){if(!P[X]||Z[X]){if(!(su(F)&&(Y.tagNameCheck instanceof RegExp&&se(Y.tagNameCheck,F)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(F))&&(Y.attributeNameCheck instanceof RegExp&&se(Y.attributeNameCheck,X)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(X))||X==="is"&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&se(Y.tagNameCheck,lt)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(lt))))return!1}else if(!To[X]){if(!se(_,fn(lt,A,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&F!=="script"&&Gw(lt,"data:")===0&&Gh[F])){if(!(et&&!se(q,fn(lt,A,"")))){if(lt)return!1}}}}}}return!0},su=function(F){return F!=="annotation-xml"&&rf(F,D)},au=function(F){tr(k.beforeSanitizeAttributes,F,null);const{attributes:X}=F;if(!X||Mo(F))return;const lt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:P,forceKeepAttr:void 0};let Dt=X.length;for(;Dt--;){const te=X[Dt],{name:qt,namespaceURI:pe,value:er}=te,an=Vt(qt),$o=er;let ee=qt==="value"?$o:Xw($o);if(lt.attrName=an,lt.attrValue=ee,lt.keepAttr=!0,lt.forceKeepAttr=void 0,tr(k.uponSanitizeAttribute,F,lt),ee=lt.attrValue,hi&&(an==="id"||an==="name")&&(gi(qt,F),ee=ko+ee),rt&&se(/((--!?|])>)|<\/(style|title)/i,ee)){gi(qt,F);continue}if(lt.forceKeepAttr)continue;if(!lt.keepAttr){gi(qt,F);continue}if(!wt&&se(/\/>/i,ee)){gi(qt,F);continue}G&&Es([L,R,B],lu=>{ee=fn(ee,lu," ")});const ou=Vt(F.nodeName);if(!nu(ou,an,ee)){gi(qt,F);continue}if(C&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!pe)switch(d.getAttributeType(ou,an)){case"TrustedHTML":{ee=C.createHTML(ee);break}case"TrustedScriptURL":{ee=C.createScriptURL(ee);break}}if(ee!==$o)try{pe?F.setAttributeNS(pe,qt,ee):F.setAttribute(qt,ee),Mo(F)?Ne(F):ef(t.removed)}catch{gi(qt,F)}}tr(k.afterSanitizeAttributes,F,null)},n1=function dt(F){let X=null;const lt=eu(F);for(tr(k.beforeSanitizeShadowDOM,F,null);X=lt.nextNode();)tr(k.uponSanitizeShadowNode,X,null),iu(X),au(X),X.content instanceof s&&dt(X.content);tr(k.afterSanitizeShadowDOM,F,null)};return t.sanitize=function(dt){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,lt=null,Dt=null,te=null;if(Eo=!dt,Eo&&(dt="<!-->"),typeof dt!="string"&&!ru(dt))if(typeof dt.toString=="function"){if(dt=dt.toString(),typeof dt!="string")throw dn("dirty is not a string, aborting")}else throw dn("toString is not a function");if(!t.isSupported)return dt;if(tt||Ao(F),t.removed=[],typeof dt=="string"&&(Rr=!1),Rr){if(dt.nodeName){const er=Vt(dt.nodeName);if(!M[er]||K[er])throw dn("root node is forbidden and cannot be sanitized in-place")}}else if(dt instanceof a)X=tu("<!---->"),lt=X.ownerDocument.importNode(dt,!0),lt.nodeType===gn.element&&lt.nodeName==="BODY"||lt.nodeName==="HTML"?X=lt:X.appendChild(lt);else{if(!Tt&&!G&&!yt&&dt.indexOf("<")===-1)return C&&Lt?C.createHTML(dt):dt;if(X=tu(dt),!X)return Tt?null:Lt?v:""}X&&pt&&Ne(X.firstChild);const qt=eu(Rr?dt:X);for(;Dt=qt.nextNode();)iu(Dt),au(Dt),Dt.content instanceof s&&n1(Dt.content);if(Rr)return dt;if(Tt){if(It)for(te=N.call(X.ownerDocument);X.firstChild;)te.appendChild(X.firstChild);else te=X;return(P.shadowroot||P.shadowrootmode)&&(te=I.call(i,te,!0)),te}let pe=yt?X.outerHTML:X.innerHTML;return yt&&M["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&se(ip,X.ownerDocument.doctype.name)&&(pe="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
51
- `+pe),G&&Es([L,R,B],er=>{pe=fn(pe,er," ")}),C&&Lt?C.createHTML(pe):pe},t.setConfig=function(){let dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ao(dt),tt=!0},t.clearConfig=function(){pi=null,tt=!1},t.isValidAttribute=function(dt,F,X){pi||Ao({});const lt=Vt(dt),Dt=Vt(F);return nu(lt,Dt,X)},t.addHook=function(dt,F){typeof F=="function"&&un(k[dt],F)},t.removeHook=function(dt,F){if(F!==void 0){const X=Yw(k[dt],F);return X===-1?void 0:Vw(k[dt],X,1)[0]}return ef(k[dt])},t.removeHooks=function(dt){k[dt]=[]},t.removeAllHooks=function(){k=cf()},t}var Ii=np(),sp=Object.defineProperty,m=(e,t)=>sp(e,"name",{value:t,configurable:!0}),ap=(e,t)=>{for(var r in t)sp(e,r,{get:t[r],enumerable:!0})},rr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},V={trace:m((...e)=>{},"trace"),debug:m((...e)=>{},"debug"),info:m((...e)=>{},"info"),warn:m((...e)=>{},"warn"),error:m((...e)=>{},"error"),fatal:m((...e)=>{},"fatal")},jc=m(function(e="fatal"){let t=rr.fatal;typeof e=="string"?e.toLowerCase()in rr&&(t=rr[e]):typeof e=="number"&&(t=e),V.trace=()=>{},V.debug=()=>{},V.info=()=>{},V.warn=()=>{},V.error=()=>{},V.fatal=()=>{},t<=rr.fatal&&(V.fatal=console.error?console.error.bind(console,Te("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Te("FATAL"))),t<=rr.error&&(V.error=console.error?console.error.bind(console,Te("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Te("ERROR"))),t<=rr.warn&&(V.warn=console.warn?console.warn.bind(console,Te("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Te("WARN"))),t<=rr.info&&(V.info=console.info?console.info.bind(console,Te("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Te("INFO"))),t<=rr.debug&&(V.debug=console.debug?console.debug.bind(console,Te("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Te("DEBUG"))),t<=rr.trace&&(V.trace=console.debug?console.debug.bind(console,Te("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Te("TRACE")))},"setLogLevel"),Te=m(e=>`%c${Zd().format("ss.SSS")} : ${e} : `,"format"),op=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Dn=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,hC=/\s*%%.*\n/gm,Ai,lp=(Ai=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},m(Ai,"UnknownDiagramError"),Ai),Zr={},zc=m(function(e,t){e=e.replace(op,"").replace(Dn,"").replace(hC,`
52
- `);for(const[r,{detector:i}]of Object.entries(Zr))if(i(e,t))return r;throw new lp(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Tl=m((...e)=>{for(const{id:t,detector:r,loader:i}of e)cp(t,r,i)},"registerLazyLoadedDiagrams"),cp=m((e,t,r)=>{Zr[e]&&V.warn(`Detector with key ${e} already exists. Overwriting.`),Zr[e]={detector:t,loader:r},V.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),uC=m(e=>Zr[e].loader,"getDiagramLoader"),El=m((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>El(e,s,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=El(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Gt=El,Ya="#ffffff",Va="#f2f2f2",oe=m((e,t)=>t?j(e,{s:-40,l:10}):j(e,{s:-40,l:-10}),"mkBorder"),Mi,fC=(Mi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||oe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||oe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||oe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||oe(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||it(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ft(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10)):(this.rowOdd=this.rowOdd||it(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||it(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=ft(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=ft(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||it(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||ft(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||j(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||j(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||j(this.primaryColor,{h:64}),this.fillType3=this.fillType3||j(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||j(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||j(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||j(this.primaryColor,{h:128}),this.fillType7=this.fillType7||j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-10}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||j(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Gi(this.quadrant1Fill)?it(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ya,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Va}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},m(Mi,"Theme"),Mi),dC=m(e=>{const t=new fC;return t.calculate(e),t},"getThemeVariables"),$i,pC=($i=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=it(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=oe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=oe(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=it(J("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ti(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=ft("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ft(this.sectionBkgColor,10),this.taskBorderColor=Ti(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ti(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||it(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=it(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=it(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=it(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||J(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||it(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||j(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||j(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Gi(this.quadrant1Fill)?it(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=it(this.secondaryColor,20),this.git1=it(this.pie2||this.secondaryColor,20),this.git2=it(this.pie3||this.tertiaryColor,20),this.git3=it(this.pie4||j(this.primaryColor,{h:-30}),20),this.git4=it(this.pie5||j(this.primaryColor,{h:-60}),20),this.git5=it(this.pie6||j(this.primaryColor,{h:-90}),10),this.git6=it(this.pie7||j(this.primaryColor,{h:60}),10),this.git7=it(this.pie8||j(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||it(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||it(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},m($i,"Theme"),$i),gC=m(e=>{const t=new pC;return t.calculate(e),t},"getThemeVariables"),Bi,mC=(Bi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=j(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=oe(this.primaryColor,this.darkMode),this.secondaryBorderColor=oe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=oe(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ti(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=ft(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||ft(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||j(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||j(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||j(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||J(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||J(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=it(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||it(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||it(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||j(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-30}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||j(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||j(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Gi(this.quadrant1Fill)?it(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||ft(J(this.git0),25),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ya,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Va}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},m(Bi,"Theme"),Bi),hp=m(e=>{const t=new mC;return t.calculate(e),t},"getThemeVariables"),Oi,yC=(Oi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=it("#cde498",10),this.primaryBorderColor=oe(this.primaryColor,this.darkMode),this.secondaryBorderColor=oe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=oe(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.primaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=ft(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=ft(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||ft(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||j(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||j(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||j(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||it(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||it(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||j(this.primaryColor,{l:-30}),this.pie5=this.pie5||j(this.secondaryColor,{l:-30}),this.pie6=this.pie6||j(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||j(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Gi(this.quadrant1Fill)?it(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ya,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Va}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},m(Oi,"Theme"),Oi),xC=m(e=>{const t=new yC;return t.calculate(e),t},"getThemeVariables"),Ri,bC=(Ri=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=it(this.contrast,55),this.background="#ffffff",this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=oe(this.primaryColor,this.darkMode),this.secondaryBorderColor=oe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=oe(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||it(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=it(this.contrast,55),this.border2=this.contrast,this.actorBorder=it(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||J(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||it(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||ft(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||j(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||j(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=it(this.contrast,30),this.sectionBkgColor2=it(this.contrast,30),this.taskBorderColor=ft(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=it(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ft(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Gi(this.quadrant1Fill)?it(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ft(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||j(this.primaryColor,{h:-30}),this.git4=this.pie5||j(this.primaryColor,{h:-60}),this.git5=this.pie6||j(this.primaryColor,{h:-90}),this.git6=this.pie7||j(this.primaryColor,{h:60}),this.git7=this.pie8||j(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ya,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Va}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},m(Ri,"Theme"),Ri),vC=m(e=>{const t=new bC;return t.calculate(e),t},"getThemeVariables"),ur={base:{getThemeVariables:dC},dark:{getThemeVariables:gC},default:{getThemeVariables:hp},forest:{getThemeVariables:xC},neutral:{getThemeVariables:vC}},We={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},up={...We,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ur.default.getThemeVariables(),sequence:{...We.sequence,messageFont:m(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:m(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:m(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...We.gantt,tickInterval:void 0,useWidth:void 0},c4:{...We.c4,useWidth:void 0,personFont:m(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...We.flowchart,inheritDir:!1},external_personFont:m(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:m(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:m(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:m(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:m(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:m(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:m(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:m(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:m(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:m(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:m(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:m(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:m(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:m(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:m(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:m(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:m(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:m(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:m(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:m(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:m(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...We.pie,useWidth:984},xyChart:{...We.xyChart,useWidth:void 0},requirement:{...We.requirement,useWidth:void 0},packet:{...We.packet},radar:{...We.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},fp=m((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...fp(e[i],"")]:[...r,t+i],[]),"keyify"),wC=new Set(fp(up,"")),Wc=up,ha=m(e=>{if(V.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ha(t));return}for(const t of Object.keys(e)){if(V.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!wC.has(t)||e[t]==null){V.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){V.debug("sanitizing object",t),ha(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(V.debug("sanitizing css option",t),e[t]=CC(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}V.debug("After sanitization",e)}},"sanitizeDirective"),CC=m(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Ni=Object.freeze(Wc),ye=Gt({},Ni),dp,Pi=[],Fn=Gt({},Ni),Ga=m((e,t)=>{let r=Gt({},e),i={};for(const n of t)mp(n),i=Gt(i,n);if(r=Gt(r,i),i.theme&&i.theme in ur){const n=Gt({},dp),s=Gt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in ur&&(r.themeVariables=ur[r.theme].getThemeVariables(s))}return Fn=r,yp(Fn),Fn},"updateCurrentConfig"),_C=m(e=>(ye=Gt({},Ni),ye=Gt(ye,e),e.theme&&ur[e.theme]&&(ye.themeVariables=ur[e.theme].getThemeVariables(e.themeVariables)),Ga(ye,Pi),ye),"setSiteConfig"),SC=m(e=>{dp=Gt({},e)},"saveConfigFromInitialize"),kC=m(e=>(ye=Gt(ye,e),Ga(ye,Pi),ye),"updateSiteConfig"),pp=m(()=>Gt({},ye),"getSiteConfig"),gp=m(e=>(yp(e),Gt(Fn,e),Jt()),"setConfig"),Jt=m(()=>Gt({},Fn),"getConfig"),mp=m(e=>{e&&(["secure",...ye.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(V.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&mp(e[t])}))},"sanitize"),TC=m(e=>{ha(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Pi.push(e),Ga(ye,Pi)},"addDirective"),ua=m((e=ye)=>{Pi=[],Ga(e,Pi)},"reset"),EC={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},hf={},LC=m(e=>{hf[e]||(V.warn(EC[e]),hf[e]=!0)},"issueWarning"),yp=m(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&LC("LAZY_LOAD_DEPRECATED")},"checkConfig"),Xi=/<br\s*\/?>/gi,AC=m(e=>e?vp(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),MC=(()=>{let e=!1;return()=>{e||(xp(),e=!0)}})();function xp(){const e="data-temp-href-target";Ii.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ii.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}m(xp,"setupDompurifyHooks");var bp=m(e=>(MC(),Ii.sanitize(e)),"removeScript"),uf=m((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=bp(e):r!=="loose"&&(e=vp(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=RC(e))}return e},"sanitizeMore"),Se=m((e,t)=>e&&(t.dompurifyConfig?e=Ii.sanitize(uf(e,t),t.dompurifyConfig).toString():e=Ii.sanitize(uf(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),$C=m((e,t)=>typeof e=="string"?Se(e,t):e.flat().map(r=>Se(r,t)),"sanitizeTextOrArray"),BC=m(e=>Xi.test(e),"hasBreaks"),OC=m(e=>e.split(Xi),"splitBreaks"),RC=m(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),vp=m(e=>e.replace(Xi,"#br#"),"breakToPlaceholder"),qc=m(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Wt=m(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),DC=m(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),FC=m(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ll=m(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const s=t[i-1],o=t[i+1];IC(s,o)&&(n=s+","+o,i++,r.pop())}r.push(NC(n))}return r.join("")},"parseGenericTypes"),Al=m((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),IC=m((e,t)=>{const r=Al(e,"~"),i=Al(t,"~");return r===1&&i===1},"shouldCombineSets"),NC=m(e=>{const t=Al(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),s=i.lastIndexOf("~");for(;n!==-1&&s!==-1&&n!==s;)i[n]="<",i[s]=">",n=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ff=m(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ml=/\$\$(.*)\$\$/g,Qr=m(e=>(e.match(Ml)?.length??0)>0,"hasKatex"),PC=m(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Xa(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),jC=m(async(e,t)=>{if(!Qr(e))return e;if(!(ff()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ml,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-C2g-EhzP.cjs")),i=t.forceLegacyMathML||!ff()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Xi).map(n=>Qr(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Ml,(n,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Xa=m(async(e,t)=>Se(await jC(e,t),t),"renderKatexSanitized"),ni={getRows:AC,sanitizeText:Se,sanitizeTextOrArray:$C,hasBreaks:BC,splitBreaks:OC,lineBreakRegex:Xi,removeScript:bp,getUrl:qc,evaluate:Wt,getMax:DC,getMin:FC},zC=m(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),WC=m(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Hc=m(function(e,t,r,i){const n=WC(t,r,i);zC(e,n)},"configureSvgSize"),wp=m(function(e,t,r,i){const n=t.node().getBBox(),s=n.width,o=n.height;V.info(`SVG bounds: ${s}x${o}`,n);let a=0,l=0;V.info(`Graph bounds: ${a}x${l}`,e),a=s+r*2,l=o+r*2,V.info(`Calculated bounds: ${a}x${l}`),Hc(t,l,a,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),qs={},qC=m((e,t,r)=>{let i="";return e in qs&&qs[e]?i=qs[e](r):V.warn(`No theme found for ${e}`),` & {
53
- font-family: ${r.fontFamily};
54
- font-size: ${r.fontSize};
55
- fill: ${r.textColor}
56
- }
57
- @keyframes edge-animation-frame {
58
- from {
59
- stroke-dashoffset: 0;
60
- }
61
- }
62
- @keyframes dash {
63
- to {
64
- stroke-dashoffset: 0;
65
- }
66
- }
67
- & .edge-animation-slow {
68
- stroke-dasharray: 9,5 !important;
69
- stroke-dashoffset: 900;
70
- animation: dash 50s linear infinite;
71
- stroke-linecap: round;
72
- }
73
- & .edge-animation-fast {
74
- stroke-dasharray: 9,5 !important;
75
- stroke-dashoffset: 900;
76
- animation: dash 20s linear infinite;
77
- stroke-linecap: round;
78
- }
79
- /* Classes common for multiple diagrams */
80
-
81
- & .error-icon {
82
- fill: ${r.errorBkgColor};
83
- }
84
- & .error-text {
85
- fill: ${r.errorTextColor};
86
- stroke: ${r.errorTextColor};
87
- }
88
-
89
- & .edge-thickness-normal {
90
- stroke-width: 1px;
91
- }
92
- & .edge-thickness-thick {
93
- stroke-width: 3.5px
94
- }
95
- & .edge-pattern-solid {
96
- stroke-dasharray: 0;
97
- }
98
- & .edge-thickness-invisible {
99
- stroke-width: 0;
100
- fill: none;
101
- }
102
- & .edge-pattern-dashed{
103
- stroke-dasharray: 3;
104
- }
105
- .edge-pattern-dotted {
106
- stroke-dasharray: 2;
107
- }
108
-
109
- & .marker {
110
- fill: ${r.lineColor};
111
- stroke: ${r.lineColor};
112
- }
113
- & .marker.cross {
114
- stroke: ${r.lineColor};
115
- }
116
-
117
- & svg {
118
- font-family: ${r.fontFamily};
119
- font-size: ${r.fontSize};
120
- }
121
- & p {
122
- margin: 0
123
- }
124
-
125
- ${i}
126
-
127
- ${t}
128
- `},"getStyles"),HC=m((e,t)=>{t!==void 0&&(qs[e]=t)},"addStylesForDiagram"),UC=qC,Uc={};ap(Uc,{clear:()=>Cp,getAccDescription:()=>Tp,getAccTitle:()=>Sp,getDiagramTitle:()=>Lp,setAccDescription:()=>kp,setAccTitle:()=>_p,setDiagramTitle:()=>Ep});var Yc="",Vc="",Gc="",Xc=m(e=>Se(e,Jt()),"sanitizeText"),Cp=m(()=>{Yc="",Gc="",Vc=""},"clear"),_p=m(e=>{Yc=Xc(e).replace(/^\s+/g,"")},"setAccTitle"),Sp=m(()=>Yc,"getAccTitle"),kp=m(e=>{Gc=Xc(e).replace(/\n\s+/g,`
129
- `)},"setAccDescription"),Tp=m(()=>Gc,"getAccDescription"),Ep=m(e=>{Vc=Xc(e)},"setDiagramTitle"),Lp=m(()=>Vc,"getDiagramTitle"),df=V,YC=jc,Et=Jt,VC=gp,GC=Ni,Kc=m(e=>Se(e,Et()),"sanitizeText"),Ap=wp,XC=m(()=>Uc,"getCommonDb"),fa={},da=m((e,t,r)=>{fa[e]&&df.warn(`Diagram with id ${e} already registered. Overwriting.`),fa[e]=t,r&&cp(e,r),HC(e,t.styles),t.injectUtils?.(df,YC,Et,Kc,Ap,XC(),()=>{})},"registerDiagram"),$l=m(e=>{if(e in fa)return fa[e];throw new KC(e)},"getDiagram"),Di,KC=(Di=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},m(Di,"DiagramNotFoundError"),Di);function Zc(e){return typeof e>"u"||e===null}m(Zc,"isNothing");function Mp(e){return typeof e=="object"&&e!==null}m(Mp,"isObject");function $p(e){return Array.isArray(e)?e:Zc(e)?[]:[e]}m($p,"toArray");function Bp(e,t){var r,i,n,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)n=s[r],e[n]=t[n];return e}m(Bp,"extend");function Op(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}m(Op,"repeat");function Rp(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}m(Rp,"isNegativeZero");var ZC=Zc,QC=Mp,JC=$p,t_=Op,e_=Rp,r_=Bp,Yt={isNothing:ZC,isObject:QC,toArray:JC,repeat:t_,isNegativeZero:e_,extend:r_};function Qc(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
130
-
131
- `+e.mark.snippet),i+" "+r):i}m(Qc,"formatError");function ji(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Qc(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}m(ji,"YAMLException$1");ji.prototype=Object.create(Error.prototype);ji.prototype.constructor=ji;ji.prototype.toString=m(function(t){return this.name+": "+Qc(this,t)},"toString");var xe=ji;function Hs(e,t,r,i,n){var s="",o="",a=Math.floor(n/2)-1;return i-t>a&&(s=" ... ",t=i-a+s.length),r-i>a&&(o=" ...",r=i+a-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}m(Hs,"getLine");function Us(e,t){return Yt.repeat(" ",t-e.length)+e}m(Us,"padStart");function Dp(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,o=-1;s=r.exec(e.buffer);)n.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var a="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=Hs(e.buffer,i[o-l],n[o-l],e.position-(i[o]-i[o-l]),u),a=Yt.repeat(" ",t.indent)+Us((e.line-l+1).toString(),h)+" | "+c.str+`
132
- `+a;for(c=Hs(e.buffer,i[o],n[o],e.position,u),a+=Yt.repeat(" ",t.indent)+Us((e.line+1).toString(),h)+" | "+c.str+`
133
- `,a+=Yt.repeat("-",t.indent+h+3+c.pos)+`^
134
- `,l=1;l<=t.linesAfter&&!(o+l>=n.length);l++)c=Hs(e.buffer,i[o+l],n[o+l],e.position-(i[o]-i[o+l]),u),a+=Yt.repeat(" ",t.indent)+Us((e.line+l+1).toString(),h)+" | "+c.str+`
135
- `;return a.replace(/\n$/,"")}m(Dp,"makeSnippet");var i_=Dp,n_=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],s_=["scalar","sequence","mapping"];function Fp(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}m(Fp,"compileStyleAliases");function Ip(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(n_.indexOf(r)===-1)throw new xe('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Fp(t.styleAliases||null),s_.indexOf(this.kind)===-1)throw new xe('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}m(Ip,"Type$1");var ie=Ip;function Bl(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=o)}),r[n]=i}),r}m(Bl,"compileList");function Np(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(m(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}m(Np,"compileMap");function pa(e){return this.extend(e)}m(pa,"Schema$1");pa.prototype.extend=m(function(t){var r=[],i=[];if(t instanceof ie)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new xe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof ie))throw new xe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new xe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new xe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof ie))throw new xe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(pa.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Bl(n,"implicit"),n.compiledExplicit=Bl(n,"explicit"),n.compiledTypeMap=Np(n.compiledImplicit,n.compiledExplicit),n},"extend");var a_=pa,o_=new ie("tag:yaml.org,2002:str",{kind:"scalar",construct:m(function(e){return e!==null?e:""},"construct")}),l_=new ie("tag:yaml.org,2002:seq",{kind:"sequence",construct:m(function(e){return e!==null?e:[]},"construct")}),c_=new ie("tag:yaml.org,2002:map",{kind:"mapping",construct:m(function(e){return e!==null?e:{}},"construct")}),h_=new a_({explicit:[o_,l_,c_]});function Pp(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}m(Pp,"resolveYamlNull");function jp(){return null}m(jp,"constructYamlNull");function zp(e){return e===null}m(zp,"isNull");var u_=new ie("tag:yaml.org,2002:null",{kind:"scalar",resolve:Pp,construct:jp,predicate:zp,represent:{canonical:m(function(){return"~"},"canonical"),lowercase:m(function(){return"null"},"lowercase"),uppercase:m(function(){return"NULL"},"uppercase"),camelcase:m(function(){return"Null"},"camelcase"),empty:m(function(){return""},"empty")},defaultStyle:"lowercase"});function Wp(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}m(Wp,"resolveYamlBoolean");function qp(e){return e==="true"||e==="True"||e==="TRUE"}m(qp,"constructYamlBoolean");function Hp(e){return Object.prototype.toString.call(e)==="[object Boolean]"}m(Hp,"isBoolean");var f_=new ie("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Wp,construct:qp,predicate:Hp,represent:{lowercase:m(function(e){return e?"true":"false"},"lowercase"),uppercase:m(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:m(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Up(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}m(Up,"isHexCode");function Yp(e){return 48<=e&&e<=55}m(Yp,"isOctCode");function Vp(e){return 48<=e&&e<=57}m(Vp,"isDecCode");function Gp(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Up(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Yp(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!Vp(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}m(Gp,"resolveYamlInteger");function Xp(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}m(Xp,"constructYamlInteger");function Kp(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Yt.isNegativeZero(e)}m(Kp,"isInteger");var d_=new ie("tag:yaml.org,2002:int",{kind:"scalar",resolve:Gp,construct:Xp,predicate:Kp,represent:{binary:m(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:m(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:m(function(e){return e.toString(10)},"decimal"),hexadecimal:m(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),p_=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Zp(e){return!(e===null||!p_.test(e)||e[e.length-1]==="_")}m(Zp,"resolveYamlFloat");function Qp(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}m(Qp,"constructYamlFloat");var g_=/^[-+]?[0-9]+e/;function Jp(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Yt.isNegativeZero(e))return"-0.0";return r=e.toString(10),g_.test(r)?r.replace("e",".e"):r}m(Jp,"representYamlFloat");function tg(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Yt.isNegativeZero(e))}m(tg,"isFloat");var m_=new ie("tag:yaml.org,2002:float",{kind:"scalar",resolve:Zp,construct:Qp,predicate:tg,represent:Jp,defaultStyle:"lowercase"}),eg=h_.extend({implicit:[u_,f_,d_,m_]}),y_=eg,rg=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ig=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ng(e){return e===null?!1:rg.exec(e)!==null||ig.exec(e)!==null}m(ng,"resolveYamlTimestamp");function sg(e){var t,r,i,n,s,o,a,l=0,c=null,h,u,f;if(t=rg.exec(e),t===null&&(t=ig.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(s=+t[4],o=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}m(sg,"constructYamlTimestamp");function ag(e){return e.toISOString()}m(ag,"representYamlTimestamp");var x_=new ie("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ng,construct:sg,instanceOf:Date,represent:ag});function og(e){return e==="<<"||e===null}m(og,"resolveYamlMerge");var b_=new ie("tag:yaml.org,2002:merge",{kind:"scalar",resolve:og}),Jc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
136
- \r`;function lg(e){if(e===null)return!1;var t,r,i=0,n=e.length,s=Jc;for(r=0;r<n;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}m(lg,"resolveYamlBinary");function cg(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,s=Jc,o=0,a=[];for(t=0;t<n;t++)t%4===0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=n%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}m(cg,"constructYamlBinary");function hg(e){var t="",r=0,i,n,s=e.length,o=Jc;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=s%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}m(hg,"representYamlBinary");function ug(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}m(ug,"isBinary");var v_=new ie("tag:yaml.org,2002:binary",{kind:"scalar",resolve:lg,construct:cg,predicate:ug,represent:hg}),w_=Object.prototype.hasOwnProperty,C_=Object.prototype.toString;function fg(e){if(e===null)return!0;var t=[],r,i,n,s,o,a=e;for(r=0,i=a.length;r<i;r+=1){if(n=a[r],o=!1,C_.call(n)!=="[object Object]")return!1;for(s in n)if(w_.call(n,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}m(fg,"resolveYamlOmap");function dg(e){return e!==null?e:[]}m(dg,"constructYamlOmap");var __=new ie("tag:yaml.org,2002:omap",{kind:"sequence",resolve:fg,construct:dg}),S_=Object.prototype.toString;function pg(e){if(e===null)return!0;var t,r,i,n,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],S_.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[t]=[n[0],i[n[0]]]}return!0}m(pg,"resolveYamlPairs");function gg(e){if(e===null)return[];var t,r,i,n,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],n=Object.keys(i),s[t]=[n[0],i[n[0]]];return s}m(gg,"constructYamlPairs");var k_=new ie("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:pg,construct:gg}),T_=Object.prototype.hasOwnProperty;function mg(e){if(e===null)return!0;var t,r=e;for(t in r)if(T_.call(r,t)&&r[t]!==null)return!1;return!0}m(mg,"resolveYamlSet");function yg(e){return e!==null?e:{}}m(yg,"constructYamlSet");var E_=new ie("tag:yaml.org,2002:set",{kind:"mapping",resolve:mg,construct:yg}),xg=y_.extend({implicit:[x_,b_],explicit:[v_,__,k_,E_]}),kr=Object.prototype.hasOwnProperty,ga=1,bg=2,vg=3,ma=4,Xo=1,L_=2,pf=3,A_=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,M_=/[\x85\u2028\u2029]/,$_=/[,\[\]\{\}]/,wg=/^(?:!|!!|![a-z\-]+!)$/i,Cg=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ol(e){return Object.prototype.toString.call(e)}m(Ol,"_class");function Oe(e){return e===10||e===13}m(Oe,"is_EOL");function Cr(e){return e===9||e===32}m(Cr,"is_WHITE_SPACE");function le(e){return e===9||e===32||e===10||e===13}m(le,"is_WS_OR_EOL");function qr(e){return e===44||e===91||e===93||e===123||e===125}m(qr,"is_FLOW_INDICATOR");function _g(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}m(_g,"fromHexCode");function Sg(e){return e===120?2:e===117?4:e===85?8:0}m(Sg,"escapedHexLen");function kg(e){return 48<=e&&e<=57?e-48:-1}m(kg,"fromDecimalCode");function Rl(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
137
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}m(Rl,"simpleEscapeSequence");function Tg(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}m(Tg,"charFromCodepoint");var Eg=new Array(256),Lg=new Array(256);for(Ir=0;Ir<256;Ir++)Eg[Ir]=Rl(Ir)?1:0,Lg[Ir]=Rl(Ir);var Ir;function Ag(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||xg,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}m(Ag,"State$1");function th(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=i_(r),new xe(t,r)}m(th,"generateError");function ut(e,t){throw th(e,t)}m(ut,"throwError");function qn(e,t){e.onWarning&&e.onWarning.call(null,th(e,t))}m(qn,"throwWarning");var gf={YAML:m(function(t,r,i){var n,s,o;t.version!==null&&ut(t,"duplication of %YAML directive"),i.length!==1&&ut(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&ut(t,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&ut(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&qn(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:m(function(t,r,i){var n,s;i.length!==2&&ut(t,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],wg.test(n)||ut(t,"ill-formed tag handle (first argument) of the TAG directive"),kr.call(t.tagMap,n)&&ut(t,'there is a previously declared suffix for "'+n+'" tag handle'),Cg.test(s)||ut(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{ut(t,"tag prefix is malformed: "+s)}t.tagMap[n]=s},"handleTagDirective")};function fr(e,t,r,i){var n,s,o,a;if(t<r){if(a=e.input.slice(t,r),i)for(n=0,s=a.length;n<s;n+=1)o=a.charCodeAt(n),o===9||32<=o&&o<=1114111||ut(e,"expected valid JSON character");else A_.test(a)&&ut(e,"the stream contains non-printable characters");e.result+=a}}m(fr,"captureSegment");function Dl(e,t,r,i){var n,s,o,a;for(Yt.isObject(r)||ut(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,a=n.length;o<a;o+=1)s=n[o],kr.call(t,s)||(t[s]=r[s],i[s]=!0)}m(Dl,"mergeMappings");function Hr(e,t,r,i,n,s,o,a,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&ut(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Ol(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&Ol(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)Dl(e,t,s[c],r);else Dl(e,t,s,r);else!e.json&&!kr.call(r,n)&&kr.call(t,n)&&(e.line=o||e.line,e.lineStart=a||e.lineStart,e.position=l||e.position,ut(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[n]=s,delete r[n];return t}m(Hr,"storeMappingPair");function Ka(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):ut(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}m(Ka,"readLineBreak");function Pt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Cr(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Oe(n))for(Ka(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&qn(e,"deficient indentation"),i}m(Pt,"skipSeparationSpace");function as(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||le(r)))}m(as,"testDocumentSeparator");function Za(e,t){t===1?e.result+=" ":t>1&&(e.result+=Yt.repeat(`
138
- `,t-1))}m(Za,"writeFoldedLines");function Mg(e,t,r){var i,n,s,o,a,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),le(d)||qr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=e.input.charCodeAt(e.position+1),le(n)||r&&qr(n)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),le(n)||r&&qr(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),le(i))break}else{if(e.position===e.lineStart&&as(e)||r&&qr(d))break;if(Oe(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,Pt(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}a&&(fr(e,s,o,!1),Za(e,e.line-l),s=o=e.position,a=!1),Cr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return fr(e,s,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}m(Mg,"readPlainScalar");function $g(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(fr(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Oe(r)?(fr(e,i,n,!0),Za(e,Pt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&as(e)?ut(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);ut(e,"unexpected end of the stream within a single quoted scalar")}m($g,"readSingleQuotedScalar");function Bg(e,t){var r,i,n,s,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return fr(e,r,e.position,!0),e.position++,!0;if(a===92){if(fr(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),Oe(a))Pt(e,!1,t);else if(a<256&&Eg[a])e.result+=Lg[a],e.position++;else if((o=Sg(a))>0){for(n=o,s=0;n>0;n--)a=e.input.charCodeAt(++e.position),(o=_g(a))>=0?s=(s<<4)+o:ut(e,"expected hexadecimal character");e.result+=Tg(s),e.position++}else ut(e,"unknown escape sequence");r=i=e.position}else Oe(a)?(fr(e,r,i,!0),Za(e,Pt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&as(e)?ut(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ut(e,"unexpected end of the stream within a double quoted scalar")}m(Bg,"readDoubleQuotedScalar");function Og(e,t){var r=!0,i,n,s,o=e.tag,a,l=e.anchor,c,h,u,f,d,p=Object.create(null),g,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,a=[];else if(b===123)h=125,d=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),b=e.input.charCodeAt(++e.position);b!==0;){if(Pt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=a,!0;r?b===44&&ut(e,"expected the node content, but found ','"):ut(e,"missed comma between flow collection entries"),y=g=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),le(c)&&(u=f=!0,e.position++,Pt(e,!0,t))),i=e.line,n=e.lineStart,s=e.position,Jr(e,t,ga,!1,!0),y=e.tag,g=e.result,Pt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Pt(e,!0,t),Jr(e,t,ga,!1,!0),x=e.result),d?Hr(e,a,p,y,g,x,i,n,s):u?a.push(Hr(e,null,p,y,g,x,i,n,s)):a.push(g),Pt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}ut(e,"unexpected end of the stream within a flow collection")}m(Og,"readFlowCollection");function Rg(e,t){var r,i,n=Xo,s=!1,o=!1,a=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Xo===n?n=u===43?pf:L_:ut(e,"repeat of a chomping mode identifier");else if((h=kg(u))>=0)h===0?ut(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ut(e,"repeat of an indentation width identifier"):(a=t+h-1,o=!0);else break;if(Cr(u)){do u=e.input.charCodeAt(++e.position);while(Cr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Oe(u)&&u!==0)}for(;u!==0;){for(Ka(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<a)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>a&&(a=e.lineIndent),Oe(u)){l++;continue}if(e.lineIndent<a){n===pf?e.result+=Yt.repeat(`
139
- `,s?1+l:l):n===Xo&&s&&(e.result+=`
140
- `);break}for(i?Cr(u)?(c=!0,e.result+=Yt.repeat(`
141
- `,s?1+l:l)):c?(c=!1,e.result+=Yt.repeat(`
142
- `,l+1)):l===0?s&&(e.result+=" "):e.result+=Yt.repeat(`
143
- `,l):e.result+=Yt.repeat(`
144
- `,s?1+l:l),s=!0,o=!0,l=0,r=e.position;!Oe(u)&&u!==0;)u=e.input.charCodeAt(++e.position);fr(e,r,e.position,!1)}return!0}m(Rg,"readBlockScalar");function Fl(e,t){var r,i=e.tag,n=e.anchor,s=[],o,a=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ut(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!le(o))));){if(a=!0,e.position++,Pt(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Jr(e,t,vg,!1,!0),s.push(e.result),Pt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)ut(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=s,!0):!1}m(Fl,"readBlockSequence");function Dg(e,t,r){var i,n,s,o,a,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,p=null,g=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ut(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&le(i))b===63?(y&&(Hr(e,u,f,d,p,null,o,a,l),d=p=g=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):ut(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,a=e.lineStart,l=e.position,!Jr(e,r,bg,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);Cr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),le(b)||ut(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Hr(e,u,f,d,p,null,o,a,l),d=p=g=null),x=!0,y=!1,n=!1,d=e.tag,p=e.result;else if(x)ut(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)ut(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(o=e.line,a=e.lineStart,l=e.position),Jr(e,t,ma,!0,n)&&(y?p=e.result:g=e.result),y||(Hr(e,u,f,d,p,g,o,a,l),d=p=g=null),Pt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)ut(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Hr(e,u,f,d,p,null,o,a,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}m(Dg,"readBlockMapping");function Fg(e){var t,r=!1,i=!1,n,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&ut(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):ut(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!le(o);)o===33&&(i?ut(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),wg.test(n)||ut(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),$_.test(s)&&ut(e,"tag suffix cannot contain flow indicator characters")}s&&!Cg.test(s)&&ut(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{ut(e,"tag name is malformed: "+s)}return r?e.tag=s:kr.call(e.tagMap,n)?e.tag=e.tagMap[n]+s:n==="!"?e.tag="!"+s:n==="!!"?e.tag="tag:yaml.org,2002:"+s:ut(e,'undeclared tag handle "'+n+'"'),!0}m(Fg,"readTagProperty");function Ig(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&ut(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!le(r)&&!qr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ut(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}m(Ig,"readAnchorProperty");function Ng(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!le(i)&&!qr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ut(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),kr.call(e.anchorMap,r)||ut(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Pt(e,!0,-1),!0}m(Ng,"readAlias");function Jr(e,t,r,i,n){var s,o,a,l=1,c=!1,h=!1,u,f,d,p,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=a=ma===r||vg===r,i&&Pt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Fg(e)||Ig(e);)Pt(e,!0,-1)?(c=!0,a=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=c||n),(l===1||ma===r)&&(ga===r||bg===r?g=t:g=t+1,y=e.position-e.lineStart,l===1?a&&(Fl(e,y)||Dg(e,y,g))||Og(e,g)?h=!0:(o&&Rg(e,g)||$g(e,g)||Bg(e,g)?h=!0:Ng(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&ut(e,"alias node should not have any properties")):Mg(e,g,ga===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=a&&Fl(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&ut(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(p=e.implicitTypes[u],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(kr.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){p=d[u];break}p||ut(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&ut(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):ut(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}m(Jr,"composeNode");function Pg(e){var t=e.position,r,i,n,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Pt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!le(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&ut(e,"directive name must not be less than one character in length");o!==0;){for(;Cr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Oe(o));break}if(Oe(o))break;for(r=e.position;o!==0&&!le(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&Ka(e),kr.call(gf,i)?gf[i](e,i,n):qn(e,'unknown document directive "'+i+'"')}if(Pt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Pt(e,!0,-1)):s&&ut(e,"directives end mark is expected"),Jr(e,e.lineIndent-1,ma,!1,!0),Pt(e,!0,-1),e.checkLineBreaks&&M_.test(e.input.slice(t,e.position))&&qn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&as(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Pt(e,!0,-1));return}if(e.position<e.length-1)ut(e,"end of the stream or a document separator is expected");else return}m(Pg,"readDocument");function eh(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
145
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Ag(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,ut(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Pg(r);return r.documents}m(eh,"loadDocuments");function B_(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=eh(e,r);if(typeof t!="function")return i;for(var n=0,s=i.length;n<s;n+=1)t(i[n])}m(B_,"loadAll$1");function jg(e,t){var r=eh(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new xe("expected a single document in the stream, but found more")}}m(jg,"load$1");var O_=jg,R_={load:O_},zg=Object.prototype.toString,Wg=Object.prototype.hasOwnProperty,rh=65279,D_=9,Hn=10,F_=13,I_=32,N_=33,P_=34,Il=35,j_=37,z_=38,W_=39,q_=42,qg=44,H_=45,ya=58,U_=61,Y_=62,V_=63,G_=64,Hg=91,Ug=93,X_=96,Yg=123,K_=124,Vg=125,ne={};ne[0]="\\0";ne[7]="\\a";ne[8]="\\b";ne[9]="\\t";ne[10]="\\n";ne[11]="\\v";ne[12]="\\f";ne[13]="\\r";ne[27]="\\e";ne[34]='\\"';ne[92]="\\\\";ne[133]="\\N";ne[160]="\\_";ne[8232]="\\L";ne[8233]="\\P";var Z_=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Q_=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Gg(e,t){var r,i,n,s,o,a,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,s=i.length;n<s;n+=1)o=i[n],a=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Wg.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[o]=a;return r}m(Gg,"compileStyleMap");function Xg(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new xe("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Yt.repeat("0",i-t.length)+t}m(Xg,"encodeHex");var J_=1,Un=2;function Kg(e){this.schema=e.schema||xg,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Yt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Gg(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Un:J_,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}m(Kg,"State");function Nl(e,t){for(var r=Yt.repeat(" ",t),i=0,n=-1,s="",o,a=e.length;i<a;)n=e.indexOf(`
146
- `,i),n===-1?(o=e.slice(i),i=a):(o=e.slice(i,n+1),i=n+1),o.length&&o!==`
147
- `&&(s+=r),s+=o;return s}m(Nl,"indentString");function xa(e,t){return`
148
- `+Yt.repeat(" ",e.indent*t)}m(xa,"generateNextLine");function Zg(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}m(Zg,"testImplicitResolving");function Yn(e){return e===I_||e===D_}m(Yn,"isWhitespace");function zi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==rh||65536<=e&&e<=1114111}m(zi,"isPrintable");function Pl(e){return zi(e)&&e!==rh&&e!==F_&&e!==Hn}m(Pl,"isNsCharOrWhitespace");function jl(e,t,r){var i=Pl(e),n=i&&!Yn(e);return(r?i:i&&e!==qg&&e!==Hg&&e!==Ug&&e!==Yg&&e!==Vg)&&e!==Il&&!(t===ya&&!n)||Pl(t)&&!Yn(t)&&e===Il||t===ya&&n}m(jl,"isPlainSafe");function Qg(e){return zi(e)&&e!==rh&&!Yn(e)&&e!==H_&&e!==V_&&e!==ya&&e!==qg&&e!==Hg&&e!==Ug&&e!==Yg&&e!==Vg&&e!==Il&&e!==z_&&e!==q_&&e!==N_&&e!==K_&&e!==U_&&e!==Y_&&e!==W_&&e!==P_&&e!==j_&&e!==G_&&e!==X_}m(Qg,"isPlainSafeFirst");function Jg(e){return!Yn(e)&&e!==ya}m(Jg,"isPlainSafeLast");function Si(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}m(Si,"codePointAt");function ih(e){var t=/^\n* /;return t.test(e)}m(ih,"needIndentIndicator");var tm=1,zl=2,em=3,rm=4,wi=5;function im(e,t,r,i,n,s,o,a){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,p=-1,g=Qg(Si(e,0))&&Jg(Si(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Si(e,l),!zi(c))return wi;g=g&&jl(c,h,a),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Si(e,l),c===Hn)u=!0,d&&(f=f||l-p-1>i&&e[p+1]!==" ",p=l);else if(!zi(c))return wi;g=g&&jl(c,h,a),h=c}f=f||d&&l-p-1>i&&e[p+1]!==" "}return!u&&!f?g&&!o&&!n(e)?tm:s===Un?wi:zl:r>9&&ih(e)?wi:o?s===Un?wi:zl:f?rm:em}m(im,"chooseScalarStyle");function nm(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===Un?'""':"''";if(!e.noCompatMode&&(Z_.indexOf(t)!==-1||Q_.test(t)))return e.quotingType===Un?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),a=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Zg(e,c)}switch(m(l,"testAmbiguity"),im(t,a,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case tm:return t;case zl:return"'"+t.replace(/'/g,"''")+"'";case em:return"|"+Wl(t,e.indent)+ql(Nl(t,s));case rm:return">"+Wl(t,e.indent)+ql(Nl(sm(t,o),s));case wi:return'"'+am(t)+'"';default:throw new xe("impossible error: invalid scalar style")}}()}m(nm,"writeScalar");function Wl(e,t){var r=ih(e)?String(t):"",i=e[e.length-1]===`
149
- `,n=i&&(e[e.length-2]===`
150
- `||e===`
151
- `),s=n?"+":i?"":"-";return r+s+`
152
- `}m(Wl,"blockHeader");function ql(e){return e[e.length-1]===`
153
- `?e.slice(0,-1):e}m(ql,"dropEndingNewline");function sm(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
154
- `);return c=c!==-1?c:e.length,r.lastIndex=c,Hl(e.slice(0,c),t)}(),n=e[0]===`
155
- `||e[0]===" ",s,o;o=r.exec(e);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?`
156
- `:"")+Hl(l,t),n=s}return i}m(sm,"foldString");function Hl(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=r.exec(e);)a=i.index,a-n>t&&(s=o>n?o:a,l+=`
157
- `+e.slice(n,s),n=s+1),o=a;return l+=`
158
- `,e.length-n>t&&o>n?l+=e.slice(n,o)+`
159
- `+e.slice(o+1):l+=e.slice(n),l.slice(1)}m(Hl,"foldLine");function am(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Si(e,n),i=ne[r],!i&&zi(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||Xg(r);return t}m(am,"escapeString");function om(e,t,r){var i="",n=e.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],e.replacer&&(a=e.replacer.call(r,String(s),a)),(Xe(e,t,a,!1,!1)||typeof a>"u"&&Xe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}m(om,"writeFlowSequence");function Ul(e,t,r,i){var n="",s=e.tag,o,a,l;for(o=0,a=r.length;o<a;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Xe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Xe(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=xa(e,t)),e.dump&&Hn===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=s,e.dump=n||"[]"}m(Ul,"writeBlockSequence");function lm(e,t,r){var i="",n=e.tag,s=Object.keys(r),o,a,l,c,h;for(o=0,a=s.length;o<a;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Xe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Xe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}m(lm,"writeFlowMapping");function cm(e,t,r,i){var n="",s=e.tag,o=Object.keys(r),a,l,c,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new xe("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)f="",(!i||n!=="")&&(f+=xa(e,t)),c=o[a],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Xe(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Hn===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=xa(e,t)),Xe(e,t+1,h,!0,u)&&(e.dump&&Hn===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=s,e.dump=n||"{}"}m(cm,"writeBlockMapping");function Yl(e,t,r){var i,n,s,o,a,l;for(n=r?e.explicitTypes:e.implicitTypes,s=0,o=n.length;s<o;s+=1)if(a=n[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,zg.call(a.represent)==="[object Function]")i=a.represent(t,l);else if(Wg.call(a.represent,l))i=a.represent[l](t,l);else throw new xe("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}m(Yl,"detectType");function Xe(e,t,r,i,n,s,o){e.tag=null,e.dump=r,Yl(e,r,!1)||Yl(e,r,!0);var a=zg.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=a==="[object Object]"||a==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),a==="[object Object]")i&&Object.keys(e.dump).length!==0?(cm(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(lm(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(a==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Ul(e,t-1,e.dump,n):Ul(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(om(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&nm(e,e.dump,t,s,l);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new xe("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}m(Xe,"writeNode");function hm(e,t){var r=[],i=[],n,s;for(ba(e,r,i),n=0,s=i.length;n<s;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(s)}m(hm,"getDuplicateReferences");function ba(e,t,r){var i,n,s;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,s=e.length;n<s;n+=1)ba(e[n],t,r);else for(i=Object.keys(e),n=0,s=i.length;n<s;n+=1)ba(e[i[n]],t,r)}m(ba,"inspectNode");function tS(e,t){t=t||{};var r=new Kg(t);r.noRefs||hm(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Xe(r,0,i,!0,!0)?r.dump+`
160
- `:""}m(tS,"dump$1");function eS(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}m(eS,"renamed");var um=eg,fm=R_.load;/*! Bundled license information:
161
-
162
- js-yaml/dist/js-yaml.mjs:
163
- (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
164
- */var Ee={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Tn(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Ft(e),t=Ft(t);const[r,i]=[e.x,e.y],[n,s]=[t.x,t.y],o=n-r,a=s-i;return{angle:Math.atan(a/o),deltaX:o,deltaY:a}}m(Tn,"calculateDeltaAndAngle");var Ft=m(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),dm=m(e=>({x:m(function(t,r,i){let n=0;const s=Ft(i[0]).x<Ft(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ee,e.arrowTypeStart)){const{angle:d,deltaX:p}=Tn(i[0],i[1]);n=Ee[e.arrowTypeStart]*Math.cos(d)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ee,e.arrowTypeEnd)){const{angle:d,deltaX:p}=Tn(i[i.length-1],i[i.length-2]);n=Ee[e.arrowTypeEnd]*Math.cos(d)*(p>=0?1:-1)}const o=Math.abs(Ft(t).x-Ft(i[i.length-1]).x),a=Math.abs(Ft(t).y-Ft(i[i.length-1]).y),l=Math.abs(Ft(t).x-Ft(i[0]).x),c=Math.abs(Ft(t).y-Ft(i[0]).y),h=Ee[e.arrowTypeStart],u=Ee[e.arrowTypeEnd],f=1;if(o<u&&o>0&&a<u){let d=u+f-o;d*=s==="right"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=s==="right"?-1:1,n+=d}return Ft(t).x+n},"x"),y:m(function(t,r,i){let n=0;const s=Ft(i[0]).y<Ft(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ee,e.arrowTypeStart)){const{angle:d,deltaY:p}=Tn(i[0],i[1]);n=Ee[e.arrowTypeStart]*Math.abs(Math.sin(d))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ee,e.arrowTypeEnd)){const{angle:d,deltaY:p}=Tn(i[i.length-1],i[i.length-2]);n=Ee[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(p>=0?1:-1)}const o=Math.abs(Ft(t).y-Ft(i[i.length-1]).y),a=Math.abs(Ft(t).x-Ft(i[i.length-1]).x),l=Math.abs(Ft(t).y-Ft(i[0]).y),c=Math.abs(Ft(t).x-Ft(i[0]).x),h=Ee[e.arrowTypeStart],u=Ee[e.arrowTypeEnd],f=1;if(o<u&&o>0&&a<u){let d=u+f-o;d*=s==="up"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=s==="up"?-1:1,n+=d}return Ft(t).y+n},"y")}),"getLineFunctionsWithOffset"),Qa=m(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),rS=m(e=>{const{handDrawnSeed:t}=Et();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Ki=m(e=>{const t=iS([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),iS=m(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),nh=m(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),ht=m(e=>{const{stylesArray:t}=Ki(e),r=[],i=[],n=[],s=[];return t.forEach(o=>{const a=o[0];nh(a)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),a.includes("stroke")&&n.push(o.join(":")+" !important"),a==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:s}},"styles2String"),at=m((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=Et(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:o}=Ki(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:nS(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),nS=m(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),mn={},Ut={},mf;function sS(){return mf||(mf=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.BLANK_URL=Ut.relativeFirstCharacters=Ut.whitespaceEscapeCharsRegex=Ut.urlSchemeRegex=Ut.ctrlCharactersRegex=Ut.htmlCtrlEntityRegex=Ut.htmlEntitiesRegex=Ut.invalidProtocolRegex=void 0,Ut.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ut.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ut.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ut.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ut.urlSchemeRegex=/^.+(:|&colon;)/gim,Ut.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ut.relativeFirstCharacters=[".","/"],Ut.BLANK_URL="about:blank"),Ut}var yf;function aS(){if(yf)return mn;yf=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.sanitizeUrl=void 0;var e=sS();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var a=o.replace(e.ctrlCharactersRegex,"");return a.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var a,l=n(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),a=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(a&&a.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var p=new URL(d);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return d}return mn.sanitizeUrl=s,mn}var pm=aS(),oS={value:()=>{}};function gm(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ys(r)}function Ys(e){this._=e}function lS(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ys.prototype=gm.prototype={constructor:Ys,on:function(e,t){var r=this._,i=lS(e+"",r),n,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((n=(e=i[s]).type)&&(n=cS(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<o;)if(n=(e=i[s]).type)r[n]=xf(r[n],e.name,t);else if(t==null)for(n in r)r[n]=xf(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ys(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,s;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,n=s.length;i<n;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,s=i.length;n<s;++n)i[n].value.apply(t,r)}};function cS(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function xf(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=oS,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Vl="http://www.w3.org/1999/xhtml";const bf={svg:"http://www.w3.org/2000/svg",xhtml:Vl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ja(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),bf.hasOwnProperty(t)?{space:bf[t],local:e}:e}function hS(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Vl&&t.documentElement.namespaceURI===Vl?t.createElement(e):t.createElementNS(r,e)}}function uS(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function mm(e){var t=Ja(e);return(t.local?uS:hS)(t)}function fS(){}function sh(e){return e==null?fS:function(){return this.querySelector(e)}}function dS(e){typeof e!="function"&&(e=sh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],o=s.length,a=i[n]=new Array(o),l,c,h=0;h<o;++h)(l=s[h])&&(c=e.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new ke(i,this._parents)}function pS(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function gS(){return[]}function ym(e){return e==null?gS:function(){return this.querySelectorAll(e)}}function mS(e){return function(){return pS(e.apply(this,arguments))}}function yS(e){typeof e=="function"?e=mS(e):e=ym(e);for(var t=this._groups,r=t.length,i=[],n=[],s=0;s<r;++s)for(var o=t[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),n.push(l));return new ke(i,n)}function xm(e){return function(){return this.matches(e)}}function bm(e){return function(t){return t.matches(e)}}var xS=Array.prototype.find;function bS(e){return function(){return xS.call(this.children,e)}}function vS(){return this.firstElementChild}function wS(e){return this.select(e==null?vS:bS(typeof e=="function"?e:bm(e)))}var CS=Array.prototype.filter;function _S(){return Array.from(this.children)}function SS(e){return function(){return CS.call(this.children,e)}}function kS(e){return this.selectAll(e==null?_S:SS(typeof e=="function"?e:bm(e)))}function TS(e){typeof e!="function"&&(e=xm(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],o=s.length,a=i[n]=[],l,c=0;c<o;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&a.push(l);return new ke(i,this._parents)}function vm(e){return new Array(e.length)}function ES(){return new ke(this._enter||this._groups.map(vm),this._parents)}function va(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}va.prototype={constructor:va,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function LS(e){return function(){return e}}function AS(e,t,r,i,n,s){for(var o=0,a,l=t.length,c=s.length;o<c;++o)(a=t[o])?(a.__data__=s[o],i[o]=a):r[o]=new va(e,s[o]);for(;o<l;++o)(a=t[o])&&(n[o]=a)}function MS(e,t,r,i,n,s,o){var a,l,c=new Map,h=t.length,u=s.length,f=new Array(h),d;for(a=0;a<h;++a)(l=t[a])&&(f[a]=d=o.call(l,l.__data__,a,t)+"",c.has(d)?n[a]=l:c.set(d,l));for(a=0;a<u;++a)d=o.call(e,s[a],a,s)+"",(l=c.get(d))?(i[a]=l,l.__data__=s[a],c.delete(d)):r[a]=new va(e,s[a]);for(a=0;a<h;++a)(l=t[a])&&c.get(f[a])===l&&(n[a]=l)}function $S(e){return e.__data__}function BS(e,t){if(!arguments.length)return Array.from(this,$S);var r=t?MS:AS,i=this._parents,n=this._groups;typeof e!="function"&&(e=LS(e));for(var s=n.length,o=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var h=i[c],u=n[c],f=u.length,d=OS(e.call(h,h&&h.__data__,c,i)),p=d.length,g=a[c]=new Array(p),y=o[c]=new Array(p),x=l[c]=new Array(f);r(h,u,g,y,x,d,t);for(var b=0,w=0,C,v;b<p;++b)if(C=g[b]){for(b>=w&&(w=b+1);!(v=y[w])&&++w<p;);C._next=v||null}}return o=new ke(o,i),o._enter=a,o._exit=l,o}function OS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function RS(){return new ke(this._exit||this._groups.map(vm),this._parents)}function DS(e,t,r){var i=this.enter(),n=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?s.remove():r(s),i&&n?i.merge(n).order():n}function FS(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,s=i.length,o=Math.min(n,s),a=new Array(n),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,f=a[l]=new Array(u),d,p=0;p<u;++p)(d=c[p]||h[p])&&(f[p]=d);for(;l<n;++l)a[l]=r[l];return new ke(a,this._parents)}function IS(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,s=i[n],o;--n>=0;)(o=i[n])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function NS(e){e||(e=PS);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var o=r[s],a=o.length,l=n[s]=new Array(a),c,h=0;h<a;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new ke(n,this._parents).order()}function PS(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function jS(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function zS(){return Array.from(this)}function WS(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,s=i.length;n<s;++n){var o=i[n];if(o)return o}return null}function qS(){let e=0;for(const t of this)++e;return e}function HS(){return!this.node()}function US(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],s=0,o=n.length,a;s<o;++s)(a=n[s])&&e.call(a,a.__data__,s,n);return this}function YS(e){return function(){this.removeAttribute(e)}}function VS(e){return function(){this.removeAttributeNS(e.space,e.local)}}function GS(e,t){return function(){this.setAttribute(e,t)}}function XS(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function KS(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function ZS(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function QS(e,t){var r=Ja(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?VS:YS:typeof t=="function"?r.local?ZS:KS:r.local?XS:GS)(r,t))}function wm(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function JS(e){return function(){this.style.removeProperty(e)}}function tk(e,t,r){return function(){this.style.setProperty(e,t,r)}}function ek(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function rk(e,t,r){return arguments.length>1?this.each((t==null?JS:typeof t=="function"?ek:tk)(e,t,r??"")):Wi(this.node(),e)}function Wi(e,t){return e.style.getPropertyValue(t)||wm(e).getComputedStyle(e,null).getPropertyValue(t)}function ik(e){return function(){delete this[e]}}function nk(e,t){return function(){this[e]=t}}function sk(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ak(e,t){return arguments.length>1?this.each((t==null?ik:typeof t=="function"?sk:nk)(e,t)):this.node()[e]}function Cm(e){return e.trim().split(/^|\s+/)}function ah(e){return e.classList||new _m(e)}function _m(e){this._node=e,this._names=Cm(e.getAttribute("class")||"")}_m.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Sm(e,t){for(var r=ah(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function km(e,t){for(var r=ah(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function ok(e){return function(){Sm(this,e)}}function lk(e){return function(){km(this,e)}}function ck(e,t){return function(){(t.apply(this,arguments)?Sm:km)(this,e)}}function hk(e,t){var r=Cm(e+"");if(arguments.length<2){for(var i=ah(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?ck:t?ok:lk)(r,t))}function uk(){this.textContent=""}function fk(e){return function(){this.textContent=e}}function dk(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function pk(e){return arguments.length?this.each(e==null?uk:(typeof e=="function"?dk:fk)(e)):this.node().textContent}function gk(){this.innerHTML=""}function mk(e){return function(){this.innerHTML=e}}function yk(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function xk(e){return arguments.length?this.each(e==null?gk:(typeof e=="function"?yk:mk)(e)):this.node().innerHTML}function bk(){this.nextSibling&&this.parentNode.appendChild(this)}function vk(){return this.each(bk)}function wk(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ck(){return this.each(wk)}function _k(e){var t=typeof e=="function"?e:mm(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Sk(){return null}function kk(e,t){var r=typeof e=="function"?e:mm(e),i=t==null?Sk:typeof t=="function"?t:sh(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Tk(){var e=this.parentNode;e&&e.removeChild(this)}function Ek(){return this.each(Tk)}function Lk(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ak(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Mk(e){return this.select(e?Ak:Lk)}function $k(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Bk(e){return function(t){e.call(this,t,this.__data__)}}function Ok(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Rk(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,s;r<n;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function Dk(e,t,r){return function(){var i=this.__on,n,s=Bk(t);if(i){for(var o=0,a=i.length;o<a;++o)if((n=i[o]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=r),n.value=t;return}}this.addEventListener(e.type,s,r),n={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(n):this.__on=[n]}}function Fk(e,t,r){var i=Ok(e+""),n,s=i.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(n=0,h=a[l];n<s;++n)if((o=i[n]).type===h.type&&o.name===h.name)return h.value}return}for(a=t?Dk:Rk,n=0;n<s;++n)this.each(a(i[n],t,r));return this}function Tm(e,t,r){var i=wm(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function Ik(e,t){return function(){return Tm(this,e,t)}}function Nk(e,t){return function(){return Tm(this,e,t.apply(this,arguments))}}function Pk(e,t){return this.each((typeof t=="function"?Nk:Ik)(e,t))}function*jk(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,s=i.length,o;n<s;++n)(o=i[n])&&(yield o)}var Em=[null];function ke(e,t){this._groups=e,this._parents=t}function os(){return new ke([[document.documentElement]],Em)}function zk(){return this}ke.prototype=os.prototype={constructor:ke,select:dS,selectAll:yS,selectChild:wS,selectChildren:kS,filter:TS,data:BS,enter:ES,exit:RS,join:DS,merge:FS,selection:zk,order:IS,sort:NS,call:jS,nodes:zS,node:WS,size:qS,empty:HS,each:US,attr:QS,style:rk,property:ak,classed:hk,text:pk,html:xk,raise:vk,lower:Ck,append:_k,insert:kk,remove:Ek,clone:Mk,datum:$k,on:Fk,dispatch:Pk,[Symbol.iterator]:jk};function St(e){return typeof e=="string"?new ke([[document.querySelector(e)]],[document.documentElement]):new ke([[e]],Em)}function to(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function oh(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Zi(){}var Vn=.7,wa=1/Vn,Ei="\\s*([+-]?\\d+)\\s*",Gn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ve="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wk=/^#([0-9a-f]{3,8})$/,qk=new RegExp(`^rgb\\(${Ei},${Ei},${Ei}\\)$`),Hk=new RegExp(`^rgb\\(${Ve},${Ve},${Ve}\\)$`),Uk=new RegExp(`^rgba\\(${Ei},${Ei},${Ei},${Gn}\\)$`),Yk=new RegExp(`^rgba\\(${Ve},${Ve},${Ve},${Gn}\\)$`),Vk=new RegExp(`^hsl\\(${Gn},${Ve},${Ve}\\)$`),Gk=new RegExp(`^hsla\\(${Gn},${Ve},${Ve},${Gn}\\)$`),vf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};to(Zi,qi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wf,formatHex:wf,formatHex8:Xk,formatHsl:Kk,formatRgb:Cf,toString:Cf});function wf(){return this.rgb().formatHex()}function Xk(){return this.rgb().formatHex8()}function Kk(){return Am(this).formatHsl()}function Cf(){return this.rgb().formatRgb()}function qi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Wk.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?_f(t):r===3?new ce(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?As(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?As(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=qk.exec(e))?new ce(t[1],t[2],t[3],1):(t=Hk.exec(e))?new ce(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Uk.exec(e))?As(t[1],t[2],t[3],t[4]):(t=Yk.exec(e))?As(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Vk.exec(e))?Tf(t[1],t[2]/100,t[3]/100,1):(t=Gk.exec(e))?Tf(t[1],t[2]/100,t[3]/100,t[4]):vf.hasOwnProperty(e)?_f(vf[e]):e==="transparent"?new ce(NaN,NaN,NaN,0):null}function _f(e){return new ce(e>>16&255,e>>8&255,e&255,1)}function As(e,t,r,i){return i<=0&&(e=t=r=NaN),new ce(e,t,r,i)}function Lm(e){return e instanceof Zi||(e=qi(e)),e?(e=e.rgb(),new ce(e.r,e.g,e.b,e.opacity)):new ce}function Gl(e,t,r,i){return arguments.length===1?Lm(e):new ce(e,t,r,i??1)}function ce(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}to(ce,Gl,oh(Zi,{brighter(e){return e=e==null?wa:Math.pow(wa,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vn:Math.pow(Vn,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ce(Gr(this.r),Gr(this.g),Gr(this.b),Ca(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sf,formatHex:Sf,formatHex8:Zk,formatRgb:kf,toString:kf}));function Sf(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}`}function Zk(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}${Ur((isNaN(this.opacity)?1:this.opacity)*255)}`}function kf(){const e=Ca(this.opacity);return`${e===1?"rgb(":"rgba("}${Gr(this.r)}, ${Gr(this.g)}, ${Gr(this.b)}${e===1?")":`, ${e})`}`}function Ca(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ur(e){return e=Gr(e),(e<16?"0":"")+e.toString(16)}function Tf(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Be(e,t,r,i)}function Am(e){if(e instanceof Be)return new Be(e.h,e.s,e.l,e.opacity);if(e instanceof Zi||(e=qi(e)),!e)return new Be;if(e instanceof Be)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),s=Math.max(t,r,i),o=NaN,a=s-n,l=(s+n)/2;return a?(t===s?o=(r-i)/a+(r<i)*6:r===s?o=(i-t)/a+2:o=(t-r)/a+4,a/=l<.5?s+n:2-s-n,o*=60):a=l>0&&l<1?0:o,new Be(o,a,l,e.opacity)}function Qk(e,t,r,i){return arguments.length===1?Am(e):new Be(e,t,r,i??1)}function Be(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}to(Be,Qk,oh(Zi,{brighter(e){return e=e==null?wa:Math.pow(wa,e),new Be(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vn:Math.pow(Vn,e),new Be(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new ce(Ko(e>=240?e-240:e+120,n,i),Ko(e,n,i),Ko(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Be(Ef(this.h),Ms(this.s),Ms(this.l),Ca(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ca(this.opacity);return`${e===1?"hsl(":"hsla("}${Ef(this.h)}, ${Ms(this.s)*100}%, ${Ms(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ef(e){return e=(e||0)%360,e<0?e+360:e}function Ms(e){return Math.max(0,Math.min(1,e||0))}function Ko(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const eo=e=>()=>e;function Mm(e,t){return function(r){return e+r*t}}function Jk(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function t2(e,t){var r=t-e;return r?Mm(e,r>180||r<-180?r-360*Math.round(r/360):r):eo(isNaN(e)?t:e)}function e2(e){return(e=+e)==1?lh:function(t,r){return r-t?Jk(t,r,e):eo(isNaN(t)?r:t)}}function lh(e,t){var r=t-e;return r?Mm(e,r):eo(isNaN(e)?t:e)}const Xl=function e(t){var r=e2(t);function i(n,s){var o=r((n=Gl(n)).r,(s=Gl(s)).r),a=r(n.g,s.g),l=r(n.b,s.b),c=lh(n.opacity,s.opacity);return function(h){return n.r=o(h),n.g=a(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i}(1);function or(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Kl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Zo=new RegExp(Kl.source,"g");function r2(e){return function(){return e}}function i2(e){return function(t){return e(t)+""}}function $m(e,t){var r=Kl.lastIndex=Zo.lastIndex=0,i,n,s,o=-1,a=[],l=[];for(e=e+"",t=t+"";(i=Kl.exec(e))&&(n=Zo.exec(t));)(s=n.index)>r&&(s=t.slice(r,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(n=n[0])?a[o]?a[o]+=n:a[++o]=n:(a[++o]=null,l.push({i:o,x:or(i,n)})),r=Zo.lastIndex;return r<t.length&&(s=t.slice(r),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?i2(l[0].x):r2(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}var Lf=180/Math.PI,Zl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Bm(e,t,r,i,n,s){var o,a,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(a=Math.sqrt(r*r+i*i))&&(r/=a,i/=a,l/=a),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*Lf,skewX:Math.atan(l)*Lf,scaleX:o,scaleY:a}}var $s;function n2(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Zl:Bm(t.a,t.b,t.c,t.d,t.e,t.f)}function s2(e){return e==null||($s||($s=document.createElementNS("http://www.w3.org/2000/svg","g")),$s.setAttribute("transform",e),!(e=$s.transform.baseVal.consolidate()))?Zl:(e=e.matrix,Bm(e.a,e.b,e.c,e.d,e.e,e.f))}function Om(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function s(c,h,u,f,d,p){if(c!==u||h!==f){var g=d.push("translate(",null,t,null,r);p.push({i:g-4,x:or(c,u)},{i:g-2,x:or(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:or(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function a(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:or(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,d,p){if(c!==u||h!==f){var g=d.push(n(d)+"scale(",null,",",null,")");p.push({i:g-4,x:or(c,u)},{i:g-2,x:or(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),s(c.translateX,c.translateY,h.translateX,h.translateY,u,f),o(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var p=-1,g=f.length,y;++p<g;)u[(y=f[p]).i]=y.x(d);return u.join("")}}}var a2=Om(n2,"px, ","px)","deg)"),o2=Om(s2,", ",")",")"),Hi=0,En=0,yn=0,Rm=1e3,_a,Ln,Sa=0,ti=0,ro=0,Xn=typeof performance=="object"&&performance.now?performance:Date,Dm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ch(){return ti||(Dm(l2),ti=Xn.now()+ro)}function l2(){ti=0}function ka(){this._call=this._time=this._next=null}ka.prototype=Fm.prototype={constructor:ka,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?ch():+r)+(t==null?0:+t),!this._next&&Ln!==this&&(Ln?Ln._next=this:_a=this,Ln=this),this._call=e,this._time=r,Ql()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ql())}};function Fm(e,t,r){var i=new ka;return i.restart(e,t,r),i}function c2(){ch(),++Hi;for(var e=_a,t;e;)(t=ti-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Hi}function Af(){ti=(Sa=Xn.now())+ro,Hi=En=0;try{c2()}finally{Hi=0,u2(),ti=0}}function h2(){var e=Xn.now(),t=e-Sa;t>Rm&&(ro-=t,Sa=e)}function u2(){for(var e,t=_a,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:_a=r);Ln=e,Ql(i)}function Ql(e){if(!Hi){En&&(En=clearTimeout(En));var t=e-ti;t>24?(e<1/0&&(En=setTimeout(Af,e-Xn.now()-ro)),yn&&(yn=clearInterval(yn))):(yn||(Sa=Xn.now(),yn=setInterval(h2,Rm)),Hi=1,Dm(Af))}}function Mf(e,t,r){var i=new ka;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var f2=gm("start","end","cancel","interrupt"),d2=[],Im=0,$f=1,Jl=2,Vs=3,Bf=4,tc=5,Gs=6;function io(e,t,r,i,n,s){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;p2(e,r,{name:t,index:i,group:n,on:f2,tween:d2,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Im})}function hh(e,t){var r=Ie(e,t);if(r.state>Im)throw new Error("too late; already scheduled");return r}function Ze(e,t){var r=Ie(e,t);if(r.state>Vs)throw new Error("too late; already running");return r}function Ie(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function p2(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Fm(s,0,r.time);function s(c){r.state=$f,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,d;if(r.state!==$f)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===Vs)return Mf(o);d.state===Bf?(d.state=Gs,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Gs,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(Mf(function(){r.state===Vs&&(r.state=Bf,r.timer.restart(a,r.delay,r.time),a(c))}),r.state=Jl,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Jl){for(r.state=Vs,n=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=d);n.length=u+1}}function a(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=tc,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===tc&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Gs,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function g2(e,t){var r=e.__transition,i,n,s=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){s=!1;continue}n=i.state>Jl&&i.state<tc,i.state=Gs,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}s&&delete e.__transition}}function m2(e){return this.each(function(){g2(this,e)})}function y2(e,t){var r,i;return function(){var n=Ze(this,e),s=n.tween;if(s!==r){i=r=s;for(var o=0,a=i.length;o<a;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function x2(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=Ze(this,e),o=s.tween;if(o!==i){n=(i=o).slice();for(var a={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=a;break}l===c&&n.push(a)}s.tween=n}}function b2(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Ie(this.node(),r).tween,n=0,s=i.length,o;n<s;++n)if((o=i[n]).name===e)return o.value;return null}return this.each((t==null?y2:x2)(r,e,t))}function uh(e,t,r){var i=e._id;return e.each(function(){var n=Ze(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return Ie(n,i).value[t]}}function Nm(e,t){var r;return(typeof t=="number"?or:t instanceof qi?Xl:(r=qi(t))?(t=r,Xl):$m)(e,t)}function v2(e){return function(){this.removeAttribute(e)}}function w2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function C2(e,t,r){var i,n=r+"",s;return function(){var o=this.getAttribute(e);return o===n?null:o===i?s:s=t(i=o,r)}}function _2(e,t,r){var i,n=r+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?s:s=t(i=o,r)}}function S2(e,t,r){var i,n,s;return function(){var o,a=r(this),l;return a==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=a+"",o===l?null:o===i&&l===n?s:(n=l,s=t(i=o,a)))}}function k2(e,t,r){var i,n,s;return function(){var o,a=r(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=a+"",o===l?null:o===i&&l===n?s:(n=l,s=t(i=o,a)))}}function T2(e,t){var r=Ja(e),i=r==="transform"?o2:Nm;return this.attrTween(e,typeof t=="function"?(r.local?k2:S2)(r,i,uh(this,"attr."+e,t)):t==null?(r.local?w2:v2)(r):(r.local?_2:C2)(r,i,t))}function E2(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function L2(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function A2(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&L2(e,s)),r}return n._value=t,n}function M2(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&E2(e,s)),r}return n._value=t,n}function $2(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ja(e);return this.tween(r,(i.local?A2:M2)(i,t))}function B2(e,t){return function(){hh(this,e).delay=+t.apply(this,arguments)}}function O2(e,t){return t=+t,function(){hh(this,e).delay=t}}function R2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?B2:O2)(t,e)):Ie(this.node(),t).delay}function D2(e,t){return function(){Ze(this,e).duration=+t.apply(this,arguments)}}function F2(e,t){return t=+t,function(){Ze(this,e).duration=t}}function I2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?D2:F2)(t,e)):Ie(this.node(),t).duration}function N2(e,t){if(typeof t!="function")throw new Error;return function(){Ze(this,e).ease=t}}function P2(e){var t=this._id;return arguments.length?this.each(N2(t,e)):Ie(this.node(),t).ease}function j2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ze(this,e).ease=r}}function z2(e){if(typeof e!="function")throw new Error;return this.each(j2(this._id,e))}function W2(e){typeof e!="function"&&(e=xm(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],o=s.length,a=i[n]=[],l,c=0;c<o;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&a.push(l);return new dr(i,this._parents,this._name,this._id)}function q2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,s=Math.min(i,n),o=new Array(i),a=0;a<s;++a)for(var l=t[a],c=r[a],h=l.length,u=o[a]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;a<i;++a)o[a]=t[a];return new dr(o,this._parents,this._name,this._id)}function H2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function U2(e,t,r){var i,n,s=H2(t)?hh:Ze;return function(){var o=s(this,e),a=o.on;a!==i&&(n=(i=a).copy()).on(t,r),o.on=n}}function Y2(e,t){var r=this._id;return arguments.length<2?Ie(this.node(),r).on.on(e):this.each(U2(r,e,t))}function V2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function G2(){return this.on("end.remove",V2(this._id))}function X2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=sh(e));for(var i=this._groups,n=i.length,s=new Array(n),o=0;o<n;++o)for(var a=i[o],l=a.length,c=s[o]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=e.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,io(c[f],t,r,f,c,Ie(h,r)));return new dr(s,this._parents,t,r)}function K2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ym(e));for(var i=this._groups,n=i.length,s=[],o=[],a=0;a<n;++a)for(var l=i[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,p=Ie(h,r),g=0,y=f.length;g<y;++g)(d=f[g])&&io(d,t,r,g,f,p);s.push(f),o.push(h)}return new dr(s,o,t,r)}var Z2=os.prototype.constructor;function Q2(){return new Z2(this._groups,this._parents)}function J2(e,t){var r,i,n;return function(){var s=Wi(this,e),o=(this.style.removeProperty(e),Wi(this,e));return s===o?null:s===r&&o===i?n:n=t(r=s,i=o)}}function Pm(e){return function(){this.style.removeProperty(e)}}function tT(e,t,r){var i,n=r+"",s;return function(){var o=Wi(this,e);return o===n?null:o===i?s:s=t(i=o,r)}}function eT(e,t,r){var i,n,s;return function(){var o=Wi(this,e),a=r(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Wi(this,e))),o===l?null:o===i&&l===n?s:(n=l,s=t(i=o,a))}}function rT(e,t){var r,i,n,s="style."+t,o="end."+s,a;return function(){var l=Ze(this,e),c=l.on,h=l.value[s]==null?a||(a=Pm(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(o,n=h),l.on=i}}function iT(e,t,r){var i=(e+="")=="transform"?a2:Nm;return t==null?this.styleTween(e,J2(e,i)).on("end.style."+e,Pm(e)):typeof t=="function"?this.styleTween(e,eT(e,i,uh(this,"style."+e,t))).each(rT(this._id,e)):this.styleTween(e,tT(e,i,t),r).on("end.style."+e,null)}function nT(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function sT(e,t,r){var i,n;function s(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&nT(e,o,r)),i}return s._value=t,s}function aT(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,sT(e,t,r??""))}function oT(e){return function(){this.textContent=e}}function lT(e){return function(){var t=e(this);this.textContent=t??""}}function cT(e){return this.tween("text",typeof e=="function"?lT(uh(this,"text",e)):oT(e==null?"":e+""))}function hT(e){return function(t){this.textContent=e.call(this,t)}}function uT(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&hT(n)),t}return i._value=e,i}function fT(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,uT(e))}function dT(){for(var e=this._name,t=this._id,r=jm(),i=this._groups,n=i.length,s=0;s<n;++s)for(var o=i[s],a=o.length,l,c=0;c<a;++c)if(l=o[c]){var h=Ie(l,t);io(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new dr(i,this._parents,e,r)}function pT(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(s,o){var a={value:o},l={value:function(){--n===0&&s()}};r.each(function(){var c=Ze(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),n===0&&s()})}var gT=0;function dr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function jm(){return++gT}var ir=os.prototype;dr.prototype={constructor:dr,select:X2,selectAll:K2,selectChild:ir.selectChild,selectChildren:ir.selectChildren,filter:W2,merge:q2,selection:Q2,transition:dT,call:ir.call,nodes:ir.nodes,node:ir.node,size:ir.size,empty:ir.empty,each:ir.each,on:Y2,attr:T2,attrTween:$2,style:iT,styleTween:aT,text:cT,textTween:fT,remove:G2,tween:b2,delay:R2,duration:I2,ease:P2,easeVarying:z2,end:pT,[Symbol.iterator]:ir[Symbol.iterator]};function mT(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var yT={time:null,delay:0,duration:250,ease:mT};function xT(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function bT(e){var t,r;e instanceof dr?(t=e._id,e=e._name):(t=jm(),(r=yT).time=ch(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var o=i[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&io(l,e,t,c,o,r||xT(l,t));return new dr(i,this._parents,e,t)}os.prototype.interrupt=m2;os.prototype.transition=bT;const ec=Math.PI,rc=2*ec,Pr=1e-6,vT=rc-Pr;function zm(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function wT(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return zm;const r=10**t;return function(i){this._+=i[0];for(let n=1,s=i.length;n<s;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class CT{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?zm:wT(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,s,o){this._append`C${+t},${+r},${+i},${+n},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,i,n,s){if(t=+t,r=+r,i=+i,n=+n,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,a=this._y1,l=i-t,c=n-r,h=o-t,u=a-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Pr)if(!(Math.abs(u*l-c*h)>Pr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,p=n-a,g=l*l+c*c,y=d*d+p*p,x=Math.sqrt(g),b=Math.sqrt(f),w=s*Math.tan((ec-Math.acos((g+f-y)/(2*x*b)))/2),C=w/b,v=w/x;Math.abs(C-1)>Pr&&this._append`L${t+C*h},${r+C*u}`,this._append`A${s},${s},0,0,${+(u*d>h*p)},${this._x1=t+v*l},${this._y1=r+v*c}`}}arc(t,r,i,n,s,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(n),l=i*Math.sin(n),c=t+a,h=r+l,u=1^o,f=o?n-s:s-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Pr||Math.abs(this._y1-h)>Pr)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%rc+rc),f>vT?this._append`A${i},${i},0,1,${u},${t-a},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>Pr&&this._append`A${i},${i},0,${+(f>=ec)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function jr(e){return function(){return e}}const _T=Math.abs,ST=Math.atan2,kT=Math.cos,TT=Math.max,ET=Math.min,LT=Math.sin,AT=Math.sqrt,ic=1e-12,no=Math.PI,nc=no/2,MT=2*no;function $T(e){return e>1?0:e<-1?no:Math.acos(e)}function BT(e){return e>=1?nc:e<=-1?-nc:Math.asin(e)}function Wm(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new CT(t)}function qm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Hm(e){this._context=e}Hm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ta(e){return new Hm(e)}function OT(e){return e[0]}function RT(e){return e[1]}function Um(e,t){var r=jr(!0),i=null,n=Ta,s=null,o=Wm(a);e=typeof e=="function"?e:e===void 0?OT:jr(e),t=typeof t=="function"?t:t===void 0?RT:jr(t);function a(l){var c,h=(l=qm(l)).length,u,f=!1,d;for(i==null&&(s=n(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(u,c,l),+t(u,c,l));if(d)return s=null,d+""||null}return a.x=function(l){return arguments.length?(e=typeof l=="function"?l:jr(+l),a):e},a.y=function(l){return arguments.length?(t=typeof l=="function"?l:jr(+l),a):t},a.defined=function(l){return arguments.length?(r=typeof l=="function"?l:jr(!!l),a):r},a.curve=function(l){return arguments.length?(n=l,i!=null&&(s=n(i)),a):n},a.context=function(l){return arguments.length?(l==null?i=s=null:s=n(i=l),a):i},a}class Ym{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Vm(e){return new Ym(e,!0)}function Gm(e){return new Ym(e,!1)}function Tr(){}function Ea(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function so(e){this._context=e}so.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ea(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ea(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function In(e){return new so(e)}function Xm(e){this._context=e}Xm.prototype={areaStart:Tr,areaEnd:Tr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ea(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function DT(e){return new Xm(e)}function Km(e){this._context=e}Km.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Ea(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function FT(e){return new Km(e)}function Zm(e,t){this._basis=new so(e),this._beta=t}Zm.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],s=e[r]-i,o=t[r]-n,a=-1,l;++a<=r;)l=a/r,this._basis.point(this._beta*e[a]+(1-this._beta)*(i+l*s),this._beta*t[a]+(1-this._beta)*(n+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const IT=function e(t){function r(i){return t===1?new so(i):new Zm(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function La(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function fh(e,t){this._context=e,this._k=(1-t)/6}fh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:La(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:La(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Qm=function e(t){function r(i){return new fh(i,t)}return r.tension=function(i){return e(+i)},r}(0);function dh(e,t){this._context=e,this._k=(1-t)/6}dh.prototype={areaStart:Tr,areaEnd:Tr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:La(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const NT=function e(t){function r(i){return new dh(i,t)}return r.tension=function(i){return e(+i)},r}(0);function ph(e,t){this._context=e,this._k=(1-t)/6}ph.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:La(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const PT=function e(t){function r(i){return new ph(i,t)}return r.tension=function(i){return e(+i)},r}(0);function gh(e,t,r){var i=e._x1,n=e._y1,s=e._x2,o=e._y2;if(e._l01_a>ic){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ic){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,s,o,e._x2,e._y2)}function Jm(e,t){this._context=e,this._alpha=t}Jm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:gh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ty=function e(t){function r(i){return t?new Jm(i,t):new fh(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function ey(e,t){this._context=e,this._alpha=t}ey.prototype={areaStart:Tr,areaEnd:Tr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:gh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const jT=function e(t){function r(i){return t?new ey(i,t):new dh(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function ry(e,t){this._context=e,this._alpha=t}ry.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zT=function e(t){function r(i){return t?new ry(i,t):new ph(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function iy(e){this._context=e}iy.prototype={areaStart:Tr,areaEnd:Tr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function WT(e){return new iy(e)}function Of(e){return e<0?-1:1}function Rf(e,t,r){var i=e._x1-e._x0,n=t-e._x1,s=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),a=(s*n+o*i)/(i+n);return(Of(s)+Of(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function Df(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Qo(e,t,r){var i=e._x0,n=e._y0,s=e._x1,o=e._y1,a=(s-i)/3;e._context.bezierCurveTo(i+a,n+a*t,s-a,o-a*r,s,o)}function Aa(e){this._context=e}Aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Qo(this,this._t0,Df(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Qo(this,Df(this,r=Rf(this,e,t)),r);break;default:Qo(this,this._t0,r=Rf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ny(e){this._context=new sy(e)}(ny.prototype=Object.create(Aa.prototype)).point=function(e,t){Aa.prototype.point.call(this,t,e)};function sy(e){this._context=e}sy.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,s){this._context.bezierCurveTo(t,e,i,r,s,n)}};function ay(e){return new Aa(e)}function oy(e){return new ny(e)}function ly(e){this._context=e}ly.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Ff(e),n=Ff(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ff(e){var t,r=e.length-1,i,n=new Array(r),s=new Array(r),o=new Array(r);for(n[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(n[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)n[t]=(o[t]-n[t+1])/s[t];for(s[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-n[t+1];return[n,s]}function cy(e){return new ly(e)}function ao(e,t){this._context=e,this._t=t}ao.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function hy(e){return new ao(e,.5)}function uy(e){return new ao(e,0)}function fy(e){return new ao(e,1)}function An(e,t,r){this.k=e,this.x=t,this.y=r}An.prototype={constructor:An,scale:function(e){return e===1?this:new An(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new An(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};An.prototype;var dy=typeof global=="object"&&global&&global.Object===Object&&global,qT=typeof self=="object"&&self&&self.Object===Object&&self,Qe=dy||qT||Function("return this")(),Kn=Qe.Symbol,py=Object.prototype,HT=py.hasOwnProperty,UT=py.toString,xn=Kn?Kn.toStringTag:void 0;function YT(e){var t=HT.call(e,xn),r=e[xn];try{e[xn]=void 0;var i=!0}catch{}var n=UT.call(e);return i&&(t?e[xn]=r:delete e[xn]),n}var VT=Object.prototype,GT=VT.toString;function XT(e){return GT.call(e)}var KT="[object Null]",ZT="[object Undefined]",If=Kn?Kn.toStringTag:void 0;function si(e){return e==null?e===void 0?ZT:KT:If&&If in Object(e)?YT(e):XT(e)}function Mr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var QT="[object AsyncFunction]",JT="[object Function]",tE="[object GeneratorFunction]",eE="[object Proxy]";function oo(e){if(!Mr(e))return!1;var t=si(e);return t==JT||t==tE||t==QT||t==eE}var Jo=Qe["__core-js_shared__"],Nf=function(){var e=/[^.]+$/.exec(Jo&&Jo.keys&&Jo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function rE(e){return!!Nf&&Nf in e}var iE=Function.prototype,nE=iE.toString;function ai(e){if(e!=null){try{return nE.call(e)}catch{}try{return e+""}catch{}}return""}var sE=/[\\^$.*+?()[\]{}|]/g,aE=/^\[object .+?Constructor\]$/,oE=Function.prototype,lE=Object.prototype,cE=oE.toString,hE=lE.hasOwnProperty,uE=RegExp("^"+cE.call(hE).replace(sE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fE(e){if(!Mr(e)||rE(e))return!1;var t=oo(e)?uE:aE;return t.test(ai(e))}function dE(e,t){return e?.[t]}function oi(e,t){var r=dE(e,t);return fE(r)?r:void 0}var Zn=oi(Object,"create");function pE(){this.__data__=Zn?Zn(null):{},this.size=0}function gE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mE="__lodash_hash_undefined__",yE=Object.prototype,xE=yE.hasOwnProperty;function bE(e){var t=this.__data__;if(Zn){var r=t[e];return r===mE?void 0:r}return xE.call(t,e)?t[e]:void 0}var vE=Object.prototype,wE=vE.hasOwnProperty;function CE(e){var t=this.__data__;return Zn?t[e]!==void 0:wE.call(t,e)}var _E="__lodash_hash_undefined__";function SE(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Zn&&t===void 0?_E:t,this}function ei(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ei.prototype.clear=pE;ei.prototype.delete=gE;ei.prototype.get=bE;ei.prototype.has=CE;ei.prototype.set=SE;function kE(){this.__data__=[],this.size=0}function ls(e,t){return e===t||e!==e&&t!==t}function lo(e,t){for(var r=e.length;r--;)if(ls(e[r][0],t))return r;return-1}var TE=Array.prototype,EE=TE.splice;function LE(e){var t=this.__data__,r=lo(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():EE.call(t,r,1),--this.size,!0}function AE(e){var t=this.__data__,r=lo(t,e);return r<0?void 0:t[r][1]}function ME(e){return lo(this.__data__,e)>-1}function $E(e,t){var r=this.__data__,i=lo(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function mr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}mr.prototype.clear=kE;mr.prototype.delete=LE;mr.prototype.get=AE;mr.prototype.has=ME;mr.prototype.set=$E;var Qn=oi(Qe,"Map");function BE(){this.size=0,this.__data__={hash:new ei,map:new(Qn||mr),string:new ei}}function OE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function co(e,t){var r=e.__data__;return OE(t)?r[typeof t=="string"?"string":"hash"]:r.map}function RE(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t}function DE(e){return co(this,e).get(e)}function FE(e){return co(this,e).has(e)}function IE(e,t){var r=co(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function yr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}yr.prototype.clear=BE;yr.prototype.delete=RE;yr.prototype.get=DE;yr.prototype.has=FE;yr.prototype.set=IE;var NE="Expected a function";function Qi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(NE);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var o=e.apply(this,i);return r.cache=s.set(n,o)||s,o};return r.cache=new(Qi.Cache||yr),r}Qi.Cache=yr;function PE(){this.__data__=new mr,this.size=0}function jE(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function zE(e){return this.__data__.get(e)}function WE(e){return this.__data__.has(e)}var qE=200;function HE(e,t){var r=this.__data__;if(r instanceof mr){var i=r.__data__;if(!Qn||i.length<qE-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new yr(i)}return r.set(e,t),this.size=r.size,this}function li(e){var t=this.__data__=new mr(e);this.size=t.size}li.prototype.clear=PE;li.prototype.delete=jE;li.prototype.get=zE;li.prototype.has=WE;li.prototype.set=HE;var Ma=function(){try{var e=oi(Object,"defineProperty");return e({},"",{}),e}catch{}}();function ho(e,t,r){t=="__proto__"&&Ma?Ma(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function sc(e,t,r){(r!==void 0&&!ls(e[t],r)||r===void 0&&!(t in e))&&ho(e,t,r)}function UE(e){return function(t,r,i){for(var n=-1,s=Object(t),o=i(t),a=o.length;a--;){var l=o[++n];if(r(s[l],l,s)===!1)break}return t}}var gy=UE(),my=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pf=my&&typeof module=="object"&&module&&!module.nodeType&&module,YE=Pf&&Pf.exports===my,jf=YE?Qe.Buffer:void 0,zf=jf?jf.allocUnsafe:void 0;function yy(e,t){if(t)return e.slice();var r=e.length,i=zf?zf(r):new e.constructor(r);return e.copy(i),i}var ac=Qe.Uint8Array;function xy(e){var t=new e.constructor(e.byteLength);return new ac(t).set(new ac(e)),t}function by(e,t){var r=t?xy(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function vy(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Wf=Object.create,VE=function(){function e(){}return function(t){if(!Mr(t))return{};if(Wf)return Wf(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function wy(e,t){return function(r){return e(t(r))}}var mh=wy(Object.getPrototypeOf,Object),GE=Object.prototype;function cs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||GE;return e===r}function Cy(e){return typeof e.constructor=="function"&&!cs(e)?VE(mh(e)):{}}function Ji(e){return e!=null&&typeof e=="object"}var XE="[object Arguments]";function qf(e){return Ji(e)&&si(e)==XE}var _y=Object.prototype,KE=_y.hasOwnProperty,ZE=_y.propertyIsEnumerable,Jn=qf(function(){return arguments}())?qf:function(e){return Ji(e)&&KE.call(e,"callee")&&!ZE.call(e,"callee")},ts=Array.isArray,QE=9007199254740991;function yh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=QE}function hs(e){return e!=null&&yh(e.length)&&!oo(e)}function Sy(e){return Ji(e)&&hs(e)}function JE(){return!1}var ky=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hf=ky&&typeof module=="object"&&module&&!module.nodeType&&module,tL=Hf&&Hf.exports===ky,Uf=tL?Qe.Buffer:void 0,eL=Uf?Uf.isBuffer:void 0,uo=eL||JE,rL="[object Object]",iL=Function.prototype,nL=Object.prototype,Ty=iL.toString,sL=nL.hasOwnProperty,aL=Ty.call(Object);function oL(e){if(!Ji(e)||si(e)!=rL)return!1;var t=mh(e);if(t===null)return!0;var r=sL.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ty.call(r)==aL}var lL="[object Arguments]",cL="[object Array]",hL="[object Boolean]",uL="[object Date]",fL="[object Error]",dL="[object Function]",pL="[object Map]",gL="[object Number]",mL="[object Object]",yL="[object RegExp]",xL="[object Set]",bL="[object String]",vL="[object WeakMap]",wL="[object ArrayBuffer]",CL="[object DataView]",_L="[object Float32Array]",SL="[object Float64Array]",kL="[object Int8Array]",TL="[object Int16Array]",EL="[object Int32Array]",LL="[object Uint8Array]",AL="[object Uint8ClampedArray]",ML="[object Uint16Array]",$L="[object Uint32Array]",Rt={};Rt[_L]=Rt[SL]=Rt[kL]=Rt[TL]=Rt[EL]=Rt[LL]=Rt[AL]=Rt[ML]=Rt[$L]=!0;Rt[lL]=Rt[cL]=Rt[wL]=Rt[hL]=Rt[CL]=Rt[uL]=Rt[fL]=Rt[dL]=Rt[pL]=Rt[gL]=Rt[mL]=Rt[yL]=Rt[xL]=Rt[bL]=Rt[vL]=!1;function BL(e){return Ji(e)&&yh(e.length)&&!!Rt[si(e)]}function Ey(e){return function(t){return e(t)}}var Ly=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Ly&&typeof module=="object"&&module&&!module.nodeType&&module,OL=Nn&&Nn.exports===Ly,tl=OL&&dy.process,oc=function(){try{var e=Nn&&Nn.require&&Nn.require("util").types;return e||tl&&tl.binding&&tl.binding("util")}catch{}}(),Yf=oc&&oc.isTypedArray,fo=Yf?Ey(Yf):BL;function lc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var RL=Object.prototype,DL=RL.hasOwnProperty;function Ay(e,t,r){var i=e[t];(!(DL.call(e,t)&&ls(i,r))||r===void 0&&!(t in e))&&ho(e,t,r)}function My(e,t,r,i){var n=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),n?ho(r,a,l):Ay(r,a,l)}return r}function FL(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var IL=9007199254740991,NL=/^(?:0|[1-9]\d*)$/;function xh(e,t){var r=typeof e;return t=t??IL,!!t&&(r=="number"||r!="symbol"&&NL.test(e))&&e>-1&&e%1==0&&e<t}var PL=Object.prototype,jL=PL.hasOwnProperty;function $y(e,t){var r=ts(e),i=!r&&Jn(e),n=!r&&!i&&uo(e),s=!r&&!i&&!n&&fo(e),o=r||i||n||s,a=o?FL(e.length,String):[],l=a.length;for(var c in e)(t||jL.call(e,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||xh(c,l)))&&a.push(c);return a}function zL(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var WL=Object.prototype,qL=WL.hasOwnProperty;function HL(e){if(!Mr(e))return zL(e);var t=cs(e),r=[];for(var i in e)i=="constructor"&&(t||!qL.call(e,i))||r.push(i);return r}function bh(e){return hs(e)?$y(e,!0):HL(e)}function UL(e){return My(e,bh(e))}function YL(e,t,r,i,n,s,o){var a=lc(e,r),l=lc(t,r),c=o.get(l);if(c){sc(e,r,c);return}var h=s?s(a,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=ts(l),d=!f&&uo(l),p=!f&&!d&&fo(l);h=l,f||d||p?ts(a)?h=a:Sy(a)?h=vy(a):d?(u=!1,h=yy(l,!0)):p?(u=!1,h=by(l,!0)):h=[]:oL(l)||Jn(l)?(h=a,Jn(a)?h=UL(a):(!Mr(a)||oo(a))&&(h=Cy(l))):u=!1}u&&(o.set(l,h),n(h,l,i,s,o),o.delete(l)),sc(e,r,h)}function By(e,t,r,i,n){e!==t&&gy(t,function(s,o){if(n||(n=new li),Mr(s))YL(e,t,o,r,By,i,n);else{var a=i?i(lc(e,o),s,o+"",e,t,n):void 0;a===void 0&&(a=s),sc(e,o,a)}},bh)}function vh(e){return e}function VL(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Vf=Math.max;function Oy(e,t,r){return t=Vf(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,s=Vf(i.length-t,0),o=Array(s);++n<s;)o[n]=i[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=i[n];return a[t]=r(o),VL(e,this,a)}}function Ry(e){return function(){return e}}var GL=Ma?function(e,t){return Ma(e,"toString",{configurable:!0,enumerable:!1,value:Ry(t),writable:!0})}:vh,XL=800,KL=16,ZL=Date.now;function QL(e){var t=0,r=0;return function(){var i=ZL(),n=KL-(i-r);if(r=i,n>0){if(++t>=XL)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Dy=QL(GL);function Fy(e,t){return Dy(Oy(e,t,vh),e+"")}function Iy(e,t,r){if(!Mr(r))return!1;var i=typeof t;return(i=="number"?hs(r)&&xh(t,r.length):i=="string"&&t in r)?ls(r[t],e):!1}function Ny(e){return Fy(function(t,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(n--,s):void 0,o&&Iy(r[0],r[1],o)&&(s=n<3?void 0:s,n=1),t=Object(t);++i<n;){var a=r[i];a&&e(t,a,i,s)}return t})}var Py=Ny(function(e,t,r){By(e,t,r)}),jy="​",JL={curveBasis:In,curveBasisClosed:DT,curveBasisOpen:FT,curveBumpX:Vm,curveBumpY:Gm,curveBundle:IT,curveCardinalClosed:NT,curveCardinalOpen:PT,curveCardinal:Qm,curveCatmullRomClosed:jT,curveCatmullRomOpen:zT,curveCatmullRom:ty,curveLinear:Ta,curveLinearClosed:WT,curveMonotoneX:ay,curveMonotoneY:oy,curveNatural:cy,curveStep:hy,curveStepAfter:fy,curveStepBefore:uy},tA=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,eA=m(function(e,t){const r=zy(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(a=>a.args);ha(o),i=Gt(i,[...o])}else i=r.args;if(!i)return;let n=zc(e,t);const s="config";return i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s]),i},"detectInit"),zy=m(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${tA.source})(?=[}][%]{2}).*
165
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),V.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=Dn.exec(e))!==null;)if(i.index===Dn.lastIndex&&Dn.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:s,args:o})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return V.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),rA=m(function(e){return e.replace(Dn,"")},"removeDirectives"),iA=m(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function wh(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return JL[r]??t}m(wh,"interpolateToCurve");function Wy(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?pm.sanitizeUrl(r):r}m(Wy,"formatUrl");var nA=m((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){V.error(`Function name: ${e} not found in window`);return}s[n](...t)},"runFunc");function Ch(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}m(Ch,"distance");function qy(e){let t,r=0;e.forEach(n=>{r+=Ch(n,t),t=n});const i=r/2;return _h(e,i)}m(qy,"traverseEdge");function Hy(e){return e.length===1?e[0]:qy(e)}m(Hy,"calcLabelPosition");var Gf=m((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),_h=m((e,t)=>{let r,i=t;for(const n of e){if(r){const s=Ch(n,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:Gf((1-o)*r.x+o*n.x,5),y:Gf((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),sA=m((e,t,r)=>{V.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=_h(t,25),s=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),a={x:0,y:0};return a.x=Math.sin(o)*s+(t[0].x+n.x)/2,a.y=-Math.cos(o)*s+(t[0].y+n.y)/2,a},"calcCardinalityPosition");function Uy(e,t,r){const i=structuredClone(r);V.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,s=_h(i,n),o=10+e*.5,a=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(a+Math.PI)*o+(i[0].x+s.x)/2,l.y=-Math.cos(a+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(a-Math.PI)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(a-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(a)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(a)*o+(i[0].y+s.y)/2-5):(l.x=Math.sin(a)*o+(i[0].x+s.x)/2,l.y=-Math.cos(a)*o+(i[0].y+s.y)/2),l}m(Uy,"calcTerminalLabelPosition");function Sh(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}m(Sh,"getStylesFromArray");var Xf=0,Yy=m(()=>(Xf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Xf),"generateId");function Vy(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}m(Vy,"makeRandomHex");var Gy=m(e=>Vy(e.length),"random"),aA=m(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),oA=m(function(e,t){const r=t.text.replace(ni.lineBreakRegex," "),[,i]=us(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const s=n.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),n},"drawSimpleText"),Xy=Qi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ni.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let s="";return i.forEach((o,a)=>{const l=Ke(`${o} `,r),c=Ke(s,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=lA(o,t,"-",r);n.push(s,...f),s=d}else c+l>=t?(n.push(s),s=o):s=[s,o].filter(Boolean).join(" ");a+1===i.length&&n.push(s)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),lA=Qi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],s=[];let o="";return n.forEach((a,l)=>{const c=`${o}${a}`;if(Ke(c,i)>=t){const u=l+1,f=n.length===u,d=`${c}${r}`;s.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function kh(e,t){return Th(e,t).height}m(kh,"calculateTextHeight");function Ke(e,t){return Th(e,t).width}m(Ke,"calculateTextWidth");var Th=Qi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,s]=us(r),o=["sans-serif",i],a=e.split(ni.lineBreakRegex),l=[],c=St("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const p={width:0,height:0,lineHeight:0};for(const g of a){const y=aA();y.text=g||jy;const x=oA(h,y).style("font-size",s).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,b.width)),d=Math.round(b.height),p.height+=d,p.lineHeight=Math.round(Math.max(p.lineHeight,d))}l.push(p)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Fi,cA=(Fi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},m(Fi,"InitIDGenerator"),Fi),Bs,hA=m(function(e){return Bs=Bs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Bs.innerHTML=e,unescape(Bs.textContent)},"entityDecode");function Eh(e){return"str"in e}m(Eh,"isDetailedError");var uA=m((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),us=m(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function po(e,t){return Py({},e,t)}m(po,"cleanAndMerge");var Le={assignWithDepth:Gt,wrapLabel:Xy,calculateTextHeight:kh,calculateTextWidth:Ke,calculateTextDimensions:Th,cleanAndMerge:po,detectInit:eA,detectDirective:zy,isSubstringInArray:iA,interpolateToCurve:wh,calcLabelPosition:Hy,calcCardinalityPosition:sA,calcTerminalLabelPosition:Uy,formatUrl:Wy,getStylesFromArray:Sh,generateId:Yy,random:Gy,runFunc:nA,entityDecode:hA,insertTitle:uA,isLabelCoordinateInPath:Ky,parseFontSize:us,InitIDGenerator:cA},fA=m(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),$r=m(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),dA=m((e,t,{counter:r=0,prefix:i,suffix:n},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function be(e){return e??null}m(be,"handleUndefinedAttr");function Ky(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return n.includes(r.toString())||n.includes(i.toString())}m(Ky,"isLabelCoordinateInPath");const pA=Object.freeze({left:0,top:0,width:16,height:16}),$a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Zy=Object.freeze({...pA,...$a}),gA=Object.freeze({...Zy,body:"",hidden:!1}),mA=Object.freeze({width:null,height:null}),yA=Object.freeze({...mA,...$a}),xA=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const a=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:a};return el(c)?c:null}const s=n[0],o=s.split("-");if(o.length>1){const a={provider:i,prefix:o.shift(),name:o.join("-")};return el(a)?a:null}if(r&&i===""){const a={provider:i,prefix:"",name:s};return el(a,r)?a:null}return null},el=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function bA(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Kf(e,t){const r=bA(e,t);for(const i in gA)i in $a?i in e&&!(i in r)&&(r[i]=$a[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function vA(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function s(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const a=i[o]&&i[o].parent,l=a&&s(a);l&&(n[o]=[a].concat(l))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),n}function Zf(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let s={};function o(a){s=Kf(i[a]||n[a],s)}return o(t),r.forEach(o),Kf(e,s)}function wA(e,t){if(e.icons[t])return Zf(e,t,[]);const r=vA(e,[t])[t];return r?Zf(e,t,r):null}const CA=/(-?[0-9.]*[0-9]+[0-9.]*)/g,_A=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Qf(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(CA);if(i===null||!i.length)return e;const n=[];let s=i.shift(),o=_A.test(s);for(;;){if(o){const a=parseFloat(s);isNaN(a)?n.push(s):n.push(Math.ceil(a*t*r)/r)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");o=!o}}function SA(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),s=e.indexOf("</"+t);if(n===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(n+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function kA(e,t){return e?"<defs>"+e+"</defs>"+t:t}function TA(e,t,r){const i=SA(e);return kA(i.defs,t+i.content+r)}const EA=e=>e==="unset"||e==="undefined"||e==="none";function LA(e,t){const r={...Zy,...e},i={...yA,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(g=>{const y=[],x=g.hFlip,b=g.vFlip;let w=g.rotate;x?b?w+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let C;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:C=n.height/2+n.top,y.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:C=n.width/2+n.left,y.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}w%2===1&&(n.left!==n.top&&(C=n.left,n.left=n.top,n.top=C),n.width!==n.height&&(C=n.width,n.width=n.height,n.height=C)),y.length&&(s=TA(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,a=i.height,l=n.width,c=n.height;let h,u;o===null?(u=a===null?"1em":a==="auto"?c:a,h=Qf(u,l/c)):(h=o==="auto"?l:o,u=a===null?Qf(h,c/l):a==="auto"?c:a);const f={},d=(g,y)=>{EA(y)||(f[g]=y.toString())};d("width",h),d("height",u);const p=[n.left,n.top,l,c];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:s}}const AA=/\sid="(\S+)"/g,MA="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let $A=0;function BA(e,t=MA){const r=[];let i;for(;i=AA.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{const o=typeof t=="function"?t(s):t+($A++).toString(),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function OA(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Lh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ci=Lh();function Qy(e){ci=e}var Pn={exec:()=>null};function Bt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(he.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var he={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},RA=/^(?:[ \t]*(?:\n|$))+/,DA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,FA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,fs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,IA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ah=/(?:[*+-]|\d{1,9}[.)])/,Jy=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,t0=Bt(Jy).replace(/bull/g,Ah).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),NA=Bt(Jy).replace(/bull/g,Ah).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Mh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,PA=/^[^\n]+/,$h=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jA=Bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zA=Bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ah).getRegex(),go="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Bh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,WA=Bt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Bh).replace("tag",go).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),e0=Bt(Mh).replace("hr",fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",go).getRegex(),qA=Bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",e0).getRegex(),Oh={blockquote:qA,code:DA,def:jA,fences:FA,heading:IA,hr:fs,html:WA,lheading:t0,list:zA,newline:RA,paragraph:e0,table:Pn,text:PA},Jf=Bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",go).getRegex(),HA={...Oh,lheading:NA,table:Jf,paragraph:Bt(Mh).replace("hr",fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Jf).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",go).getRegex()},UA={...Oh,html:Bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Bh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Pn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Bt(Mh).replace("hr",fs).replace("heading",` *#{1,6} *[^
166
- ]`).replace("lheading",t0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},YA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,VA=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,r0=/^( {2,}|\\)\n(?!\s*$)/,GA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,mo=/[\p{P}\p{S}]/u,Rh=/[\s\p{P}\p{S}]/u,i0=/[^\s\p{P}\p{S}]/u,XA=Bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rh).getRegex(),n0=/(?!~)[\p{P}\p{S}]/u,KA=/(?!~)[\s\p{P}\p{S}]/u,ZA=/(?:[^\s\p{P}\p{S}]|~)/u,QA=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,s0=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,JA=Bt(s0,"u").replace(/punct/g,mo).getRegex(),tM=Bt(s0,"u").replace(/punct/g,n0).getRegex(),a0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",eM=Bt(a0,"gu").replace(/notPunctSpace/g,i0).replace(/punctSpace/g,Rh).replace(/punct/g,mo).getRegex(),rM=Bt(a0,"gu").replace(/notPunctSpace/g,ZA).replace(/punctSpace/g,KA).replace(/punct/g,n0).getRegex(),iM=Bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,i0).replace(/punctSpace/g,Rh).replace(/punct/g,mo).getRegex(),nM=Bt(/\\(punct)/,"gu").replace(/punct/g,mo).getRegex(),sM=Bt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),aM=Bt(Bh).replace("(?:-->|$)","-->").getRegex(),oM=Bt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",aM).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ba=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,lM=Bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ba).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),o0=Bt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ba).replace("ref",$h).getRegex(),l0=Bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",$h).getRegex(),cM=Bt("reflink|nolink(?!\\()","g").replace("reflink",o0).replace("nolink",l0).getRegex(),Dh={_backpedal:Pn,anyPunctuation:nM,autolink:sM,blockSkip:QA,br:r0,code:VA,del:Pn,emStrongLDelim:JA,emStrongRDelimAst:eM,emStrongRDelimUnd:iM,escape:YA,link:lM,nolink:l0,punctuation:XA,reflink:o0,reflinkSearch:cM,tag:oM,text:GA,url:Pn},hM={...Dh,link:Bt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ba).getRegex(),reflink:Bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ba).getRegex()},cc={...Dh,emStrongRDelimAst:rM,emStrongLDelim:tM,url:Bt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},uM={...cc,br:Bt(r0).replace("{2,}","*").getRegex(),text:Bt(cc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Os={normal:Oh,gfm:HA,pedantic:UA},bn={normal:Dh,gfm:cc,breaks:uM,pedantic:hM},fM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},td=e=>fM[e];function qe(e,t){if(t){if(he.escapeTest.test(e))return e.replace(he.escapeReplace,td)}else if(he.escapeTestNoEncode.test(e))return e.replace(he.escapeReplaceNoEncode,td);return e}function ed(e){try{e=encodeURI(e).replace(he.percentDecode,"%")}catch{return null}return e}function rd(e,t){let r=e.replace(he.findPipe,(s,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(he.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(he.slashPipe,"|");return i}function vn(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function dM(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function id(e,t,r,i,n){let s=t.href,o=t.title||null,a=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function pM(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
167
- `).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[a]=o;return a.length>=n.length?s.slice(n.length):s}).join(`
168
- `)}var Oa=class{options;rules;lexer;constructor(t){this.options=t||ci}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:vn(i,`
169
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=pM(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=vn(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:vn(r[0],`
170
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=vn(r[0],`
171
- `).split(`
172
- `),n="",s="",o=[];for(;i.length>0;){let a=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),a=!0;else if(!a)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
173
- `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
174
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
175
- ${h}`:h,s=s?`${s}
176
- ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let p=d,g=p.raw+`
177
- `+i.join(`
178
- `),y=this.blockquote(g);o[o.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,s=s.substring(0,s.length-p.text.length)+y.text;break}else if(d?.type==="list"){let p=d,g=p.raw+`
179
- `+i.join(`
180
- `),y=this.list(g);o[o.length-1]=y,n=n.substring(0,n.length-d.raw.length)+y.raw,s=s.substring(0,s.length-p.raw.length)+y.raw,i=g.substring(o.at(-1).raw.length).split(`
181
- `);continue}}return{type:"blockquote",raw:n,tokens:o,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let o=this.rules.other.listItemRegex(i),a=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
182
- `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
183
- `,1)[0],p=!f.trim(),g=0;if(this.options.pedantic?(g=2,u=f.trimStart()):p?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=f.slice(g),g+=r[1].length),p&&this.rules.other.blankLine.test(d)&&(h+=d+`
184
- `,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(g),w=this.rules.other.hrRegex(g),C=this.rules.other.fencesBeginRegex(g),v=this.rules.other.headingBeginRegex(g),E=this.rules.other.htmlBeginRegex(g);for(;t;){let T=t.split(`
185
- `,1)[0],N;if(d=T,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),N=d):N=d.replace(this.rules.other.tabCharGlobal," "),C.test(d)||v.test(d)||E.test(d)||b.test(d)||w.test(d))break;if(N.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
186
- `+N.slice(g);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(f)||v.test(f)||w.test(f))break;u+=`
187
- `+d}!p&&!d.trim()&&(p=!0),h+=T+`
188
- `,t=t.substring(T.length+1),f=N.slice(g)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(a=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=u}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=rd(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
189
- `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<i.length;a++)o.header.push({text:i[a],tokens:this.lexer.inline(i[a]),header:!0,align:o.align[a]});for(let a of s)o.rows.push(rd(a,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
190
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=vn(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=dM(r[2],"()");if(o===-2)return;if(o>-1){let a=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,a).trim(),r[3]=""}}let n=r[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],s=o[3])}else s=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),id(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[n.toLowerCase()];if(!s){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return id(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...n[0]].length-1,o,a,l=s,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(n=h.exec(r))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(a=[...o].length,n[3]||n[4]){l+=a;continue}else if((n[5]||n[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let u=[...n[0]][0].length,f=t.slice(0,s+n.index+u+a);if(Math.min(s,a)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},cr=class hc{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ci,this.options.tokenizer=this.options.tokenizer||new Oa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:he,block:Os.normal,inline:bn.normal};this.options.pedantic?(r.block=Os.pedantic,r.inline=bn.pedantic):this.options.gfm&&(r.block=Os.gfm,this.options.breaks?r.inline=bn.breaks:r.inline=bn.gfm),this.tokenizer.rules=r}static get rules(){return{block:Os,inline:bn}}static lex(t,r){return new hc(r).lex(t)}static lexInline(t,r){return new hc(r).inlineTokens(t)}lex(t){t=t.replace(he.carriageReturn,`
191
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(he.tabCharGlobal," ").replace(he.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
192
- `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
193
- `)?"":`
194
- `)+n.raw,o.text+=`
195
- `+n.text,this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
196
- `)?"":`
197
- `)+n.raw,o.text+=`
198
- `+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0,a=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s))){let o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
199
- `)?"":`
200
- `)+n.raw,o.text+=`
201
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n),i=s.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
202
- `)?"":`
203
- `)+n.raw,o.text+=`
204
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)a.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,o="";for(;t;){s||(o=""),s=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let c=r.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(a=this.tokenizer.emStrong(t,i,o)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.del(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),r.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),r.push(a);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0,h=t.slice(1),u;this.options.extensions.startInline.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(o=a.raw.slice(-1)),s=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},Ra=class{options;parser;constructor(t){this.options=t||ci}space(t){return""}code({text:t,lang:r,escaped:i}){let n=(r||"").match(he.notSpaceStart)?.[0],s=t.replace(he.endingNewline,"")+`
205
- `;return n?'<pre><code class="language-'+qe(n)+'">'+(i?s:qe(s,!0))+`</code></pre>
206
- `:"<pre><code>"+(i?s:qe(s,!0))+`</code></pre>
207
- `}blockquote({tokens:t}){return`<blockquote>
208
- ${this.parser.parse(t)}</blockquote>
209
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
210
- `}hr(t){return`<hr>
211
- `}list(t){let r=t.ordered,i=t.start,n="";for(let a=0;a<t.items.length;a++){let l=t.items[a];n+=this.listitem(l)}let s=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+s+o+`>
212
- `+n+"</"+s+`>
213
- `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+qe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
214
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
215
- `}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let n="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];i="";for(let a=0;a<o.length;a++)i+=this.tablecell(o[a]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
216
- <thead>
217
- `+r+`</thead>
218
- `+n+`</table>
219
- `}tablerow({text:t}){return`<tr>
220
- ${t}</tr>
221
- `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
222
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${qe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),s=ed(t);if(s===null)return n;t=s;let o='<a href="'+t+'"';return r&&(o+=' title="'+qe(r)+'"'),o+=">"+n+"</a>",o}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let s=ed(t);if(s===null)return qe(i);t=s;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${qe(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:qe(t.text)}},Fh=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},hr=class uc{options;renderer;textRenderer;constructor(t){this.options=t||ci,this.options.renderer=this.options.renderer||new Ra,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Fh}static parse(t,r){return new uc(r).parse(t)}static parseInline(t,r){return new uc(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let s=t[n];if(this.options.extensions?.renderers?.[s.type]){let a=s,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){i+=l||"";continue}}let o=s;switch(o.type){case"space":{i+=this.renderer.space(o);continue}case"hr":{i+=this.renderer.hr(o);continue}case"heading":{i+=this.renderer.heading(o);continue}case"code":{i+=this.renderer.code(o);continue}case"table":{i+=this.renderer.table(o);continue}case"blockquote":{i+=this.renderer.blockquote(o);continue}case"list":{i+=this.renderer.list(o);continue}case"html":{i+=this.renderer.html(o);continue}case"def":{i+=this.renderer.def(o);continue}case"paragraph":{i+=this.renderer.paragraph(o);continue}case"text":{let a=o,l=this.renderer.text(a);for(;n+1<t.length&&t[n+1].type==="text";)a=t[++n],l+=`
223
- `+this.renderer.text(a);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let s=t[n];if(this.options.extensions?.renderers?.[s.type]){let a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=a||"";continue}}let o=s;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},Xs=class{options;block;constructor(t){this.options=t||ci}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?cr.lex:cr.lexInline}provideParser(){return this.block?hr.parse:hr.parseInline}},gM=class{defaults=Lh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=hr;Renderer=Ra;TextRenderer=Fh;Lexer=cr;Tokenizer=Oa;Hooks=Xs;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let s=n;for(let o of s.header)i=i.concat(this.walkTokens(o.tokens,r));for(let o of s.rows)for(let a of o)i=i.concat(this.walkTokens(a.tokens,r));break}case"list":{let s=n;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=n;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let a=s[o].flat(1/0);i=i.concat(this.walkTokens(a,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=r.renderers[s.name];o?r.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[s.level];o?o.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),n.extensions=r),i.renderer){let s=this.defaults.renderer||new Ra(this.defaults);for(let o in i.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let a=o,l=i.renderer[a],c=s[a];s[a]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u||""}}n.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Oa(this.defaults);for(let o in i.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,l=i.tokenizer[a],c=s[a];s[a]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}n.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Xs;for(let o in i.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let a=o,l=i.hooks[a],c=s[a];Xs.passThroughHooks.has(o)?s[a]=h=>{if(this.defaults.async)return Promise.resolve(l.call(s,h)).then(f=>c.call(s,f));let u=l.call(s,h);return c.call(s,u)}:s[a]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}n.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(a){let l=[];return l.push(o.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return cr.lex(t,r??this.defaults)}parser(t,r){return hr.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},s={...this.defaults,...n},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=t);let a=s.hooks?s.hooks.provideLexer():t?cr.lex:cr.lexInline,l=s.hooks?s.hooks.provideParser():t?hr.parse:hr.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(c=>a(c,s)).then(c=>s.hooks?s.hooks.processAllTokens(c):c).then(c=>s.walkTokens?Promise.all(this.walkTokens(c,s.walkTokens)).then(()=>c):c).then(c=>l(c,s)).then(c=>s.hooks?s.hooks.postprocess(c):c).catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));let c=a(r,s);s.hooks&&(c=s.hooks.processAllTokens(c)),s.walkTokens&&this.walkTokens(c,s.walkTokens);let h=l(c,s);return s.hooks&&(h=s.hooks.postprocess(h)),h}catch(c){return o(c)}}}onError(t,r){return i=>{if(i.message+=`
224
- Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+qe(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},ri=new gM;function $t(e,t){return ri.parse(e,t)}$t.options=$t.setOptions=function(e){return ri.setOptions(e),$t.defaults=ri.defaults,Qy($t.defaults),$t};$t.getDefaults=Lh;$t.defaults=ci;$t.use=function(...e){return ri.use(...e),$t.defaults=ri.defaults,Qy($t.defaults),$t};$t.walkTokens=function(e,t){return ri.walkTokens(e,t)};$t.parseInline=ri.parseInline;$t.Parser=hr;$t.parser=hr.parse;$t.Renderer=Ra;$t.TextRenderer=Fh;$t.Lexer=cr;$t.lexer=cr.lex;$t.Tokenizer=Oa;$t.Hooks=Xs;$t.parse=$t;$t.options;$t.setOptions;$t.use;$t.walkTokens;$t.parseInline;hr.parse;cr.lex;function c0(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(a,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?a.concat(c.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):a},[]);if(n.length){var s=new RegExp(`
225
- [ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(a){return a.replace(s,`
226
- `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(a,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=a;typeof a=="string"&&a.includes(`
227
- `)&&(u=String(a).split(`
228
- `).map(function(f,d){return d===0?f:""+h+f}).join(`
229
- `)),o+=u+i[l+1]}),o}var h0={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},fc=new Map,u0=new Map,f0=m(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(V.debug("Registering icon pack:",t.name),"loader"in t)u0.set(t.name,t.loader);else if("icons"in t)fc.set(t.name,t.icons);else throw V.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),d0=m(async(e,t)=>{const r=xA(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=fc.get(i);if(!n){const o=u0.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},fc.set(i,n)}catch(a){throw V.error(a),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=wA(n,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),mM=m(async e=>{try{return await d0(e),!0}catch{return!1}},"isIconAvailable"),tn=m(async(e,t,r)=>{let i;try{i=await d0(e,t?.fallbackPrefix)}catch(o){V.error(o),i=h0}const n=LA(i,t),s=OA(BA(n.body),{...n.attributes,...r});return Se(s,Jt())},"getIconSVG");function p0(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
230
- `).replace(/\n{2,}/g,`
231
- `),n=c0(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}m(p0,"preprocessMarkdown");function g0(e,t={}){const r=p0(e,t),i=$t.lexer(r),n=[[]];let s=0;function o(a,l="normal"){a.type==="text"?a.text.split(`
232
- `).forEach((h,u)=>{u!==0&&(s++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&n[s].push({content:f,type:l})})}):a.type==="strong"||a.type==="em"?a.tokens.forEach(c=>{o(c,a.type)}):a.type==="html"&&n[s].push({content:a.text,type:"normal"})}return m(o,"processNode"),i.forEach(a=>{a.type==="paragraph"?a.tokens?.forEach(l=>{o(l)}):a.type==="html"?n[s].push({content:a.text,type:"normal"}):n[s].push({content:a.raw,type:"normal"})}),n}m(g0,"markdownToLines");function m0(e,{markdownAutoWrap:t}={}){const r=$t.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(V.warn(`Unsupported markdown: ${n.type}`),n.raw)}return m(i,"output"),r.map(i).join("")}m(m0,"markdownToHTML");function y0(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}m(y0,"splitTextToChars");function x0(e,t){const r=y0(t.content);return Ih(e,[],r,t.type)}m(x0,"splitWordToFitWidth");function Ih(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...s]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?Ih(e,o,s,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}m(Ih,"splitWordToFitWidthRecursion");function b0(e,t){if(e.some(({content:r})=>r.includes(`
233
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Da(e,t)}m(b0,"splitLineToFitWidth");function Da(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(s),t(o))return Da(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[a,l]=x0(t,s);r.push([a]),l.content&&e.unshift(l)}return Da(e,t,r)}m(Da,"splitLineToFitWidthRecursion");function dc(e,t){t&&e.attr("style",t)}m(dc,"applyStyle");async function v0(e,t,r,i,n=!1,s=Jt()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const a=o.append("xhtml:div"),l=Qr(t.label)?await Xa(t.label.replace(ni.lineBreakRegex,`
234
- `),s):Se(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=a.append("span");h.html(l),dc(h,t.labelStyle),h.attr("class",`${c} ${i}`),dc(a,t.labelStyle),a.style("display","table-cell"),a.style("white-space","nowrap"),a.style("line-height","1.5"),a.style("max-width",r+"px"),a.style("text-align","center"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&a.attr("class","labelBkg");let u=a.node().getBoundingClientRect();return u.width===r&&(a.style("display","table"),a.style("white-space","break-spaces"),a.style("width",r+"px"),u=a.node().getBoundingClientRect()),o.node()}m(v0,"addHtmlSpan");function yo(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}m(yo,"createTspan");function w0(e,t,r){const i=e.append("text"),n=yo(i,1,t);xo(n,r);const s=n.node().getComputedTextLength();return i.remove(),s}m(w0,"computeWidthOfText");function C0(e,t,r){const i=e.append("text"),n=yo(i,1,t);xo(n,[{content:r,type:"normal"}]);const s=n.node()?.getBoundingClientRect();return s&&i.remove(),s}m(C0,"computeDimensionOfText");function _0(e,t,r,i=!1){const s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),a=s.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=m(f=>w0(s,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:b0(c,h);for(const f of u){const d=yo(a,l,1.1);xo(d,f),l++}}if(i){const c=a.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),s.node()}else return a.node()}m(_0,"createFormattedText");function xo(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}m(xo,"updateTextContentAndStyles");async function Nh(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,s,o)=>(r.push((async()=>{const a=`${s}:${o}`;return await mM(a)?await tn(a,void 0,{class:"label-icon"}):`<i class='${Se(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}m(Nh,"replaceIconSubstring");var xr=m(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:s=!0,isNode:o=!0,width:a=200,addSvgBackground:l=!1}={},c)=>{if(V.debug("XYZ createText",t,r,i,n,s,o,"addSvgBackground: ",l),s){const h=m0(t,c),u=await Nh($r(h),c),f=t.replace(/\\\\/g,"\\"),d={isNode:o,label:Qr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await v0(e,d,a,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=g0(h.replace("<br>","<br/>"),c),f=_0(a,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");St(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");St(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");St(f).select("text").attr("style",p)}return f}},"createText");function rl(e,t,r){if(e&&e.length){const[i,n]=t,s=Math.PI/180*r,o=Math.cos(s),a=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-n)*a+i,l[1]=(c-i)*a+(h-n)*o+n}}}function yM(e,t){return e[0]===t[0]&&e[1]===t[1]}function xM(e,t,r,i=1){const n=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,a=[0,0];if(n)for(const c of o)rl(c,a,n);const l=function(c,h,u){const f=[];for(const b of c){const w=[...b];yM(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&f.push(w)}const d=[];h=Math.max(h,.1);const p=[];for(const b of f)for(let w=0;w<b.length-1;w++){const C=b[w],v=b[w+1];if(C[1]!==v[1]){const E=Math.min(C[1],v[1]);p.push({ymin:E,ymax:Math.max(C[1],v[1]),x:E===C[1]?C[0]:v[0],islope:(v[0]-C[0])/(v[1]-C[1])})}}if(p.sort((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!p.length)return d;let g=[],y=p[0].ymin,x=0;for(;g.length||p.length;){if(p.length){let b=-1;for(let w=0;w<p.length&&!(p[w].ymin>y);w++)b=w;p.splice(0,b+1).forEach(w=>{g.push({s:y,edge:w})})}if(g=g.filter(b=>!(b.edge.ymax<=y)),g.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(u!==1||x%h==0)&&g.length>1)for(let b=0;b<g.length;b+=2){const w=b+1;if(w>=g.length)break;const C=g[b].edge,v=g[w].edge;d.push([[Math.round(C.x),y],[Math.round(v.x),y]])}y+=u,g.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return d}(o,s,i);if(n){for(const c of o)rl(c,a,-n);(function(c,h,u){const f=[];c.forEach(d=>f.push(...d)),rl(f,h,u)})(l,a,-n)}return l}function ds(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=n),xM(e,n,i,s||1)}class Ph{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ds(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function bo(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class bM extends Ph{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=ds(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],a=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of n)bo([c,h])&&o.push([[c[0]-a,c[1]+l],[...h]],[[c[0]+a,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class vM extends Ph{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,n);return i.ops=i.ops.concat(s.ops),i}}class wM{constructor(t){this.helper=t}fillPolygons(t,r){const i=ds(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=n/4;for(const a of t){const l=bo(a),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let p=0;p<h;p++){const g=d+u+p*n,y=f-o+2*Math.random()*o,x=g-o+2*Math.random()*o,b=this.helper.ellipse(y,x,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class CM{constructor(t){this.helper=t}fillPolygons(t,r){const i=ds(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach(o=>{const a=bo(o),l=Math.floor(a/(i+n)),c=(a+n-l*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const p=d*(i+n),g=p+i,y=[h[0]+p*Math.cos(f)+c*Math.cos(f),h[1]+p*Math.sin(f)+c*Math.sin(f)],x=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}}),s}}class _M{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,s=ds(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(s,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach(s=>{const o=bo(s),a=Math.round(o/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<a;u++){const f=2*u*r,d=2*(u+1)*r,p=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[g[0]+p*Math.cos(h+Math.PI/4),g[1]+p*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(g[0],g[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}}),n}}const ge={};class SM{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const kM=0,il=1,nd=2,Rs={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function nl(e,t){return e.type===t}function jh(e){const t=[],r=function(o){const a=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:kM,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:il,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return a[a.length]={type:nd,text:""},a}(e);let i="BOD",n=0,s=r[n];for(;!nl(s,nd);){let o=0;const a=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return jh("M0,0"+e);n++,o=Rs[s.text],i=s.text}else nl(s,il)?o=Rs[i]:(n++,o=Rs[s.text],i=s.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let l=n;l<n+o;l++){const c=r[l];if(!nl(c,il))throw new Error("Param not a number: "+i+","+c.text);a[a.length]=+c.text}if(typeof Rs[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:a};t.push(l),n+=o,s=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function S0(e){let t=0,r=0,i=0,n=0;const s=[];for(const{key:o,data:a}of e)switch(o){case"M":s.push({key:"M",data:[...a]}),[t,r]=a,[i,n]=a;break;case"m":t+=a[0],r+=a[1],s.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":s.push({key:"L",data:[...a]}),[t,r]=a;break;case"l":t+=a[0],r+=a[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...a]}),t=a[4],r=a[5];break;case"c":{const l=a.map((c,h)=>h%2?c+r:c+t);s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...a]}),t=a[2],r=a[3];break;case"q":{const l=a.map((c,h)=>h%2?c+r:c+t);s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...a]}),t=a[5],r=a[6];break;case"a":t+=a[5],r+=a[6],s.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],t,r]});break;case"H":s.push({key:"H",data:[...a]}),t=a[0];break;case"h":t+=a[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...a]}),r=a[0];break;case"v":r+=a[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...a]}),t=a[2],r=a[3];break;case"s":{const l=a.map((c,h)=>h%2?c+r:c+t);s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...a]}),t=a[0],r=a[1];break;case"t":t+=a[0],r+=a[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=n}return s}function k0(e){const t=[];let r="",i=0,n=0,s=0,o=0,a=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[s,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],a=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-a),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),a=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,p=0;r==="Q"||r==="T"?(d=i+(i-a),p=n+(n-l)):(d=i,p=n);const g=i+2*(d-i)/3,y=n+2*(p-n)/3,x=u+2*(d-u)/3,b=f+2*(p-f)/3;t.push({key:"C",data:[g,y,x,b,u,f]}),a=d,l=p,i=u,n=f;break}case"Q":{const[u,f,d,p]=h,g=i+2*(u-i)/3,y=n+2*(f-n)/3,x=d+2*(u-d)/3,b=p+2*(f-p)/3;t.push({key:"C",data:[g,y,x,b,d,p]}),a=u,l=f,i=d,n=p;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],p=h[3],g=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(T0(i,n,y,x,u,f,d,p,g).forEach(function(b){t.push({key:"C",data:b})}),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,n=o}r=c}return t}function wn(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function T0(e,t,r,i,n,s,o,a,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,p=0,g=0,y=0;if(c)[d,p,g,y]=c;else{[e,t]=wn(e,t,-h),[r,i]=wn(r,i,-h);const R=(e-r)/2,B=(t-i)/2;let O=R*R/(n*n)+B*B/(s*s);O>1&&(O=Math.sqrt(O),n*=O,s*=O);const $=n*n,q=s*s,A=$*q-$*B*B-q*R*R,D=$*B*B+q*R*R,_=(a===l?-1:1)*Math.sqrt(Math.abs(A/D));g=_*n*B/s+(e+r)/2,y=_*-s*R/n+(t+i)/2,d=Math.asin(parseFloat(((t-y)/s).toFixed(9))),p=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI)}let x=p-d;if(Math.abs(x)>120*Math.PI/180){const R=p,B=r,O=i;p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=T0(r=g+n*Math.cos(p),i=y+s*Math.sin(p),B,O,n,s,o,0,l,[p,R,g,y])}x=p-d;const b=Math.cos(d),w=Math.sin(d),C=Math.cos(p),v=Math.sin(p),E=Math.tan(x/4),T=4/3*n*E,N=4/3*s*E,W=[e,t],I=[e+T*w,t-N*b],k=[r+T*v,i-N*C],L=[r,i];if(I[0]=2*W[0]-I[0],I[1]=2*W[1]-I[1],c)return[I,k,L].concat(f);{f=[I,k,L].concat(f);const R=[];for(let B=0;B<f.length;B+=3){const O=wn(f[B][0],f[B][1],h),$=wn(f[B+1][0],f[B+1][1],h),q=wn(f[B+2][0],f[B+2][1],h);R.push([O[0],O[1],$[0],$[1],q[0],q[1]])}return R}}const TM={randOffset:function(e,t){return mt(e,t)},randOffsetWithRange:function(e,t,r){return Fa(e,t,r)},ellipse:function(e,t,r,i,n){const s=L0(r,i,n);return pc(e,t,n,s).opset},doubleLineOps:function(e,t,r,i,n){return Er(e,t,r,i,n,!0)}};function E0(e,t,r,i,n){return{type:"path",ops:Er(e,t,r,i,n)}}function Ks(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let s=0;s<i-1;s++)n.push(...Er(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&n.push(...Er(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?E0(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function EM(e,t,r,i,n){return function(s,o){return Ks(s,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function sd(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ds(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Ds(r[0],1.5*(1+.22*t.roughness),ld(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const a=Ds(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ds(o,1.5*(1+.22*t.roughness),ld(t));for(const c of a)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function L0(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/n;let o=Math.abs(e/2),a=Math.abs(t/2);const l=1-r.curveFitting;return o+=mt(o*l,r),a+=mt(a*l,r),{increment:s,rx:o,ry:a}}function pc(e,t,r,i){const[n,s]=cd(i.increment,e,t,i.rx,i.ry,1,i.increment*Fa(.1,Fa(.4,1,r),r),r);let o=Ia(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[a]=cd(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ia(a,null,r);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function ad(e,t,r,i,n,s,o,a,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=mt(.01*u,l),f+=mt(.01*f,l);let d=n,p=s;for(;d<0;)d+=2*Math.PI,p+=2*Math.PI;p-d>2*Math.PI&&(d=0,p=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(p-d)/2),x=hd(y,c,h,u,f,d,p,1,l);if(!l.disableMultiStroke){const b=hd(y,c,h,u,f,d,p,1.5,l);x.push(...b)}return o&&(a?x.push(...Er(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...Er(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function od(e,t){const r=k0(S0(jh(e))),i=[];let n=[0,0],s=[0,0];for(const{key:o,data:a}of r)switch(o){case"M":s=[a[0],a[1]],n=[a[0],a[1]];break;case"L":i.push(...Er(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]];break;case"C":{const[l,c,h,u,f,d]=a;i.push(...LM(l,c,h,u,f,d,s,t)),s=[f,d];break}case"Z":i.push(...Er(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]]}return{type:"path",ops:i}}function sl(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+mt(n,t),i[0][1]+mt(n,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+mt(n,t),i[o][1]+mt(n,t)]})}}return{type:"fillPath",ops:r}}function xi(e,t){return function(r,i){let n=r.fillStyle||"hachure";if(!ge[n])switch(n){case"zigzag":ge[n]||(ge[n]=new bM(i));break;case"cross-hatch":ge[n]||(ge[n]=new vM(i));break;case"dots":ge[n]||(ge[n]=new wM(i));break;case"dashed":ge[n]||(ge[n]=new CM(i));break;case"zigzag-line":ge[n]||(ge[n]=new _M(i));break;default:n="hachure",ge[n]||(ge[n]=new Ph(i))}return ge[n]}(t,TM).fillPolygons(e,t)}function ld(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function A0(e){return e.randomizer||(e.randomizer=new SM(e.seed||0)),e.randomizer.next()}function Fa(e,t,r,i=1){return r.roughness*i*(A0(r)*(t-e)+e)}function mt(e,t,r=1){return Fa(-e,e,t,r)}function Er(e,t,r,i,n,s=!1){const o=s?n.disableMultiStrokeFill:n.disableMultiStroke,a=gc(e,t,r,i,n,!0,!1);if(o)return a;const l=gc(e,t,r,i,n,!0,!0);return a.concat(l)}function gc(e,t,r,i,n,s,o){const a=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>a&&(h=l/10);const u=h/2,f=.2+.2*A0(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,p=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=mt(d,n,c),p=mt(p,n,c);const g=[],y=()=>mt(u,n,c),x=()=>mt(h,n,c),b=n.preserveVertices;return o?g.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):g.push({op:"move",data:[e+(b?0:mt(h,n,c)),t+(b?0:mt(h,n,c))]}),o?g.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),p+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),p+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),p+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),p+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),g}function Ds(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+mt(t,r),e[0][1]+mt(t,r)]),i.push([e[0][0]+mt(t,r),e[0][1]+mt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+mt(t,r),e[n][1]+mt(t,r)]),n===e.length-1&&i.push([e[n][0]+mt(t,r),e[n][1]+mt(t,r)]);return Ia(i,null,r)}function Ia(e,t,r){const i=e.length,n=[];if(i>3){const s=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let a=1;a+2<i;a++){const l=e[a];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[a+1][0]-o*e[a-1][0])/6,l[1]+(o*e[a+1][1]-o*e[a-1][1])/6],s[2]=[e[a+1][0]+(o*e[a][0]-o*e[a+2][0])/6,e[a+1][1]+(o*e[a][1]-o*e[a+2][1])/6],s[3]=[e[a+1][0],e[a+1][1]],n.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...gc(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function cd(e,t,r,i,n,s,o,a){const l=[],c=[];if(a.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=mt(.5,a)-Math.PI/2;c.push([mt(s,a)+t+.9*i*Math.cos(h-e),mt(s,a)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[mt(s,a)+t+i*Math.cos(f),mt(s,a)+r+n*Math.sin(f)];l.push(d),c.push(d)}c.push([mt(s,a)+t+i*Math.cos(h+2*Math.PI+.5*o),mt(s,a)+r+n*Math.sin(h+2*Math.PI+.5*o)]),c.push([mt(s,a)+t+.98*i*Math.cos(h+o),mt(s,a)+r+.98*n*Math.sin(h+o)]),c.push([mt(s,a)+t+.9*i*Math.cos(h+.5*o),mt(s,a)+r+.9*n*Math.sin(h+.5*o)])}return[c,l]}function hd(e,t,r,i,n,s,o,a,l){const c=s+mt(.1,l),h=[];h.push([mt(a,l)+t+.9*i*Math.cos(c-e),mt(a,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([mt(a,l)+t+i*Math.cos(u),mt(a,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),Ia(h,null,l)}function LM(e,t,r,i,n,s,o,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let h=[0,0];const u=a.disableMultiStroke?1:2,f=a.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:mt(c[0],a)),o[1]+(f?0:mt(c[0],a))]}),h=f?[n,s]:[n+mt(c[d],a),s+mt(c[d],a)],l.push({op:"bcurveTo",data:[e+mt(c[d],a),t+mt(c[d],a),r+mt(c[d],a),i+mt(c[d],a),h[0],h[1]]});return l}function Cn(e){return[...e]}function ud(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Cn(e[0]),Cn(e[1]),Cn(e[2]),Cn(e[2]));else{const n=[];n.push(e[0],e[0]);for(let a=1;a<e.length;a++)n.push(e[a]),a===e.length-1&&n.push(e[a]);const s=[],o=1-t;i.push(Cn(n[0]));for(let a=1;a+2<n.length;a++){const l=n[a];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*n[a+1][0]-o*n[a-1][0])/6,l[1]+(o*n[a+1][1]-o*n[a-1][1])/6],s[2]=[n[a+1][0]+(o*n[a][0]-o*n[a+2][0])/6,n[a+1][1]+(o*n[a][1]-o*n[a+2][1])/6],s[3]=[n[a+1][0],n[a+1][1]],i.push(s[1],s[2],s[3])}}return i}function Zs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function AM(e,t,r){const i=Zs(t,r);if(i===0)return Zs(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),Zs(e,zr(t,r,n))}function zr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function mc(e,t,r,i){const n=i||[];if(function(a,l){const c=a[l+0],h=a[l+1],u=a[l+2],f=a[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let p=3*h[1]-2*c[1]-f[1];p*=p;let g=3*u[0]-2*f[0]-c[0];g*=g;let y=3*u[1]-2*f[1]-c[1];return y*=y,d<g&&(d=g),p<y&&(p=y),d+p}(e,t)<r){const a=e[t+0];n.length?(s=n[n.length-1],o=a,Math.sqrt(Zs(s,o))>1&&n.push(a)):n.push(a),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=zr(l,c,.5),d=zr(c,h,.5),p=zr(h,u,.5),g=zr(f,d,.5),y=zr(d,p,.5),x=zr(g,y,.5);mc([l,f,g,x],0,r,n),mc([x,y,p,u],0,r,n)}var s,o;return n}function MM(e,t){return Na(e,0,e.length,t)}function Na(e,t,r,i,n){const s=n||[],o=e[t],a=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=AM(e[h],o,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Na(e,t,c+1,i,s),Na(e,c,r,i,s)):(s.length||s.push(o),s.push(a)),s}function al(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let s=0;s<n;s++)mc(e,3*s,t,i);return r&&r>0?Na(i,0,i.length,r):i}const Ce="none";class Pa{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,s){const o=this._o(s);return this._d("line",[E0(t,r,i,n,o)],o)}rectangle(t,r,i,n,s){const o=this._o(s),a=[],l=EM(t,r,i,n,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?a.push(sl([c],o)):a.push(xi([c],o))}return o.stroke!==Ce&&a.push(l),this._d("rectangle",a,o)}ellipse(t,r,i,n,s){const o=this._o(s),a=[],l=L0(i,n,o),c=pc(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=pc(t,r,o,l).opset;h.type="fillPath",a.push(h)}else a.push(xi([c.estimatedPoints],o));return o.stroke!==Ce&&a.push(c.opset),this._d("ellipse",a,o)}circle(t,r,i,n){const s=this.ellipse(t,r,i,i,n);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ks(t,!1,i)],i)}arc(t,r,i,n,s,o,a=!1,l){const c=this._o(l),h=[],u=ad(t,r,i,n,s,o,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=ad(t,r,i,n,s,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,p,g,y,x,b){const w=f,C=d;let v=Math.abs(p/2),E=Math.abs(g/2);v+=mt(.01*v,b),E+=mt(.01*E,b);let T=y,N=x;for(;T<0;)T+=2*Math.PI,N+=2*Math.PI;N-T>2*Math.PI&&(T=0,N=2*Math.PI);const W=(N-T)/b.curveStepCount,I=[];for(let k=T;k<=N;k+=W)I.push([w+v*Math.cos(k),C+E*Math.sin(k)]);return I.push([w+v*Math.cos(N),C+E*Math.sin(N)]),I.push([w,C]),xi([I],b)}(t,r,i,n,s,o,c));return c.stroke!==Ce&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],s=sd(t,i);if(i.fill&&i.fill!==Ce)if(i.fillStyle==="solid"){const o=sd(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],a=t;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...al(ud([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...al(ud(c),10,(1+i.roughness)/2))}o.length&&n.push(xi([o],i))}return i.stroke!==Ce&&n.push(s),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],s=Ks(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(sl([t],i)):n.push(xi([t],i))),i.stroke!==Ce&&n.push(s),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Ce,o=i.stroke!==Ce,a=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const d=k0(S0(jh(h))),p=[];let g=[],y=[0,0],x=[];const b=()=>{x.length>=4&&g.push(...al(x,u)),x=[]},w=()=>{b(),g.length&&(p.push(g),g=[])};for(const{key:v,data:E}of d)switch(v){case"M":w(),y=[E[0],E[1]],g.push(y);break;case"L":b(),g.push([E[0],E[1]]);break;case"C":if(!x.length){const T=g.length?g[g.length-1]:y;x.push([T[0],T[1]])}x.push([E[0],E[1]]),x.push([E[2],E[3]]),x.push([E[4],E[5]]);break;case"Z":b(),g.push([y[0],y[1]])}if(w(),!f)return p;const C=[];for(const v of p){const E=MM(v,f);E.length&&C.push(E)}return C}(t,1,a?4-4*(i.simplification||1):(1+i.roughness)/2),c=od(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=od(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(sl(l,i));else n.push(xi(l,i));return o&&(a?l.forEach(h=>{n.push(Ks(h,!1,i))}):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const s=typeof r=="number"&&r>=0?n.data.map(o=>+o.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ce};break;case"fillPath":o={d:this.opsToPath(s),stroke:Ce,strokeWidth:0,fill:i.fill||Ce};break;case"fillSketch":o=this.fillSketch(s,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ce,strokeWidth:i,fill:Ce}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class $M{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Pa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,s),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const a=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,s,a),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map(a=>+a.toFixed(i)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,s){const o=this.gen.line(t,r,i,n,s);return this.draw(o),o}rectangle(t,r,i,n,s){const o=this.gen.rectangle(t,r,i,n,s);return this.draw(o),o}ellipse(t,r,i,n,s){const o=this.gen.ellipse(t,r,i,n,s);return this.draw(o),o}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,s,o,a=!1,l){const c=this.gen.arc(t,r,i,n,s,o,a,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Fs="http://www.w3.org/2000/svg";class BM{constructor(t,r){this.svg=t,this.gen=new Pa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,s=n.createElementNS(Fs,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of r){let l=null;switch(a.type){case"path":l=n.createElementNS(Fs,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(Fs,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,a,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const s=t.createElementNS(Fs,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",n+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,s){const o=this.gen.line(t,r,i,n,s);return this.draw(o)}rectangle(t,r,i,n,s){const o=this.gen.rectangle(t,r,i,n,s);return this.draw(o)}ellipse(t,r,i,n,s){const o=this.gen.ellipse(t,r,i,n,s);return this.draw(o)}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,s,o,a=!1,l){const c=this.gen.arc(t,r,i,n,s,o,a,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var st={canvas:(e,t)=>new $M(e,t),svg:(e,t)=>new BM(e,t),generator:e=>new Pa(e),newSeed:()=>Pa.newSeed()},bt=m(async(e,t,r)=>{let i;const n=t.useHtmlLabels||Wt(Et()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",be(t.labelStyle));let a;t.label===void 0?a="":a=typeof t.label=="string"?t.label:t.label[0];const l=await xr(o,Se($r(a),Et()),{useHtmlLabels:n,width:t.width||Et().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],f=St(l),d=u.getElementsByTagName("img");if(d){const p=a.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function x(){if(g.style.display="flex",g.style.flexDirection="column",p){const b=Et().fontSize?Et().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[C=Wc.fontSize]=us(b),v=C*w+"px";g.style.minWidth=v,g.style.maxWidth=v}else g.style.width="100%";y(g)}m(x,"setupImage"),setTimeout(()=>{g.complete&&x()}),g.addEventListener("error",x),g.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return n?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:c,halfPadding:h,label:o}},"labelHelper"),ol=m(async(e,t,r)=>{const i=r.useHtmlLabels||Wt(Et()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await xr(n,Se($r(t),Et()),{useHtmlLabels:i,width:r.width||Et()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const a=r.padding/2;if(Wt(Et()?.flowchart?.htmlLabels)){const l=s.children[0],c=St(s);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:a,label:n}},"insertLabel"),ct=m((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),gt=m((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function _t(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}m(_t,"createPathFromPoints");function Lr(e,t,r,i,n,s){const o=[],l=r-e,c=i-t,h=l/s,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const p=d/50,g=e+p*l,y=f+n*Math.sin(u*(g-e));o.push({x:g,y})}return o}m(Lr,"generateFullSineWavePoints");function es(e,t,r,i,n,s){const o=[],a=n*Math.PI/180,h=(s*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:-d,y:-p})}return o}m(es,"generateCirclePoints");var OM=m((e,t)=>{var r=e.x,i=e.y,n=t.x-r,s=t.y-i,o=e.width/2,a=e.height/2,l,c;return Math.abs(s)*o>Math.abs(n)*a?(s<0&&(a=-a),l=s===0?0:a*n/s,c=a):(n<0&&(o=-o),l=o,c=n===0?0:o*s/n),{x:r+l,y:i+c}},"intersectRect"),en=OM;function M0(e,t){t&&e.attr("style",t)}m(M0,"applyStyle");async function $0(e){const t=St(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=Et();let n=e.label;e.label&&Qr(e.label)&&(n=await Xa(e.label.replace(ni.lineBreakRegex,`
235
- `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(Se(o,i)),M0(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}m($0,"addHtmlLabel");var RM=m(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),Wt(Et().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),V.info("vertexText"+n);const s={isNode:i,label:$r(n).replace(/fa[blrs]?:fa-[\w-]+/g,a=>`<i class='${a.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await $0(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?o=n:o=[];for(const a of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=a.trim(),s.appendChild(l)}return s}},"createLabel"),Yr=RM,Br=m((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),B0=m(async(e,t)=>{V.info("Creating subgraph rect for ",t.id,t);const r=Et(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:a,nodeStyles:l,borderStyles:c,backgroundStyles:h}=ht(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Wt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),p=await xr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let g=p.getBBox();if(Wt(r.flowchart.htmlLabels)){const T=p.children[0],N=St(p);g=T.getBoundingClientRect(),N.attr("width",g.width),N.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;V.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=st.svg(u),N=at(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:n}),W=T.path(Br(b,w,y,x,0),N);C=u.insert(()=>(V.debug("Rough node insert CXC",W),W),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=Qa(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+v})`),a){const T=d.select("span");T&&T.attr("style",a)}const E=C.node().getBBox();return t.offsetX=0,t.width=E.width,t.height=E.height,t.offsetY=g.height-t.padding/2,t.intersect=function(T){return en(t,T)},{cluster:u,labelBBox:g}},"rect"),DM=m((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,s=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(a){return en(t,a)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),FM=m(async(e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:a,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=u.node().appendChild(await Yr(t.label,t.labelStyle,void 0,!0));let p=d.getBBox();if(Wt(r.flowchart.htmlLabels)){const W=d.children[0],I=St(d);p=W.getBoundingClientRect(),I.attr("width",p.width),I.attr("height",p.height)}const g=0*t.padding,y=g/2,x=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+g;t.width<=p.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,w=t.height+g-p.height-6,C=t.x-x/2,v=t.y-b/2;t.width=x;const E=t.y-t.height/2-y+p.height+2;let T;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),I=st.svg(c),k=t.rx||t.ry?I.path(Br(C,v,x,b,10),{roughness:.7,fill:a,fillStyle:"solid",stroke:l,seed:n}):I.rectangle(C,v,x,b,{seed:n});T=c.insert(()=>k,":first-child");const L=I.rectangle(C,E,x,w,{fill:W?s:o,fillStyle:W?"hachure":"solid",stroke:l,seed:n});T=c.insert(()=>k,":first-child"),f=c.insert(()=>L)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",C).attr("y",v).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",C).attr("y",E).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-p.width/2}, ${v+1-(Wt(r.flowchart.htmlLabels)?0:3)})`);const N=T.node().getBBox();return t.height=N.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(W){return en(t,W)},{cluster:c,labelBBox:p}},"roundedWithTitle"),IM=m(async(e,t)=>{V.info("Creating subgraph rect for ",t.id,t);const r=Et(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:a,nodeStyles:l,borderStyles:c,backgroundStyles:h}=ht(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Wt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),p=await xr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let g=p.getBBox();if(Wt(r.flowchart.htmlLabels)){const T=p.children[0],N=St(p);g=T.getBoundingClientRect(),N.attr("width",g.width),N.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;V.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=st.svg(u),N=at(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:n}),W=T.path(Br(b,w,y,x,t.rx),N);C=u.insert(()=>(V.debug("Rough node insert CXC",W),W),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=Qa(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+v})`),a){const T=d.select("span");T&&T.attr("style",a)}const E=C.node().getBBox();return t.offsetX=0,t.width=E.width,t.height=E.height,t.offsetY=g.height-t.padding/2,t.intersect=function(T){return en(t,T)},{cluster:u,labelBBox:g}},"kanbanSection"),NM=m((e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),a=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const y=st.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:n});d=o.insert(()=>y,":first-child")}else d=a.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const p=d.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return en(t,g)},{cluster:o,labelBBox:{}}},"divider"),PM=B0,jM={rect:B0,squareRect:PM,roundedWithTitle:FM,noteGroup:DM,divider:NM,kanbanSection:IM},O0=new Map,R0=m(async(e,t)=>{const r=t.shape||"rect",i=await jM[r](e,t);return O0.set(t.id,i),i},"insertCluster"),zM=m(()=>{O0=new Map},"clear");function D0(e,t){return e.intersect(t)}m(D0,"intersectNode");var WM=D0;function F0(e,t,r,i){var n=e.x,s=e.y,o=n-i.x,a=s-i.y,l=Math.sqrt(t*t*a*a+r*r*o*o),c=Math.abs(t*r*o/l);i.x<n&&(c=-c);var h=Math.abs(t*r*a/l);return i.y<s&&(h=-h),{x:n+c,y:s+h}}m(F0,"intersectEllipse");var I0=F0;function N0(e,t,r){return I0(e,t,t,r)}m(N0,"intersectCircle");var qM=N0;function P0(e,t,r,i){var n,s,o,a,l,c,h,u,f,d,p,g,y,x,b;if(n=t.y-e.y,o=e.x-t.x,l=t.x*e.y-e.x*t.y,f=n*r.x+o*r.y+l,d=n*i.x+o*i.y+l,!(f!==0&&d!==0&&yc(f,d))&&(s=i.y-r.y,a=r.x-i.x,c=i.x*r.y-r.x*i.y,h=s*e.x+a*e.y+c,u=s*t.x+a*t.y+c,!(h!==0&&u!==0&&yc(h,u))&&(p=n*a-s*o,p!==0)))return g=Math.abs(p/2),y=o*c-a*l,x=y<0?(y-g)/p:(y+g)/p,y=s*l-n*c,b=y<0?(y-g)/p:(y+g)/p,{x,y:b}}m(P0,"intersectLine");function yc(e,t){return e*t>0}m(yc,"sameSign");var HM=P0;function j0(e,t,r){let i=e.x,n=e.y,s=[],o=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),a=Math.min(a,h.y)}):(o=Math.min(o,t.x),a=Math.min(a,t.y));let l=i-e.width/2-o,c=n-e.height/2-a;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=HM(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,p=Math.sqrt(f*f+d*d),g=u.x-r.x,y=u.y-r.y,x=Math.sqrt(g*g+y*y);return p<x?-1:p===x?0:1}),s[0]):e}m(j0,"intersectPolygon");var UM=j0,nt={node:WM,circle:qM,ellipse:I0,polygon:UM,rect:en};function z0(e,t){const{labelStyles:r}=ht(t);t.labelStyle=r;const i=gt(t);let n=i;i||(n="anchor");const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:a}=t,l=st.svg(s),c=at(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",be(a)),ct(t,u),t.intersect=function(f){return V.info("Circle intersect",t,o,f),nt.circle(t,o,f)},s}m(z0,"anchor");function xc(e,t,r,i,n,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/n,p=f/s,g=Math.sqrt(d**2+p**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**2),x=l+y*s*Math.sin(h)*(o?-1:1),b=c-y*n*Math.cos(h)*(o?-1:1),w=Math.atan2((t-b)/s,(e-x)/n);let v=Math.atan2((i-b)/s,(r-x)/n)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const E=[];for(let T=0;T<20;T++){const N=T/19,W=w+N*v,I=x+n*Math.cos(W),k=b+s*Math.sin(W);E.push({x:I,y:k})}return E}m(xc,"generateArcPoints");async function W0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=s.width+t.padding+20,a=s.height+t.padding,l=a/2,c=l/(2.5+a/50),{cssStyles:h}=t,u=[{x:o/2,y:-a/2},{x:-o/2,y:-a/2},...xc(-o/2,-a/2,-o/2,a/2,c,l,!1),{x:o/2,y:a/2},...xc(o/2,a/2,o/2,-a/2,c,l,!0)],f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=_t(u),g=f.path(p,d),y=n.insert(()=>g,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),ct(t,y),t.intersect=function(x){return nt.polygon(t,u,x)},n}m(W0,"bowTieRect");function Or(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}m(Or,"insertPolygonShape");async function q0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=s.height+t.padding,a=12,l=s.width+t.padding+a,c=0,h=l,u=-o,f=0,d=[{x:c+a,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+a},{x:c+a,y:u}];let p;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=st.svg(n),x=at(t,{}),b=_t(d),w=y.path(b,x);p=n.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),g&&p.attr("style",g)}else p=Or(n,l,o,d);return i&&p.attr("style",i),ct(t,p),t.intersect=function(y){return nt.polygon(t,d,y)},n}m(q0,"card");function H0(e,t){const{nodeStyles:r}=ht(t);t.label="";const i=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],a=st.svg(i),l=at(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=_t(o),h=a.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return nt.polygon(t,o,f)},i}m(H0,"choice");async function U0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:o}=await bt(e,t,gt(t)),a=s.width/2+o;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const h=st.svg(n),u=at(t,{}),f=h.circle(0,0,a*2,u);l=n.insert(()=>f,":first-child"),l.attr("class","basic label-container").attr("style",be(c))}else l=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",a).attr("cx",0).attr("cy",0);return ct(t,l),t.intersect=function(h){return V.info("Circle intersect",t,a,h),nt.circle(t,a,h)},n}m(U0,"circle");function Y0(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},a={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${a.x},${a.y}
236
- M ${n.x},${n.y} L ${o.x},${o.y}`}m(Y0,"createLine");function V0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:o}=t,a=st.svg(n),l=at(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=a.circle(0,0,s*2,l),h=Y0(s),u=a.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),ct(t,f),t.intersect=function(d){return V.info("crossedCircle intersect",t,{radius:s,point:d}),nt.circle(t,s,d)},n}m(V0,"crossedCircle");function sr(e,t,r,i=100,n=0,s=180){const o=[],a=n*Math.PI/180,h=(s*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:-d,y:-p})}return o}m(sr,"generateCirclePoints");async function G0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...sr(a/2,-l/2,c,30,-90,0),{x:-a/2-c,y:c},...sr(a/2+c*2,-c,c,20,-180,-270),...sr(a/2+c*2,c,c,20,-90,-180),{x:-a/2-c,y:-l/2},...sr(a/2,l/2,c,20,0,90)],f=[{x:a/2,y:-l/2-c},{x:-a/2,y:-l/2-c},...sr(a/2,-l/2,c,20,-90,0),{x:-a/2-c,y:-c},...sr(a/2+a*.1,-c,c,20,-180,-270),...sr(a/2+a*.1,c,c,20,-90,-180),{x:-a/2-c,y:l/2},...sr(a/2,l/2,c,20,0,90),{x:-a/2,y:l/2+c},{x:a/2,y:l/2+c}],d=st.svg(n),p=at(t,{fill:"none"});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=_t(u).replace("Z",""),x=d.path(y,p),b=_t(f),w=d.path(b,{...p}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-a/2+c-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ct(t,C),t.intersect=function(v){return nt.polygon(t,f,v)},n}m(G0,"curlyBraceLeft");function ar(e,t,r,i=100,n=0,s=180){const o=[],a=n*Math.PI/180,h=(s*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:d,y:p})}return o}m(ar,"generateCirclePoints");async function X0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ar(a/2,-l/2,c,20,-90,0),{x:a/2+c,y:-c},...ar(a/2+c*2,-c,c,20,-180,-270),...ar(a/2+c*2,c,c,20,-90,-180),{x:a/2+c,y:l/2},...ar(a/2,l/2,c,20,0,90)],f=[{x:-a/2,y:-l/2-c},{x:a/2,y:-l/2-c},...ar(a/2,-l/2,c,20,-90,0),{x:a/2+c,y:-c},...ar(a/2+c*2,-c,c,20,-180,-270),...ar(a/2+c*2,c,c,20,-90,-180),{x:a/2+c,y:l/2},...ar(a/2,l/2,c,20,0,90),{x:a/2,y:l/2+c},{x:-a/2,y:l/2+c}],d=st.svg(n),p=at(t,{fill:"none"});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=_t(u).replace("Z",""),x=d.path(y,p),b=_t(f),w=d.path(b,{...p}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-a/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ct(t,C),t.intersect=function(v){return nt.polygon(t,f,v)},n}m(X0,"curlyBraceRight");function Xt(e,t,r,i=100,n=0,s=180){const o=[],a=n*Math.PI/180,h=(s*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:-d,y:-p})}return o}m(Xt,"generateCirclePoints");async function K0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Xt(a/2,-l/2,c,30,-90,0),{x:-a/2-c,y:c},...Xt(a/2+c*2,-c,c,20,-180,-270),...Xt(a/2+c*2,c,c,20,-90,-180),{x:-a/2-c,y:-l/2},...Xt(a/2,l/2,c,20,0,90)],f=[...Xt(-a/2+c+c/2,-l/2,c,20,-90,-180),{x:a/2-c/2,y:c},...Xt(-a/2-c/2,-c,c,20,0,90),...Xt(-a/2-c/2,c,c,20,-90,0),{x:a/2-c/2,y:-c},...Xt(-a/2+c+c/2,l/2,c,30,-180,-270)],d=[{x:a/2,y:-l/2-c},{x:-a/2,y:-l/2-c},...Xt(a/2,-l/2,c,20,-90,0),{x:-a/2-c,y:-c},...Xt(a/2+c*2,-c,c,20,-180,-270),...Xt(a/2+c*2,c,c,20,-90,-180),{x:-a/2-c,y:l/2},...Xt(a/2,l/2,c,20,0,90),{x:-a/2,y:l/2+c},{x:a/2-c-c/2,y:l/2+c},...Xt(-a/2+c+c/2,-l/2,c,20,-90,-180),{x:a/2-c/2,y:c},...Xt(-a/2-c/2,-c,c,20,0,90),...Xt(-a/2-c/2,c,c,20,-90,0),{x:a/2-c/2,y:-c},...Xt(-a/2+c+c/2,l/2,c,30,-180,-270)],p=st.svg(n),g=at(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=_t(u).replace("Z",""),b=p.path(x,g),C=_t(f).replace("Z",""),v=p.path(C,g),E=_t(d),T=p.path(E,{...g}),N=n.insert("g",":first-child");return N.insert(()=>T,":first-child").attr("stroke-opacity",0),N.insert(()=>b,":first-child"),N.insert(()=>v,":first-child"),N.attr("class","text"),h&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-a/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ct(t,N),t.intersect=function(W){return nt.polygon(t,d,W)},n}m(K0,"curlyBraces");async function Z0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=80,a=20,l=Math.max(o,(s.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=l,g=c,y=p-h,x=g/4,b=[{x:y,y:0},{x,y:0},{x:0,y:g/2},{x,y:g},{x:y,y:g},...es(-y,-g/2,h,50,270,90)],w=_t(b),C=f.path(w,d),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-l/2}, ${-c/2})`),ct(t,v),t.intersect=function(E){return nt.polygon(t,b,E)},n}m(Z0,"curvedTrapezoid");var YM=m((e,t,r,i,n,s)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),VM=m((e,t,r,i,n,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),GM=m((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Q0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+t.padding,t.width??0),l=a/2,c=l/(2.5+a/50),h=Math.max(s.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=st.svg(n),p=VM(0,0,a,h,l,c),g=GM(0,c,a,h,l,c),y=d.path(p,at(t,{})),x=d.path(g,at(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=YM(0,0,a,h,l,c);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",be(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-a/2}, ${-(h/2+c)})`),ct(t,u),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(d){const p=nt.rect(t,d),g=p.x-(t.x??0);if(l!=0&&(Math.abs(g)<(t.width??0)/2||Math.abs(g)==(t.width??0)/2&&Math.abs(p.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-g*g/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(t.y??0)>0&&(y=-y),p.y+=y}return p},n}m(Q0,"cylinder");async function J0(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=s.width+t.padding,l=s.height+t.padding,c=l*.2,h=-a/2,u=-l/2-c/2,{cssStyles:f}=t,d=st.svg(n),p=at(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(g.map(b=>[b.x,b.y]),p),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(s.x-(s.left??0))}, ${u+c+(t.padding??0)/2-(s.y-(s.top??0))})`),ct(t,x),t.intersect=function(b){return nt.rect(t,b)},n}m(J0,"dividedRectangle");async function tx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:o}=await bt(e,t,gt(t)),l=s.width/2+o+5,c=s.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=st.svg(n),d=at(t,{roughness:.2,strokeWidth:2.5}),p=at(t,{roughness:.2,strokeWidth:1.5}),g=f.circle(0,0,l*2,d),y=f.circle(0,0,c*2,p);h=n.insert("g",":first-child"),h.attr("class",be(t.cssClasses)).attr("style",be(u)),h.node()?.appendChild(g),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const f=h.insert("circle",":first-child"),d=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),d.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return ct(t,h),t.intersect=function(f){return V.info("DoubleCircle intersect",t,l,f),nt.circle(t,l,f)},n}m(tx,"doublecircle");function ex(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=ht(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:a}=t,l=st.svg(s),{nodeBorder:c}=r,h=at(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=s.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),a&&a.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),ct(t,f),t.intersect=function(d){return V.info("filledCircle intersect",t,{radius:o,point:d}),nt.circle(t,o,d)},s}m(ex,"filledCircle");async function rx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=s.width+(t.padding??0),l=a+s.height,c=a+s.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=_t(h),g=f.path(p,d),y=n.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=a,t.height=l,ct(t,y),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-l/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(x){return V.info("Triangle intersect",t,h,x),nt.polygon(t,h,x)},n}m(rx,"flippedTriangle");function ix(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:s}=ht(t);t.label="";const o=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,f=st.svg(o),d=at(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=f.rectangle(h,u,l,c,d),g=o.insert(()=>p,":first-child");a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),ct(t,g);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return nt.rect(t,x)},o}m(ix,"forkJoin");async function nx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const n=80,s=50,{shapeSvg:o,bbox:a}=await bt(e,t,gt(t)),l=Math.max(n,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=st.svg(o),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...es(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],g=_t(p),y=f.path(g,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),ct(t,x),t.intersect=function(b){return V.info("Pill intersect",t,{radius:h,point:b}),nt.polygon(t,p,b)},o}m(nx,"halfRoundedRectangle");async function sx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=s.height+(t.padding??0),a=s.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=st.svg(n),h=at(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=a/2;const f=u/6;u=u+f;const d=o/2,p=d/2,g=u-p,y=[{x:-g,y:-d},{x:0,y:-d},{x:g,y:-d},{x:u,y:0},{x:g,y:d},{x:0,y:d},{x:-g,y:d},{x:-u,y:0}],x=_t(y),b=c.path(x,h),w=n.insert(()=>b,":first-child");return w.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=a,t.height=o,ct(t,w),t.intersect=function(C){return nt.polygon(t,y,C)},n}m(sx,"hexagon");async function ax(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await bt(e,t,gt(t)),s=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:a}=t,l=st.svg(n),c=at(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],u=_t(h),f=l.path(u,c),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container"),a&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",a),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-s/2}, ${-o/2})`),ct(t,d),t.intersect=function(p){return V.info("Pill intersect",t,{points:h}),nt.polygon(t,h,p)},n}m(ax,"hourglass");async function ox(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=ht(t);t.labelStyle=n;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,label:u}=await bt(e,t,"icon-shape default"),f=t.pos==="t",d=a,p=a,{nodeBorder:g}=r,{stylesMap:y}=Ki(t),x=-p/2,b=-d/2,w=t.label?8:0,C=st.svg(c),v=at(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const E=C.rectangle(x,b,p,d,v),T=Math.max(p,h.width),N=d+h.height+w,W=C.rectangle(-T/2,-N/2,T,N,{...v,fill:"transparent",stroke:"none"}),I=c.insert(()=>E,":first-child"),k=c.insert(()=>W);if(t.icon){const L=c.append("g");L.html(`<g>${await tn(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const R=L.node().getBBox(),B=R.width,O=R.height,$=R.x,q=R.y;L.attr("transform",`translate(${-B/2-$},${f?h.height/2+w/2-O/2-q:-h.height/2-w/2-O/2-q})`),L.attr("style",`color: ${y.get("stroke")??g};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-N/2:N/2-h.height})`),I.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),ct(t,k),t.intersect=function(L){if(V.info("iconSquare intersect",t,L),!t.label)return nt.rect(t,L);const R=t.x??0,B=t.y??0,O=t.height??0;let $=[];return f?$=[{x:R-h.width/2,y:B-O/2},{x:R+h.width/2,y:B-O/2},{x:R+h.width/2,y:B-O/2+h.height+w},{x:R+p/2,y:B-O/2+h.height+w},{x:R+p/2,y:B+O/2},{x:R-p/2,y:B+O/2},{x:R-p/2,y:B-O/2+h.height+w},{x:R-h.width/2,y:B-O/2+h.height+w}]:$=[{x:R-p/2,y:B-O/2},{x:R+p/2,y:B-O/2},{x:R+p/2,y:B-O/2+d},{x:R+h.width/2,y:B-O/2+d},{x:R+h.width/2/2,y:B+O/2},{x:R-h.width/2,y:B+O/2},{x:R-h.width/2,y:B-O/2+d},{x:R-p/2,y:B-O/2+d}],nt.polygon(t,$,L)},c}m(ox,"icon");async function lx(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=ht(t);t.labelStyle=n;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,label:u}=await bt(e,t,"icon-shape default"),f=20,d=t.label?8:0,p=t.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:x}=Ki(t),b=st.svg(c),w=at(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=x.get("fill");w.stroke=C??y;const v=c.append("g");t.icon&&v.html(`<g>${await tn(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const E=v.node().getBBox(),T=E.width,N=E.height,W=E.x,I=E.y,k=Math.max(T,N)*Math.SQRT2+f*2,L=b.circle(0,0,k,w),R=Math.max(k,h.width),B=k+h.height+d,O=b.rectangle(-R/2,-B/2,R,B,{...w,fill:"transparent",stroke:"none"}),$=c.insert(()=>L,":first-child"),q=c.insert(()=>O);return v.attr("transform",`translate(${-T/2-W},${p?h.height/2+d/2-N/2-I:-h.height/2-d/2-N/2-I})`),v.attr("style",`color: ${x.get("stroke")??g};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-B/2:B/2-h.height})`),$.attr("transform",`translate(0,${p?h.height/2+d/2:-h.height/2-d/2})`),ct(t,q),t.intersect=function(A){return V.info("iconSquare intersect",t,A),nt.rect(t,A)},c}m(lx,"iconCircle");async function cx(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=ht(t);t.labelStyle=n;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await bt(e,t,"icon-shape default"),d=t.pos==="t",p=a+u*2,g=a+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Ki(t),w=-g/2,C=-p/2,v=t.label?8:0,E=st.svg(c),T=at(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const N=b.get("fill");T.stroke=N??x;const W=E.path(Br(w,C,g,p,5),T),I=Math.max(g,h.width),k=p+h.height+v,L=E.rectangle(-I/2,-k/2,I,k,{...T,fill:"transparent",stroke:"none"}),R=c.insert(()=>W,":first-child").attr("class","icon-shape2"),B=c.insert(()=>L);if(t.icon){const O=c.append("g");O.html(`<g>${await tn(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const $=O.node().getBBox(),q=$.width,A=$.height,D=$.x,_=$.y;O.attr("transform",`translate(${-q/2-D},${d?h.height/2+v/2-A/2-_:-h.height/2-v/2-A/2-_})`),O.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-k/2:k/2-h.height})`),R.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),ct(t,B),t.intersect=function(O){if(V.info("iconSquare intersect",t,O),!t.label)return nt.rect(t,O);const $=t.x??0,q=t.y??0,A=t.height??0;let D=[];return d?D=[{x:$-h.width/2,y:q-A/2},{x:$+h.width/2,y:q-A/2},{x:$+h.width/2,y:q-A/2+h.height+v},{x:$+g/2,y:q-A/2+h.height+v},{x:$+g/2,y:q+A/2},{x:$-g/2,y:q+A/2},{x:$-g/2,y:q-A/2+h.height+v},{x:$-h.width/2,y:q-A/2+h.height+v}]:D=[{x:$-g/2,y:q-A/2},{x:$+g/2,y:q-A/2},{x:$+g/2,y:q-A/2+p},{x:$+h.width/2,y:q-A/2+p},{x:$+h.width/2/2,y:q+A/2},{x:$-h.width/2,y:q+A/2},{x:$-h.width/2,y:q-A/2+p},{x:$-g/2,y:q-A/2+p}],nt.polygon(t,D,O)},c}m(cx,"iconRounded");async function hx(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=ht(t);t.labelStyle=n;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await bt(e,t,"icon-shape default"),d=t.pos==="t",p=a+u*2,g=a+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Ki(t),w=-g/2,C=-p/2,v=t.label?8:0,E=st.svg(c),T=at(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const N=b.get("fill");T.stroke=N??x;const W=E.path(Br(w,C,g,p,.1),T),I=Math.max(g,h.width),k=p+h.height+v,L=E.rectangle(-I/2,-k/2,I,k,{...T,fill:"transparent",stroke:"none"}),R=c.insert(()=>W,":first-child"),B=c.insert(()=>L);if(t.icon){const O=c.append("g");O.html(`<g>${await tn(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const $=O.node().getBBox(),q=$.width,A=$.height,D=$.x,_=$.y;O.attr("transform",`translate(${-q/2-D},${d?h.height/2+v/2-A/2-_:-h.height/2-v/2-A/2-_})`),O.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-k/2:k/2-h.height})`),R.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),ct(t,B),t.intersect=function(O){if(V.info("iconSquare intersect",t,O),!t.label)return nt.rect(t,O);const $=t.x??0,q=t.y??0,A=t.height??0;let D=[];return d?D=[{x:$-h.width/2,y:q-A/2},{x:$+h.width/2,y:q-A/2},{x:$+h.width/2,y:q-A/2+h.height+v},{x:$+g/2,y:q-A/2+h.height+v},{x:$+g/2,y:q+A/2},{x:$-g/2,y:q+A/2},{x:$-g/2,y:q-A/2+h.height+v},{x:$-h.width/2,y:q-A/2+h.height+v}]:D=[{x:$-g/2,y:q-A/2},{x:$+g/2,y:q-A/2},{x:$+g/2,y:q-A/2+p},{x:$+h.width/2,y:q-A/2+p},{x:$+h.width/2/2,y:q+A/2},{x:$-h.width/2,y:q+A/2},{x:$-h.width/2,y:q-A/2+p},{x:$-g/2,y:q-A/2+p}],nt.polygon(t,D,O)},c}m(hx,"iconSquare");async function ux(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/s;const{labelStyles:o}=ht(t);t.labelStyle=o;const a=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?a??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,a??0);const{shapeSvg:u,bbox:f,label:d}=await bt(e,t,"image-shape default"),p=t.pos==="t",g=-c/2,y=-h/2,x=t.label?8:0,b=st.svg(u),w=at(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=b.rectangle(g,y,c,h,w),v=Math.max(c,f.width),E=h+f.height+x,T=b.rectangle(-v/2,-E/2,v,E,{...w,fill:"none",stroke:"none"}),N=u.insert(()=>C,":first-child"),W=u.insert(()=>T);if(t.img){const I=u.append("image");I.attr("href",t.img),I.attr("width",c),I.attr("height",h),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-c/2},${p?E/2-h:-E/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),N.attr("transform",`translate(0,${p?f.height/2+x/2:-f.height/2-x/2})`),ct(t,W),t.intersect=function(I){if(V.info("iconSquare intersect",t,I),!t.label)return nt.rect(t,I);const k=t.x??0,L=t.y??0,R=t.height??0;let B=[];return p?B=[{x:k-f.width/2,y:L-R/2},{x:k+f.width/2,y:L-R/2},{x:k+f.width/2,y:L-R/2+f.height+x},{x:k+c/2,y:L-R/2+f.height+x},{x:k+c/2,y:L+R/2},{x:k-c/2,y:L+R/2},{x:k-c/2,y:L-R/2+f.height+x},{x:k-f.width/2,y:L-R/2+f.height+x}]:B=[{x:k-c/2,y:L-R/2},{x:k+c/2,y:L-R/2},{x:k+c/2,y:L-R/2+h},{x:k+f.width/2,y:L-R/2+h},{x:k+f.width/2/2,y:L+R/2},{x:k-f.width/2,y:L+R/2},{x:k-f.width/2,y:L-R/2+h},{x:k-c/2,y:L-R/2+h}],nt.polygon(t,B,I)},u}m(ux,"imageSquare");async function fx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),a=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*a/6,y:-a},{x:-3*a/6,y:-a}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=st.svg(n),f=at(t,{}),d=_t(l),p=u.path(d,f);c=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),h&&c.attr("style",h)}else c=Or(n,o,a,l);return i&&c.attr("style",i),t.width=o,t.height=a,ct(t,c),t.intersect=function(u){return nt.polygon(t,l,u)},n}m(fx,"inv_trapezoid");async function vo(e,t,r){const{labelStyles:i,nodeStyles:n}=ht(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await bt(e,t,gt(t)),a=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-a/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:p}=t;if(r?.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const g=st.svg(s),y=at(t,{}),x=f||d?g.path(Br(c,h,a,l,f||0),y):g.rectangle(c,h,a,l,y);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",be(p))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",be(f)).attr("ry",be(d)).attr("x",c).attr("y",h).attr("width",a).attr("height",l);return ct(t,u),t.intersect=function(g){return nt.rect(t,g)},s}m(vo,"drawRect");async function dx(e,t){const{shapeSvg:r,bbox:i,label:n}=await bt(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),ct(t,s),t.intersect=function(l){return nt.rect(t,l)},r}m(dx,"labelRect");async function px(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),a=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:o+3*a/6,y:0},{x:o,y:-a},{x:-(3*a)/6,y:-a}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=st.svg(n),f=at(t,{}),d=_t(l),p=u.path(d,f);c=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),h&&c.attr("style",h)}else c=Or(n,o,a,l);return i&&c.attr("style",i),t.width=o,t.height=a,ct(t,c),t.intersect=function(u){return nt.polygon(t,l,u)},n}m(px,"lean_left");async function gx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),a=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:-3*a/6,y:0},{x:o,y:0},{x:o+3*a/6,y:-a},{x:0,y:-a}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=st.svg(n),f=at(t,{}),d=_t(l),p=u.path(d,f);c=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),h&&c.attr("style",h)}else c=Or(n,o,a,l);return i&&c.attr("style",i),t.width=o,t.height=a,ct(t,c),t.intersect=function(u){return nt.polygon(t,l,u)},n}m(gx,"lean_right");function mx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,t?.width??0),a=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:a+l/2},{x:o-2*l,y:a+l/2},{x:0,y:2*a},{x:o,y:a-l/2},{x:2*l,y:a-l/2}],h=st.svg(n),u=at(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=_t(c),d=h.path(f,u),p=n.insert(()=>d,":first-child");return s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${o/2},${-a})`),ct(t,p),t.intersect=function(g){return V.info("lightningBolt intersect",t,g),nt.polygon(t,c,g)},n}m(mx,"lightningBolt");var XM=m((e,t,r,i,n,s,o)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),KM=m((e,t,r,i,n,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),ZM=m((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function yx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0),t.width??0),l=a/2,c=l/(2.5+a/50),h=Math.max(s.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=st.svg(n),g=KM(0,0,a,h,l,c,u),y=ZM(0,c,a,h,l,c),x=at(t,{}),b=p.path(g,x),w=p.path(y,x);n.insert(()=>w,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const p=XM(0,0,a,h,l,c,u);f=n.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",be(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-a/2}, ${-(h/2+c)})`),ct(t,f),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),t.intersect=function(p){const g=nt.rect(t,p),y=g.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,p.y-(t.y??0)>0&&(x=-x),g.y+=x}return g},n}m(yx,"linedCylinder");async function xx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-a/2-a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:h/2},...Lr(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,c,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2},{x:-a/2,y:-h/2},{x:-a/2,y:h/2*1.1},{x:-a/2,y:-h/2}],g=f.polygon(p.map(x=>[x.x,x.y]),d),y=n.insert(()=>g,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),ct(t,y),t.intersect=function(x){return nt.polygon(t,p,x)},n}m(xx,"linedWaveEdgedRect");async function bx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=5,h=-a/2,u=-l/2,{cssStyles:f}=t,d=st.svg(n),p=at(t,{}),g=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+a-c,y:u+l+c},{x:h+a-c,y:u+l},{x:h+a,y:u+l},{x:h+a,y:u+l-c},{x:h+a+c,y:u+l-c},{x:h+a+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+a-c,y:u+c},{x:h+a-c,y:u+l},{x:h+a,y:u+l},{x:h+a,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const x=_t(g),b=d.path(x,p),w=_t(y),C=d.path(w,{...p,fill:"none"}),v=n.insert(()=>C,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)-c-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),ct(t,v),t.intersect=function(E){return nt.polygon(t,g,E)},n}m(bx,"multiRect");async function vx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-a/2,f=-h/2,d=5,{cssStyles:p}=t,g=Lr(u-d,f+h+d,u+a-d,f+h+d,c,.8),y=g?.[g.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...g,{x:u+a-d,y:y.y-d},{x:u+a,y:y.y-d},{x:u+a,y:y.y-2*d},{x:u+a+d,y:y.y-2*d},{x:u+a+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+a-d,y:f+d},{x:u+a-d,y:y.y-d},{x:u+a,y:y.y-d},{x:u+a,y:f},{x:u,y:f}],w=st.svg(n),C=at(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=_t(x),E=w.path(v,C),T=_t(b),N=w.path(T,C),W=n.insert(()=>E,":first-child");return W.insert(()=>N),W.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)+d-c/2-(s.y-(s.top??0))})`),ct(t,W),t.intersect=function(I){return nt.polygon(t,x,I)},n}m(vx,"multiWaveEdgedRectangle");async function wx(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=ht(t);t.labelStyle=i,t.useHtmlLabels||Jt().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:a,label:l}=await bt(e,t,gt(t)),c=Math.max(a.width+(t.padding??0)*2,t?.width??0),h=Math.max(a.height+(t.padding??0)*2,t?.height??0),u=-c/2,f=-h/2,{cssStyles:d}=t,p=st.svg(o),g=at(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=p.rectangle(u,f,c,h,g),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),ct(t,x),t.intersect=function(b){return nt.rect(t,b)},o}m(wx,"note");var QM=m((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Cx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=s.width+t.padding,a=s.height+t.padding,l=o+a,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=st.svg(n),p=at(t,{}),g=QM(0,0,l),y=d.path(g,p);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=Or(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),ct(t,u),t.intersect=function(d){return V.debug(`APA12 Intersect called SPLIT
237
- point:`,d,`
238
- node:
239
- `,t,`
240
- res:`,nt.polygon(t,h,d)),nt.polygon(t,h,d)},n}m(Cx,"question");async function _x(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0),t?.width??0),l=Math.max(s.height+(t.padding??0),t?.height??0),c=-a/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=t,p=st.svg(n),g=at(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=_t(f),x=p.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),ct(t,b),t.intersect=function(w){return nt.polygon(t,f,w)},n}m(_x,"rect_left_inv_arrow");async function Sx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=s.insert("g"),a=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=a.node().appendChild(await Yr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(Wt(Et()?.flowchart?.htmlLabels)){const N=h.children[0],W=St(h);u=N.getBoundingClientRect(),W.attr("width",u.width),W.attr("height",u.height)}V.info("Text 2",l);const f=l||[],d=h.getBBox(),p=a.node().appendChild(await Yr(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),g=p.children[0],y=St(p);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;St(p).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),St(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=a.node().getBBox(),a.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),w=u.height+(t.padding||0),C=-u.width/2-x,v=-u.height/2-x;let E,T;if(t.look==="handDrawn"){const N=st.svg(s),W=at(t,{}),I=N.path(Br(C,v,b,w,t.rx||0),W),k=N.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,W);T=s.insert(()=>(V.debug("Rough node insert CXC",I),k),":first-child"),E=s.insert(()=>(V.debug("Rough node insert CXC",I),I),":first-child")}else E=o.insert("rect",":first-child"),T=o.insert("line"),E.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return ct(t,E),t.intersect=function(N){return nt.rect(t,N)},s}m(Sx,"rectWithTitle");function Mn(e,t,r,i,n,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/n,p=f/s,g=Math.sqrt(d**2+p**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**2),x=l+y*s*Math.sin(h)*(o?-1:1),b=c-y*n*Math.cos(h)*(o?-1:1),w=Math.atan2((t-b)/s,(e-x)/n);let v=Math.atan2((i-b)/s,(r-x)/n)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const E=[];for(let T=0;T<20;T++){const N=T/19,W=w+N*v,I=x+n*Math.cos(W),k=b+s*Math.sin(W);E.push({x:I,y:k})}return E}m(Mn,"generateArcPoints");async function kx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=t?.padding??0,a=t?.padding??0,l=(t?.width?t?.width:s.width)+o*2,c=(t?.height?t?.height:s.height)+a*2,h=5,u=5,{cssStyles:f}=t,d=st.svg(n),p=at(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...Mn(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...Mn(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...Mn(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...Mn(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=_t(g),x=d.path(y,p),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),ct(t,b),t.intersect=function(w){return nt.polygon(t,g,w)},n}m(kx,"roundedRect");async function Tx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=t?.padding??0,l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=-s.width/2-a,u=-s.height/2-a,{cssStyles:f}=t,d=st.svg(n),p=at(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(g.map(b=>[b.x,b.y]),p),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",be(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-(s.y-(s.top??0))})`),ct(t,x),t.intersect=function(b){return nt.rect(t,b)},n}m(Tx,"shadedProcess");async function Ex(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=-a/2,h=-l/2,{cssStyles:u}=t,f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:c,y:h},{x:c,y:h+l},{x:c+a,y:h+l},{x:c+a,y:h-l/2}],g=_t(p),y=f.path(g,d),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-a/2+(t.padding??0)-(s.x-(s.left??0))}, ${-l/4+(t.padding??0)-(s.y-(s.top??0))})`),ct(t,x),t.intersect=function(b){return nt.polygon(t,p,b)},n}m(Ex,"slopedRect");async function Lx(e,t){const r={rx:0,ry:0,labelPaddingX:(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return vo(e,t,r)}m(Lx,"squareRect");async function Ax(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=s.height+t.padding,a=s.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=st.svg(n),u=at(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-a/2+l,y:-o/2},{x:a/2-l,y:-o/2},...es(-a/2+l,0,l,50,90,270),{x:a/2-l,y:o/2},...es(a/2-l,0,l,50,270,450)],d=_t(f),p=h.path(d,u),g=n.insert(()=>p,":first-child");return g.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),ct(t,g),t.intersect=function(y){return nt.polygon(t,f,y)},n}m(Ax,"stadium");async function Mx(e,t){return vo(e,t,{rx:5,ry:5})}m(Mx,"state");function $x(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=ht(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:a,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=st.svg(c),u=at(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=a??l,p=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),g=c.insert(()=>f,":first-child");return g.insert(()=>p),s&&g.selectAll("path").attr("style",s),n&&g.selectAll("path").attr("style",n),ct(t,g),t.intersect=function(y){return nt.circle(t,7,y)},c}m($x,"stateEnd");function Bx(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const a=st.svg(n).circle(0,0,14,rS(i));s=n.insert(()=>a),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=n.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return ct(t,s),t.intersect=function(o){return nt.circle(t,7,o)},n}m(Bx,"stateStart");async function Ox(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=(t?.padding||0)/2,a=s.width+t.padding,l=s.height+t.padding,c=-s.width/2-o,h=-s.height/2-o,u=[{x:0,y:0},{x:a,y:0},{x:a,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=st.svg(n),d=at(t,{}),p=f.rectangle(c-8,h,a+16,l,d),g=f.line(c,h,c,h+l,d),y=f.line(c+a,h,c+a,h+l,d);n.insert(()=>g,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>p,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",be(b)),ct(t,x)}else{const f=Or(n,a,l,u);i&&f.attr("style",i),ct(t,f)}return t.intersect=function(f){return nt.polygon(t,u,f)},n}m(Ox,"subroutine");async function Rx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),a=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-a/2,h=.2*a,u=.2*a,{cssStyles:f}=t,d=st.svg(n),p=at(t,{}),g=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+a},{x:l-h/2,y:c+a}],y=[{x:l+o-h/2,y:c+a},{x:l+o+h/2,y:c+a},{x:l+o+h/2,y:c+a-u}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const x=_t(g),b=d.path(x,p),w=_t(y),C=d.path(w,{...p,fillStyle:"solid"}),v=n.insert(()=>C,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),ct(t,v),t.intersect=function(E){return nt.polygon(t,g,E)},n}m(Rx,"taggedRect");async function Dx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*a,u=.2*l,f=l+c,{cssStyles:d}=t,p=st.svg(n),g=at(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-a/2-a/2*.1,y:f/2},...Lr(-a/2-a/2*.1,f/2,a/2+a/2*.1,f/2,c,.8),{x:a/2+a/2*.1,y:-f/2},{x:-a/2-a/2*.1,y:-f/2}],x=-a/2+a/2*.1,b=-f/2-u*.4,w=[{x:x+a-h,y:(b+l)*1.4},{x:x+a,y:b+l-u},{x:x+a,y:(b+l)*.9},...Lr(x+a,(b+l)*1.3,x+a-h,(b+l)*1.5,-l*.03,.5)],C=_t(y),v=p.path(C,g),E=_t(w),T=p.path(E,{...g,fillStyle:"solid"}),N=n.insert(()=>T,":first-child");return N.insert(()=>v,":first-child"),N.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),ct(t,N),t.intersect=function(W){return nt.polygon(t,y,W)},n}m(Dx,"taggedWaveEdgedRectangle");async function Fx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=Math.max(s.width+t.padding,t?.width||0),a=Math.max(s.height+t.padding,t?.height||0),l=-o/2,c=-a/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",a),ct(t,h),t.intersect=function(u){return nt.rect(t,u)},n}m(Fx,"text");var JM=m((e,t,r,i,n,s)=>`M${e},${t}
241
- a${n},${s} 0,0,1 0,${-i}
242
- l${r},0
243
- a${n},${s} 0,0,1 0,${i}
244
- M${r},${-i}
245
- a${n},${s} 0,0,0 0,${i}
246
- l${-r},0`,"createCylinderPathD"),t$=m((e,t,r,i,n,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),e$=m((e,t,r,i,n,s)=>[`M${e+r/2},${-i/2}`,`a${n},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Ix(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o,halfPadding:a}=await bt(e,t,gt(t)),l=t.look==="neo"?a*2:a,c=s.height+l,h=c/2,u=h/(2.5+c/50),f=s.width+u+l,{cssStyles:d}=t;let p;if(t.look==="handDrawn"){const g=st.svg(n),y=t$(0,0,f,c,u,h),x=e$(0,0,f,c,u,h),b=g.path(y,at(t,{})),w=g.path(x,at(t,{fill:"none"}));p=n.insert(()=>w,":first-child"),p=n.insert(()=>b,":first-child"),p.attr("class","basic label-container"),d&&p.attr("style",d)}else{const g=JM(0,0,f,c,u,h);p=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",be(d)).attr("style",i),p.attr("class","basic label-container"),d&&p.selectAll("path").attr("style",d),i&&p.selectAll("path").attr("style",i)}return p.attr("label-offset-x",u),p.attr("transform",`translate(${-f/2}, ${c/2} )`),o.attr("transform",`translate(${-(s.width/2)-u-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),ct(t,p),t.intersect=function(g){const y=nt.rect(t,g),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,g.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}m(Ix,"tiltedCylinder");async function Nx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=s.width+t.padding,a=s.height+t.padding,l=[{x:-3*a/6,y:0},{x:o+3*a/6,y:0},{x:o,y:-a},{x:0,y:-a}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=st.svg(n),f=at(t,{}),d=_t(l),p=u.path(d,f);c=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),h&&c.attr("style",h)}else c=Or(n,o,a,l);return i&&c.attr("style",i),t.width=o,t.height=a,ct(t,c),t.intersect=function(u){return nt.polygon(t,l,u)},n}m(Nx,"trapezoid");async function Px(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=60,a=20,l=Math.max(o,s.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=st.svg(n),f=at(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],p=_t(d),g=u.path(p,f),y=n.insert(()=>g,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),ct(t,y),t.intersect=function(x){return nt.polygon(t,d,x)},n}m(Px,"trapezoidalPentagon");async function jx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Wt(Et().flowchart?.htmlLabels),l=s.width+(t.padding??0),c=l+s.height,h=l+s.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,d=st.svg(n),p=at(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=_t(u),y=d.path(g,p),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,ct(t,x),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${c/2-(s.height+(t.padding??0)/(a?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(b){return V.info("Triangle intersect",t,u,b),nt.polygon(t,u,b)},n}m(jx,"triangle");async function zx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,d=70-a,p=d>0?d/2:0,g=st.svg(n),y=at(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-a/2-p,y:h/2},...Lr(-a/2-p,h/2,a/2+p,h/2,c,.8),{x:a/2+p,y:-h/2},{x:-a/2-p,y:-h/2}],b=_t(x),w=g.path(b,y),C=n.insert(()=>w,":first-child");return C.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c-(s.y-(s.top??0))})`),ct(t,C),t.intersect=function(v){return nt.polygon(t,x,v)},n}m(zx,"waveEdgedRectangle");async function Wx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await bt(e,t,gt(t)),o=100,a=50,l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,a);const d=Math.min(f*.2,f/4),p=f+d*2,{cssStyles:g}=t,y=st.svg(n),x=at(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:p/2},...Lr(-u/2,p/2,u/2,p/2,d,1),{x:u/2,y:-p/2},...Lr(u/2,-p/2,-u/2,-p/2,d,-1)],w=_t(b),C=y.path(w,x),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),ct(t,v),t.intersect=function(E){return nt.polygon(t,b,E)},n}m(Wx,"waveRectangle");async function qx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await bt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=5,h=-a/2,u=-l/2,{cssStyles:f}=t,d=st.svg(n),p=at(t,{}),g=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+a,y:u+l},{x:h+a,y:u-c}],y=`M${h-c},${u-c} L${h+a},${u-c} L${h+a},${u+l} L${h-c},${u+l} L${h-c},${u-c}
247
- M${h-c},${u} L${h+a},${u}
248
- M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const x=d.path(y,p),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)+c/2-(s.x-(s.left??0))}, ${-(s.height/2)+c/2-(s.y-(s.top??0))})`),ct(t,b),t.intersect=function(w){return nt.polygon(t,g,w)},n}m(qx,"windowPane");async function zh(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:H}=Jt(),{background:P}=H,U={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${P}`]};await zh(e,U)}const i=Jt();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,s=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:a,nodeStyles:l}=ht(t);if(r.attributes.length===0&&t.label){const H={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};Ke(t.label,i)+H.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const P=await vo(e,t,H);if(!Wt(i.htmlLabels)){const U=P.select("text"),Y=U.node()?.getBBox();U.attr("transform",`translate(${-Y.width/2}, 0)`)}return P}i.htmlLabels||(n*=1.25,s*=1.25);let c=gt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await Ci(h,t.label??"",i,0,0,["name"],a);u.height+=s;let f=0;const d=[],p=[];let g=0,y=0,x=0,b=0,w=!0,C=!0;for(const H of r.attributes){const P=await Ci(h,H.type,i,0,f,["attribute-type"],a);g=Math.max(g,P.width+n);const U=await Ci(h,H.name,i,0,f,["attribute-name"],a);y=Math.max(y,U.width+n);const Y=await Ci(h,H.keys.join(),i,0,f,["attribute-keys"],a);x=Math.max(x,Y.width+n);const K=await Ci(h,H.comment,i,0,f,["attribute-comment"],a);b=Math.max(b,K.width+n);const Z=Math.max(P.height,U.height,Y.height,K.height)+s;p.push({yOffset:f,rowHeight:Z}),f+=Z}let v=4;x<=n&&(w=!1,x=0,v--),b<=n&&(C=!1,b=0,v--);const E=h.node().getBBox();if(u.width+n*2-(g+y+x+b)>0){const H=u.width+n*2-(g+y+x+b);g+=H/v,y+=H/v,x>0&&(x+=H/v),b>0&&(b+=H/v)}const T=g+y+x+b,N=st.svg(h),W=at(t,{});t.look!=="handDrawn"&&(W.roughness=0,W.fillStyle="solid");let I=0;p.length>0&&(I=p.reduce((H,P)=>H+(P?.rowHeight??0),0));const k=Math.max(E.width+n*2,t?.width||0,T),L=Math.max((I??0)+u.height,t?.height||0),R=-k/2,B=-L/2;h.selectAll("g:not(:first-child)").each((H,P,U)=>{const Y=St(U[P]),K=Y.attr("transform");let Z=0,Q=0;if(K){const et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(K);et&&(Z=parseFloat(et[1]),Q=parseFloat(et[2]),Y.attr("class").includes("attribute-name")?Z+=g:Y.attr("class").includes("attribute-keys")?Z+=g+y:Y.attr("class").includes("attribute-comment")&&(Z+=g+y+x))}Y.attr("transform",`translate(${R+n/2+Z}, ${Q+B+u.height+s/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(B+s/2)+")");const O=N.rectangle(R,B,k,L,W),$=h.insert(()=>O,":first-child").attr("style",o.join("")),{themeVariables:q}=Jt(),{rowEven:A,rowOdd:D,nodeBorder:_}=q;d.push(0);for(const[H,P]of p.entries()){const Y=(H+1)%2===0&&P.yOffset!==0,K=N.rectangle(R,u.height+B+P?.yOffset,k,P?.rowHeight,{...W,fill:Y?A:D,stroke:_});h.insert(()=>K,"g.label").attr("style",o.join("")).attr("class",`row-rect-${Y?"even":"odd"}`)}let M=N.line(R,u.height+B,k+R,u.height+B,W);h.insert(()=>M).attr("class","divider"),M=N.line(g+R,u.height+B,g+R,L+B,W),h.insert(()=>M).attr("class","divider"),w&&(M=N.line(g+y+R,u.height+B,g+y+R,L+B,W),h.insert(()=>M).attr("class","divider")),C&&(M=N.line(g+y+x+R,u.height+B,g+y+x+R,L+B,W),h.insert(()=>M).attr("class","divider"));for(const H of d)M=N.line(R,u.height+B+H,k+R,u.height+B+H,W),h.insert(()=>M).attr("class","divider");if(ct(t,$),l&&t.look!=="handDrawn"){const P=l.split(";")?.filter(U=>U.includes("stroke"))?.map(U=>`${U}`).join("; ");h.selectAll("path").attr("style",P??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(H){return nt.rect(t,H)},h}m(zh,"erBox");async function Ci(e,t,r,i=0,n=0,s=[],o=""){const a=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==Ll(t)&&(t=Ll(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=a.node().appendChild(await xr(a,t,{width:Ke(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(Wt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=St(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}m(Ci,"addText");async function Hx(e,t,r,i,n=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",gt(t)).attr("id",t.domId||t.id);let a=null,l=null,c=null,h=null,u=0,f=0,d=0;if(a=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await $n(a,{text:`«${b}»`},0),u=a.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await $n(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();f=p.height,c=o.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const w=await $n(c,b,g,[b.parseClassifier()]);g+=w+s}d=c.node().getBBox().height,d<=0&&(d=n/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const w=await $n(h,b,y,[b.parseClassifier()]);y+=w+s}let x=o.node().getBBox();if(a!==null){const b=a.node().getBBox();a.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+n*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+n*4:n*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}m(Hx,"textHelper");async function $n(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Jt();let o="useHtmlLabels"in t?t.useHtmlLabels:Wt(s.htmlLabels)??!0,a="";"text"in t?a=t.text:a=t.label,!o&&a.startsWith("\\")&&(a=a.substring(1)),Qr(a)&&(o=!0);const l=await xr(n,Kc($r(a)),{width:Ke(a,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let c,h=1;if(o){const u=l.children[0],f=St(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const p=a.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function x(){if(g.style.display="flex",g.style.flexDirection="column",p){const b=s.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,C=parseInt(b,10)*5+"px";g.style.minWidth=C,g.style.maxWidth=C}else g.style.width="100%";y(g)}m(x,"setupImage"),setTimeout(()=>{g.complete&&x()}),g.addEventListener("error",x),g.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&St(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=a[0]+a.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),a[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}m($n,"addText");async function Ux(e,t){const r=Et(),i=r.class.padding??12,n=i,s=t.useHtmlLabels??Wt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:a,bbox:l}=await Hx(e,t,r,s,n),{labelStyles:c,nodeStyles:h}=ht(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=o.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,d=st.svg(a),p=at(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=l.width;let y=l.height;o.members.length===0&&o.methods.length===0?y+=n:o.members.length>0&&o.methods.length===0&&(y+=n*2);const x=-g/2,b=-y/2,w=d.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),g+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),p),C=a.insert(()=>w,":first-child");C.attr("class","basic label-container");const v=C.node().getBBox();a.selectAll(".text").each((W,I,k)=>{const L=St(k[I]),R=L.attr("transform");let B=0;if(R){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);A&&(B=parseFloat(A[2]))}let O=B+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);s||(O-=4);let $=x;(L.attr("class").includes("label-group")||L.attr("class").includes("annotation-group"))&&($=-L.node()?.getBBox().width/2||0,a.selectAll("text").each(function(q,A,D){window.getComputedStyle(D[A]).textAnchor==="middle"&&($=0)})),L.attr("transform",`translate(${$}, ${O})`)});const E=a.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,T=a.select(".label-group").node().getBBox().height-(f?i/2:0)||0,N=a.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const W=d.line(v.x,E+T+b+i,v.x+v.width,E+T+b+i,p);a.insert(()=>W).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const W=d.line(v.x,E+T+N+b+n*2+i,v.x+v.width,E+T+N+b+i+n*2,p);a.insert(()=>W).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&a.selectAll("path").attr("style",u),C.select(":nth-child(2)").attr("style",u),a.selectAll(".divider").select("path").attr("style",u),t.labelStyle?a.selectAll("span").attr("style",t.labelStyle):a.selectAll("span").attr("style",u),!s){const W=RegExp(/color\s*:\s*([^;]*)/),I=W.exec(u);if(I){const k=I[0].replace("color","fill");a.selectAll("tspan").attr("style",k)}else if(c){const k=W.exec(c);if(k){const L=k[0].replace("color","fill");a.selectAll("tspan").attr("style",L)}}}return ct(t,C),t.intersect=function(W){return nt.rect(t,W)},a}m(Ux,"classBox");async function Yx(e,t){const{labelStyles:r,nodeStyles:i}=ht(t);t.labelStyle=r;const n=t,s=t,o=20,a=20,l="verifyMethod"in t,c=gt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await He(h,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):u=await He(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=u;const d=await He(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+a,l){const E=await He(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,f,t.labelStyle);f+=E;const T=await He(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=T;const N=await He(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=N,await He(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const E=await He(h,`${s.type?`Type: ${s.type}`:""}`,f,t.labelStyle);f+=E,await He(h,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,f,t.labelStyle)}const p=(h.node()?.getBBox().width??200)+o,g=(h.node()?.getBBox().height??200)+o,y=-p/2,x=-g/2,b=st.svg(h),w=at(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=b.rectangle(y,x,p,g,w),v=h.insert(()=>C,":first-child");if(v.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((E,T,N)=>{const W=St(N[T]),I=W.attr("transform");let k=0,L=0;if(I){const $=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);$&&(k=parseFloat($[1]),L=parseFloat($[2]))}const R=L-g/2;let B=y+o/2;(T===0||T===1)&&(B=k),W.attr("transform",`translate(${B}, ${R+o})`)}),f>u+d+a){const E=b.line(y,x+u+d+a,y+p,x+u+d+a,w);h.insert(()=>E).attr("style",i)}return ct(t,v),t.intersect=function(E){return nt.rect(t,E)},h}m(Yx,"requirementBox");async function He(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),s=Et(),o=s.htmlLabels??!0,a=await xr(n,Kc($r(t)),{width:Ke(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let l;if(o){const c=a.children[0],h=St(a);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=a.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);l=a.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}m(He,"addText");var r$=m(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Vx(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=ht(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:a,bbox:l,label:c}=await bt(e,t,gt(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,g;f?{label:p,bbox:g}=await ol(f,"ticket"in t&&t.ticket||"",d):{label:p,bbox:g}=await ol(a,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await ol(a,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,w=t?.width||0,C=Math.max(g.height,x.height)/2,v=Math.max(l.height+b*2,t?.height||0)+C,E=-w/2,T=-v/2;c.attr("transform","translate("+(h-w/2)+", "+(-C-l.height/2)+")"),p.attr("transform","translate("+(h-w/2)+", "+(-C+l.height/2)+")"),y.attr("transform","translate("+(h+w/2-x.width-2*s)+", "+(-C+l.height/2)+")");let N;const{rx:W,ry:I}=t,{cssStyles:k}=t;if(t.look==="handDrawn"){const L=st.svg(a),R=at(t,{}),B=W||I?L.path(Br(E,T,w,v,W||0),R):L.rectangle(E,T,w,v,R);N=a.insert(()=>B,":first-child"),N.attr("class","basic label-container").attr("style",k||null)}else{N=a.insert("rect",":first-child"),N.attr("class","basic label-container __APA__").attr("style",n).attr("rx",W??5).attr("ry",I??5).attr("x",E).attr("y",T).attr("width",w).attr("height",v);const L="priority"in t&&t.priority;if(L){const R=a.append("line"),B=E+2,O=T+Math.floor((W??0)/2),$=T+v-Math.floor((W??0)/2);R.attr("x1",B).attr("y1",O).attr("x2",B).attr("y2",$).attr("stroke-width","4").attr("stroke",r$(L))}}return ct(t,N),t.height=v,t.intersect=function(L){return nt.rect(t,L)},a}m(Vx,"kanbanItem");var i$=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Lx},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:kx},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ax},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ox},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Q0},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:U0},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Cx},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:sx},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:gx},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:px},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Nx},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:fx},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tx},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Fx},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:q0},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Tx},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Bx},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:$x},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ix},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ax},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:G0},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:X0},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:K0},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:mx},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:zx},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:nx},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ix},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:yx},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Z0},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:J0},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:jx},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:qx},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ex},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Px},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:rx},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ex},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:vx},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:bx},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:W0},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:V0},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Dx},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Rx},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Wx},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:_x},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:xx}],n$=m(()=>{const t=[...Object.entries({state:Mx,choice:H0,note:wx,rectWithTitle:Sx,labelRect:dx,iconSquare:hx,iconCircle:lx,icon:ox,iconRounded:cx,imageSquare:ux,anchor:z0,kanbanItem:Vx,classBox:Ux,erBox:zh,requirementBox:Yx}),...i$.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Gx=n$();function Xx(e){return e in Gx}m(Xx,"isValidShape");var wo=new Map;async function Wh(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Gx[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await s(i,t,r)}else n=await s(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),wo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}m(Wh,"insertNode");var s$=m((e,t)=>{wo.set(t.id,e)},"setNodeElem"),a$=m(()=>{wo.clear()},"clear"),o$=m(e=>{const t=wo.get(e.id);V.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),l$=m((e,t,r,i,n,s)=>{t.arrowTypeStart&&fd(e,"start",t.arrowTypeStart,r,i,n,s),t.arrowTypeEnd&&fd(e,"end",t.arrowTypeEnd,r,i,n,s)},"addEdgeMarkers"),c$={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},fd=m((e,t,r,i,n,s,o)=>{const a=c$[r];if(!a){V.warn(`Unknown arrow type: ${r}`);return}const l=a.type,h=`${n}_${s}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const p=d.cloneNode(!0);p.id=f,p.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),a.fill&&y.setAttribute("fill",o)}),d.parentNode?.appendChild(p)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),ja=new Map,Zt=new Map,h$=m(()=>{ja.clear(),Zt.clear()},"clear"),_n=m(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Kx=m(async(e,t)=>{let r=Wt(Et().flowchart.htmlLabels);const i=await xr(e,t.label,{style:_n(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});V.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),s=n.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();if(r){const l=i.children[0],c=St(i);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),ja.set(t.id,n),t.width=o.width,t.height=o.height;let a;if(t.startLabelLeft){const l=await Yr(t.startLabelLeft,_n(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");a=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Zt.get(t.id)||Zt.set(t.id,{}),Zt.get(t.id).startLeft=c,Bn(a,t.startLabelLeft)}if(t.startLabelRight){const l=await Yr(t.startLabelRight,_n(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");a=c.node().appendChild(l),h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Zt.get(t.id)||Zt.set(t.id,{}),Zt.get(t.id).startRight=c,Bn(a,t.startLabelRight)}if(t.endLabelLeft){const l=await Yr(t.endLabelLeft,_n(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");a=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Zt.get(t.id)||Zt.set(t.id,{}),Zt.get(t.id).endLeft=c,Bn(a,t.endLabelLeft)}if(t.endLabelRight){const l=await Yr(t.endLabelRight,_n(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");a=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Zt.get(t.id)||Zt.set(t.id,{}),Zt.get(t.id).endRight=c,Bn(a,t.endLabelRight)}return i},"insertEdgeLabel");function Bn(e,t){Et().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}m(Bn,"setTerminalWidth");var Zx=m((e,t)=>{V.debug("Moving label abc88 ",e.id,e.label,ja.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Et(),{subGraphTitleTotalMargin:n}=Qa(i);if(e.label){const s=ja.get(e.id);let o=e.x,a=e.y;if(r){const l=Le.calcLabelPosition(r);V.debug("Moving label "+e.label+" from (",o,",",a,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,a=l.y)}s.attr("transform",`translate(${o}, ${a+n/2})`)}if(e.startLabelLeft){const s=Zt.get(e.id).startLeft;let o=e.x,a=e.y;if(r){const l=Le.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}if(e.startLabelRight){const s=Zt.get(e.id).startRight;let o=e.x,a=e.y;if(r){const l=Le.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}if(e.endLabelLeft){const s=Zt.get(e.id).endLeft;let o=e.x,a=e.y;if(r){const l=Le.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}if(e.endLabelRight){const s=Zt.get(e.id).endRight;let o=e.x,a=e.y;if(r){const l=Le.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}},"positionEdgeLabel"),u$=m((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,a=e.height/2;return n>=o||s>=a},"outsideNode"),f$=m((e,t,r)=>{V.debug(`intersection calc abc89:
249
- outsidePoint: ${JSON.stringify(t)}
250
- insidePoint : ${JSON.stringify(r)}
251
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,s=Math.abs(i-r.x),o=e.width/2;let a=r.x<t.x?o-s:o+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;a=h*u/c;const f={x:r.x<t.x?r.x+a:r.x-h+a,y:r.y<t.y?r.y+c-u:r.y-c+u};return a===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),V.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${a}`,f),f}else{r.x<t.x?a=t.x-o-i:a=i-o-t.x;let u=c*a/h,f=r.x<t.x?r.x+h-a:r.x-h+a,d=r.y<t.y?r.y+u:r.y-u;return V.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${a}`,{_x:f,_y:d}),a===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),dd=m((e,t)=>{V.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(s=>{if(V.info("abc88 checking point",s,t),!u$(t,s)&&!n){const o=f$(t,i,s);V.debug("abc88 inside",s,i,o),V.debug("abc88 intersection",o,t);let a=!1;r.forEach(l=>{a=a||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?V.warn("abc88 no intersect",o,r):r.push(o),n=!0}else V.warn("abc88 outside",s,i),i=s,n||r.push(s)}),V.debug("returning points",r),r},"cutPathAtIntersect");function Qx(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],s=e[i],o=e[i+1];(n.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-n.y)>5||n.y===s.y&&s.x===o.x&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}m(Qx,"extractCornerPoints");var pd=m(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,s=Math.sqrt(i*i+n*n),o=r/s;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),d$=m(function(e){const{cornerPointPositions:t}=Qx(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],s=e[i+1],o=e[i],a=pd(n,o,5),l=pd(s,o,5),c=l.x-a.x,h=l.y-a.y;r.push(a);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(s.x-n.x)>10&&Math.abs(s.y-n.y)>=10){V.debug("Corner point fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));const d=5;o.x===a.x?f={x:c<0?a.x-d+u:a.x+d-u,y:h<0?a.y-u:a.y+u}:f={x:c<0?a.x-u:a.x+u,y:h<0?a.y-d+u:a.y+d-u}}else V.debug("Corner point skipping fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),Jx=m(function(e,t,r,i,n,s,o){const{handDrawnSeed:a}=Et();let l=t.points,c=!1;const h=n;var u=s;const f=[];for(const k in t.cssCompiledStyles)nh(k)||f.push(t.cssCompiledStyles[k]);u.intersect&&h.intersect&&(l=l.slice(1,t.points.length-1),l.unshift(h.intersect(l[0])),V.debug("Last point APA12",t.start,"-->",t.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),t.toCluster&&(V.info("to cluster abc88",r.get(t.toCluster)),l=dd(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(V.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=dd(l.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let d=l.filter(k=>!Number.isNaN(k.y));d=d$(d);let p=In;switch(p=Ta,t.curve){case"linear":p=Ta;break;case"basis":p=In;break;case"cardinal":p=Qm;break;case"bumpX":p=Vm;break;case"bumpY":p=Gm;break;case"catmullRom":p=ty;break;case"monotoneX":p=ay;break;case"monotoneY":p=oy;break;case"natural":p=cy;break;case"step":p=hy;break;case"stepAfter":p=fy;break;case"stepBefore":p=uy;break;default:p=In}const{x:g,y}=dm(t),x=Um().x(g).y(y).curve(p);let b;switch(t.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(t.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let w,C=x(d);const v=Array.isArray(t.style)?t.style:t.style?[t.style]:[];let E=v.find(k=>k?.startsWith("stroke:"));if(t.look==="handDrawn"){const k=st.svg(e);Object.assign([],d);const L=k.path(C,{roughness:.3,seed:a});b+=" transition",w=St(L).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((B,O)=>B+";"+O,""):"");let R=w.attr("d");w.attr("d",R),e.node().appendChild(w.node())}else{const k=f.join(";"),L=v?v.reduce((O,$)=>O+$+";",""):"";let R="";t.animate&&(R=" edge-animation-fast"),t.animation&&(R=" edge-animation-"+t.animation);const B=k?k+";"+L+";":L;w=e.append("path").attr("d",C).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(R??"")).attr("style",B),E=B.match(/stroke:([^;]+)/)?.[1]}let T="";(Et().flowchart.arrowMarkerAbsolute||Et().state.arrowMarkerAbsolute)&&(T=qc(!0)),V.info("arrowTypeStart",t.arrowTypeStart),V.info("arrowTypeEnd",t.arrowTypeEnd),l$(w,t,T,o,i,E);const N=Math.floor(l.length/2),W=l[N];Le.isLabelCoordinateInPath(W,w.attr("d"))||(c=!0);let I={};return c&&(I.updatedPath=l),I.originalPath=t.points,I},"insertEdge"),p$=m((e,t,r,i)=>{t.forEach(n=>{M$[n](e,r,i)})},"insertMarkers"),g$=m((e,t,r)=>{V.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),m$=m((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),y$=m((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),x$=m((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),b$=m((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),v$=m((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),w$=m((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),C$=m((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),_$=m((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),S$=m((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),k$=m((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),T$=m((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),E$=m((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),L$=m((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
252
- L20,10
253
- M20,10
254
- L0,20`)},"requirement_arrow"),A$=m((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),M$={extension:g$,composition:m$,aggregation:y$,dependency:x$,lollipop:b$,point:v$,circle:w$,cross:C$,barb:_$,only_one:S$,zero_or_one:k$,one_or_more:T$,zero_or_more:E$,requirement_arrow:L$,requirement_contains:A$},tb=p$,$$={common:ni,getConfig:Jt,insertCluster:R0,insertEdge:Jx,insertEdgeLabel:Kx,insertMarkers:tb,insertNode:Wh,interpolateToCurve:wh,labelHelper:bt,log:V,positionEdgeLabel:Zx},rs={},eb=m(e=>{for(const t of e)rs[t.name]=t},"registerLayoutLoaders"),B$=m(()=>{eb([{name:"dagre",loader:m(async()=>await Promise.resolve().then(()=>require("./dagre-2BBEFEWP-BCS301Dq.cjs")),"loader")}])},"registerDefaultLayoutLoaders");B$();var O$=m(async(e,t)=>{if(!(e.layoutAlgorithm in rs))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=rs[e.layoutAlgorithm];return(await r.loader()).render(e,t,$$,{algorithm:r.algorithm})},"render"),R$=m((e="",{fallback:t="dagre"}={})=>{if(e in rs)return e;if(t in rs)return V.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),bc={name:"mermaid",version:"11.10.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.0.0",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},rb=m(e=>{const{securityLevel:t}=Et();let r=St("body");if(t==="sandbox"){const s=St(`#i${e}`).node()?.contentDocument??document;r=St(s.body)}return r.select(`#${e}`)},"selectSvgElement"),ib="comm",nb="rule",sb="decl",D$="@import",F$="@namespace",I$="@keyframes",N$="@layer",ab=Math.abs,qh=String.fromCharCode;function ob(e){return e.trim()}function Qs(e,t,r){return e.replace(t,r)}function P$(e,t,r){return e.indexOf(t,r)}function Li(e,t){return e.charCodeAt(t)|0}function Ui(e,t,r){return e.slice(t,r)}function Ue(e){return e.length}function j$(e){return e.length}function Is(e,t){return t.push(e),e}var Co=1,Yi=1,lb=0,Me=0,jt=0,rn="";function Hh(e,t,r,i,n,s,o,a){return{value:e,root:t,parent:r,type:i,props:n,children:s,line:Co,column:Yi,length:o,return:"",siblings:a}}function z$(){return jt}function W$(){return jt=Me>0?Li(rn,--Me):0,Yi--,jt===10&&(Yi=1,Co--),jt}function Re(){return jt=Me<lb?Li(rn,Me++):0,Yi++,jt===10&&(Yi=1,Co++),jt}function wr(){return Li(rn,Me)}function Js(){return Me}function _o(e,t){return Ui(rn,e,t)}function is(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function q$(e){return Co=Yi=1,lb=Ue(rn=e),Me=0,[]}function H$(e){return rn="",e}function ll(e){return ob(_o(Me-1,vc(e===91?e+2:e===40?e+1:e)))}function U$(e){for(;(jt=wr())&&jt<33;)Re();return is(e)>2||is(jt)>3?"":" "}function Y$(e,t){for(;--t&&Re()&&!(jt<48||jt>102||jt>57&&jt<65||jt>70&&jt<97););return _o(e,Js()+(t<6&&wr()==32&&Re()==32))}function vc(e){for(;Re();)switch(jt){case e:return Me;case 34:case 39:e!==34&&e!==39&&vc(jt);break;case 40:e===41&&vc(e);break;case 92:Re();break}return Me}function V$(e,t){for(;Re()&&e+jt!==57;)if(e+jt===84&&wr()===47)break;return"/*"+_o(t,Me-1)+"*"+qh(e===47?e:Re())}function G$(e){for(;!is(wr());)Re();return _o(e,Me)}function X$(e){return H$(ta("",null,null,null,[""],e=q$(e),0,[0],e))}function ta(e,t,r,i,n,s,o,a,l){for(var c=0,h=0,u=o,f=0,d=0,p=0,g=1,y=1,x=1,b=0,w="",C=n,v=s,E=i,T=w;y;)switch(p=b,b=Re()){case 40:if(p!=108&&Li(T,u-1)==58){P$(T+=Qs(ll(b),"&","&\f"),"&\f",ab(c?a[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=ll(b);break;case 9:case 10:case 13:case 32:T+=U$(p);break;case 92:T+=Y$(Js()-1,7);continue;case 47:switch(wr()){case 42:case 47:Is(K$(V$(Re(),Js()),t,r,l),l),(is(p||1)==5||is(wr()||1)==5)&&Ue(T)&&Ui(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*g:a[c++]=Ue(T)*x;case 125*g:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(T=Qs(T,/\f/g,"")),d>0&&(Ue(T)-u||g===0&&p===47)&&Is(d>32?md(T+";",i,r,u-1,l):md(Qs(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(Is(E=gd(T,t,r,c,h,n,a,w,C=[],v=[],u,s),s),b===123)if(h===0)ta(T,t,E,E,C,s,u,a,v);else{switch(f){case 99:if(Li(T,3)===110)break;case 108:if(Li(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ta(e,E,E,i&&Is(gd(e,E,E,0,0,n,a,w,n,C=[],u,v),v),n,v,u,a,i?C:v):ta(T,E,E,E,[""],v,0,a,v)}}c=h=d=0,g=x=1,w=T="",u=o;break;case 58:u=1+Ue(T),d=p;default:if(g<1){if(b==123)--g;else if(b==125&&g++==0&&W$()==125)continue}switch(T+=qh(b),b*g){case 38:x=h>0?1:(T+="\f",-1);break;case 44:a[c++]=(Ue(T)-1)*x,x=1;break;case 64:wr()===45&&(T+=ll(Re())),f=wr(),h=u=Ue(w=T+=G$(Js())),b++;break;case 45:p===45&&Ue(T)==2&&(g=0)}}return s}function gd(e,t,r,i,n,s,o,a,l,c,h,u){for(var f=n-1,d=n===0?s:[""],p=j$(d),g=0,y=0,x=0;g<i;++g)for(var b=0,w=Ui(e,f+1,f=ab(y=o[g])),C=e;b<p;++b)(C=ob(y>0?d[b]+" "+w:Qs(w,/&\f/g,d[b])))&&(l[x++]=C);return Hh(e,t,r,n===0?nb:a,l,c,h,u)}function K$(e,t,r,i){return Hh(e,t,r,ib,qh(z$()),Ui(e,2,-2),0,i)}function md(e,t,r,i,n){return Hh(e,t,r,sb,Ui(e,0,i),Ui(e,i+1,-1),i,n)}function wc(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Z$(e,t,r,i){switch(e.type){case N$:if(e.children.length)break;case D$:case F$:case sb:return e.return=e.return||e.value;case ib:return"";case I$:return e.return=e.value+"{"+wc(e.children,i)+"}";case nb:if(!Ue(e.value=e.props.join(",")))return""}return Ue(r=wc(e.children,i))?e.return=e.value+"{"+r+"}":""}var Q$=wy(Object.keys,Object),J$=Object.prototype,tB=J$.hasOwnProperty;function cb(e){if(!cs(e))return Q$(e);var t=[];for(var r in Object(e))tB.call(e,r)&&r!="constructor"&&t.push(r);return t}var Cc=oi(Qe,"DataView"),_c=oi(Qe,"Promise"),za=oi(Qe,"Set"),Sc=oi(Qe,"WeakMap"),yd="[object Map]",eB="[object Object]",xd="[object Promise]",bd="[object Set]",vd="[object WeakMap]",wd="[object DataView]",rB=ai(Cc),iB=ai(Qn),nB=ai(_c),sB=ai(za),aB=ai(Sc);exports.getTag=si;(Cc&&exports.getTag(new Cc(new ArrayBuffer(1)))!=wd||Qn&&exports.getTag(new Qn)!=yd||_c&&exports.getTag(_c.resolve())!=xd||za&&exports.getTag(new za)!=bd||Sc&&exports.getTag(new Sc)!=vd)&&(exports.getTag=function(e){var t=si(e),r=t==eB?e.constructor:void 0,i=r?ai(r):"";if(i)switch(i){case rB:return wd;case iB:return yd;case nB:return xd;case sB:return bd;case aB:return vd}return t});var oB="[object Map]",lB="[object Set]",cB=Object.prototype,hB=cB.hasOwnProperty;function kc(e){if(e==null)return!0;if(hs(e)&&(ts(e)||typeof e=="string"||typeof e.splice=="function"||uo(e)||fo(e)||Jn(e)))return!e.length;var t=exports.getTag(e);if(t==oB||t==lB)return!e.size;if(cs(e))return!cb(e).length;for(var r in e)if(hB.call(e,r))return!1;return!0}var hb="c4",uB=m(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),fB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-AAMF2YG6-BUdDUCAg.cjs"));return{id:hb,diagram:e}},"loader"),dB={id:hb,detector:uB,loader:fB},pB=dB,ub="flowchart",gB=m((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),mB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-THRYKUMA-bRWo210y.cjs"));return{id:ub,diagram:e}},"loader"),yB={id:ub,detector:gB,loader:mB},xB=yB,fb="flowchart-v2",bB=m((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),vB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-THRYKUMA-bRWo210y.cjs"));return{id:fb,diagram:e}},"loader"),wB={id:fb,detector:bB,loader:vB},CB=wB,db="er",_B=m(e=>/^\s*erDiagram/.test(e),"detector"),SB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-HZWUO2LU-uRisj4mV.cjs"));return{id:db,diagram:e}},"loader"),kB={id:db,detector:_B,loader:SB},TB=kB,pb="gitGraph",EB=m(e=>/^\s*gitGraph/.test(e),"detector"),LB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-OJR772UL-Bq60AaCq.cjs"));return{id:pb,diagram:e}},"loader"),AB={id:pb,detector:EB,loader:LB},MB=AB,gb="gantt",$B=m(e=>/^\s*gantt/.test(e),"detector"),BB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-WV7ZQ7D5-Dh9UR52T.cjs"));return{id:gb,diagram:e}},"loader"),OB={id:gb,detector:$B,loader:BB},RB=OB,mb="info",DB=m(e=>/^\s*info/.test(e),"detector"),FB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-DDUCL6P7-DjqD8eRi.cjs"));return{id:mb,diagram:e}},"loader"),IB={id:mb,detector:DB,loader:FB},yb="pie",NB=m(e=>/^\s*pie/.test(e),"detector"),PB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-DBDJKBY4-W8GACAWO.cjs"));return{id:yb,diagram:e}},"loader"),jB={id:yb,detector:NB,loader:PB},xb="quadrantChart",zB=m(e=>/^\s*quadrantChart/.test(e),"detector"),WB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-YPSRARAO-BjYPzvUJ.cjs"));return{id:xb,diagram:e}},"loader"),qB={id:xb,detector:zB,loader:WB},HB=qB,bb="xychart",UB=m(e=>/^\s*xychart(-beta)?/.test(e),"detector"),YB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-FDP5SA34-kb-QmiwQ.cjs"));return{id:bb,diagram:e}},"loader"),VB={id:bb,detector:UB,loader:YB},GB=VB,vb="requirement",XB=m(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),KB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-EGVEC5DT-Bimu3sL7.cjs"));return{id:vb,diagram:e}},"loader"),ZB={id:vb,detector:XB,loader:KB},QB=ZB,wb="sequence",JB=m(e=>/^\s*sequenceDiagram/.test(e),"detector"),tO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-4MX5Z3NR-DHUCnBgG.cjs"));return{id:wb,diagram:e}},"loader"),eO={id:wb,detector:JB,loader:tO},rO=eO,Cb="class",iO=m((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),nO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-3BZAVTQC-BOmQDPcS.cjs"));return{id:Cb,diagram:e}},"loader"),sO={id:Cb,detector:iO,loader:nO},aO=sO,_b="classDiagram",oO=m((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),lO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-QTMF73CY-BOmQDPcS.cjs"));return{id:_b,diagram:e}},"loader"),cO={id:_b,detector:oO,loader:lO},hO=cO,Sb="state",uO=m((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),fO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-UUKSUZ4H-DNsbUQC8.cjs"));return{id:Sb,diagram:e}},"loader"),dO={id:Sb,detector:uO,loader:fO},pO=dO,kb="stateDiagram",gO=m((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),mO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-EYPG3UTE-k2P5SO6h.cjs"));return{id:kb,diagram:e}},"loader"),yO={id:kb,detector:gO,loader:mO},xO=yO,Tb="journey",bO=m(e=>/^\s*journey/.test(e),"detector"),vO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-FFXJYRFH-DtxrMVYZ.cjs"));return{id:Tb,diagram:e}},"loader"),wO={id:Tb,detector:bO,loader:vO},CO=wO,_O=m((e,t,r)=>{V.debug(`rendering svg for syntax error
255
- `);const i=rb(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Hc(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Eb={draw:_O},SO=Eb,kO={db:{},renderer:Eb,parser:{parse:m(()=>{},"parse")}},TO=kO,Lb="flowchart-elk",EO=m((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),LO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-THRYKUMA-bRWo210y.cjs"));return{id:Lb,diagram:e}},"loader"),AO={id:Lb,detector:EO,loader:LO},MO=AO,Ab="timeline",$O=m(e=>/^\s*timeline/.test(e),"detector"),BO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-3HZDQTIS-CJz-ObCi.cjs"));return{id:Ab,diagram:e}},"loader"),OO={id:Ab,detector:$O,loader:BO},RO=OO,Mb="mindmap",DO=m(e=>/^\s*mindmap/.test(e),"detector"),FO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-LNHGMQRG-qQmqPKl8.cjs"));return{id:Mb,diagram:e}},"loader"),IO={id:Mb,detector:DO,loader:FO},NO=IO,$b="kanban",PO=m(e=>/^\s*kanban/.test(e),"detector"),jO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-KOZQBZVT-Bel-f3_i.cjs"));return{id:$b,diagram:e}},"loader"),zO={id:$b,detector:PO,loader:jO},WO=zO,Bb="sankey",qO=m(e=>/^\s*sankey(-beta)?/.test(e),"detector"),HO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-HRAUVNP4-DJiyVYTm.cjs"));return{id:Bb,diagram:e}},"loader"),UO={id:Bb,detector:qO,loader:HO},YO=UO,Ob="packet",VO=m(e=>/^\s*packet(-beta)?/.test(e),"detector"),GO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-GUPCWM2R-O4fOIHyx.cjs"));return{id:Ob,diagram:e}},"loader"),XO={id:Ob,detector:VO,loader:GO},Rb="radar",KO=m(e=>/^\s*radar-beta/.test(e),"detector"),ZO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-RP2FKANI-C_dWK3j7.cjs"));return{id:Rb,diagram:e}},"loader"),QO={id:Rb,detector:KO,loader:ZO},Db="block",JO=m(e=>/^\s*block(-beta)?/.test(e),"detector"),tR=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-ZYB65J3Q-0TfXbzbL.cjs"));return{id:Db,diagram:e}},"loader"),eR={id:Db,detector:JO,loader:tR},rR=eR,Fb="architecture",iR=m(e=>/^\s*architecture/.test(e),"detector"),nR=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-KFL7JDKH-DOaG_WZV.cjs"));return{id:Fb,diagram:e}},"loader"),sR={id:Fb,detector:iR,loader:nR},aR=sR,Ib="treemap",oR=m(e=>/^\s*treemap/.test(e),"detector"),lR=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-4IRLE6MV-_WYVJBfL.cjs"));return{id:Ib,diagram:e}},"loader"),cR={id:Ib,detector:oR,loader:lR},Cd=!1,So=m(()=>{Cd||(Cd=!0,da("error",TO,e=>e.toLowerCase().trim()==="error"),da("---",{db:{clear:m(()=>{},"clear")},styles:{},renderer:{draw:m(()=>{},"draw")},parser:{parse:m(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:m(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Tl(MO,NO,aR),Tl(pB,WO,hO,aO,TB,RB,IB,jB,QB,rO,CB,xB,RO,MB,xO,pO,CO,HB,YO,XO,GB,rR,QO,cR))},"addDiagrams"),hR=m(async()=>{V.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Zr).map(async([r,{detector:i,loader:n}])=>{if(n)try{$l(r)}catch{try{const{diagram:s,id:o}=await n();da(o,s,i)}catch(s){throw V.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Zr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){V.error(`Failed to load ${t.length} external diagrams`);for(const r of t)V.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),uR="graphics-document document";function Nb(e,t){e.attr("role",uR),t!==""&&e.attr("aria-roledescription",t)}m(Nb,"setA11yDiagramInfo");function Pb(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}m(Pb,"addSVGa11yTitleDescription");var Xr,Tc=(Xr=class{constructor(t,r,i,n,s){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=s}static async fromText(t,r={}){const i=Jt(),n=zc(t,i);t=fA(t)+`
256
- `;try{$l(n)}catch{const c=uC(n);if(!c)throw new lp(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();da(h,u)}const{db:s,parser:o,renderer:a,init:l}=$l(n);return o.parser&&(o.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await o.parse(t),new Xr(n,t,s,o,a)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},m(Xr,"Diagram"),Xr),_d=[],fR=m(()=>{_d.forEach(e=>{e()}),_d=[]},"attachFunctions"),dR=m(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function jb(e){const t=e.match(op);if(!t)return{text:e,metadata:{}};let r=fm(t[1],{schema:um})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}m(jb,"extractFrontMatter");var pR=m(e=>e.replace(/\r\n?/g,`
257
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),gR=m(e=>{const{text:t,metadata:r}=jb(e),{displayMode:i,title:n,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:n,config:s,text:t}},"processFrontmatter"),mR=m(e=>{const t=Le.detectInit(e)??{},r=Le.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:rA(e),directive:t}},"processDirectives");function Uh(e){const t=pR(e),r=gR(t),i=mR(r.text),n=po(r.config,i.directive);return e=dR(i.text),{code:e,title:r.title,config:n}}m(Uh,"preprocessDiagram");function zb(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}m(zb,"toBase64");var yR=5e4,xR="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",bR="sandbox",vR="loose",wR="http://www.w3.org/2000/svg",CR="http://www.w3.org/1999/xlink",_R="http://www.w3.org/1999/xhtml",SR="100%",kR="100%",TR="border:0;margin:0;",ER="margin:0",LR="allow-top-navigation-by-user-activation allow-popups",AR='The "iframe" tag is not supported by your browser.',MR=["foreignobject"],$R=["dominant-baseline"];function Yh(e){const t=Uh(e);return ua(),TC(t.config??{}),t}m(Yh,"processAndSetConfigs");async function Wb(e,t){So();try{const{code:r,config:i}=Yh(e);return{diagramType:(await Hb(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}m(Wb,"parse");var Sd=m((e,t,r=[])=>`
258
- .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),BR=m((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
259
- ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
260
- :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
261
- :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(a=>{kc(a.styles)||o.forEach(l=>{r+=Sd(a.id,l,a.styles)}),kc(a.textStyles)||(r+=Sd(a.id,"tspan",(a?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),OR=m((e,t,r,i)=>{const n=BR(e,r),s=UC(t,n,e.themeVariables);return wc(X$(`${i}{${s}}`),Z$)},"createUserStyles"),RR=m((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=$r(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),DR=m((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":kR,i=zb(`<body style="${ER}">${e}</body>`);return`<iframe style="width:${SR};height:${r};${TR}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${LR}">
262
- ${AR}
263
- </iframe>`},"putIntoIFrame"),kd=m((e,t,r,i,n)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",wR);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function Ec(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}m(Ec,"sandboxedIframe");var FR=m((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),IR=m(async function(e,t,r){So();const i=Yh(t);t=i.code;const n=Jt();V.debug(n),t.length>(n?.maxTextSize??yR)&&(t=xR);const s="#"+e,o="i"+e,a="#"+o,l="d"+e,c="#"+l,h=m(()=>{const R=St(f?a:c).node();R&&"remove"in R&&R.remove()},"removeTempElements");let u=St("body");const f=n.securityLevel===bR,d=n.securityLevel===vR,p=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const L=Ec(St(r),o);u=St(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=St(r);kd(u,e,l,`font-family: ${p}`,CR)}else{if(FR(document,e,l,o),f){const L=Ec(St("body"),o);u=St(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=St("body");kd(u,e,l)}let g,y;try{g=await Tc.fromText(t,{title:i.title})}catch(L){if(n.suppressErrorRendering)throw h(),L;g=await Tc.fromText("error"),y=L}const x=u.select(c).node(),b=g.type,w=x.firstChild,C=w.firstChild,v=g.renderer.getClasses?.(t,g),E=OR(n,b,v,s),T=document.createElement("style");T.innerHTML=E,w.insertBefore(T,C);try{await g.renderer.draw(t,e,bc.version,g)}catch(L){throw n.suppressErrorRendering?h():SO.draw(t,e,bc.version),L}const N=u.select(`${c} svg`),W=g.db.getAccTitle?.(),I=g.db.getAccDescription?.();Ub(b,N,W,I),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",_R);let k=u.select(c).node().innerHTML;if(V.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),k=RR(k,f,Wt(n.arrowMarkerAbsolute)),f){const L=u.select(c+" svg").node();k=DR(k,L)}else d||(k=Ii.sanitize(k,{ADD_TAGS:MR,ADD_ATTR:$R,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(fR(),y)throw y;return h(),{diagramType:b,svg:k,bindFunctions:g.db.bindFunctions}},"render");function qb(e={}){const t=Gt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),SC(t),t?.theme&&t.theme in ur?t.themeVariables=ur[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ur.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?_C(t):pp();jc(r.logLevel),So()}m(qb,"initialize");var Hb=m((e,t={})=>{const{code:r}=Uh(e);return Tc.fromText(r,t)},"getDiagramFromText");function Ub(e,t,r,i){Nb(t,e),Pb(t,r,i,t.attr("id"))}m(Ub,"addA11yInfo");var ii=Object.freeze({render:IR,parse:Wb,getDiagramFromText:Hb,initialize:qb,getConfig:Jt,setConfig:gp,getSiteConfig:pp,updateSiteConfig:kC,reset:m(()=>{ua()},"reset"),globalReset:m(()=>{ua(Ni)},"globalReset"),defaultConfig:Ni});jc(Jt().logLevel);ua(Jt());var NR=m((e,t,r)=>{V.warn(e),Eh(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Yb=m(async function(e={querySelector:".mermaid"}){try{await PR(e)}catch(t){if(Eh(t)&&V.error(t.str),pr.parseError&&pr.parseError(t),!e.suppressErrors)throw V.error("Use the suppressErrors option to suppress these errors"),t}},"run"),PR=m(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ii.getConfig();V.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");V.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(V.debug("Start On Load: "+i?.startOnLoad),ii.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new Le.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const a=[];for(const l of Array.from(n)){if(V.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;o=l.innerHTML,o=c0(Le.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Le.detectInit(o);h&&V.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Kb(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){NR(u,a,pr.parseError)}}if(a.length>0)throw a[0]},"runThrowsErrors"),Vb=m(function(e){ii.initialize(e)},"initialize"),jR=m(async function(e,t,r){V.warn("mermaid.init is deprecated. Please use run instead."),e&&Vb(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Yb(i)},"init"),zR=m(async(e,{lazyLoad:t=!0}={})=>{So(),Tl(...e),t===!1&&await hR()},"registerExternalDiagrams"),Gb=m(function(){if(pr.startOnLoad){const{startOnLoad:e}=ii.getConfig();e&&pr.run().catch(t=>V.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Gb,!1);var WR=m(function(e){pr.parseError=e},"setParseErrorHandler"),Wa=[],cl=!1,Xb=m(async()=>{if(!cl){for(cl=!0;Wa.length>0;){const e=Wa.shift();if(e)try{await e()}catch(t){V.error("Error executing queue",t)}}cl=!1}},"executeQueue"),qR=m(async(e,t)=>new Promise((r,i)=>{const n=m(()=>new Promise((s,o)=>{ii.parse(e,t).then(a=>{s(a),r(a)},a=>{V.error("Error parsing",a),pr.parseError?.(a),o(a),i(a)})}),"performCall");Wa.push(n),Xb().catch(i)}),"parse"),Kb=m((e,t,r)=>new Promise((i,n)=>{const s=m(()=>new Promise((o,a)=>{ii.render(e,t,r).then(l=>{o(l),i(l)},l=>{V.error("Error parsing",l),pr.parseError?.(l),a(l),n(l)})}),"performCall");Wa.push(s),Xb().catch(n)}),"render"),HR=m(()=>Object.keys(Zr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),pr={startOnLoad:!0,mermaidAPI:ii,parse:qR,render:Kb,init:jR,run:Yb,registerExternalDiagrams:zR,registerLayoutLoaders:eb,initialize:Vb,parseError:void 0,contentLoaded:Gb,setParseErrorHandler:WR,detectType:zc,registerIconPacks:f0,getRegisteredDiagramsMetadata:HR},Zb=pr;/*! Check if previously processed *//*!
264
- * Wait for document loaded before starting the execution
265
- */const Kt=[];for(let e=0;e<256;++e)Kt.push((e+256).toString(16).slice(1));function UR(e,t=0){return(Kt[e[t+0]]+Kt[e[t+1]]+Kt[e[t+2]]+Kt[e[t+3]]+"-"+Kt[e[t+4]]+Kt[e[t+5]]+"-"+Kt[e[t+6]]+Kt[e[t+7]]+"-"+Kt[e[t+8]]+Kt[e[t+9]]+"-"+Kt[e[t+10]]+Kt[e[t+11]]+Kt[e[t+12]]+Kt[e[t+13]]+Kt[e[t+14]]+Kt[e[t+15]]).toLowerCase()}let hl;const YR=new Uint8Array(16);function VR(){if(!hl){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hl=crypto.getRandomValues.bind(crypto)}return hl(YR)}const GR=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Td={randomUUID:GR};function XR(e,t,r){if(Td.randomUUID&&!e)return Td.randomUUID();e=e||{};const i=e.random??e.rng?.()??VR();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,UR(i)}const KR={"smp-mermaid-chart":"_smp-mermaid-chart_128vn_1"};Zb.initialize({startOnLoad:!0,securityLevel:"loose"});const ZR=({data:e})=>{const[t,r]=z.useState(""),i=z.useRef(`mermaid-chart-${XR()}`),n=z.useCallback(o=>{if(o?.obj?.k?.trim())return o.obj.k;if(Array.isArray(o.children))for(const a of o.children){const l=n(a);if(l)return l}return null},[]);z.useEffect(()=>{(async()=>{const a=e.children?.map(n).find(l=>l)??null;if(a)try{const l=await Zb.render(i.current,a);r(l.svg)}catch(l){r(`<pre style="color:red">Mermaid render error:
266
- ${String(l)}</pre>`)}else r('<pre style="color:orange">No valid Mermaid chart code found in data.</pre>')})()},[e,n]);const s={container:KR["smp-mermaid-chart"]};return S.jsx("div",{className:s.container,"data-component":"mermaid",dangerouslySetInnerHTML:{__html:t}})};exports.AppBar=tw;exports.Autocomplete=Rc;exports.Button=Qt;exports.ButtonList=Wd;exports.Checkbox=Ha;exports.Chips=Nc;exports.Color=De;exports.Color$1=Zi;exports.Combobox=la;exports.DashList=ew;exports.DataTableComponent=Lw;exports.DatePicker=Ic;exports.Drawer=Aw;exports.Field=Mw;exports.INPUT_PANEL_COMMAND_SUBMIT_EVENT_NAME=_l;exports.Icon=Ot;exports.InputPanel=Bw;exports.JSON_SCHEMA=um;exports.MapCache=yr;exports.MermaidChart=ZR;exports.Password=qd;exports.Rgb=ce;exports.Set=za;exports.Stack=li;exports.Symbol=Kn;exports.TabBar=Fd;exports.Textarea=Ud;exports.Textfield=Fe;exports.Toolbar=Dd;exports.Typography=Ge;exports.Uint8Array=ac;exports.Utils=xt;exports.ZERO_WIDTH_SPACE=jy;exports.__export=ap;exports.__name=m;exports.abs=_T;exports.acos=$T;exports.array=qm;exports.arrayLikeKeys=$y;exports.asin=BT;exports.assignValue=Ay;exports.assignWithDepth_default=Gt;exports.atan2=ST;exports.baseAssignValue=ho;exports.baseFor=gy;exports.baseGetTag=si;exports.baseKeys=cb;exports.baseRest=Fy;exports.baseUnary=Ey;exports.calculateMathMLDimensions=PC;exports.calculateTextHeight=kh;exports.calculateTextWidth=Ke;exports.cleanAndMerge=po;exports.clear=Cp;exports.clear$1=h$;exports.clear$2=zM;exports.clear2=a$;exports.cloneArrayBuffer=xy;exports.cloneBuffer=yy;exports.cloneTypedArray=by;exports.color=qi;exports.commonDb_exports=Uc;exports.common_default=ni;exports.computeDimensionOfText=C0;exports.configurePaths=$1;exports.configureSvgSize=Hc;exports.constant=jr;exports.constant$1=Ry;exports.constant$2=eo;exports.copyArray=vy;exports.copyObject=My;exports.cos=kT;exports.createAssigner=Ny;exports.createText=xr;exports.curveBasis=In;exports.darken=ft;exports.dayjs2=Zd;exports.decodeEntities=$r;exports.defaultConfig2=GC;exports.defaultConfig_default=Wc;exports.define=to;exports.distExports=pm;exports.epsilon=ic;exports.eq=ls;exports.evaluate=Wt;exports.extend=oh;exports.generateId=Yy;exports.getAccDescription=Tp;exports.getAccTitle=Sp;exports.getConfig=Jt;exports.getConfig2=Et;exports.getDefaultExportFromCjs=Ed;exports.getDiagramTitle=Lp;exports.getEdgeId=dA;exports.getIconSVG=tn;exports.getLineFunctionsWithOffset=dm;exports.getPrototype=mh;exports.getRegisteredLayoutAlgorithm=R$;exports.getStylesFromArray=Sh;exports.getSubGraphTitleMargins=Qa;exports.getThemeVariables3=hp;exports.getUrl=qc;exports.halfPi=nc;exports.hasKatex=Qr;exports.hue=t2;exports.identity=vh;exports.initCloneObject=Cy;exports.insertCluster=R0;exports.insertEdge=Jx;exports.insertEdgeLabel=Kx;exports.insertNode=Wh;exports.interpolateNumber=or;exports.interpolateRgb=Xl;exports.interpolateString=$m;exports.isArguments=Jn;exports.isArray=ts;exports.isArrayLike=hs;exports.isArrayLikeObject=Sy;exports.isBuffer=uo;exports.isDark=Gi;exports.isEmpty=kc;exports.isFunction=oo;exports.isIndex=xh;exports.isIterateeCall=Iy;exports.isLabelStyle=nh;exports.isLength=yh;exports.isObject=Mr;exports.isObjectLike=Ji;exports.isPrototype=cs;exports.isTypedArray=fo;exports.isValidShape=Xx;exports.keysIn=bh;exports.lighten=it;exports.line=Um;exports.lineBreakRegex=Xi;exports.load=fm;exports.log=V;exports.markers_default=tb;exports.max=TT;exports.memoize=Qi;exports.merge=Py;exports.min=ET;exports.nodeUtil=oc;exports.nogamma=lh;exports.overRest=Oy;exports.package_default=bc;exports.parseFontSize=us;exports.parseGenericTypes=Ll;exports.pi=no;exports.positionEdgeLabel=Zx;exports.positionNode=o$;exports.random=Gy;exports.registerIconPacks=f0;exports.render=O$;exports.renderKatexSanitized=Xa;exports.replaceIconSubstring=Nh;exports.rgbConvert=Lm;exports.rgba=Ti;exports.sanitizeText=Se;exports.select=St;exports.selectSvgElement=rb;exports.setAccDescription=kp;exports.setAccTitle=_p;exports.setConfig2=VC;exports.setDiagramTitle=Ep;exports.setNodeElem=s$;exports.setToString=Dy;exports.setupGraphViewbox=wp;exports.setupGraphViewbox2=Ap;exports.sin=LT;exports.sqrt=AT;exports.styles2String=ht;exports.tau=MT;exports.unknownIcon=h0;exports.updateNodeBounds=ct;exports.utils_default=Le;exports.withPath=Wm;exports.wrapLabel=Xy;