@marimo-team/frontend 0.11.14-dev2 → 0.11.14-dev6

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 (93) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-3qYUAai2.js → ConnectedDataExplorerComponent-Baz14eUA.js} +2 -2
  2. package/dist/assets/{VegaLite-BwjHdSmF.js → VegaLite-Do22odyh.js} +1 -1
  3. package/dist/assets/{_baseEach-CUSAlS6u.js → _baseEach-BJH6i3ZT.js} +1 -1
  4. package/dist/assets/_baseMap-CXZ0de-d.js +1 -0
  5. package/dist/assets/{_baseUniq-Nx5Xqx94.js → _baseUniq-D7WwPkcY.js} +1 -1
  6. package/dist/assets/{any-language-editor-BaV5s6FR.js → any-language-editor-BAKHVAC5.js} +1 -1
  7. package/dist/assets/{architectureDiagram-UYN6MBPD-B6YeJZBM.js → architectureDiagram-UYN6MBPD-DP0dgrZ5.js} +1 -1
  8. package/dist/assets/{blockDiagram-ZHA2E4KO-CeOsgTtY.js → blockDiagram-ZHA2E4KO-DV_P9tQY.js} +1 -1
  9. package/dist/assets/{c4Diagram-6F5ED5ID-Be5fhfXY.js → c4Diagram-6F5ED5ID-CrogEfZE.js} +1 -1
  10. package/dist/assets/channel-p6Qy0Y2U.js +1 -0
  11. package/dist/assets/{chunk-5HRBRIJM-jjIQovfa.js → chunk-5HRBRIJM-C_QoXWnI.js} +1 -1
  12. package/dist/assets/{chunk-7U56Z5CX-CKpD01NR.js → chunk-7U56Z5CX-BWV8xn0R.js} +1 -1
  13. package/dist/assets/{chunk-ASOPGD6M-DkG4pAkj.js → chunk-ASOPGD6M-D8XKiexQ.js} +1 -1
  14. package/dist/assets/{chunk-KFBOBJHC-BPJdI42H.js → chunk-KFBOBJHC-BIoKjSkU.js} +1 -1
  15. package/dist/assets/{chunk-T2TOU4HS-BxCljZq3.js → chunk-T2TOU4HS-vPhcxfCu.js} +1 -1
  16. package/dist/assets/{chunk-TMUBEWPD-C8bHmVg8.js → chunk-TMUBEWPD-DWr4usnu.js} +1 -1
  17. package/dist/assets/classDiagram-LNE6IOMH-CYgoTPGP.js +1 -0
  18. package/dist/assets/classDiagram-v2-MQ7JQ4JX-CYgoTPGP.js +1 -0
  19. package/dist/assets/clone-CNUODr6b.js +1 -0
  20. package/dist/assets/compile-Bff97DrU.js +1 -0
  21. package/dist/assets/{createWsUrl-Dtw5_VWK.js → createWsUrl-CKPBvaqp.js} +1 -1
  22. package/dist/assets/{dagre-4EVJKHTY-CIGFO7pa.js → dagre-4EVJKHTY-BnsNVPSF.js} +1 -1
  23. package/dist/assets/{data-editor-BKxXdEuQ.js → data-editor-xakcqRv4.js} +1 -1
  24. package/dist/assets/{diagram-QW4FP2JN-BcGEdm-f.js → diagram-QW4FP2JN-CpdMXkWc.js} +1 -1
  25. package/dist/assets/edit-page-CuHoUOpR.js +8 -0
  26. package/dist/assets/{erDiagram-6RL3IURR-BXz7jQ6M.js → erDiagram-6RL3IURR-svFoe9rj.js} +1 -1
  27. package/dist/assets/{flowDiagram-7ASYPVHJ-B5aSQgSu.js → flowDiagram-7ASYPVHJ-0eXhrRjT.js} +1 -1
  28. package/dist/assets/{ganttDiagram-NTVNEXSI-DWskpI7B.js → ganttDiagram-NTVNEXSI-DAf1XLsz.js} +1 -1
  29. package/dist/assets/{gitGraph-YCYPL57B-hDX2PPkF.js → gitGraph-YCYPL57B-DXHurVpw.js} +1 -1
  30. package/dist/assets/{gitGraphDiagram-NRZ2UAAF-DfwfxPFi.js → gitGraphDiagram-NRZ2UAAF-BoMQxHIz.js} +1 -1
  31. package/dist/assets/{graph-BO6PHcsn.js → graph-Cjr2Crs6.js} +1 -1
  32. package/dist/assets/{home-page-BX_TXLo3.js → home-page-B0E1kVjj.js} +2 -2
  33. package/dist/assets/{index-Duf0_mk7.js → index-B0yArOzG.js} +1 -1
  34. package/dist/assets/{index-Dd8tmfGE.js → index-B9pIV4ge.js} +1 -1
  35. package/dist/assets/{index-CzKpaM4r.js → index-BEhwHEMD.js} +1 -1
  36. package/dist/assets/{index-DOEpXHB3.js → index-BMuDoW8I.js} +1 -1
  37. package/dist/assets/{index-CPmHDmmB.css → index-BvR4Kvfh.css} +1 -1
  38. package/dist/assets/{index-BY7K9bhV.js → index-BxvnOgYT.js} +1 -1
  39. package/dist/assets/{index-BD4n7VAQ.js → index-CIj-CbQA.js} +1 -1
  40. package/dist/assets/{index-CVzCyYnw.js → index-CO_2KzeD.js} +1 -1
  41. package/dist/assets/{index-qAPbkdCq.js → index-CRorBxUK.js} +1 -1
  42. package/dist/assets/{index-CeTt3ZEE.js → index-C_CPwKdQ.js} +1 -1
  43. package/dist/assets/{index-CvUPTspD.js → index-CafedL07.js} +1 -1
  44. package/dist/assets/{index-DKzqNEiu.js → index-CcJ_BKOo.js} +1 -1
  45. package/dist/assets/{index-B9tz3_-m.js → index-CqNWRRbs.js} +1 -1
  46. package/dist/assets/{index-DpHdUGxT.js → index-D93VkaMU.js} +1 -1
  47. package/dist/assets/{index-CeItB1Fa.js → index-DDy_coFv.js} +1 -1
  48. package/dist/assets/{index-BtTpVXcj.js → index-MehoN--l.js} +1 -1
  49. package/dist/assets/{index-DA_DL1d2.js → index-MluMh9xN.js} +1 -1
  50. package/dist/assets/index-PgLdZH9t.js +80 -0
  51. package/dist/assets/{infoDiagram-A4XQUW5V-Bst5BXfr.js → infoDiagram-A4XQUW5V-DKDXsbZ5.js} +1 -1
  52. package/dist/assets/{journeyDiagram-G5WM74LC-BOGljfKA.js → journeyDiagram-G5WM74LC-CvlIHMWg.js} +1 -1
  53. package/dist/assets/{kanban-definition-QRCXZQQD-Bd1u6P2_.js → kanban-definition-QRCXZQQD-CCOoZqvK.js} +1 -1
  54. package/dist/assets/{layout-tUELdH5t.js → layout-6LUXXTqu.js} +1 -1
  55. package/dist/assets/{linear-DIUmsKkt.js → linear-CJOhOCJf.js} +1 -1
  56. package/dist/assets/{mermaid-CexJlyiA.js → mermaid-CBrJcUU_.js} +3 -3
  57. package/dist/assets/{min-DdQR9MNI.js → min-BvvrKQ_-.js} +1 -1
  58. package/dist/assets/{mindmap-definition-GWI6TPTV-BBDIUjE2.js → mindmap-definition-GWI6TPTV-DW00lM7W.js} +1 -1
  59. package/dist/assets/{pieDiagram-YF2LJOPJ-CI7AnRim.js → pieDiagram-YF2LJOPJ-rakFQqeS.js} +1 -1
  60. package/dist/assets/{quadrantDiagram-OS5C2QUG-DBekLjk2.js → quadrantDiagram-OS5C2QUG-BmyLp4IR.js} +1 -1
  61. package/dist/assets/{react-plotly-bsC0SovA.js → react-plotly-De5hiZpF.js} +1 -1
  62. package/dist/assets/{requirementDiagram-MIRIMTAZ-CDcGDcLR.js → requirementDiagram-MIRIMTAZ-CYJIHdU-.js} +1 -1
  63. package/dist/assets/{run-page-BwmLxvRF.js → run-page-rIM1ZLXV.js} +1 -1
  64. package/dist/assets/{sankeyDiagram-Y46BX6SQ-Ck65bhcY.js → sankeyDiagram-Y46BX6SQ-BrfBFqge.js} +1 -1
  65. package/dist/assets/save-worker-BykuInSi.js +1 -0
  66. package/dist/assets/{sequenceDiagram-G6AWOVSC-D3_8hELu.js → sequenceDiagram-G6AWOVSC-kfAVZTbP.js} +1 -1
  67. package/dist/assets/slides-component-0rxGkLA_.js +1 -0
  68. package/dist/assets/{sortBy-B2OXRg90.js → sortBy-DuzQtX_P.js} +1 -1
  69. package/dist/assets/{stateDiagram-MAYHULR4-CoAGl1Im.js → stateDiagram-MAYHULR4-CvB0felz.js} +1 -1
  70. package/dist/assets/stateDiagram-v2-4JROLMXI-CzDbZ0-A.js +1 -0
  71. package/dist/assets/{terminal-1Mxm_tZZ.js → terminal-pyHI8sO8.js} +1 -1
  72. package/dist/assets/{time-BDKJulry.js → time-BFW6OWNt.js} +1 -1
  73. package/dist/assets/{timeline-definition-U7ZMHBDA-CuGTCAxU.js → timeline-definition-U7ZMHBDA-Cm8EkvQu.js} +1 -1
  74. package/dist/assets/{tree-Ba9qJNu1.js → tree-ChTq-COl.js} +3 -3
  75. package/dist/assets/{useMarimoWebSocket-DTkxtQB4.js → useMarimoWebSocket-CaANMv-i.js} +4 -4
  76. package/dist/assets/{vega-component-B6xYnBYf.js → vega-component-DGoE9wWf.js} +1 -1
  77. package/dist/assets/{worker-PSzy9Ra2.js → worker-B2Ue6UZ8.js} +1 -1
  78. package/dist/assets/worker-BtYLhyVl.js +1 -0
  79. package/dist/assets/{xychartDiagram-6QU3TZC5-DVKh8wbU.js → xychartDiagram-6QU3TZC5-DmExc_va.js} +1 -1
  80. package/dist/index.html +2 -2
  81. package/package.json +19 -19
  82. package/dist/assets/_baseMap-Dryx7LIG.js +0 -1
  83. package/dist/assets/channel-BzevxkmG.js +0 -1
  84. package/dist/assets/classDiagram-LNE6IOMH-X3YCvbHU.js +0 -1
  85. package/dist/assets/classDiagram-v2-MQ7JQ4JX-X3YCvbHU.js +0 -1
  86. package/dist/assets/clone-BLjLYzY7.js +0 -1
  87. package/dist/assets/compile-oTTUECFO.js +0 -1
  88. package/dist/assets/edit-page-zEKEcEHK.js +0 -8
  89. package/dist/assets/index-CmflHEIv.js +0 -80
  90. package/dist/assets/save-worker-B_Wvf3vk.js +0 -1
  91. package/dist/assets/slides-component-Cl8m_rjb.js +0 -1
  92. package/dist/assets/stateDiagram-v2-4JROLMXI-CAtll3II.js +0 -1
  93. package/dist/assets/worker-BZGrMak4.js +0 -1
