@recombine-ai/bosun 0.1.9 → 0.2.0-draft
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/bosun.js +9 -8
- package/build/academy/academy.ts +584 -0
- package/build/academy/csv/index.ts +155 -0
- package/build/academy/data.ts +299 -0
- package/build/academy/emulate-agents.ts +129 -0
- package/build/academy/google-sheets/index.ts +187 -0
- package/build/academy/runPromptTests.cli.ts +99 -0
- package/build/academy/suite.ts +99 -0
- package/build/client/_app/immutable/assets/0.3Ve1RxLg.css +1 -0
- package/build/client/_app/immutable/assets/0.3Ve1RxLg.css.br +0 -0
- package/build/client/_app/immutable/assets/0.3Ve1RxLg.css.gz +0 -0
- package/build/client/_app/immutable/assets/3.C7pCuiHL.css +1 -0
- package/build/client/_app/immutable/assets/3.C7pCuiHL.css.br +0 -0
- package/build/client/_app/immutable/assets/3.C7pCuiHL.css.gz +0 -0
- package/build/client/_app/immutable/assets/4.Baezuvdj.css +1 -0
- package/build/client/_app/immutable/assets/4.Baezuvdj.css.br +0 -0
- package/build/client/_app/immutable/assets/4.Baezuvdj.css.gz +0 -0
- package/build/client/_app/immutable/assets/6.CebW_jOJ.css +1 -0
- package/build/client/_app/immutable/assets/6.CebW_jOJ.css.br +0 -0
- package/build/client/_app/immutable/assets/6.CebW_jOJ.css.gz +0 -0
- package/build/client/_app/immutable/assets/8.f3T7i0UW.css +1 -0
- package/build/client/_app/immutable/assets/8.f3T7i0UW.css.br +0 -0
- package/build/client/_app/immutable/assets/8.f3T7i0UW.css.gz +0 -0
- package/build/client/_app/immutable/assets/AgentSidebar.BEG0l2mN.css +1 -0
- package/build/client/_app/immutable/assets/AgentSidebar.BEG0l2mN.css.br +0 -0
- package/build/client/_app/immutable/assets/AgentSidebar.BEG0l2mN.css.gz +0 -0
- package/build/client/_app/immutable/assets/Link.D7uHGZ0C.css +1 -0
- package/build/client/_app/immutable/assets/Link.D7uHGZ0C.css.br +1 -0
- package/build/client/_app/immutable/assets/Link.D7uHGZ0C.css.gz +0 -0
- package/build/client/_app/immutable/assets/Tab.DrtF13Tg.css +1 -0
- package/build/client/_app/immutable/assets/Tab.DrtF13Tg.css.br +0 -0
- package/build/client/_app/immutable/assets/Tab.DrtF13Tg.css.gz +0 -0
- package/build/client/_app/immutable/chunks/B6Eu_a6G.js +8 -0
- package/build/client/_app/immutable/chunks/B6Eu_a6G.js.br +0 -0
- package/build/client/_app/immutable/chunks/B6Eu_a6G.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B946i1vX.js +1 -0
- package/build/client/_app/immutable/chunks/B946i1vX.js.br +0 -0
- package/build/client/_app/immutable/chunks/B946i1vX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BDr6IUDE.js +1 -0
- package/build/client/_app/immutable/chunks/BDr6IUDE.js.br +0 -0
- package/build/client/_app/immutable/chunks/BDr6IUDE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BJ0PAzRz.js +1 -0
- package/build/client/_app/immutable/chunks/BJ0PAzRz.js.br +0 -0
- package/build/client/_app/immutable/chunks/BJ0PAzRz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BQsXEsya.js +2 -0
- package/build/client/_app/immutable/chunks/BQsXEsya.js.br +0 -0
- package/build/client/_app/immutable/chunks/BQsXEsya.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BVH8cl8Q.js +1 -0
- package/build/client/_app/immutable/chunks/BVH8cl8Q.js.br +0 -0
- package/build/client/_app/immutable/chunks/BVH8cl8Q.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bckf35or.js +1 -0
- package/build/client/_app/immutable/chunks/Bckf35or.js.br +1 -0
- package/build/client/_app/immutable/chunks/Bckf35or.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BcyK4bvI.js +1 -0
- package/build/client/_app/immutable/chunks/BcyK4bvI.js.br +0 -0
- package/build/client/_app/immutable/chunks/BcyK4bvI.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BpsvkpCa.js +1 -0
- package/build/client/_app/immutable/chunks/BpsvkpCa.js.br +0 -0
- package/build/client/_app/immutable/chunks/BpsvkpCa.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C7b8kjFl.js +33 -0
- package/build/client/_app/immutable/chunks/C7b8kjFl.js.br +0 -0
- package/build/client/_app/immutable/chunks/C7b8kjFl.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{D5O98MXA.js → C9ihsQgF.js} +2 -2
- package/build/client/_app/immutable/chunks/C9ihsQgF.js.br +6 -0
- package/build/client/_app/immutable/chunks/C9ihsQgF.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CEHtmspK.js +1 -0
- package/build/client/_app/immutable/chunks/CEHtmspK.js.br +0 -0
- package/build/client/_app/immutable/chunks/CEHtmspK.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CHop8m-3.js +1 -0
- package/build/client/_app/immutable/chunks/CHop8m-3.js.br +0 -0
- package/build/client/_app/immutable/chunks/CHop8m-3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CUWa2xqt.js +1 -0
- package/build/client/_app/immutable/chunks/CUWa2xqt.js.br +0 -0
- package/build/client/_app/immutable/chunks/CUWa2xqt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ClfaR3Y2.js +1 -0
- package/build/client/_app/immutable/chunks/ClfaR3Y2.js.br +0 -0
- package/build/client/_app/immutable/chunks/ClfaR3Y2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DAgYAbDT.js +3 -0
- package/build/client/_app/immutable/chunks/DAgYAbDT.js.br +0 -0
- package/build/client/_app/immutable/chunks/DAgYAbDT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DBCXNg0T.js +1 -0
- package/build/client/_app/immutable/chunks/DBCXNg0T.js.br +0 -0
- package/build/client/_app/immutable/chunks/DBCXNg0T.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DDncCuU5.js +1 -0
- package/build/client/_app/immutable/chunks/DDncCuU5.js.br +2 -0
- package/build/client/_app/immutable/chunks/DDncCuU5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DHQ8_yIz.js +1 -0
- package/build/client/_app/immutable/chunks/DHQ8_yIz.js.br +0 -0
- package/build/client/_app/immutable/chunks/DHQ8_yIz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Deb2U3a-.js +1 -0
- package/build/client/_app/immutable/chunks/Deb2U3a-.js.br +0 -0
- package/build/client/_app/immutable/chunks/Deb2U3a-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{B8bx6-qu.js → DgNsppMf.js} +1 -1
- package/build/client/_app/immutable/chunks/DgNsppMf.js.br +0 -0
- package/build/client/_app/immutable/chunks/DgNsppMf.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DgSSnt2u.js +1 -0
- package/build/client/_app/immutable/chunks/DgSSnt2u.js.br +0 -0
- package/build/client/_app/immutable/chunks/DgSSnt2u.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dr0H-PA9.js +1 -0
- package/build/client/_app/immutable/chunks/Dr0H-PA9.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dr0H-PA9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/HA3qddzj.js +1 -0
- package/build/client/_app/immutable/chunks/HA3qddzj.js.br +0 -0
- package/build/client/_app/immutable/chunks/HA3qddzj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/LPKWlFs0.js +1 -0
- package/build/client/_app/immutable/chunks/LPKWlFs0.js.br +3 -0
- package/build/client/_app/immutable/chunks/LPKWlFs0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/VpPuF4LW.js +3 -0
- package/build/client/_app/immutable/chunks/VpPuF4LW.js.br +0 -0
- package/build/client/_app/immutable/chunks/VpPuF4LW.js.gz +0 -0
- package/build/client/_app/immutable/chunks/XyRovF4A.js +1 -0
- package/build/client/_app/immutable/chunks/XyRovF4A.js.br +0 -0
- package/build/client/_app/immutable/chunks/XyRovF4A.js.gz +0 -0
- package/build/client/_app/immutable/chunks/mRVZsLQ4.js +1 -0
- package/build/client/_app/immutable/chunks/mRVZsLQ4.js.br +2 -0
- package/build/client/_app/immutable/chunks/mRVZsLQ4.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.CVDHq7dN.js +2 -0
- package/build/client/_app/immutable/entry/app.CVDHq7dN.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CVDHq7dN.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.a4wXr-rh.js +1 -0
- package/build/client/_app/immutable/entry/start.a4wXr-rh.js.br +2 -0
- package/build/client/_app/immutable/entry/start.a4wXr-rh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.q5P1PqkU.js +3 -0
- package/build/client/_app/immutable/nodes/0.q5P1PqkU.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.q5P1PqkU.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.TfmDsqd-.js +1 -0
- package/build/client/_app/immutable/nodes/1.TfmDsqd-.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.TfmDsqd-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.BpXsBlTN.js +1 -0
- package/build/client/_app/immutable/nodes/10.BpXsBlTN.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.BpXsBlTN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.Bs_5a_H1.js +1 -0
- package/build/client/_app/immutable/nodes/11.Bs_5a_H1.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.Bs_5a_H1.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.BWtLQzzv.js +3 -0
- package/build/client/_app/immutable/nodes/2.BWtLQzzv.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.BWtLQzzv.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.BlYIVobe.js +1 -0
- package/build/client/_app/immutable/nodes/3.BlYIVobe.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BlYIVobe.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.DMboagHp.js +38 -0
- package/build/client/_app/immutable/nodes/4.DMboagHp.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DMboagHp.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.DJDEfbU1.js +1 -0
- package/build/client/_app/immutable/nodes/5.DJDEfbU1.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.DJDEfbU1.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.Co1n7leD.js +12 -0
- package/build/client/_app/immutable/nodes/6.Co1n7leD.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.Co1n7leD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.3clSez0f.js +1 -0
- package/build/client/_app/immutable/nodes/7.3clSez0f.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.3clSez0f.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.D4xImLsM.js +1 -0
- package/build/client/_app/immutable/nodes/8.D4xImLsM.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.D4xImLsM.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.C1KWPSTf.js +1 -0
- package/build/client/_app/immutable/nodes/9.C1KWPSTf.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.C1KWPSTf.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/0-CgyQG-Vf.js +9 -0
- package/build/server/chunks/0-CgyQG-Vf.js.map +1 -0
- package/build/server/chunks/1-DACiLfsu.js +9 -0
- package/build/server/chunks/{1-Cwk3hpe9.js.map → 1-DACiLfsu.js.map} +1 -1
- package/build/server/chunks/10-zMqY0bCj.js +9 -0
- package/build/server/chunks/10-zMqY0bCj.js.map +1 -0
- package/build/server/chunks/11-B7cPB4ip.js +9 -0
- package/build/server/chunks/11-B7cPB4ip.js.map +1 -0
- package/build/server/chunks/2-uTf78dNT.js +9 -0
- package/build/server/chunks/2-uTf78dNT.js.map +1 -0
- package/build/server/chunks/3-DOOLRXaZ.js +9 -0
- package/build/server/chunks/3-DOOLRXaZ.js.map +1 -0
- package/build/server/chunks/4-CLK_BxY0.js +9 -0
- package/build/server/chunks/4-CLK_BxY0.js.map +1 -0
- package/build/server/chunks/5-DfZ6yJrz.js +9 -0
- package/build/server/chunks/5-DfZ6yJrz.js.map +1 -0
- package/build/server/chunks/6-B2BoZUr6.js +22 -0
- package/build/server/chunks/6-B2BoZUr6.js.map +1 -0
- package/build/server/chunks/{5-p3BDfNc2.js → 7-DmgY6drC.js} +6 -6
- package/build/server/chunks/7-DmgY6drC.js.map +1 -0
- package/build/server/chunks/8-Bku8n4Ko.js +9 -0
- package/build/server/chunks/8-Bku8n4Ko.js.map +1 -0
- package/build/server/chunks/{7-C_AGqUAU.js → 9-nwlpMH7t.js} +5 -5
- package/build/server/chunks/9-nwlpMH7t.js.map +1 -0
- package/build/server/chunks/AgentSidebar-CZIBBsSh.js +141 -0
- package/build/server/chunks/AgentSidebar-CZIBBsSh.js.map +1 -0
- package/build/server/chunks/Button-OUO_MioZ.js +44 -0
- package/build/server/chunks/Button-OUO_MioZ.js.map +1 -0
- package/build/server/chunks/ContextEditor-stz14-2o.js +48 -0
- package/build/server/chunks/ContextEditor-stz14-2o.js.map +1 -0
- package/build/server/chunks/{Dropdown-B-UCol1v.js → Dropdown-BTr_XiAm.js} +2 -2
- package/build/server/chunks/Dropdown-BTr_XiAm.js.map +1 -0
- package/build/server/chunks/{Input-DLAEH36y.js → Input-B_jIG2tD.js} +2 -2
- package/build/server/chunks/Input-B_jIG2tD.js.map +1 -0
- package/build/server/chunks/{Icon-DDJ9D6Sq.js → Link-DaOJVbdB.js} +25 -42
- package/build/server/chunks/Link-DaOJVbdB.js.map +1 -0
- package/build/server/chunks/{Panel-KZDoG3_L.js → Panel-CmvYn6IC.js} +2 -2
- package/build/server/chunks/Panel-CmvYn6IC.js.map +1 -0
- package/build/server/chunks/Tab-n348Mfiq.js +84 -0
- package/build/server/chunks/Tab-n348Mfiq.js.map +1 -0
- package/build/server/chunks/_layout.svelte-CP6tz6DB.js +62 -0
- package/build/server/chunks/_layout.svelte-CP6tz6DB.js.map +1 -0
- package/build/server/chunks/{_layout.svelte-BoAJDYC1.js → _layout.svelte-CvGX8M4U.js} +68 -18
- package/build/server/chunks/_layout.svelte-CvGX8M4U.js.map +1 -0
- package/build/server/chunks/{_page.svelte-CdEfc0bc.js → _page.svelte-AHHrodUG.js} +94 -86
- package/build/server/chunks/_page.svelte-AHHrodUG.js.map +1 -0
- package/build/server/chunks/_page.svelte-Bm-iBjXM.js +80 -0
- package/build/server/chunks/_page.svelte-Bm-iBjXM.js.map +1 -0
- package/build/server/chunks/_page.svelte-D5Xqk3cI.js +52 -0
- package/build/server/chunks/_page.svelte-D5Xqk3cI.js.map +1 -0
- package/build/server/chunks/{_page.svelte-CNhxx79k.js → _page.svelte-DKBFi-JF.js} +202 -240
- package/build/server/chunks/_page.svelte-DKBFi-JF.js.map +1 -0
- package/build/server/chunks/{_page.svelte-DQUdiD4S.js → _page.svelte-DSefP5E9.js} +6 -5
- package/build/server/chunks/_page.svelte-DSefP5E9.js.map +1 -0
- package/build/server/chunks/{_page.svelte-kLLxi8vG.js → _page.svelte-Dldwxu4m.js} +28 -6
- package/build/server/chunks/_page.svelte-Dldwxu4m.js.map +1 -0
- package/build/server/chunks/{_page.svelte-Cc0DAAQW.js → _page.svelte-lU1-SHJj.js} +5 -4
- package/build/server/chunks/_page.svelte-lU1-SHJj.js.map +1 -0
- package/build/server/chunks/{_page.svelte-nsIWq28L.js → _page.svelte-vGR-ltk7.js} +7 -27
- package/build/server/chunks/_page.svelte-vGR-ltk7.js.map +1 -0
- package/build/server/chunks/{_server.ts-d0Tii8aZ.js → _server.ts-3D9tpnMZ.js} +3 -2
- package/build/server/chunks/_server.ts-3D9tpnMZ.js.map +1 -0
- package/build/server/chunks/{_server.ts-BBxm_xV1.js → _server.ts-B56wS_0L.js} +4 -1
- package/build/server/chunks/_server.ts-B56wS_0L.js.map +1 -0
- package/build/server/chunks/{_server.ts-CLKPeFqF.js → _server.ts-BCBY3OIY.js} +3 -2
- package/build/server/chunks/_server.ts-BCBY3OIY.js.map +1 -0
- package/build/server/chunks/{_server.ts-BmZBSYvJ.js → _server.ts-BCfiuZgS.js} +19 -8
- package/build/server/chunks/_server.ts-BCfiuZgS.js.map +1 -0
- package/build/server/chunks/_server.ts-BkL-sSQA.js.map +1 -1
- package/build/server/chunks/{_server.ts-DEHw6op6.js → _server.ts-D0C3cRDU.js} +3 -2
- package/build/server/chunks/_server.ts-D0C3cRDU.js.map +1 -0
- package/build/server/chunks/{_server.ts-BYDdbqNr.js → _server.ts-Dc989xbA.js} +3 -2
- package/build/server/chunks/_server.ts-Dc989xbA.js.map +1 -0
- package/build/server/chunks/_server.ts-Ddto8x_p.js.map +1 -1
- package/build/server/chunks/{_server.ts-BIcKE9RQ.js → _server.ts-I-18L-Sg.js} +3 -2
- package/build/server/chunks/_server.ts-I-18L-Sg.js.map +1 -0
- package/build/server/chunks/_server.ts-iuWHhHZx.js +629 -0
- package/build/server/chunks/_server.ts-iuWHhHZx.js.map +1 -0
- package/build/server/chunks/agents-context-C4MM7lSl.js +6 -0
- package/build/server/chunks/agents-context-C4MM7lSl.js.map +1 -0
- package/build/server/chunks/{client2-tp0-IQU0.js → client-BhnXtftB.js} +6 -29
- package/build/server/chunks/client-BhnXtftB.js.map +1 -0
- package/build/server/chunks/{index2-CVBATI2G.js → context-Dy9MY1Z0.js} +253 -965
- package/build/server/chunks/context-Dy9MY1Z0.js.map +1 -0
- package/build/server/chunks/{data-CbXDDeDB.js → data-BltJc-uF.js} +29 -89
- package/build/server/chunks/data-BltJc-uF.js.map +1 -0
- package/build/server/chunks/error.svelte-Cn6umEWY.js +14 -0
- package/build/server/chunks/error.svelte-Cn6umEWY.js.map +1 -0
- package/build/server/chunks/errors-B8liwVcD.js +17 -0
- package/build/server/chunks/errors-B8liwVcD.js.map +1 -0
- package/build/server/chunks/{events-A18hGvKp.js → events-BFcZEt66.js} +3 -9
- package/build/server/chunks/events-BFcZEt66.js.map +1 -0
- package/build/server/chunks/{index-BoStl4QO.js → index-C0ds_eUO.js} +8 -3
- package/build/server/chunks/index-C0ds_eUO.js.map +1 -0
- package/build/server/chunks/index-server-CMCI3p2Y.js +18 -0
- package/build/server/chunks/index-server-CMCI3p2Y.js.map +1 -0
- package/build/server/chunks/index2-B1rkViAM.js +860 -0
- package/build/server/chunks/index2-B1rkViAM.js.map +1 -0
- package/build/server/chunks/index3-CVYj52gl.js.map +1 -1
- package/build/server/chunks/index4-DSZuWW-A.js +47 -0
- package/build/server/chunks/index4-DSZuWW-A.js.map +1 -0
- package/build/server/chunks/main-DL75vM4l.js +2250 -0
- package/build/server/chunks/main-DL75vM4l.js.map +1 -0
- package/build/server/chunks/{state.svelte-Dze7OxC_.js → state.svelte-CBgyohE1.js} +2 -2
- package/build/server/chunks/state.svelte-CBgyohE1.js.map +1 -0
- package/build/server/chunks/suite-4--Gr0jF.js +60 -0
- package/build/server/chunks/suite-4--Gr0jF.js.map +1 -0
- package/build/server/chunks/ws-client-CyJORDFw.js +98 -0
- package/build/server/chunks/ws-client-CyJORDFw.js.map +1 -0
- package/build/server/index.js +167 -90
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +83 -75
- package/build/server/manifest.js.map +1 -1
- package/package.json +3 -1
- package/src/ws-server/projects.ts +82 -9
- package/build/client/_app/immutable/assets/0.7xdY7TSX.css +0 -1
- package/build/client/_app/immutable/assets/0.7xdY7TSX.css.br +0 -0
- package/build/client/_app/immutable/assets/0.7xdY7TSX.css.gz +0 -0
- package/build/client/_app/immutable/assets/10.C1o6a69m.css +0 -1
- package/build/client/_app/immutable/assets/10.C1o6a69m.css.br +0 -1
- package/build/client/_app/immutable/assets/10.C1o6a69m.css.gz +0 -0
- package/build/client/_app/immutable/assets/4.858mUNwe.css +0 -1
- package/build/client/_app/immutable/assets/4.858mUNwe.css.br +0 -0
- package/build/client/_app/immutable/assets/4.858mUNwe.css.gz +0 -0
- package/build/client/_app/immutable/assets/6.CD1QZ0pt.css +0 -1
- package/build/client/_app/immutable/assets/6.CD1QZ0pt.css.br +0 -0
- package/build/client/_app/immutable/assets/6.CD1QZ0pt.css.gz +0 -0
- package/build/client/_app/immutable/chunks/2PVbuV1X.js +0 -1
- package/build/client/_app/immutable/chunks/2PVbuV1X.js.br +0 -1
- package/build/client/_app/immutable/chunks/2PVbuV1X.js.gz +0 -0
- package/build/client/_app/immutable/chunks/9OGf6H2n.js +0 -1
- package/build/client/_app/immutable/chunks/9OGf6H2n.js.br +0 -2
- package/build/client/_app/immutable/chunks/9OGf6H2n.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B8bx6-qu.js.br +0 -1
- package/build/client/_app/immutable/chunks/B8bx6-qu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BDTuVTVZ.js +0 -1
- package/build/client/_app/immutable/chunks/BDTuVTVZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BDTuVTVZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BTGV3Gq0.js +0 -8
- package/build/client/_app/immutable/chunks/BTGV3Gq0.js.br +0 -0
- package/build/client/_app/immutable/chunks/BTGV3Gq0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BUoURvZ_.js +0 -1
- package/build/client/_app/immutable/chunks/BUoURvZ_.js.br +0 -0
- package/build/client/_app/immutable/chunks/BUoURvZ_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BdOqksoz.js +0 -1
- package/build/client/_app/immutable/chunks/BdOqksoz.js.br +0 -0
- package/build/client/_app/immutable/chunks/BdOqksoz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Be371ezp.js +0 -2
- package/build/client/_app/immutable/chunks/Be371ezp.js.br +0 -0
- package/build/client/_app/immutable/chunks/Be371ezp.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bmx4ManB.js +0 -1
- package/build/client/_app/immutable/chunks/Bmx4ManB.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bmx4ManB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C2Y9UxTx.js +0 -1
- package/build/client/_app/immutable/chunks/C2Y9UxTx.js.br +0 -0
- package/build/client/_app/immutable/chunks/C2Y9UxTx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C681lv5i.js +0 -3
- package/build/client/_app/immutable/chunks/C681lv5i.js.br +0 -0
- package/build/client/_app/immutable/chunks/C681lv5i.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CYuXdPQc.js +0 -1
- package/build/client/_app/immutable/chunks/CYuXdPQc.js.br +0 -0
- package/build/client/_app/immutable/chunks/CYuXdPQc.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CpZGG0E7.js +0 -1
- package/build/client/_app/immutable/chunks/CpZGG0E7.js.br +0 -0
- package/build/client/_app/immutable/chunks/CpZGG0E7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CpdYAO0i.js +0 -1
- package/build/client/_app/immutable/chunks/CpdYAO0i.js.br +0 -0
- package/build/client/_app/immutable/chunks/CpdYAO0i.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CtpS-ZbM.js +0 -1
- package/build/client/_app/immutable/chunks/CtpS-ZbM.js.br +0 -0
- package/build/client/_app/immutable/chunks/CtpS-ZbM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D5O98MXA.js.br +0 -0
- package/build/client/_app/immutable/chunks/D5O98MXA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DIiF2tGe.js +0 -1
- package/build/client/_app/immutable/chunks/DIiF2tGe.js.br +0 -0
- package/build/client/_app/immutable/chunks/DIiF2tGe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D_4dC3JZ.js +0 -1
- package/build/client/_app/immutable/chunks/D_4dC3JZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/D_4dC3JZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DveC87gn.js +0 -33
- package/build/client/_app/immutable/chunks/DveC87gn.js.br +0 -0
- package/build/client/_app/immutable/chunks/DveC87gn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ISgeSat5.js +0 -1
- package/build/client/_app/immutable/chunks/ISgeSat5.js.br +0 -0
- package/build/client/_app/immutable/chunks/ISgeSat5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/uzczSfVx.js +0 -3
- package/build/client/_app/immutable/chunks/uzczSfVx.js.br +0 -0
- package/build/client/_app/immutable/chunks/uzczSfVx.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.CSVt0Fuk.js +0 -2
- package/build/client/_app/immutable/entry/app.CSVt0Fuk.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CSVt0Fuk.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BQnEMq3G.js +0 -1
- package/build/client/_app/immutable/entry/start.BQnEMq3G.js.br +0 -2
- package/build/client/_app/immutable/entry/start.BQnEMq3G.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.BFGm6g4L.js +0 -1
- package/build/client/_app/immutable/nodes/0.BFGm6g4L.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.BFGm6g4L.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.B_l4Mw8E.js +0 -1
- package/build/client/_app/immutable/nodes/1.B_l4Mw8E.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.B_l4Mw8E.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.Bdd6Le3Q.js +0 -1
- package/build/client/_app/immutable/nodes/10.Bdd6Le3Q.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.Bdd6Le3Q.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DPpr5BK7.js +0 -3
- package/build/client/_app/immutable/nodes/2.DPpr5BK7.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DPpr5BK7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.BokOq116.js +0 -12
- package/build/client/_app/immutable/nodes/4.BokOq116.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.BokOq116.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.BqyMuHwQ.js +0 -1
- package/build/client/_app/immutable/nodes/5.BqyMuHwQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.BqyMuHwQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.7qo5WmXj.js +0 -38
- package/build/client/_app/immutable/nodes/6.7qo5WmXj.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.7qo5WmXj.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.CvDadi99.js +0 -1
- package/build/client/_app/immutable/nodes/7.CvDadi99.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CvDadi99.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.CLZUC68b.js +0 -1
- package/build/client/_app/immutable/nodes/8.CLZUC68b.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.CLZUC68b.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.BCC-2Any.js +0 -1
- package/build/client/_app/immutable/nodes/9.BCC-2Any.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.BCC-2Any.js.gz +0 -0
- package/build/server/chunks/0-DMd6Dk79.js +0 -9
- package/build/server/chunks/0-DMd6Dk79.js.map +0 -1
- package/build/server/chunks/1-Cwk3hpe9.js +0 -9
- package/build/server/chunks/10-Ci_AhluU.js +0 -9
- package/build/server/chunks/10-Ci_AhluU.js.map +0 -1
- package/build/server/chunks/2-BLxdw-8l.js +0 -9
- package/build/server/chunks/2-BLxdw-8l.js.map +0 -1
- package/build/server/chunks/3-DGFu_uy6.js +0 -19
- package/build/server/chunks/3-DGFu_uy6.js.map +0 -1
- package/build/server/chunks/4-MwbWFUCO.js +0 -22
- package/build/server/chunks/4-MwbWFUCO.js.map +0 -1
- package/build/server/chunks/5-p3BDfNc2.js.map +0 -1
- package/build/server/chunks/6-CK3NUjnH.js +0 -9
- package/build/server/chunks/6-CK3NUjnH.js.map +0 -1
- package/build/server/chunks/7-C_AGqUAU.js.map +0 -1
- package/build/server/chunks/8-Dr1vf8BH.js +0 -9
- package/build/server/chunks/8-Dr1vf8BH.js.map +0 -1
- package/build/server/chunks/9-DAsQ5XZx.js +0 -9
- package/build/server/chunks/9-DAsQ5XZx.js.map +0 -1
- package/build/server/chunks/AgentDropdown-C3XtwkaV.js +0 -162
- package/build/server/chunks/AgentDropdown-C3XtwkaV.js.map +0 -1
- package/build/server/chunks/Dropdown-B-UCol1v.js.map +0 -1
- package/build/server/chunks/Icon-DDJ9D6Sq.js.map +0 -1
- package/build/server/chunks/Input-DLAEH36y.js.map +0 -1
- package/build/server/chunks/Panel-KZDoG3_L.js.map +0 -1
- package/build/server/chunks/_layout.svelte-22nlfSFq.js +0 -9
- package/build/server/chunks/_layout.svelte-22nlfSFq.js.map +0 -1
- package/build/server/chunks/_layout.svelte-BoAJDYC1.js.map +0 -1
- package/build/server/chunks/_page.svelte-CNhxx79k.js.map +0 -1
- package/build/server/chunks/_page.svelte-Cc0DAAQW.js.map +0 -1
- package/build/server/chunks/_page.svelte-CdEfc0bc.js.map +0 -1
- package/build/server/chunks/_page.svelte-DQUdiD4S.js.map +0 -1
- package/build/server/chunks/_page.svelte-kLLxi8vG.js.map +0 -1
- package/build/server/chunks/_page.svelte-nsIWq28L.js.map +0 -1
- package/build/server/chunks/_server.ts-BBxm_xV1.js.map +0 -1
- package/build/server/chunks/_server.ts-BIcKE9RQ.js.map +0 -1
- package/build/server/chunks/_server.ts-BYDdbqNr.js.map +0 -1
- package/build/server/chunks/_server.ts-BmZBSYvJ.js.map +0 -1
- package/build/server/chunks/_server.ts-CLKPeFqF.js.map +0 -1
- package/build/server/chunks/_server.ts-DEHw6op6.js.map +0 -1
- package/build/server/chunks/_server.ts-DTyPQO2I.js +0 -93
- package/build/server/chunks/_server.ts-DTyPQO2I.js.map +0 -1
- package/build/server/chunks/_server.ts-d0Tii8aZ.js.map +0 -1
- package/build/server/chunks/client-DpkplAAP.js +0 -25
- package/build/server/chunks/client-DpkplAAP.js.map +0 -1
- package/build/server/chunks/client2-tp0-IQU0.js.map +0 -1
- package/build/server/chunks/context-DVQH5kJk.js +0 -113
- package/build/server/chunks/context-DVQH5kJk.js.map +0 -1
- package/build/server/chunks/data-CbXDDeDB.js.map +0 -1
- package/build/server/chunks/error.svelte-DNcHZkvg.js +0 -29
- package/build/server/chunks/error.svelte-DNcHZkvg.js.map +0 -1
- package/build/server/chunks/events-A18hGvKp.js.map +0 -1
- package/build/server/chunks/index-BoStl4QO.js.map +0 -1
- package/build/server/chunks/index2-CVBATI2G.js.map +0 -1
- package/build/server/chunks/state.svelte-Dze7OxC_.js.map +0 -1
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/DLQqXQ6R.js","../chunks/C1FmrZbK.js","../assets/editor.BMIWPGx3.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import"../chunks/CWj6FrbW.js";import{o as Nt,w as Ct,c as _t,a as Pt}from"../chunks/CpZGG0E7.js";import{T as It,g as Ie,f as fe,d as ee,q as Se,e as Q,s as ue,m as O,ah as Ke,a as Ae,b as te,o as $,ad as _e,k as Re,bn as Rt,ae as qe,ag as Ze,v as De,z as He,af as ut,i as ot,n as je,C as Be,j as wt,u as dt,w as Ft,$ as Bt}from"../chunks/BdOqksoz.js";import{s as Pe}from"../chunks/Be371ezp.js";import{p as Me,i as we,a as Kt,s as Mt}from"../chunks/BDTuVTVZ.js";import{t as et,f as st,s as jt,A as Dt,C as Ut,k as Vt}from"../chunks/DveC87gn.js";import{e as ze,i as Ye}from"../chunks/C2Y9UxTx.js";import{d as tt,f as at,h as Wt}from"../chunks/DIiF2tGe.js";import{s as Le}from"../chunks/D5O98MXA.js";import{r as Gt}from"../chunks/C681lv5i.js";import{B as Ge,I as $e,h as Ht}from"../chunks/BTGV3Gq0.js";import{D as $t}from"../chunks/CYuXdPQc.js";import{P as lt}from"../chunks/ISgeSat5.js";import{b as ft}from"../chunks/Bmx4ManB.js";import{s as bt}from"../chunks/D_4dC3JZ.js";import{s as zt}from"../chunks/CpdYAO0i.js";import{I as vt}from"../chunks/BUoURvZ_.js";import{_ as Et}from"../chunks/C1FmrZbK.js";import"../chunks/9OGf6H2n.js";import{i as xt}from"../chunks/B8bx6-qu.js";function Yt(H){return function(...K){var k=K[0];return k.stopPropagation(),H==null?void 0:H.apply(this,K)}}function mt(H,K){var v;var k=(v=H.$$events)==null?void 0:v[K.type],I=It(k)?k.slice():k==null?[]:[k];for(var L of I)L.call(this,K)}var Jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qt(H){return H&&H.__esModule&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H}var Xt=fe("<span> </span> <!>",1),qt=fe('<span class="text-green-500"><!></span>'),Zt=fe('<div class="flex items-start gap-2"><span class="flex h-5 w-5 items-center justify-center"><!></span> <div class="min-w-0"><div class="text-sm font-bold leading-tight text-rc-gray-300"> </div> <div class="mt-1 text-sm leading-tight text-rc-gray-100"> </div></div></div>'),en=fe('<div class="mt-1 max-h-96 w-80 overflow-y-auto border border-rc-gray-600 bg-rc-gray-800 shadow-lg" role="listbox"></div>'),tn=fe("<div><!> <!></div>");function nn(H,K){Ie(K,!0);let k=Me(K,"class",3,""),I=_e(!1),L=_e(null);function v(){$(I,!O(I))}function E(_){K.onSelectState(_),$(I,!1)}function h(_){const e=_.userMessage;return e==null?"No message":(typeof e=="string"?e:String(e)).trim()||"No message"}function g(_,e=80,t="…"){if(!_)return"";if(_.length<=e)return _;const n=_.slice(0,e+1),c=Math.max(n.lastIndexOf(" "),n.lastIndexOf(" "),n.lastIndexOf(" "),n.lastIndexOf(`
|
|
3
|
-
`),n.lastIndexOf("\r"));return(c>0?n.slice(0,c):_.slice(0,e)).trimEnd()+t}function d(_){_.key==="ArrowDown"&&!O(I)?($(I,!0),_.preventDefault()):_.key==="ArrowUp"&&O(I)&&($(I,!1),_.preventDefault())}let x=Ke(()=>K.agentStates.find(_=>_.id===K.currentState)??null),R=Ke(()=>{var _;return((_=O(x))==null?void 0:_.name)??"History"});var C=tn(),A=ee(C);Ge(A,{variant:"outlined",size:"medium",get"aria-expanded"(){return O(I)},"aria-haspopup":"listbox","aria-controls":"history-dropdown",onclick:v,onkeydown:d,class:"flex items-center gap-3 rounded-xs border border-transparent bg-rc-gray-800 text-rc-gray-300 shadow-sm hover:bg-rc-gray-700 focus:outline-none focus:ring-0",get el(){return O(L)},set el(_){$(L,_,!0)},children:(_,e)=>{var t=Xt(),n=Se(t),c=ee(n,!0);Q(n);var l=ue(n,2);{let u=Ke(()=>"size-5 transition-transform "+(O(I)?"rotate-180":""));$e(l,{name:"chevron-down",get class(){return O(u)}})}Ae(()=>Pe(c,O(R))),te(_,t)},$$slots:{default:!0}});var y=ue(A,2);$t(y,{id:"history-dropdown",get open(){return O(I)},onClose:()=>$(I,!1),get anchorEl(){return O(L)},placement:"bottom-start",offset:[0,1],children:e=>{var t=en();ze(t,21,()=>K.agentStates.slice().reverse(),Ye,(n,c)=>{{let l=Ke(()=>O(c).id===K.currentState);Ge(n,{variant:"ghost",size:"small",role:"option",get"aria-selected"(){return O(l)},onclick:()=>E(O(c).id),class:"w-full border-b border-rc-gray-600 py-2 pr-3 text-left last:border-b-0 hover:bg-rc-gray-700 focus:bg-rc-gray-400",children:(u,r)=>{var i=Zt(),s=ee(i),o=ee(s);{var a=F=>{var j=qt(),b=ee(j);$e(b,{name:"checkmark",width:20,height:20,class:"inline-block"}),Q(j),et(3,j,()=>st,()=>({duration:100})),te(F,j)};we(o,F=>{O(c).id===K.currentState&&F(a)})}Q(s);var p=ue(s,2),f=ee(p),T=ee(f,!0);Q(f);var P=ue(f,2),N=ee(P,!0);Q(P),Q(p),Q(i),Ae(F=>{Pe(T,O(c).name),Pe(N,F)},[()=>g(h(O(c)))]),te(u,i)},$$slots:{default:!0}})}}),Q(t),te(e,t)},$$slots:{default:!0}}),Q(C),Ae(()=>Le(C,1,`relative ${k()}`)),te(H,C),Re()}var rn=(H,K,k)=>K.handleTriggerAction(k()),on=fe('<button class="btn ml-4 svelte-1k0h3o4">Trigger</button>'),sn=fe('<div><h3 class="table-cell font-bold"> </h3> <div class="table-cell"><!></div></div>'),an=fe('<h2 class="p-3 text-xl font-semibold">Delayed Actions</h2> <div class="scrollbar-none m-4 mt-0 grow overflow-y-hidden"><div class=" table"></div></div>',1);function ln(H,K){Ie(K,!0),lt(H,{get class(){return`flex flex-col ${K.class??""}`},children:(k,I)=>{var L=an(),v=ue(Se(L),2),E=ee(v);ze(E,21,()=>Object.entries(K.delayedActions),Ye,(h,g)=>{var d=Ke(()=>Rt(O(g),2));let x=()=>O(d)[0],R=()=>O(d)[1];var C=sn();let A;var y=ee(C),_=ee(y,!0);Q(y);var e=ue(y,2),t=ee(e);{var n=c=>{var l=on();l.__click=[rn,K,x],et(3,l,()=>st),te(c,l)};we(t,c=>{R().at&&c(n)})}Q(e),Q(C),Ae(c=>{A=Le(C,1,"table-row h-8 transition-opacity duration-100",null,A,c),Pe(_,x())},[()=>({"opacity-65":!R()})]),te(h,C)}),Q(E),Q(v),te(k,L)}}),Re()}tt(["click"]);let Ue=qe([]);function kt(H){return!ht(H)}function ht(H){return"action"in H}function cn(H){Ue.push(H)}function un(H){const K=Ue.find(k=>ht(k)&&k.action.id===H.id);K?K.action.state=H.state:Ue.push({action:H,logs:[]})}function fn(H){const K=Ue.filter(ht),k=K[K.length-1];k&&(k.logs=[...k.logs,H])}function it(){Ue.length=0}var hn=fe('<img alt="image"/>'),pn=(H,K,k)=>K(k.message),dn=fe("<div><!></div>"),vn=fe("<div><div><!> <div> </div></div> <!></div>");function mn(H,K){Ie(K,!0);let k=_e("idle");async function I(A){const y=Ue.filter(kt);let _=y.indexOf(A);_===-1&&(_=y.length-1);const e=y.slice(0,_).map(n=>n.text?`${n.sender}: ${n.text}`:"").filter(Boolean).join(`
|
|
4
|
-
`),t=A.text?`${A.text}`:"";try{$(k,"idle");const n=(K.agentId||"").trim(),[c,l]=n.includes("/")?n.split("/"):["",""];if(!c||!l)throw new Error("Agent id is not available; cannot add test");const u={pinned:"TRUE",assertion_type:"llm-rubric",assertion_value:"",conversation:e,expected_output:t,similarity_threshold:"60",timeout:"0",context:K.context||{},mergeContexts:!0},r=await fetch(`/academy/${c}/${l}/api/tests`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)});if(!r.ok)throw new Error(`HTTP ${r.status}`);await r.json().catch(()=>null),$(k,"ok"),window.open(`/academy/${c}/${l}`,"_blank","noopener,noreferrer"),setTimeout(()=>$(k,"idle"),3e3)}catch(n){console.error("Failed to add test",n),$(k,"error"),setTimeout(()=>$(k,"idle"),4e3)}}var L=vn();let v;var E=ee(L),h=ee(E);{var g=A=>{var y=hn();Ae(()=>bt(y,"src",K.message.imageUrl)),te(A,y)};we(h,A=>{K.message.imageUrl&&A(g)})}var d=ue(h,2),x=ee(d,!0);Q(d),Q(E);var R=ue(E,2);{var C=A=>{var y=dn();y.__click=[pn,I,K];var _=ee(y);{var e=n=>{var c=Ze("Added");te(n,c)},t=n=>{var c=De(),l=Se(c);{var u=i=>{var s=Ze("Failed");te(i,s)},r=i=>{var s=Ze("Add test");te(i,s)};we(l,i=>{O(k)==="error"?i(u):i(r,!1)},!0)}te(n,c)};we(_,n=>{O(k)==="ok"?n(e):n(t,!1)})}Q(y),Ae(()=>Le(y,1,`add-test cursor-pointer p-2 transition-opacity ${O(k)!=="idle"?"opacity-100":"opacity-0 group-hover:opacity-100"}`)),te(A,y)};we(R,A=>{K.message.sender==="agent"&&A(C)})}Q(L),Ae(A=>{v=Le(L,1,"group flex",null,v,A),Le(E,1,`rounded ${K.message.sender==="system"?"w-5/6 justify-self-end whitespace-pre-line break-words border border-emerald-500 text-emerald-500":K.message.sender!=="user"?"w-5/6 whitespace-pre-line break-words bg-emerald-700 text-rc-gray-100":"border-1 max-w5/6 justify-self-end border border-rc-gray-100 text-rc-gray-100"} mb-2 p-2`),Pe(x,K.message.text)},[()=>({"justify-end":K.message.sender==="user"||K.message.sender==="system"})]),te(H,L),Re()}tt(["click"]);function gn(H,K,k){$(K,!O(K)&&k.action.logs.length>0,!0)}var yn=fe('<span class="ml-1"><!></span>'),_n=fe('<span class="text-green-500"><!></span>'),wn=fe("<span>❌</span>"),bn=fe('<div class="whitespace-pre-wrap font-mono text-xs"> <!></div>'),En=fe('<div class="z-50 scroll-auto rounded border border-gray-300 bg-gray-100 p-2 text-zinc-800 shadow-lg"></div>'),xn=fe('<div><div class="block"><div><div><div class="mx-1 my-1"> </div></div> <div class="inline-flex"> </div> <!> <!></div> <!></div></div>');function kn(H,K){Ie(K,!0);let k=_e(!1);function I(l){return l.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var L=xn(),v=ee(L),E=ee(v);let h;E.__click=[gn,k,K];var g=ee(E),d=ee(g),x=ee(d,!0);Q(d),Q(g);var R=ue(g,2),C=ee(R,!0);Q(R);var A=ue(R,2);{var y=l=>{var u=yn(),r=ee(u);$e(r,{name:"log",width:15,height:15,class:"inline-block"}),Q(u),te(l,u)};we(A,l=>{K.action.logs.length>0&&l(y)})}var _=ue(A,2);{var e=l=>{var u=_n(),r=ee(u);$e(r,{name:"checkmark",width:20,height:20,class:"inline-block"}),Q(u),et(3,u,()=>st,()=>({duration:100})),te(l,u)},t=l=>{var u=De(),r=Se(u);{var i=s=>{var o=wn();et(3,o,()=>st,()=>({duration:100})),te(s,o)};we(r,s=>{K.action.action.state==="failed"&&s(i)},!0)}te(l,u)};we(_,l=>{K.action.action.state==="completed"?l(e):l(t,!1)})}Q(E);var n=ue(E,2);{var c=l=>{var u=En();ze(u,21,()=>K.action.logs,Ye,(r,i)=>{var s=bn(),o=ee(s),a=ue(o);Ht(a,()=>I(O(i).message)),Q(s),Ae(()=>Pe(o,`[${O(i).severity??""}]: `)),te(r,s)}),Q(u),et(3,u,()=>st,()=>({duration:100})),te(l,u)};we(n,l=>{O(k)&&l(c)})}Q(v),Q(L),Ae(l=>{h=Le(E,1,"mb-1 rounded p-0 text-rc-gray-100",null,h,l),Le(g,1,`relative top-0 inline-flex rounded-sm border border-rc-gray-100 text-xs text-rc-gray-100 ${K.action.action.type==="AI Engine"?"hidden":""}`),Pe(x,K.action.action.type),Pe(C,K.action.action.message)},[()=>({"cursor-pointer":K.action.logs.length>0})]),te(H,L),Re()}tt(["click"]);var On=fe('<dialog class="dialog m-auto bg-transparent p-0 text-rc-gray-100 shadow-md svelte-jby388"><!> <!></dialog>');function Tn(H,K){Ie(K,!0);let k,I=Me(K,"showCloseButton",3,!1),L=Me(K,"onClose",3,()=>{}),v=Me(K,"onOpen",3,()=>{}),E=Me(K,"isOpen",3,!1);He(()=>{E()?(console.log("show"),k==null||k.showModal(),v()()):k!=null&&k.open&&(console.log("close"),k.close())});function h(){L()()}Nt(()=>(k.addEventListener("close",h),()=>{k.removeEventListener("close",h)}));function g(A){A.target===k&&k.close()}var d=On();d.__mousedown=g;var x=ee(d);zt(x,()=>K.children);var R=ue(x,2);{var C=A=>{Ge(A,{variant:"ghost",onclick:()=>k.close(),class:"absolute right-2 top-2",children:(y,_)=>{ut();var e=Ze("✕");te(y,e)},$$slots:{default:!0}})};we(R,A=>{I()&&A(C)})}Q(d),ft(d,A=>k=A,()=>k),te(H,d),Re()}tt(["mousedown"]);var Ln=fe('<form><h2 class="text-l mb-4 text-gray-300">Image URL</h2> <!> <!></form>'),Sn=fe('<div class="chat-action svelte-1o6j0wu"><!></div>'),An=fe("<div><div><!></div></div>"),Nn=fe('<div class="scrollbar-none flex-1 overflow-y-auto"></div> <form class="mt-2 flex flex-none"><!> <!> <!></form>',1),Cn=fe("<!> <!>",1);function Pn(H,K){Ie(K,!0);let k=qe(new Set),I=_e(""),L=_e(""),v=_e(""),E,h=_e(!1);He(()=>{Ue.length>0&&g(E)});function g(_){k.has(_)||!_||_.scrollTo({top:_.scrollHeight,behavior:"smooth"})}function d(_){_.scrollTop+_.clientHeight+200>_.scrollHeight?k.delete(_):k.add(_)}function x(_){_.preventDefault(),(O(I)||O(v))&&(K.onmessage({sender:"user",text:O(I),imageUrl:O(v)}),$(v,""),$(I,""))}function R(_){_.preventDefault(),$(v,O(L),!0),$(L,""),$(h,!1)}var C=Cn(),A=Se(C);Tn(A,{get isOpen(){return O(h)},onClose:()=>$(h,!1),showCloseButton:!0,children:(_,e)=>{lt(_,{class:"p-4",children:(t,n)=>{var c=Ln(),l=ue(ee(c),2);vt(l,{class:"mb-2 w-80",get value(){return O(L)},set value(r){$(L,r,!0)}});var u=ue(l,2);Ge(u,{variant:"outlined",size:"big",type:"submit",class:"p-2",children:(r,i)=>{ut();var s=Ze("Attach");te(r,s)},$$slots:{default:!0}}),Q(c),at("submit",c,R),te(t,c)}})},$$slots:{default:!0}});var y=ue(A,2);lt(y,{get class(){return`flex flex-col p-2 ${K.class??""}`},children:(_,e)=>{var t=Nn(),n=Se(t);ze(n,21,()=>Ue,Ye,(i,s)=>{var o=An();let a;var p=ee(o),f=ee(p);{var T=N=>{var F=Sn(),j=ee(F);kn(j,{get action(){return O(s)}}),Q(F),te(N,F)},P=N=>{mn(N,{get message(){return O(s)},get context(){return K.context},get agentId(){return K.agentId}})};we(f,N=>{ht(O(s))?N(T):N(P,!1)})}Q(p),Q(o),Ae(N=>a=Le(o,1,"log-element svelte-1o6j0wu",null,a,N),[()=>({"log-element-chat":kt(O(s))})]),te(i,o)}),Q(n),ft(n,i=>E=i,()=>E);var c=ue(n,2),l=ee(c);vt(l,{class:"block w-full",placeholder:"Enter user's message...",get value(){return O(I)},set value(i){$(I,i,!0)}});var u=ue(l,2);Ge(u,{class:"ml-2",onclick:()=>$(h,!0),children:(i,s)=>{$e(i,{name:"paperclip"})},$$slots:{default:!0}});var r=ue(u,2);Ge(r,{class:"ml-2",type:"submit",children:(i,s)=>{$e(i,{name:"send"})},$$slots:{default:!0}}),Q(c),at("scroll",n,i=>d(i.target)),at("submit",c,x),te(_,t)}}),te(H,C),Re()}function In(H,K){H.languages.registerCompletionItemProvider("markdown",{triggerCharacters:[" ","."],provideCompletionItems:(k,I)=>{const L=k.getValueInRange({startLineNumber:I.lineNumber,startColumn:1,endLineNumber:I.lineNumber,endColumn:I.column}),v=L.match(/\{%\s*(if|elif|for)\s+([^%]*)$/),E=L.match(/\{\{\s*([^}]*)$/);if(v||E){let g="";v?g=v[2].trim():E&&(g=E[1].trim());const{keys:d,lastPartLength:x}=Rn(K,g);return{suggestions:d.map(C=>({label:C,kind:H.languages.CompletionItemKind.Variable,insertText:C,range:{startLineNumber:I.lineNumber,endLineNumber:I.lineNumber,startColumn:I.column-x,endColumn:I.column}}))}}const h=L.match(/\{%\s*([^%]*)$/);if(h){const g=h[1].trim();return{suggestions:["if","elif","else","endif","for","endfor"].filter(x=>x.startsWith(g)).map((x,R)=>({label:x,kind:H.languages.CompletionItemKind.Keyword,insertText:x,sortText:String(R).padStart(2,"0"),range:{startLineNumber:I.lineNumber,endLineNumber:I.lineNumber,startColumn:I.column-g.length,endColumn:I.column}}))}}return{suggestions:[]}}})}function Rn(H,K){let k=H,I=[],L=0;if(K==="")I=Object.keys(H??{}),L=0;else if(K.includes(".")){const v=K.split("."),E=v.pop()||"";L=E.length;for(const h of v)if(k&&typeof k=="object"&&h in k)k=k[h];else{k=null;break}k&&typeof k=="object"&&(I=Object.keys(k).filter(h=>h.startsWith(E)))}else L=K.length,I=Object.keys(H??{}).filter(v=>v.startsWith(K));return{keys:I,lastPartLength:L}}var Ot={exports:{}};/*! Browser bundle of nunjucks 3.2.4 */(function(H,K){(function(I,L){H.exports=L()})(typeof self<"u"?self:Jt,function(){return function(k){var I={};function L(v){if(I[v])return I[v].exports;var E=I[v]={i:v,l:!1,exports:{}};return k[v].call(E.exports,E,E.exports,L),E.l=!0,E.exports}return L.m=k,L.c=I,L.d=function(v,E,h){L.o(v,E)||Object.defineProperty(v,E,{configurable:!1,enumerable:!0,get:h})},L.n=function(v){var E=v&&v.__esModule?function(){return v.default}:function(){return v};return L.d(E,"a",E),E},L.o=function(v,E){return Object.prototype.hasOwnProperty.call(v,E)},L.p="",L(L.s=11)}([function(k,d,L){var v=Array.prototype,E=Object.prototype,h={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},g=/[&"'<>\\]/g,d=k.exports={};function x(m,S){return E.hasOwnProperty.call(m,S)}d.hasOwnProp=x;function R(m){return h[m]}function C(m,S,D){if(D.Update||(D=new d.TemplateError(D)),D.Update(m),!S){var U=D;D=new Error(U.message),D.name=U.name}return D}d._prettifyError=C;function A(m,S,D){var U,z;m instanceof Error&&(z=m,m=z.name+": "+z.message),Object.setPrototypeOf?(U=new Error(m),Object.setPrototypeOf(U,A.prototype)):(U=this,Object.defineProperty(U,"message",{enumerable:!1,writable:!0,value:m})),Object.defineProperty(U,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(U,this.constructor);var ce;if(z){var ne=Object.getOwnPropertyDescriptor(z,"stack");ce=ne&&(ne.get||function(){return ne.value}),ce||(ce=function(){return z.stack})}else{var ye=new Error(m).stack;ce=function(){return ye}}return Object.defineProperty(U,"stack",{get:function(){return ce.call(U)}}),Object.defineProperty(U,"cause",{value:z}),U.lineno=S,U.colno=D,U.firstUpdate=!0,U.Update=function(ae){var oe="("+(ae||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?oe+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(oe+=" [Line "+this.lineno+"]")),oe+=`
|
|
5
|
-
`,this.firstUpdate&&(oe+=" "),this.message=oe+(this.message||""),this.firstUpdate=!1,this},U}Object.setPrototypeOf?Object.setPrototypeOf(A.prototype,Error.prototype):A.prototype=Object.create(Error.prototype,{constructor:{value:A}}),d.TemplateError=A;function y(m){return m.replace(g,R)}d.escape=y;function _(m){return E.toString.call(m)==="[object Function]"}d.isFunction=_;function e(m){return E.toString.call(m)==="[object Array]"}d.isArray=e;function t(m){return E.toString.call(m)==="[object String]"}d.isString=t;function n(m){return E.toString.call(m)==="[object Object]"}d.isObject=n;function c(m){return m?typeof m=="string"?m.split("."):[m]:[]}function l(m){var S=c(m);return function(U){for(var z=U,ce=0;ce<S.length;ce++){var ne=S[ce];if(x(z,ne))z=z[ne];else return}return z}}d.getAttrGetter=l;function u(m,S,D){for(var U={},z=_(S)?S:l(S),ce=0;ce<m.length;ce++){var ne=m[ce],ye=z(ne,ce);if(ye===void 0&&D===!0)throw new TypeError('groupby: attribute "'+S+'" resolved to undefined');(U[ye]||(U[ye]=[])).push(ne)}return U}d.groupBy=u;function r(m){return Array.prototype.slice.call(m)}d.toArray=r;function i(m){var S=[];if(!m)return S;for(var D=m.length,U=r(arguments).slice(1),z=-1;++z<D;)T(U,m[z])===-1&&S.push(m[z]);return S}d.without=i;function s(m,S){for(var D="",U=0;U<S;U++)D+=m;return D}d.repeat=s;function o(m,S,D){if(m!=null){if(v.forEach&&m.forEach===v.forEach)m.forEach(S,D);else if(m.length===+m.length)for(var U=0,z=m.length;U<z;U++)S.call(D,m[U],U,m)}}d.each=o;function a(m,S){var D=[];if(m==null)return D;if(v.map&&m.map===v.map)return m.map(S);for(var U=0;U<m.length;U++)D[D.length]=S(m[U],U);return m.length===+m.length&&(D.length=m.length),D}d.map=a;function p(m,S,D){var U=-1;function z(){U++,U<m.length?S(m[U],U,z,D):D()}z()}d.asyncIter=p;function f(m,S,D){var U=P(m||{}),z=U.length,ce=-1;function ne(){ce++;var ye=U[ce];ce<z?S(ye,m[ye],ce,z,ne):D()}ne()}d.asyncFor=f;function T(m,S,D){return Array.prototype.indexOf.call(m||[],S,D)}d.indexOf=T;function P(m){var S=[];for(var D in m)x(m,D)&&S.push(D);return S}d.keys=P;function N(m){return P(m).map(function(S){return[S,m[S]]})}d._entries=N;function F(m){return P(m).map(function(S){return m[S]})}d._values=F;function j(m,S){return m=m||{},P(S).forEach(function(D){m[D]=S[D]}),m}d._assign=d.extend=j;function b(m,S){if(e(S)||t(S))return S.indexOf(m)!==-1;if(n(S))return m in S;throw new Error('Cannot use "in" operator to search for "'+m+'" in unexpected types.')}d.inOperator=b},function(k,I,L){function v(t,n){for(var c=0;c<n.length;c++){var l=n[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,h(l.key),l)}}function E(t,n,c){return n&&v(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t){var n=g(t,"string");return typeof n=="symbol"?n:String(n)}function g(t,n){if(typeof t!="object"||t===null)return t;var c=t[Symbol.toPrimitive];if(c!==void 0){var l=c.call(t,n);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function d(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n)}function x(t,n){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,u){return l.__proto__=u,l},x(t,n)}var R=L(16),C=L(0);function A(t,n){return typeof t!="function"||typeof n!="function"?n:function(){var l=this.parent;this.parent=t;var u=n.apply(this,arguments);return this.parent=l,u}}function y(t,n,c){c=c||{},C.keys(c).forEach(function(u){c[u]=A(t.prototype[u],c[u])});var l=function(u){d(r,u);function r(){return u.apply(this,arguments)||this}return E(r,[{key:"typename",get:function(){return n}}]),r}(t);return C._assign(l.prototype,c),l}var _=function(){function t(){this.init.apply(this,arguments)}var n=t.prototype;return n.init=function(){},t.extend=function(l,u){return typeof l=="object"&&(u=l,l="anonymous"),y(this,l,u)},E(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),e=function(t){d(n,t);function n(){var l,u;return u=t.call(this)||this,(l=u).init.apply(l,arguments),u}var c=n.prototype;return c.init=function(){},n.extend=function(u,r){return typeof u=="object"&&(r=u,u="anonymous"),y(this,u,r)},E(n,[{key:"typename",get:function(){return this.constructor.name}}]),n}(R);k.exports={Obj:_,EmitterObj:e}},function(k,I,L){var v=L(0),E=Array.from,h=typeof Symbol=="function"&&Symbol.iterator&&typeof E=="function",g=function(){function a(f,T){this.variables=Object.create(null),this.parent=f,this.topLevel=!1,this.isolateWrites=T}var p=a.prototype;return p.set=function(T,P,N){var F=T.split("."),j=this.variables,b=this;if(N&&(b=this.resolve(F[0],!0))){b.set(T,P);return}for(var m=0;m<F.length-1;m++){var S=F[m];j[S]||(j[S]={}),j=j[S]}j[F[F.length-1]]=P},p.get=function(T){var P=this.variables[T];return P!==void 0?P:null},p.lookup=function(T){var P=this.parent,N=this.variables[T];return N!==void 0?N:P&&P.lookup(T)},p.resolve=function(T,P){var N=P&&this.isolateWrites?void 0:this.parent,F=this.variables[T];return F!==void 0?this:N&&N.resolve(T)},p.push=function(T){return new a(this,T)},p.pop=function(){return this.parent},a}();function d(a,p,f){return function(){for(var P=arguments.length,N=new Array(P),F=0;F<P;F++)N[F]=arguments[F];var j=A(N),b,m=C(N);if(j>a.length)b=N.slice(0,a.length),N.slice(b.length,j).forEach(function(U,z){z<p.length&&(m[p[z]]=U)}),b.push(m);else if(j<a.length){b=N.slice(0,j);for(var S=j;S<a.length;S++){var D=a[S];b.push(m[D]),delete m[D]}b.push(m)}else b=N;return f.apply(this,b)}}function x(a){return a.__keywords=!0,a}function R(a){return a&&Object.prototype.hasOwnProperty.call(a,"__keywords")}function C(a){var p=a.length;if(p){var f=a[p-1];if(R(f))return f}return{}}function A(a){var p=a.length;if(p===0)return 0;var f=a[p-1];return R(f)?p-1:p}function y(a){if(typeof a!="string")return a;this.val=a,this.length=a.length}y.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),y.prototype.valueOf=function(){return this.val},y.prototype.toString=function(){return this.val};function _(a,p){return a instanceof y?new y(p):p.toString()}function e(a){var p=typeof a;return p==="string"?new y(a):p!=="function"?a:function(T){var P=a.apply(this,arguments);return typeof P=="string"?new y(P):P}}function t(a,p){return a=a??"",p&&!(a instanceof y)&&(a=v.escape(a.toString())),a}function n(a,p,f){if(a==null)throw new v.TemplateError("attempted to output null or undefined value",p+1,f+1);return a}function c(a,p){if(a!=null)return typeof a[p]=="function"?function(){for(var f=arguments.length,T=new Array(f),P=0;P<f;P++)T[P]=arguments[P];return a[p].apply(a,T)}:a[p]}function l(a,p,f,T){if(a){if(typeof a!="function")throw new Error("Unable to call `"+p+"`, which is not a function")}else throw new Error("Unable to call `"+p+"`, which is undefined or falsey");return a.apply(f,T)}function u(a,p,f){var T=p.lookup(f);return T!==void 0?T:a.lookup(f)}function r(a,p,f){return a.lineno?a:new v.TemplateError(a,p,f)}function i(a,p,f,T){if(v.isArray(a)){var P=a.length;v.asyncIter(a,function(F,j,b){switch(p){case 1:f(F,j,P,b);break;case 2:f(F[0],F[1],j,P,b);break;case 3:f(F[0],F[1],F[2],j,P,b);break;default:F.push(j,P,b),f.apply(this,F)}},T)}else v.asyncFor(a,function(F,j,b,m,S){f(F,j,b,m,S)},T)}function s(a,p,f,T){var P=0,N,F;function j(z,ce){P++,F[z]=ce,P===N&&T(null,F.join(""))}if(v.isArray(a))if(N=a.length,F=new Array(N),N===0)T(null,"");else for(var b=0;b<a.length;b++){var m=a[b];switch(p){case 1:f(m,b,N,j);break;case 2:f(m[0],m[1],b,N,j);break;case 3:f(m[0],m[1],m[2],b,N,j);break;default:m.push(b,N,j),f.apply(this,m)}}else{var S=v.keys(a||{});if(N=S.length,F=new Array(N),N===0)T(null,"");else for(var D=0;D<S.length;D++){var U=S[D];f(U,a[U],D,N,j)}}}function o(a){return typeof a!="object"||a===null||v.isArray(a)?a:h&&Symbol.iterator in a?E(a):a}k.exports={Frame:g,makeMacro:d,makeKeywordArgs:x,numArgs:A,suppressValue:t,ensureDefined:n,memberLookup:c,contextOrFrameLookup:u,callWrap:l,handleError:r,isArray:v.isArray,keys:v.keys,SafeString:y,copySafeness:_,markSafe:e,asyncEach:i,asyncAll:s,inOperator:v.inOperator,fromIterator:o}},function(k,I,L){function v(X,q){for(var ve=0;ve<q.length;ve++){var he=q[ve];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(X,h(he.key),he)}}function E(X,q,ve){return q&&v(X.prototype,q),Object.defineProperty(X,"prototype",{writable:!1}),X}function h(X){var q=g(X,"string");return typeof q=="symbol"?q:String(q)}function g(X,q){if(typeof X!="object"||X===null)return X;var ve=X[Symbol.toPrimitive];if(ve!==void 0){var he=ve.call(X,q);if(typeof he!="object")return he;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(X)}function d(X,q){X.prototype=Object.create(q.prototype),X.prototype.constructor=X,x(X,q)}function x(X,q){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(he,me){return he.__proto__=me,he},x(X,q)}var R=L(1),C=R.Obj;function A(X,q,ve){X instanceof q&&ve.push(X),X instanceof y&&X.findAll(q,ve)}var y=function(X){d(q,X);function q(){return X.apply(this,arguments)||this}var ve=q.prototype;return ve.init=function(me,xe){for(var Ne=arguments,We=this,rt=arguments.length,Lt=new Array(rt>2?rt-2:0),ct=2;ct<rt;ct++)Lt[ct-2]=arguments[ct];this.lineno=me,this.colno=xe,this.fields.forEach(function(St,At){var pt=Ne[At+2];pt===void 0&&(pt=null),We[St]=pt})},ve.findAll=function(me,xe){var Ne=this;return xe=xe||[],this instanceof e?this.children.forEach(function(We){return A(We,me,xe)}):this.fields.forEach(function(We){return A(Ne[We],me,xe)}),xe},ve.iterFields=function(me){var xe=this;this.fields.forEach(function(Ne){me(xe[Ne],Ne)})},q}(C),_=function(X){d(q,X);function q(){return X.apply(this,arguments)||this}return E(q,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),q}(y),e=function(X){d(q,X);function q(){return X.apply(this,arguments)||this}var ve=q.prototype;return ve.init=function(me,xe,Ne){X.prototype.init.call(this,me,xe,Ne||[])},ve.addChild=function(me){this.children.push(me)},E(q,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),q}(y),t=e.extend("Root"),n=_.extend("Literal"),c=_.extend("Symbol"),l=e.extend("Group"),u=e.extend("Array"),r=y.extend("Pair",{fields:["key","value"]}),i=e.extend("Dict"),s=y.extend("LookupVal",{fields:["target","val"]}),o=y.extend("If",{fields:["cond","body","else_"]}),a=o.extend("IfAsync"),p=y.extend("InlineIf",{fields:["cond","body","else_"]}),f=y.extend("For",{fields:["arr","name","body","else_"]}),T=f.extend("AsyncEach"),P=f.extend("AsyncAll"),N=y.extend("Macro",{fields:["name","args","body"]}),F=N.extend("Caller"),j=y.extend("Import",{fields:["template","target","withContext"]}),b=function(X){d(q,X);function q(){return X.apply(this,arguments)||this}var ve=q.prototype;return ve.init=function(me,xe,Ne,We,rt){X.prototype.init.call(this,me,xe,Ne,We||new e,rt)},E(q,[{key:"typename",get:function(){return"FromImport"}},{key:"fields",get:function(){return["template","names","withContext"]}}]),q}(y),m=y.extend("FunCall",{fields:["name","args"]}),S=m.extend("Filter"),D=S.extend("FilterAsync",{fields:["name","args","symbol"]}),U=i.extend("KeywordArgs"),z=y.extend("Block",{fields:["name","body"]}),ce=y.extend("Super",{fields:["blockName","symbol"]}),ne=y.extend("TemplateRef",{fields:["template"]}),ye=ne.extend("Extends"),Ee=y.extend("Include",{fields:["template","ignoreMissing"]}),ae=y.extend("Set",{fields:["targets","value"]}),oe=y.extend("Switch",{fields:["expr","cases","default"]}),G=y.extend("Case",{fields:["cond","body"]}),Y=e.extend("Output"),J=y.extend("Capture",{fields:["body"]}),pe=n.extend("TemplateData"),ke=y.extend("UnaryOp",{fields:["target"]}),be=y.extend("BinOp",{fields:["left","right"]}),Ce=be.extend("In"),w=be.extend("Is"),B=be.extend("Or"),W=be.extend("And"),V=ke.extend("Not"),Z=be.extend("Add"),re=be.extend("Concat"),de=be.extend("Sub"),le=be.extend("Mul"),ge=be.extend("Div"),M=be.extend("FloorDiv"),ie=be.extend("Mod"),se=be.extend("Pow"),Oe=ke.extend("Neg"),Te=ke.extend("Pos"),Fe=y.extend("Compare",{fields:["expr","ops"]}),Je=y.extend("CompareOperand",{fields:["expr","type"]}),Ve=y.extend("CallExtension",{init:function(q,ve,he,me){this.parent(),this.extName=q.__name||q,this.prop=ve,this.args=he||new e,this.contentArgs=me||[],this.autoescape=q.autoescape},fields:["extName","prop","args","contentArgs"]}),Qe=Ve.extend("CallExtensionAsync");function Xe(X,q,ve){var he=X.split(`
|
|
6
|
-
`);he.forEach(function(me,xe){me&&(ve&&xe>0||!ve)&&process.stdout.write(" ".repeat(q));var Ne=xe===he.length-1?"":`
|
|
7
|
-
`;process.stdout.write(""+me+Ne)})}function nt(X,q){if(q=q||0,Xe(X.typename+": ",q),X instanceof e)Xe(`
|
|
8
|
-
`),X.children.forEach(function(me){nt(me,q+2)});else if(X instanceof Ve)Xe(X.extName+"."+X.prop+`
|
|
9
|
-
`),X.args&&nt(X.args,q+2),X.contentArgs&&X.contentArgs.forEach(function(me){nt(me,q+2)});else{var ve=[],he=null;X.iterFields(function(me,xe){me instanceof y?ve.push([xe,me]):(he=he||{},he[xe]=me)}),he?Xe(JSON.stringify(he,null,2)+`
|
|
10
|
-
`,null,!0):Xe(`
|
|
11
|
-
`),ve.forEach(function(me){var xe=me[0],Ne=me[1];Xe("["+xe+"] =>",q+2),nt(Ne,q+4)})}}k.exports={Node:y,Root:t,NodeList:e,Value:_,Literal:n,Symbol:c,Group:l,Array:u,Pair:r,Dict:i,Output:Y,Capture:J,TemplateData:pe,If:o,IfAsync:a,InlineIf:p,For:f,AsyncEach:T,AsyncAll:P,Macro:N,Caller:F,Import:j,FromImport:b,FunCall:m,Filter:S,FilterAsync:D,KeywordArgs:U,Block:z,Super:ce,Extends:ye,Include:Ee,Set:ae,Switch:oe,Case:G,LookupVal:s,BinOp:be,In:Ce,Is:w,Or:B,And:W,Not:V,Add:Z,Concat:re,Sub:de,Mul:le,Div:ge,FloorDiv:M,Mod:ie,Pow:se,Neg:Oe,Pos:Te,Compare:Fe,CompareOperand:Je,CallExtension:Ve,CallExtensionAsync:Qe,printNodes:nt}},function(k,I){},function(k,I,L){function v(n,c){n.prototype=Object.create(c.prototype),n.prototype.constructor=n,E(n,c)}function E(n,c){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,r){return u.__proto__=r,u},E(n,c)}var h=L(8),g=L(17),d=L(3),x=L(0),R=x.TemplateError,C=L(2),A=C.Frame,y=L(1),_=y.Obj,e={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},t=function(n){v(c,n);function c(){return n.apply(this,arguments)||this}var l=c.prototype;return l.init=function(r,i){this.templateName=r,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=i},l.fail=function(r,i,s){throw i!==void 0&&(i+=1),s!==void 0&&(s+=1),new R(r,i,s)},l._pushBuffer=function(){var r=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=r,this._emit("var "+this.buffer+' = "";'),r},l._popBuffer=function(){this.buffer=this.bufferStack.pop()},l._emit=function(r){this.codebuf.push(r)},l._emitLine=function(r){this._emit(r+`
|
|
12
|
-
`)},l._emitLines=function(){for(var r=this,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];s.forEach(function(a){return r._emitLine(a)})},l._emitFuncBegin=function(r,i){this.buffer="output",this._scopeClosers="",this._emitLine("function "+i+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+r.lineno+";"),this._emitLine("var colno = "+r.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},l._emitFuncEnd=function(r){r||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},l._addScopeLevel=function(){this._scopeClosers+="})"},l._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},l._withScopedSyntax=function(r){var i=this._scopeClosers;this._scopeClosers="",r.call(this),this._closeScopeLevels(),this._scopeClosers=i},l._makeCallback=function(r){var i=this._tmpid();return"function("+i+(r?","+r:"")+`) {
|
|
13
|
-
if(`+i+") { cb("+i+"); return; }"},l._tmpid=function(){return this.lastId++,"t_"+this.lastId},l._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},l._compileChildren=function(r,i){var s=this;r.children.forEach(function(o){s.compile(o,i)})},l._compileAggregate=function(r,i,s,o){var a=this;s&&this._emit(s),r.children.forEach(function(p,f){f>0&&a._emit(","),a.compile(p,i)}),o&&this._emit(o)},l._compileExpression=function(r,i){this.assertType(r,d.Literal,d.Symbol,d.Group,d.Array,d.Dict,d.FunCall,d.Caller,d.Filter,d.LookupVal,d.Compare,d.InlineIf,d.In,d.Is,d.And,d.Or,d.Not,d.Add,d.Concat,d.Sub,d.Mul,d.Div,d.FloorDiv,d.Mod,d.Pow,d.Neg,d.Pos,d.Compare,d.NodeList),this.compile(r,i)},l.assertType=function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];s.some(function(a){return r instanceof a})||this.fail("assertType: invalid type: "+r.typename,r.lineno,r.colno)},l.compileCallExtension=function(r,i,s){var o=this,a=r.args,p=r.contentArgs,f=typeof r.autoescape=="boolean"?r.autoescape:!0;if(s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+r.extName+'")["'+r.prop+'"]('),this._emit("context"),(a||p)&&this._emit(","),a&&(a instanceof d.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),a.children.forEach(function(P,N){o._compileExpression(P,i),(N!==a.children.length-1||p.length)&&o._emit(",")})),p.length&&p.forEach(function(P,N){if(N>0&&o._emit(","),P){o._emitLine("function(cb) {"),o._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var F=o._pushBuffer();o._withScopedSyntax(function(){o.compile(P,i),o._emitLine("cb(null, "+F+");")}),o._popBuffer(),o._emitLine("return "+F+";"),o._emitLine("}")}else o._emit("null")}),s){var T=this._tmpid();this._emitLine(", "+this._makeCallback(T)),this._emitLine(this.buffer+" += runtime.suppressValue("+T+", "+f+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+f+` && env.opts.autoescape);
|
|
14
|
-
`)},l.compileCallExtensionAsync=function(r,i){this.compileCallExtension(r,i,!0)},l.compileNodeList=function(r,i){this._compileChildren(r,i)},l.compileLiteral=function(r){if(typeof r.value=="string"){var i=r.value.replace(/\\/g,"\\\\");i=i.replace(/"/g,'\\"'),i=i.replace(/\n/g,"\\n"),i=i.replace(/\r/g,"\\r"),i=i.replace(/\t/g,"\\t"),i=i.replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')}else r.value===null?this._emit("null"):this._emit(r.value.toString())},l.compileSymbol=function(r,i){var s=r.value,o=i.lookup(s);o?this._emit(o):this._emit('runtime.contextOrFrameLookup(context, frame, "'+s+'")')},l.compileGroup=function(r,i){this._compileAggregate(r,i,"(",")")},l.compileArray=function(r,i){this._compileAggregate(r,i,"[","]")},l.compileDict=function(r,i){this._compileAggregate(r,i,"{","}")},l.compilePair=function(r,i){var s=r.key,o=r.value;s instanceof d.Symbol?s=new d.Literal(s.lineno,s.colno,s.value):s instanceof d.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(o,i)},l.compileInlineIf=function(r,i){this._emit("("),this.compile(r.cond,i),this._emit("?"),this.compile(r.body,i),this._emit(":"),r.else_!==null?this.compile(r.else_,i):this._emit('""'),this._emit(")")},l.compileIn=function(r,i){this._emit("runtime.inOperator("),this.compile(r.left,i),this._emit(","),this.compile(r.right,i),this._emit(")")},l.compileIs=function(r,i){var s=r.right.name?r.right.name.value:r.right.value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(r.left,i),r.right.args&&(this._emit(","),this.compile(r.right.args,i)),this._emit(") === true")},l._binOpEmitter=function(r,i,s){this.compile(r.left,i),this._emit(s),this.compile(r.right,i)},l.compileOr=function(r,i){return this._binOpEmitter(r,i," || ")},l.compileAnd=function(r,i){return this._binOpEmitter(r,i," && ")},l.compileAdd=function(r,i){return this._binOpEmitter(r,i," + ")},l.compileConcat=function(r,i){return this._binOpEmitter(r,i,' + "" + ')},l.compileSub=function(r,i){return this._binOpEmitter(r,i," - ")},l.compileMul=function(r,i){return this._binOpEmitter(r,i," * ")},l.compileDiv=function(r,i){return this._binOpEmitter(r,i," / ")},l.compileMod=function(r,i){return this._binOpEmitter(r,i," % ")},l.compileNot=function(r,i){this._emit("!"),this.compile(r.target,i)},l.compileFloorDiv=function(r,i){this._emit("Math.floor("),this.compile(r.left,i),this._emit(" / "),this.compile(r.right,i),this._emit(")")},l.compilePow=function(r,i){this._emit("Math.pow("),this.compile(r.left,i),this._emit(", "),this.compile(r.right,i),this._emit(")")},l.compileNeg=function(r,i){this._emit("-"),this.compile(r.target,i)},l.compilePos=function(r,i){this._emit("+"),this.compile(r.target,i)},l.compileCompare=function(r,i){var s=this;this.compile(r.expr,i),r.ops.forEach(function(o){s._emit(" "+e[o.type]+" "),s.compile(o.expr,i)})},l.compileLookupVal=function(r,i){this._emit("runtime.memberLookup(("),this._compileExpression(r.target,i),this._emit("),"),this._compileExpression(r.val,i),this._emit(")")},l._getNodeName=function(r){switch(r.typename){case"Symbol":return r.value;case"FunCall":return"the return value of ("+this._getNodeName(r.name)+")";case"LookupVal":return this._getNodeName(r.target)+'["'+this._getNodeName(r.val)+'"]';case"Literal":return r.value.toString();default:return"--expression--"}},l.compileFunCall=function(r,i){this._emit("(lineno = "+r.lineno+", colno = "+r.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(r.name,i),this._emit(', "'+this._getNodeName(r.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(r.args,i,"[","])"),this._emit(")")},l.compileFilter=function(r,i){var s=r.name;this.assertType(s,d.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emit(")")},l.compileFilterAsync=function(r,i){var s=r.name,o=r.symbol.value;this.assertType(s,d.Symbol),i.set(o,o),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emitLine(", "+this._makeCallback(o)),this._addScopeLevel()},l.compileKeywordArgs=function(r,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(r,i),this._emit(")")},l.compileSet=function(r,i){var s=this,o=[];r.targets.forEach(function(a){var p=a.value,f=i.lookup(p);f==null&&(f=s._tmpid(),s._emitLine("var "+f+";")),o.push(f)}),r.value?(this._emit(o.join(" = ")+" = "),this._compileExpression(r.value,i),this._emitLine(";")):(this._emit(o.join(" = ")+" = "),this.compile(r.body,i),this._emitLine(";")),r.targets.forEach(function(a,p){var f=o[p],T=a.value;s._emitLine('frame.set("'+T+'", '+f+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+T+'", '+f+");"),s._emitLine("}"),T.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+T+'", '+f+");"),s._emitLine("}"))})},l.compileSwitch=function(r,i){var s=this;this._emit("switch ("),this.compile(r.expr,i),this._emit(") {"),r.cases.forEach(function(o,a){s._emit("case "),s.compile(o.cond,i),s._emit(": "),s.compile(o.body,i),o.body.children.length&&s._emitLine("break;")}),r.default&&(this._emit("default:"),this.compile(r.default,i)),this._emit("}")},l.compileIf=function(r,i,s){var o=this;this._emit("if("),this._compileExpression(r.cond,i),this._emitLine(") {"),this._withScopedSyntax(function(){o.compile(r.body,i),s&&o._emit("cb()")}),r.else_?(this._emitLine(`}
|
|
15
|
-
else {`),this._withScopedSyntax(function(){o.compile(r.else_,i),s&&o._emit("cb()")})):s&&(this._emitLine(`}
|
|
16
|
-
else {`),this._emit("cb()")),this._emitLine("}")},l.compileIfAsync=function(r,i){this._emit("(function(cb) {"),this.compileIf(r,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},l._emitLoopBindings=function(r,i,s,o){var a=this,p=[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:o+" - "+s},{name:"revindex0",val:o+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+o+" - 1"},{name:"length",val:o}];p.forEach(function(f){a._emitLine('frame.set("loop.'+f.name+'", '+f.val+");")})},l.compileFor=function(r,i){var s=this,o=this._tmpid(),a=this._tmpid(),p=this._tmpid();if(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+p+" = "),this._compileExpression(r.arr,i),this._emitLine(";"),this._emit("if("+p+") {"),this._emitLine(p+" = runtime.fromIterator("+p+");"),r.name instanceof d.Array){this._emitLine("var "+o+";"),this._emitLine("if(runtime.isArray("+p+")) {"),this._emitLine("var "+a+" = "+p+".length;"),this._emitLine("for("+o+"=0; "+o+" < "+p+".length; "+o+"++) {"),r.name.children.forEach(function(b,m){var S=s._tmpid();s._emitLine("var "+S+" = "+p+"["+o+"]["+m+"];"),s._emitLine('frame.set("'+b+'", '+p+"["+o+"]["+m+"]);"),i.set(r.name.children[m].value,S)}),this._emitLoopBindings(r,p,o,a),this._withScopedSyntax(function(){s.compile(r.body,i)}),this._emitLine("}"),this._emitLine("} else {");var f=r.name.children,T=f[0],P=f[1],N=this._tmpid(),F=this._tmpid();i.set(T.value,N),i.set(P.value,F),this._emitLine(o+" = -1;"),this._emitLine("var "+a+" = runtime.keys("+p+").length;"),this._emitLine("for(var "+N+" in "+p+") {"),this._emitLine(o+"++;"),this._emitLine("var "+F+" = "+p+"["+N+"];"),this._emitLine('frame.set("'+T.value+'", '+N+");"),this._emitLine('frame.set("'+P.value+'", '+F+");"),this._emitLoopBindings(r,p,o,a),this._withScopedSyntax(function(){s.compile(r.body,i)}),this._emitLine("}"),this._emitLine("}")}else{var j=this._tmpid();i.set(r.name.value,j),this._emitLine("var "+a+" = "+p+".length;"),this._emitLine("for(var "+o+"=0; "+o+" < "+p+".length; "+o+"++) {"),this._emitLine("var "+j+" = "+p+"["+o+"];"),this._emitLine('frame.set("'+r.name.value+'", '+j+");"),this._emitLoopBindings(r,p,o,a),this._withScopedSyntax(function(){s.compile(r.body,i)}),this._emitLine("}")}this._emitLine("}"),r.else_&&(this._emitLine("if (!"+a+") {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},l._compileAsyncLoop=function(r,i,s){var o=this,a=this._tmpid(),p=this._tmpid(),f=this._tmpid(),T=s?"asyncAll":"asyncEach";if(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(r.arr,i),this._emitLine(");"),r.name instanceof d.Array){var P=r.name.children.length;this._emit("runtime."+T+"("+f+", "+P+", function("),r.name.children.forEach(function(j){o._emit(j.value+",")}),this._emit(a+","+p+",next) {"),r.name.children.forEach(function(j){var b=j.value;i.set(b,b),o._emitLine('frame.set("'+b+'", '+b+");")})}else{var N=r.name.value;this._emitLine("runtime."+T+"("+f+", 1, function("+N+", "+a+", "+p+",next) {"),this._emitLine('frame.set("'+N+'", '+N+");"),i.set(N,N)}this._emitLoopBindings(r,f,a,p),this._withScopedSyntax(function(){var j;s&&(j=o._pushBuffer()),o.compile(r.body,i),o._emitLine("next("+a+(j?","+j:"")+");"),s&&o._popBuffer()});var F=this._tmpid();this._emitLine("}, "+this._makeCallback(F)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+F+";"),r.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},l.compileAsyncEach=function(r,i){this._compileAsyncLoop(r,i)},l.compileAsyncAll=function(r,i){this._compileAsyncLoop(r,i,!0)},l._compileMacro=function(r,i){var s=this,o=[],a=null,p="macro_"+this._tmpid(),f=i!==void 0;r.args.children.forEach(function(b,m){m===r.args.children.length-1&&b instanceof d.Dict?a=b:(s.assertType(b,d.Symbol),o.push(b))});var T=[].concat(o.map(function(b){return"l_"+b.value}),["kwargs"]),P=o.map(function(b){return'"'+b.value+'"'}),N=(a&&a.children||[]).map(function(b){return'"'+b.key.value+'"'}),F;f?F=i.push(!0):F=new A,this._emitLines("var "+p+" = runtime.makeMacro(","["+P.join(", ")+"], ","["+N.join(", ")+"], ","function ("+T.join(", ")+") {","var callerFrame = frame;","frame = "+(f?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),o.forEach(function(b){s._emitLine('frame.set("'+b.value+'", l_'+b.value+");"),F.set(b.value,"l_"+b.value)}),a&&a.children.forEach(function(b){var m=b.key.value;s._emit('frame.set("'+m+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+m+'")'),s._emit(' ? kwargs["'+m+'"] : '),s._compileExpression(b.value,F),s._emit(");")});var j=this._pushBuffer();return this._withScopedSyntax(function(){s.compile(r.body,F)}),this._emitLine("frame = "+(f?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+j+");"),this._emitLine("});"),this._popBuffer(),p},l.compileMacro=function(r,i){var s=this._compileMacro(r),o=r.name.value;i.set(o,s),i.parent?this._emitLine('frame.set("'+o+'", '+s+");"):(r.name.value.charAt(0)!=="_"&&this._emitLine('context.addExport("'+o+'");'),this._emitLine('context.setVariable("'+o+'", '+s+");"))},l.compileCaller=function(r,i){this._emit("(function (){");var s=this._compileMacro(r,i);this._emit("return "+s+";})()")},l._compileGetTemplate=function(r,i,s,o){var a=this._tmpid(),p=this._templateName(),f=this._makeCallback(a),T=s?"true":"false",P=o?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(r.template,i),this._emitLine(", "+T+", "+p+", "+P+", "+f),a},l.compileImport=function(r,i){var s=r.target.value,o=this._compileGetTemplate(r,i,!1,!1);this._addScopeLevel(),this._emitLine(o+".getExported("+(r.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(o)),this._addScopeLevel(),i.set(s,o),i.parent?this._emitLine('frame.set("'+s+'", '+o+");"):this._emitLine('context.setVariable("'+s+'", '+o+");")},l.compileFromImport=function(r,i){var s=this,o=this._compileGetTemplate(r,i,!1,!1);this._addScopeLevel(),this._emitLine(o+".getExported("+(r.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(o)),this._addScopeLevel(),r.names.children.forEach(function(a){var p,f,T=s._tmpid();a instanceof d.Pair?(p=a.key.value,f=a.value.value):(p=a.value,f=p),s._emitLine("if(Object.prototype.hasOwnProperty.call("+o+', "'+p+'")) {'),s._emitLine("var "+T+" = "+o+"."+p+";"),s._emitLine("} else {"),s._emitLine(`cb(new Error("cannot import '`+p+`'")); return;`),s._emitLine("}"),i.set(f,T),i.parent?s._emitLine('frame.set("'+f+'", '+T+");"):s._emitLine('context.setVariable("'+f+'", '+T+");")})},l.compileBlock=function(r){var i=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+r.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(i)),this._emitLine(this.buffer+" += "+i+";"),this._addScopeLevel()},l.compileSuper=function(r,i){var s=r.blockName.value,o=r.symbol.value,a=this._makeCallback(o);this._emitLine('context.getSuper(env, "'+s+'", b_'+s+", frame, runtime, "+a),this._emitLine(o+" = runtime.markSafe("+o+");"),this._addScopeLevel(),i.set(o,o)},l.compileExtends=function(r,i){var s=this._tmpid(),o=this._compileGetTemplate(r,i,!0,!1);this._emitLine("parentTemplate = "+o),this._emitLine("for(var "+s+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+s+", parentTemplate.blocks["+s+"]);"),this._emitLine("}"),this._addScopeLevel()},l.compileInclude=function(r,i){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var s=this._compileGetTemplate(r,i,!1,r.ignoreMissing);this._emitLine("callback(null,"+s+");});"),this._emitLine("});");var o=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(o)),this._emitLine("callback(null,"+o+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},l.compileTemplateData=function(r,i){this.compileLiteral(r,i)},l.compileCapture=function(r,i){var s=this,o=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax(function(){s.compile(r.body,i)}),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=o},l.compileOutput=function(r,i){var s=this,o=r.children;o.forEach(function(a){a instanceof d.TemplateData?a.value&&(s._emit(s.buffer+" += "),s.compileLiteral(a,i),s._emitLine(";")):(s._emit(s.buffer+" += runtime.suppressValue("),s.throwOnUndefined&&s._emit("runtime.ensureDefined("),s.compile(a,i),s.throwOnUndefined&&s._emit(","+r.lineno+","+r.colno+")"),s._emit(`, env.opts.autoescape);
|
|
17
|
-
`))})},l.compileRoot=function(r,i){var s=this;i&&this.fail("compileRoot: root node can't have frame"),i=new A,this._emitFuncBegin(r,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(r,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var o=[],a=r.findAll(d.Block);a.forEach(function(p,f){var T=p.name.value;if(o.indexOf(T)!==-1)throw new Error('Block "'+T+'" defined more than once.');o.push(T),s._emitFuncBegin(p,"b_"+T);var P=new A;s._emitLine("var frame = frame.push(true);"),s.compile(p.body,P),s._emitFuncEnd()}),this._emitLine("return {"),a.forEach(function(p,f){var T="b_"+p.name.value;s._emitLine(T+": "+T+",")}),this._emitLine(`root: root
|
|
18
|
-
};`)},l.compile=function(r,i){var s=this["compile"+r.typename];s?s.call(this,r,i):this.fail("compile: Cannot compile node: "+r.typename,r.lineno,r.colno)},l.getCode=function(){return this.codebuf.join("")},c}(_);k.exports={compile:function(c,l,u,r,i){i===void 0&&(i={});var s=new t(r,i.throwOnUndefined),o=(u||[]).map(function(p){return p.preprocess}).filter(function(p){return!!p}),a=o.reduce(function(p,f){return f(p)},c);return s.compile(g.transform(h.parse(a,u,i),l,r)),s.getCode()},Compiler:t}},function(k,I,L){function v(x,R){x.prototype=Object.create(R.prototype),x.prototype.constructor=x,E(x,R)}function E(x,R){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,y){return A.__proto__=y,A},E(x,R)}var h=L(4),g=L(1),d=g.EmitterObj;k.exports=function(x){v(R,x);function R(){return x.apply(this,arguments)||this}var C=R.prototype;return C.resolve=function(y,_){return h.resolve(h.dirname(y),_)},C.isRelative=function(y){return y.indexOf("./")===0||y.indexOf("../")===0},R}(d)},function(k,I,L){function v(P,N){P.prototype=Object.create(N.prototype),P.prototype.constructor=P,E(P,N)}function E(P,N){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,b){return j.__proto__=b,j},E(P,N)}var h=L(12),g=L(15),d=L(0),x=L(5),R=L(18),C=L(10),A=C.FileSystemLoader,y=C.WebLoader,_=C.PrecompiledLoader,e=L(20),t=L(21),n=L(1),c=n.Obj,l=n.EmitterObj,u=L(2),r=u.handleError,i=u.Frame,s=L(22);function o(P,N,F){h(function(){P(N,F)})}var a={type:"code",obj:{root:function(N,F,j,b,m){try{m(null,"")}catch(S){m(r(S,null,null))}}}},p=function(P){v(N,P);function N(){return P.apply(this,arguments)||this}var F=N.prototype;return F.init=function(b,m){var S=this;m=this.opts=m||{},this.opts.dev=!!m.dev,this.opts.autoescape=m.autoescape!=null?m.autoescape:!0,this.opts.throwOnUndefined=!!m.throwOnUndefined,this.opts.trimBlocks=!!m.trimBlocks,this.opts.lstripBlocks=!!m.lstripBlocks,this.loaders=[],b?this.loaders=d.isArray(b)?b:[b]:A?this.loaders=[new A("views")]:y&&(this.loaders=[new y("/views")]),typeof window<"u"&&window.nunjucksPrecompiled&&this.loaders.unshift(new _(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=t(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],d._entries(R).forEach(function(D){var U=D[0],z=D[1];return S.addFilter(U,z)}),d._entries(e).forEach(function(D){var U=D[0],z=D[1];return S.addTest(U,z)})},F._initLoaders=function(){var b=this;this.loaders.forEach(function(m){m.cache={},typeof m.on=="function"&&(m.on("update",function(S,D){m.cache[S]=null,b.emit("update",S,D,m)}),m.on("load",function(S,D){b.emit("load",S,D,m)}))})},F.invalidateCache=function(){this.loaders.forEach(function(b){b.cache={}})},F.addExtension=function(b,m){return m.__name=b,this.extensions[b]=m,this.extensionsList.push(m),this},F.removeExtension=function(b){var m=this.getExtension(b);m&&(this.extensionsList=d.without(this.extensionsList,m),delete this.extensions[b])},F.getExtension=function(b){return this.extensions[b]},F.hasExtension=function(b){return!!this.extensions[b]},F.addGlobal=function(b,m){return this.globals[b]=m,this},F.getGlobal=function(b){if(typeof this.globals[b]>"u")throw new Error("global not found: "+b);return this.globals[b]},F.addFilter=function(b,m,S){var D=m;return S&&this.asyncFilters.push(b),this.filters[b]=D,this},F.getFilter=function(b){if(!this.filters[b])throw new Error("filter not found: "+b);return this.filters[b]},F.addTest=function(b,m){return this.tests[b]=m,this},F.getTest=function(b){if(!this.tests[b])throw new Error("test not found: "+b);return this.tests[b]},F.resolveTemplate=function(b,m,S){var D=b.isRelative&&m?b.isRelative(S):!1;return D&&b.resolve?b.resolve(m,S):S},F.getTemplate=function(b,m,S,D,U){var z=this,ce=this,ne=null;if(b&&b.raw&&(b=b.raw),d.isFunction(S)&&(U=S,S=null,m=m||!1),d.isFunction(m)&&(U=m,m=!1),b instanceof T)ne=b;else{if(typeof b!="string")throw new Error("template names must be a string: "+b);for(var ye=0;ye<this.loaders.length;ye++){var Ee=this.loaders[ye];if(ne=Ee.cache[this.resolveTemplate(Ee,S,b)],ne)break}}if(ne)if(m&&ne.compile(),U){U(null,ne);return}else return ne;var ae,oe=function(Y,J){if(!J&&!Y&&!D&&(Y=new Error("template not found: "+b)),Y)if(U){U(Y);return}else throw Y;var pe;J?(pe=new T(J.src,z,J.path,m),J.noCache||(J.loader.cache[b]=pe)):pe=new T(a,z,"",m),U?U(null,pe):ae=pe};return d.asyncIter(this.loaders,function(G,Y,J,pe){function ke(be,Ce){be?pe(be):Ce?(Ce.loader=G,pe(null,Ce)):J()}b=ce.resolveTemplate(G,S,b),G.async?G.getSource(b,ke):ke(null,G.getSource(b))},oe),ae},F.express=function(b){return s(this,b)},F.render=function(b,m,S){d.isFunction(m)&&(S=m,m=null);var D=null;return this.getTemplate(b,function(U,z){if(U&&S)o(S,U);else{if(U)throw U;D=z.render(m,S)}}),D},F.renderString=function(b,m,S,D){d.isFunction(S)&&(D=S,S={}),S=S||{};var U=new T(b,this,S.path);return U.render(m,D)},F.waterfall=function(b,m,S){return g(b,m,S)},N}(l),f=function(P){v(N,P);function N(){return P.apply(this,arguments)||this}var F=N.prototype;return F.init=function(b,m,S){var D=this;this.env=S||new p,this.ctx=d.extend({},b),this.blocks={},this.exported=[],d.keys(m).forEach(function(U){D.addBlock(U,m[U])})},F.lookup=function(b){return b in this.env.globals&&!(b in this.ctx)?this.env.globals[b]:this.ctx[b]},F.setVariable=function(b,m){this.ctx[b]=m},F.getVariables=function(){return this.ctx},F.addBlock=function(b,m){return this.blocks[b]=this.blocks[b]||[],this.blocks[b].push(m),this},F.getBlock=function(b){if(!this.blocks[b])throw new Error('unknown block "'+b+'"');return this.blocks[b][0]},F.getSuper=function(b,m,S,D,U,z){var ce=d.indexOf(this.blocks[m]||[],S),ne=this.blocks[m][ce+1],ye=this;if(ce===-1||!ne)throw new Error('no super block available for "'+m+'"');ne(b,ye,D,U,z)},F.addExport=function(b){this.exported.push(b)},F.getExported=function(){var b=this,m={};return this.exported.forEach(function(S){m[S]=b.ctx[S]}),m},N}(c),T=function(P){v(N,P);function N(){return P.apply(this,arguments)||this}var F=N.prototype;return F.init=function(b,m,S,D){if(this.env=m||new p,d.isObject(b))switch(b.type){case"code":this.tmplProps=b.obj;break;case"string":this.tmplStr=b.obj;break;default:throw new Error("Unexpected template object type "+b.type+"; expected 'code', or 'string'")}else if(d.isString(b))this.tmplStr=b;else throw new Error("src must be a string or an object describing the source");if(this.path=S,D)try{this._compile()}catch(U){throw d._prettifyError(this.path,this.env.opts.dev,U)}else this.compiled=!1},F.render=function(b,m,S){var D=this;typeof b=="function"?(S=b,b={}):typeof m=="function"&&(S=m,m=null);var U=!m;try{this.compile()}catch(ae){var z=d._prettifyError(this.path,this.env.opts.dev,ae);if(S)return o(S,z);throw z}var ce=new f(b||{},this.blocks,this.env),ne=m?m.push(!0):new i;ne.topLevel=!0;var ye=null,Ee=!1;return this.rootRenderFunc(this.env,ce,ne,u,function(ae,oe){if(!(Ee&&S&&typeof oe<"u"))if(ae&&(ae=d._prettifyError(D.path,D.env.opts.dev,ae),Ee=!0),S)U?o(S,ae,oe):S(ae,oe);else{if(ae)throw ae;ye=oe}}),ye},F.getExported=function(b,m,S){typeof b=="function"&&(S=b,b={}),typeof m=="function"&&(S=m,m=null);try{this.compile()}catch(z){if(S)return S(z);throw z}var D=m?m.push():new i;D.topLevel=!0;var U=new f(b||{},this.blocks,this.env);this.rootRenderFunc(this.env,U,D,u,function(z){z?S(z,null):S(null,U.getExported())})},F.compile=function(){this.compiled||this._compile()},F._compile=function(){var b;if(this.tmplProps)b=this.tmplProps;else{var m=x.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts),S=new Function(m);b=S()}this.blocks=this._getBlocks(b),this.rootRenderFunc=b.root,this.compiled=!0},F._getBlocks=function(b){var m={};return d.keys(b).forEach(function(S){S.slice(0,2)==="b_"&&(m[S.slice(2)]=b[S])}),m},N}(c);k.exports={Environment:p,Template:T}},function(k,I,L){function v(C,A){C.prototype=Object.create(A.prototype),C.prototype.constructor=C,E(C,A)}function E(C,A){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_,e){return _.__proto__=e,_},E(C,A)}var h=L(9),g=L(3),d=L(1).Obj,x=L(0),R=function(C){v(A,C);function A(){return C.apply(this,arguments)||this}var y=A.prototype;return y.init=function(e){this.tokens=e,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},y.nextToken=function(e){var t;if(this.peeked)if(!e&&this.peeked.type===h.TOKEN_WHITESPACE)this.peeked=null;else return t=this.peeked,this.peeked=null,t;if(t=this.tokens.nextToken(),!e)for(;t&&t.type===h.TOKEN_WHITESPACE;)t=this.tokens.nextToken();return t},y.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},y.pushToken=function(e){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=e},y.error=function(e,t,n){if(t===void 0||n===void 0){var c=this.peekToken()||{};t=c.lineno,n=c.colno}return t!==void 0&&(t+=1),n!==void 0&&(n+=1),new x.TemplateError(e,t,n)},y.fail=function(e,t,n){throw this.error(e,t,n)},y.skip=function(e){var t=this.nextToken();return!t||t.type!==e?(this.pushToken(t),!1):!0},y.expect=function(e){var t=this.nextToken();return t.type!==e&&this.fail("expected "+e+", got "+t.type,t.lineno,t.colno),t},y.skipValue=function(e,t){var n=this.nextToken();return!n||n.type!==e||n.value!==t?(this.pushToken(n),!1):!0},y.skipSymbol=function(e){return this.skipValue(h.TOKEN_SYMBOL,e)},y.advanceAfterBlockEnd=function(e){var t;return e||(t=this.peekToken(),t||this.fail("unexpected end of file"),t.type!==h.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),e=this.nextToken().value),t=this.nextToken(),t&&t.type===h.TOKEN_BLOCK_END?t.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+e+" statement"),t},y.advanceAfterVariableEnd=function(){var e=this.nextToken();e&&e.type===h.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=e.value.charAt(e.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(e),this.fail("expected variable end"))},y.parseFor=function(){var e=this.peekToken(),t,n;this.skipSymbol("for")?(t=new g.For(e.lineno,e.colno),n="endfor"):this.skipSymbol("asyncEach")?(t=new g.AsyncEach(e.lineno,e.colno),n="endeach"):this.skipSymbol("asyncAll")?(t=new g.AsyncAll(e.lineno,e.colno),n="endall"):this.fail("parseFor: expected for{Async}",e.lineno,e.colno),t.name=this.parsePrimary(),t.name instanceof g.Symbol||this.fail("parseFor: variable name expected for loop");var c=this.peekToken().type;if(c===h.TOKEN_COMMA){var l=t.name;for(t.name=new g.Array(l.lineno,l.colno),t.name.addChild(l);this.skip(h.TOKEN_COMMA);){var u=this.parsePrimary();t.name.addChild(u)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',e.lineno,e.colno),t.arr=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks(n,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),t.else_=this.parseUntilBlocks(n)),this.advanceAfterBlockEnd(),t},y.parseMacro=function(){var e=this.peekToken();this.skipSymbol("macro")||this.fail("expected macro");var t=this.parsePrimary(!0),n=this.parseSignature(),c=new g.Macro(e.lineno,e.colno,t,n);return this.advanceAfterBlockEnd(e.value),c.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),c},y.parseCall=function(){var e=this.peekToken();this.skipSymbol("call")||this.fail("expected call");var t=this.parseSignature(!0)||new g.NodeList,n=this.parsePrimary();this.advanceAfterBlockEnd(e.value);var c=this.parseUntilBlocks("endcall");this.advanceAfterBlockEnd();var l=new g.Symbol(e.lineno,e.colno,"caller"),u=new g.Caller(e.lineno,e.colno,l,t,c),r=n.args.children;r[r.length-1]instanceof g.KeywordArgs||r.push(new g.KeywordArgs);var i=r[r.length-1];return i.addChild(new g.Pair(e.lineno,e.colno,l,u)),new g.Output(e.lineno,e.colno,[n])},y.parseWithContext=function(){var e=this.peekToken(),t=null;return this.skipSymbol("with")?t=!0:this.skipSymbol("without")&&(t=!1),t!==null&&(this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",e.lineno,e.colno)),t},y.parseImport=function(){var e=this.peekToken();this.skipSymbol("import")||this.fail("parseImport: expected import",e.lineno,e.colno);var t=this.parseExpression();this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',e.lineno,e.colno);var n=this.parseExpression(),c=this.parseWithContext(),l=new g.Import(e.lineno,e.colno,t,n,c);return this.advanceAfterBlockEnd(e.value),l},y.parseFrom=function(){var e=this.peekToken();this.skipSymbol("from")||this.fail("parseFrom: expected from");var t=this.parseExpression();this.skipSymbol("import")||this.fail("parseFrom: expected import",e.lineno,e.colno);for(var n=new g.NodeList,c;;){var l=this.peekToken();if(l.type===h.TOKEN_BLOCK_END){n.children.length||this.fail("parseFrom: Expected at least one import name",e.lineno,e.colno),l.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0),this.nextToken();break}n.children.length>0&&!this.skip(h.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var u=this.parsePrimary();if(u.value.charAt(0)==="_"&&this.fail("parseFrom: names starting with an underscore cannot be imported",u.lineno,u.colno),this.skipSymbol("as")){var r=this.parsePrimary();n.addChild(new g.Pair(u.lineno,u.colno,u,r))}else n.addChild(u);c=this.parseWithContext()}return new g.FromImport(e.lineno,e.colno,t,n,c)},y.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new g.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof g.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),t},y.parseExtends=function(){var e="extends",t=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var n=new g.Extends(t.lineno,t.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),n},y.parseInclude=function(){var e="include",t=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var n=new g.Include(t.lineno,t.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),n},y.parseIf=function(){var e=this.peekToken(),t;this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new g.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?t=new g.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},y.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t=new g.Set(e.lineno,e.colno,[]),n;(n=this.parsePrimary())&&(t.targets.push(n),!!this.skip(h.TOKEN_COMMA)););return this.skipValue(h.TOKEN_OPERATOR,"=")?(t.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(h.TOKEN_BLOCK_END)?(t.body=new g.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),t.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),t},y.parseSwitch=function(){var e="switch",t="endswitch",n="case",c="default",l=this.peekToken();!this.skipSymbol(e)&&!this.skipSymbol(n)&&!this.skipSymbol(c)&&this.fail('parseSwitch: expected "switch," "case" or "default"',l.lineno,l.colno);var u=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,c,t);var r=this.peekToken(),i=[],s;do{this.skipSymbol(n);var o=this.parseExpression();this.advanceAfterBlockEnd(e);var a=this.parseUntilBlocks(n,c,t);i.push(new g.Case(r.line,r.col,o,a)),r=this.peekToken()}while(r&&r.value===n);switch(r.value){case c:this.advanceAfterBlockEnd(),s=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new g.Switch(l.lineno,l.colno,u,i,s)},y.parseStatement=function(){var e=this.peekToken(),t;if(e.type!==h.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&x.indexOf(this.breakOnBlocks,e.value)!==-1)return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var n=0;n<this.extensions.length;n++){var c=this.extensions[n];if(x.indexOf(c.tags||[],e.value)!==-1)return c.parse(this,g,h)}this.fail("unknown block tag: "+e.value,e.lineno,e.colno)}return t},y.parseRaw=function(e){e=e||"raw";for(var t="end"+e,n=new RegExp("([\\s\\S]*?){%\\s*("+e+"|"+t+")\\s*(?=%})%}"),c=1,l="",u=null,r=this.advanceAfterBlockEnd();(u=this.tokens._extractRegex(n))&&c>0;){var i=u[0],s=u[1],o=u[2];o===e?c+=1:o===t&&(c-=1),c===0?(l+=s,this.tokens.backN(i.length-s.length)):l+=i}return new g.Output(r.lineno,r.colno,[new g.TemplateData(r.lineno,r.colno,l)])},y.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===h.TOKEN_LEFT_PAREN)e=new g.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===h.TOKEN_LEFT_BRACKET)t=this.parseAggregate(),t.children.length>1&&this.fail("invalid index"),e=new g.LookupVal(n.lineno,n.colno,e,t.children[0]);else if(n.type===h.TOKEN_OPERATOR&&n.value==="."){this.nextToken();var c=this.nextToken();c.type!==h.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+c.value,c.lineno,c.colno),t=new g.Literal(c.lineno,c.colno,c.value),e=new g.LookupVal(n.lineno,n.colno,e,t)}else break;n=this.peekToken()}return e},y.parseExpression=function(){var e=this.parseInlineIf();return e},y.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),n=e;e=new g.InlineIf(e.lineno,e.colno),e.body=n,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},y.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new g.Or(e.lineno,e.colno,e,t)}return e},y.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new g.And(e.lineno,e.colno,e,t)}return e},y.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new g.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},y.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===h.TOKEN_SYMBOL&&t.value==="not";if(n||this.pushToken(t),this.skipSymbol("in")){var c=this.parseIs();e=new g.In(e.lineno,e.colno,e,c),n&&(e=new g.Not(e.lineno,e.colno,e))}else{n&&this.pushToken(t);break}}return e},y.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),n=this.parseCompare();e=new g.Is(e.lineno,e.colno,e,n),t&&(e=new g.Not(e.lineno,e.colno,e))}return e},y.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var c=this.nextToken();if(c)if(e.indexOf(c.value)!==-1)n.push(new g.CompareOperand(c.lineno,c.colno,this.parseConcat(),c.value));else{this.pushToken(c);break}else break}return n.length?new g.Compare(n[0].lineno,n[0].colno,t,n):t},y.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(h.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new g.Concat(e.lineno,e.colno,e,t)}return e},y.parseAdd=function(){for(var e=this.parseSub();this.skipValue(h.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new g.Add(e.lineno,e.colno,e,t)}return e},y.parseSub=function(){for(var e=this.parseMul();this.skipValue(h.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new g.Sub(e.lineno,e.colno,e,t)}return e},y.parseMul=function(){for(var e=this.parseDiv();this.skipValue(h.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new g.Mul(e.lineno,e.colno,e,t)}return e},y.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(h.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new g.Div(e.lineno,e.colno,e,t)}return e},y.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(h.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new g.FloorDiv(e.lineno,e.colno,e,t)}return e},y.parseMod=function(){for(var e=this.parsePow();this.skipValue(h.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new g.Mod(e.lineno,e.colno,e,t)}return e},y.parsePow=function(){for(var e=this.parseUnary();this.skipValue(h.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new g.Pow(e.lineno,e.colno,e,t)}return e},y.parseUnary=function(e){var t=this.peekToken(),n;return this.skipValue(h.TOKEN_OPERATOR,"-")?n=new g.Neg(t.lineno,t.colno,this.parseUnary(!0)):this.skipValue(h.TOKEN_OPERATOR,"+")?n=new g.Pos(t.lineno,t.colno,this.parseUnary(!0)):n=this.parsePrimary(),e||(n=this.parseFilter(n)),n},y.parsePrimary=function(e){var t=this.nextToken(),n,c=null;if(t?t.type===h.TOKEN_STRING?n=t.value:t.type===h.TOKEN_INT?n=parseInt(t.value,10):t.type===h.TOKEN_FLOAT?n=parseFloat(t.value):t.type===h.TOKEN_BOOLEAN?t.value==="true"?n=!0:t.value==="false"?n=!1:this.fail("invalid boolean: "+t.value,t.lineno,t.colno):t.type===h.TOKEN_NONE?n=null:t.type===h.TOKEN_REGEX&&(n=new RegExp(t.value.body,t.value.flags)):this.fail("expected expression, got end of file"),n!==void 0?c=new g.Literal(t.lineno,t.colno,n):t.type===h.TOKEN_SYMBOL?c=new g.Symbol(t.lineno,t.colno,t.value):(this.pushToken(t),c=this.parseAggregate()),e||(c=this.parsePostfix(c)),c)return c;throw this.error("unexpected token: "+t.value,t.lineno,t.colno)},y.parseFilterName=function(){for(var e=this.expect(h.TOKEN_SYMBOL),t=e.value;this.skipValue(h.TOKEN_OPERATOR,".");)t+="."+this.expect(h.TOKEN_SYMBOL).value;return new g.Symbol(e.lineno,e.colno,t)},y.parseFilterArgs=function(e){if(this.peekToken().type===h.TOKEN_LEFT_PAREN){var t=this.parsePostfix(e);return t.args.children}return[]},y.parseFilter=function(e){for(;this.skip(h.TOKEN_PIPE);){var t=this.parseFilterName();e=new g.Filter(t.lineno,t.colno,t,new g.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},y.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var c=new g.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var l=new g.Filter(t.lineno,t.colno,t,new g.NodeList(t.lineno,t.colno,[c].concat(n)));return new g.Output(t.lineno,t.colno,[l])},y.parseAggregate=function(){var e=this.nextToken(),t;switch(e.type){case h.TOKEN_LEFT_PAREN:t=new g.Group(e.lineno,e.colno);break;case h.TOKEN_LEFT_BRACKET:t=new g.Array(e.lineno,e.colno);break;case h.TOKEN_LEFT_CURLY:t=new g.Dict(e.lineno,e.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===h.TOKEN_RIGHT_PAREN||n===h.TOKEN_RIGHT_BRACKET||n===h.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(h.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),t instanceof g.Dict){var c=this.parsePrimary();this.skip(h.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var l=this.parseExpression();t.addChild(new g.Pair(c.lineno,c.colno,c,l))}else{var u=this.parseExpression();t.addChild(u)}}return t},y.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==h.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===h.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var c=new g.NodeList(n.lineno,n.colno),l=new g.KeywordArgs(n.lineno,n.colno),u=!1;;){if(n=this.peekToken(),!t&&n.type===h.TOKEN_RIGHT_PAREN){this.nextToken();break}else if(t&&n.type===h.TOKEN_BLOCK_END)break;if(u&&!this.skip(h.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var r=this.parseExpression();this.skipValue(h.TOKEN_OPERATOR,"=")?l.addChild(new g.Pair(r.lineno,r.colno,r,this.parseExpression())):c.addChild(r)}u=!0}return l.children.length&&c.addChild(l),c},y.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),c=0;c<t;c++)n[c]=arguments[c];this.breakOnBlocks=n;var l=this.parse();return this.breakOnBlocks=e,l},y.parseNodes=function(){for(var e,t=[];e=this.nextToken();)if(e.type===h.TOKEN_DATA){var n=e.value,c=this.peekToken(),l=c&&c.value;this.dropLeadingWhitespace&&(n=n.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),c&&(c.type===h.TOKEN_BLOCK_START&&l.charAt(l.length-1)==="-"||c.type===h.TOKEN_VARIABLE_START&&l.charAt(this.tokens.tags.VARIABLE_START.length)==="-"||c.type===h.TOKEN_COMMENT&&l.charAt(this.tokens.tags.COMMENT_START.length)==="-")&&(n=n.replace(/\s*$/,"")),t.push(new g.Output(e.lineno,e.colno,[new g.TemplateData(e.lineno,e.colno,n)]))}else if(e.type===h.TOKEN_BLOCK_START){this.dropLeadingWhitespace=!1;var u=this.parseStatement();if(!u)break;t.push(u)}else if(e.type===h.TOKEN_VARIABLE_START){var r=this.parseExpression();this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),t.push(new g.Output(e.lineno,e.colno,[r]))}else e.type===h.TOKEN_COMMENT?this.dropLeadingWhitespace=e.value.charAt(e.value.length-this.tokens.tags.COMMENT_END.length-1)==="-":this.fail("Unexpected token at top-level: "+e.type,e.lineno,e.colno);return t},y.parse=function(){return new g.NodeList(0,0,this.parseNodes())},y.parseAsRoot=function(){return new g.Root(0,0,this.parseNodes())},A}(d);k.exports={parse:function(A,y,_){var e=new R(h.lex(A,_));return y!==void 0&&(e.extensions=y),e.parseAsRoot()},Parser:R}},function(k,I,L){var v=L(0),E=`
|
|
19
|
-
\r `,h="()[]{}%*-+~/#,:|.<>=!",g="0123456789",d="{%",x="%}",R="{{",C="}}",A="{#",y="#}",_="string",e="whitespace",t="data",n="block-start",c="block-end",l="variable-start",u="variable-end",r="comment",i="left-paren",s="right-paren",o="left-bracket",a="right-bracket",p="left-curly",f="right-curly",T="operator",P="comma",N="colon",F="tilde",j="pipe",b="int",m="float",S="boolean",D="none",U="symbol",z="special",ce="regex";function ne(Ee,ae,oe,G){return{type:Ee,value:ae,lineno:oe,colno:G}}var ye=function(){function Ee(oe,G){this.str=oe,this.index=0,this.len=oe.length,this.lineno=0,this.colno=0,this.in_code=!1,G=G||{};var Y=G.tags||{};this.tags={BLOCK_START:Y.blockStart||d,BLOCK_END:Y.blockEnd||x,VARIABLE_START:Y.variableStart||R,VARIABLE_END:Y.variableEnd||C,COMMENT_START:Y.commentStart||A,COMMENT_END:Y.commentEnd||y},this.trimBlocks=!!G.trimBlocks,this.lstripBlocks=!!G.lstripBlocks}var ae=Ee.prototype;return ae.nextToken=function(){var G=this.lineno,Y=this.colno,J;if(this.in_code){var pe=this.current();if(this.isFinished())return null;if(pe==='"'||pe==="'")return ne(_,this._parseString(pe),G,Y);if(J=this._extract(E))return ne(e,J,G,Y);if((J=this._extractString(this.tags.BLOCK_END))||(J=this._extractString("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&(pe=this.current(),pe===`
|
|
20
|
-
`?this.forward():pe==="\r"&&(this.forward(),pe=this.current(),pe===`
|
|
21
|
-
`?this.forward():this.back())),ne(c,J,G,Y);if((J=this._extractString(this.tags.VARIABLE_END))||(J=this._extractString("-"+this.tags.VARIABLE_END)))return this.in_code=!1,ne(u,J,G,Y);if(pe==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var ke="";!this.isFinished();)if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}else ke+=this.current(),this.forward();for(var be=["g","i","m","y"],Ce="";!this.isFinished();){var w=be.indexOf(this.current())!==-1;if(w)Ce+=this.current(),this.forward();else break}return ne(ce,{body:ke,flags:Ce},G,Y)}else if(h.indexOf(pe)!==-1){this.forward();var B=["==","===","!=","!==","<=",">=","//","**"],W=pe+this.current(),V;switch(v.indexOf(B,W)!==-1&&(this.forward(),pe=W,v.indexOf(B,W+this.current())!==-1&&(pe=W+this.current(),this.forward())),pe){case"(":V=i;break;case")":V=s;break;case"[":V=o;break;case"]":V=a;break;case"{":V=p;break;case"}":V=f;break;case",":V=P;break;case":":V=N;break;case"~":V=F;break;case"|":V=j;break;default:V=T}return ne(V,pe,G,Y)}else if(J=this._extractUntil(E+h),J.match(/^[-+]?[0-9]+$/))if(this.current()==="."){this.forward();var Z=this._extract(g);return ne(m,J+"."+Z,G,Y)}else return ne(b,J,G,Y);else{if(J.match(/^(true|false)$/))return ne(S,J,G,Y);if(J==="none")return ne(D,J,G,Y);if(J==="null")return ne(D,J,G,Y);if(J)return ne(U,J,G,Y);throw new Error("Unexpected value while parsing: "+J)}}else{var re=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((J=this._extractString(this.tags.BLOCK_START+"-"))||(J=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,ne(n,J,G,Y);if((J=this._extractString(this.tags.VARIABLE_START+"-"))||(J=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,ne(l,J,G,Y);J="";var de,le=!1;for(this._matches(this.tags.COMMENT_START)&&(le=!0,J=this._extractString(this.tags.COMMENT_START));(de=this._extractUntil(re))!==null;)if(J+=de,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!le){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=J.length){var ge=J.slice(-this.colno);if(/^\s+$/.test(ge)&&(J=J.slice(0,-this.colno),!J.length))return this.nextToken()}break}else if(this._matches(this.tags.COMMENT_END)){if(!le)throw new Error("unexpected end of comment");J+=this._extractString(this.tags.COMMENT_END);break}else J+=this.current(),this.forward();if(de===null&&le)throw new Error("expected end of comment, got end of file");return ne(le?r:t,J,G,Y)}},ae._parseString=function(G){this.forward();for(var Y="";!this.isFinished()&&this.current()!==G;){var J=this.current();if(J==="\\"){switch(this.forward(),this.current()){case"n":Y+=`
|
|
22
|
-
`;break;case"t":Y+=" ";break;case"r":Y+="\r";break;default:Y+=this.current()}this.forward()}else Y+=J,this.forward()}return this.forward(),Y},ae._matches=function(G){if(this.index+G.length>this.len)return null;var Y=this.str.slice(this.index,this.index+G.length);return Y===G},ae._extractString=function(G){return this._matches(G)?(this.forwardN(G.length),G):null},ae._extractUntil=function(G){return this._extractMatching(!0,G||"")},ae._extract=function(G){return this._extractMatching(!1,G)},ae._extractMatching=function(G,Y){if(this.isFinished())return null;var J=Y.indexOf(this.current());if(G&&J===-1||!G&&J!==-1){var pe=this.current();this.forward();for(var ke=Y.indexOf(this.current());(G&&ke===-1||!G&&ke!==-1)&&!this.isFinished();)pe+=this.current(),this.forward(),ke=Y.indexOf(this.current());return pe}return""},ae._extractRegex=function(G){var Y=this.currentStr().match(G);return Y?(this.forwardN(Y[0].length),Y):null},ae.isFinished=function(){return this.index>=this.len},ae.forwardN=function(G){for(var Y=0;Y<G;Y++)this.forward()},ae.forward=function(){this.index++,this.previous()===`
|
|
23
|
-
`?(this.lineno++,this.colno=0):this.colno++},ae.backN=function(G){for(var Y=0;Y<G;Y++)this.back()},ae.back=function(){if(this.index--,this.current()===`
|
|
24
|
-
`){this.lineno--;var G=this.src.lastIndexOf(`
|
|
25
|
-
`,this.index-1);G===-1?this.colno=this.index:this.colno=this.index-G}else this.colno--},ae.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},ae.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},ae.previous=function(){return this.str.charAt(this.index-1)},Ee}();k.exports={lex:function(ae,oe){return new ye(ae,oe)},TOKEN_STRING:_,TOKEN_WHITESPACE:e,TOKEN_DATA:t,TOKEN_BLOCK_START:n,TOKEN_BLOCK_END:c,TOKEN_VARIABLE_START:l,TOKEN_VARIABLE_END:u,TOKEN_COMMENT:r,TOKEN_LEFT_PAREN:i,TOKEN_RIGHT_PAREN:s,TOKEN_LEFT_BRACKET:o,TOKEN_RIGHT_BRACKET:a,TOKEN_LEFT_CURLY:p,TOKEN_RIGHT_CURLY:f,TOKEN_OPERATOR:T,TOKEN_COMMA:P,TOKEN_COLON:N,TOKEN_TILDE:F,TOKEN_PIPE:j,TOKEN_INT:b,TOKEN_FLOAT:m,TOKEN_BOOLEAN:S,TOKEN_NONE:D,TOKEN_SYMBOL:U,TOKEN_SPECIAL:z,TOKEN_REGEX:ce}},function(k,I,L){function v(R,C){R.prototype=Object.create(C.prototype),R.prototype.constructor=R,E(R,C)}function E(R,C){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(y,_){return y.__proto__=_,y},E(R,C)}var h=L(6),g=L(19),d=g.PrecompiledLoader,x=function(R){v(C,R);function C(y,_){var e;return e=R.call(this)||this,e.baseURL=y||".",_=_||{},e.useCache=!!_.useCache,e.async=!!_.async,e}var A=C.prototype;return A.resolve=function(_,e){throw new Error("relative templates not support in the browser yet")},A.getSource=function(_,e){var t=this,n=this.useCache,c;return this.fetch(this.baseURL+"/"+_,function(l,u){if(l)if(e)e(l.content);else if(l.status===404)c=null;else throw l.content;else c={src:u,path:_,noCache:!n},t.emit("load",_,c),e&&e(null,c)}),c},A.fetch=function(_,e){if(typeof window>"u")throw new Error("WebLoader can only by used in a browser");var t=new XMLHttpRequest,n=!0;t.onreadystatechange=function(){t.readyState===4&&n&&(n=!1,t.status===0||t.status===200?e(null,t.responseText):e({status:t.status,content:t.responseText}))},_+=(_.indexOf("?")===-1?"?":"&")+"s="+new Date().getTime(),t.open("GET",_,this.async),t.send()},C}(h);k.exports={WebLoader:x,PrecompiledLoader:d}},function(k,I,L){var v=L(0),E=L(7),h=E.Environment,g=E.Template,d=L(6),x=L(10),R=L(23),C=L(5),A=L(8),y=L(9),_=L(2),e=L(3),t=L(25),n;function c(l,u){u=u||{},v.isObject(l)&&(u=l,l=null);var r;return x.FileSystemLoader?r=new x.FileSystemLoader(l,{watch:u.watch,noCache:u.noCache}):x.WebLoader&&(r=new x.WebLoader(l,{useCache:u.web&&u.web.useCache,async:u.web&&u.web.async})),n=new h(r,u),u&&u.express&&n.express(u.express),n}k.exports={Environment:h,Template:g,Loader:d,FileSystemLoader:x.FileSystemLoader,NodeResolveLoader:x.NodeResolveLoader,PrecompiledLoader:x.PrecompiledLoader,WebLoader:x.WebLoader,compiler:C,parser:A,lexer:y,runtime:_,lib:v,nodes:e,installJinjaCompat:t,configure:c,reset:function(){n=void 0},compile:function(u,r,i,s){return n||c(),new g(u,r,i,s)},render:function(u,r,i){return n||c(),n.render(u,r,i)},renderString:function(u,r,i){return n||c(),n.renderString(u,r,i)},precompile:R?R.precompile:void 0,precompileString:R?R.precompileString:void 0}},function(k,I,L){var v=L(13),E=[],h=[],g=v.makeRequestCallFromTimer(d);function d(){if(h.length)throw h.shift()}k.exports=x;function x(C){var A;E.length?A=E.pop():A=new R,A.task=C,v(A)}function R(){this.task=null}R.prototype.call=function(){try{this.task.call()}catch(C){x.onerror?x.onerror(C):(h.push(C),g())}finally{this.task=null,E[E.length]=this}}},function(k,I,L){(function(v){k.exports=E;function E(e){h.length||g(),h[h.length]=e}var h=[],g,d=0,x=1024;function R(){for(;d<h.length;){var e=d;if(d=d+1,h[e].call(),d>x){for(var t=0,n=h.length-d;t<n;t++)h[t]=h[t+d];h.length-=d,d=0}}h.length=0,d=0}var C=typeof v<"u"?v:self,A=C.MutationObserver||C.WebKitMutationObserver;typeof A=="function"?g=y(R):g=_(R),E.requestFlush=g;function y(e){var t=1,n=new A(e),c=document.createTextNode("");return n.observe(c,{characterData:!0}),function(){t=-t,c.data=t}}function _(e){return function(){var n=setTimeout(l,0),c=setInterval(l,50);function l(){clearTimeout(n),clearInterval(c),e()}}}E.makeRequestCallFromTimer=_}).call(I,L(14))},function(k,I){var L;L=function(){return this}();try{L=L||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(L=window)}k.exports=L},function(k,I,L){var v,E;(function(h){var g=function(){var A=Array.prototype.slice.call(arguments);typeof A[0]=="function"&&A[0].apply(null,A.splice(1))},d=function(A){typeof setImmediate=="function"?setImmediate(A):typeof process<"u"&&process.nextTick?process.nextTick(A):setTimeout(A,0)},x=function(A){var y=function(_){var e=function(){return A.length&&A[_].apply(null,arguments),e.next()};return e.next=function(){return _<A.length-1?y(_+1):null},e};return y(0)},R=Array.isArray||function(A){return Object.prototype.toString.call(A)==="[object Array]"},C=function(A,y,_){var e=_?d:g;if(y=y||function(){},!R(A)){var t=new Error("First argument to waterfall must be an array of functions");return y(t)}if(!A.length)return y();var n=function(c){return function(l){if(l)y.apply(null,arguments),y=function(){};else{var u=Array.prototype.slice.call(arguments,1),r=c.next();r?u.push(n(r)):u.push(y),e(function(){c.apply(null,u)})}}};n(x(A))()};v=[],E=(function(){return C}).apply(I,v),E!==void 0&&(k.exports=E)})()},function(k,I,L){var v=typeof Reflect=="object"?Reflect:null,E=v&&typeof v.apply=="function"?v.apply:function(a,p,f){return Function.prototype.apply.call(a,p,f)},h;v&&typeof v.ownKeys=="function"?h=v.ownKeys:Object.getOwnPropertySymbols?h=function(a){return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a))}:h=function(a){return Object.getOwnPropertyNames(a)};function g(o){console&&console.warn&&console.warn(o)}var d=Number.isNaN||function(a){return a!==a};function x(){x.init.call(this)}k.exports=x,k.exports.once=r,x.EventEmitter=x,x.prototype._events=void 0,x.prototype._eventsCount=0,x.prototype._maxListeners=void 0;var R=10;function C(o){if(typeof o!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o)}Object.defineProperty(x,"defaultMaxListeners",{enumerable:!0,get:function(){return R},set:function(o){if(typeof o!="number"||o<0||d(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");R=o}}),x.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},x.prototype.setMaxListeners=function(a){if(typeof a!="number"||a<0||d(a))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+a+".");return this._maxListeners=a,this};function A(o){return o._maxListeners===void 0?x.defaultMaxListeners:o._maxListeners}x.prototype.getMaxListeners=function(){return A(this)},x.prototype.emit=function(a){for(var p=[],f=1;f<arguments.length;f++)p.push(arguments[f]);var T=a==="error",P=this._events;if(P!==void 0)T=T&&P.error===void 0;else if(!T)return!1;if(T){var N;if(p.length>0&&(N=p[0]),N instanceof Error)throw N;var F=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw F.context=N,F}var j=P[a];if(j===void 0)return!1;if(typeof j=="function")E(j,this,p);else for(var b=j.length,m=c(j,b),f=0;f<b;++f)E(m[f],this,p);return!0};function y(o,a,p,f){var T,P,N;if(C(p),P=o._events,P===void 0?(P=o._events=Object.create(null),o._eventsCount=0):(P.newListener!==void 0&&(o.emit("newListener",a,p.listener?p.listener:p),P=o._events),N=P[a]),N===void 0)N=P[a]=p,++o._eventsCount;else if(typeof N=="function"?N=P[a]=f?[p,N]:[N,p]:f?N.unshift(p):N.push(p),T=A(o),T>0&&N.length>T&&!N.warned){N.warned=!0;var F=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");F.name="MaxListenersExceededWarning",F.emitter=o,F.type=a,F.count=N.length,g(F)}return o}x.prototype.addListener=function(a,p){return y(this,a,p,!1)},x.prototype.on=x.prototype.addListener,x.prototype.prependListener=function(a,p){return y(this,a,p,!0)};function _(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function e(o,a,p){var f={fired:!1,wrapFn:void 0,target:o,type:a,listener:p},T=_.bind(f);return T.listener=p,f.wrapFn=T,T}x.prototype.once=function(a,p){return C(p),this.on(a,e(this,a,p)),this},x.prototype.prependOnceListener=function(a,p){return C(p),this.prependListener(a,e(this,a,p)),this},x.prototype.removeListener=function(a,p){var f,T,P,N,F;if(C(p),T=this._events,T===void 0)return this;if(f=T[a],f===void 0)return this;if(f===p||f.listener===p)--this._eventsCount===0?this._events=Object.create(null):(delete T[a],T.removeListener&&this.emit("removeListener",a,f.listener||p));else if(typeof f!="function"){for(P=-1,N=f.length-1;N>=0;N--)if(f[N]===p||f[N].listener===p){F=f[N].listener,P=N;break}if(P<0)return this;P===0?f.shift():l(f,P),f.length===1&&(T[a]=f[0]),T.removeListener!==void 0&&this.emit("removeListener",a,F||p)}return this},x.prototype.off=x.prototype.removeListener,x.prototype.removeAllListeners=function(a){var p,f,T;if(f=this._events,f===void 0)return this;if(f.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):f[a]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete f[a]),this;if(arguments.length===0){var P=Object.keys(f),N;for(T=0;T<P.length;++T)N=P[T],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(p=f[a],typeof p=="function")this.removeListener(a,p);else if(p!==void 0)for(T=p.length-1;T>=0;T--)this.removeListener(a,p[T]);return this};function t(o,a,p){var f=o._events;if(f===void 0)return[];var T=f[a];return T===void 0?[]:typeof T=="function"?p?[T.listener||T]:[T]:p?u(T):c(T,T.length)}x.prototype.listeners=function(a){return t(this,a,!0)},x.prototype.rawListeners=function(a){return t(this,a,!1)},x.listenerCount=function(o,a){return typeof o.listenerCount=="function"?o.listenerCount(a):n.call(o,a)},x.prototype.listenerCount=n;function n(o){var a=this._events;if(a!==void 0){var p=a[o];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}x.prototype.eventNames=function(){return this._eventsCount>0?h(this._events):[]};function c(o,a){for(var p=new Array(a),f=0;f<a;++f)p[f]=o[f];return p}function l(o,a){for(;a+1<o.length;a++)o[a]=o[a+1];o.pop()}function u(o){for(var a=new Array(o.length),p=0;p<a.length;++p)a[p]=o[p].listener||o[p];return a}function r(o,a){return new Promise(function(p,f){function T(N){o.removeListener(a,P),f(N)}function P(){typeof o.removeListener=="function"&&o.removeListener("error",T),p([].slice.call(arguments))}s(o,a,P,{once:!0}),a!=="error"&&i(o,T,{once:!0})})}function i(o,a,p){typeof o.on=="function"&&s(o,"error",a,p)}function s(o,a,p,f){if(typeof o.on=="function")f.once?o.once(a,p):o.on(a,p);else if(typeof o.addEventListener=="function")o.addEventListener(a,function T(P){f.once&&o.removeEventListener(a,T),p(P)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof o)}},function(k,I,L){var v=L(3),E=L(0),h=0;function g(){return"hole_"+h++}function d(n,c){for(var l=null,u=0;u<n.length;u++){var r=c(n[u]);r!==n[u]&&(l||(l=n.slice()),l[u]=r)}return l||n}function x(n,c,l){if(!(n instanceof v.Node))return n;if(!l){var u=c(n);if(u&&u!==n)return u}if(n instanceof v.NodeList){var r=d(n.children,function(p){return x(p,c,l)});r!==n.children&&(n=new v[n.typename](n.lineno,n.colno,r))}else if(n instanceof v.CallExtension){var i=x(n.args,c,l),s=d(n.contentArgs,function(p){return x(p,c,l)});(i!==n.args||s!==n.contentArgs)&&(n=new v[n.typename](n.extName,n.prop,i,s))}else{var o=n.fields.map(function(p){return n[p]}),a=d(o,function(p){return x(p,c,l)});a!==o&&(n=new v[n.typename](n.lineno,n.colno),a.forEach(function(p,f){n[n.fields[f]]=p}))}return l&&c(n)||n}function R(n,c){return x(n,c,!0)}function C(n,c,l){var u=[],r=R(l?n[l]:n,function(i){var s;return i instanceof v.Block?i:((i instanceof v.Filter&&E.indexOf(c,i.name.value)!==-1||i instanceof v.CallExtensionAsync)&&(s=new v.Symbol(i.lineno,i.colno,g()),u.push(new v.FilterAsync(i.lineno,i.colno,i.name,i.args,s))),s)});return l?n[l]=r:n=r,u.length?(u.push(n),new v.NodeList(n.lineno,n.colno,u)):n}function A(n,c){return R(n,function(l){return l instanceof v.Output?C(l,c):l instanceof v.Set?C(l,c,"value"):l instanceof v.For?C(l,c,"arr"):l instanceof v.If?C(l,c,"cond"):l instanceof v.CallExtension?C(l,c,"args"):void 0})}function y(n){return x(n,function(c){if(c instanceof v.Block){var l=!1,u=g();c.body=x(c.body,function(r){if(r instanceof v.FunCall&&r.name.value==="super")return l=!0,new v.Symbol(r.lineno,r.colno,u)}),l&&c.body.children.unshift(new v.Super(0,0,c.name,new v.Symbol(0,0,u)))}})}function _(n){return R(n,function(c){if(!(!(c instanceof v.If)&&!(c instanceof v.For))){var l=!1;if(x(c,function(u){if(u instanceof v.FilterAsync||u instanceof v.IfAsync||u instanceof v.AsyncEach||u instanceof v.AsyncAll||u instanceof v.CallExtensionAsync)return l=!0,u}),l){if(c instanceof v.If)return new v.IfAsync(c.lineno,c.colno,c.cond,c.body,c.else_);if(c instanceof v.For&&!(c instanceof v.AsyncAll))return new v.AsyncEach(c.lineno,c.colno,c.arr,c.name,c.body,c.else_)}}})}function e(n,c){return _(y(A(n,c)))}function t(n,c){return e(n,c||[])}k.exports={transform:t}},function(k,h,L){var v=L(0),E=L(2),h=k.exports={};function g(w,B){return w==null||w===!1?B:w}h.abs=Math.abs;function d(w){return w!==w}function x(w,B,W){var V,Z=[],re=[];for(V=0;V<w.length;V++)V%B===0&&re.length&&(Z.push(re),re=[]),re.push(w[V]);if(re.length){if(W)for(V=re.length;V<B;V++)re.push(W);Z.push(re)}return Z}h.batch=x;function R(w){w=g(w,"");var B=w.toLowerCase();return E.copySafeness(w,B.charAt(0).toUpperCase()+B.slice(1))}h.capitalize=R;function C(w,B){if(w=g(w,""),B=B||80,w.length>=B)return w;var W=B-w.length,V=v.repeat(" ",W/2-W%2),Z=v.repeat(" ",W/2);return E.copySafeness(w,V+w+Z)}h.center=C;function A(w,B,W){return W?w||B:w!==void 0?w:B}h.default=A;function y(w,B,W){if(!v.isObject(w))throw new v.TemplateError("dictsort filter: val must be an object");var V=[];for(var Z in w)V.push([Z,w[Z]]);var re;if(W===void 0||W==="key")re=0;else if(W==="value")re=1;else throw new v.TemplateError("dictsort filter: You can only sort by either key or value");return V.sort(function(de,le){var ge=de[re],M=le[re];return B||(v.isString(ge)&&(ge=ge.toUpperCase()),v.isString(M)&&(M=M.toUpperCase())),ge>M?1:ge===M?0:-1}),V}h.dictsort=y;function _(w,B){return JSON.stringify(w,null,B)}h.dump=_;function e(w){return w instanceof E.SafeString?w:(w=w??"",E.markSafe(v.escape(w.toString())))}h.escape=e;function t(w){return w instanceof E.SafeString?w:(w=w??"",E.markSafe(w.toString()))}h.safe=t;function n(w){return w[0]}h.first=n;function c(w){return w=w??"",E.markSafe(v.escape(w.toString()))}h.forceescape=c;function l(w,B){return v.groupBy(w,B,this.env.opts.throwOnUndefined)}h.groupby=l;function u(w,B,W){if(w=g(w,""),w==="")return"";B=B||4;var V=w.split(`
|
|
26
|
-
`),Z=v.repeat(" ",B),re=V.map(function(de,le){return le===0&&!W?de:""+Z+de}).join(`
|
|
27
|
-
`);return E.copySafeness(w,re)}h.indent=u;function r(w,B,W){return B=B||"",W&&(w=v.map(w,function(V){return V[W]})),w.join(B)}h.join=r;function i(w){return w[w.length-1]}h.last=i;function s(w){var B=g(w,"");return B!==void 0?typeof Map=="function"&&B instanceof Map||typeof Set=="function"&&B instanceof Set?B.size:v.isObject(B)&&!(B instanceof E.SafeString)?v.keys(B).length:B.length:0}h.length=s;function o(w){if(v.isString(w))return w.split("");if(v.isObject(w))return v._entries(w||{}).map(function(B){var W=B[0],V=B[1];return{key:W,value:V}});if(v.isArray(w))return w;throw new v.TemplateError("list filter: type not iterable")}h.list=o;function a(w){return w=g(w,""),w.toLowerCase()}h.lower=a;function p(w){return w==null?"":E.copySafeness(w,w.replace(/\r\n|\n/g,`<br />
|
|
28
|
-
`))}h.nl2br=p;function f(w){return w[Math.floor(Math.random()*w.length)]}h.random=f;function T(w){function B(W,V,Z){V===void 0&&(V="truthy");var re=this,de=re.env.getTest(V);return v.toArray(W).filter(function(ge){return de.call(re,ge,Z)===w})}return B}h.reject=T(!1);function P(w,B){return w.filter(function(W){return!W[B]})}h.rejectattr=P,h.select=T(!0);function N(w,B){return w.filter(function(W){return!!W[B]})}h.selectattr=N;function F(w,B,W,V){var Z=w;if(B instanceof RegExp)return w.replace(B,W);typeof V>"u"&&(V=-1);var re="";if(typeof B=="number")B=""+B;else if(typeof B!="string")return w;if(typeof w=="number"&&(w=""+w),typeof w!="string"&&!(w instanceof E.SafeString))return w;if(B==="")return re=W+w.split("").join(W)+W,E.copySafeness(w,re);var de=w.indexOf(B);if(V===0||de===-1)return w;for(var le=0,ge=0;de>-1&&(V===-1||ge<V);)re+=w.substring(le,de)+W,le=de+B.length,ge++,de=w.indexOf(B,le);return le<w.length&&(re+=w.substring(le)),E.copySafeness(Z,re)}h.replace=F;function j(w){var B;return v.isString(w)?B=o(w):B=v.map(w,function(W){return W}),B.reverse(),v.isString(w)?E.copySafeness(w,B.join("")):B}h.reverse=j;function b(w,B,W){B=B||0;var V=Math.pow(10,B),Z;return W==="ceil"?Z=Math.ceil:W==="floor"?Z=Math.floor:Z=Math.round,Z(w*V)/V}h.round=b;function m(w,B,W){for(var V=Math.floor(w.length/B),Z=w.length%B,re=[],de=0,le=0;le<B;le++){var ge=de+le*V;le<Z&&de++;var M=de+(le+1)*V,ie=w.slice(ge,M);W&&le>=Z&&ie.push(W),re.push(ie)}return re}h.slice=m;function S(w,B,W){return W===void 0&&(W=0),B&&(w=v.map(w,function(V){return V[B]})),W+w.reduce(function(V,Z){return V+Z},0)}h.sum=S,h.sort=E.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(B,W,V,Z){var re=this,de=v.map(B,function(ge){return ge}),le=v.getAttrGetter(Z);return de.sort(function(ge,M){var ie=Z?le(ge):ge,se=Z?le(M):M;if(re.env.opts.throwOnUndefined&&Z&&(ie===void 0||se===void 0))throw new TypeError('sort: attribute "'+Z+'" resolved to undefined');return!V&&v.isString(ie)&&v.isString(se)&&(ie=ie.toLowerCase(),se=se.toLowerCase()),ie<se?W?1:-1:ie>se?W?-1:1:0}),de});function D(w){return E.copySafeness(w,w)}h.string=D;function U(w,B){w=g(w,"");var W=/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,V=ce(w.replace(W,"")),Z="";return B?Z=V.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
|
|
29
|
-
`).replace(/\n\n\n+/g,`
|
|
30
|
-
|
|
31
|
-
`):Z=V.replace(/\s+/gi," "),E.copySafeness(w,Z)}h.striptags=U;function z(w){w=g(w,"");var B=w.split(" ").map(function(W){return R(W)});return E.copySafeness(w,B.join(" "))}h.title=z;function ce(w){return E.copySafeness(w,w.replace(/^\s*|\s*$/g,""))}h.trim=ce;function ne(w,B,W,V){var Z=w;if(w=g(w,""),B=B||255,w.length<=B)return w;if(W)w=w.substring(0,B);else{var re=w.lastIndexOf(" ",B);re===-1&&(re=B),w=w.substring(0,re)}return w+=V??"...",E.copySafeness(Z,w)}h.truncate=ne;function ye(w){return w=g(w,""),w.toUpperCase()}h.upper=ye;function Ee(w){var B=encodeURIComponent;if(v.isString(w))return B(w);var W=v.isArray(w)?w:v._entries(w);return W.map(function(V){var Z=V[0],re=V[1];return B(Z)+"="+B(re)}).join("&")}h.urlencode=Ee;var ae=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,oe=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,G=/^https?:\/\/.*$/,Y=/^www\./,J=/\.(?:org|net|com)(?:\:|\/|$)/;function pe(w,B,W){d(B)&&(B=1/0);var V=W===!0?' rel="nofollow"':"",Z=w.split(/(\s+)/).filter(function(re){return re&&re.length}).map(function(re){var de=re.match(ae),le=de?de[1]:re,ge=le.substr(0,B);return G.test(le)?'<a href="'+le+'"'+V+">"+ge+"</a>":Y.test(le)?'<a href="http://'+le+'"'+V+">"+ge+"</a>":oe.test(le)?'<a href="mailto:'+le+'">'+le+"</a>":J.test(le)?'<a href="http://'+le+'"'+V+">"+ge+"</a>":re});return Z.join("")}h.urlize=pe;function ke(w){w=g(w,"");var B=w?w.match(/\w+/g):null;return B?B.length:null}h.wordcount=ke;function be(w,B){var W=parseFloat(w);return d(W)?B:W}h.float=be;var Ce=E.makeMacro(["value","default","base"],[],function(B,W,V){V===void 0&&(V=10);var Z=parseInt(B,V);return d(Z)?W:Z});h.int=Ce,h.d=h.default,h.e=h.escape},function(k,I,L){function v(d,x){d.prototype=Object.create(x.prototype),d.prototype.constructor=d,E(d,x)}function E(d,x){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,A){return C.__proto__=A,C},E(d,x)}var h=L(6),g=function(d){v(x,d);function x(C){var A;return A=d.call(this)||this,A.precompiled=C||{},A}var R=x.prototype;return R.getSource=function(A){return this.precompiled[A]?{src:{type:"code",obj:this.precompiled[A]},path:A}:null},x}(h);k.exports={PrecompiledLoader:g}},function(k,I,L){var v=L(2).SafeString;function E(f){return typeof f=="function"}I.callable=E;function h(f){return f!==void 0}I.defined=h;function g(f,T){return f%T===0}I.divisibleby=g;function d(f){return f instanceof v}I.escaped=d;function x(f,T){return f===T}I.equalto=x,I.eq=I.equalto,I.sameas=I.equalto;function R(f){return f%2===0}I.even=R;function C(f){return!f}I.falsy=C;function A(f,T){return f>=T}I.ge=A;function y(f,T){return f>T}I.greaterthan=y,I.gt=I.greaterthan;function _(f,T){return f<=T}I.le=_;function e(f,T){return f<T}I.lessthan=e,I.lt=I.lessthan;function t(f){return f.toLowerCase()===f}I.lower=t;function n(f,T){return f!==T}I.ne=n;function c(f){return f===null}I.null=c;function l(f){return typeof f=="number"}I.number=l;function u(f){return f%2===1}I.odd=u;function r(f){return typeof f=="string"}I.string=r;function i(f){return!!f}I.truthy=i;function s(f){return f===void 0}I.undefined=s;function o(f){return f.toUpperCase()===f}I.upper=o;function a(f){return typeof Symbol<"u"?!!f[Symbol.iterator]:Array.isArray(f)||typeof f=="string"}I.iterable=a;function p(f){var T=f!=null&&typeof f=="object"&&!Array.isArray(f);return Set?T&&!(f instanceof Set):T}I.mapping=p},function(k,I,L){function v(g){var d=-1;return{current:null,reset:function(){d=-1,this.current=null},next:function(){return d++,d>=g.length&&(d=0),this.current=g[d],this.current}}}function E(g){g=g||",";var d=!0;return function(){var x=d?"":g;return d=!1,x}}function h(){return{range:function(d,x,R){typeof x>"u"?(x=d,d=0,R=1):R||(R=1);var C=[];if(R>0)for(var A=d;A<x;A+=R)C.push(A);else for(var y=d;y>x;y+=R)C.push(y);return C},cycler:function(){return v(Array.prototype.slice.call(arguments))},joiner:function(d){return E(d)}}}k.exports=h},function(k,I,L){var v=L(4);k.exports=function(h,g){function d(x,R){if(this.name=x,this.path=x,this.defaultEngine=R.defaultEngine,this.ext=v.extname(x),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=(this.defaultEngine[0]!=="."?".":"")+this.defaultEngine)}return d.prototype.render=function(R,C){h.render(this.name,R,C)},g.set("view",d),g.set("nunjucksEnv",h),h}},function(k,I,L){var v=L(4),E=L(4),h=L(0),g=h._prettifyError,d=L(5),x=L(7),R=x.Environment,C=L(24);function A(t,n){return Array.isArray(n)?n.some(function(c){return t.match(c)}):!1}function y(t,n){n=n||{},n.isString=!0;var c=n.env||new R([]),l=n.wrapper||C;if(!n.name)throw new Error('the "name" option is required when compiling a string');return l([e(t,n.name,c)],n)}function _(t,n){n=n||{};var c=n.env||new R([]),l=n.wrapper||C;if(n.isString)return y(t,n);var u=v.existsSync(t)&&v.statSync(t),r=[],i=[];function s(p){v.readdirSync(p).forEach(function(f){var T=E.join(p,f),P=T.substr(E.join(t,"/").length),N=v.statSync(T);N&&N.isDirectory()?(P+="/",A(P,n.exclude)||s(T)):A(P,n.include)&&i.push(T)})}if(u.isFile())r.push(e(v.readFileSync(t,"utf-8"),n.name||t,c));else if(u.isDirectory()){s(t);for(var o=0;o<i.length;o++){var a=i[o].replace(E.join(t,"/"),"");try{r.push(e(v.readFileSync(i[o],"utf-8"),a,c))}catch(p){if(n.force)console.error(p);else throw p}}}return l(r,n)}function e(t,n,c){c=c||new R([]);var l=c.asyncFilters,u=c.extensionsList,r;n=n.replace(/\\/g,"/");try{r=d.compile(t,l,u,n,c.opts)}catch(i){throw g(n,!1,i)}return{name:n,template:r}}k.exports={precompile:_,precompileString:y}},function(k,I,L){function v(E,h){var g="";h=h||{};for(var d=0;d<E.length;d++){var x=JSON.stringify(E[d].name),R=E[d].template;g+="(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["+x+`] = (function() {
|
|
32
|
-
`+R+`
|
|
33
|
-
})();
|
|
34
|
-
`,h.asFunction&&(g+="return function(ctx, cb) { return nunjucks.render("+x+`, ctx, cb); }
|
|
35
|
-
`),g+=`})();
|
|
36
|
-
`}return g}k.exports=v},function(k,I,L){function v(){var E=this.runtime,h=this.lib,g=this.compiler.Compiler,d=this.parser.Parser,x=this.nodes,R=this.lexer,C=E.contextOrFrameLookup,A=E.memberLookup,y,_;g&&(y=g.prototype.assertType),d&&(_=d.prototype.parseAggregate);function e(){E.contextOrFrameLookup=C,E.memberLookup=A,g&&(g.prototype.assertType=y),d&&(d.prototype.parseAggregate=_)}E.contextOrFrameLookup=function(s,o,a){var p=C.apply(this,arguments);if(p!==void 0)return p;switch(a){case"True":return!0;case"False":return!1;case"None":return null;default:return}};function t(i){return{index:i.index,lineno:i.lineno,colno:i.colno}}if(x&&g&&d){var n=x.Node.extend("Slice",{fields:["start","stop","step"],init:function(s,o,a,p,f){a=a||new x.Literal(s,o,null),p=p||new x.Literal(s,o,null),f=f||new x.Literal(s,o,1),this.parent(s,o,a,p,f)}});g.prototype.assertType=function(s){s instanceof n||y.apply(this,arguments)},g.prototype.compileSlice=function(s,o){this._emit("("),this._compileExpression(s.start,o),this._emit("),("),this._compileExpression(s.stop,o),this._emit("),("),this._compileExpression(s.step,o),this._emit(")")},d.prototype.parseAggregate=function(){var s=this,o=t(this.tokens);o.colno--,o.index--;try{return _.apply(this)}catch(j){var a=t(this.tokens),p=function(){return h._assign(s.tokens,a),j};h._assign(this.tokens,o),this.peeked=!1;var f=this.peekToken();if(f.type!==R.TOKEN_LEFT_BRACKET)throw p();this.nextToken();for(var T=new n(f.lineno,f.colno),P=!1,N=0;N<=T.fields.length&&!this.skip(R.TOKEN_RIGHT_BRACKET);N++){if(N===T.fields.length)if(P)this.fail("parseSlice: too many slice components",f.lineno,f.colno);else break;if(this.skip(R.TOKEN_COLON))P=!0;else{var F=T.fields[N];T[F]=this.parseExpression(),P=this.skip(R.TOKEN_COLON)||P}}if(!P)throw p();return new x.Array(f.lineno,f.colno,[T])}}}function c(i,s,o,a){i=i||[],s===null&&(s=a<0?i.length-1:0),o===null?o=a<0?-1:i.length:o<0&&(o+=i.length),s<0&&(s+=i.length);for(var p=[],f=s;!(f<0||f>i.length||a>0&&f>=o||a<0&&f<=o);f+=a)p.push(E.memberLookup(i,f));return p}function l(i,s){return Object.prototype.hasOwnProperty.call(i,s)}var u={pop:function(s){if(s===void 0)return this.pop();if(s>=this.length||s<0)throw new Error("KeyError");return this.splice(s,1)},append:function(s){return this.push(s)},remove:function(s){for(var o=0;o<this.length;o++)if(this[o]===s)return this.splice(o,1);throw new Error("ValueError")},count:function(s){for(var o=0,a=0;a<this.length;a++)this[a]===s&&o++;return o},index:function(s){var o;if((o=this.indexOf(s))===-1)throw new Error("ValueError");return o},find:function(s){return this.indexOf(s)},insert:function(s,o){return this.splice(s,0,o)}},r={items:function(){return h._entries(this)},values:function(){return h._values(this)},keys:function(){return h.keys(this)},get:function(s,o){var a=this[s];return a===void 0&&(a=o),a},has_key:function(s){return l(this,s)},pop:function(s,o){var a=this[s];if(a===void 0&&o!==void 0)a=o;else{if(a===void 0)throw new Error("KeyError");delete this[s]}return a},popitem:function(){var s=h.keys(this);if(!s.length)throw new Error("KeyError");var o=s[0],a=this[o];return delete this[o],[o,a]},setdefault:function(s,o){return o===void 0&&(o=null),s in this||(this[s]=o),this[s]},update:function(s){return h._assign(this,s),null}};return r.iteritems=r.items,r.itervalues=r.values,r.iterkeys=r.keys,E.memberLookup=function(s,o,a){return arguments.length===4?c.apply(this,arguments):(s=s||{},h.isArray(s)&&l(u,o)?u[o].bind(s):h.isObject(s)&&l(r,o)?r[o].bind(s):A.apply(this,arguments))},e}k.exports=v}])})})(Ot);var Fn=Ot.exports;const gt=Qt(Fn);var Bn=fe('<div class="flex items-center justify-between p-3 focus:outline-none focus:ring-0"><h2 class="text-xl font-semibold">Prompt</h2> <label class="flex items-center gap-2 text-sm"><input type="checkbox" class="rounded border-gray-300"/> Preview</label></div> <div class="h-full w-full"></div>',1);function Kn(H,K){Ie(K,!0);let k=_e(null),I,L=!1;He(()=>{if(I)return Et(()=>import("../chunks/DLQqXQ6R.js").then(x=>x.e),__vite__mapDeps([0,1,2]),import.meta.url).then(x=>{if(!O(k))$(k,x.editor.create(I,{value:"",language:"markdown",theme:"vs-dark",fontSize:14,fontFamily:'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',automaticLayout:!0,minimap:{enabled:!1},wordBasedSuggestions:"off",wordWrap:"wordWrapColumn",wordWrapColumn:90,matchBrackets:"never",bracketPairColorization:{enabled:!1},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,unicodeHighlight:{ambiguousCharacters:!1,nonBasicASCII:!1,invisibleCharacters:!1,includeStrings:!1,includeComments:!1},autoClosingQuotes:"never"}),!0),In(x,K.context);else{const C=O(k).getModel();C&&x.editor.setModelLanguage(C,"markdown")}const R=E(K.onPromptChanged,500);O(k).onDidChangeModelContent(()=>{if(!(L||!O(k)))try{const C=O(k).getValue();if(C===K.prompt)return;R(C)}catch(C){console.error("Error updating prompt",C)}})}),()=>{O(k)&&O(k).dispose()}}),He(()=>{O(k)&&O(k).setValue(K.prompt)});let v;function E(x,R=300){return(...C)=>{clearTimeout(v),v=setTimeout(()=>{x(...C)},R)}}function h(x,R){return gt.configure({autoescape:!1,trimBlocks:!0,lstripBlocks:!0}),gt.renderString(x,R||{})}let g="";function d(x){if(O(k)){if(L=!0,x.currentTarget.checked){g=O(k).getValue();const R=h(g,K.context||{});O(k).setValue(R),O(k).updateOptions({readOnly:!0})}else g&&(O(k).setValue(g),g=""),O(k).updateOptions({readOnly:!1});L=!1}}lt(H,{get class(){return`overflow-hidden ${K.class??""}`},children:(x,R)=>{var C=Bn(),A=Se(C),y=ue(ee(A),2),_=ee(y);_.__change=d,ut(),Q(y),Q(A);var e=ue(A,2);ft(e,t=>I=t,()=>I),te(x,C)}}),Re()}tt(["change"]);var Mn=fe('<div class="flex items-center justify-between p-3 focus:outline-none focus:ring-0"><h2 class="text-l font-semibold">Schema</h2></div> <div class="h-full w-full"></div>',1);function jn(H,K){Ie(K,!0);let k=_e(null),I;He(()=>{if(I)return window.MonacoEnvironment={getWorkerUrl(L,v){return v==="typescript"||v==="javascript"?"/monaco-editor/ts.worker.js":"/monaco-editor/editor.worker.js"}},Et(()=>import("../chunks/DLQqXQ6R.js").then(L=>L.e),__vite__mapDeps([0,1,2]),import.meta.url).then(L=>{O(k)?L.editor.setModelLanguage(O(k).getModel(),"typescript"):$(k,L.editor.create(I,{value:K.schema,language:"typescript",theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},matchBrackets:"never",bracketPairColorization:{enabled:!1},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,unicodeHighlight:{ambiguousCharacters:!1,nonBasicASCII:!1,invisibleCharacters:!1,includeStrings:!1,includeComments:!1},autoClosingQuotes:"never"}),!0),O(k).onDidChangeModelContent(()=>{const v=O(k).getValue();v!==K.schema&&K.onChange(v)})}),()=>{O(k)&&O(k).dispose()}}),He(()=>{O(k)&&O(k).setValue(K.schema)}),lt(H,{get class(){return`overflow-hidden ${K.class??""}`},children:(L,v)=>{var E=Mn(),h=ue(Se(E),2);ft(h,g=>I=g,()=>I),te(L,E)}}),Re()}function Dn(H){return--H*H*H*H*H+1}const yt=Ct(null);var Un=fe('<span class="chevron svelte-w21vlj"><!></span>'),Vn=fe('<ul class="children svelte-w21vlj"></ul>'),Wn=fe("<li><span> </span> <!></li> <!>",1);function Tt(H,K){Ie(K,!1);const k=()=>Kt(yt,"$selectedFilePath",I),[I,L]=Mt(),v=je(),E=je(),h=je(),g=je();let d=Me(K,"node",8),x=Me(K,"expanded",8);const R=_t();function C(){O(v)&&R("toggle",d().path)}function A(){if(O(v)){C();return}yt.set(d().path),R("selectFile",d().path)}ot(()=>Be(d()),()=>{$(v,d().type==="dir")}),ot(()=>(O(v),Be(x()),Be(d())),()=>{$(E,O(v)&&x().has(d().path))}),ot(()=>(Be(d()),k()),()=>{$(h,d().type==="file"&&k()===d().path)}),ot(()=>Be(d()),()=>{$(g,d().type==="file"&&/\.md$/i.test(d().name))}),wt(),xt();var y=Wn(),_=Se(y);let e;var t=ee(_);let n;var c=ee(t,!0);Q(t);var l=ue(t,2);{var u=s=>{var o=Un(),a=ee(o);{let p=Ft(()=>"opacity-60 transition-transform duration-150 ease-out "+(O(E)?"rotate-180":""));$e(a,{name:"chevron-down",width:20,height:20,get class(){return O(p)}})}Q(o),at("click",o,Yt(C)),te(s,o)};we(l,s=>{O(v)&&s(u)})}Q(_);var r=ue(_,2);{var i=s=>{var o=Vn();ze(o,5,()=>(Be(d()),dt(()=>d().children??[])),Ye,(a,p)=>{var f=De(),T=Se(f);Tt(T,{get node(){return O(p)},get expanded(){return x()},$$events:{selectFile(P){mt.call(this,K,P)},toggle(P){mt.call(this,K,P)}}}),te(a,f)}),Q(o),et(3,o,()=>jt,()=>({duration:150,easing:Dn})),te(s,o)};we(r,s=>{O(v)&&O(E)&&s(i)})}Ae((s,o)=>{e=Le(_,1,"row svelte-w21vlj",null,e,s),bt(_,"aria-expanded",O(v)?O(E):void 0),n=Le(t,1,"name svelte-w21vlj",null,n,o),Pe(c,(Be(d()),dt(()=>d().name)))},[()=>({selected:O(h)}),()=>({"text-rc-green-200":O(h),"opacity-60":!O(g)&&!O(h)})]),at("click",_,A),te(H,y),Re(),L()}var Gn=fe('<div class="p-2 text-rc-gray-300">Loading files…</div>'),Hn=fe('<div class="p-2 text-red-400"> </div>'),$n=fe('<div class="pb-2 pr-2"><ul class="file-tree svelte-1j61wgr"></ul></div>'),zn=fe('<div class="p-2 text-rc-gray-300">No files</div>'),Yn=fe('<div class="flex h-full flex-col overflow-auto"><!></div>');function Jn(H,K){Ie(K,!1);let k=Me(K,"project",8),I=Me(K,"agent",8);const L=_t();let v=je(null),E=je(!1),h=je(""),g=je(new Set);async function d(){if(!(!k()||!I())){$(E,!0),$(h,"");try{const t=await fetch(`/chat/api/files?project=${encodeURIComponent(k())}&tree=1`);if(!t.ok)throw new Error(await t.text());const n=await t.json();$(v,n.tree),$(g,new Set),O(v)&&x(O(v))}catch(t){$(h,(t==null?void 0:t.message)||"Failed to load tree")}finally{$(E,!1)}}}function x(t){if(t.type==="dir"){O(g).add(t.path);for(const n of t.children??[])x(n)}}function R(t){L("selectFile",t.detail)}function C(t){const n=t.detail;O(g).has(n)?O(g).delete(n):O(g).add(n),$(g,new Set(O(g)))}ot(()=>(Be(k()),Be(I())),()=>{k()&&I()&&d()}),wt(),xt();var A=Yn(),y=ee(A);{var _=t=>{var n=Gn();te(t,n)},e=t=>{var n=De(),c=Se(n);{var l=r=>{var i=Hn(),s=ee(i,!0);Q(i),Ae(()=>Pe(s,O(h))),te(r,i)},u=r=>{var i=De(),s=Se(i);{var o=p=>{var f=$n(),T=ee(f);ze(T,5,()=>(O(v),dt(()=>O(v).children??[])),Ye,(P,N)=>{Tt(P,{get node(){return O(N)},get expanded(){return O(g)},$$events:{selectFile:R,toggle:C}})}),Q(T),Q(f),te(p,f)},a=p=>{var f=zn();te(p,f)};we(s,p=>{O(v)?p(o):p(a,!1)},!0)}te(r,i)};we(c,r=>{O(h)?r(l):r(u,!1)},!0)}te(t,n)};we(y,t=>{O(E)?t(_):t(e,!1)})}Q(A),te(H,A),Re()}var Qn=(H,K,k)=>K(O(k).name),Xn=fe("<button><span> </span></button>"),qn=fe(`<div class="
|
|
37
|
-
absolute bottom-0 right-0 m-4 rounded-sm border border-red-500 bg-red-50
|
|
38
|
-
px-4 py-2 text-red-800 focus:outline-none focus:ring-0"> </div>`),Zn=fe('<div class="flex h-full flex-col bg-rc-gray-700 px-lg py-md"><nav class="flex h-14 flex-none items-center justify-between border-b border-b-gray-700 bg-rc-gray-700 text-gray-500"><div class="ml-3 flex items-center gap-5"><div class="flex items-center gap-2"><a href="https://recombine.ai/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1"><img src="/recombine.svg" alt="Recombine Logo" width="20" height="20" class="shrink-0"/> <span class="text-lg font-semibold text-rc-gray-100 hover:text-rc-green-200">Recombine</span></a></div> <!></div> <div class="ml-auto flex items-center gap-5"><!> <!></div></nav> <div class="flex-1 overflow-hidden"><div><div><!> <!></div> <div><!> <!></div> <!> <!></div> <div><div class="text-rc-gray-100">Connecting...</div></div></div> <!></div>');function wr(H,K){Ie(K,!0);let k,I=_e(qe([])),L=_e(qe([])),v=_e(null),E=_e(""),h=_e(qe([])),g=_e(null),d=_e(null),x=_e(null),R=_e(qe({})),C=_e(""),A=_e(!1),y=_e(null),_=_e(!1),e=_e(null),t=_e(!1),n=!1;function c(M){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(M)}function l(M,ie){if(typeof window>"u")return;const se=new URL(window.location.href);ie===null?se.searchParams.delete(M):se.searchParams.set(M,ie),Gt(se.toString(),{})}He(()=>{u();const M=se=>{var Te;const Oe=`Uncaught error: ${((Te=se.error)==null?void 0:Te.message)||se.message||"Unknown error"}`;$(C,Oe),setTimeout(()=>{$(C,"")},5e3),console.error("Global error:",se.error||se)},ie=se=>{var Te;const Oe=`Unhandled promise rejection: ${((Te=se.reason)==null?void 0:Te.message)||se.reason||"Unknown error"}`;$(C,Oe),setTimeout(()=>{$(C,"")},5e3),console.error("Unhandled promise rejection:",se.reason)};return window.addEventListener("error",M),window.addEventListener("unhandledrejection",ie),()=>{window.removeEventListener("error",M),window.removeEventListener("unhandledrejection",ie)}}),Pt(()=>{k&&k.close()});function u(){const M="ws://localhost:8080";console.log(`Initializing websocket connection with [${M}]`);try{k=new WebSocket(M)}catch{setTimeout(()=>{u()},100);return}k.onmessage=ie=>{r(JSON.parse(ie.data))},k.onerror=ie=>{console.log("Websocket error:",ie),n=!0,k==null||k.close()},k.onclose=()=>{console.log("Websocket closed"),$(A,!1),n?$(C,"WebSocket Error, please reload the browser"):setTimeout(u,300)},k.onopen=()=>{it(),$(A,!0),console.log("Websocket connected")}}function r(M){var ie;if(M.channel==="chat")cn(M.message);else if(M.channel==="log")fn(M.message);else if(M.channel=="actions")un(M.action);else if(M.channel==="app-events"){if(M.event.type==="agents-loaded"){$(I,M.event.agents,!0);const se=c("agent");$(E,se||O(I)[0],!0),l("agent",O(E)),it(),s({type:"select-agent",agent:O(E)})}else if(M.event.type==="context-updated")$(d,M.event.context,!0),M.event.promptContext&&$(x,M.event.promptContext,!0);else if(M.event.type==="prompt-updated")O(t)||($(g,M.event.prompt,!0),$(_,!!O(g),!0));else if(M.event.type==="delayed-actions-updated")$(R,M.event.actions,!0);else if(M.event.type==="update-states"){const se=O(h).length;$(h,M.event.states,!0),(!O(y)&&O(h).length>0||O(h).length>se)&&$(y,O(h)[O(h).length-1].id,!0)}else if(M.event.type==="agent-selected"){$(L,M.event.agent.steps,!0);const se=O(L).find(Oe=>Oe.name===c("step"));$(v,se||O(L)[0],!0),s({type:"step-selected",step:(ie=O(v))==null?void 0:ie.name})}}else M.channel==="error"&&($(C,M.message,!0),setTimeout(()=>{$(C,"")},5e3),console.error("Error:",M.message))}function i(M){k.send(JSON.stringify(M))}function s(M){i({channel:"app-events",event:M})}function o(M){console.log("Context changed",M),s({type:"context-updated",context:M})}function a(M){if(O(t)&&O(e)){const[ie]=(O(E)||"").split("/");ie&&fetch(`/chat/api/files?project=${encodeURIComponent(ie)}&path=${encodeURIComponent(O(e))}`,{method:"PUT",headers:{"content-type":"text/plain"},body:M}).then(()=>{}).catch(se=>console.error("Failed to save file:",se));return}s({type:"prompt-updated",prompt:M})}function p(M){s({type:"trigger-action",action:M})}function f(M){$(E,M,!0),l("agent",M),it(),$(y,null),$(t,!1),$(e,null),l("step",null),s({type:"select-agent",agent:M})}function T(M){$(y,M,!0),it(),s({type:"select-agent",agent:O(E),state:O(y)})}function P(){it(),$(y,null),s({type:"select-agent",agent:O(E),state:O(y)})}function N(M){$(v,O(L).find(ie=>ie.name===M)||null,!0),O(v)?l("step",O(v).name):l("step",null),s({type:"step-selected",step:M})}async function F(M){$(e,M,!0),$(t,!0);const[ie]=(O(E)||"").split("/");if(ie)try{const se=await fetch(`/chat/api/files?project=${encodeURIComponent(ie)}&path=${encodeURIComponent(M)}`);if(!se.ok)throw new Error(await se.text());const Oe=await se.json();$(g,(Oe==null?void 0:Oe.content)??"",!0),$(_,!0)}catch(se){console.error("Failed to load file:",se)}}const j=()=>Object.keys(O(R)).length>0,b=Ke(()=>{var M;return((M=O(v))==null?void 0:M.schema)??null}),m=Ke(()=>!!O(b)),S=Ke(()=>({sidebar:{width:"w-1/6",height:"h-full",visibility:"visible"},promptColumn:{width:"w-2/3",height:"h-full",visibility:O(_)?"visible":"hidden"},promptEditor:{width:"w-full",height:O(m)?"h-3/4":"h-full",visibility:O(_)?"visible":"hidden"},schemaEditor:{width:"w-full",height:"h-1/4",visibility:O(m)?"visible":"hidden"},chat:{width:O(_)?"w-1/3":"w-2/3",height:"h-full",visibility:"visible"},contextEditor:{width:j()?"w-1/4":"w-1/3",height:"h-full",visibility:"visible"}}));var D=Zn();Wt(M=>{Bt.title="Bosun: Playground"});var U=ee(D),z=ee(U),ce=ue(ee(z),2);Dt(ce,{get agents(){return O(I)},get currentAgent(){return O(E)},onSelect:f}),Q(z);var ne=ue(z,2),ye=ee(ne);{var Ee=M=>{nn(M,{get agentStates(){return O(h)},get currentState(){return O(y)},onSelectState:T})};we(ye,M=>{O(h).length>1&&M(Ee)})}var ae=ue(ye,2);Ge(ae,{onclick:P,children:(M,ie)=>{ut();var se=Ze("New chat");te(M,se)},$$slots:{default:!0}}),Q(ne),Q(U);var oe=ue(U,2),G=ee(oe),Y=ee(G),J=ee(Y);{var pe=M=>{ln(M,{get delayedActions(){return O(R)},handleTriggerAction:p})};we(J,M=>{j()&&M(pe)})}var ke=ue(J,2);{var be=M=>{var ie=De(),se=Se(ie);{var Oe=Te=>{var Fe=De(),Je=Se(Fe);Vt(Je,()=>O(E),Ve=>{Jn(Ve,{get project(){return(O(E)||"").split("/")[0]},get agent(){return(O(E)||"").split("/")[1]},$$events:{selectFile:Qe=>F(Qe.detail)}})}),te(Te,Fe)};we(se,Te=>{O(E)&&Te(Oe)})}te(M,ie)},Ce=M=>{var ie=De(),se=Se(ie);ze(se,17,()=>O(L),Ye,(Oe,Te)=>{var Fe=Xn();Fe.__click=[Qn,N,Te];var Je=ee(Fe),Ve=ee(Je,!0);Q(Je),Q(Fe),Ae(()=>{var Qe;Le(Fe,1,`border-l-2 p-2 text-left ${O(Te).name===((Qe=O(v))==null?void 0:Qe.name)?"border-l-rc-green-200 text-rc-green-200":"border-l-transparent"}`),Pe(Ve,O(Te).name)}),te(Oe,Fe)}),te(M,ie)};we(ke,M=>{K.data.leftPaneIsFiles?M(be):M(Ce,!1)})}Q(Y);var w=ue(Y,2),B=ee(w);{let M=Ke(()=>O(g)??"");Kn(B,{get class(){return`${O(S).promptEditor.height??""} ${O(S).promptEditor.width??""} border-thin border-t-0 border-rc-gray-300 focus:outline-none focus:ring-0`},get prompt(){return O(M)},get context(){return O(x)},onPromptChanged:a})}var W=ue(B,2);{var V=M=>{jn(M,{get class(){return`${O(S).schemaEditor.height??""} ${O(S).schemaEditor.width??""} border-thin border-t-0 border-rc-gray-300`},get schema(){return O(b)},onChange:console.log})};we(W,M=>{O(b)&&M(V)})}Q(w);var Z=ue(w,2);Pn(Z,{get class(){return`${O(S).chat.height??""} ${O(S).chat.width??""}`},get context(){return O(d)},get agentId(){return O(E)},onmessage:M=>i({channel:"chat",message:M})});var re=ue(Z,2);Ut(re,{get class(){return`${O(S).contextEditor.height??""} ${O(S).contextEditor.width??""} border-thin border-t-0 border-rc-gray-300 focus:outline-none focus:ring-0`},get context(){return O(d)},onContextChanged:o}),Q(G);var de=ue(G,2);Q(oe);var le=ue(oe,2);{var ge=M=>{var ie=qn(),se=ee(ie,!0);Q(ie),Ae(()=>Pe(se,O(C))),te(M,ie)};we(le,M=>{O(C)&&M(ge)})}Q(D),Ae(()=>{Le(G,1,`${O(A)?"flex":"hidden"} h-full w-full gap-1 border-thin border-rc-gray-300/40 focus:outline-none focus:ring-0`),Le(Y,1,`flex h-full ${O(S).sidebar.width??""} flex-col border-r-thin border-r-rc-gray-300 pt-4 text-rc-gray-200`),Le(w,1,`${O(S).promptColumn.visibility??""} ${O(S).promptColumn.height??""} ${O(S).promptColumn.width??""} flex-col`),Le(de,1,`${O(A)?"hidden":"flex"} h-full items-center justify-center`)}),te(H,D),Re()}tt(["click"]);export{wr as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as o}from"../chunks/D0iwhpLH.js";function r(e,t){throw new o(e,t.toString())}function n(){r(307,"/telescope/calls")}const c=Object.freeze(Object.defineProperty({__proto__:null,load:n},Symbol.toStringTag,{value:"Module"}));export{c as universal};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunks/CWj6FrbW.js";import"../chunks/9OGf6H2n.js";import{f as t,b as a,$ as r}from"../chunks/BdOqksoz.js";import{d as l,h as c}from"../chunks/DIiF2tGe.js";var s=e=>e.stopPropagation(),i=t('<div class="flex h-full w-full flex-col bg-rc-gray-700"><div class="flex-none border-b border-rc-gray-300/40 p-4"><h2 class="text-lg font-semibold text-rc-gray-100">Step Traces</h2></div> <div class="flex-1 overflow-auto p-4"><div class="py-8 text-center text-rc-gray-300">Select a call to view step traces</div></div></div>');function m(e){var o=i();c(d=>{r.title="Bosun: Telescope"}),o.__click=[s],a(e,o)}l(["click"]);export{m as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunks/CWj6FrbW.js";import"../chunks/9OGf6H2n.js";import{o as Ge}from"../chunks/CpZGG0E7.js";import{g as Je,i as ze,j as Fe,f as c,b as d,k as He,$ as Ke,s as i,d as s,m as e,n as T,u as o,e as t,o as m,q as O,a as Q,v as U,w as Qe}from"../chunks/BdOqksoz.js";import{s as g}from"../chunks/Be371ezp.js";import{p as Ue,i as p,s as Ve,a as Xe}from"../chunks/BDTuVTVZ.js";import{e as Ye,i as Ze}from"../chunks/C2Y9UxTx.js";import{d as er,h as rr}from"../chunks/DIiF2tGe.js";import{s as ar}from"../chunks/D5O98MXA.js";import{i as tr}from"../chunks/B8bx6-qu.js";import{m as sr,T as or,p as ir,C as S}from"../chunks/uzczSfVx.js";var vr=P=>P.stopPropagation(),lr=c('<span class="text-rc-gray-100">for call Id:</span> <span class="text-rc-green-200"> </span>',1),dr=c('<div class="py-8 text-center text-rc-gray-300">No call selected</div>'),nr=c('<div class="py-8 text-center text-rc-gray-200">Loading traces...</div>'),cr=c('<div class="py-8 text-center text-red-400"> </div>'),fr=c('<div class="py-8 text-center text-rc-gray-300">No step traces found</div>'),pr=(P,R,f)=>R(e(f).traceId),mr=c('<div class="mb-4"><div class="mb-1 font-semibold text-rc-gray-200">Rendered Prompt:</div> <!></div>'),_r=c('<div class="mb-4"><div class="mb-1 font-semibold text-rc-gray-200">Received Prompt:</div> <!></div>'),gr=c('<div class="mb-4"><div class="mb-1 font-semibold text-rc-gray-200">Received Context:</div> <!></div>'),ur=c('<div class="mb-4"><div class="mb-1 font-semibold text-rc-gray-200">Conversation:</div> <!></div>'),xr=c('<div class="mb-4"><div class="mb-1 font-semibold text-rc-gray-200">Response:</div> <!></div>'),br=c('<div class="border-t border-rc-gray-300 p-4"><!> <!> <!> <!> <!></div>'),yr=c('<li class="rounded-sm border border-rc-gray-300 bg-rc-gray-700"><button class="w-full p-4 text-left hover:bg-rc-gray-600"><div class="flex items-start justify-between"><h3 class="text-lg font-semibold text-rc-gray-100">Trace Id: <span class="text-rc-green-200"> </span></h3> <div class="flex items-center gap-3"><div class="text-sm text-rc-gray-200"> </div> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div></div> <div class="mt-2 text-sm text-rc-gray-200"> </div> <div class="mt-2 flex gap-6 text-sm text-rc-gray-300"><div> </div> <div> </div> <div> </div></div></button> <!></li>'),hr=c('<ul class="space-y-3"></ul>'),kr=c('<div class="flex h-full w-full flex-col bg-rc-gray-700"><div class="flex-none border-b border-rc-gray-300/40 p-4"><h2 class="text-lg font-semibold text-rc-gray-100">Step Traces <!></h2></div> <div class="flex-1 overflow-auto p-4"><!></div></div>');function jr(P,R){Je(R,!1);const f=()=>Xe(ir,"$page",le),[le,de]=Ve();let ne=Ue(R,"useMock",8,!1);const ce=new or(fetch);let u=T([]),q=T(!1),$=T(null),x=T(null),M=T(null);function fe(a){return new Date(a).toLocaleString()}async function V(a){if(!(!a||a===e(M))){m(M,a),m(q,!0),m($,null),m(x,null);try{if(ne())m(u,await sr.fetchStepTraces(a));else{const n=await ce.getStepTraces(a,50);m(u,n.items),console.log("Step Traces Response:",n),n.items&&n.items.length>0&&(console.log("One step trace, first:",n.items[0]),console.log("One step trace, second:",n.items[1]))}}catch(n){m($,n.message),m(u,[])}finally{m(q,!1)}}}function pe(a){m(x,e(x)===a?null:a)}Ge(()=>{const a=f().params.callId;a&&V(a)}),ze(()=>(f(),e(M)),()=>{const a=f().params.callId;a&&a!==e(M)&&V(a)}),Fe(),tr();var E=kr();rr(a=>{Ke.title="Bosun: Telescope"}),E.__click=[vr];var B=s(E),X=s(B),me=i(s(X));{var _e=a=>{var n=lr(),L=i(O(n),2),D=s(L,!0);t(L),Q(()=>g(D,(f(),o(()=>f().params.callId)))),d(a,n)};p(me,a=>{f(),o(()=>f().params.callId)&&a(_e)})}t(X),t(B);var Y=i(B,2),ge=s(Y);{var ue=a=>{var n=dr();d(a,n)},xe=a=>{var n=U(),L=O(n);{var D=b=>{var j=nr();d(b,j)},be=b=>{var j=U(),ye=O(j);{var he=y=>{var h=cr(),W=s(h);t(h),Q(()=>g(W,`Error: ${e($)??""}`)),d(y,h)},ke=y=>{var h=U(),W=O(h);{var we=k=>{var w=fr();d(k,w)},Ie=k=>{var w=hr();Ye(w,5,()=>e(u),Ze,(Ce,r)=>{var A=yr(),N=s(A);N.__click=[pr,pe,r];var G=s(N),J=s(G),Z=i(s(J)),Te=s(Z,!0);t(Z),t(J);var ee=i(J,2),z=s(ee),Se=s(z,!0);t(z);var Pe=i(z,2);let re;t(ee),t(G);var F=i(G,2),Re=s(F);t(F);var ae=i(F,2),H=s(ae),$e=s(H);t(H);var K=i(H,2),Me=s(K);t(K);var te=i(K,2),Ee=s(te);t(te),t(ae),t(N);var Le=i(N,2);{var je=I=>{var C=br(),se=s(C);{var Ne=v=>{var l=mr(),_=i(s(l),2);S(_,{get value(){return e(r),o(()=>e(r).renderedPrompt)},limit:360}),t(l),d(v,l)};p(se,v=>{e(r),o(()=>e(r).renderedPrompt)&&v(Ne)})}var oe=i(se,2);{var Oe=v=>{var l=_r(),_=i(s(l),2);S(_,{get value(){return e(r),o(()=>e(r).receivedPrompt)},limit:360}),t(l),d(v,l)};p(oe,v=>{e(r),o(()=>e(r).receivedPrompt)&&v(Oe)})}var ie=i(oe,2);{var qe=v=>{var l=gr(),_=i(s(l),2);{let Ae=Qe(()=>(e(r),o(()=>typeof e(r).receivedContext=="string"?e(r).receivedContext:JSON.stringify(e(r).receivedContext,null,2))));S(_,{get value(){return e(Ae)},limit:360})}t(l),d(v,l)};p(ie,v=>{e(r),o(()=>e(r).receivedContext)&&v(qe)})}var ve=i(ie,2);{var Be=v=>{var l=ur(),_=i(s(l),2);S(_,{get value(){return e(r),o(()=>e(r).stringifiedConversation)},limit:360}),t(l),d(v,l)};p(ve,v=>{e(r),o(()=>e(r).stringifiedConversation)&&v(Be)})}var De=i(ve,2);{var We=v=>{var l=xr(),_=i(s(l),2);S(_,{get value(){return e(r),o(()=>e(r).response)},limit:360}),t(l),d(v,l)};p(De,v=>{e(r),o(()=>e(r).response)&&v(We)})}t(C),d(I,C)};p(Le,I=>{e(x),e(r),o(()=>e(x)===e(r).traceId)&&I(je)})}t(A),Q((I,C)=>{g(Te,(e(r),o(()=>e(r).traceId))),g(Se,I),re=ar(Pe,0,"h-5 w-5 text-rc-gray-200 transition-transform",null,re,C),g(Re,`Model: ${e(r),o(()=>e(r).model)??""}`),g($e,`Scope Id: ${e(r),o(()=>e(r).scopeId)??""}`),g(Me,`Workflow Id: ${e(r),o(()=>e(r).workflowId)??""}`),g(Ee,`WorkflowRun Id: ${e(r),o(()=>e(r).workflowRunId)??""}`)},[()=>(e(r),o(()=>fe(e(r).createdAt))),()=>({"rotate-180":e(x)===e(r).traceId})]),d(Ce,A)}),t(w),d(k,w)};p(W,k=>{e(u),o(()=>!e(u).length)?k(we):k(Ie,!1)},!0)}d(y,h)};p(ye,y=>{e($)?y(he):y(ke,!1)},!0)}d(b,j)};p(L,b=>{e(q)?b(D):b(be,!1)},!0)}d(a,n)};p(ge,a=>{f(),o(()=>!f().params.callId)?a(ue):a(xe,!1)})}t(Y),t(E),d(P,E),He(),de()}er(["click"]);export{jr as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const index = 0;
|
|
2
|
-
let component_cache;
|
|
3
|
-
const component = async () => component_cache ??= (await import('./_layout.svelte-22nlfSFq.js')).default;
|
|
4
|
-
const imports = ["_app/immutable/nodes/0.BFGm6g4L.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/BdOqksoz.js","_app/immutable/chunks/CpdYAO0i.js"];
|
|
5
|
-
const stylesheets = ["_app/immutable/assets/0.7xdY7TSX.css"];
|
|
6
|
-
const fonts = [];
|
|
7
|
-
|
|
8
|
-
export { component, fonts, imports, index, stylesheets };
|
|
9
|
-
//# sourceMappingURL=0-DMd6Dk79.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"0-DMd6Dk79.js","sources":["../../../.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/0.BFGm6g4L.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BdOqksoz.js\",\"_app/immutable/chunks/CpdYAO0i.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.7xdY7TSX.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE;AAClG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5J,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const index = 1;
|
|
2
|
-
let component_cache;
|
|
3
|
-
const component = async () => component_cache ??= (await import('./error.svelte-DNcHZkvg.js')).default;
|
|
4
|
-
const imports = ["_app/immutable/nodes/1.B_l4Mw8E.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/9OGf6H2n.js","_app/immutable/chunks/BdOqksoz.js","_app/immutable/chunks/Be371ezp.js","_app/immutable/chunks/DIiF2tGe.js","_app/immutable/chunks/B8bx6-qu.js","_app/immutable/chunks/C681lv5i.js","_app/immutable/chunks/CpZGG0E7.js","_app/immutable/chunks/CpdYAO0i.js","_app/immutable/chunks/D0iwhpLH.js"];
|
|
5
|
-
const stylesheets = [];
|
|
6
|
-
const fonts = [];
|
|
7
|
-
|
|
8
|
-
export { component, fonts, imports, index, stylesheets };
|
|
9
|
-
//# sourceMappingURL=1-Cwk3hpe9.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const index = 10;
|
|
2
|
-
let component_cache;
|
|
3
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-nsIWq28L.js')).default;
|
|
4
|
-
const imports = ["_app/immutable/nodes/10.Bdd6Le3Q.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/BdOqksoz.js","_app/immutable/chunks/DIiF2tGe.js","_app/immutable/chunks/CpdYAO0i.js","_app/immutable/chunks/BTGV3Gq0.js","_app/immutable/chunks/D_4dC3JZ.js","_app/immutable/chunks/Be371ezp.js","_app/immutable/chunks/D5O98MXA.js","_app/immutable/chunks/Bmx4ManB.js","_app/immutable/chunks/BDTuVTVZ.js","_app/immutable/chunks/CpZGG0E7.js","_app/immutable/chunks/CYuXdPQc.js"];
|
|
5
|
-
const stylesheets = ["_app/immutable/assets/Dropdown.DUA3rl5D.css","_app/immutable/assets/10.C1o6a69m.css"];
|
|
6
|
-
const fonts = [];
|
|
7
|
-
|
|
8
|
-
export { component, fonts, imports, index, stylesheets };
|
|
9
|
-
//# sourceMappingURL=10-Ci_AhluU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"10-Ci_AhluU.js","sources":["../../../.svelte-kit/adapter-node/nodes/10.js"],"sourcesContent":["\n\nexport const index = 10;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/tests/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/10.Bdd6Le3Q.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BdOqksoz.js\",\"_app/immutable/chunks/DIiF2tGe.js\",\"_app/immutable/chunks/CpdYAO0i.js\",\"_app/immutable/chunks/BTGV3Gq0.js\",\"_app/immutable/chunks/D_4dC3JZ.js\",\"_app/immutable/chunks/Be371ezp.js\",\"_app/immutable/chunks/D5O98MXA.js\",\"_app/immutable/chunks/Bmx4ManB.js\",\"_app/immutable/chunks/BDTuVTVZ.js\",\"_app/immutable/chunks/CpZGG0E7.js\",\"_app/immutable/chunks/CYuXdPQc.js\"];\nexport const stylesheets = [\"_app/immutable/assets/Dropdown.DUA3rl5D.css\",\"_app/immutable/assets/10.C1o6a69m.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAwC,CAAC,EAAE;AACtG,MAAC,OAAO,GAAG,CAAC,qCAAqC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACje,MAAC,WAAW,GAAG,CAAC,6CAA6C,CAAC,uCAAuC;AACrG,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const index = 2;
|
|
2
|
-
let component_cache;
|
|
3
|
-
const component = async () => component_cache ??= (await import('./_layout.svelte-BoAJDYC1.js')).default;
|
|
4
|
-
const imports = ["_app/immutable/nodes/2.DPpr5BK7.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/CpZGG0E7.js","_app/immutable/chunks/BdOqksoz.js","_app/immutable/chunks/Be371ezp.js","_app/immutable/chunks/DIiF2tGe.js","_app/immutable/chunks/CpdYAO0i.js","_app/immutable/chunks/BDTuVTVZ.js","_app/immutable/chunks/C2Y9UxTx.js","_app/immutable/chunks/D_4dC3JZ.js","_app/immutable/chunks/D5O98MXA.js","_app/immutable/chunks/C681lv5i.js","_app/immutable/chunks/D0iwhpLH.js","_app/immutable/chunks/uzczSfVx.js","_app/immutable/chunks/9OGf6H2n.js","_app/immutable/chunks/B8bx6-qu.js","_app/immutable/chunks/BTGV3Gq0.js","_app/immutable/chunks/Bmx4ManB.js","_app/immutable/chunks/BUoURvZ_.js","_app/immutable/chunks/2PVbuV1X.js"];
|
|
5
|
-
const stylesheets = ["_app/immutable/assets/Input.CF8n5W0I.css"];
|
|
6
|
-
const fonts = [];
|
|
7
|
-
|
|
8
|
-
export { component, fonts, imports, index, stylesheets };
|
|
9
|
-
//# sourceMappingURL=2-BLxdw-8l.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"2-BLxdw-8l.js","sources":["../../../.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/telescope/calls/_layout.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/2.DPpr5BK7.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/CpZGG0E7.js\",\"_app/immutable/chunks/BdOqksoz.js\",\"_app/immutable/chunks/Be371ezp.js\",\"_app/immutable/chunks/DIiF2tGe.js\",\"_app/immutable/chunks/CpdYAO0i.js\",\"_app/immutable/chunks/BDTuVTVZ.js\",\"_app/immutable/chunks/C2Y9UxTx.js\",\"_app/immutable/chunks/D_4dC3JZ.js\",\"_app/immutable/chunks/D5O98MXA.js\",\"_app/immutable/chunks/C681lv5i.js\",\"_app/immutable/chunks/D0iwhpLH.js\",\"_app/immutable/chunks/uzczSfVx.js\",\"_app/immutable/chunks/9OGf6H2n.js\",\"_app/immutable/chunks/B8bx6-qu.js\",\"_app/immutable/chunks/BTGV3Gq0.js\",\"_app/immutable/chunks/Bmx4ManB.js\",\"_app/immutable/chunks/BUoURvZ_.js\",\"_app/immutable/chunks/2PVbuV1X.js\"];\nexport const stylesheets = [\"_app/immutable/assets/Input.CF8n5W0I.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoD,CAAC,EAAE;AAClH,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5tB,MAAC,WAAW,GAAG,CAAC,0CAA0C;AAC1D,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { r as redirect } from './index-Djsj11qr.js';
|
|
2
|
-
|
|
3
|
-
function load() {
|
|
4
|
-
redirect(307, "/chat");
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
8
|
-
__proto__: null,
|
|
9
|
-
load: load
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const index = 3;
|
|
13
|
-
const server_id = "src/routes/+page.server.ts";
|
|
14
|
-
const imports = [];
|
|
15
|
-
const stylesheets = [];
|
|
16
|
-
const fonts = [];
|
|
17
|
-
|
|
18
|
-
export { fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
|
19
|
-
//# sourceMappingURL=3-DGFu_uy6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"3-DGFu_uy6.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/3.js"],"sourcesContent":["import { redirect } from \"@sveltejs/kit\";\nfunction load() {\n redirect(307, \"/chat\");\n}\nexport {\n load\n};\n","import * as server from '../entries/pages/_page.server.ts.js';\n\nexport const index = 3;\nexport { server };\nexport const server_id = \"src/routes/+page.server.ts\";\nexport const imports = [];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;AACA,SAAS,IAAI,GAAG;AAChB,EAAE,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;AACxB;;;;;;;ACDY,MAAC,KAAK,GAAG;AAET,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG;AACX,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
const load = async ({ params }) => {
|
|
2
|
-
return {
|
|
3
|
-
project: params.project,
|
|
4
|
-
agent: params.agent
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
var _page_ts = /*#__PURE__*/Object.freeze({
|
|
9
|
-
__proto__: null,
|
|
10
|
-
load: load
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const index = 4;
|
|
14
|
-
let component_cache;
|
|
15
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-CNhxx79k.js')).default;
|
|
16
|
-
const universal_id = "src/routes/academy/[project]/[agent]/+page.ts";
|
|
17
|
-
const imports = ["_app/immutable/nodes/4.BokOq116.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/CpZGG0E7.js","_app/immutable/chunks/BdOqksoz.js","_app/immutable/chunks/Be371ezp.js","_app/immutable/chunks/DIiF2tGe.js","_app/immutable/chunks/CpdYAO0i.js","_app/immutable/chunks/BDTuVTVZ.js","_app/immutable/chunks/C2Y9UxTx.js","_app/immutable/chunks/D_4dC3JZ.js","_app/immutable/chunks/D5O98MXA.js","_app/immutable/chunks/2PVbuV1X.js","_app/immutable/chunks/ISgeSat5.js","_app/immutable/chunks/DveC87gn.js","_app/immutable/chunks/C1FmrZbK.js","_app/immutable/chunks/Bmx4ManB.js","_app/immutable/chunks/BTGV3Gq0.js","_app/immutable/chunks/CYuXdPQc.js","_app/immutable/chunks/CtpS-ZbM.js"];
|
|
18
|
-
const stylesheets = ["_app/immutable/assets/Dropdown.DUA3rl5D.css","_app/immutable/assets/4.858mUNwe.css"];
|
|
19
|
-
const fonts = [];
|
|
20
|
-
|
|
21
|
-
export { component, fonts, imports, index, stylesheets, _page_ts as universal, universal_id };
|
|
22
|
-
//# sourceMappingURL=4-MwbWFUCO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"4-MwbWFUCO.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/academy/_project_/_agent_/_page.ts.js","../../../.svelte-kit/adapter-node/nodes/4.js"],"sourcesContent":["const load = async ({ params }) => {\n return {\n project: params.project,\n agent: params.agent\n };\n};\nexport {\n load\n};\n","import * as universal from '../entries/pages/academy/_project_/_agent_/_page.ts.js';\n\nexport const index = 4;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/academy/_project_/_agent_/_page.svelte.js')).default;\nexport { universal };\nexport const universal_id = \"src/routes/academy/[project]/[agent]/+page.ts\";\nexport const imports = [\"_app/immutable/nodes/4.BokOq116.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/CpZGG0E7.js\",\"_app/immutable/chunks/BdOqksoz.js\",\"_app/immutable/chunks/Be371ezp.js\",\"_app/immutable/chunks/DIiF2tGe.js\",\"_app/immutable/chunks/CpdYAO0i.js\",\"_app/immutable/chunks/BDTuVTVZ.js\",\"_app/immutable/chunks/C2Y9UxTx.js\",\"_app/immutable/chunks/D_4dC3JZ.js\",\"_app/immutable/chunks/D5O98MXA.js\",\"_app/immutable/chunks/2PVbuV1X.js\",\"_app/immutable/chunks/ISgeSat5.js\",\"_app/immutable/chunks/DveC87gn.js\",\"_app/immutable/chunks/C1FmrZbK.js\",\"_app/immutable/chunks/Bmx4ManB.js\",\"_app/immutable/chunks/BTGV3Gq0.js\",\"_app/immutable/chunks/CYuXdPQc.js\",\"_app/immutable/chunks/CtpS-ZbM.js\"];\nexport const stylesheets = [\"_app/immutable/assets/Dropdown.DUA3rl5D.css\",\"_app/immutable/assets/4.858mUNwe.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK;AACnC,EAAE,OAAO;AACT,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO;AAC3B,IAAI,KAAK,EAAE,MAAM,CAAC;AAClB,GAAG;AACH,CAAC;;;;;;;ACHW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA4D,CAAC,EAAE;AAE1H,MAAC,YAAY,GAAG;AAChB,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxrB,MAAC,WAAW,GAAG,CAAC,6CAA6C,CAAC,sCAAsC;AACpG,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"5-p3BDfNc2.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/academy/_project_/_agent_/view/_type_/_id_/_page.ts.js","../../../.svelte-kit/adapter-node/entries/pages/academy/_project_/_agent_/view/_type_/_id_/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/5.js"],"sourcesContent":["const load = async ({ params }) => {\n return {\n project: params.project,\n agent: params.agent,\n type: params.type,\n id: params.id\n };\n};\nexport {\n load\n};\n","import path from \"node:path\";\nimport { readFile } from \"node:fs/promises\";\nimport { a as getProjectRootPath } from \"../../../../../../../../chunks/index3.js\";\nconst load = async ({ params, url }) => {\n const { project, agent, type, id } = params;\n const ts = url.searchParams.get(\"ts\") || void 0;\n const runParam = url.searchParams.get(\"run\") || void 0;\n const projectRoot = await getProjectRootPath(project);\n const outDir = path.join(projectRoot, \"data\", \"test_runs\");\n const file = `${agent}.${(ts || \"\").replace(/:/g, \"-\")}.report.json`;\n const reportPath = ts ? path.join(outDir, file) : null;\n async function readLatestPath() {\n const { readdir } = await import(\"node:fs/promises\");\n const entries = await readdir(outDir);\n const prefix = `${agent}.`;\n const suffix = `.report.json`;\n const candidates = entries.filter((n) => n.startsWith(prefix) && n.endsWith(suffix)).sort();\n if (!candidates.length) throw new Error(\"No reports found\");\n return path.join(outDir, candidates[candidates.length - 1]);\n }\n const chosen = reportPath || await readLatestPath();\n const raw = await readFile(chosen, \"utf8\");\n const parsed = JSON.parse(raw);\n const rows = Array.isArray(parsed) ? parsed : parsed?.rows;\n const row = rows.find((r) => String(r.test_id) === id) || rows[Number(id)];\n if (!row) throw new Error(\"Row not found in report\");\n const runs = Array.isArray(row.results) ? row.results : [];\n const index = (() => {\n if (!runParam) return 0;\n const n = Number(runParam);\n if (!isFinite(n)) return 0;\n return Math.max(0, Math.min(runs.length - 1, n - 1));\n })();\n const run = runs[index];\n if (!run) throw new Error(\"Run not found for row\");\n let content = \"\";\n switch (type) {\n case \"rendered-prompt\":\n content = String(run.rendered_prompt || \"\");\n break;\n case \"received-prompt\":\n content = String(run.received_prompt || \"\");\n break;\n case \"stringified-conversation\":\n content = String(run.stringified_conversation || \"\");\n break;\n case \"received-context\":\n content = String(run.received_context || \"\");\n break;\n case \"logs\": {\n const logs = run.logs;\n content = Array.isArray(logs) ? logs.join(\"\\n\") : String(logs || \"\");\n break;\n }\n case \"traces\":\n try {\n content = JSON.stringify(run.traces ?? [], null, 2);\n } catch {\n content = String(run.traces || \"\");\n }\n break;\n default:\n content = \"Unknown type\";\n }\n return {\n title: type?.replace(/-/g, \" \") ?? \"Details\",\n project: params.project,\n agent,\n id,\n ts: ts || row.run_timestamp || \"\",\n content\n };\n};\nexport {\n load\n};\n","import * as universal from '../entries/pages/academy/_project_/_agent_/view/_type_/_id_/_page.ts.js';\nimport * as server from '../entries/pages/academy/_project_/_agent_/view/_type_/_id_/_page.server.ts.js';\n\nexport const index = 5;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/academy/_project_/_agent_/view/_type_/_id_/_page.svelte.js')).default;\nexport { universal };\nexport const universal_id = \"src/routes/academy/[project]/[agent]/view/[type]/[id]/+page.ts\";\nexport { server };\nexport const server_id = \"src/routes/academy/[project]/[agent]/view/[type]/[id]/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/5.BqyMuHwQ.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BdOqksoz.js\",\"_app/immutable/chunks/Be371ezp.js\",\"_app/immutable/chunks/DIiF2tGe.js\",\"_app/immutable/chunks/D_4dC3JZ.js\",\"_app/immutable/chunks/D5O98MXA.js\",\"_app/immutable/chunks/ISgeSat5.js\",\"_app/immutable/chunks/CpdYAO0i.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":["load"],"mappings":";;;;AAAA,MAAMA,MAAI,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK;AACnC,EAAE,OAAO;AACT,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO;AAC3B,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK;AACvB,IAAI,IAAI,EAAE,MAAM,CAAC,IAAI;AACrB,IAAI,EAAE,EAAE,MAAM,CAAC;AACf,GAAG;AACH,CAAC;;;;;;;ACJD,MAAM,IAAI,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK;AACxC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,MAAM;AAC7C,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,MAAM;AACjD,EAAE,MAAM,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,MAAM;AACxD,EAAE,MAAM,WAAW,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC;AACvD,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC;AAC5D,EAAE,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC;AACtE,EAAE,MAAM,UAAU,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,IAAI;AACxD,EAAE,eAAe,cAAc,GAAG;AAClC,IAAI,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,OAAO,kBAAkB,CAAC;AACxD,IAAI,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC;AACzC,IAAI,MAAM,MAAM,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAC9B,IAAI,MAAM,MAAM,GAAG,CAAC,YAAY,CAAC;AACjC,IAAI,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE;AAC/F,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC;AAC/D,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/D,EAAE;AACF,EAAE,MAAM,MAAM,GAAG,UAAU,IAAI,MAAM,cAAc,EAAE;AACrD,EAAE,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;AAC5C,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AAChC,EAAE,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,IAAI;AAC5D,EAAE,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC5E,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AACtD,EAAE,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,OAAO,GAAG,EAAE;AAC5D,EAAE,MAAM,KAAK,GAAG,CAAC,MAAM;AACvB,IAAI,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC3B,IAAI,MAAM,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC9B,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;AAC9B,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACxD,EAAE,CAAC,GAAG;AACN,EAAE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;AACzB,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;AACpD,EAAE,IAAI,OAAO,GAAG,EAAE;AAClB,EAAE,QAAQ,IAAI;AACd,IAAI,KAAK,iBAAiB;AAC1B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;AACjD,MAAM;AACN,IAAI,KAAK,iBAAiB;AAC1B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;AACjD,MAAM;AACN,IAAI,KAAK,0BAA0B;AACnC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,wBAAwB,IAAI,EAAE,CAAC;AAC1D,MAAM;AACN,IAAI,KAAK,kBAAkB;AAC3B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC;AAClD,MAAM;AACN,IAAI,KAAK,MAAM,EAAE;AACjB,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI;AAC3B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;AAC1E,MAAM;AACN,IAAI;AACJ,IAAI,KAAK,QAAQ;AACjB,MAAM,IAAI;AACV,QAAQ,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3D,MAAM,CAAC,CAAC,MAAM;AACd,QAAQ,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;AAC1C,MAAM;AACN,MAAM;AACN,IAAI;AACJ,MAAM,OAAO,GAAG,cAAc;AAC9B;AACA,EAAE,OAAO;AACT,IAAI,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,SAAS;AAChD,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO;AAC3B,IAAI,KAAK;AACT,IAAI,EAAE;AACN,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,CAAC,aAAa,IAAI,EAAE;AACrC,IAAI;AACJ,GAAG;AACH,CAAC;;;;;;;ACrEW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA6E,CAAC,EAAE;AAE3I,MAAC,YAAY,GAAG;AAEhB,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChV,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const index = 6;
|
|
2
|
-
let component_cache;
|
|
3
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-CdEfc0bc.js')).default;
|
|
4
|
-
const imports = ["_app/immutable/nodes/6.7qo5WmXj.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/CpZGG0E7.js","_app/immutable/chunks/BdOqksoz.js","_app/immutable/chunks/Be371ezp.js","_app/immutable/chunks/DIiF2tGe.js","_app/immutable/chunks/CpdYAO0i.js","_app/immutable/chunks/BDTuVTVZ.js","_app/immutable/chunks/DveC87gn.js","_app/immutable/chunks/C1FmrZbK.js","_app/immutable/chunks/D_4dC3JZ.js","_app/immutable/chunks/D5O98MXA.js","_app/immutable/chunks/Bmx4ManB.js","_app/immutable/chunks/ISgeSat5.js","_app/immutable/chunks/C2Y9UxTx.js","_app/immutable/chunks/BTGV3Gq0.js","_app/immutable/chunks/CYuXdPQc.js","_app/immutable/chunks/C681lv5i.js","_app/immutable/chunks/D0iwhpLH.js","_app/immutable/chunks/BUoURvZ_.js","_app/immutable/chunks/2PVbuV1X.js","_app/immutable/chunks/9OGf6H2n.js","_app/immutable/chunks/B8bx6-qu.js"];
|
|
5
|
-
const stylesheets = ["_app/immutable/assets/Dropdown.DUA3rl5D.css","_app/immutable/assets/Input.CF8n5W0I.css","_app/immutable/assets/6.CD1QZ0pt.css"];
|
|
6
|
-
const fonts = [];
|
|
7
|
-
|
|
8
|
-
export { component, fonts, imports, index, stylesheets };
|
|
9
|
-
//# sourceMappingURL=6-CK3NUjnH.js.map
|