@@ -1 +1 @@
1
- import{_ as t,g as e,s as i,a as n,b as r,c as s,d as a,v as o,l,j as h}from"./mermaid-CexJlyiA.js";import{s as c}from"./transform-CdY8z5kT.js";import{G as u}from"./graph-BO6PHcsn.js";import{l as d}from"./layout-tUELdH5t.js";import{l as p}from"./step-xJWGRC3d.js";import"./index-CmflHEIv.js";import"./_baseUniq-Nx5Xqx94.js";import"./_baseEach-CUSAlS6u.js";import"./min-DdQR9MNI.js";import"./_baseMap-Dryx7LIG.js";import"./sortBy-B2OXRg90.js";var y=function(){var e=t((function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i}),"o"),i=[1,3],n=[1,4],r=[1,5],s=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],o=[1,18],l=[2,7],h=[1,22],c=[1,23],u=[1,24],d=[1,25],p=[1,26],y=[1,27],_=[1,20],g=[1,28],E=[1,29],m=[62,63],R=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],f=[1,47],I=[1,48],S=[1,49],b=[1,50],N=[1,51],T=[1,52],k=[1,53],x=[53,54],A=[1,64],w=[1,60],q=[1,61],v=[1,62],$=[1,63],O=[1,65],L=[1,69],C=[1,70],M=[1,67],F=[1,68],D=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],P={trace:t((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:t((function(t,e,i,n,r,s,a){var o=s.length-1;switch(r){case 4:this.$=s[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[o-3],s[o-4]);break;case 14:n.setNewReqId(s[o-2]);break;case 15:n.setNewReqText(s[o-2]);break;case 16:n.setNewReqRisk(s[o-2]);break;case 17:n.setNewReqVerifyMethod(s[o-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[o-3]);break;case 34:n.setNewElementType(s[o-2]);break;case 35:n.setNewElementDocRef(s[o-2]);break;case 38:n.addRelationship(s[o-2],s[o],s[o-4]);break;case 39:n.addRelationship(s[o-2],s[o-4],s[o]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}}),"anonymous"),table:[{3:1,4:2,6:i,9:n,11:r,13:s},{1:[3]},{3:8,4:2,5:[1,7],6:i,9:n,11:r,13:s},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:i,9:n,11:r,13:s},{1:[2,2]},{4:17,5:o,7:13,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:o,7:31,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{4:17,5:o,7:32,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{4:17,5:o,7:33,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{4:17,5:o,7:34,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{4:17,5:o,7:35,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(m,[2,20]),e(m,[2,21]),e(m,[2,22]),e(m,[2,23]),e(m,[2,24]),e(m,[2,25]),e(R,[2,49]),e(R,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:f,56:I,57:S,58:b,59:N,60:T,61:k},{52:54,55:f,56:I,57:S,58:b,59:N,60:T,61:k},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(x,[2,40]),e(x,[2,41]),e(x,[2,42]),e(x,[2,43]),e(x,[2,44]),e(x,[2,45]),e(x,[2,46]),{54:[1,58]},{5:A,20:59,21:w,24:q,26:v,28:$,30:O},{5:L,30:C,46:66,47:M,49:F},{23:71,62:g,63:E},{23:72,62:g,63:E},e(D,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:A,20:77,21:w,24:q,26:v,28:$,30:O},e(D,[2,19]),e(D,[2,33]),{22:[1,78]},{22:[1,79]},{5:L,30:C,46:80,47:M,49:F},e(D,[2,37]),e(D,[2,38]),e(D,[2,39]),{23:81,62:g,63:E},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(D,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(D,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:A,20:106,21:w,24:q,26:v,28:$,30:O},{5:A,20:107,21:w,24:q,26:v,28:$,30:O},{5:A,20:108,21:w,24:q,26:v,28:$,30:O},{5:A,20:109,21:w,24:q,26:v,28:$,30:O},{5:L,30:C,46:110,47:M,49:F},{5:L,30:C,46:111,47:M,49:F},e(D,[2,14]),e(D,[2,15]),e(D,[2,16]),e(D,[2,17]),e(D,[2,34]),e(D,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:t((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:t((function(e){var i=this,n=[0],r=[],s=[null],a=[],o=this.table,l="",h=0,c=0,u=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var _=d.yylloc;a.push(_);var g=d.options&&d.options.ranges;function E(){var t;return"number"!=typeof(t=r.pop()||d.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){n.length=n.length-2*t,s.length=s.length-t,a.length=a.length-t}),"popStack"),t(E,"lex");for(var m,R,f,I,S,b,N,T,k={};;){if(R=n[n.length-1],this.defaultActions[R]?f=this.defaultActions[R]:(null==m&&(m=E()),f=o[R]&&o[R][m]),void 0===f||!f.length||!f[0]){var x="";for(S in T=[],o[R])this.terminals_[S]&&S>2&&T.push("'"+this.terminals_[S]+"'");x=d.showPosition?"Parse error on line "+(h+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(x,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:_,expected:T})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+m);switch(f[0]){case 1:n.push(m),s.push(d.yytext),a.push(d.yylloc),n.push(f[1]),m=null,c=d.yyleng,l=d.yytext,h=d.yylineno,_=d.yylloc;break;case 2:if(b=this.productions_[f[1]][1],k.$=s[s.length-b],k._$={first_line:a[a.length-(b||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(b||1)].first_column,last_column:a[a.length-1].last_column},g&&(k._$.range=[a[a.length-(b||1)].range[0],a[a.length-1].range[1]]),void 0!==(I=this.performAction.apply(k,[l,c,h,p.yy,f[1],s,a].concat(u))))return I;b&&(n=n.slice(0,-1*b*2),s=s.slice(0,-1*b),a=a.slice(0,-1*b)),n.push(this.productions_[f[1]][0]),s.push(k.$),a.push(k._$),N=o[n[n.length-2]][n[n.length-1]],n.push(N);break;case 3:return!0}}return!0}),"parse")},V=function(){return{EOF:1,parseError:t((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:t((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:t((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:t((function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:t((function(){return this._more=!0,this}),"more"),reject:t((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:t((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:t((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:t((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:t((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:t((function(t,e){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((i=this._input.match(this.rules[r[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:t((function(){var t=this.next();return t||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:t((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:t((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:t((function(t){this.begin(t)}),"pushState"),stateStackSize:t((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:t((function(t,e,i,n){switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 48:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 49:return"qString";case 50:return e.yytext=e.yytext.trim(),62}}),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}}}();function U(){this.yy={}}return P.lexer=V,t(U,"Parser"),U.prototype=P,P.Parser=U,new U}();y.parser=y;var _=y,g=[],E={},m=new Map,R={},f=new Map,I=t(((t,e)=>(m.has(t)||m.set(t,{name:t,type:e,id:E.id,text:E.text,risk:E.risk,verifyMethod:E.verifyMethod}),E={},m.get(t))),"addRequirement"),S=t((()=>m),"getRequirements"),b=t((t=>{void 0!==E&&(E.id=t)}),"setNewReqId"),N=t((t=>{void 0!==E&&(E.text=t)}),"setNewReqText"),T=t((t=>{void 0!==E&&(E.risk=t)}),"setNewReqRisk"),k=t((t=>{void 0!==E&&(E.verifyMethod=t)}),"setNewReqVerifyMethod"),x=t((t=>(f.has(t)||(f.set(t,{name:t,type:R.type,docRef:R.docRef}),l.info("Added new requirement: ",t)),R={},f.get(t))),"addElement"),A=t((()=>f),"getElements"),w=t((t=>{void 0!==R&&(R.type=t)}),"setNewElementType"),q=t((t=>{void 0!==R&&(R.docRef=t)}),"setNewElementDocRef"),v=t(((t,e,i)=>{g.push({type:t,src:e,dst:i})}),"addRelationship"),$=t((()=>g),"getRelationships"),O=t((()=>{g=[],E={},m=new Map,R={},f=new Map,o()}),"clear"),L={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:t((()=>s().req),"getConfig"),addRequirement:I,getRequirements:S,setNewReqId:b,setNewReqText:N,setNewReqRisk:T,setNewReqVerifyMethod:k,setAccTitle:r,getAccTitle:n,setAccDescription:i,getAccDescription:e,addElement:x,getElements:A,setNewElementType:w,setNewElementDocRef:q,addRelationship:v,getRelationships:$,clear:O},C=t((t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`),"getStyles"),M={CONTAINS:"contains",ARROW:"arrow"},F={ReqMarkers:M,insertLineEndings:t(((t,e)=>{let i=t.append("defs").append("marker").attr("id",M.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",M.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)}),"insertLineEndings")},D={},P=0,V=t(((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",D.rect_min_width+"px").attr("height",D.rect_min_height+"px")),"newRectNode"),U=t(((t,e,i)=>{let n=D.rect_min_width/2,r=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",D.rect_padding).attr("dominant-baseline","hanging"),s=0;i.forEach((t=>{0==s?r.append("tspan").attr("text-anchor","middle").attr("x",D.rect_min_width/2).attr("dy",0).text(t):r.append("tspan").attr("text-anchor","middle").attr("x",D.rect_min_width/2).attr("dy",.75*D.line_height).text(t),s++}));let a=1.5*D.rect_padding+s*D.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",D.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:r,y:a}}),"newTitleNode"),Y=t(((t,e,i,n)=>{let r=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",D.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),s=0;let a=[];return i.forEach((t=>{let e=t.length;for(;e>30&&s<3;){let i=t.substring(0,30);e=(t=t.substring(30,t.length)).length,a[a.length]=i,s++}if(3==s){let t=a[a.length-1];a[a.length-1]=t.substring(0,t.length-4)+"..."}else a[a.length]=t;s=0})),a.forEach((t=>{r.append("tspan").attr("x",D.rect_padding).attr("dy",D.line_height).text(t)})),r}),"newBodyNode"),B=t(((t,e,i,n)=>{const r=e.node().getTotalLength(),s=e.node().getPointAtLength(.5*r),a="rel"+P;P++;const o=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-o.width/2).attr("y",s.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")}),"addEdgeLabel"),j=t((function(t,e,i,n,r){const s=i.edge(G(e.src),G(e.dst)),a=p().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",a(s.points)).attr("fill","none");e.type==r.db.Relationships.CONTAINS?o.attr("marker-start","url("+h.getUrl(D.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+h.getUrl(D.arrowMarkerAbsolute)+"#"+F.ReqMarkers.ARROW+"_line_ending)")),B(t,o,D,`<<${e.type}>>`)}),"drawRelationshipFromLayout"),Q=t(((t,e,i)=>{t.forEach(((t,n)=>{n=G(n),l.info("Added new requirement: ",n);const r=i.append("g").attr("id",n),s=V(r,"req-"+n);let a=[],o=U(r,n+"_title",[`<<${t.type}>>`,`${t.name}`]);a.push(o.titleNode);let h=Y(r,n+"_body",[`Id: ${t.id}`,`Text: ${t.text}`,`Risk: ${t.risk}`,`Verification: ${t.verifyMethod}`],o.y);a.push(h);const c=s.node().getBBox();e.setNode(n,{width:c.width,height:c.height,shape:"rect",id:n})}))}),"drawReqs"),H=t(((t,e,i)=>{t.forEach(((t,n)=>{const r=G(n),s=i.append("g").attr("id",r),a="element-"+r,o=V(s,a);let l=[],h=U(s,a+"_title",["<<Element>>",`${n}`]);l.push(h.titleNode);let c=Y(s,a+"_body",[`Type: ${t.type||"Not Specified"}`,`Doc Ref: ${t.docRef||"None"}`],h.y);l.push(c);const u=o.node().getBBox();e.setNode(r,{width:u.width,height:u.height,shape:"rect",id:r})}))}),"drawElements"),W=t(((t,e)=>(t.forEach((function(t){let i=G(t.src),n=G(t.dst);e.setEdge(i,n,{relationship:t})})),t)),"addRelationships"),K=t((function(t,e){e.nodes().forEach((function(i){void 0!==i&&void 0!==e.node(i)&&(t.select("#"+i),t.select("#"+i).attr("transform","translate("+(e.node(i).x-e.node(i).width/2)+","+(e.node(i).y-e.node(i).height/2)+" )"))}))}),"adjustEntities"),G=t((t=>t.replace(/\s/g,"").replace(/\./g,"_")),"elementString"),z={parser:_,db:L,renderer:{draw:t(((t,e,i,n)=>{const r=(D=s().requirement).securityLevel;let o;"sandbox"===r&&(o=c("#i"+e));const l=c("sandbox"===r?o.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);F.insertLineEndings(l,D);const h=new u({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:D.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let p=n.db.getRequirements(),y=n.db.getElements(),_=n.db.getRelationships();Q(p,h,l),H(y,h,l),W(_,h),d(h),K(l,h),_.forEach((function(t){j(l,t,h,e,n)}));const g=D.rect_padding,E=l.node().getBBox(),m=E.width+2*g,R=E.height+2*g;a(l,R,m,D.useMaxWidth),l.attr("viewBox",`${E.x-g} ${E.y-g} ${m} ${R}`)}),"draw")},styles:C};export{z as diagram};
1
+ import{_ as t,g as e,s as i,a as n,b as r,c as s,d as a,v as o,l,j as h}from"./mermaid-CBrJcUU_.js";import{s as c}from"./transform-CdY8z5kT.js";import{G as u}from"./graph-Cjr2Crs6.js";import{l as d}from"./layout-6LUXXTqu.js";import{l as p}from"./step-xJWGRC3d.js";import"./index-PgLdZH9t.js";import"./_baseUniq-D7WwPkcY.js";import"./_baseEach-BJH6i3ZT.js";import"./min-BvvrKQ_-.js";import"./_baseMap-CXZ0de-d.js";import"./sortBy-DuzQtX_P.js";var y=function(){var e=t((function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i}),"o"),i=[1,3],n=[1,4],r=[1,5],s=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],o=[1,18],l=[2,7],h=[1,22],c=[1,23],u=[1,24],d=[1,25],p=[1,26],y=[1,27],_=[1,20],g=[1,28],E=[1,29],m=[62,63],R=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],f=[1,47],I=[1,48],S=[1,49],b=[1,50],N=[1,51],T=[1,52],k=[1,53],x=[53,54],A=[1,64],w=[1,60],q=[1,61],v=[1,62],$=[1,63],O=[1,65],L=[1,69],C=[1,70],M=[1,67],F=[1,68],D=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],P={trace:t((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:t((function(t,e,i,n,r,s,a){var o=s.length-1;switch(r){case 4:this.$=s[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[o-3],s[o-4]);break;case 14:n.setNewReqId(s[o-2]);break;case 15:n.setNewReqText(s[o-2]);break;case 16:n.setNewReqRisk(s[o-2]);break;case 17:n.setNewReqVerifyMethod(s[o-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[o-3]);break;case 34:n.setNewElementType(s[o-2]);break;case 35:n.setNewElementDocRef(s[o-2]);break;case 38:n.addRelationship(s[o-2],s[o],s[o-4]);break;case 39:n.addRelationship(s[o-2],s[o-4],s[o]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}}),"anonymous"),table:[{3:1,4:2,6:i,9:n,11:r,13:s},{1:[3]},{3:8,4:2,5:[1,7],6:i,9:n,11:r,13:s},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:i,9:n,11:r,13:s},{1:[2,2]},{4:17,5:o,7:13,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:o,7:31,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{4:17,5:o,7:32,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{4:17,5:o,7:33,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{4:17,5:o,7:34,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{4:17,5:o,7:35,8:l,9:n,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:p,36:y,44:_,62:g,63:E},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(m,[2,20]),e(m,[2,21]),e(m,[2,22]),e(m,[2,23]),e(m,[2,24]),e(m,[2,25]),e(R,[2,49]),e(R,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:f,56:I,57:S,58:b,59:N,60:T,61:k},{52:54,55:f,56:I,57:S,58:b,59:N,60:T,61:k},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(x,[2,40]),e(x,[2,41]),e(x,[2,42]),e(x,[2,43]),e(x,[2,44]),e(x,[2,45]),e(x,[2,46]),{54:[1,58]},{5:A,20:59,21:w,24:q,26:v,28:$,30:O},{5:L,30:C,46:66,47:M,49:F},{23:71,62:g,63:E},{23:72,62:g,63:E},e(D,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:A,20:77,21:w,24:q,26:v,28:$,30:O},e(D,[2,19]),e(D,[2,33]),{22:[1,78]},{22:[1,79]},{5:L,30:C,46:80,47:M,49:F},e(D,[2,37]),e(D,[2,38]),e(D,[2,39]),{23:81,62:g,63:E},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(D,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(D,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:A,20:106,21:w,24:q,26:v,28:$,30:O},{5:A,20:107,21:w,24:q,26:v,28:$,30:O},{5:A,20:108,21:w,24:q,26:v,28:$,30:O},{5:A,20:109,21:w,24:q,26:v,28:$,30:O},{5:L,30:C,46:110,47:M,49:F},{5:L,30:C,46:111,47:M,49:F},e(D,[2,14]),e(D,[2,15]),e(D,[2,16]),e(D,[2,17]),e(D,[2,34]),e(D,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:t((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:t((function(e){var i=this,n=[0],r=[],s=[null],a=[],o=this.table,l="",h=0,c=0,u=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var _=d.yylloc;a.push(_);var g=d.options&&d.options.ranges;function E(){var t;return"number"!=typeof(t=r.pop()||d.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){n.length=n.length-2*t,s.length=s.length-t,a.length=a.length-t}),"popStack"),t(E,"lex");for(var m,R,f,I,S,b,N,T,k={};;){if(R=n[n.length-1],this.defaultActions[R]?f=this.defaultActions[R]:(null==m&&(m=E()),f=o[R]&&o[R][m]),void 0===f||!f.length||!f[0]){var x="";for(S in T=[],o[R])this.terminals_[S]&&S>2&&T.push("'"+this.terminals_[S]+"'");x=d.showPosition?"Parse error on line "+(h+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(x,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:_,expected:T})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+m);switch(f[0]){case 1:n.push(m),s.push(d.yytext),a.push(d.yylloc),n.push(f[1]),m=null,c=d.yyleng,l=d.yytext,h=d.yylineno,_=d.yylloc;break;case 2:if(b=this.productions_[f[1]][1],k.$=s[s.length-b],k._$={first_line:a[a.length-(b||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(b||1)].first_column,last_column:a[a.length-1].last_column},g&&(k._$.range=[a[a.length-(b||1)].range[0],a[a.length-1].range[1]]),void 0!==(I=this.performAction.apply(k,[l,c,h,p.yy,f[1],s,a].concat(u))))return I;b&&(n=n.slice(0,-1*b*2),s=s.slice(0,-1*b),a=a.slice(0,-1*b)),n.push(this.productions_[f[1]][0]),s.push(k.$),a.push(k._$),N=o[n[n.length-2]][n[n.length-1]],n.push(N);break;case 3:return!0}}return!0}),"parse")},V=function(){return{EOF:1,parseError:t((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:t((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:t((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:t((function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:t((function(){return this._more=!0,this}),"more"),reject:t((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:t((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:t((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:t((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:t((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:t((function(t,e){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((i=this._input.match(this.rules[r[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:t((function(){var t=this.next();return t||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:t((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:t((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:t((function(t){this.begin(t)}),"pushState"),stateStackSize:t((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:t((function(t,e,i,n){switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 48:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 49:return"qString";case 50:return e.yytext=e.yytext.trim(),62}}),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}}}();function U(){this.yy={}}return P.lexer=V,t(U,"Parser"),U.prototype=P,P.Parser=U,new U}();y.parser=y;var _=y,g=[],E={},m=new Map,R={},f=new Map,I=t(((t,e)=>(m.has(t)||m.set(t,{name:t,type:e,id:E.id,text:E.text,risk:E.risk,verifyMethod:E.verifyMethod}),E={},m.get(t))),"addRequirement"),S=t((()=>m),"getRequirements"),b=t((t=>{void 0!==E&&(E.id=t)}),"setNewReqId"),N=t((t=>{void 0!==E&&(E.text=t)}),"setNewReqText"),T=t((t=>{void 0!==E&&(E.risk=t)}),"setNewReqRisk"),k=t((t=>{void 0!==E&&(E.verifyMethod=t)}),"setNewReqVerifyMethod"),x=t((t=>(f.has(t)||(f.set(t,{name:t,type:R.type,docRef:R.docRef}),l.info("Added new requirement: ",t)),R={},f.get(t))),"addElement"),A=t((()=>f),"getElements"),w=t((t=>{void 0!==R&&(R.type=t)}),"setNewElementType"),q=t((t=>{void 0!==R&&(R.docRef=t)}),"setNewElementDocRef"),v=t(((t,e,i)=>{g.push({type:t,src:e,dst:i})}),"addRelationship"),$=t((()=>g),"getRelationships"),O=t((()=>{g=[],E={},m=new Map,R={},f=new Map,o()}),"clear"),L={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:t((()=>s().req),"getConfig"),addRequirement:I,getRequirements:S,setNewReqId:b,setNewReqText:N,setNewReqRisk:T,setNewReqVerifyMethod:k,setAccTitle:r,getAccTitle:n,setAccDescription:i,getAccDescription:e,addElement:x,getElements:A,setNewElementType:w,setNewElementDocRef:q,addRelationship:v,getRelationships:$,clear:O},C=t((t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`),"getStyles"),M={CONTAINS:"contains",ARROW:"arrow"},F={ReqMarkers:M,insertLineEndings:t(((t,e)=>{let i=t.append("defs").append("marker").attr("id",M.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",M.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)}),"insertLineEndings")},D={},P=0,V=t(((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",D.rect_min_width+"px").attr("height",D.rect_min_height+"px")),"newRectNode"),U=t(((t,e,i)=>{let n=D.rect_min_width/2,r=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",D.rect_padding).attr("dominant-baseline","hanging"),s=0;i.forEach((t=>{0==s?r.append("tspan").attr("text-anchor","middle").attr("x",D.rect_min_width/2).attr("dy",0).text(t):r.append("tspan").attr("text-anchor","middle").attr("x",D.rect_min_width/2).attr("dy",.75*D.line_height).text(t),s++}));let a=1.5*D.rect_padding+s*D.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",D.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:r,y:a}}),"newTitleNode"),Y=t(((t,e,i,n)=>{let r=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",D.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),s=0;let a=[];return i.forEach((t=>{let e=t.length;for(;e>30&&s<3;){let i=t.substring(0,30);e=(t=t.substring(30,t.length)).length,a[a.length]=i,s++}if(3==s){let t=a[a.length-1];a[a.length-1]=t.substring(0,t.length-4)+"..."}else a[a.length]=t;s=0})),a.forEach((t=>{r.append("tspan").attr("x",D.rect_padding).attr("dy",D.line_height).text(t)})),r}),"newBodyNode"),B=t(((t,e,i,n)=>{const r=e.node().getTotalLength(),s=e.node().getPointAtLength(.5*r),a="rel"+P;P++;const o=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-o.width/2).attr("y",s.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")}),"addEdgeLabel"),j=t((function(t,e,i,n,r){const s=i.edge(G(e.src),G(e.dst)),a=p().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",a(s.points)).attr("fill","none");e.type==r.db.Relationships.CONTAINS?o.attr("marker-start","url("+h.getUrl(D.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+h.getUrl(D.arrowMarkerAbsolute)+"#"+F.ReqMarkers.ARROW+"_line_ending)")),B(t,o,D,`<<${e.type}>>`)}),"drawRelationshipFromLayout"),Q=t(((t,e,i)=>{t.forEach(((t,n)=>{n=G(n),l.info("Added new requirement: ",n);const r=i.append("g").attr("id",n),s=V(r,"req-"+n);let a=[],o=U(r,n+"_title",[`<<${t.type}>>`,`${t.name}`]);a.push(o.titleNode);let h=Y(r,n+"_body",[`Id: ${t.id}`,`Text: ${t.text}`,`Risk: ${t.risk}`,`Verification: ${t.verifyMethod}`],o.y);a.push(h);const c=s.node().getBBox();e.setNode(n,{width:c.width,height:c.height,shape:"rect",id:n})}))}),"drawReqs"),H=t(((t,e,i)=>{t.forEach(((t,n)=>{const r=G(n),s=i.append("g").attr("id",r),a="element-"+r,o=V(s,a);let l=[],h=U(s,a+"_title",["<<Element>>",`${n}`]);l.push(h.titleNode);let c=Y(s,a+"_body",[`Type: ${t.type||"Not Specified"}`,`Doc Ref: ${t.docRef||"None"}`],h.y);l.push(c);const u=o.node().getBBox();e.setNode(r,{width:u.width,height:u.height,shape:"rect",id:r})}))}),"drawElements"),W=t(((t,e)=>(t.forEach((function(t){let i=G(t.src),n=G(t.dst);e.setEdge(i,n,{relationship:t})})),t)),"addRelationships"),K=t((function(t,e){e.nodes().forEach((function(i){void 0!==i&&void 0!==e.node(i)&&(t.select("#"+i),t.select("#"+i).attr("transform","translate("+(e.node(i).x-e.node(i).width/2)+","+(e.node(i).y-e.node(i).height/2)+" )"))}))}),"adjustEntities"),G=t((t=>t.replace(/\s/g,"").replace(/\./g,"_")),"elementString"),z={parser:_,db:L,renderer:{draw:t(((t,e,i,n)=>{const r=(D=s().requirement).securityLevel;let o;"sandbox"===r&&(o=c("#i"+e));const l=c("sandbox"===r?o.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);F.insertLineEndings(l,D);const h=new u({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:D.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let p=n.db.getRequirements(),y=n.db.getElements(),_=n.db.getRelationships();Q(p,h,l),H(y,h,l),W(_,h),d(h),K(l,h),_.forEach((function(t){j(l,t,h,e,n)}));const g=D.rect_padding,E=l.node().getBBox(),m=E.width+2*g,R=E.height+2*g;a(l,R,m,D.useMaxWidth),l.attr("viewBox",`${E.x-g} ${E.y-g} ${m} ${R}`)}),"draw")},styles:C};export{z as diagram};
@@ -1 +1 @@
1
- import{G as e,H as a,J as s,M as t,O as o,P as r,Q as n,T as i,U as l,V as c,W as m,X as d,Y as h,Z as b,_ as x,$ as f,a0 as y,a1 as p,a2 as u,a3 as g,a4 as _,a5 as j,a6 as k,a7 as v,a8 as w,a9 as N}from"./index-CmflHEIv.js";import{u as S,A as C,R as I,a as P,C as T}from"./useMarimoWebSocket-DTkxtQB4.js";import"./createWsUrl-Dtw5_VWK.js";const A=n=>{const l=e.c(14),{appConfig:c}=n,{setCells:m}=a();let d,h,b;l[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],l[0]=d):d=l[0],s.useEffect(E,d),l[1]===Symbol.for("react.memo_cache_sentinel")?(h=i(),l[1]=h):h=l[1],l[2]!==m?(b={autoInstantiate:!0,setCells:m,sessionId:h},l[2]=m,l[3]=b):b=l[3];const{connection:x}=S(b),f=t(o);let y,p,u;return l[4]!==x?(y=r.jsx(P,{connection:x,className:"sm:pt-8"}),l[4]=x,l[5]=y):y=l[5],l[6]!==c?(p=r.jsx(T,{appConfig:c,mode:"read"}),l[6]=c,l[7]=p):p=l[7],l[8]!==c.width||l[9]!==x||l[10]!==f||l[11]!==y||l[12]!==p?(u=r.jsxs(C,{connection:x,isRunning:f,width:c.width,children:[y,p]}),l[8]=c.width,l[9]=x,l[10]=f,l[11]=y,l[12]=p,l[13]=u):u=l[13],u};function W(){I.INSTANCE.stop()}function E(){return I.INSTANCE.start(n),W}const R=()=>{const a=e.c(4);if(!l())return null;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s=c(),a[0]=s):s=a[0];const t=s;if(!t)return null;let o,n,i;return a[1]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("a",{href:m.githubPage,target:"_blank",className:"underline",rel:"noreferrer",children:"marimo"}),a[1]=o):o=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsxs("span",{children:["This is a static Python notebook built using"," ",o,".",r.jsx("br",{}),"Some interactive features may not work, see ways to run or edit this."]}),a[2]=n):n=a[2],a[3]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsxs("div",{className:"px-4 py-2 bg-[var(--sky-2)] border-b border-[var(--sky-7)] text-md text-[var(--sky-11)] font-semibold flex justify-between items-center gap-4 no-print",children:[n,r.jsx("span",{className:"flex-shrink-0",children:r.jsx(D,{code:t})})]}),a[3]=i):i=a[3],i},D=a=>{const s=e.c(81),{code:t}=a;let o;if(s[0]===Symbol.for("react.memo_cache_sentinel")){o=d()||"notebook.py";const e=o.lastIndexOf("/");-1!==e&&(o=o.slice(e+1)),s[0]=o}else o=s[0];const n=window.location.href;let i,l,c,N,S,C,I,P,T,A,W,E,R,D,F,M,O,U,Y,z,B,G,H,J,Q,V,X,Z,$,q,K,L,ee,ae,se,te,oe;if(s[1]!==t){const e=h({code:t});let a;N=b,s[25]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(x,{asChild:!0,children:r.jsx(f,{"data-testid":"static-notebook-dialog-trigger",variant:"secondary",children:"Run or edit this notebook"})}),s[25]=F):F=s[25],c=y,l=p,s[26]===Symbol.for("react.memo_cache_sentinel")?(D=r.jsx(u,{children:o}),s[26]=D):D=s[26],i=g,z="pt-4 text-md text-left",B="This is a static notebook built using",G=" ",s[27]===Symbol.for("react.memo_cache_sentinel")?(H=r.jsx("a",{href:m.githubPage,target:"_blank",className:"text-link hover:underline",rel:"noreferrer",children:"marimo"}),s[27]=H):H=s[27],C=". marimo is an open-source next-generation Python notebook.",s[28]===Symbol.for("react.memo_cache_sentinel")?(I=r.jsx("hr",{className:"my-3"}),s[28]=I):I=s[28],P="In order to edit this notebook, you will need to download the code locally, install marimo, and run the following in your terminal:",s[29]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("br",{}),s[29]=a):a=s[29],s[30]===Symbol.for("react.memo_cache_sentinel")?(T=r.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)]",children:["pip install marimo",a,"marimo edit ",o]}),A=!n.endsWith(".html")&&r.jsxs(r.Fragment,{children:["or",r.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)] break-all",children:["marimo edit ",window.location.href]})]}),W=r.jsx("hr",{className:"my-3"}),s[30]=T,s[31]=A,s[32]=W):(T=s[30],A=s[31],W=s[32]),E="You may also be able to run this notebook entirely in the browser via WebAssembly at:",R=" ",S=e,M="_blank",O="text-link hover:underline",U="noreferrer",Y=e.slice(0,40),s[1]=t,s[2]=i,s[3]=l,s[4]=c,s[5]=N,s[6]=S,s[7]=C,s[8]=I,s[9]=P,s[10]=T,s[11]=A,s[12]=W,s[13]=E,s[14]=R,s[15]=D,s[16]=F,s[17]=M,s[18]=O,s[19]=U,s[20]=Y,s[21]=z,s[22]=B,s[23]=G,s[24]=H}else i=s[2],l=s[3],c=s[4],N=s[5],S=s[6],C=s[7],I=s[8],P=s[9],T=s[10],A=s[11],W=s[12],E=s[13],R=s[14],D=s[15],F=s[16],M=s[17],O=s[18],U=s[19],Y=s[20],z=s[21],B=s[22],G=s[23],H=s[24];return s[33]!==S||s[34]!==M||s[35]!==O||s[36]!==U||s[37]!==Y?(J=r.jsxs("a",{href:S,target:M,className:O,rel:U,children:[Y,"..."]}),s[33]=S,s[34]=M,s[35]=O,s[36]=U,s[37]=Y,s[38]=J):J=s[38],s[39]===Symbol.for("react.memo_cache_sentinel")?(Q=r.jsx("br",{}),s[39]=Q):Q=s[39],s[40]===Symbol.for("react.memo_cache_sentinel")?(V=r.jsxs("div",{className:"text-sm text-muted-foreground pt-2",children:[r.jsx("strong",{children:"Note:"})," This feature is experimental and may not work for all notebooks. Additionally, some dependencies may not be available in the browser."]}),s[40]=V):V=s[40],s[41]!==i||s[42]!==C||s[43]!==I||s[44]!==P||s[45]!==T||s[46]!==A||s[47]!==W||s[48]!==E||s[49]!==R||s[50]!==J||s[51]!==z||s[52]!==B||s[53]!==G||s[54]!==H?(X=r.jsxs(i,{className:z,children:[B,G,H,C,I,P,T,A,W,E,R,J,Q,V]}),s[41]=i,s[42]=C,s[43]=I,s[44]=P,s[45]=T,s[46]=A,s[47]=W,s[48]=E,s[49]=R,s[50]=J,s[51]=z,s[52]=B,s[53]=G,s[54]=H,s[55]=X):X=s[55],s[56]!==l||s[57]!==D||s[58]!==X?(Z=r.jsxs(l,{children:[D,X]}),s[56]=l,s[57]=D,s[58]=X,s[59]=Z):Z=s[59],s[60]!==t?($=async()=>{await _(t),j({title:"Copied to clipboard"})},s[60]=t,s[61]=$):$=s[61],s[62]===Symbol.for("react.memo_cache_sentinel")?(q=r.jsx(k,{className:"w-4 h-4 mr-1"}),s[62]=q):q=s[62],s[63]!==$?(K=r.jsxs(f,{"data-testid":"copy-static-notebook-dialog-button",variant:"secondary",onClick:$,children:[q,"Copy code"]}),s[63]=$,s[64]=K):K=s[64],s[65]!==t?(L=()=>{v(new Blob([t],{type:"text/plain"}),o)},s[65]=t,s[66]=L):L=s[66],s[67]===Symbol.for("react.memo_cache_sentinel")?(ee=r.jsx(w,{className:"w-4 h-4 mr-1"}),s[67]=ee):ee=s[67],s[68]!==L?(ae=r.jsxs(f,{"data-testid":"download-static-notebook-dialog-button",variant:"secondary",onClick:L,children:[ee,"Download code"]}),s[68]=L,s[69]=ae):ae=s[69],s[70]!==K||s[71]!==ae?(se=r.jsxs("div",{className:"flex gap-4 flex-wrap",children:[K,ae]}),s[70]=K,s[71]=ae,s[72]=se):se=s[72],s[73]!==c||s[74]!==Z||s[75]!==se?(te=r.jsxs(c,{children:[Z,se]}),s[73]=c,s[74]=Z,s[75]=se,s[76]=te):te=s[76],s[77]!==N||s[78]!==F||s[79]!==te?(oe=r.jsxs(N,{children:[F,te]}),s[77]=N,s[78]=F,s[79]=te,s[80]=oe):oe=s[80],oe},F=N()||l(),M=a=>{const s=e.c(6);let t,o,n,i;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(R,{}),s[0]=t):t=s[0],s[1]!==a.appConfig?(o=r.jsx(A,{appConfig:a.appConfig}),s[1]=a.appConfig,s[2]=o):o=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(n=F&&r.jsx(O,{}),s[3]=n):n=s[3],s[4]!==o?(i=r.jsxs(r.Fragment,{children:[t,o,n]}),s[4]=o,s[5]=i):i=s[5],i},O=()=>{const a=e.c(1);let s;return a[0]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"fixed bottom-0 right-0 z-50",children:r.jsxs("a",{href:m.githubPage,target:"_blank",className:"text-sm text-[var(--grass-11)] font-bold tracking-wide transition-colors bg-[var(--grass-4)] hover:bg-[var(--grass-5)] border-t border-l border-[var(--grass-8)] px-3 py-1 rounded-tl-md flex items-center gap-2",rel:"noreferrer",children:[r.jsx("span",{className:"pb-[2px]",children:"made with marimo"}),r.jsx("img",{src:"./favicon.ico",alt:"marimo",className:"h-4 w-auto"})]})}),a[0]=s):s=a[0],s};export{M as default};
1
+ import{G as e,H as a,J as s,M as t,O as o,P as r,Q as n,T as i,U as l,V as c,W as m,X as d,Y as h,Z as b,_ as x,$ as f,a0 as y,a1 as p,a2 as u,a3 as g,a4 as _,a5 as j,a6 as k,a7 as v,a8 as w,a9 as N}from"./index-PgLdZH9t.js";import{u as S,A as C,R as I,a as P,C as T}from"./useMarimoWebSocket-CaANMv-i.js";import"./createWsUrl-CKPBvaqp.js";const A=n=>{const l=e.c(14),{appConfig:c}=n,{setCells:m}=a();let d,h,b;l[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],l[0]=d):d=l[0],s.useEffect(E,d),l[1]===Symbol.for("react.memo_cache_sentinel")?(h=i(),l[1]=h):h=l[1],l[2]!==m?(b={autoInstantiate:!0,setCells:m,sessionId:h},l[2]=m,l[3]=b):b=l[3];const{connection:x}=S(b),f=t(o);let y,p,u;return l[4]!==x?(y=r.jsx(P,{connection:x,className:"sm:pt-8"}),l[4]=x,l[5]=y):y=l[5],l[6]!==c?(p=r.jsx(T,{appConfig:c,mode:"read"}),l[6]=c,l[7]=p):p=l[7],l[8]!==c.width||l[9]!==x||l[10]!==f||l[11]!==y||l[12]!==p?(u=r.jsxs(C,{connection:x,isRunning:f,width:c.width,children:[y,p]}),l[8]=c.width,l[9]=x,l[10]=f,l[11]=y,l[12]=p,l[13]=u):u=l[13],u};function W(){I.INSTANCE.stop()}function E(){return I.INSTANCE.start(n),W}const R=()=>{const a=e.c(4);if(!l())return null;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s=c(),a[0]=s):s=a[0];const t=s;if(!t)return null;let o,n,i;return a[1]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("a",{href:m.githubPage,target:"_blank",className:"underline",rel:"noreferrer",children:"marimo"}),a[1]=o):o=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsxs("span",{children:["This is a static Python notebook built using"," ",o,".",r.jsx("br",{}),"Some interactive features may not work, see ways to run or edit this."]}),a[2]=n):n=a[2],a[3]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsxs("div",{className:"px-4 py-2 bg-[var(--sky-2)] border-b border-[var(--sky-7)] text-md text-[var(--sky-11)] font-semibold flex justify-between items-center gap-4 no-print",children:[n,r.jsx("span",{className:"flex-shrink-0",children:r.jsx(D,{code:t})})]}),a[3]=i):i=a[3],i},D=a=>{const s=e.c(81),{code:t}=a;let o;if(s[0]===Symbol.for("react.memo_cache_sentinel")){o=d()||"notebook.py";const e=o.lastIndexOf("/");-1!==e&&(o=o.slice(e+1)),s[0]=o}else o=s[0];const n=window.location.href;let i,l,c,N,S,C,I,P,T,A,W,E,R,D,F,M,O,U,Y,z,B,G,H,J,Q,V,X,Z,$,q,K,L,ee,ae,se,te,oe;if(s[1]!==t){const e=h({code:t});let a;N=b,s[25]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(x,{asChild:!0,children:r.jsx(f,{"data-testid":"static-notebook-dialog-trigger",variant:"secondary",children:"Run or edit this notebook"})}),s[25]=F):F=s[25],c=y,l=p,s[26]===Symbol.for("react.memo_cache_sentinel")?(D=r.jsx(u,{children:o}),s[26]=D):D=s[26],i=g,z="pt-4 text-md text-left",B="This is a static notebook built using",G=" ",s[27]===Symbol.for("react.memo_cache_sentinel")?(H=r.jsx("a",{href:m.githubPage,target:"_blank",className:"text-link hover:underline",rel:"noreferrer",children:"marimo"}),s[27]=H):H=s[27],C=". marimo is an open-source next-generation Python notebook.",s[28]===Symbol.for("react.memo_cache_sentinel")?(I=r.jsx("hr",{className:"my-3"}),s[28]=I):I=s[28],P="In order to edit this notebook, you will need to download the code locally, install marimo, and run the following in your terminal:",s[29]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("br",{}),s[29]=a):a=s[29],s[30]===Symbol.for("react.memo_cache_sentinel")?(T=r.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)]",children:["pip install marimo",a,"marimo edit ",o]}),A=!n.endsWith(".html")&&r.jsxs(r.Fragment,{children:["or",r.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)] break-all",children:["marimo edit ",window.location.href]})]}),W=r.jsx("hr",{className:"my-3"}),s[30]=T,s[31]=A,s[32]=W):(T=s[30],A=s[31],W=s[32]),E="You may also be able to run this notebook entirely in the browser via WebAssembly at:",R=" ",S=e,M="_blank",O="text-link hover:underline",U="noreferrer",Y=e.slice(0,40),s[1]=t,s[2]=i,s[3]=l,s[4]=c,s[5]=N,s[6]=S,s[7]=C,s[8]=I,s[9]=P,s[10]=T,s[11]=A,s[12]=W,s[13]=E,s[14]=R,s[15]=D,s[16]=F,s[17]=M,s[18]=O,s[19]=U,s[20]=Y,s[21]=z,s[22]=B,s[23]=G,s[24]=H}else i=s[2],l=s[3],c=s[4],N=s[5],S=s[6],C=s[7],I=s[8],P=s[9],T=s[10],A=s[11],W=s[12],E=s[13],R=s[14],D=s[15],F=s[16],M=s[17],O=s[18],U=s[19],Y=s[20],z=s[21],B=s[22],G=s[23],H=s[24];return s[33]!==S||s[34]!==M||s[35]!==O||s[36]!==U||s[37]!==Y?(J=r.jsxs("a",{href:S,target:M,className:O,rel:U,children:[Y,"..."]}),s[33]=S,s[34]=M,s[35]=O,s[36]=U,s[37]=Y,s[38]=J):J=s[38],s[39]===Symbol.for("react.memo_cache_sentinel")?(Q=r.jsx("br",{}),s[39]=Q):Q=s[39],s[40]===Symbol.for("react.memo_cache_sentinel")?(V=r.jsxs("div",{className:"text-sm text-muted-foreground pt-2",children:[r.jsx("strong",{children:"Note:"})," This feature is experimental and may not work for all notebooks. Additionally, some dependencies may not be available in the browser."]}),s[40]=V):V=s[40],s[41]!==i||s[42]!==C||s[43]!==I||s[44]!==P||s[45]!==T||s[46]!==A||s[47]!==W||s[48]!==E||s[49]!==R||s[50]!==J||s[51]!==z||s[52]!==B||s[53]!==G||s[54]!==H?(X=r.jsxs(i,{className:z,children:[B,G,H,C,I,P,T,A,W,E,R,J,Q,V]}),s[41]=i,s[42]=C,s[43]=I,s[44]=P,s[45]=T,s[46]=A,s[47]=W,s[48]=E,s[49]=R,s[50]=J,s[51]=z,s[52]=B,s[53]=G,s[54]=H,s[55]=X):X=s[55],s[56]!==l||s[57]!==D||s[58]!==X?(Z=r.jsxs(l,{children:[D,X]}),s[56]=l,s[57]=D,s[58]=X,s[59]=Z):Z=s[59],s[60]!==t?($=async()=>{await _(t),j({title:"Copied to clipboard"})},s[60]=t,s[61]=$):$=s[61],s[62]===Symbol.for("react.memo_cache_sentinel")?(q=r.jsx(k,{className:"w-4 h-4 mr-1"}),s[62]=q):q=s[62],s[63]!==$?(K=r.jsxs(f,{"data-testid":"copy-static-notebook-dialog-button",variant:"secondary",onClick:$,children:[q,"Copy code"]}),s[63]=$,s[64]=K):K=s[64],s[65]!==t?(L=()=>{v(new Blob([t],{type:"text/plain"}),o)},s[65]=t,s[66]=L):L=s[66],s[67]===Symbol.for("react.memo_cache_sentinel")?(ee=r.jsx(w,{className:"w-4 h-4 mr-1"}),s[67]=ee):ee=s[67],s[68]!==L?(ae=r.jsxs(f,{"data-testid":"download-static-notebook-dialog-button",variant:"secondary",onClick:L,children:[ee,"Download code"]}),s[68]=L,s[69]=ae):ae=s[69],s[70]!==K||s[71]!==ae?(se=r.jsxs("div",{className:"flex gap-4 flex-wrap",children:[K,ae]}),s[70]=K,s[71]=ae,s[72]=se):se=s[72],s[73]!==c||s[74]!==Z||s[75]!==se?(te=r.jsxs(c,{children:[Z,se]}),s[73]=c,s[74]=Z,s[75]=se,s[76]=te):te=s[76],s[77]!==N||s[78]!==F||s[79]!==te?(oe=r.jsxs(N,{children:[F,te]}),s[77]=N,s[78]=F,s[79]=te,s[80]=oe):oe=s[80],oe},F=N()||l(),M=a=>{const s=e.c(6);let t,o,n,i;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(R,{}),s[0]=t):t=s[0],s[1]!==a.appConfig?(o=r.jsx(A,{appConfig:a.appConfig}),s[1]=a.appConfig,s[2]=o):o=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(n=F&&r.jsx(O,{}),s[3]=n):n=s[3],s[4]!==o?(i=r.jsxs(r.Fragment,{children:[t,o,n]}),s[4]=o,s[5]=i):i=s[5],i},O=()=>{const a=e.c(1);let s;return a[0]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"fixed bottom-0 right-0 z-50",children:r.jsxs("a",{href:m.githubPage,target:"_blank",className:"text-sm text-[var(--grass-11)] font-bold tracking-wide transition-colors bg-[var(--grass-4)] hover:bg-[var(--grass-5)] border-t border-l border-[var(--grass-8)] px-3 py-1 rounded-tl-md flex items-center gap-2",rel:"noreferrer",children:[r.jsx("span",{className:"pb-[2px]",children:"made with marimo"}),r.jsx("img",{src:"./favicon.ico",alt:"marimo",className:"h-4 w-auto"})]})}),a[0]=s):s=a[0],s};export{M as default};
@@ -1 +1 @@
1
- var t,n,e;import{_ as i,o as r,n as s,s as o,g as a,b as l,a as c,c as h,t as u,R as f,v as y,j as d}from"./mermaid-CexJlyiA.js";import{s as p}from"./transform-CdY8z5kT.js";import{o as g}from"./ordinal-BcaZTuz9.js";import{c as _}from"./colors-bszWmPJw.js";import"./index-CmflHEIv.js";import"./step-xJWGRC3d.js";import"./init-DLRA0X12.js";const m=_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function x(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var k,v;function b(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&e>i&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&e>i&&(i=e);return i}function w(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&i>e&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&i>e&&(i=e);return i}function S(t,n){var e,i=t.length,r=-1,s=0;if(null==n)for(;++r<i;)(e=+t[r])&&(s+=e);else for(;++r<i;)(e=+n(t[r],r,t))&&(s+=e);return s}function E(t){return t.target.depth}function L(t,n){return t.sourceLinks.length?t.depth:n-1}function A(t){return function(){return t}}function M(t,n){return T(t.source,n.source)||t.index-n.index}function I(t,n){return T(t.target,n.target)||t.index-n.index}function T(t,n){return t.y0-n.y0}function N(t){return t.value}function j(t){return t.index}function P(t){return t.nodes}function O(t){return t.links}function C(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function D({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function $(){let t,n,e,i=0,r=0,s=1,o=1,a=24,l=8,c=j,h=L,u=P,f=O,y=6;function d(){const d={nodes:u.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,r]of t.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const i=new Map(t.map(((n,e)=>[c(n,e,t),n])));for(const[e,r]of n.entries()){r.index=e;let{source:t,target:n}=r;"object"!=typeof t&&(t=r.source=C(i,t)),"object"!=typeof n&&(n=r.target=C(i,n)),t.sourceLinks.push(r),n.targetLinks.push(r)}if(null!=e)for(const{sourceLinks:r,targetLinks:s}of t)r.sort(e),s.sort(e)}(d),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(S(n.sourceLinks,N),S(n.targetLinks,N)):n.fixedValue}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.depth=r;for(const{target:n}of t.sourceLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.height=r;for(const{source:n}of t.targetLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function(e){const c=function({nodes:t}){const e=b(t,(t=>t.depth))+1,r=(s-i-a)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(h.call(null,n,e))));n.layer=t,n.x0=i+t*r,n.x1=n.x0+a,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const i of o)i.sort(n);return o}(e);t=Math.min(l,(o-r)/(b(c,(t=>t.length))-1)),function(n){const e=w(n,(n=>(o-r-(n.length-1)*t)/S(n,N)));for(const i of n){let n=r;for(const r of i){r.y0=n,r.y1=n+r.value*e,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*e}n=(o-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}v(i)}}(c);for(let t=0;t<y;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/y);g(c,n,e),p(c,n,e)}}(d),D(d),d}function p(t,e,i){for(let r=1,s=t.length;r<s;++r){const s=t[r];for(const t of s){let n=0,i=0;for(const{source:e,value:s}of t.targetLinks){let r=s*(t.layer-e.layer);n+=E(e,t)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function g(t,e,i){for(let r=t.length-2;r>=0;--r){const s=t[r];for(const t of s){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=$(t,e)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function _(n,e){const i=n.length>>1,s=n[i];x(n,s.y0-t,i-1,e),m(n,s.y1+t,i+1,e),x(n,o,n.length-1,e),m(n,r,0,e)}function m(n,e,i,r){for(;i<n.length;++i){const s=n[i],o=(e-s.y0)*r;o>1e-6&&(s.y0+=o,s.y1+=o),e=s.y1+t}}function x(n,e,i,r){for(;i>=0;--i){const s=n[i],o=(s.y1-e)*r;o>1e-6&&(s.y0-=o,s.y1-=o),e=s.y0-t}}function k({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(I);for(const{target:{targetLinks:n}}of t)n.sort(M)}}function v(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(I),e.sort(M)}function E(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:s}of n.sourceLinks){if(r===e)break;i+=s+t}for(const{source:t,width:r}of e.targetLinks){if(t===n)break;i-=r}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:r,width:s}of e.targetLinks){if(r===n)break;i+=s+t}for(const{target:t,width:r}of n.sourceLinks){if(t===e)break;i-=r}return i}return d.update=function(t){return D(t),t},d.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:A(t),d):c},d.nodeAlign=function(t){return arguments.length?(h="function"==typeof t?t:A(t),d):h},d.nodeSort=function(t){return arguments.length?(n=t,d):n},d.nodeWidth=function(t){return arguments.length?(a=+t,d):a},d.nodePadding=function(n){return arguments.length?(l=t=+n,d):l},d.nodes=function(t){return arguments.length?(u="function"==typeof t?t:A(t),d):u},d.links=function(t){return arguments.length?(f="function"==typeof t?t:A(t),d):f},d.linkSort=function(t){return arguments.length?(e=t,d):e},d.size=function(t){return arguments.length?(i=r=0,s=+t[0],o=+t[1],d):[s-i,o-r]},d.extent=function(t){return arguments.length?(i=+t[0][0],s=+t[1][0],r=+t[0][1],o=+t[1][1],d):[[i,r],[s,o]]},d.iterations=function(t){return arguments.length?(y=+t,d):y},d}1===(k=x).length&&(v=k,k=function(t,n){return x(v(t),n)});var z=Math.PI,F=2*z,U=1e-6,W=F-U;function G(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function X(){return new G}function R(t){return function(){return t}}function V(t){return t[0]}function Y(t){return t[1]}G.prototype=X.prototype={constructor:G,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,s){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var s=this._x1,o=this._y1,a=e-t,l=i-n,c=s-t,h=o-n,u=c*c+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>U)if(Math.abs(h*a-l*c)>U&&r){var f=e-s,y=i-o,d=a*a+l*l,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),m=r*Math.tan((z-Math.acos((d+u-p)/(2*g*_)))/2),x=m/_,k=m/g;Math.abs(x-1)>U&&(this._+="L"+(t+x*c)+","+(n+x*h)),this._+="A"+r+","+r+",0,0,"+ +(h*f>c*y)+","+(this._x1=t+k*a)+","+(this._y1=n+k*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,s){t=+t,n=+n,s=!!s;var o=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+o,c=n+a,h=1^s,u=s?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>U||Math.abs(this._y1-c)>U)&&(this._+="L"+l+","+c),e&&(u<0&&(u=u%F+F),u>W?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-a)+"A"+e+","+e+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):u>U&&(this._+="A"+e+","+e+",0,"+ +(u>=z)+","+h+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var q=Array.prototype.slice;function Q(t){return t.source}function B(t){return t.target}function K(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function Z(){return function(t){var n=Q,e=B,i=V,r=Y,s=null;function o(){var o,a=q.call(arguments),l=n.apply(this,a),c=e.apply(this,a);if(s||(s=o=X()),t(s,+i.apply(this,(a[0]=l,a)),+r.apply(this,a),+i.apply(this,(a[0]=c,a)),+r.apply(this,a)),o)return s=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:R(+t),o):i},o.y=function(t){return arguments.length?(r="function"==typeof t?t:R(+t),o):r},o.context=function(t){return arguments.length?(s=null==t?null:t,o):s},o}(K)}function H(t){return[t.source.x1,t.y0]}function J(t){return[t.target.x0,t.y1]}var tt=function(){var t=i((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],r=[1,5,10,12],s={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:i((function(t,n,e,i,r,s,o){var a=s.length-1;switch(r){case 7:const t=i.findOrCreateNode(s[a-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(s[a-2].trim().replaceAll('""','"')),e=parseFloat(s[a].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=s[a];break;case 10:this.$=s[a-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(r,[2,8]),t(r,[2,9]),{19:[1,16]},t(r,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(r,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:i((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:i((function(t){var n=this,e=[0],r=[],s=[null],o=[],a=this.table,l="",c=0,h=0,u=o.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var p=f.yylloc;o.push(p);var g=f.options&&f.options.ranges;function _(){var t;return"number"!=typeof(t=r.pop()||f.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(t){e.length=e.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),i(_,"lex");for(var m,x,k,v,b,w,S,E,L={};;){if(x=e[e.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==m&&(m=_()),k=a[x]&&a[x][m]),void 0===k||!k.length||!k[0]){var A="";for(b in E=[],a[x])this.terminals_[b]&&b>2&&E.push("'"+this.terminals_[b]+"'");A=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:f.match,token:this.terminals_[m]||m,line:f.yylineno,loc:p,expected:E})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+m);switch(k[0]){case 1:e.push(m),s.push(f.yytext),o.push(f.yylloc),e.push(k[1]),m=null,h=f.yyleng,l=f.yytext,c=f.yylineno,p=f.yylloc;break;case 2:if(w=this.productions_[k[1]][1],L.$=s[s.length-w],L._$={first_line:o[o.length-(w||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(w||1)].first_column,last_column:o[o.length-1].last_column},g&&(L._$.range=[o[o.length-(w||1)].range[0],o[o.length-1].range[1]]),void 0!==(v=this.performAction.apply(L,[l,h,c,y.yy,k[1],s,o].concat(u))))return v;w&&(e=e.slice(0,-1*w*2),s=s.slice(0,-1*w),o=o.slice(0,-1*w)),e.push(this.productions_[k[1]][0]),s.push(L.$),o.push(L._$),S=a[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}),"parse")},o=function(){return{EOF:1,parseError:i((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:i((function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:i((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:i((function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:i((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:i((function(t,n){var e,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((e=this._input.match(this.rules[r[s]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,r[s])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var t=this.next();return t||this.lex()}),"lex"),begin:i((function(t){this.conditionStack.push(t)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:i((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:i((function(t){this.begin(t)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function a(){this.yy={}}return s.lexer=o,i(a,"Parser"),a.prototype=s,s.Parser=a,new a}();tt.parser=tt;var nt=tt,et=[],it=[],rt=new Map,st=i((()=>{et=[],it=[],rt=new Map,y()}),"clear"),ot=(i(t=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}},"SankeyLink"),t),at=i(((t,n,e)=>{et.push(new ot(t,n,e))}),"addLink"),lt=(i(n=class{constructor(t){this.ID=t}},"SankeyNode"),n),ct=i((t=>{t=d.sanitizeText(t,h());let n=rt.get(t);return void 0===n&&(n=new lt(t),rt.set(t,n),it.push(n)),n}),"findOrCreateNode"),ht=i((()=>it),"getNodes"),ut=i((()=>et),"getLinks"),ft=i((()=>({nodes:it.map((t=>({id:t.ID}))),links:et.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),yt={nodesMap:rt,getConfig:i((()=>h().sankey),"getConfig"),getNodes:ht,getLinks:ut,getGraph:ft,addLink:at,findOrCreateNode:ct,getAccTitle:c,setAccTitle:l,getAccDescription:a,setAccDescription:o,getDiagramTitle:s,setDiagramTitle:r,clear:st},dt=(i(e=class{static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},"Uid"),e.count=0,e),pt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?w(t.sourceLinks,E)-1:0},justify:L},gt={draw:i((function(t,n,e,r){const{securityLevel:s,sankey:o}=h(),a=u.sankey;let l;"sandbox"===s&&(l=p("#i"+n));const c=p("sandbox"===s?l.nodes()[0].contentDocument.body:"body"),y="sandbox"===s?c.select(`[id="${n}"]`):p(`[id="${n}"]`),d=(null==o?void 0:o.width)??a.width,_=(null==o?void 0:o.height)??a.width,x=(null==o?void 0:o.useMaxWidth)??a.useMaxWidth,k=(null==o?void 0:o.nodeAlignment)??a.nodeAlignment,v=(null==o?void 0:o.prefix)??a.prefix,b=(null==o?void 0:o.suffix)??a.suffix,w=(null==o?void 0:o.showValues)??a.showValues,S=r.db.getGraph(),E=pt[k];$().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(w?15:0)).nodeAlign(E).extent([[0,0],[d,_]])(S);const L=g(m);y.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=dt.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>L(t.id)));const A=i((({id:t,value:n})=>w?`${t}\n${v}${Math.round(100*n)/100}${b}`:t),"getText");y.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(S.nodes).join("text").attr("x",(t=>t.x0<d/2?t.x1+6:t.x0-6)).attr("y",(t=>(t.y1+t.y0)/2)).attr("dy",(w?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0<d/2?"start":"end")).text(A);const M=y.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),I=(null==o?void 0:o.linkColor)??"gradient";if("gradient"===I){const t=M.append("linearGradient").attr("id",(t=>(t.uid=dt.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>L(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>L(t.target.id)))}let T;switch(I){case"gradient":T=i((t=>t.uid),"coloring");break;case"source":T=i((t=>L(t.source.id)),"coloring");break;case"target":T=i((t=>L(t.target.id)),"coloring");break;default:T=I}M.append("path").attr("d",Z().source(H).target(J)).attr("stroke",T).attr("stroke-width",(t=>Math.max(1,t.width))),f(void 0,y,0,x)}),"draw")},_t=i((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),mt=nt.parse.bind(nt);nt.parse=t=>mt(_t(t));var xt={parser:nt,db:yt,renderer:gt};export{xt as diagram};
1
+ var t,n,e;import{_ as i,o as r,n as s,s as o,g as a,b as l,a as c,c as h,t as u,R as f,v as y,j as d}from"./mermaid-CBrJcUU_.js";import{s as p}from"./transform-CdY8z5kT.js";import{o as g}from"./ordinal-BcaZTuz9.js";import{c as _}from"./colors-bszWmPJw.js";import"./index-PgLdZH9t.js";import"./step-xJWGRC3d.js";import"./init-DLRA0X12.js";const m=_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function x(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var k,v;function b(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&e>i&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&e>i&&(i=e);return i}function w(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&i>e&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&i>e&&(i=e);return i}function S(t,n){var e,i=t.length,r=-1,s=0;if(null==n)for(;++r<i;)(e=+t[r])&&(s+=e);else for(;++r<i;)(e=+n(t[r],r,t))&&(s+=e);return s}function E(t){return t.target.depth}function L(t,n){return t.sourceLinks.length?t.depth:n-1}function A(t){return function(){return t}}function M(t,n){return T(t.source,n.source)||t.index-n.index}function I(t,n){return T(t.target,n.target)||t.index-n.index}function T(t,n){return t.y0-n.y0}function N(t){return t.value}function j(t){return t.index}function P(t){return t.nodes}function O(t){return t.links}function C(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function D({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function $(){let t,n,e,i=0,r=0,s=1,o=1,a=24,l=8,c=j,h=L,u=P,f=O,y=6;function d(){const d={nodes:u.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,r]of t.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const i=new Map(t.map(((n,e)=>[c(n,e,t),n])));for(const[e,r]of n.entries()){r.index=e;let{source:t,target:n}=r;"object"!=typeof t&&(t=r.source=C(i,t)),"object"!=typeof n&&(n=r.target=C(i,n)),t.sourceLinks.push(r),n.targetLinks.push(r)}if(null!=e)for(const{sourceLinks:r,targetLinks:s}of t)r.sort(e),s.sort(e)}(d),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(S(n.sourceLinks,N),S(n.targetLinks,N)):n.fixedValue}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.depth=r;for(const{target:n}of t.sourceLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.height=r;for(const{source:n}of t.targetLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function(e){const c=function({nodes:t}){const e=b(t,(t=>t.depth))+1,r=(s-i-a)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(h.call(null,n,e))));n.layer=t,n.x0=i+t*r,n.x1=n.x0+a,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const i of o)i.sort(n);return o}(e);t=Math.min(l,(o-r)/(b(c,(t=>t.length))-1)),function(n){const e=w(n,(n=>(o-r-(n.length-1)*t)/S(n,N)));for(const i of n){let n=r;for(const r of i){r.y0=n,r.y1=n+r.value*e,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*e}n=(o-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}v(i)}}(c);for(let t=0;t<y;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/y);g(c,n,e),p(c,n,e)}}(d),D(d),d}function p(t,e,i){for(let r=1,s=t.length;r<s;++r){const s=t[r];for(const t of s){let n=0,i=0;for(const{source:e,value:s}of t.targetLinks){let r=s*(t.layer-e.layer);n+=E(e,t)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function g(t,e,i){for(let r=t.length-2;r>=0;--r){const s=t[r];for(const t of s){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=$(t,e)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function _(n,e){const i=n.length>>1,s=n[i];x(n,s.y0-t,i-1,e),m(n,s.y1+t,i+1,e),x(n,o,n.length-1,e),m(n,r,0,e)}function m(n,e,i,r){for(;i<n.length;++i){const s=n[i],o=(e-s.y0)*r;o>1e-6&&(s.y0+=o,s.y1+=o),e=s.y1+t}}function x(n,e,i,r){for(;i>=0;--i){const s=n[i],o=(s.y1-e)*r;o>1e-6&&(s.y0-=o,s.y1-=o),e=s.y0-t}}function k({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(I);for(const{target:{targetLinks:n}}of t)n.sort(M)}}function v(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(I),e.sort(M)}function E(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:s}of n.sourceLinks){if(r===e)break;i+=s+t}for(const{source:t,width:r}of e.targetLinks){if(t===n)break;i-=r}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:r,width:s}of e.targetLinks){if(r===n)break;i+=s+t}for(const{target:t,width:r}of n.sourceLinks){if(t===e)break;i-=r}return i}return d.update=function(t){return D(t),t},d.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:A(t),d):c},d.nodeAlign=function(t){return arguments.length?(h="function"==typeof t?t:A(t),d):h},d.nodeSort=function(t){return arguments.length?(n=t,d):n},d.nodeWidth=function(t){return arguments.length?(a=+t,d):a},d.nodePadding=function(n){return arguments.length?(l=t=+n,d):l},d.nodes=function(t){return arguments.length?(u="function"==typeof t?t:A(t),d):u},d.links=function(t){return arguments.length?(f="function"==typeof t?t:A(t),d):f},d.linkSort=function(t){return arguments.length?(e=t,d):e},d.size=function(t){return arguments.length?(i=r=0,s=+t[0],o=+t[1],d):[s-i,o-r]},d.extent=function(t){return arguments.length?(i=+t[0][0],s=+t[1][0],r=+t[0][1],o=+t[1][1],d):[[i,r],[s,o]]},d.iterations=function(t){return arguments.length?(y=+t,d):y},d}1===(k=x).length&&(v=k,k=function(t,n){return x(v(t),n)});var z=Math.PI,F=2*z,U=1e-6,W=F-U;function G(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function X(){return new G}function R(t){return function(){return t}}function V(t){return t[0]}function Y(t){return t[1]}G.prototype=X.prototype={constructor:G,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,s){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var s=this._x1,o=this._y1,a=e-t,l=i-n,c=s-t,h=o-n,u=c*c+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>U)if(Math.abs(h*a-l*c)>U&&r){var f=e-s,y=i-o,d=a*a+l*l,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),m=r*Math.tan((z-Math.acos((d+u-p)/(2*g*_)))/2),x=m/_,k=m/g;Math.abs(x-1)>U&&(this._+="L"+(t+x*c)+","+(n+x*h)),this._+="A"+r+","+r+",0,0,"+ +(h*f>c*y)+","+(this._x1=t+k*a)+","+(this._y1=n+k*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,s){t=+t,n=+n,s=!!s;var o=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+o,c=n+a,h=1^s,u=s?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>U||Math.abs(this._y1-c)>U)&&(this._+="L"+l+","+c),e&&(u<0&&(u=u%F+F),u>W?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-a)+"A"+e+","+e+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):u>U&&(this._+="A"+e+","+e+",0,"+ +(u>=z)+","+h+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var q=Array.prototype.slice;function Q(t){return t.source}function B(t){return t.target}function K(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function Z(){return function(t){var n=Q,e=B,i=V,r=Y,s=null;function o(){var o,a=q.call(arguments),l=n.apply(this,a),c=e.apply(this,a);if(s||(s=o=X()),t(s,+i.apply(this,(a[0]=l,a)),+r.apply(this,a),+i.apply(this,(a[0]=c,a)),+r.apply(this,a)),o)return s=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:R(+t),o):i},o.y=function(t){return arguments.length?(r="function"==typeof t?t:R(+t),o):r},o.context=function(t){return arguments.length?(s=null==t?null:t,o):s},o}(K)}function H(t){return[t.source.x1,t.y0]}function J(t){return[t.target.x0,t.y1]}var tt=function(){var t=i((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],r=[1,5,10,12],s={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:i((function(t,n,e,i,r,s,o){var a=s.length-1;switch(r){case 7:const t=i.findOrCreateNode(s[a-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(s[a-2].trim().replaceAll('""','"')),e=parseFloat(s[a].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=s[a];break;case 10:this.$=s[a-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(r,[2,8]),t(r,[2,9]),{19:[1,16]},t(r,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(r,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:i((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:i((function(t){var n=this,e=[0],r=[],s=[null],o=[],a=this.table,l="",c=0,h=0,u=o.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var p=f.yylloc;o.push(p);var g=f.options&&f.options.ranges;function _(){var t;return"number"!=typeof(t=r.pop()||f.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(t){e.length=e.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),i(_,"lex");for(var m,x,k,v,b,w,S,E,L={};;){if(x=e[e.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==m&&(m=_()),k=a[x]&&a[x][m]),void 0===k||!k.length||!k[0]){var A="";for(b in E=[],a[x])this.terminals_[b]&&b>2&&E.push("'"+this.terminals_[b]+"'");A=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:f.match,token:this.terminals_[m]||m,line:f.yylineno,loc:p,expected:E})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+m);switch(k[0]){case 1:e.push(m),s.push(f.yytext),o.push(f.yylloc),e.push(k[1]),m=null,h=f.yyleng,l=f.yytext,c=f.yylineno,p=f.yylloc;break;case 2:if(w=this.productions_[k[1]][1],L.$=s[s.length-w],L._$={first_line:o[o.length-(w||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(w||1)].first_column,last_column:o[o.length-1].last_column},g&&(L._$.range=[o[o.length-(w||1)].range[0],o[o.length-1].range[1]]),void 0!==(v=this.performAction.apply(L,[l,h,c,y.yy,k[1],s,o].concat(u))))return v;w&&(e=e.slice(0,-1*w*2),s=s.slice(0,-1*w),o=o.slice(0,-1*w)),e.push(this.productions_[k[1]][0]),s.push(L.$),o.push(L._$),S=a[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}),"parse")},o=function(){return{EOF:1,parseError:i((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:i((function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:i((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:i((function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:i((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:i((function(t,n){var e,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((e=this._input.match(this.rules[r[s]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,r[s])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var t=this.next();return t||this.lex()}),"lex"),begin:i((function(t){this.conditionStack.push(t)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:i((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:i((function(t){this.begin(t)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function a(){this.yy={}}return s.lexer=o,i(a,"Parser"),a.prototype=s,s.Parser=a,new a}();tt.parser=tt;var nt=tt,et=[],it=[],rt=new Map,st=i((()=>{et=[],it=[],rt=new Map,y()}),"clear"),ot=(i(t=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}},"SankeyLink"),t),at=i(((t,n,e)=>{et.push(new ot(t,n,e))}),"addLink"),lt=(i(n=class{constructor(t){this.ID=t}},"SankeyNode"),n),ct=i((t=>{t=d.sanitizeText(t,h());let n=rt.get(t);return void 0===n&&(n=new lt(t),rt.set(t,n),it.push(n)),n}),"findOrCreateNode"),ht=i((()=>it),"getNodes"),ut=i((()=>et),"getLinks"),ft=i((()=>({nodes:it.map((t=>({id:t.ID}))),links:et.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),yt={nodesMap:rt,getConfig:i((()=>h().sankey),"getConfig"),getNodes:ht,getLinks:ut,getGraph:ft,addLink:at,findOrCreateNode:ct,getAccTitle:c,setAccTitle:l,getAccDescription:a,setAccDescription:o,getDiagramTitle:s,setDiagramTitle:r,clear:st},dt=(i(e=class{static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},"Uid"),e.count=0,e),pt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?w(t.sourceLinks,E)-1:0},justify:L},gt={draw:i((function(t,n,e,r){const{securityLevel:s,sankey:o}=h(),a=u.sankey;let l;"sandbox"===s&&(l=p("#i"+n));const c=p("sandbox"===s?l.nodes()[0].contentDocument.body:"body"),y="sandbox"===s?c.select(`[id="${n}"]`):p(`[id="${n}"]`),d=(null==o?void 0:o.width)??a.width,_=(null==o?void 0:o.height)??a.width,x=(null==o?void 0:o.useMaxWidth)??a.useMaxWidth,k=(null==o?void 0:o.nodeAlignment)??a.nodeAlignment,v=(null==o?void 0:o.prefix)??a.prefix,b=(null==o?void 0:o.suffix)??a.suffix,w=(null==o?void 0:o.showValues)??a.showValues,S=r.db.getGraph(),E=pt[k];$().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(w?15:0)).nodeAlign(E).extent([[0,0],[d,_]])(S);const L=g(m);y.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=dt.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>L(t.id)));const A=i((({id:t,value:n})=>w?`${t}\n${v}${Math.round(100*n)/100}${b}`:t),"getText");y.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(S.nodes).join("text").attr("x",(t=>t.x0<d/2?t.x1+6:t.x0-6)).attr("y",(t=>(t.y1+t.y0)/2)).attr("dy",(w?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0<d/2?"start":"end")).text(A);const M=y.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),I=(null==o?void 0:o.linkColor)??"gradient";if("gradient"===I){const t=M.append("linearGradient").attr("id",(t=>(t.uid=dt.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>L(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>L(t.target.id)))}let T;switch(I){case"gradient":T=i((t=>t.uid),"coloring");break;case"source":T=i((t=>L(t.source.id)),"coloring");break;case"target":T=i((t=>L(t.target.id)),"coloring");break;default:T=I}M.append("path").attr("d",Z().source(H).target(J)).attr("stroke",T).attr("stroke-width",(t=>Math.max(1,t.width))),f(void 0,y,0,x)}),"draw")},_t=i((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),mt=nt.parse.bind(nt);nt.parse=t=>mt(_t(t));var xt={parser:nt,db:yt,renderer:gt};export{xt as diagram};
@@ -0,0 +1 @@
1
+ var e,t,n=Object.getOwnPropertyNames,r=(e={"assets/save-worker-BykuInSi.js"(e,t){var n,r,a;(r=n||(n={})).assertEqual=e=>e,r.assertIs=function(e){},r.assertNever=function(e){throw new Error},r.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},r.getValidEnumValues=e=>{const t=r.objectKeys(e).filter((t=>"number"!=typeof e[e[t]])),n={};for(const r of t)n[r]=e[r];return r.objectValues(n)},r.objectValues=e=>r.objectKeys(e).map((function(t){return e[t]})),r.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},r.find=(e,t)=>{for(const n of e)if(t(n))return n},r.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,r.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},r.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(a||(a={})).mergeShapes=(e,t)=>({...e,...t});const s=n.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),i=e=>{switch(typeof e){case"undefined":return s.undefined;case"string":return s.string;case"number":return isNaN(e)?s.nan:s.number;case"boolean":return s.boolean;case"function":return s.function;case"bigint":return s.bigint;case"symbol":return s.symbol;case"object":return Array.isArray(e)?s.array:null===e?s.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?s.promise:"undefined"!=typeof Map&&e instanceof Map?s.map:"undefined"!=typeof Set&&e instanceof Set?s.set:"undefined"!=typeof Date&&e instanceof Date?s.date:s.object;default:return s.unknown}},o=n.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class d extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof d))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}d.create=e=>new d(e);const c=(e,t)=>{let r;switch(e.code){case o.invalid_type:r=e.received===s.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case o.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,n.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:r=`Unrecognized key(s) in object: ${n.joinValues(e.keys,", ")}`;break;case o.invalid_union:r="Invalid input";break;case o.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${n.joinValues(e.options)}`;break;case o.invalid_enum_value:r=`Invalid enum value. Expected ${n.joinValues(e.options)}, received '${e.received}'`;break;case o.invalid_arguments:r="Invalid function arguments";break;case o.invalid_return_type:r="Invalid function return type";break;case o.invalid_date:r="Invalid date";break;case o.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:n.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case o.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case o.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case o.custom:r="Invalid input";break;case o.invalid_intersection_types:r="Intersection results could not be merged";break;case o.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case o.not_finite:r="Number must be finite";break;default:r=t.defaultError,n.assertNever(e)}return{message:r}};let u=c;function l(){return u}const p=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const d=r.filter((e=>!!e)).slice().reverse();for(const c of d)o=c(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}};function h(e,t){const n=l(),r=p({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===c?void 0:c].filter((e=>!!e))});e.common.issues.push(r)}class m{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return f;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t){const e=await r.key,t=await r.value;n.push({key:e,value:t})}return m.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return f;if("aborted"===a.status)return f;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const f=Object.freeze({status:"aborted"}),y=e=>({status:"dirty",value:e}),g=e=>({status:"valid",value:e}),v=e=>"aborted"===e.status,_=e=>"dirty"===e.status,w=e=>"valid"===e.status,b=e=>"undefined"!=typeof Promise&&e instanceof Promise;function k(e,t,n,r){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function x(e,t,n,r,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var S,T,O,E;"function"==typeof SuppressedError&&SuppressedError,(T=S||(S={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},T.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class Z{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const N=(e,t)=>{if(w(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new d(e.common.issues);return this._error=t,this._error}}};function j(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:a}:{errorMap:(t,a)=>{var s,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(s=null!=o?o:r)&&void 0!==s?s:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=o?o:n)&&void 0!==i?i:a.defaultError}},description:a}}class A{get description(){return this._def.description}_getType(e){return i(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new m,ctx:{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(b(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},a=this._parseSync({data:e,path:r.path,parent:r});return N(r,a)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return w(t)?{value:t.value}:{issues:r.common.issues}}catch(a){(null===(n=null===(t=null==a?void 0:a.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>w(e)?{value:e.value}:{issues:r.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(b(r)?r:Promise.resolve(r));return N(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:o.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new Ae({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Ce.create(this,this._def)}nullable(){return Pe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pe.create(this)}promise(){return je.create(this,this._def)}or(e){return fe.create([this,e],this._def)}and(e){return _e.create(this,e,this._def)}transform(e){return new Ae({...j(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ie({...j(this._def),innerType:this,defaultValue:t,typeName:Ve.ZodDefault})}brand(){return new Le({typeName:Ve.ZodBranded,type:this,...j(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Re({...j(this._def),innerType:this,catchValue:t,typeName:Ve.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Me.create(this,e)}readonly(){return De.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const C=/^c[^\s-]{8,}$/i,P=/^[0-9a-z]+$/,I=/^[0-9A-HJKMNP-TV-Z]{26}$/i,R=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,F=/^[a-z0-9_-]{21}$/i,$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,M=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let D;const U=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,q=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,V=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,H=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,B=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,W="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",K=new RegExp(`^${W}$`);function J(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function Y(e){let t=`${W}T${J(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function G(e,t){if(!$.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!("object"!=typeof a||null===a||!a.typ||!a.alg||t&&a.alg!==t)}catch(n){return!1}}function X(e,t){return!("v4"!==t&&t||!z.test(e))||!("v6"!==t&&t||!V.test(e))}class Q extends A{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==s.string){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.string,received:t.parsedType}),f}const t=new m;let r;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:o.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:o.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const n=e.data.length>s.value,a=e.data.length<s.value;(n||a)&&(r=this._getOrReturnCtx(e,r),n?h(r,{code:o.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&h(r,{code:o.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)M.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"email",code:o.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)D||(D=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),D.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"emoji",code:o.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)R.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"uuid",code:o.invalid_string,message:s.message}),t.dirty());else if("nanoid"===s.kind)F.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"nanoid",code:o.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)C.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"cuid",code:o.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)P.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"cuid2",code:o.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)I.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"ulid",code:o.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new URL(e.data)}catch(d){r=this._getOrReturnCtx(e,r),h(r,{validation:"url",code:o.invalid_string,message:s.message}),t.dirty()}else"regex"===s.kind?(s.regex.lastIndex=0,s.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"regex",code:o.invalid_string,message:s.message}),t.dirty())):"trim"===s.kind?e.data=e.data.trim():"includes"===s.kind?e.data.includes(s.value,s.position)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty()):"toLowerCase"===s.kind?e.data=e.data.toLowerCase():"toUpperCase"===s.kind?e.data=e.data.toUpperCase():"startsWith"===s.kind?e.data.startsWith(s.value)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty()):"endsWith"===s.kind?e.data.endsWith(s.value)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty()):"datetime"===s.kind?Y(s).test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:"datetime",message:s.message}),t.dirty()):"date"===s.kind?K.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:"date",message:s.message}),t.dirty()):"time"===s.kind?new RegExp(`^${J(s)}$`).test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:"time",message:s.message}),t.dirty()):"duration"===s.kind?L.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"duration",code:o.invalid_string,message:s.message}),t.dirty()):"ip"===s.kind?(a=e.data,("v4"!==(i=s.version)&&i||!U.test(a))&&("v6"!==i&&i||!q.test(a))&&(r=this._getOrReturnCtx(e,r),h(r,{validation:"ip",code:o.invalid_string,message:s.message}),t.dirty())):"jwt"===s.kind?G(e.data,s.alg)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"jwt",code:o.invalid_string,message:s.message}),t.dirty()):"cidr"===s.kind?X(e.data,s.version)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"cidr",code:o.invalid_string,message:s.message}),t.dirty()):"base64"===s.kind?H.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"base64",code:o.invalid_string,message:s.message}),t.dirty()):"base64url"===s.kind?B.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"base64url",code:o.invalid_string,message:s.message}),t.dirty()):n.assertNever(s);var a,i;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:o.invalid_string,...S.errToObj(n)})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...S.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...S.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...S.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...S.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...S.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...S.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...S.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...S.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...S.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...S.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...S.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...S.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...S.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...S.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...S.errToObj(t)})}nonempty(e){return this.min(1,S.errToObj(e))}trim(){return new Q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function ee(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}Q.create=e=>{var t;return new Q({checks:[],typeName:Ve.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...j(e)})};class te extends A{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==s.number){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.number,received:t.parsedType}),f}let t;const r=new m;for(const a of this._def.checks)"int"===a.kind?n.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),h(t,{code:o.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"multipleOf"===a.kind?0!==ee(e.data,a.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),h(t,{code:o.not_finite,message:a.message}),r.dirty()):n.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,n,r){return new te({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:S.toString(r)}]})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:S.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&n.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}te.create=e=>new te({checks:[],typeName:Ve.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...j(e)});class ne extends A{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(a){return this._getInvalidInput(e)}if(this._getType(e)!==s.bigint)return this._getInvalidInput(e);let t;const r=new m;for(const s of this._def.checks)"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):n.assertNever(s);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.bigint,received:t.parsedType}),f}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,n,r){return new ne({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:S.toString(r)}]})}_addCheck(e){return new ne({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ne.create=e=>{var t;return new ne({checks:[],typeName:Ve.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...j(e)})};class re extends A{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==s.boolean){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.boolean,received:t.parsedType}),f}return g(e.data)}}re.create=e=>new re({typeName:Ve.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...j(e)});class ae extends A{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==s.date){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.date,received:t.parsedType}),f}if(isNaN(e.data.getTime()))return h(this._getOrReturnCtx(e),{code:o.invalid_date}),f;const t=new m;let r;for(const a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:o.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:o.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):n.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:S.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:S.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ae.create=e=>new ae({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...j(e)});class se extends A{_parse(e){if(this._getType(e)!==s.symbol){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.symbol,received:t.parsedType}),f}return g(e.data)}}se.create=e=>new se({typeName:Ve.ZodSymbol,...j(e)});class ie extends A{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.undefined,received:t.parsedType}),f}return g(e.data)}}ie.create=e=>new ie({typeName:Ve.ZodUndefined,...j(e)});class oe extends A{_parse(e){if(this._getType(e)!==s.null){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.null,received:t.parsedType}),f}return g(e.data)}}oe.create=e=>new oe({typeName:Ve.ZodNull,...j(e)});class de extends A{constructor(){super(...arguments),this._any=!0}_parse(e){return g(e.data)}}de.create=e=>new de({typeName:Ve.ZodAny,...j(e)});class ce extends A{constructor(){super(...arguments),this._unknown=!0}_parse(e){return g(e.data)}}ce.create=e=>new ce({typeName:Ve.ZodUnknown,...j(e)});class ue extends A{_parse(e){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.never,received:t.parsedType}),f}}ue.create=e=>new ue({typeName:Ve.ZodNever,...j(e)});class le extends A{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.void,received:t.parsedType}),f}return g(e.data)}}le.create=e=>new le({typeName:Ve.ZodVoid,...j(e)});class pe extends A{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==s.array)return h(t,{code:o.invalid_type,expected:s.array,received:t.parsedType}),f;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(h(t,{code:e?o.too_big:o.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(h(t,{code:o.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(h(t,{code:o.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new Z(t,e,t.path,n))))).then((e=>m.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new Z(t,e,t.path,n))));return m.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new pe({...this._def,minLength:{value:e,message:S.toString(t)}})}max(e,t){return new pe({...this._def,maxLength:{value:e,message:S.toString(t)}})}length(e,t){return new pe({...this._def,exactLength:{value:e,message:S.toString(t)}})}nonempty(e){return this.min(1,e)}}function he(e){if(e instanceof me){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ce.create(he(r))}return new me({...e._def,shape:()=>t})}return e instanceof pe?new pe({...e._def,type:he(e.element)}):e instanceof Ce?Ce.create(he(e.unwrap())):e instanceof Pe?Pe.create(he(e.unwrap())):e instanceof we?we.create(e.items.map((e=>he(e)))):e}pe.create=(e,t)=>new pe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...j(t)});class me extends A{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=n.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==s.object){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.object,received:t.parsedType}),f}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof ue&&"strip"===this._def.unknownKeys))for(const s in n.data)a.includes(s)||i.push(s);const d=[];for(const s of a){const e=r[s],t=n.data[s];d.push({key:{status:"valid",value:s},value:e._parse(new Z(n,t,n.path,s)),alwaysSet:s in n.data})}if(this._def.catchall instanceof ue){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of i)d.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)i.length>0&&(h(n,{code:o.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const r=n.data[t];d.push({key:{status:"valid",value:t},value:e._parse(new Z(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of d){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>m.mergeObjectSync(t,e))):m.mergeObjectSync(t,d)}get shape(){return this._def.shape()}strict(e){return S.errToObj,new me({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,s,i;const o=null!==(s=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==s?s:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=S.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new me({...this._def,unknownKeys:"strip"})}passthrough(){return new me({...this._def,unknownKeys:"passthrough"})}extend(e){return new me({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new me({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ve.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new me({...this._def,catchall:e})}pick(e){const t={};return n.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new me({...this._def,shape:()=>t})}omit(e){const t={};return n.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new me({...this._def,shape:()=>t})}deepPartial(){return he(this)}partial(e){const t={};return n.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new me({...this._def,shape:()=>t})}required(e){const t={};return n.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ce;)e=e._def.innerType;t[n]=e}})),new me({...this._def,shape:()=>t})}keyof(){return Ee(n.objectKeys(this.shape))}}me.create=(e,t)=>new me({shape:()=>e,unknownKeys:"strip",catchall:ue.create(),typeName:Ve.ZodObject,...j(t)}),me.strictCreate=(e,t)=>new me({shape:()=>e,unknownKeys:"strict",catchall:ue.create(),typeName:Ve.ZodObject,...j(t)}),me.lazycreate=(e,t)=>new me({shape:e,unknownKeys:"strip",catchall:ue.create(),typeName:Ve.ZodObject,...j(t)});class fe extends A{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map((e=>new d(e.ctx.common.issues)));return h(t,{code:o.invalid_union,unionErrors:n}),f}));{let e;const r=[];for(const s of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=s._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new d(e)));return h(t,{code:o.invalid_union,unionErrors:a}),f}}get options(){return this._def.options}}fe.create=(e,t)=>new fe({options:e,typeName:Ve.ZodUnion,...j(t)});const ye=e=>e instanceof Te?ye(e.schema):e instanceof Ae?ye(e.innerType()):e instanceof Oe?[e.value]:e instanceof Ze?e.options:e instanceof Ne?n.objectValues(e.enum):e instanceof Ie?ye(e._def.innerType):e instanceof ie?[void 0]:e instanceof oe?[null]:e instanceof Ce?[void 0,...ye(e.unwrap())]:e instanceof Pe?[null,...ye(e.unwrap())]:e instanceof Le||e instanceof De?ye(e.unwrap()):e instanceof Re?ye(e._def.innerType):[];class ge extends A{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.object)return h(t,{code:o.invalid_type,expected:s.object,received:t.parsedType}),f;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:o.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),f)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const a of t){const t=ye(a.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(r.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);r.set(n,a)}}return new ge({typeName:Ve.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...j(n)})}}function ve(e,t){const r=i(e),a=i(t);if(e===t)return{valid:!0,data:e};if(r===s.object&&a===s.object){const r=n.objectKeys(t),a=n.objectKeys(e).filter((e=>-1!==r.indexOf(e))),s={...e,...t};for(const n of a){const r=ve(e[n],t[n]);if(!r.valid)return{valid:!1};s[n]=r.data}return{valid:!0,data:s}}if(r===s.array&&a===s.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=ve(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return r===s.date&&a===s.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _e extends A{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(v(e)||v(r))return f;const a=ve(e.value,r.value);return a.valid?((_(e)||_(r))&&t.dirty(),{status:t.value,value:a.data}):(h(n,{code:o.invalid_intersection_types}),f)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}_e.create=(e,t,n)=>new _e({left:e,right:t,typeName:Ve.ZodIntersection,...j(n)});class we extends A{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.array)return h(n,{code:o.invalid_type,expected:s.array,received:n.parsedType}),f;if(n.data.length<this._def.items.length)return h(n,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),f;!this._def.rest&&n.data.length>this._def.items.length&&(h(n,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new Z(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>m.mergeArray(t,e))):m.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new we({...this._def,rest:e})}}we.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new we({items:e,typeName:Ve.ZodTuple,rest:null,...j(t)})};class be extends A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.object)return h(n,{code:o.invalid_type,expected:s.object,received:n.parsedType}),f;const r=[],a=this._def.keyType,i=this._def.valueType;for(const s in n.data)r.push({key:a._parse(new Z(n,s,n.path,s)),value:i._parse(new Z(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?m.mergeObjectAsync(t,r):m.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new be(t instanceof A?{keyType:e,valueType:t,typeName:Ve.ZodRecord,...j(n)}:{keyType:Q.create(),valueType:e,typeName:Ve.ZodRecord,...j(t)})}}class ke extends A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.map)return h(n,{code:o.invalid_type,expected:s.map,received:n.parsedType}),f;const r=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new Z(n,e,n.path,[s,"key"])),value:a._parse(new Z(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of i){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return f;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of i){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return f;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}ke.create=(e,t,n)=>new ke({valueType:t,keyType:e,typeName:Ve.ZodMap,...j(n)});class xe extends A{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.set)return h(n,{code:o.invalid_type,expected:s.set,received:n.parsedType}),f;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(h(n,{code:o.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(h(n,{code:o.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function i(e){const n=new Set;for(const r of e){if("aborted"===r.status)return f;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const d=[...n.data.values()].map(((e,t)=>a._parse(new Z(n,e,n.path,t))));return n.common.async?Promise.all(d).then((e=>i(e))):i(d)}min(e,t){return new xe({...this._def,minSize:{value:e,message:S.toString(t)}})}max(e,t){return new xe({...this._def,maxSize:{value:e,message:S.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}xe.create=(e,t)=>new xe({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...j(t)});class Se extends A{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.function)return h(t,{code:o.invalid_type,expected:s.function,received:t.parsedType}),f;function n(e,n){return p({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),c].filter((e=>!!e)),issueData:{code:o.invalid_arguments,argumentsError:n}})}function r(e,n){return p({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),c].filter((e=>!!e)),issueData:{code:o.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof je){const e=this;return g((async function(...t){const s=new d([]),o=await e._def.args.parseAsync(t,a).catch((e=>{throw s.addIssue(n(t,e)),s})),c=await Reflect.apply(i,this,o);return await e._def.returns._def.type.parseAsync(c,a).catch((e=>{throw s.addIssue(r(c,e)),s}))}))}{const e=this;return g((function(...t){const s=e._def.args.safeParse(t,a);if(!s.success)throw new d([n(t,s.error)]);const o=Reflect.apply(i,this,s.data),c=e._def.returns.safeParse(o,a);if(!c.success)throw new d([r(o,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Se({...this._def,args:we.create(e).rest(ce.create())})}returns(e){return new Se({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Se({args:e||we.create([]).rest(ce.create()),returns:t||ce.create(),typeName:Ve.ZodFunction,...j(n)})}}class Te extends A{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Te.create=(e,t)=>new Te({getter:e,typeName:Ve.ZodLazy,...j(t)});class Oe extends A{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),f}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ee(e,t){return new Ze({values:e,typeName:Ve.ZodEnum,...j(t)})}Oe.create=(e,t)=>new Oe({value:e,typeName:Ve.ZodLiteral,...j(t)});class Ze extends A{constructor(){super(...arguments),O.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{expected:n.joinValues(r),received:t.parsedType,code:o.invalid_type}),f}if(k(this,O)||x(this,O,new Set(this._def.values)),!k(this,O).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{received:t.data,code:o.invalid_enum_value,options:n}),f}return g(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ze.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ze.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}O=new WeakMap,Ze.create=Ee;class Ne extends A{constructor(){super(...arguments),E.set(this,void 0)}_parse(e){const t=n.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==s.string&&r.parsedType!==s.number){const e=n.objectValues(t);return h(r,{expected:n.joinValues(e),received:r.parsedType,code:o.invalid_type}),f}if(k(this,E)||x(this,E,new Set(n.getValidEnumValues(this._def.values))),!k(this,E).has(e.data)){const e=n.objectValues(t);return h(r,{received:r.data,code:o.invalid_enum_value,options:e}),f}return g(e.data)}get enum(){return this._def.values}}E=new WeakMap,Ne.create=(e,t)=>new Ne({values:e,typeName:Ve.ZodNativeEnum,...j(t)});class je extends A{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.promise&&!1===t.common.async)return h(t,{code:o.invalid_type,expected:s.promise,received:t.parsedType}),f;const n=t.parsedType===s.promise?t.data:Promise.resolve(t.data);return g(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}je.create=(e,t)=>new je({type:e,typeName:Ve.ZodPromise,...j(t)});class Ae extends A{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:e=>{h(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===a.type){const e=a.transform(r.data,s);if(r.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return f;const n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?f:"dirty"===n.status||"dirty"===t.value?y(n.value):n}));{if("aborted"===t.value)return f;const n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?f:"dirty"===n.status||"dirty"===t.value?y(n.value):n}}if("refinement"===a.type){const e=e=>{const t=a.refinement(e,s);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?f:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((n=>"aborted"===n.status?f:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===a.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!w(e))return e;const n=a.transform(e.value,s);if(n instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>w(e)?Promise.resolve(a.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}n.assertNever(a)}}Ae.create=(e,t,n)=>new Ae({schema:e,typeName:Ve.ZodEffects,effect:t,...j(n)}),Ae.createWithPreprocess=(e,t,n)=>new Ae({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...j(n)});class Ce extends A{_parse(e){return this._getType(e)===s.undefined?g(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ce.create=(e,t)=>new Ce({innerType:e,typeName:Ve.ZodOptional,...j(t)});class Pe extends A{_parse(e){return this._getType(e)===s.null?g(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pe.create=(e,t)=>new Pe({innerType:e,typeName:Ve.ZodNullable,...j(t)});class Ie extends A{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===s.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:Ve.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...j(t)});class Re extends A{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return b(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new d(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new d(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Re.create=(e,t)=>new Re({innerType:e,typeName:Ve.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...j(t)});class Fe extends A{_parse(e){if(this._getType(e)!==s.nan){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.nan,received:t.parsedType}),f}return{status:"valid",value:e.data}}}Fe.create=e=>new Fe({typeName:Ve.ZodNaN,...j(e)});const $e=Symbol("zod_brand");class Le extends A{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Me extends A{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?f:"dirty"===e.status?(t.dirty(),y(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?f:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Me({in:e,out:t,typeName:Ve.ZodPipeline})}}class De extends A{_parse(e){const t=this._def.innerType._parse(e),n=e=>(w(e)&&(e.value=Object.freeze(e.value)),e);return b(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Ue(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function ze(e,t={},n){return e?de.create().superRefine(((r,a)=>{var s,i;const o=e(r);if(o instanceof Promise)return o.then((e=>{var s,i;if(!e){const e=Ue(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}}));if(!o){const e=Ue(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}})):de.create()}De.create=(e,t)=>new De({innerType:e,typeName:Ve.ZodReadonly,...j(t)});const qe={object:me.lazycreate};var Ve,He;(He=Ve||(Ve={})).ZodString="ZodString",He.ZodNumber="ZodNumber",He.ZodNaN="ZodNaN",He.ZodBigInt="ZodBigInt",He.ZodBoolean="ZodBoolean",He.ZodDate="ZodDate",He.ZodSymbol="ZodSymbol",He.ZodUndefined="ZodUndefined",He.ZodNull="ZodNull",He.ZodAny="ZodAny",He.ZodUnknown="ZodUnknown",He.ZodNever="ZodNever",He.ZodVoid="ZodVoid",He.ZodArray="ZodArray",He.ZodObject="ZodObject",He.ZodUnion="ZodUnion",He.ZodDiscriminatedUnion="ZodDiscriminatedUnion",He.ZodIntersection="ZodIntersection",He.ZodTuple="ZodTuple",He.ZodRecord="ZodRecord",He.ZodMap="ZodMap",He.ZodSet="ZodSet",He.ZodFunction="ZodFunction",He.ZodLazy="ZodLazy",He.ZodLiteral="ZodLiteral",He.ZodEnum="ZodEnum",He.ZodEffects="ZodEffects",He.ZodNativeEnum="ZodNativeEnum",He.ZodOptional="ZodOptional",He.ZodNullable="ZodNullable",He.ZodDefault="ZodDefault",He.ZodCatch="ZodCatch",He.ZodPromise="ZodPromise",He.ZodBranded="ZodBranded",He.ZodPipeline="ZodPipeline",He.ZodReadonly="ZodReadonly";const Be=Q.create,We=te.create,Ke=Fe.create,Je=ne.create,Ye=re.create,Ge=ae.create,Xe=se.create,Qe=ie.create,et=oe.create,tt=de.create,nt=ce.create,rt=ue.create,at=le.create,st=pe.create,it=me.create,ot=me.strictCreate,dt=fe.create,ct=ge.create,ut=_e.create,lt=we.create,pt=be.create,ht=ke.create,mt=xe.create,ft=Se.create,yt=Te.create,gt=Oe.create,vt=Ze.create,_t=Ne.create,wt=je.create,bt=Ae.create,kt=Ce.create,xt=Pe.create,St=Ae.createWithPreprocess,Tt=Me.create,Ot={string:e=>Q.create({...e,coerce:!0}),number:e=>te.create({...e,coerce:!0}),boolean:e=>re.create({...e,coerce:!0}),bigint:e=>ne.create({...e,coerce:!0}),date:e=>ae.create({...e,coerce:!0})},Et=f;var Zt=Object.freeze({__proto__:null,defaultErrorMap:c,setErrorMap:function(e){u=e},getErrorMap:l,makeIssue:p,EMPTY_PATH:[],addIssueToContext:h,ParseStatus:m,INVALID:f,DIRTY:y,OK:g,isAborted:v,isDirty:_,isValid:w,isAsync:b,get util(){return n},get objectUtil(){return a},ZodParsedType:s,getParsedType:i,ZodType:A,datetimeRegex:Y,ZodString:Q,ZodNumber:te,ZodBigInt:ne,ZodBoolean:re,ZodDate:ae,ZodSymbol:se,ZodUndefined:ie,ZodNull:oe,ZodAny:de,ZodUnknown:ce,ZodNever:ue,ZodVoid:le,ZodArray:pe,ZodObject:me,ZodUnion:fe,ZodDiscriminatedUnion:ge,ZodIntersection:_e,ZodTuple:we,ZodRecord:be,ZodMap:ke,ZodSet:xe,ZodFunction:Se,ZodLazy:Te,ZodLiteral:Oe,ZodEnum:Ze,ZodNativeEnum:Ne,ZodPromise:je,ZodEffects:Ae,ZodTransformer:Ae,ZodOptional:Ce,ZodNullable:Pe,ZodDefault:Ie,ZodCatch:Re,ZodNaN:Fe,BRAND:$e,ZodBranded:Le,ZodPipeline:Me,ZodReadonly:De,custom:ze,Schema:A,ZodSchema:A,late:qe,get ZodFirstPartyTypeKind(){return Ve},coerce:Ot,any:tt,array:st,bigint:Je,boolean:Ye,date:Ge,discriminatedUnion:ct,effect:bt,enum:vt,function:ft,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>ze((t=>t instanceof e),t),intersection:ut,lazy:yt,literal:gt,map:ht,nan:Ke,nativeEnum:_t,never:rt,null:et,nullable:xt,number:We,object:it,oboolean:()=>Ye().optional(),onumber:()=>We().optional(),optional:kt,ostring:()=>Be().optional(),pipeline:Tt,preprocess:St,promise:wt,record:pt,set:mt,strictObject:ot,string:Be,symbol:Xe,transformer:bt,tuple:lt,undefined:Qe,union:dt,unknown:nt,void:at,NEVER:Et,ZodIssueCode:o,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:d});const Nt=Zt.object({detail:Zt.string()});function jt(e){if(!e)return"Unknown error";if(e instanceof Error){const t=Nt.safeParse(e.cause);return t.success?t.data.detail:function(e){const t=function(e){try{return JSON.parse(e)}catch{return e}}(e);if(!t)return e;const n=Nt.safeParse(t);return n.success?n.data.detail:e}(e.message)}if("object"==typeof e){const t=Nt.safeParse(e);if(t.success)return t.data.detail}try{return JSON.stringify(e)}catch{return String(e)}}const At=1e3;function Ct(e,t){const n=e.map((e=>`"${e}"`)).join(", ");return new Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function Pt(e={}){let t={};function n(e){t=e}let r,a={};function s(e){var t;a.unregisterHandler&&a.unregisterHandler(),a=e,null==(t=a.registerHandler)||t.call(a,_)}function i(e){r="function"!=typeof e?(t,n)=>{const r=e[t];if(r)return r(n);const a=e._;if(!a)throw new Error(`The requested method has no handler: ${t}`);return a(t,n)}:e}const{maxRequestTime:o=At}=e;e.transport&&s(e.transport),e.requestHandler&&i(e.requestHandler),e._debugHooks&&n(e._debugHooks);let d=0;const c=new Map,u=new Map;function l(e,...n){const r=n[0];return new Promise(((n,s)=>{var i;if(!a.send)throw Ct(["send"],"make requests");const l=d<=1e10?++d:d=0,p={type:"request",id:l,method:e,params:r};c.set(l,{resolve:n,reject:s}),o!==1/0&&u.set(l,setTimeout((()=>{u.delete(l),s(new Error("RPC request timed out."))}),o)),null==(i=t.onSend)||i.call(t,p),a.send(p)}))}const p=new Proxy(l,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>l(t,e)}),h=p;function m(e,...n){var r;const s=n[0];if(!a.send)throw Ct(["send"],"send messages");const i={type:"message",id:e,payload:s};null==(r=t.onSend)||r.call(t,i),a.send(i)}const f=new Proxy(m,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>m(t,e)}),y=f,g=new Map,v=new Set;async function _(e){var n,s;if(null==(n=t.onReceive)||n.call(t,e),!("type"in e))throw new Error("Message does not contain a type.");if("request"===e.type){if(!a.send||!r)throw Ct(["send","requestHandler"],"handle requests");const{id:n,method:o,params:d}=e;let c;try{c={type:"response",id:n,success:!0,payload:await r(o,d)}}catch(i){if(!(i instanceof Error))throw i;c={type:"response",id:n,success:!1,error:i.message}}return null==(s=t.onSend)||s.call(t,c),void a.send(c)}if("response"!==e.type){if("message"!==e.type)throw new Error(`Unexpected RPC message type: ${e.type}`);{for(const n of v)n(e.id,e.payload);const t=g.get(e.id);if(!t)return;for(const n of t)n(e.payload)}}else{const t=u.get(e.id);null!=t&&clearTimeout(t);const{resolve:n,reject:r}=c.get(e.id)??{};e.success?null==n||n(e.payload):null==r||r(new Error(e.error))}}return{setTransport:s,setRequestHandler:i,request:p,requestProxy:h,send:f,sendProxy:y,addMessageListener:function(e,t){var n;if(!a.registerHandler)throw Ct(["registerHandler"],"register message listeners");"*"!==e?(g.has(e)||g.set(e,new Set),null==(n=g.get(e))||n.add(t)):v.add(t)},removeMessageListener:function(e,t){var n,r;"*"!==e?(null==(n=g.get(e))||n.delete(t),0===(null==(r=g.get(e))?void 0:r.size)&&g.delete(e)):v.delete(t)},proxy:{send:y,request:h},_setDebugHooks:n}}const It="[transport-id]";function Rt(e,t={}){const{transportId:n,filter:r,remotePort:a}=t,s=e,i=a??e;let o;return{send(e){i.postMessage(function(e,t){const{transportId:n}=t;return null!=n?{[It]:n,data:e}:e}(e,{transportId:n}))},registerHandler(e){o=t=>{const a=t.data,[s,i]=function(e,t){const{transportId:n,filter:r}=t,a=null==r?void 0:r();if(null!=n&&null!=a)throw new Error("Cannot use both `transportId` and `filter` at the same time");let s=e;if(n){if(e[It]!==n)return[!0];s=e.data}return!1===a?[!0]:[!1,s]}(a,{transportId:n,filter:()=>null==r?void 0:r(t)});s||e(i)},s.addEventListener("message",o)},unregisterHandler(){o&&s.removeEventListener("message",o)}}}const Ft={debug:(...e)=>{},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)}},$t="undefined"!=typeof window&&window.Logger||Ft;var Lt,Mt=Object.defineProperty,Dt=(e,t)=>Mt(e,"name",{value:t,configurable:!0}),Ut=(Lt=function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Lt,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):Lt);function zt(e){return!isNaN(parseFloat(e))&&isFinite(e)}function qt(e){return e.charAt(0).toUpperCase()+e.substring(1)}function Vt(e){return function(){return this[e]}}Dt(zt,"_isNumber"),Dt(qt,"_capitalize"),Dt(Vt,"_getter");var Ht,Bt,Wt=["isConstructor","isEval","isNative","isToplevel"],Kt=["columnNumber","lineNumber"],Jt=["fileName","functionName","source"],Yt=Wt.concat(Kt,Jt,["args"],["evalOrigin"]);function Gt(e){if(e)for(var t=0;t<Yt.length;t++)void 0!==e[Yt[t]]&&this["set"+qt(Yt[t])](e[Yt[t]])}for(Dt(Gt,"StackFrame"),Gt.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof Gt)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new Gt(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",n=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+n+")":"[eval]:"+t+":"+n:r?r+" ("+e+":"+t+":"+n+")":e+":"+t+":"+n}},Gt.fromString=Dt((function(e){var t=e.indexOf("("),n=e.lastIndexOf(")"),r=e.substring(0,t),a=e.substring(t+1,n).split(","),s=e.substring(n+1);if(0===s.indexOf("@"))var i=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(s,""),o=i[1],d=i[2],c=i[3];return new Gt({functionName:r,args:a||void 0,fileName:o,lineNumber:d||void 0,columnNumber:c||void 0})}),"StackFrame$$fromString"),Ht=0;Ht<Wt.length;Ht++)Gt.prototype["get"+qt(Wt[Ht])]=Vt(Wt[Ht]),Gt.prototype["set"+qt(Wt[Ht])]=function(e){return function(t){this[e]=!!t}}(Wt[Ht]);for(Bt=0;Bt<Kt.length;Bt++)Gt.prototype["get"+qt(Kt[Bt])]=Vt(Kt[Bt]),Gt.prototype["set"+qt(Kt[Bt])]=function(e){return function(t){if(!zt(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(Kt[Bt]);for(Xt=0;Xt<Jt.length;Xt++)Gt.prototype["get"+qt(Jt[Xt])]=Vt(Jt[Xt]),Gt.prototype["set"+qt(Jt[Xt])]=function(e){return function(t){this[e]=String(t)}}(Jt[Xt]);var Xt,Qt=Gt;function en(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:Dt((function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")}),"ErrorStackParser$$parse"),extractLocation:Dt((function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]}),"ErrorStackParser$$extractLocation"),parseV8OrIE:Dt((function(t){return t.stack.split("\n").filter((function(t){return!!t.match(e)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;var r=this.extractLocation(n?n[1]:t),a=n&&t||void 0,s=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new Qt({functionName:a,fileName:s,lineNumber:r[1],columnNumber:r[2],source:e})}),this)}),"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:Dt((function(e){return e.stack.split("\n").filter((function(e){return!e.match(t)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Qt({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,a=this.extractLocation(e.replace(t,""));return new Qt({functionName:r,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:e})}),this)}),"ErrorStackParser$$parseFFOrSafari")}}Dt(en,"ErrorStackParser");var tn,nn,rn,an,sn,on,dn,cn,un,ln=new en,pn="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!process.browser,hn=pn&&typeof t<"u"&&typeof t.exports<"u"&&typeof Ut<"u"&&typeof __dirname<"u",mn=pn&&!hn,fn=typeof Deno<"u",yn=!pn&&!fn,gn=yn&&"object"==typeof window&&"object"==typeof document&&"function"==typeof document.createElement&&"sessionStorage"in window&&"function"!=typeof importScripts,vn=yn&&"function"==typeof importScripts&&"object"==typeof self;async function _n(){if(!pn||(tn=(await import("./__vite-browser-external-CIEyP2s7.js")).default,an=await import("./__vite-browser-external-CIEyP2s7.js"),sn=await import("./__vite-browser-external-CIEyP2s7.js"),rn=(await import("./__vite-browser-external-CIEyP2s7.js")).default,nn=await import("./__vite-browser-external-CIEyP2s7.js"),dn=nn.sep,typeof Ut<"u"))return;let e={fs:an,crypto:await import("./__vite-browser-external-CIEyP2s7.js"),ws:await import("./__vite-browser-external-CIEyP2s7.js"),child_process:await import("./__vite-browser-external-CIEyP2s7.js")};globalThis.require=function(t){return e[t]}}function wn(e,t){return nn.resolve(t||".",e)}function bn(e,t){return void 0===t&&(t=location),new URL(e,t).toString()}function kn(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:sn.readFile(e).then((e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength)))}}function xn(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}async function Sn(e,t){let{response:n,binary:r}=cn(e,t);if(r)return r;let a=await n;if(!a.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await a.arrayBuffer())}if("object"==typeof navigator&&"string"==typeof navigator.userAgent&&-1==navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Safari"),Dt(_n,"initNodeModules"),Dt(wn,"node_resolvePath"),Dt(bn,"browser_resolvePath"),on=pn?wn:bn,pn||(dn="/"),Dt(kn,"node_getBinaryResponse"),Dt(xn,"browser_getBinaryResponse"),cn=pn?kn:xn,Dt(Sn,"loadBinaryFile"),gn)un=Dt((async e=>await import(e)),"loadScript");else if(vn)un=Dt((async e=>{try{globalThis.importScripts(e)}catch(t){if(!(t instanceof TypeError))throw t;await import(e)}}),"loadScript");else{if(!pn)throw new Error("Cannot determine runtime environment");un=Tn}async function Tn(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?rn.runInThisContext(await(await fetch(e)).text()):await import(tn.pathToFileURL(e).href)}async function On(e){if(pn){await _n();let t=await sn.readFile(e,{encoding:"utf8"});return JSON.parse(t)}return await(await fetch(e)).json()}async function En(){if(hn)return __dirname;let e;try{throw new Error}catch(r){e=r}let t=ln.parse(e)[0].fileName;if(pn&&!t.startsWith("file://")&&(t=`file://${t}`),mn){let e=await import("./__vite-browser-external-CIEyP2s7.js");return(await import("./__vite-browser-external-CIEyP2s7.js")).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(dn);if(-1===n)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,n)}function Zn(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,a={DIR_MODE:16895,FILE_MODE:33279,mount:function(e){if(!e.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return n.mount.apply(null,arguments)},syncfs:async(e,t,n)=>{try{let r=a.getLocalSet(e),s=await a.getRemoteSet(e),i=t?s:r,o=t?r:s;await a.reconcile(e,i,o),n(null)}catch(r){n(r)}},getLocalSet:e=>{let n=Object.create(null);function a(e){return"."!==e&&".."!==e}function s(e){return t=>r.join2(e,t)}Dt(a,"isRealDir"),Dt(s,"toAbsolute");let i=t.readdir(e.mountpoint).filter(a).map(s(e.mountpoint));for(;i.length;){let e=i.pop(),r=t.stat(e);t.isDir(r.mode)&&i.push.apply(i,t.readdir(e).filter(a).map(s(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:"local",entries:n}},getRemoteSet:async e=>{let t=Object.create(null),n=await Nn(e.opts.fileSystemHandle);for(let[s,i]of n)"."!==s&&(t[r.join2(e.mountpoint,s)]={timestamp:"file"===i.kind?(await i.getFile()).lastModifiedDate:new Date,mode:"file"===i.kind?a.FILE_MODE:a.DIR_MODE});return{type:"remote",entries:t,handles:n}},loadLocalEntry:e=>{let r=t.lookupPath(e).node,a=t.stat(e);if(t.isDir(a.mode))return{timestamp:a.mtime,mode:a.mode};if(t.isFile(a.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:a.mtime,mode:a.mode,contents:r.contents};throw new Error("node type not supported")},storeLocalEntry:(e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else{if(!t.isFile(n.mode))throw new Error("node type not supported");t.writeFile(e,n.contents,{canOwn:!0})}t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},removeLocalEntry:e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},loadRemoteEntry:async e=>{if("file"===e.kind){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:a.FILE_MODE,timestamp:t.lastModifiedDate}}if("directory"===e.kind)return{mode:a.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+e.kind)},storeRemoteEntry:async(e,n,a)=>{let s=e.get(r.dirname(n)),i=t.isFile(a.mode)?await s.getFileHandle(r.basename(n),{create:!0}):await s.getDirectoryHandle(r.basename(n),{create:!0});if("file"===i.kind){let e=await i.createWritable();await e.write(a.contents),await e.close()}e.set(n,i)},removeRemoteEntry:async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},reconcile:async(e,n,s)=>{let i=0,o=[];Object.keys(n.entries).forEach((function(e){let r=n.entries[e],a=s.entries[e];(!a||t.isFile(r.mode)&&r.timestamp.getTime()>a.timestamp.getTime())&&(o.push(e),i++)})),o.sort();let d=[];if(Object.keys(s.entries).forEach((function(e){n.entries[e]||(d.push(e),i++)})),d.sort().reverse(),!i)return;let c="remote"===n.type?n.handles:s.handles;for(let t of o){let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);if("local"===s.type){let e=c.get(n),r=await a.loadRemoteEntry(e);a.storeLocalEntry(t,r)}else{let e=a.loadLocalEntry(t);await a.storeRemoteEntry(c,n,e)}}for(let t of d)if("local"===s.type)a.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);await a.removeRemoteEntry(c,n)}}};e.FS.filesystems.NATIVEFS_ASYNC=a}Dt(Tn,"nodeLoadScript"),Dt(On,"loadLockFile"),Dt(En,"calculateDirname"),Dt(Zn,"initializeNativeFS");var Nn=Dt((async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),"directory"===r.kind&&await n(r)}Dt(n,"collect"),await n(e);let r=new Map;r.set(".",e);for(let a of t){let t=(await e.resolve(a)).join("/");r.set(t,a)}return r}),"getFsHandles");function jn(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Rn(e),quit(e,n){throw t.exited={status:e,toThrow:n},n},print:e.stdout,printErr:e.stderr,arguments:e.args,API:{config:e},locateFile:t=>e.indexURL+t,instantiateWasm:Fn(e.indexURL)};return t}function An(e){return function(t){try{t.FS.mkdirTree(e)}catch(n){console.error(`Error occurred while making a home directory '${e}':`),console.error(n),console.error("Using '/' for a home directory instead"),e="/"}t.FS.chdir(e)}}function Cn(e){return function(t){Object.assign(t.ENV,e)}}function Pn(e){return t=>{for(let n of e)t.FS.mkdirTree(n),t.FS.mount(t.FS.filesystems.NODEFS,{root:n},n)}}function In(e){let t=Sn(e);return e=>{let n=e._py_version_major(),r=e._py_version_minor();e.FS.mkdirTree("/lib"),e.FS.mkdirTree(`/lib/python${n}.${r}/site-packages`),e.addRunDependency("install-stdlib"),t.then((t=>{e.FS.writeFile(`/lib/python${n}${r}.zip`,t)})).catch((e=>{console.error("Error occurred while installing the standard library:"),console.error(e)})).finally((()=>{e.removeRunDependency("install-stdlib")}))}}function Rn(e){let t;return t=null!=e.stdLibURL?e.stdLibURL:e.indexURL+"python_stdlib.zip",[In(t),An(e.env.HOME),Cn(e.env),Pn(e._node_mounts),Zn]}function Fn(e){if(typeof WasmOffsetConverter<"u")return;let{binary:t,response:n}=cn(e+"pyodide.asm.wasm");return function(e,r){return async function(){try{let a;a=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:s,module:i}=a;r(s,i)}catch(a){console.warn("wasm instantiation failed!"),console.warn(a)}}(),{}}}Dt(jn,"createSettings"),Dt(An,"createHomeDirectory"),Dt(Cn,"setEnvironment"),Dt(Pn,"mountLocalDirectories"),Dt(In,"installStdlib"),Dt(Rn,"getFileSystemInitializationFuncs"),Dt(Fn,"getInstantiateWasmFunc");var $n="0.27.3";async function Ln(e={}){var t,n;await _n();let r=e.indexURL||await En();r=on(r),r.endsWith("/")||(r+="/"),e.indexURL=r;let a={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:r+"pyodide-lock.json",args:[],_node_mounts:[],env:{},packageCacheDir:r,packages:[],enableRunUntilComplete:!1,checkAPIVersion:!0,BUILD_ID:"285ab4f913dd7f9216f3d9f225a9425b58b1c1cf058302946162bb3873fa1e70"},s=Object.assign(a,e);(t=s.env).HOME??(t.HOME="/home/pyodide"),(n=s.env).PYTHONINSPECT??(n.PYTHONINSPECT="1");let i,o=jn(s),d=o.API;if(d.lockFilePromise=On(s.lockFileURL),"function"!=typeof _createPyodideModule){let e=`${s.indexURL}pyodide.asm.js`;await un(e)}if(e._loadSnapshot){let t=await e._loadSnapshot;i=ArrayBuffer.isView(t)?t:new Uint8Array(t),o.noInitialRun=!0,o.INITIAL_MEMORY=i.length}let c,u=await _createPyodideModule(o);if(o.exited)throw o.exited.toThrow;if(e.pyproxyToStringRepr&&d.setPyProxyToStringMethod(!0),d.version!==$n&&s.checkAPIVersion)throw new Error(`Pyodide version does not match: '${$n}' <==> '${d.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);u.locateFile=e=>{throw new Error("Didn't expect to load any more file_packager files!")},i&&(c=d.restoreSnapshot(i));let l=d.finalizeBootstrap(c,e._snapshotDeserializer);return d.sys.path.insert(0,d.config.env.HOME),l.version.includes("dev")||d.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${l.version}/full/`),d._pyodide.set_excepthook(),await d.packageIndexReady,d.initializeStreams(s.stdin,s.stdout,s.stderr),l}function Mn(e){return e.FS}Dt(Ln,"loadPyodide");const Dn=e=>(new TextDecoder).decode(e),Un="notebook.py",zn="/marimo",qn=Un,Vn=e=>{const t=Mn(e);try{t.mkdirTree(zn)}catch{}t.chdir(zn)},Hn=e=>{Mn(e).mount(e.FS.filesystems.IDBFS,{root:"."},zn)},Bn=async e=>{await Yn(e,!0)},Wn=async e=>{await Yn(e,!1)},Kn=e=>{const t=Mn(e),n=`${zn}/${Un}`;return Dn(t.readFile(n))},Jn=e=>{const{pyodide:t,filename:n,code:r}=e,a=Mn(t);if(n&&n!==Un){const e=(e=>{try{return Dn(a.readFile(e))}catch{return null}})(n);if(e)return{code:e,filename:n}}return a.writeFile(Un,r),{code:r,filename:Un}};function Yn(e,t){return new Promise(((n,r)=>{Mn(e).syncfs(t,(e=>{e instanceof Error?r(e):n()}))}))}const Gn=new class{constructor(){this.spans=[]}startSpan(e,t={}){const n={name:e,startTime:Date.now(),attributes:t,end:(e="ok")=>this.endSpan(n,e)};return this.spans.push(n),n}endSpan(e,t="ok"){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,n={}){const r=this.startSpan(t||e.name,n);try{const t=e();return this.endSpan(r),t}catch(a){throw this.endSpan(r,"error"),a}}wrapAsync(e,t,n={}){return async(...r)=>{const a=this.startSpan(t||e.name,n);try{const t=await e(...r);return this.endSpan(a),t}catch(s){throw this.endSpan(a,"error"),s}}}logSpans(){}};globalThis.t=Gn;class Xn{constructor(){this.pyodide=null}get requirePyodide(){return function(e,t){if(!e)throw new Error(t)}(this.pyodide,"Pyodide not loaded"),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!Ln)throw new Error("loadPyodide is not defined");const t=Gn.startSpan("loadPyodide");try{const n=await Ln({packages:["micropip","marimo-base","Markdown","pymdown-extensions","narwhals","packaging"],_makeSnapshot:!1,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`});return this.pyodide=n,t.end("ok"),n}catch(n){throw $t.error("Failed to load Pyodide",n),n}}async mountFilesystem(e){const t=Gn.startSpan("mountFilesystem");return Vn(this.requirePyodide),Hn(this.requirePyodide),await Bn(this.requirePyodide),t.end("ok"),Jn({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){const{code:t,filename:n,onMessage:r,queryParameters:a,userConfig:s}=e;self.messenger={callback:r},self.query_params=a,self.user_config=s;const i=Gn.startSpan("startSession.runPython"),o=n||qn,[d,c,u]=this.requirePyodide.runPython(`\n print("[py] Starting marimo...")\n import asyncio\n import js\n from marimo._pyodide.bootstrap import create_session, instantiate\n\n assert js.messenger, "messenger is not defined"\n assert js.query_params, "query_params is not defined"\n\n session, bridge = create_session(\n filename="${o}",\n query_params=js.query_params.to_py(),\n message_callback=js.messenger.callback,\n user_config=js.user_config.to_py(),\n )\n\n def init(auto_instantiate=True):\n instantiate(session, auto_instantiate)\n asyncio.create_task(session.start())\n\n # Find the packages to install\n with open("${o}", "r") as f:\n packages = session.find_packages(f.read())\n\n bridge, init, packages`);i.end();const l=new Set(u.toJs());return this.loadNotebookDeps(t,l).then((()=>c(s.runtime.auto_instantiate))),d}async loadNotebookDeps(e,t){const n=this.requirePyodide;e.includes("mo.sql")&&(e="import sqlglot\n"+(e="import duckdb\n"+(e=`import pandas\n${e}`))),e="import pyodide_http\n"+(e="import jedi\n"+(e="import pygments\n"+(e=`import docutils\n${e}`)));const r=[...t];let a=Gn.startSpan("pyodide.loadPackage");await n.loadPackagesFromImports(e,{errorCallback:$t.error,messageCallback:$t.log}),a.end(),a=Gn.startSpan("micropip.install");const s=r.filter((e=>!n.loadedPackages[e]));s.length>0&&await n.runPythonAsync(`\n import micropip\n import sys\n # Filter out builtins\n missing = [p for p in ${JSON.stringify(s)} if p not in sys.modules]\n if len(missing) > 0:\n print("Loading from micropip:", missing)\n await micropip.install(missing)\n `).catch((e=>{$t.error("Failed to load packages from micropip",e)})),a.end()}}const Qn=async function(){var e;try{const t=self.name,n=function(e){return e.includes("dev"),`v${$n}`}(t),r=await async function(e){try{return await import(`/wasm/controller.js?version=${e}`)}catch{return new Xn}}(t);self.controller=r,self.pyodide=await r.bootstrap({version:t,pyodideVersion:n}),await(null==(e=r.mountFilesystem)?void 0:e.call(r,{code:"",filename:null})),tr.send.initialized({})}catch(t){$t.error("Error bootstrapping",t),tr.send.initializedError({error:jt(t)})}}(),er={readFile:async e=>(await Qn,Dn(self.pyodide.FS.readFile(e))),readNotebook:async()=>(await Qn,Kn(self.pyodide)),saveNotebook:async e=>{await Qn;const t=self.pyodide.runPython("\n from marimo._pyodide.bootstrap import save_file\n\n save_file\n ");await t(JSON.stringify(e),qn),await Wn(self.pyodide)}},tr=function(e){return Pt(e)}({transport:(nr={transportId:"marimo-transport"},Rt(self,nr)),requestHandler:er});var nr;tr.send("ready",{})}},function(){return t||(0,e[n(e)[0]])((t={exports:{}}).exports,t),t.exports});export default r();