From 4524beb7a36f48f41a6042c2938ee1e2226eb271 Mon Sep 17 00:00:00 2001 From: Victor Algaze Date: Mon, 26 Feb 2024 21:14:51 -0800 Subject: [PATCH] Tidy repo, add emoji support to appCards, various fixes --- .gitignore | 3 +- docs/.vitepress/cache/deps/_metadata.json | 332 - docs/.vitepress/cache/deps/abap-ZJXPBV7D.js | 1323 - .../cache/deps/abap-ZJXPBV7D.js.map | 7 - docs/.vitepress/cache/deps/adaptivecards.js | 12302 -- .../cache/deps/adaptivecards.js.map | 7 - docs/.vitepress/cache/deps/apex-QXTPZBD5.js | 328 - .../cache/deps/apex-QXTPZBD5.js.map | 7 - docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js | 83 - .../cache/deps/azcli-AKNZCCZ4.js.map | 7 - docs/.vitepress/cache/deps/bat-KITOMZVG.js | 104 - .../.vitepress/cache/deps/bat-KITOMZVG.js.map | 7 - docs/.vitepress/cache/deps/bicep-ZLZPPZLV.js | 124 - .../cache/deps/bicep-ZLZPPZLV.js.map | 7 - .../cache/deps/cameligo-47AYWHA2.js | 177 - .../cache/deps/cameligo-47AYWHA2.js.map | 7 - docs/.vitepress/cache/deps/chunk-3C4OEVM2.js | 10903 -- .../cache/deps/chunk-3C4OEVM2.js.map | 7 - docs/.vitepress/cache/deps/chunk-3OGJZLRW.js | 291 - .../cache/deps/chunk-3OGJZLRW.js.map | 7 - docs/.vitepress/cache/deps/chunk-6PJEDKO5.js | 46 - .../cache/deps/chunk-6PJEDKO5.js.map | 7 - docs/.vitepress/cache/deps/chunk-G3JK5JM3.js | 114586 --------------- .../cache/deps/chunk-G3JK5JM3.js.map | 7 - docs/.vitepress/cache/deps/chunk-GHDY2MJ7.js | 347 - .../cache/deps/chunk-GHDY2MJ7.js.map | 7 - .../.vitepress/cache/deps/clojure-2P4KKSXL.js | 763 - .../cache/deps/clojure-2P4KKSXL.js.map | 7 - docs/.vitepress/cache/deps/coffee-722JKW3F.js | 237 - .../cache/deps/coffee-722JKW3F.js.map | 7 - docs/.vitepress/cache/deps/cpp-KZ5NZY3L.js | 399 - .../.vitepress/cache/deps/cpp-KZ5NZY3L.js.map | 7 - docs/.vitepress/cache/deps/csharp-IO2RVZAJ.js | 329 - .../cache/deps/csharp-IO2RVZAJ.js.map | 7 - docs/.vitepress/cache/deps/csp-PQNU3GFG.js | 66 - .../.vitepress/cache/deps/csp-PQNU3GFG.js.map | 7 - docs/.vitepress/cache/deps/css-76SKN4DI.js | 193 - .../.vitepress/cache/deps/css-76SKN4DI.js.map | 7 - .../.vitepress/cache/deps/cssMode-QE3QLDR2.js | 2036 - .../cache/deps/cssMode-QE3QLDR2.js.map | 7 - docs/.vitepress/cache/deps/cypher-6NDKRB7I.js | 271 - .../cache/deps/cypher-6NDKRB7I.js.map | 7 - docs/.vitepress/cache/deps/dart-NNYF6LA6.js | 279 - .../cache/deps/dart-NNYF6LA6.js.map | 7 - .../cache/deps/dockerfile-CB4FOHWT.js | 141 - .../cache/deps/dockerfile-CB4FOHWT.js.map | 7 - docs/.vitepress/cache/deps/ecl-CHABOUWY.js | 463 - .../.vitepress/cache/deps/ecl-CHABOUWY.js.map | 7 - docs/.vitepress/cache/deps/element-plus.js | 59348 -------- .../.vitepress/cache/deps/element-plus.js.map | 7 - docs/.vitepress/cache/deps/elixir-JWJYFSSW.js | 498 - .../cache/deps/elixir-JWJYFSSW.js.map | 7 - docs/.vitepress/cache/deps/flow9-XFKWO6PF.js | 150 - .../cache/deps/flow9-XFKWO6PF.js.map | 7 - .../cache/deps/freemarker2-6PB63OZP.js | 674 - .../cache/deps/freemarker2-6PB63OZP.js.map | 7 - docs/.vitepress/cache/deps/fsharp-4HR2JBPD.js | 219 - .../cache/deps/fsharp-4HR2JBPD.js.map | 7 - docs/.vitepress/cache/deps/go-ZD4OIVGF.js | 217 - docs/.vitepress/cache/deps/go-ZD4OIVGF.js.map | 7 - .../.vitepress/cache/deps/graphql-FBLI5OCC.js | 150 - .../cache/deps/graphql-FBLI5OCC.js.map | 7 - .../cache/deps/handlebars-XJYSPQ6X.js | 411 - .../cache/deps/handlebars-XJYSPQ6X.js.map | 7 - docs/.vitepress/cache/deps/hcl-2LJKNXTF.js | 186 - .../.vitepress/cache/deps/hcl-2LJKNXTF.js.map | 7 - docs/.vitepress/cache/deps/html-F22UOEP3.js | 301 - .../cache/deps/html-F22UOEP3.js.map | 7 - .../cache/deps/htmlMode-ETVBJ4RH.js | 2052 - .../cache/deps/htmlMode-ETVBJ4RH.js.map | 7 - docs/.vitepress/cache/deps/ini-2XGVAVDV.js | 77 - .../.vitepress/cache/deps/ini-2XGVAVDV.js.map | 7 - docs/.vitepress/cache/deps/java-54IVCUHF.js | 230 - .../cache/deps/java-54IVCUHF.js.map | 7 - .../cache/deps/javascript-PTWEJFGX.js | 88 - .../cache/deps/javascript-PTWEJFGX.js.map | 7 - .../cache/deps/jsonMode-KZAAAXO6.js | 2612 - .../cache/deps/jsonMode-KZAAAXO6.js.map | 7 - docs/.vitepress/cache/deps/julia-WOR3BG33.js | 505 - .../cache/deps/julia-WOR3BG33.js.map | 7 - docs/.vitepress/cache/deps/kotlin-RAEGD7HS.js | 254 - .../cache/deps/kotlin-RAEGD7HS.js.map | 7 - docs/.vitepress/cache/deps/less-3EZF4JWH.js | 176 - .../cache/deps/less-3EZF4JWH.js.map | 7 - docs/.vitepress/cache/deps/lexon-H5MT3HFC.js | 160 - .../cache/deps/lexon-H5MT3HFC.js.map | 7 - docs/.vitepress/cache/deps/liquid-D7SDHBE2.js | 258 - .../cache/deps/liquid-D7SDHBE2.js.map | 7 - docs/.vitepress/cache/deps/lua-SAN3U2DO.js | 166 - .../.vitepress/cache/deps/lua-SAN3U2DO.js.map | 7 - docs/.vitepress/cache/deps/m3-JBMBWH73.js | 219 - docs/.vitepress/cache/deps/m3-JBMBWH73.js.map | 7 - .../cache/deps/markdown-NHOYTHIG.js | 211 - .../cache/deps/markdown-NHOYTHIG.js.map | 7 - docs/.vitepress/cache/deps/mdx-6E32NSOV.js | 190 - .../.vitepress/cache/deps/mdx-6E32NSOV.js.map | 7 - docs/.vitepress/cache/deps/mips-VMSX6T5Y.js | 203 - .../cache/deps/mips-VMSX6T5Y.js.map | 7 - docs/.vitepress/cache/deps/monaco-editor.js | 50768 ------- .../cache/deps/monaco-editor.js.map | 7 - docs/.vitepress/cache/deps/msdax-MRW6NJVX.js | 386 - .../cache/deps/msdax-MRW6NJVX.js.map | 7 - docs/.vitepress/cache/deps/mysql-YY275J3W.js | 885 - .../cache/deps/mysql-YY275J3W.js.map | 7 - .../cache/deps/objective-c-NFBM26LU.js | 197 - .../cache/deps/objective-c-NFBM26LU.js.map | 7 - docs/.vitepress/cache/deps/package.json | 3 - docs/.vitepress/cache/deps/pascal-XEJKJVA3.js | 254 - .../cache/deps/pascal-XEJKJVA3.js.map | 7 - .../cache/deps/pascaligo-4QUCTVJS.js | 167 - .../cache/deps/pascaligo-4QUCTVJS.js.map | 7 - docs/.vitepress/cache/deps/perl-IJTE67DD.js | 608 - .../cache/deps/perl-IJTE67DD.js.map | 7 - docs/.vitepress/cache/deps/pgsql-QZCHR3FH.js | 856 - .../cache/deps/pgsql-QZCHR3FH.js.map | 7 - docs/.vitepress/cache/deps/php-ZUHD6MDF.js | 480 - .../.vitepress/cache/deps/php-ZUHD6MDF.js.map | 7 - docs/.vitepress/cache/deps/pla-OZRPVGRM.js | 140 - .../.vitepress/cache/deps/pla-OZRPVGRM.js.map | 7 - .../cache/deps/postiats-ARIXBF3F.js | 553 - .../cache/deps/postiats-ARIXBF3F.js.map | 7 - .../cache/deps/powerquery-MWU7OL3Y.js | 899 - .../cache/deps/powerquery-MWU7OL3Y.js.map | 7 - .../cache/deps/powershell-ZKC5LBYX.js | 242 - .../cache/deps/powershell-ZKC5LBYX.js.map | 7 - .../cache/deps/protobuf-3EAVHMEA.js | 431 - .../cache/deps/protobuf-3EAVHMEA.js.map | 7 - docs/.vitepress/cache/deps/pug-5CJGWCA2.js | 402 - .../.vitepress/cache/deps/pug-5CJGWCA2.js.map | 7 - docs/.vitepress/cache/deps/python-WW7TN4Y7.js | 278 - .../cache/deps/python-WW7TN4Y7.js.map | 7 - docs/.vitepress/cache/deps/qsharp-RHGSCZ6J.js | 291 - .../cache/deps/qsharp-RHGSCZ6J.js.map | 7 - docs/.vitepress/cache/deps/r-TRLFTC42.js | 254 - docs/.vitepress/cache/deps/r-TRLFTC42.js.map | 7 - docs/.vitepress/cache/deps/razor-SBLZH47B.js | 532 - .../cache/deps/razor-SBLZH47B.js.map | 7 - docs/.vitepress/cache/deps/redis-D5KC66ZT.js | 307 - .../cache/deps/redis-D5KC66ZT.js.map | 7 - .../cache/deps/redshift-HP5ANZGP.js | 815 - .../cache/deps/redshift-HP5ANZGP.js.map | 7 - .../cache/deps/restructuredtext-6LCM2G6T.js | 171 - .../deps/restructuredtext-6LCM2G6T.js.map | 7 - docs/.vitepress/cache/deps/ruby-ZVMU7DV3.js | 453 - .../cache/deps/ruby-ZVMU7DV3.js.map | 7 - docs/.vitepress/cache/deps/rust-3PMSM46W.js | 346 - .../cache/deps/rust-3PMSM46W.js.map | 7 - docs/.vitepress/cache/deps/sb-6E454WPU.js | 119 - docs/.vitepress/cache/deps/sb-6E454WPU.js.map | 7 - docs/.vitepress/cache/deps/scala-5QY3IS6I.js | 362 - .../cache/deps/scala-5QY3IS6I.js.map | 7 - docs/.vitepress/cache/deps/scheme-XUJXSTX4.js | 123 - .../cache/deps/scheme-XUJXSTX4.js.map | 7 - docs/.vitepress/cache/deps/scss-EANUFQZF.js | 251 - .../cache/deps/scss-EANUFQZF.js.map | 7 - docs/.vitepress/cache/deps/shell-FL46RSB5.js | 233 - .../cache/deps/shell-FL46RSB5.js.map | 7 - .../cache/deps/solidity-CQ36NCYM.js | 1360 - .../cache/deps/solidity-CQ36NCYM.js.map | 7 - docs/.vitepress/cache/deps/sophia-TOOTAE2G.js | 199 - .../cache/deps/sophia-TOOTAE2G.js.map | 7 - docs/.vitepress/cache/deps/sparql-MPDK2I5P.js | 202 - .../cache/deps/sparql-MPDK2I5P.js.map | 7 - docs/.vitepress/cache/deps/sql-YUWLPR5B.js | 827 - .../.vitepress/cache/deps/sql-YUWLPR5B.js.map | 7 - docs/.vitepress/cache/deps/st-7YHCWAPT.js | 424 - docs/.vitepress/cache/deps/st-7YHCWAPT.js.map | 7 - docs/.vitepress/cache/deps/swift-Q5TSV75D.js | 326 - .../cache/deps/swift-Q5TSV75D.js.map | 7 - .../cache/deps/systemverilog-ARXOEQTU.js | 565 - .../cache/deps/systemverilog-ARXOEQTU.js.map | 7 - docs/.vitepress/cache/deps/tcl-5OENCSEV.js | 241 - .../.vitepress/cache/deps/tcl-5OENCSEV.js.map | 7 - docs/.vitepress/cache/deps/tsMode-JVBSARJT.js | 1176 - .../cache/deps/tsMode-JVBSARJT.js.map | 7 - docs/.vitepress/cache/deps/twig-RTWS7BE4.js | 332 - .../cache/deps/twig-RTWS7BE4.js.map | 7 - .../cache/deps/typescript-RRKVICLF.js | 11 - .../cache/deps/typescript-RRKVICLF.js.map | 7 - docs/.vitepress/cache/deps/vb-GRMCI74J.js | 373 - docs/.vitepress/cache/deps/vb-GRMCI74J.js.map | 7 - .../deps/vitepress___@vue_devtools-api.js | 164 - .../deps/vitepress___@vue_devtools-api.js.map | 7 - docs/.vitepress/cache/deps/vue.js | 314 - docs/.vitepress/cache/deps/vue.js.map | 7 - docs/.vitepress/cache/deps/wgsl-FRYNLOZV.js | 443 - .../cache/deps/wgsl-FRYNLOZV.js.map | 7 - docs/.vitepress/cache/deps/xml-ME54AW4P.js | 114 - .../.vitepress/cache/deps/xml-ME54AW4P.js.map | 7 - docs/.vitepress/cache/deps/yaml-UB3NIHKF.js | 203 - .../cache/deps/yaml-UB3NIHKF.js.map | 7 - docs/assets/bongo.png | Bin 123999 -> 0 bytes docs/assets/build_a_bot.gif | Bin 1418796 -> 0 bytes docs/assets/card_nosubmit.gif | Bin 968421 -> 0 bytes docs/assets/deno/deno_addcode.png | Bin 579284 -> 0 bytes docs/assets/deno/deno_playground.png | Bin 108197 -> 0 bytes docs/assets/deno/deno_webhook.png | Bin 788460 -> 0 bytes docs/assets/deno/set_secrets.png | Bin 142378 -> 0 bytes docs/assets/deno/set_secrets_saved.png | Bin 372894 -> 0 bytes docs/assets/download.png | Bin 292780 -> 0 bytes docs/assets/download2.png | Bin 185850 -> 0 bytes docs/assets/regen_token.gif | Bin 277241 -> 0 bytes docs/assets/speedy.jpeg | Bin 162942 -> 0 bytes docs/examples/deno/README.md | 228 +- docs/new.md | 8 +- docs/send-a-card.md | 27 +- examples/deno/README.md | 10 +- examples/llm-stream/settings/bot.ts | 5 +- examples/llm-stream/settings/launch.ts | 13 +- examples/llm-stream/settings/llm-stream.ts | 3 +- examples/speedybot-starter/settings/launch.ts | 3 +- examples/voiceflow-kb/settings/launch.ts | 13 +- examples/voiceflow/settings/launch.ts | 13 +- package.json | 2 +- src/cards.ts | 40 +- 215 files changed, 103 insertions(+), 285681 deletions(-) delete mode 100644 docs/.vitepress/cache/deps/_metadata.json delete mode 100644 docs/.vitepress/cache/deps/abap-ZJXPBV7D.js delete mode 100644 docs/.vitepress/cache/deps/abap-ZJXPBV7D.js.map delete mode 100644 docs/.vitepress/cache/deps/adaptivecards.js delete mode 100644 docs/.vitepress/cache/deps/adaptivecards.js.map delete mode 100644 docs/.vitepress/cache/deps/apex-QXTPZBD5.js delete mode 100644 docs/.vitepress/cache/deps/apex-QXTPZBD5.js.map delete mode 100644 docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js delete mode 100644 docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js.map delete mode 100644 docs/.vitepress/cache/deps/bat-KITOMZVG.js delete mode 100644 docs/.vitepress/cache/deps/bat-KITOMZVG.js.map delete mode 100644 docs/.vitepress/cache/deps/bicep-ZLZPPZLV.js delete mode 100644 docs/.vitepress/cache/deps/bicep-ZLZPPZLV.js.map delete mode 100644 docs/.vitepress/cache/deps/cameligo-47AYWHA2.js delete mode 100644 docs/.vitepress/cache/deps/cameligo-47AYWHA2.js.map delete mode 100644 docs/.vitepress/cache/deps/chunk-3C4OEVM2.js delete mode 100644 docs/.vitepress/cache/deps/chunk-3C4OEVM2.js.map delete mode 100644 docs/.vitepress/cache/deps/chunk-3OGJZLRW.js delete mode 100644 docs/.vitepress/cache/deps/chunk-3OGJZLRW.js.map delete mode 100644 docs/.vitepress/cache/deps/chunk-6PJEDKO5.js delete mode 100644 docs/.vitepress/cache/deps/chunk-6PJEDKO5.js.map delete mode 100644 docs/.vitepress/cache/deps/chunk-G3JK5JM3.js delete mode 100644 docs/.vitepress/cache/deps/chunk-G3JK5JM3.js.map delete mode 100644 docs/.vitepress/cache/deps/chunk-GHDY2MJ7.js delete mode 100644 docs/.vitepress/cache/deps/chunk-GHDY2MJ7.js.map delete mode 100644 docs/.vitepress/cache/deps/clojure-2P4KKSXL.js delete mode 100644 docs/.vitepress/cache/deps/clojure-2P4KKSXL.js.map delete mode 100644 docs/.vitepress/cache/deps/coffee-722JKW3F.js delete mode 100644 docs/.vitepress/cache/deps/coffee-722JKW3F.js.map delete mode 100644 docs/.vitepress/cache/deps/cpp-KZ5NZY3L.js delete mode 100644 docs/.vitepress/cache/deps/cpp-KZ5NZY3L.js.map delete mode 100644 docs/.vitepress/cache/deps/csharp-IO2RVZAJ.js delete mode 100644 docs/.vitepress/cache/deps/csharp-IO2RVZAJ.js.map delete mode 100644 docs/.vitepress/cache/deps/csp-PQNU3GFG.js delete mode 100644 docs/.vitepress/cache/deps/csp-PQNU3GFG.js.map delete mode 100644 docs/.vitepress/cache/deps/css-76SKN4DI.js delete mode 100644 docs/.vitepress/cache/deps/css-76SKN4DI.js.map delete mode 100644 docs/.vitepress/cache/deps/cssMode-QE3QLDR2.js delete mode 100644 docs/.vitepress/cache/deps/cssMode-QE3QLDR2.js.map delete mode 100644 docs/.vitepress/cache/deps/cypher-6NDKRB7I.js delete mode 100644 docs/.vitepress/cache/deps/cypher-6NDKRB7I.js.map delete mode 100644 docs/.vitepress/cache/deps/dart-NNYF6LA6.js delete mode 100644 docs/.vitepress/cache/deps/dart-NNYF6LA6.js.map delete mode 100644 docs/.vitepress/cache/deps/dockerfile-CB4FOHWT.js delete mode 100644 docs/.vitepress/cache/deps/dockerfile-CB4FOHWT.js.map delete mode 100644 docs/.vitepress/cache/deps/ecl-CHABOUWY.js delete mode 100644 docs/.vitepress/cache/deps/ecl-CHABOUWY.js.map delete mode 100644 docs/.vitepress/cache/deps/element-plus.js delete mode 100644 docs/.vitepress/cache/deps/element-plus.js.map delete mode 100644 docs/.vitepress/cache/deps/elixir-JWJYFSSW.js delete mode 100644 docs/.vitepress/cache/deps/elixir-JWJYFSSW.js.map delete mode 100644 docs/.vitepress/cache/deps/flow9-XFKWO6PF.js delete mode 100644 docs/.vitepress/cache/deps/flow9-XFKWO6PF.js.map delete mode 100644 docs/.vitepress/cache/deps/freemarker2-6PB63OZP.js delete mode 100644 docs/.vitepress/cache/deps/freemarker2-6PB63OZP.js.map delete mode 100644 docs/.vitepress/cache/deps/fsharp-4HR2JBPD.js delete mode 100644 docs/.vitepress/cache/deps/fsharp-4HR2JBPD.js.map delete mode 100644 docs/.vitepress/cache/deps/go-ZD4OIVGF.js delete mode 100644 docs/.vitepress/cache/deps/go-ZD4OIVGF.js.map delete mode 100644 docs/.vitepress/cache/deps/graphql-FBLI5OCC.js delete mode 100644 docs/.vitepress/cache/deps/graphql-FBLI5OCC.js.map delete mode 100644 docs/.vitepress/cache/deps/handlebars-XJYSPQ6X.js delete mode 100644 docs/.vitepress/cache/deps/handlebars-XJYSPQ6X.js.map delete mode 100644 docs/.vitepress/cache/deps/hcl-2LJKNXTF.js delete mode 100644 docs/.vitepress/cache/deps/hcl-2LJKNXTF.js.map delete mode 100644 docs/.vitepress/cache/deps/html-F22UOEP3.js delete mode 100644 docs/.vitepress/cache/deps/html-F22UOEP3.js.map delete mode 100644 docs/.vitepress/cache/deps/htmlMode-ETVBJ4RH.js delete mode 100644 docs/.vitepress/cache/deps/htmlMode-ETVBJ4RH.js.map delete mode 100644 docs/.vitepress/cache/deps/ini-2XGVAVDV.js delete mode 100644 docs/.vitepress/cache/deps/ini-2XGVAVDV.js.map delete mode 100644 docs/.vitepress/cache/deps/java-54IVCUHF.js delete mode 100644 docs/.vitepress/cache/deps/java-54IVCUHF.js.map delete mode 100644 docs/.vitepress/cache/deps/javascript-PTWEJFGX.js delete mode 100644 docs/.vitepress/cache/deps/javascript-PTWEJFGX.js.map delete mode 100644 docs/.vitepress/cache/deps/jsonMode-KZAAAXO6.js delete mode 100644 docs/.vitepress/cache/deps/jsonMode-KZAAAXO6.js.map delete mode 100644 docs/.vitepress/cache/deps/julia-WOR3BG33.js delete mode 100644 docs/.vitepress/cache/deps/julia-WOR3BG33.js.map delete mode 100644 docs/.vitepress/cache/deps/kotlin-RAEGD7HS.js delete mode 100644 docs/.vitepress/cache/deps/kotlin-RAEGD7HS.js.map delete mode 100644 docs/.vitepress/cache/deps/less-3EZF4JWH.js delete mode 100644 docs/.vitepress/cache/deps/less-3EZF4JWH.js.map delete mode 100644 docs/.vitepress/cache/deps/lexon-H5MT3HFC.js delete mode 100644 docs/.vitepress/cache/deps/lexon-H5MT3HFC.js.map delete mode 100644 docs/.vitepress/cache/deps/liquid-D7SDHBE2.js delete mode 100644 docs/.vitepress/cache/deps/liquid-D7SDHBE2.js.map delete mode 100644 docs/.vitepress/cache/deps/lua-SAN3U2DO.js delete mode 100644 docs/.vitepress/cache/deps/lua-SAN3U2DO.js.map delete mode 100644 docs/.vitepress/cache/deps/m3-JBMBWH73.js delete mode 100644 docs/.vitepress/cache/deps/m3-JBMBWH73.js.map delete mode 100644 docs/.vitepress/cache/deps/markdown-NHOYTHIG.js delete mode 100644 docs/.vitepress/cache/deps/markdown-NHOYTHIG.js.map delete mode 100644 docs/.vitepress/cache/deps/mdx-6E32NSOV.js delete mode 100644 docs/.vitepress/cache/deps/mdx-6E32NSOV.js.map delete mode 100644 docs/.vitepress/cache/deps/mips-VMSX6T5Y.js delete mode 100644 docs/.vitepress/cache/deps/mips-VMSX6T5Y.js.map delete mode 100644 docs/.vitepress/cache/deps/monaco-editor.js delete mode 100644 docs/.vitepress/cache/deps/monaco-editor.js.map delete mode 100644 docs/.vitepress/cache/deps/msdax-MRW6NJVX.js delete mode 100644 docs/.vitepress/cache/deps/msdax-MRW6NJVX.js.map delete mode 100644 docs/.vitepress/cache/deps/mysql-YY275J3W.js delete mode 100644 docs/.vitepress/cache/deps/mysql-YY275J3W.js.map delete mode 100644 docs/.vitepress/cache/deps/objective-c-NFBM26LU.js delete mode 100644 docs/.vitepress/cache/deps/objective-c-NFBM26LU.js.map delete mode 100644 docs/.vitepress/cache/deps/package.json delete mode 100644 docs/.vitepress/cache/deps/pascal-XEJKJVA3.js delete mode 100644 docs/.vitepress/cache/deps/pascal-XEJKJVA3.js.map delete mode 100644 docs/.vitepress/cache/deps/pascaligo-4QUCTVJS.js delete mode 100644 docs/.vitepress/cache/deps/pascaligo-4QUCTVJS.js.map delete mode 100644 docs/.vitepress/cache/deps/perl-IJTE67DD.js delete mode 100644 docs/.vitepress/cache/deps/perl-IJTE67DD.js.map delete mode 100644 docs/.vitepress/cache/deps/pgsql-QZCHR3FH.js delete mode 100644 docs/.vitepress/cache/deps/pgsql-QZCHR3FH.js.map delete mode 100644 docs/.vitepress/cache/deps/php-ZUHD6MDF.js delete mode 100644 docs/.vitepress/cache/deps/php-ZUHD6MDF.js.map delete mode 100644 docs/.vitepress/cache/deps/pla-OZRPVGRM.js delete mode 100644 docs/.vitepress/cache/deps/pla-OZRPVGRM.js.map delete mode 100644 docs/.vitepress/cache/deps/postiats-ARIXBF3F.js delete mode 100644 docs/.vitepress/cache/deps/postiats-ARIXBF3F.js.map delete mode 100644 docs/.vitepress/cache/deps/powerquery-MWU7OL3Y.js delete mode 100644 docs/.vitepress/cache/deps/powerquery-MWU7OL3Y.js.map delete mode 100644 docs/.vitepress/cache/deps/powershell-ZKC5LBYX.js delete mode 100644 docs/.vitepress/cache/deps/powershell-ZKC5LBYX.js.map delete mode 100644 docs/.vitepress/cache/deps/protobuf-3EAVHMEA.js delete mode 100644 docs/.vitepress/cache/deps/protobuf-3EAVHMEA.js.map delete mode 100644 docs/.vitepress/cache/deps/pug-5CJGWCA2.js delete mode 100644 docs/.vitepress/cache/deps/pug-5CJGWCA2.js.map delete mode 100644 docs/.vitepress/cache/deps/python-WW7TN4Y7.js delete mode 100644 docs/.vitepress/cache/deps/python-WW7TN4Y7.js.map delete mode 100644 docs/.vitepress/cache/deps/qsharp-RHGSCZ6J.js delete mode 100644 docs/.vitepress/cache/deps/qsharp-RHGSCZ6J.js.map delete mode 100644 docs/.vitepress/cache/deps/r-TRLFTC42.js delete mode 100644 docs/.vitepress/cache/deps/r-TRLFTC42.js.map delete mode 100644 docs/.vitepress/cache/deps/razor-SBLZH47B.js delete mode 100644 docs/.vitepress/cache/deps/razor-SBLZH47B.js.map delete mode 100644 docs/.vitepress/cache/deps/redis-D5KC66ZT.js delete mode 100644 docs/.vitepress/cache/deps/redis-D5KC66ZT.js.map delete mode 100644 docs/.vitepress/cache/deps/redshift-HP5ANZGP.js delete mode 100644 docs/.vitepress/cache/deps/redshift-HP5ANZGP.js.map delete mode 100644 docs/.vitepress/cache/deps/restructuredtext-6LCM2G6T.js delete mode 100644 docs/.vitepress/cache/deps/restructuredtext-6LCM2G6T.js.map delete mode 100644 docs/.vitepress/cache/deps/ruby-ZVMU7DV3.js delete mode 100644 docs/.vitepress/cache/deps/ruby-ZVMU7DV3.js.map delete mode 100644 docs/.vitepress/cache/deps/rust-3PMSM46W.js delete mode 100644 docs/.vitepress/cache/deps/rust-3PMSM46W.js.map delete mode 100644 docs/.vitepress/cache/deps/sb-6E454WPU.js delete mode 100644 docs/.vitepress/cache/deps/sb-6E454WPU.js.map delete mode 100644 docs/.vitepress/cache/deps/scala-5QY3IS6I.js delete mode 100644 docs/.vitepress/cache/deps/scala-5QY3IS6I.js.map delete mode 100644 docs/.vitepress/cache/deps/scheme-XUJXSTX4.js delete mode 100644 docs/.vitepress/cache/deps/scheme-XUJXSTX4.js.map delete mode 100644 docs/.vitepress/cache/deps/scss-EANUFQZF.js delete mode 100644 docs/.vitepress/cache/deps/scss-EANUFQZF.js.map delete mode 100644 docs/.vitepress/cache/deps/shell-FL46RSB5.js delete mode 100644 docs/.vitepress/cache/deps/shell-FL46RSB5.js.map delete mode 100644 docs/.vitepress/cache/deps/solidity-CQ36NCYM.js delete mode 100644 docs/.vitepress/cache/deps/solidity-CQ36NCYM.js.map delete mode 100644 docs/.vitepress/cache/deps/sophia-TOOTAE2G.js delete mode 100644 docs/.vitepress/cache/deps/sophia-TOOTAE2G.js.map delete mode 100644 docs/.vitepress/cache/deps/sparql-MPDK2I5P.js delete mode 100644 docs/.vitepress/cache/deps/sparql-MPDK2I5P.js.map delete mode 100644 docs/.vitepress/cache/deps/sql-YUWLPR5B.js delete mode 100644 docs/.vitepress/cache/deps/sql-YUWLPR5B.js.map delete mode 100644 docs/.vitepress/cache/deps/st-7YHCWAPT.js delete mode 100644 docs/.vitepress/cache/deps/st-7YHCWAPT.js.map delete mode 100644 docs/.vitepress/cache/deps/swift-Q5TSV75D.js delete mode 100644 docs/.vitepress/cache/deps/swift-Q5TSV75D.js.map delete mode 100644 docs/.vitepress/cache/deps/systemverilog-ARXOEQTU.js delete mode 100644 docs/.vitepress/cache/deps/systemverilog-ARXOEQTU.js.map delete mode 100644 docs/.vitepress/cache/deps/tcl-5OENCSEV.js delete mode 100644 docs/.vitepress/cache/deps/tcl-5OENCSEV.js.map delete mode 100644 docs/.vitepress/cache/deps/tsMode-JVBSARJT.js delete mode 100644 docs/.vitepress/cache/deps/tsMode-JVBSARJT.js.map delete mode 100644 docs/.vitepress/cache/deps/twig-RTWS7BE4.js delete mode 100644 docs/.vitepress/cache/deps/twig-RTWS7BE4.js.map delete mode 100644 docs/.vitepress/cache/deps/typescript-RRKVICLF.js delete mode 100644 docs/.vitepress/cache/deps/typescript-RRKVICLF.js.map delete mode 100644 docs/.vitepress/cache/deps/vb-GRMCI74J.js delete mode 100644 docs/.vitepress/cache/deps/vb-GRMCI74J.js.map delete mode 100644 docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js delete mode 100644 docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map delete mode 100644 docs/.vitepress/cache/deps/vue.js delete mode 100644 docs/.vitepress/cache/deps/vue.js.map delete mode 100644 docs/.vitepress/cache/deps/wgsl-FRYNLOZV.js delete mode 100644 docs/.vitepress/cache/deps/wgsl-FRYNLOZV.js.map delete mode 100644 docs/.vitepress/cache/deps/xml-ME54AW4P.js delete mode 100644 docs/.vitepress/cache/deps/xml-ME54AW4P.js.map delete mode 100644 docs/.vitepress/cache/deps/yaml-UB3NIHKF.js delete mode 100644 docs/.vitepress/cache/deps/yaml-UB3NIHKF.js.map delete mode 100644 docs/assets/bongo.png delete mode 100644 docs/assets/build_a_bot.gif delete mode 100644 docs/assets/card_nosubmit.gif delete mode 100644 docs/assets/deno/deno_addcode.png delete mode 100644 docs/assets/deno/deno_playground.png delete mode 100644 docs/assets/deno/deno_webhook.png delete mode 100644 docs/assets/deno/set_secrets.png delete mode 100644 docs/assets/deno/set_secrets_saved.png delete mode 100644 docs/assets/download.png delete mode 100644 docs/assets/download2.png delete mode 100644 docs/assets/regen_token.gif delete mode 100644 docs/assets/speedy.jpeg diff --git a/.gitignore b/.gitignore index 441d052..26ea823 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,4 @@ abc.ts .vitepress/cache docs/.vitepress/cache/* coverage/ -todo.md -trickyoperation.ts \ No newline at end of file +todo.md \ No newline at end of file diff --git a/docs/.vitepress/cache/deps/_metadata.json b/docs/.vitepress/cache/deps/_metadata.json deleted file mode 100644 index 3241c7b..0000000 --- a/docs/.vitepress/cache/deps/_metadata.json +++ /dev/null @@ -1,332 +0,0 @@ -{ - "hash": "bbf895ba", - "browserHash": "e18e21e8", - "optimized": { - "vue": { - "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js", - "file": "vue.js", - "fileHash": "ed6cb684", - "needsInterop": false - }, - "vitepress > @vue/devtools-api": { - "src": "../../../../node_modules/@vue/devtools-api/lib/esm/index.js", - "file": "vitepress___@vue_devtools-api.js", - "fileHash": "61356a80", - "needsInterop": false - }, - "adaptivecards": { - "src": "../../../../node_modules/adaptivecards/lib/adaptivecards.js", - "file": "adaptivecards.js", - "fileHash": "9014f111", - "needsInterop": true - }, - "element-plus": { - "src": "../../../../node_modules/element-plus/es/index.mjs", - "file": "element-plus.js", - "fileHash": "dfe8a7e2", - "needsInterop": false - }, - "vitepress > @vueuse/integrations/useFocusTrap": { - "src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs", - "file": "vitepress___@vueuse_integrations_useFocusTrap.js", - "fileHash": "73569296", - "needsInterop": false - }, - "vitepress > mark.js/src/vanilla.js": { - "src": "../../../../node_modules/mark.js/src/vanilla.js", - "file": "vitepress___mark__js_src_vanilla__js.js", - "fileHash": "7e415ee5", - "needsInterop": false - }, - "vitepress > minisearch": { - "src": "../../../../node_modules/minisearch/dist/es/index.js", - "file": "vitepress___minisearch.js", - "fileHash": "99b9ce67", - "needsInterop": false - }, - "@element-plus/icons-vue": { - "src": "../../../../node_modules/@element-plus/icons-vue/dist/index.js", - "file": "@element-plus_icons-vue.js", - "fileHash": "c01f7292", - "needsInterop": false - }, - "monaco-editor": { - "src": "../../../../node_modules/monaco-editor/esm/vs/editor/editor.main.js", - "file": "monaco-editor.js", - "fileHash": "1de3c3af", - "needsInterop": false - } - }, - "chunks": { - "yaml-UB3NIHKF": { - "file": "yaml-UB3NIHKF.js" - }, - "cssMode-QE3QLDR2": { - "file": "cssMode-QE3QLDR2.js" - }, - "htmlMode-ETVBJ4RH": { - "file": "htmlMode-ETVBJ4RH.js" - }, - "jsonMode-KZAAAXO6": { - "file": "jsonMode-KZAAAXO6.js" - }, - "tsMode-JVBSARJT": { - "file": "tsMode-JVBSARJT.js" - }, - "st-7YHCWAPT": { - "file": "st-7YHCWAPT.js" - }, - "swift-Q5TSV75D": { - "file": "swift-Q5TSV75D.js" - }, - "systemverilog-ARXOEQTU": { - "file": "systemverilog-ARXOEQTU.js" - }, - "tcl-5OENCSEV": { - "file": "tcl-5OENCSEV.js" - }, - "twig-RTWS7BE4": { - "file": "twig-RTWS7BE4.js" - }, - "vb-GRMCI74J": { - "file": "vb-GRMCI74J.js" - }, - "wgsl-FRYNLOZV": { - "file": "wgsl-FRYNLOZV.js" - }, - "xml-ME54AW4P": { - "file": "xml-ME54AW4P.js" - }, - "scala-5QY3IS6I": { - "file": "scala-5QY3IS6I.js" - }, - "scheme-XUJXSTX4": { - "file": "scheme-XUJXSTX4.js" - }, - "scss-EANUFQZF": { - "file": "scss-EANUFQZF.js" - }, - "shell-FL46RSB5": { - "file": "shell-FL46RSB5.js" - }, - "solidity-CQ36NCYM": { - "file": "solidity-CQ36NCYM.js" - }, - "sophia-TOOTAE2G": { - "file": "sophia-TOOTAE2G.js" - }, - "sparql-MPDK2I5P": { - "file": "sparql-MPDK2I5P.js" - }, - "sql-YUWLPR5B": { - "file": "sql-YUWLPR5B.js" - }, - "r-TRLFTC42": { - "file": "r-TRLFTC42.js" - }, - "razor-SBLZH47B": { - "file": "razor-SBLZH47B.js" - }, - "redis-D5KC66ZT": { - "file": "redis-D5KC66ZT.js" - }, - "redshift-HP5ANZGP": { - "file": "redshift-HP5ANZGP.js" - }, - "restructuredtext-6LCM2G6T": { - "file": "restructuredtext-6LCM2G6T.js" - }, - "ruby-ZVMU7DV3": { - "file": "ruby-ZVMU7DV3.js" - }, - "rust-3PMSM46W": { - "file": "rust-3PMSM46W.js" - }, - "sb-6E454WPU": { - "file": "sb-6E454WPU.js" - }, - "pla-OZRPVGRM": { - "file": "pla-OZRPVGRM.js" - }, - "postiats-ARIXBF3F": { - "file": "postiats-ARIXBF3F.js" - }, - "powerquery-MWU7OL3Y": { - "file": "powerquery-MWU7OL3Y.js" - }, - "powershell-ZKC5LBYX": { - "file": "powershell-ZKC5LBYX.js" - }, - "protobuf-3EAVHMEA": { - "file": "protobuf-3EAVHMEA.js" - }, - "pug-5CJGWCA2": { - "file": "pug-5CJGWCA2.js" - }, - "python-WW7TN4Y7": { - "file": "python-WW7TN4Y7.js" - }, - "qsharp-RHGSCZ6J": { - "file": "qsharp-RHGSCZ6J.js" - }, - "msdax-MRW6NJVX": { - "file": "msdax-MRW6NJVX.js" - }, - "mysql-YY275J3W": { - "file": "mysql-YY275J3W.js" - }, - "objective-c-NFBM26LU": { - "file": "objective-c-NFBM26LU.js" - }, - "pascal-XEJKJVA3": { - "file": "pascal-XEJKJVA3.js" - }, - "pascaligo-4QUCTVJS": { - "file": "pascaligo-4QUCTVJS.js" - }, - "perl-IJTE67DD": { - "file": "perl-IJTE67DD.js" - }, - "pgsql-QZCHR3FH": { - "file": "pgsql-QZCHR3FH.js" - }, - "php-ZUHD6MDF": { - "file": "php-ZUHD6MDF.js" - }, - "less-3EZF4JWH": { - "file": "less-3EZF4JWH.js" - }, - "lexon-H5MT3HFC": { - "file": "lexon-H5MT3HFC.js" - }, - "lua-SAN3U2DO": { - "file": "lua-SAN3U2DO.js" - }, - "liquid-D7SDHBE2": { - "file": "liquid-D7SDHBE2.js" - }, - "m3-JBMBWH73": { - "file": "m3-JBMBWH73.js" - }, - "markdown-NHOYTHIG": { - "file": "markdown-NHOYTHIG.js" - }, - "mdx-6E32NSOV": { - "file": "mdx-6E32NSOV.js" - }, - "mips-VMSX6T5Y": { - "file": "mips-VMSX6T5Y.js" - }, - "hcl-2LJKNXTF": { - "file": "hcl-2LJKNXTF.js" - }, - "html-F22UOEP3": { - "file": "html-F22UOEP3.js" - }, - "ini-2XGVAVDV": { - "file": "ini-2XGVAVDV.js" - }, - "java-54IVCUHF": { - "file": "java-54IVCUHF.js" - }, - "typescript-RRKVICLF": { - "file": "typescript-RRKVICLF.js" - }, - "javascript-PTWEJFGX": { - "file": "javascript-PTWEJFGX.js" - }, - "chunk-GHDY2MJ7": { - "file": "chunk-GHDY2MJ7.js" - }, - "julia-WOR3BG33": { - "file": "julia-WOR3BG33.js" - }, - "kotlin-RAEGD7HS": { - "file": "kotlin-RAEGD7HS.js" - }, - "ecl-CHABOUWY": { - "file": "ecl-CHABOUWY.js" - }, - "elixir-JWJYFSSW": { - "file": "elixir-JWJYFSSW.js" - }, - "flow9-XFKWO6PF": { - "file": "flow9-XFKWO6PF.js" - }, - "fsharp-4HR2JBPD": { - "file": "fsharp-4HR2JBPD.js" - }, - "freemarker2-6PB63OZP": { - "file": "freemarker2-6PB63OZP.js" - }, - "go-ZD4OIVGF": { - "file": "go-ZD4OIVGF.js" - }, - "graphql-FBLI5OCC": { - "file": "graphql-FBLI5OCC.js" - }, - "handlebars-XJYSPQ6X": { - "file": "handlebars-XJYSPQ6X.js" - }, - "coffee-722JKW3F": { - "file": "coffee-722JKW3F.js" - }, - "cpp-KZ5NZY3L": { - "file": "cpp-KZ5NZY3L.js" - }, - "csharp-IO2RVZAJ": { - "file": "csharp-IO2RVZAJ.js" - }, - "csp-PQNU3GFG": { - "file": "csp-PQNU3GFG.js" - }, - "css-76SKN4DI": { - "file": "css-76SKN4DI.js" - }, - "cypher-6NDKRB7I": { - "file": "cypher-6NDKRB7I.js" - }, - "dart-NNYF6LA6": { - "file": "dart-NNYF6LA6.js" - }, - "dockerfile-CB4FOHWT": { - "file": "dockerfile-CB4FOHWT.js" - }, - "abap-ZJXPBV7D": { - "file": "abap-ZJXPBV7D.js" - }, - "apex-QXTPZBD5": { - "file": "apex-QXTPZBD5.js" - }, - "azcli-AKNZCCZ4": { - "file": "azcli-AKNZCCZ4.js" - }, - "bat-KITOMZVG": { - "file": "bat-KITOMZVG.js" - }, - "bicep-ZLZPPZLV": { - "file": "bicep-ZLZPPZLV.js" - }, - "cameligo-47AYWHA2": { - "file": "cameligo-47AYWHA2.js" - }, - "clojure-2P4KKSXL": { - "file": "clojure-2P4KKSXL.js" - }, - "chunk-3OGJZLRW": { - "file": "chunk-3OGJZLRW.js" - }, - "chunk-G3JK5JM3": { - "file": "chunk-G3JK5JM3.js" - }, - "chunk-IJRRQNDQ": { - "file": "chunk-IJRRQNDQ.js" - }, - "chunk-3C4OEVM2": { - "file": "chunk-3C4OEVM2.js" - }, - "chunk-6PJEDKO5": { - "file": "chunk-6PJEDKO5.js" - } - } -} \ No newline at end of file diff --git a/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js b/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js deleted file mode 100644 index fd372e5..0000000 --- a/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js +++ /dev/null @@ -1,1323 +0,0 @@ -import "./chunk-6PJEDKO5.js"; - -// node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.js -var conf = { - comments: { - lineComment: "*" - }, - brackets: [ - ["[", "]"], - ["(", ")"] - ] -}; -var language = { - defaultToken: "invalid", - ignoreCase: true, - tokenPostfix: ".abap", - keywords: [ - "abap-source", - "abbreviated", - "abstract", - "accept", - "accepting", - "according", - "activation", - "actual", - "add", - "add-corresponding", - "adjacent", - "after", - "alias", - "aliases", - "align", - "all", - "allocate", - "alpha", - "analysis", - "analyzer", - "and", - "append", - "appendage", - "appending", - "application", - "archive", - "area", - "arithmetic", - "as", - "ascending", - "aspect", - "assert", - "assign", - "assigned", - "assigning", - "association", - "asynchronous", - "at", - "attributes", - "authority", - "authority-check", - "avg", - "back", - "background", - "backup", - "backward", - "badi", - "base", - "before", - "begin", - "between", - "big", - "binary", - "bintohex", - "bit", - "black", - "blank", - "blanks", - "blob", - "block", - "blocks", - "blue", - "bound", - "boundaries", - "bounds", - "boxed", - "break-point", - "buffer", - "by", - "bypassing", - "byte", - "byte-order", - "call", - "calling", - "case", - "cast", - "casting", - "catch", - "center", - "centered", - "chain", - "chain-input", - "chain-request", - "change", - "changing", - "channels", - "character", - "char-to-hex", - "check", - "checkbox", - "ci_", - "circular", - "class", - "class-coding", - "class-data", - "class-events", - "class-methods", - "class-pool", - "cleanup", - "clear", - "client", - "clob", - "clock", - "close", - "coalesce", - "code", - "coding", - "col_background", - "col_group", - "col_heading", - "col_key", - "col_negative", - "col_normal", - "col_positive", - "col_total", - "collect", - "color", - "column", - "columns", - "comment", - "comments", - "commit", - "common", - "communication", - "comparing", - "component", - "components", - "compression", - "compute", - "concat", - "concat_with_space", - "concatenate", - "cond", - "condense", - "condition", - "connect", - "connection", - "constants", - "context", - "contexts", - "continue", - "control", - "controls", - "conv", - "conversion", - "convert", - "copies", - "copy", - "corresponding", - "country", - "cover", - "cpi", - "create", - "creating", - "critical", - "currency", - "currency_conversion", - "current", - "cursor", - "cursor-selection", - "customer", - "customer-function", - "dangerous", - "data", - "database", - "datainfo", - "dataset", - "date", - "dats_add_days", - "dats_add_months", - "dats_days_between", - "dats_is_valid", - "daylight", - "dd/mm/yy", - "dd/mm/yyyy", - "ddmmyy", - "deallocate", - "decimal_shift", - "decimals", - "declarations", - "deep", - "default", - "deferred", - "define", - "defining", - "definition", - "delete", - "deleting", - "demand", - "department", - "descending", - "describe", - "destination", - "detail", - "dialog", - "directory", - "disconnect", - "display", - "display-mode", - "distinct", - "divide", - "divide-corresponding", - "division", - "do", - "dummy", - "duplicate", - "duplicates", - "duration", - "during", - "dynamic", - "dynpro", - "edit", - "editor-call", - "else", - "elseif", - "empty", - "enabled", - "enabling", - "encoding", - "end", - "endat", - "endcase", - "endcatch", - "endchain", - "endclass", - "enddo", - "endenhancement", - "end-enhancement-section", - "endexec", - "endform", - "endfunction", - "endian", - "endif", - "ending", - "endinterface", - "end-lines", - "endloop", - "endmethod", - "endmodule", - "end-of-definition", - "end-of-editing", - "end-of-file", - "end-of-page", - "end-of-selection", - "endon", - "endprovide", - "endselect", - "end-test-injection", - "end-test-seam", - "endtry", - "endwhile", - "endwith", - "engineering", - "enhancement", - "enhancement-point", - "enhancements", - "enhancement-section", - "entries", - "entry", - "enum", - "environment", - "equiv", - "errormessage", - "errors", - "escaping", - "event", - "events", - "exact", - "except", - "exception", - "exceptions", - "exception-table", - "exclude", - "excluding", - "exec", - "execute", - "exists", - "exit", - "exit-command", - "expand", - "expanding", - "expiration", - "explicit", - "exponent", - "export", - "exporting", - "extend", - "extended", - "extension", - "extract", - "fail", - "fetch", - "field", - "field-groups", - "fields", - "field-symbol", - "field-symbols", - "file", - "filter", - "filters", - "filter-table", - "final", - "find", - "first", - "first-line", - "fixed-point", - "fkeq", - "fkge", - "flush", - "font", - "for", - "form", - "format", - "forward", - "found", - "frame", - "frames", - "free", - "friends", - "from", - "function", - "functionality", - "function-pool", - "further", - "gaps", - "generate", - "get", - "giving", - "gkeq", - "gkge", - "global", - "grant", - "green", - "group", - "groups", - "handle", - "handler", - "harmless", - "hashed", - "having", - "hdb", - "header", - "headers", - "heading", - "head-lines", - "help-id", - "help-request", - "hextobin", - "hide", - "high", - "hint", - "hold", - "hotspot", - "icon", - "id", - "identification", - "identifier", - "ids", - "if", - "ignore", - "ignoring", - "immediately", - "implementation", - "implementations", - "implemented", - "implicit", - "import", - "importing", - "in", - "inactive", - "incl", - "include", - "includes", - "including", - "increment", - "index", - "index-line", - "infotypes", - "inheriting", - "init", - "initial", - "initialization", - "inner", - "inout", - "input", - "insert", - "instance", - "instances", - "instr", - "intensified", - "interface", - "interface-pool", - "interfaces", - "internal", - "intervals", - "into", - "inverse", - "inverted-date", - "is", - "iso", - "job", - "join", - "keep", - "keeping", - "kernel", - "key", - "keys", - "keywords", - "kind", - "language", - "last", - "late", - "layout", - "leading", - "leave", - "left", - "left-justified", - "leftplus", - "leftspace", - "legacy", - "length", - "let", - "level", - "levels", - "like", - "line", - "lines", - "line-count", - "linefeed", - "line-selection", - "line-size", - "list", - "listbox", - "list-processing", - "little", - "llang", - "load", - "load-of-program", - "lob", - "local", - "locale", - "locator", - "logfile", - "logical", - "log-point", - "long", - "loop", - "low", - "lower", - "lpad", - "lpi", - "ltrim", - "mail", - "main", - "major-id", - "mapping", - "margin", - "mark", - "mask", - "match", - "matchcode", - "max", - "maximum", - "medium", - "members", - "memory", - "mesh", - "message", - "message-id", - "messages", - "messaging", - "method", - "methods", - "min", - "minimum", - "minor-id", - "mm/dd/yy", - "mm/dd/yyyy", - "mmddyy", - "mode", - "modif", - "modifier", - "modify", - "module", - "move", - "move-corresponding", - "multiply", - "multiply-corresponding", - "name", - "nametab", - "native", - "nested", - "nesting", - "new", - "new-line", - "new-page", - "new-section", - "next", - "no", - "no-display", - "no-extension", - "no-gap", - "no-gaps", - "no-grouping", - "no-heading", - "no-scrolling", - "no-sign", - "no-title", - "no-topofpage", - "no-zero", - "node", - "nodes", - "non-unicode", - "non-unique", - "not", - "null", - "number", - "object", - "objects", - "obligatory", - "occurrence", - "occurrences", - "occurs", - "of", - "off", - "offset", - "ole", - "on", - "only", - "open", - "option", - "optional", - "options", - "or", - "order", - "other", - "others", - "out", - "outer", - "output", - "output-length", - "overflow", - "overlay", - "pack", - "package", - "pad", - "padding", - "page", - "pages", - "parameter", - "parameters", - "parameter-table", - "part", - "partially", - "pattern", - "percentage", - "perform", - "performing", - "person", - "pf1", - "pf10", - "pf11", - "pf12", - "pf13", - "pf14", - "pf15", - "pf2", - "pf3", - "pf4", - "pf5", - "pf6", - "pf7", - "pf8", - "pf9", - "pf-status", - "pink", - "places", - "pool", - "pos_high", - "pos_low", - "position", - "pragmas", - "precompiled", - "preferred", - "preserving", - "primary", - "print", - "print-control", - "priority", - "private", - "procedure", - "process", - "program", - "property", - "protected", - "provide", - "public", - "push", - "pushbutton", - "put", - "queue-only", - "quickinfo", - "radiobutton", - "raise", - "raising", - "range", - "ranges", - "read", - "reader", - "read-only", - "receive", - "received", - "receiver", - "receiving", - "red", - "redefinition", - "reduce", - "reduced", - "ref", - "reference", - "refresh", - "regex", - "reject", - "remote", - "renaming", - "replace", - "replacement", - "replacing", - "report", - "request", - "requested", - "reserve", - "reset", - "resolution", - "respecting", - "responsible", - "result", - "results", - "resumable", - "resume", - "retry", - "return", - "returncode", - "returning", - "returns", - "right", - "right-justified", - "rightplus", - "rightspace", - "risk", - "rmc_communication_failure", - "rmc_invalid_status", - "rmc_system_failure", - "role", - "rollback", - "rows", - "rpad", - "rtrim", - "run", - "sap", - "sap-spool", - "saving", - "scale_preserving", - "scale_preserving_scientific", - "scan", - "scientific", - "scientific_with_leading_zero", - "scroll", - "scroll-boundary", - "scrolling", - "search", - "secondary", - "seconds", - "section", - "select", - "selection", - "selections", - "selection-screen", - "selection-set", - "selection-sets", - "selection-table", - "select-options", - "send", - "separate", - "separated", - "set", - "shared", - "shift", - "short", - "shortdump-id", - "sign_as_postfix", - "single", - "size", - "skip", - "skipping", - "smart", - "some", - "sort", - "sortable", - "sorted", - "source", - "specified", - "split", - "spool", - "spots", - "sql", - "sqlscript", - "stable", - "stamp", - "standard", - "starting", - "start-of-editing", - "start-of-selection", - "state", - "statement", - "statements", - "static", - "statics", - "statusinfo", - "step-loop", - "stop", - "structure", - "structures", - "style", - "subkey", - "submatches", - "submit", - "subroutine", - "subscreen", - "subtract", - "subtract-corresponding", - "suffix", - "sum", - "summary", - "summing", - "supplied", - "supply", - "suppress", - "switch", - "switchstates", - "symbol", - "syncpoints", - "syntax", - "syntax-check", - "syntax-trace", - "system-call", - "system-exceptions", - "system-exit", - "tab", - "tabbed", - "table", - "tables", - "tableview", - "tabstrip", - "target", - "task", - "tasks", - "test", - "testing", - "test-injection", - "test-seam", - "text", - "textpool", - "then", - "throw", - "time", - "times", - "timestamp", - "timezone", - "tims_is_valid", - "title", - "titlebar", - "title-lines", - "to", - "tokenization", - "tokens", - "top-lines", - "top-of-page", - "trace-file", - "trace-table", - "trailing", - "transaction", - "transfer", - "transformation", - "translate", - "transporting", - "trmac", - "truncate", - "truncation", - "try", - "tstmp_add_seconds", - "tstmp_current_utctimestamp", - "tstmp_is_valid", - "tstmp_seconds_between", - "type", - "type-pool", - "type-pools", - "types", - "uline", - "unassign", - "under", - "unicode", - "union", - "unique", - "unit_conversion", - "unix", - "unpack", - "until", - "unwind", - "up", - "update", - "upper", - "user", - "user-command", - "using", - "utf-8", - "valid", - "value", - "value-request", - "values", - "vary", - "varying", - "verification-message", - "version", - "via", - "view", - "visible", - "wait", - "warning", - "when", - "whenever", - "where", - "while", - "width", - "window", - "windows", - "with", - "with-heading", - "without", - "with-title", - "word", - "work", - "write", - "writer", - "xml", - "xsd", - "yellow", - "yes", - "yymmdd", - "zero", - "zone", - "abap_system_timezone", - "abap_user_timezone", - "access", - "action", - "adabas", - "adjust_numbers", - "allow_precision_loss", - "allowed", - "amdp", - "applicationuser", - "as_geo_json", - "as400", - "associations", - "balance", - "behavior", - "breakup", - "bulk", - "cds", - "cds_client", - "check_before_save", - "child", - "clients", - "corr", - "corr_spearman", - "cross", - "cycles", - "datn_add_days", - "datn_add_months", - "datn_days_between", - "dats_from_datn", - "dats_tims_to_tstmp", - "dats_to_datn", - "db2", - "db6", - "ddl", - "dense_rank", - "depth", - "deterministic", - "discarding", - "entities", - "entity", - "error", - "failed", - "finalize", - "first_value", - "fltp_to_dec", - "following", - "fractional", - "full", - "graph", - "grouping", - "hierarchy", - "hierarchy_ancestors", - "hierarchy_ancestors_aggregate", - "hierarchy_descendants", - "hierarchy_descendants_aggregate", - "hierarchy_siblings", - "incremental", - "indicators", - "lag", - "last_value", - "lead", - "leaves", - "like_regexpr", - "link", - "locale_sap", - "lock", - "locks", - "many", - "mapped", - "matched", - "measures", - "median", - "mssqlnt", - "multiple", - "nodetype", - "ntile", - "nulls", - "occurrences_regexpr", - "one", - "operations", - "oracle", - "orphans", - "over", - "parent", - "parents", - "partition", - "pcre", - "period", - "pfcg_mapping", - "preceding", - "privileged", - "product", - "projection", - "rank", - "redirected", - "replace_regexpr", - "reported", - "response", - "responses", - "root", - "row", - "row_number", - "sap_system_date", - "save", - "schema", - "session", - "sets", - "shortdump", - "siblings", - "spantree", - "start", - "stddev", - "string_agg", - "subtotal", - "sybase", - "tims_from_timn", - "tims_to_timn", - "to_blob", - "to_clob", - "total", - "trace-entry", - "tstmp_to_dats", - "tstmp_to_dst", - "tstmp_to_tims", - "tstmpl_from_utcl", - "tstmpl_to_utcl", - "unbounded", - "utcl_add_seconds", - "utcl_current", - "utcl_seconds_between", - "uuid", - "var", - "verbatim" - ], - builtinFunctions: [ - "abs", - "acos", - "asin", - "atan", - "bit-set", - "boolc", - "boolx", - "ceil", - "char_off", - "charlen", - "cmax", - "cmin", - "concat_lines_of", - "contains", - "contains_any_not_of", - "contains_any_of", - "cos", - "cosh", - "count", - "count_any_not_of", - "count_any_of", - "dbmaxlen", - "distance", - "escape", - "exp", - "find_any_not_of", - "find_any_of", - "find_end", - "floor", - "frac", - "from_mixed", - "ipow", - "line_exists", - "line_index", - "log", - "log10", - "matches", - "nmax", - "nmin", - "numofchar", - "repeat", - "rescale", - "reverse", - "round", - "segment", - "shift_left", - "shift_right", - "sign", - "sin", - "sinh", - "sqrt", - "strlen", - "substring", - "substring_after", - "substring_before", - "substring_from", - "substring_to", - "tan", - "tanh", - "to_lower", - "to_mixed", - "to_upper", - "trunc", - "utclong_add", - "utclong_current", - "utclong_diff", - "xsdbool", - "xstrlen" - ], - typeKeywords: [ - "b", - "c", - "d", - "decfloat16", - "decfloat34", - "f", - "i", - "int8", - "n", - "p", - "s", - "string", - "t", - "utclong", - "x", - "xstring", - "any", - "clike", - "csequence", - "decfloat", - "numeric", - "simple", - "xsequence", - "accp", - "char", - "clnt", - "cuky", - "curr", - "datn", - "dats", - "d16d", - "d16n", - "d16r", - "d34d", - "d34n", - "d34r", - "dec", - "df16_dec", - "df16_raw", - "df34_dec", - "df34_raw", - "fltp", - "geom_ewkb", - "int1", - "int2", - "int4", - "lang", - "lchr", - "lraw", - "numc", - "quan", - "raw", - "rawstring", - "sstring", - "timn", - "tims", - "unit", - "utcl", - "df16_scl", - "df34_scl", - "prec", - "varc", - "abap_bool", - "abap_false", - "abap_true", - "abap_undefined", - "me", - "screen", - "space", - "super", - "sy", - "syst", - "table_line", - "*sys*" - ], - builtinMethods: ["class_constructor", "constructor"], - derivedTypes: [ - "%CID", - "%CID_REF", - "%CONTROL", - "%DATA", - "%ELEMENT", - "%FAIL", - "%KEY", - "%MSG", - "%PARAM", - "%PID", - "%PID_ASSOC", - "%PID_PARENT", - "%_HINTS" - ], - cdsLanguage: [ - "@AbapAnnotation", - "@AbapCatalog", - "@AccessControl", - "@API", - "@ClientDependent", - "@ClientHandling", - "@CompatibilityContract", - "@DataAging", - "@EndUserText", - "@Environment", - "@LanguageDependency", - "@MappingRole", - "@Metadata", - "@MetadataExtension", - "@ObjectModel", - "@Scope", - "@Semantics", - "$EXTENSION", - "$SELF" - ], - selectors: ["->", "->*", "=>", "~", "~*"], - operators: [ - " +", - " -", - "/", - "*", - "**", - "div", - "mod", - "=", - "#", - "@", - "+=", - "-=", - "*=", - "/=", - "**=", - "&&=", - "?=", - "&", - "&&", - "bit-and", - "bit-not", - "bit-or", - "bit-xor", - "m", - "o", - "z", - "<", - " >", - "<=", - ">=", - "<>", - "><", - "=<", - "=>", - "bt", - "byte-ca", - "byte-cn", - "byte-co", - "byte-cs", - "byte-na", - "byte-ns", - "ca", - "cn", - "co", - "cp", - "cs", - "eq", - "ge", - "gt", - "le", - "lt", - "na", - "nb", - "ne", - "np", - "ns", - "*/", - "*:", - "--", - "/*", - "//" - ], - symbols: /[=>))*/, - { - cases: { - "@typeKeywords": "type", - "@keywords": "keyword", - "@cdsLanguage": "annotation", - "@derivedTypes": "type", - "@builtinFunctions": "type", - "@builtinMethods": "type", - "@operators": "key", - "@default": "identifier" - } - } - ], - [/<[\w]+>/, "identifier"], - [/##[\w|_]+/, "comment"], - { include: "@whitespace" }, - [/[:,.]/, "delimiter"], - [/[{}()\[\]]/, "@brackets"], - [ - /@symbols/, - { - cases: { - "@selectors": "tag", - "@operators": "key", - "@default": "" - } - } - ], - [/'/, { token: "string", bracket: "@open", next: "@stringquote" }], - [/`/, { token: "string", bracket: "@open", next: "@stringping" }], - [/\|/, { token: "string", bracket: "@open", next: "@stringtemplate" }], - [/\d+/, "number"] - ], - stringtemplate: [ - [/[^\\\|]+/, "string"], - [/\\\|/, "string"], - [/\|/, { token: "string", bracket: "@close", next: "@pop" }] - ], - stringping: [ - [/[^\\`]+/, "string"], - [/`/, { token: "string", bracket: "@close", next: "@pop" }] - ], - stringquote: [ - [/[^\\']+/, "string"], - [/'/, { token: "string", bracket: "@close", next: "@pop" }] - ], - whitespace: [ - [/[ \t\r\n]+/, ""], - [/^\*.*$/, "comment"], - [/\".*$/, "comment"] - ] - } -}; -export { - conf, - language -}; -/*! Bundled license information: - -monaco-editor/esm/vs/basic-languages/abap/abap.js: - (*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*) -*/ -//# sourceMappingURL=abap-ZJXPBV7D.js.map diff --git a/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js.map b/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js.map deleted file mode 100644 index a86090d..0000000 --- a/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.js"], - "sourcesContent": ["/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\n\n// src/basic-languages/abap/abap.ts\nvar conf = {\n comments: {\n lineComment: \"*\"\n },\n brackets: [\n [\"[\", \"]\"],\n [\"(\", \")\"]\n ]\n};\nvar language = {\n defaultToken: \"invalid\",\n ignoreCase: true,\n tokenPostfix: \".abap\",\n keywords: [\n \"abap-source\",\n \"abbreviated\",\n \"abstract\",\n \"accept\",\n \"accepting\",\n \"according\",\n \"activation\",\n \"actual\",\n \"add\",\n \"add-corresponding\",\n \"adjacent\",\n \"after\",\n \"alias\",\n \"aliases\",\n \"align\",\n \"all\",\n \"allocate\",\n \"alpha\",\n \"analysis\",\n \"analyzer\",\n \"and\",\n \"append\",\n \"appendage\",\n \"appending\",\n \"application\",\n \"archive\",\n \"area\",\n \"arithmetic\",\n \"as\",\n \"ascending\",\n \"aspect\",\n \"assert\",\n \"assign\",\n \"assigned\",\n \"assigning\",\n \"association\",\n \"asynchronous\",\n \"at\",\n \"attributes\",\n \"authority\",\n \"authority-check\",\n \"avg\",\n \"back\",\n \"background\",\n \"backup\",\n \"backward\",\n \"badi\",\n \"base\",\n \"before\",\n \"begin\",\n \"between\",\n \"big\",\n \"binary\",\n \"bintohex\",\n \"bit\",\n \"black\",\n \"blank\",\n \"blanks\",\n \"blob\",\n \"block\",\n \"blocks\",\n \"blue\",\n \"bound\",\n \"boundaries\",\n \"bounds\",\n \"boxed\",\n \"break-point\",\n \"buffer\",\n \"by\",\n \"bypassing\",\n \"byte\",\n \"byte-order\",\n \"call\",\n \"calling\",\n \"case\",\n \"cast\",\n \"casting\",\n \"catch\",\n \"center\",\n \"centered\",\n \"chain\",\n \"chain-input\",\n \"chain-request\",\n \"change\",\n \"changing\",\n \"channels\",\n \"character\",\n \"char-to-hex\",\n \"check\",\n \"checkbox\",\n \"ci_\",\n \"circular\",\n \"class\",\n \"class-coding\",\n \"class-data\",\n \"class-events\",\n \"class-methods\",\n \"class-pool\",\n \"cleanup\",\n \"clear\",\n \"client\",\n \"clob\",\n \"clock\",\n \"close\",\n \"coalesce\",\n \"code\",\n \"coding\",\n \"col_background\",\n \"col_group\",\n \"col_heading\",\n \"col_key\",\n \"col_negative\",\n \"col_normal\",\n \"col_positive\",\n \"col_total\",\n \"collect\",\n \"color\",\n \"column\",\n \"columns\",\n \"comment\",\n \"comments\",\n \"commit\",\n \"common\",\n \"communication\",\n \"comparing\",\n \"component\",\n \"components\",\n \"compression\",\n \"compute\",\n \"concat\",\n \"concat_with_space\",\n \"concatenate\",\n \"cond\",\n \"condense\",\n \"condition\",\n \"connect\",\n \"connection\",\n \"constants\",\n \"context\",\n \"contexts\",\n \"continue\",\n \"control\",\n \"controls\",\n \"conv\",\n \"conversion\",\n \"convert\",\n \"copies\",\n \"copy\",\n \"corresponding\",\n \"country\",\n \"cover\",\n \"cpi\",\n \"create\",\n \"creating\",\n \"critical\",\n \"currency\",\n \"currency_conversion\",\n \"current\",\n \"cursor\",\n \"cursor-selection\",\n \"customer\",\n \"customer-function\",\n \"dangerous\",\n \"data\",\n \"database\",\n \"datainfo\",\n \"dataset\",\n \"date\",\n \"dats_add_days\",\n \"dats_add_months\",\n \"dats_days_between\",\n \"dats_is_valid\",\n \"daylight\",\n \"dd/mm/yy\",\n \"dd/mm/yyyy\",\n \"ddmmyy\",\n \"deallocate\",\n \"decimal_shift\",\n \"decimals\",\n \"declarations\",\n \"deep\",\n \"default\",\n \"deferred\",\n \"define\",\n \"defining\",\n \"definition\",\n \"delete\",\n \"deleting\",\n \"demand\",\n \"department\",\n \"descending\",\n \"describe\",\n \"destination\",\n \"detail\",\n \"dialog\",\n \"directory\",\n \"disconnect\",\n \"display\",\n \"display-mode\",\n \"distinct\",\n \"divide\",\n \"divide-corresponding\",\n \"division\",\n \"do\",\n \"dummy\",\n \"duplicate\",\n \"duplicates\",\n \"duration\",\n \"during\",\n \"dynamic\",\n \"dynpro\",\n \"edit\",\n \"editor-call\",\n \"else\",\n \"elseif\",\n \"empty\",\n \"enabled\",\n \"enabling\",\n \"encoding\",\n \"end\",\n \"endat\",\n \"endcase\",\n \"endcatch\",\n \"endchain\",\n \"endclass\",\n \"enddo\",\n \"endenhancement\",\n \"end-enhancement-section\",\n \"endexec\",\n \"endform\",\n \"endfunction\",\n \"endian\",\n \"endif\",\n \"ending\",\n \"endinterface\",\n \"end-lines\",\n \"endloop\",\n \"endmethod\",\n \"endmodule\",\n \"end-of-definition\",\n \"end-of-editing\",\n \"end-of-file\",\n \"end-of-page\",\n \"end-of-selection\",\n \"endon\",\n \"endprovide\",\n \"endselect\",\n \"end-test-injection\",\n \"end-test-seam\",\n \"endtry\",\n \"endwhile\",\n \"endwith\",\n \"engineering\",\n \"enhancement\",\n \"enhancement-point\",\n \"enhancements\",\n \"enhancement-section\",\n \"entries\",\n \"entry\",\n \"enum\",\n \"environment\",\n \"equiv\",\n \"errormessage\",\n \"errors\",\n \"escaping\",\n \"event\",\n \"events\",\n \"exact\",\n \"except\",\n \"exception\",\n \"exceptions\",\n \"exception-table\",\n \"exclude\",\n \"excluding\",\n \"exec\",\n \"execute\",\n \"exists\",\n \"exit\",\n \"exit-command\",\n \"expand\",\n \"expanding\",\n \"expiration\",\n \"explicit\",\n \"exponent\",\n \"export\",\n \"exporting\",\n \"extend\",\n \"extended\",\n \"extension\",\n \"extract\",\n \"fail\",\n \"fetch\",\n \"field\",\n \"field-groups\",\n \"fields\",\n \"field-symbol\",\n \"field-symbols\",\n \"file\",\n \"filter\",\n \"filters\",\n \"filter-table\",\n \"final\",\n \"find\",\n \"first\",\n \"first-line\",\n \"fixed-point\",\n \"fkeq\",\n \"fkge\",\n \"flush\",\n \"font\",\n \"for\",\n \"form\",\n \"format\",\n \"forward\",\n \"found\",\n \"frame\",\n \"frames\",\n \"free\",\n \"friends\",\n \"from\",\n \"function\",\n \"functionality\",\n \"function-pool\",\n \"further\",\n \"gaps\",\n \"generate\",\n \"get\",\n \"giving\",\n \"gkeq\",\n \"gkge\",\n \"global\",\n \"grant\",\n \"green\",\n \"group\",\n \"groups\",\n \"handle\",\n \"handler\",\n \"harmless\",\n \"hashed\",\n \"having\",\n \"hdb\",\n \"header\",\n \"headers\",\n \"heading\",\n \"head-lines\",\n \"help-id\",\n \"help-request\",\n \"hextobin\",\n \"hide\",\n \"high\",\n \"hint\",\n \"hold\",\n \"hotspot\",\n \"icon\",\n \"id\",\n \"identification\",\n \"identifier\",\n \"ids\",\n \"if\",\n \"ignore\",\n \"ignoring\",\n \"immediately\",\n \"implementation\",\n \"implementations\",\n \"implemented\",\n \"implicit\",\n \"import\",\n \"importing\",\n \"in\",\n \"inactive\",\n \"incl\",\n \"include\",\n \"includes\",\n \"including\",\n \"increment\",\n \"index\",\n \"index-line\",\n \"infotypes\",\n \"inheriting\",\n \"init\",\n \"initial\",\n \"initialization\",\n \"inner\",\n \"inout\",\n \"input\",\n \"insert\",\n \"instance\",\n \"instances\",\n \"instr\",\n \"intensified\",\n \"interface\",\n \"interface-pool\",\n \"interfaces\",\n \"internal\",\n \"intervals\",\n \"into\",\n \"inverse\",\n \"inverted-date\",\n \"is\",\n \"iso\",\n \"job\",\n \"join\",\n \"keep\",\n \"keeping\",\n \"kernel\",\n \"key\",\n \"keys\",\n \"keywords\",\n \"kind\",\n \"language\",\n \"last\",\n \"late\",\n \"layout\",\n \"leading\",\n \"leave\",\n \"left\",\n \"left-justified\",\n \"leftplus\",\n \"leftspace\",\n \"legacy\",\n \"length\",\n \"let\",\n \"level\",\n \"levels\",\n \"like\",\n \"line\",\n \"lines\",\n \"line-count\",\n \"linefeed\",\n \"line-selection\",\n \"line-size\",\n \"list\",\n \"listbox\",\n \"list-processing\",\n \"little\",\n \"llang\",\n \"load\",\n \"load-of-program\",\n \"lob\",\n \"local\",\n \"locale\",\n \"locator\",\n \"logfile\",\n \"logical\",\n \"log-point\",\n \"long\",\n \"loop\",\n \"low\",\n \"lower\",\n \"lpad\",\n \"lpi\",\n \"ltrim\",\n \"mail\",\n \"main\",\n \"major-id\",\n \"mapping\",\n \"margin\",\n \"mark\",\n \"mask\",\n \"match\",\n \"matchcode\",\n \"max\",\n \"maximum\",\n \"medium\",\n \"members\",\n \"memory\",\n \"mesh\",\n \"message\",\n \"message-id\",\n \"messages\",\n \"messaging\",\n \"method\",\n \"methods\",\n \"min\",\n \"minimum\",\n \"minor-id\",\n \"mm/dd/yy\",\n \"mm/dd/yyyy\",\n \"mmddyy\",\n \"mode\",\n \"modif\",\n \"modifier\",\n \"modify\",\n \"module\",\n \"move\",\n \"move-corresponding\",\n \"multiply\",\n \"multiply-corresponding\",\n \"name\",\n \"nametab\",\n \"native\",\n \"nested\",\n \"nesting\",\n \"new\",\n \"new-line\",\n \"new-page\",\n \"new-section\",\n \"next\",\n \"no\",\n \"no-display\",\n \"no-extension\",\n \"no-gap\",\n \"no-gaps\",\n \"no-grouping\",\n \"no-heading\",\n \"no-scrolling\",\n \"no-sign\",\n \"no-title\",\n \"no-topofpage\",\n \"no-zero\",\n \"node\",\n \"nodes\",\n \"non-unicode\",\n \"non-unique\",\n \"not\",\n \"null\",\n \"number\",\n \"object\",\n \"objects\",\n \"obligatory\",\n \"occurrence\",\n \"occurrences\",\n \"occurs\",\n \"of\",\n \"off\",\n \"offset\",\n \"ole\",\n \"on\",\n \"only\",\n \"open\",\n \"option\",\n \"optional\",\n \"options\",\n \"or\",\n \"order\",\n \"other\",\n \"others\",\n \"out\",\n \"outer\",\n \"output\",\n \"output-length\",\n \"overflow\",\n \"overlay\",\n \"pack\",\n \"package\",\n \"pad\",\n \"padding\",\n \"page\",\n \"pages\",\n \"parameter\",\n \"parameters\",\n \"parameter-table\",\n \"part\",\n \"partially\",\n \"pattern\",\n \"percentage\",\n \"perform\",\n \"performing\",\n \"person\",\n \"pf1\",\n \"pf10\",\n \"pf11\",\n \"pf12\",\n \"pf13\",\n \"pf14\",\n \"pf15\",\n \"pf2\",\n \"pf3\",\n \"pf4\",\n \"pf5\",\n \"pf6\",\n \"pf7\",\n \"pf8\",\n \"pf9\",\n \"pf-status\",\n \"pink\",\n \"places\",\n \"pool\",\n \"pos_high\",\n \"pos_low\",\n \"position\",\n \"pragmas\",\n \"precompiled\",\n \"preferred\",\n \"preserving\",\n \"primary\",\n \"print\",\n \"print-control\",\n \"priority\",\n \"private\",\n \"procedure\",\n \"process\",\n \"program\",\n \"property\",\n \"protected\",\n \"provide\",\n \"public\",\n \"push\",\n \"pushbutton\",\n \"put\",\n \"queue-only\",\n \"quickinfo\",\n \"radiobutton\",\n \"raise\",\n \"raising\",\n \"range\",\n \"ranges\",\n \"read\",\n \"reader\",\n \"read-only\",\n \"receive\",\n \"received\",\n \"receiver\",\n \"receiving\",\n \"red\",\n \"redefinition\",\n \"reduce\",\n \"reduced\",\n \"ref\",\n \"reference\",\n \"refresh\",\n \"regex\",\n \"reject\",\n \"remote\",\n \"renaming\",\n \"replace\",\n \"replacement\",\n \"replacing\",\n \"report\",\n \"request\",\n \"requested\",\n \"reserve\",\n \"reset\",\n \"resolution\",\n \"respecting\",\n \"responsible\",\n \"result\",\n \"results\",\n \"resumable\",\n \"resume\",\n \"retry\",\n \"return\",\n \"returncode\",\n \"returning\",\n \"returns\",\n \"right\",\n \"right-justified\",\n \"rightplus\",\n \"rightspace\",\n \"risk\",\n \"rmc_communication_failure\",\n \"rmc_invalid_status\",\n \"rmc_system_failure\",\n \"role\",\n \"rollback\",\n \"rows\",\n \"rpad\",\n \"rtrim\",\n \"run\",\n \"sap\",\n \"sap-spool\",\n \"saving\",\n \"scale_preserving\",\n \"scale_preserving_scientific\",\n \"scan\",\n \"scientific\",\n \"scientific_with_leading_zero\",\n \"scroll\",\n \"scroll-boundary\",\n \"scrolling\",\n \"search\",\n \"secondary\",\n \"seconds\",\n \"section\",\n \"select\",\n \"selection\",\n \"selections\",\n \"selection-screen\",\n \"selection-set\",\n \"selection-sets\",\n \"selection-table\",\n \"select-options\",\n \"send\",\n \"separate\",\n \"separated\",\n \"set\",\n \"shared\",\n \"shift\",\n \"short\",\n \"shortdump-id\",\n \"sign_as_postfix\",\n \"single\",\n \"size\",\n \"skip\",\n \"skipping\",\n \"smart\",\n \"some\",\n \"sort\",\n \"sortable\",\n \"sorted\",\n \"source\",\n \"specified\",\n \"split\",\n \"spool\",\n \"spots\",\n \"sql\",\n \"sqlscript\",\n \"stable\",\n \"stamp\",\n \"standard\",\n \"starting\",\n \"start-of-editing\",\n \"start-of-selection\",\n \"state\",\n \"statement\",\n \"statements\",\n \"static\",\n \"statics\",\n \"statusinfo\",\n \"step-loop\",\n \"stop\",\n \"structure\",\n \"structures\",\n \"style\",\n \"subkey\",\n \"submatches\",\n \"submit\",\n \"subroutine\",\n \"subscreen\",\n \"subtract\",\n \"subtract-corresponding\",\n \"suffix\",\n \"sum\",\n \"summary\",\n \"summing\",\n \"supplied\",\n \"supply\",\n \"suppress\",\n \"switch\",\n \"switchstates\",\n \"symbol\",\n \"syncpoints\",\n \"syntax\",\n \"syntax-check\",\n \"syntax-trace\",\n \"system-call\",\n \"system-exceptions\",\n \"system-exit\",\n \"tab\",\n \"tabbed\",\n \"table\",\n \"tables\",\n \"tableview\",\n \"tabstrip\",\n \"target\",\n \"task\",\n \"tasks\",\n \"test\",\n \"testing\",\n \"test-injection\",\n \"test-seam\",\n \"text\",\n \"textpool\",\n \"then\",\n \"throw\",\n \"time\",\n \"times\",\n \"timestamp\",\n \"timezone\",\n \"tims_is_valid\",\n \"title\",\n \"titlebar\",\n \"title-lines\",\n \"to\",\n \"tokenization\",\n \"tokens\",\n \"top-lines\",\n \"top-of-page\",\n \"trace-file\",\n \"trace-table\",\n \"trailing\",\n \"transaction\",\n \"transfer\",\n \"transformation\",\n \"translate\",\n \"transporting\",\n \"trmac\",\n \"truncate\",\n \"truncation\",\n \"try\",\n \"tstmp_add_seconds\",\n \"tstmp_current_utctimestamp\",\n \"tstmp_is_valid\",\n \"tstmp_seconds_between\",\n \"type\",\n \"type-pool\",\n \"type-pools\",\n \"types\",\n \"uline\",\n \"unassign\",\n \"under\",\n \"unicode\",\n \"union\",\n \"unique\",\n \"unit_conversion\",\n \"unix\",\n \"unpack\",\n \"until\",\n \"unwind\",\n \"up\",\n \"update\",\n \"upper\",\n \"user\",\n \"user-command\",\n \"using\",\n \"utf-8\",\n \"valid\",\n \"value\",\n \"value-request\",\n \"values\",\n \"vary\",\n \"varying\",\n \"verification-message\",\n \"version\",\n \"via\",\n \"view\",\n \"visible\",\n \"wait\",\n \"warning\",\n \"when\",\n \"whenever\",\n \"where\",\n \"while\",\n \"width\",\n \"window\",\n \"windows\",\n \"with\",\n \"with-heading\",\n \"without\",\n \"with-title\",\n \"word\",\n \"work\",\n \"write\",\n \"writer\",\n \"xml\",\n \"xsd\",\n \"yellow\",\n \"yes\",\n \"yymmdd\",\n \"zero\",\n \"zone\",\n \"abap_system_timezone\",\n \"abap_user_timezone\",\n \"access\",\n \"action\",\n \"adabas\",\n \"adjust_numbers\",\n \"allow_precision_loss\",\n \"allowed\",\n \"amdp\",\n \"applicationuser\",\n \"as_geo_json\",\n \"as400\",\n \"associations\",\n \"balance\",\n \"behavior\",\n \"breakup\",\n \"bulk\",\n \"cds\",\n \"cds_client\",\n \"check_before_save\",\n \"child\",\n \"clients\",\n \"corr\",\n \"corr_spearman\",\n \"cross\",\n \"cycles\",\n \"datn_add_days\",\n \"datn_add_months\",\n \"datn_days_between\",\n \"dats_from_datn\",\n \"dats_tims_to_tstmp\",\n \"dats_to_datn\",\n \"db2\",\n \"db6\",\n \"ddl\",\n \"dense_rank\",\n \"depth\",\n \"deterministic\",\n \"discarding\",\n \"entities\",\n \"entity\",\n \"error\",\n \"failed\",\n \"finalize\",\n \"first_value\",\n \"fltp_to_dec\",\n \"following\",\n \"fractional\",\n \"full\",\n \"graph\",\n \"grouping\",\n \"hierarchy\",\n \"hierarchy_ancestors\",\n \"hierarchy_ancestors_aggregate\",\n \"hierarchy_descendants\",\n \"hierarchy_descendants_aggregate\",\n \"hierarchy_siblings\",\n \"incremental\",\n \"indicators\",\n \"lag\",\n \"last_value\",\n \"lead\",\n \"leaves\",\n \"like_regexpr\",\n \"link\",\n \"locale_sap\",\n \"lock\",\n \"locks\",\n \"many\",\n \"mapped\",\n \"matched\",\n \"measures\",\n \"median\",\n \"mssqlnt\",\n \"multiple\",\n \"nodetype\",\n \"ntile\",\n \"nulls\",\n \"occurrences_regexpr\",\n \"one\",\n \"operations\",\n \"oracle\",\n \"orphans\",\n \"over\",\n \"parent\",\n \"parents\",\n \"partition\",\n \"pcre\",\n \"period\",\n \"pfcg_mapping\",\n \"preceding\",\n \"privileged\",\n \"product\",\n \"projection\",\n \"rank\",\n \"redirected\",\n \"replace_regexpr\",\n \"reported\",\n \"response\",\n \"responses\",\n \"root\",\n \"row\",\n \"row_number\",\n \"sap_system_date\",\n \"save\",\n \"schema\",\n \"session\",\n \"sets\",\n \"shortdump\",\n \"siblings\",\n \"spantree\",\n \"start\",\n \"stddev\",\n \"string_agg\",\n \"subtotal\",\n \"sybase\",\n \"tims_from_timn\",\n \"tims_to_timn\",\n \"to_blob\",\n \"to_clob\",\n \"total\",\n \"trace-entry\",\n \"tstmp_to_dats\",\n \"tstmp_to_dst\",\n \"tstmp_to_tims\",\n \"tstmpl_from_utcl\",\n \"tstmpl_to_utcl\",\n \"unbounded\",\n \"utcl_add_seconds\",\n \"utcl_current\",\n \"utcl_seconds_between\",\n \"uuid\",\n \"var\",\n \"verbatim\"\n ],\n builtinFunctions: [\n \"abs\",\n \"acos\",\n \"asin\",\n \"atan\",\n \"bit-set\",\n \"boolc\",\n \"boolx\",\n \"ceil\",\n \"char_off\",\n \"charlen\",\n \"cmax\",\n \"cmin\",\n \"concat_lines_of\",\n \"contains\",\n \"contains_any_not_of\",\n \"contains_any_of\",\n \"cos\",\n \"cosh\",\n \"count\",\n \"count_any_not_of\",\n \"count_any_of\",\n \"dbmaxlen\",\n \"distance\",\n \"escape\",\n \"exp\",\n \"find_any_not_of\",\n \"find_any_of\",\n \"find_end\",\n \"floor\",\n \"frac\",\n \"from_mixed\",\n \"ipow\",\n \"line_exists\",\n \"line_index\",\n \"log\",\n \"log10\",\n \"matches\",\n \"nmax\",\n \"nmin\",\n \"numofchar\",\n \"repeat\",\n \"rescale\",\n \"reverse\",\n \"round\",\n \"segment\",\n \"shift_left\",\n \"shift_right\",\n \"sign\",\n \"sin\",\n \"sinh\",\n \"sqrt\",\n \"strlen\",\n \"substring\",\n \"substring_after\",\n \"substring_before\",\n \"substring_from\",\n \"substring_to\",\n \"tan\",\n \"tanh\",\n \"to_lower\",\n \"to_mixed\",\n \"to_upper\",\n \"trunc\",\n \"utclong_add\",\n \"utclong_current\",\n \"utclong_diff\",\n \"xsdbool\",\n \"xstrlen\"\n ],\n typeKeywords: [\n \"b\",\n \"c\",\n \"d\",\n \"decfloat16\",\n \"decfloat34\",\n \"f\",\n \"i\",\n \"int8\",\n \"n\",\n \"p\",\n \"s\",\n \"string\",\n \"t\",\n \"utclong\",\n \"x\",\n \"xstring\",\n \"any\",\n \"clike\",\n \"csequence\",\n \"decfloat\",\n \"numeric\",\n \"simple\",\n \"xsequence\",\n \"accp\",\n \"char\",\n \"clnt\",\n \"cuky\",\n \"curr\",\n \"datn\",\n \"dats\",\n \"d16d\",\n \"d16n\",\n \"d16r\",\n \"d34d\",\n \"d34n\",\n \"d34r\",\n \"dec\",\n \"df16_dec\",\n \"df16_raw\",\n \"df34_dec\",\n \"df34_raw\",\n \"fltp\",\n \"geom_ewkb\",\n \"int1\",\n \"int2\",\n \"int4\",\n \"lang\",\n \"lchr\",\n \"lraw\",\n \"numc\",\n \"quan\",\n \"raw\",\n \"rawstring\",\n \"sstring\",\n \"timn\",\n \"tims\",\n \"unit\",\n \"utcl\",\n \"df16_scl\",\n \"df34_scl\",\n \"prec\",\n \"varc\",\n \"abap_bool\",\n \"abap_false\",\n \"abap_true\",\n \"abap_undefined\",\n \"me\",\n \"screen\",\n \"space\",\n \"super\",\n \"sy\",\n \"syst\",\n \"table_line\",\n \"*sys*\"\n ],\n builtinMethods: [\"class_constructor\", \"constructor\"],\n derivedTypes: [\n \"%CID\",\n \"%CID_REF\",\n \"%CONTROL\",\n \"%DATA\",\n \"%ELEMENT\",\n \"%FAIL\",\n \"%KEY\",\n \"%MSG\",\n \"%PARAM\",\n \"%PID\",\n \"%PID_ASSOC\",\n \"%PID_PARENT\",\n \"%_HINTS\"\n ],\n cdsLanguage: [\n \"@AbapAnnotation\",\n \"@AbapCatalog\",\n \"@AccessControl\",\n \"@API\",\n \"@ClientDependent\",\n \"@ClientHandling\",\n \"@CompatibilityContract\",\n \"@DataAging\",\n \"@EndUserText\",\n \"@Environment\",\n \"@LanguageDependency\",\n \"@MappingRole\",\n \"@Metadata\",\n \"@MetadataExtension\",\n \"@ObjectModel\",\n \"@Scope\",\n \"@Semantics\",\n \"$EXTENSION\",\n \"$SELF\"\n ],\n selectors: [\"->\", \"->*\", \"=>\", \"~\", \"~*\"],\n operators: [\n \" +\",\n \" -\",\n \"/\",\n \"*\",\n \"**\",\n \"div\",\n \"mod\",\n \"=\",\n \"#\",\n \"@\",\n \"+=\",\n \"-=\",\n \"*=\",\n \"/=\",\n \"**=\",\n \"&&=\",\n \"?=\",\n \"&\",\n \"&&\",\n \"bit-and\",\n \"bit-not\",\n \"bit-or\",\n \"bit-xor\",\n \"m\",\n \"o\",\n \"z\",\n \"<\",\n \" >\",\n \"<=\",\n \">=\",\n \"<>\",\n \"><\",\n \"=<\",\n \"=>\",\n \"bt\",\n \"byte-ca\",\n \"byte-cn\",\n \"byte-co\",\n \"byte-cs\",\n \"byte-na\",\n \"byte-ns\",\n \"ca\",\n \"cn\",\n \"co\",\n \"cp\",\n \"cs\",\n \"eq\",\n \"ge\",\n \"gt\",\n \"le\",\n \"lt\",\n \"na\",\n \"nb\",\n \"ne\",\n \"np\",\n \"ns\",\n \"*/\",\n \"*:\",\n \"--\",\n \"/*\",\n \"//\"\n ],\n symbols: /[=>))*/,\n {\n cases: {\n \"@typeKeywords\": \"type\",\n \"@keywords\": \"keyword\",\n \"@cdsLanguage\": \"annotation\",\n \"@derivedTypes\": \"type\",\n \"@builtinFunctions\": \"type\",\n \"@builtinMethods\": \"type\",\n \"@operators\": \"key\",\n \"@default\": \"identifier\"\n }\n }\n ],\n [/<[\\w]+>/, \"identifier\"],\n [/##[\\w|_]+/, \"comment\"],\n { include: \"@whitespace\" },\n [/[:,.]/, \"delimiter\"],\n [/[{}()\\[\\]]/, \"@brackets\"],\n [\n /@symbols/,\n {\n cases: {\n \"@selectors\": \"tag\",\n \"@operators\": \"key\",\n \"@default\": \"\"\n }\n }\n ],\n [/'/, { token: \"string\", bracket: \"@open\", next: \"@stringquote\" }],\n [/`/, { token: \"string\", bracket: \"@open\", next: \"@stringping\" }],\n [/\\|/, { token: \"string\", bracket: \"@open\", next: \"@stringtemplate\" }],\n [/\\d+/, \"number\"]\n ],\n stringtemplate: [\n [/[^\\\\\\|]+/, \"string\"],\n [/\\\\\\|/, \"string\"],\n [/\\|/, { token: \"string\", bracket: \"@close\", next: \"@pop\" }]\n ],\n stringping: [\n [/[^\\\\`]+/, \"string\"],\n [/`/, { token: \"string\", bracket: \"@close\", next: \"@pop\" }]\n ],\n stringquote: [\n [/[^\\\\']+/, \"string\"],\n [/'/, { token: \"string\", bracket: \"@close\", next: \"@pop\" }]\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, \"\"],\n [/^\\*.*$/, \"comment\"],\n [/\\\".*$/, \"comment\"]\n ]\n }\n};\nexport {\n conf,\n language\n};\n"], - "mappings": ";;;AAQA,IAAI,OAAO;AAAA,EACT,UAAU;AAAA,IACR,aAAa;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACR,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,EACX;AACF;AACA,IAAI,WAAW;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,kBAAkB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,gBAAgB,CAAC,qBAAqB,aAAa;AAAA,EACnD,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAa;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,WAAW,CAAC,MAAM,OAAO,MAAM,KAAK,IAAI;AAAA,EACxC,WAAW;AAAA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MACF;AAAA,MACA,CAAC,KAAK,EAAE,OAAO,UAAU,SAAS,SAAS,MAAM,eAAe,CAAC;AAAA,MACjE,CAAC,KAAK,EAAE,OAAO,UAAU,SAAS,SAAS,MAAM,cAAc,CAAC;AAAA,MAChE,CAAC,MAAM,EAAE,OAAO,UAAU,SAAS,SAAS,MAAM,kBAAkB,CAAC;AAAA,MACrE,CAAC,OAAO,QAAQ;AAAA,IAClB;AAAA,IACA,gBAAgB;AAAA,MACd,CAAC,YAAY,QAAQ;AAAA,MACrB,CAAC,QAAQ,QAAQ;AAAA,MACjB,CAAC,MAAM,EAAE,OAAO,UAAU,SAAS,UAAU,MAAM,OAAO,CAAC;AAAA,IAC7D;AAAA,IACA,YAAY;AAAA,MACV,CAAC,WAAW,QAAQ;AAAA,MACpB,CAAC,KAAK,EAAE,OAAO,UAAU,SAAS,UAAU,MAAM,OAAO,CAAC;AAAA,IAC5D;AAAA,IACA,aAAa;AAAA,MACX,CAAC,WAAW,QAAQ;AAAA,MACpB,CAAC,KAAK,EAAE,OAAO,UAAU,SAAS,UAAU,MAAM,OAAO,CAAC;AAAA,IAC5D;AAAA,IACA,YAAY;AAAA,MACV,CAAC,cAAc,EAAE;AAAA,MACjB,CAAC,UAAU,SAAS;AAAA,MACpB,CAAC,SAAS,SAAS;AAAA,IACrB;AAAA,EACF;AACF;", - "names": [] -} diff --git a/docs/.vitepress/cache/deps/adaptivecards.js b/docs/.vitepress/cache/deps/adaptivecards.js deleted file mode 100644 index a3ce1d4..0000000 --- a/docs/.vitepress/cache/deps/adaptivecards.js +++ /dev/null @@ -1,12302 +0,0 @@ -import { - __commonJS -} from "./chunk-6PJEDKO5.js"; - -// node_modules/adaptivecards/lib/strings.js -var require_strings = __commonJS({ - "node_modules/adaptivecards/lib/strings.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Strings = void 0; - var Strings = ( - /** @class */ - function() { - function Strings2() { - } - Strings2.errors = { - unknownElementType: function(typeName) { - return 'Unknown element type "'.concat(typeName, '". Fallback will be used if present.'); - }, - unknownActionType: function(typeName) { - return 'Unknown action type "'.concat(typeName, '". Fallback will be used if present.'); - }, - elementTypeNotAllowed: function(typeName) { - return 'Element type "'.concat(typeName, '" is not allowed in this context.'); - }, - actionTypeNotAllowed: function(typeName) { - return 'Action type "'.concat(typeName, '" is not allowed in this context.'); - }, - invalidPropertyValue: function(value, propertyName) { - return 'Invalid value "'.concat(value, '" for property "').concat(propertyName, '".'); - }, - showCardMustHaveCard: function() { - return '"An Action.ShowCard must have its "card" property set to a valid AdaptiveCard object.'; - }, - invalidColumnWidth: function(invalidWidth) { - return 'Invalid column width "'.concat(invalidWidth, '" - defaulting to "auto".'); - }, - invalidCardVersion: function(defaultingToVersion) { - return 'Invalid card version. Defaulting to "'.concat(defaultingToVersion, '".'); - }, - invalidVersionString: function(versionString) { - return 'Invalid version string "'.concat(versionString, '".'); - }, - propertyValueNotSupported: function(value, propertyName, supportedInVersion, versionUsed) { - return 'Value "'.concat(value, '" for property "').concat(propertyName, '" is supported in version ').concat(supportedInVersion, ", but you are using version ").concat(versionUsed, "."); - }, - propertyNotSupported: function(propertyName, supportedInVersion, versionUsed) { - return 'Property "'.concat(propertyName, '" is supported in version ').concat(supportedInVersion, ", but you are using version ").concat(versionUsed, "."); - }, - indexOutOfRange: function(index) { - return "Index out of range (".concat(index, ")."); - }, - elementCannotBeUsedAsInline: function() { - return "RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline."; - }, - inlineAlreadyParented: function() { - return "RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock."; - }, - interactivityNotAllowed: function() { - return "Interactivity is not allowed."; - }, - inputsMustHaveUniqueId: function() { - return "All inputs must have a unique Id."; - }, - choiceSetMustHaveAtLeastOneChoice: function() { - return "An Input.ChoiceSet must have at least one choice defined."; - }, - choiceSetChoicesMustHaveTitleAndValue: function() { - return "All choices in an Input.ChoiceSet must have their title and value properties set."; - }, - propertyMustBeSet: function(propertyName) { - return 'Property "'.concat(propertyName, '" must be set.'); - }, - actionHttpHeadersMustHaveNameAndValue: function() { - return "All headers of an Action.Http must have their name and value properties set."; - }, - tooManyActions: function(maximumActions) { - return "Maximum number of actions exceeded (".concat(maximumActions, ")."); - }, - tooLittleTimeDelay: function(minAutoplayDelay) { - return "Autoplay Delay is too short (".concat(minAutoplayDelay, ")."); - }, - columnAlreadyBelongsToAnotherSet: function() { - return "This column already belongs to another ColumnSet."; - }, - invalidCardType: function() { - return `Invalid or missing card type. Make sure the card's type property is set to "AdaptiveCard".`; - }, - unsupportedCardVersion: function(version, maxSupportedVersion) { - return "The specified card version (".concat(version, ") is not supported or still in preview. The latest released card version is ").concat(maxSupportedVersion, "."); - }, - duplicateId: function(id) { - return 'Duplicate Id "'.concat(id, '".'); - }, - markdownProcessingNotEnabled: function() { - return "Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown"; - }, - processMarkdownEventRemoved: function() { - return "The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead."; - }, - elementAlreadyParented: function() { - return "The element already belongs to another container."; - }, - actionAlreadyParented: function() { - return "The action already belongs to another element."; - }, - elementTypeNotStandalone: function(typeName) { - return "Elements of type ".concat(typeName, " cannot be used as standalone elements."); - } - }; - Strings2.magicCodeInputCard = { - tryAgain: function() { - return "That didn't work... let's try again."; - }, - pleaseLogin: function() { - return 'Please login in the popup. You will obtain a magic code. Paste that code below and select "Submit"'; - }, - enterMagicCode: function() { - return "Enter magic code"; - }, - pleaseEnterMagicCodeYouReceived: function() { - return "Please enter the magic code you received."; - }, - submit: function() { - return "Submit"; - }, - cancel: function() { - return "Cancel"; - }, - somethingWentWrong: function() { - return "Something went wrong. This action can't be handled."; - }, - authenticationFailed: function() { - return "Authentication failed."; - } - }; - Strings2.runtime = { - automaticRefreshPaused: function() { - return "Automatic refresh paused."; - }, - clckToRestartAutomaticRefresh: function() { - return "Click to restart."; - }, - refreshThisCard: function() { - return "Refresh this card"; - } - }; - Strings2.hints = { - dontUseWeightedAndStrecthedColumnsInSameSet: function() { - return "It is not recommended to use weighted and stretched columns in the same ColumnSet, because in such a situation stretched columns will always get the minimum amount of space."; - } - }; - Strings2.defaults = { - inlineActionTitle: function() { - return "Inline Action"; - }, - overflowButtonText: function() { - return "..."; - }, - mediaPlayerAriaLabel: function() { - return "Media content"; - }, - mediaPlayerPlayMedia: function() { - return "Play media"; - }, - youTubeVideoPlayer: function() { - return "YouTube video player"; - }, - vimeoVideoPlayer: function() { - return "Vimeo video player"; - }, - dailymotionVideoPlayer: function() { - return "Dailymotion video player"; - } - }; - return Strings2; - }() - ); - exports.Strings = Strings; - } -}); - -// node_modules/adaptivecards/lib/enums.js -var require_enums = __commonJS({ - "node_modules/adaptivecards/lib/enums.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.LogLevel = exports.RefreshMode = exports.TypeErrorType = exports.ContainerFitStatus = exports.ValidationEvent = exports.ValidationPhase = exports.InputTextStyle = exports.ActionIconPlacement = exports.FillMode = exports.Orientation = exports.ShowCardActionMode = exports.ImageStyle = exports.ActionAlignment = exports.VerticalAlignment = exports.HorizontalAlignment = exports.TextColor = exports.Spacing = exports.FontType = exports.TextWeight = exports.TextSize = exports.SizeUnit = exports.ImageSize = exports.Size = exports.ActionMode = exports.ActionStyle = exports.ContainerStyle = void 0; - var ContainerStyle = ( - /** @class */ - function() { - function ContainerStyle2() { - } - ContainerStyle2.Default = "default"; - ContainerStyle2.Emphasis = "emphasis"; - ContainerStyle2.Accent = "accent"; - ContainerStyle2.Good = "good"; - ContainerStyle2.Attention = "attention"; - ContainerStyle2.Warning = "warning"; - return ContainerStyle2; - }() - ); - exports.ContainerStyle = ContainerStyle; - var ActionStyle = ( - /** @class */ - function() { - function ActionStyle2() { - } - ActionStyle2.Default = "default"; - ActionStyle2.Positive = "positive"; - ActionStyle2.Destructive = "destructive"; - return ActionStyle2; - }() - ); - exports.ActionStyle = ActionStyle; - var ActionMode = ( - /** @class */ - function() { - function ActionMode2() { - } - ActionMode2.Primary = "primary"; - ActionMode2.Secondary = "secondary"; - return ActionMode2; - }() - ); - exports.ActionMode = ActionMode; - var Size; - (function(Size2) { - Size2[Size2["Auto"] = 0] = "Auto"; - Size2[Size2["Stretch"] = 1] = "Stretch"; - Size2[Size2["Small"] = 2] = "Small"; - Size2[Size2["Medium"] = 3] = "Medium"; - Size2[Size2["Large"] = 4] = "Large"; - })(Size = exports.Size || (exports.Size = {})); - var ImageSize; - (function(ImageSize2) { - ImageSize2[ImageSize2["Small"] = 0] = "Small"; - ImageSize2[ImageSize2["Medium"] = 1] = "Medium"; - ImageSize2[ImageSize2["Large"] = 2] = "Large"; - })(ImageSize = exports.ImageSize || (exports.ImageSize = {})); - var SizeUnit; - (function(SizeUnit2) { - SizeUnit2[SizeUnit2["Weight"] = 0] = "Weight"; - SizeUnit2[SizeUnit2["Pixel"] = 1] = "Pixel"; - })(SizeUnit = exports.SizeUnit || (exports.SizeUnit = {})); - var TextSize; - (function(TextSize2) { - TextSize2[TextSize2["Small"] = 0] = "Small"; - TextSize2[TextSize2["Default"] = 1] = "Default"; - TextSize2[TextSize2["Medium"] = 2] = "Medium"; - TextSize2[TextSize2["Large"] = 3] = "Large"; - TextSize2[TextSize2["ExtraLarge"] = 4] = "ExtraLarge"; - })(TextSize = exports.TextSize || (exports.TextSize = {})); - var TextWeight; - (function(TextWeight2) { - TextWeight2[TextWeight2["Lighter"] = 0] = "Lighter"; - TextWeight2[TextWeight2["Default"] = 1] = "Default"; - TextWeight2[TextWeight2["Bolder"] = 2] = "Bolder"; - })(TextWeight = exports.TextWeight || (exports.TextWeight = {})); - var FontType; - (function(FontType2) { - FontType2[FontType2["Default"] = 0] = "Default"; - FontType2[FontType2["Monospace"] = 1] = "Monospace"; - })(FontType = exports.FontType || (exports.FontType = {})); - var Spacing; - (function(Spacing2) { - Spacing2[Spacing2["None"] = 0] = "None"; - Spacing2[Spacing2["Small"] = 1] = "Small"; - Spacing2[Spacing2["Default"] = 2] = "Default"; - Spacing2[Spacing2["Medium"] = 3] = "Medium"; - Spacing2[Spacing2["Large"] = 4] = "Large"; - Spacing2[Spacing2["ExtraLarge"] = 5] = "ExtraLarge"; - Spacing2[Spacing2["Padding"] = 6] = "Padding"; - })(Spacing = exports.Spacing || (exports.Spacing = {})); - var TextColor; - (function(TextColor2) { - TextColor2[TextColor2["Default"] = 0] = "Default"; - TextColor2[TextColor2["Dark"] = 1] = "Dark"; - TextColor2[TextColor2["Light"] = 2] = "Light"; - TextColor2[TextColor2["Accent"] = 3] = "Accent"; - TextColor2[TextColor2["Good"] = 4] = "Good"; - TextColor2[TextColor2["Warning"] = 5] = "Warning"; - TextColor2[TextColor2["Attention"] = 6] = "Attention"; - })(TextColor = exports.TextColor || (exports.TextColor = {})); - var HorizontalAlignment; - (function(HorizontalAlignment2) { - HorizontalAlignment2[HorizontalAlignment2["Left"] = 0] = "Left"; - HorizontalAlignment2[HorizontalAlignment2["Center"] = 1] = "Center"; - HorizontalAlignment2[HorizontalAlignment2["Right"] = 2] = "Right"; - })(HorizontalAlignment = exports.HorizontalAlignment || (exports.HorizontalAlignment = {})); - var VerticalAlignment; - (function(VerticalAlignment2) { - VerticalAlignment2[VerticalAlignment2["Top"] = 0] = "Top"; - VerticalAlignment2[VerticalAlignment2["Center"] = 1] = "Center"; - VerticalAlignment2[VerticalAlignment2["Bottom"] = 2] = "Bottom"; - })(VerticalAlignment = exports.VerticalAlignment || (exports.VerticalAlignment = {})); - var ActionAlignment; - (function(ActionAlignment2) { - ActionAlignment2[ActionAlignment2["Left"] = 0] = "Left"; - ActionAlignment2[ActionAlignment2["Center"] = 1] = "Center"; - ActionAlignment2[ActionAlignment2["Right"] = 2] = "Right"; - ActionAlignment2[ActionAlignment2["Stretch"] = 3] = "Stretch"; - })(ActionAlignment = exports.ActionAlignment || (exports.ActionAlignment = {})); - var ImageStyle; - (function(ImageStyle2) { - ImageStyle2[ImageStyle2["Default"] = 0] = "Default"; - ImageStyle2[ImageStyle2["Person"] = 1] = "Person"; - })(ImageStyle = exports.ImageStyle || (exports.ImageStyle = {})); - var ShowCardActionMode; - (function(ShowCardActionMode2) { - ShowCardActionMode2[ShowCardActionMode2["Inline"] = 0] = "Inline"; - ShowCardActionMode2[ShowCardActionMode2["Popup"] = 1] = "Popup"; - })(ShowCardActionMode = exports.ShowCardActionMode || (exports.ShowCardActionMode = {})); - var Orientation; - (function(Orientation2) { - Orientation2[Orientation2["Horizontal"] = 0] = "Horizontal"; - Orientation2[Orientation2["Vertical"] = 1] = "Vertical"; - })(Orientation = exports.Orientation || (exports.Orientation = {})); - var FillMode; - (function(FillMode2) { - FillMode2[FillMode2["Cover"] = 0] = "Cover"; - FillMode2[FillMode2["RepeatHorizontally"] = 1] = "RepeatHorizontally"; - FillMode2[FillMode2["RepeatVertically"] = 2] = "RepeatVertically"; - FillMode2[FillMode2["Repeat"] = 3] = "Repeat"; - })(FillMode = exports.FillMode || (exports.FillMode = {})); - var ActionIconPlacement; - (function(ActionIconPlacement2) { - ActionIconPlacement2[ActionIconPlacement2["LeftOfTitle"] = 0] = "LeftOfTitle"; - ActionIconPlacement2[ActionIconPlacement2["AboveTitle"] = 1] = "AboveTitle"; - })(ActionIconPlacement = exports.ActionIconPlacement || (exports.ActionIconPlacement = {})); - var InputTextStyle; - (function(InputTextStyle2) { - InputTextStyle2[InputTextStyle2["Text"] = 0] = "Text"; - InputTextStyle2[InputTextStyle2["Tel"] = 1] = "Tel"; - InputTextStyle2[InputTextStyle2["Url"] = 2] = "Url"; - InputTextStyle2[InputTextStyle2["Email"] = 3] = "Email"; - InputTextStyle2[InputTextStyle2["Password"] = 4] = "Password"; - })(InputTextStyle = exports.InputTextStyle || (exports.InputTextStyle = {})); - var ValidationPhase; - (function(ValidationPhase2) { - ValidationPhase2[ValidationPhase2["Parse"] = 0] = "Parse"; - ValidationPhase2[ValidationPhase2["ToJSON"] = 1] = "ToJSON"; - ValidationPhase2[ValidationPhase2["Validation"] = 2] = "Validation"; - })(ValidationPhase = exports.ValidationPhase || (exports.ValidationPhase = {})); - var ValidationEvent; - (function(ValidationEvent2) { - ValidationEvent2[ValidationEvent2["Hint"] = 0] = "Hint"; - ValidationEvent2[ValidationEvent2["ActionTypeNotAllowed"] = 1] = "ActionTypeNotAllowed"; - ValidationEvent2[ValidationEvent2["CollectionCantBeEmpty"] = 2] = "CollectionCantBeEmpty"; - ValidationEvent2[ValidationEvent2["Deprecated"] = 3] = "Deprecated"; - ValidationEvent2[ValidationEvent2["ElementTypeNotAllowed"] = 4] = "ElementTypeNotAllowed"; - ValidationEvent2[ValidationEvent2["InteractivityNotAllowed"] = 5] = "InteractivityNotAllowed"; - ValidationEvent2[ValidationEvent2["InvalidPropertyValue"] = 6] = "InvalidPropertyValue"; - ValidationEvent2[ValidationEvent2["MissingCardType"] = 7] = "MissingCardType"; - ValidationEvent2[ValidationEvent2["PropertyCantBeNull"] = 8] = "PropertyCantBeNull"; - ValidationEvent2[ValidationEvent2["TooManyActions"] = 9] = "TooManyActions"; - ValidationEvent2[ValidationEvent2["UnknownActionType"] = 10] = "UnknownActionType"; - ValidationEvent2[ValidationEvent2["UnknownElementType"] = 11] = "UnknownElementType"; - ValidationEvent2[ValidationEvent2["UnsupportedCardVersion"] = 12] = "UnsupportedCardVersion"; - ValidationEvent2[ValidationEvent2["DuplicateId"] = 13] = "DuplicateId"; - ValidationEvent2[ValidationEvent2["UnsupportedProperty"] = 14] = "UnsupportedProperty"; - ValidationEvent2[ValidationEvent2["RequiredInputsShouldHaveLabel"] = 15] = "RequiredInputsShouldHaveLabel"; - ValidationEvent2[ValidationEvent2["RequiredInputsShouldHaveErrorMessage"] = 16] = "RequiredInputsShouldHaveErrorMessage"; - ValidationEvent2[ValidationEvent2["Other"] = 17] = "Other"; - })(ValidationEvent = exports.ValidationEvent || (exports.ValidationEvent = {})); - var ContainerFitStatus; - (function(ContainerFitStatus2) { - ContainerFitStatus2[ContainerFitStatus2["FullyInContainer"] = 0] = "FullyInContainer"; - ContainerFitStatus2[ContainerFitStatus2["Overflowing"] = 1] = "Overflowing"; - ContainerFitStatus2[ContainerFitStatus2["FullyOutOfContainer"] = 2] = "FullyOutOfContainer"; - })(ContainerFitStatus = exports.ContainerFitStatus || (exports.ContainerFitStatus = {})); - var TypeErrorType; - (function(TypeErrorType2) { - TypeErrorType2[TypeErrorType2["UnknownType"] = 0] = "UnknownType"; - TypeErrorType2[TypeErrorType2["ForbiddenType"] = 1] = "ForbiddenType"; - })(TypeErrorType = exports.TypeErrorType || (exports.TypeErrorType = {})); - var RefreshMode; - (function(RefreshMode2) { - RefreshMode2[RefreshMode2["Disabled"] = 0] = "Disabled"; - RefreshMode2[RefreshMode2["Manual"] = 1] = "Manual"; - RefreshMode2[RefreshMode2["Automatic"] = 2] = "Automatic"; - })(RefreshMode = exports.RefreshMode || (exports.RefreshMode = {})); - var LogLevel; - (function(LogLevel2) { - LogLevel2[LogLevel2["Info"] = 0] = "Info"; - LogLevel2[LogLevel2["Warning"] = 1] = "Warning"; - LogLevel2[LogLevel2["Error"] = 2] = "Error"; - })(LogLevel = exports.LogLevel || (exports.LogLevel = {})); - } -}); - -// node_modules/adaptivecards/lib/shared.js -var require_shared = __commonJS({ - "node_modules/adaptivecards/lib/shared.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.UUID = exports.SizeAndUnit = exports.PaddingDefinition = exports.SpacingDefinition = exports.StringWithSubstitutions = exports.ContentTypes = exports.GlobalSettings = void 0; - var Enums = require_enums(); - var GlobalSettings = ( - /** @class */ - function() { - function GlobalSettings2() { - } - GlobalSettings2.useAdvancedTextBlockTruncation = true; - GlobalSettings2.useAdvancedCardBottomTruncation = false; - GlobalSettings2.useMarkdownInRadioButtonAndCheckbox = true; - GlobalSettings2.allowMarkForTextHighlighting = false; - GlobalSettings2.alwaysBleedSeparators = false; - GlobalSettings2.enableFullJsonRoundTrip = false; - GlobalSettings2.displayInputValidationErrors = true; - GlobalSettings2.allowPreProcessingPropertyValues = false; - GlobalSettings2.setTabIndexAtCardRoot = true; - GlobalSettings2.enableFallback = true; - GlobalSettings2.useWebkitLineClamp = true; - GlobalSettings2.allowMoreThanMaxActionsInOverflowMenu = false; - GlobalSettings2.removePaddingFromContainersWithBackgroundImage = false; - GlobalSettings2.resetInputsDirtyStateAfterActionExecution = true; - GlobalSettings2.applets = { - logEnabled: true, - logLevel: Enums.LogLevel.Error, - maximumRetryAttempts: 3, - defaultTimeBetweenRetryAttempts: 3e3, - authPromptWidth: 400, - authPromptHeight: 600, - refresh: { - mode: Enums.RefreshMode.Manual, - timeBetweenAutomaticRefreshes: 3e3, - maximumConsecutiveAutomaticRefreshes: 3, - allowManualRefreshesAfterAutomaticRefreshes: true - } - }; - return GlobalSettings2; - }() - ); - exports.GlobalSettings = GlobalSettings; - exports.ContentTypes = { - applicationJson: "application/json", - applicationXWwwFormUrlencoded: "application/x-www-form-urlencoded" - }; - var StringWithSubstitutions = ( - /** @class */ - function() { - function StringWithSubstitutions2() { - this._isProcessed = false; - } - StringWithSubstitutions2.prototype.getReferencedInputs = function(inputs, referencedInputs) { - if (!referencedInputs) { - throw new Error("The referencedInputs parameter cannot be null."); - } - if (this._original) { - for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) { - var input = inputs_1[_i]; - var matches = new RegExp("\\{{2}(" + input.id + ").value\\}{2}", "gi").exec(this._original); - if (matches != null && input.id) { - referencedInputs[input.id] = input; - } - } - } - }; - StringWithSubstitutions2.prototype.substituteInputValues = function(inputs, contentType) { - this._processed = this._original; - if (this._original) { - var regEx = /\{{2}([a-z0-9_$@]+).value\}{2}/gi; - var matches = void 0; - while ((matches = regEx.exec(this._original)) !== null && this._processed) { - for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) { - var key = _a[_i]; - if (key.toLowerCase() === matches[1].toLowerCase()) { - var matchedInput = inputs[key]; - var valueForReplace = ""; - if (matchedInput.value) { - valueForReplace = matchedInput.value; - } - if (contentType === exports.ContentTypes.applicationJson) { - valueForReplace = JSON.stringify(valueForReplace); - valueForReplace = valueForReplace.slice(1, -1); - } else if (contentType === exports.ContentTypes.applicationXWwwFormUrlencoded) { - valueForReplace = encodeURIComponent(valueForReplace); - } - this._processed = this._processed.replace(matches[0], valueForReplace); - break; - } - } - } - } - this._isProcessed = true; - }; - StringWithSubstitutions2.prototype.getOriginal = function() { - return this._original; - }; - StringWithSubstitutions2.prototype.get = function() { - if (!this._isProcessed) { - return this._original; - } else { - return this._processed; - } - }; - StringWithSubstitutions2.prototype.set = function(value) { - this._original = value; - this._isProcessed = false; - }; - return StringWithSubstitutions2; - }() - ); - exports.StringWithSubstitutions = StringWithSubstitutions; - var SpacingDefinition = ( - /** @class */ - /* @__PURE__ */ function() { - function SpacingDefinition2(top, right, bottom, left) { - if (top === void 0) { - top = 0; - } - if (right === void 0) { - right = 0; - } - if (bottom === void 0) { - bottom = 0; - } - if (left === void 0) { - left = 0; - } - this.left = 0; - this.top = 0; - this.right = 0; - this.bottom = 0; - this.top = top; - this.right = right; - this.bottom = bottom; - this.left = left; - } - return SpacingDefinition2; - }() - ); - exports.SpacingDefinition = SpacingDefinition; - var PaddingDefinition = ( - /** @class */ - /* @__PURE__ */ function() { - function PaddingDefinition2(top, right, bottom, left) { - if (top === void 0) { - top = Enums.Spacing.None; - } - if (right === void 0) { - right = Enums.Spacing.None; - } - if (bottom === void 0) { - bottom = Enums.Spacing.None; - } - if (left === void 0) { - left = Enums.Spacing.None; - } - this.top = Enums.Spacing.None; - this.right = Enums.Spacing.None; - this.bottom = Enums.Spacing.None; - this.left = Enums.Spacing.None; - this.top = top; - this.right = right; - this.bottom = bottom; - this.left = left; - } - return PaddingDefinition2; - }() - ); - exports.PaddingDefinition = PaddingDefinition; - var SizeAndUnit = ( - /** @class */ - function() { - function SizeAndUnit2(physicalSize, unit) { - this.physicalSize = physicalSize; - this.unit = unit; - } - SizeAndUnit2.parse = function(input, requireUnitSpecifier) { - if (requireUnitSpecifier === void 0) { - requireUnitSpecifier = false; - } - var result = new SizeAndUnit2(0, Enums.SizeUnit.Weight); - if (typeof input === "number") { - result.physicalSize = input; - return result; - } else if (typeof input === "string") { - var regExp = /^([0-9]+)(px|\*)?$/g; - var matches = regExp.exec(input); - var expectedMatchCount = requireUnitSpecifier ? 3 : 2; - if (matches && matches.length >= expectedMatchCount) { - result.physicalSize = parseInt(matches[1]); - if (matches.length === 3) { - if (matches[2] === "px") { - result.unit = Enums.SizeUnit.Pixel; - } - } - return result; - } - } - throw new Error("Invalid size: " + input); - }; - return SizeAndUnit2; - }() - ); - exports.SizeAndUnit = SizeAndUnit; - var UUID = ( - /** @class */ - function() { - function UUID2() { - } - UUID2.generate = function() { - var d0 = Math.random() * 4294967295 | 0; - var d1 = Math.random() * 4294967295 | 0; - var d2 = Math.random() * 4294967295 | 0; - var d3 = Math.random() * 4294967295 | 0; - return UUID2.lut[d0 & 255] + UUID2.lut[d0 >> 8 & 255] + UUID2.lut[d0 >> 16 & 255] + UUID2.lut[d0 >> 24 & 255] + "-" + UUID2.lut[d1 & 255] + UUID2.lut[d1 >> 8 & 255] + "-" + UUID2.lut[d1 >> 16 & 15 | 64] + UUID2.lut[d1 >> 24 & 255] + "-" + UUID2.lut[d2 & 63 | 128] + UUID2.lut[d2 >> 8 & 255] + "-" + UUID2.lut[d2 >> 16 & 255] + UUID2.lut[d2 >> 24 & 255] + UUID2.lut[d3 & 255] + UUID2.lut[d3 >> 8 & 255] + UUID2.lut[d3 >> 16 & 255] + UUID2.lut[d3 >> 24 & 255]; - }; - UUID2.initialize = function() { - for (var i = 0; i < 256; i++) { - UUID2.lut[i] = (i < 16 ? "0" : "") + i.toString(16); - } - }; - UUID2.lut = []; - return UUID2; - }() - ); - exports.UUID = UUID; - UUID.initialize(); - } -}); - -// node_modules/adaptivecards/lib/utils.js -var require_utils = __commonJS({ - "node_modules/adaptivecards/lib/utils.js"(exports) { - "use strict"; - var _a; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.clearElementChildren = exports.getScrollY = exports.getScrollX = exports.getFitStatus = exports.truncate = exports.truncateText = exports.stringToCssColor = exports.parseEnum = exports.getEnumValueByName = exports.parseBool = exports.parseNumber = exports.parseString = exports.appendChild = exports.generateUniqueId = exports.isMobileOS = exports.isInternetExplorer = void 0; - var Enums = require_enums(); - var Shared = require_shared(); - function isInternetExplorer() { - return window.document.documentMode !== void 0; - } - exports.isInternetExplorer = isInternetExplorer; - function isMobileOS() { - var userAgent = window.navigator.userAgent; - return !!userAgent.match(/Android/i) || !!userAgent.match(/iPad/i) || !!userAgent.match(/iPhone/i); - } - exports.isMobileOS = isMobileOS; - function generateUniqueId() { - return "__ac-" + Shared.UUID.generate(); - } - exports.generateUniqueId = generateUniqueId; - function appendChild(node, child) { - if (child) { - node.appendChild(child); - } - } - exports.appendChild = appendChild; - function parseString(obj, defaultValue) { - return typeof obj === "string" ? obj : defaultValue; - } - exports.parseString = parseString; - function parseNumber(obj, defaultValue) { - return typeof obj === "number" ? obj : defaultValue; - } - exports.parseNumber = parseNumber; - function parseBool(value, defaultValue) { - if (typeof value === "boolean") { - return value; - } else if (typeof value === "string") { - switch (value.toLowerCase()) { - case "true": - return true; - case "false": - return false; - default: - return defaultValue; - } - } - return defaultValue; - } - exports.parseBool = parseBool; - function getEnumValueByName(enumType, name) { - for (var key in enumType) { - var keyAsNumber = parseInt(key, 10); - if (keyAsNumber >= 0) { - var value = enumType[key]; - if (value && typeof value === "string" && value.toLowerCase() === name.toLowerCase()) { - return keyAsNumber; - } - } - } - return void 0; - } - exports.getEnumValueByName = getEnumValueByName; - function parseEnum(enumType, name, defaultValue) { - if (!name) { - return defaultValue; - } - var enumValue = getEnumValueByName(enumType, name); - return enumValue !== void 0 ? enumValue : defaultValue; - } - exports.parseEnum = parseEnum; - function stringToCssColor(color) { - if (color) { - var regEx = /#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi; - var matches = regEx.exec(color); - if (matches && matches[4]) { - var a = parseInt(matches[1], 16) / 255; - var r = parseInt(matches[2], 16); - var g = parseInt(matches[3], 16); - var b = parseInt(matches[4], 16); - return "rgba(" + r + "," + g + "," + b + "," + a + ")"; - } - } - return color; - } - exports.stringToCssColor = stringToCssColor; - function truncateWorker(element, maxHeight, fullText, truncateAt, lineHeight) { - var fits = function() { - return maxHeight - element.scrollHeight >= -1; - }; - if (fits()) { - return; - } - var breakableIndices = findBreakableIndices(fullText); - var lo = 0; - var hi = breakableIndices.length; - var bestBreakIdx = 0; - while (lo < hi) { - var mid = Math.floor((lo + hi) / 2); - truncateAt(fullText, breakableIndices[mid]); - if (fits()) { - bestBreakIdx = breakableIndices[mid]; - lo = mid + 1; - } else { - hi = mid; - } - } - truncateAt(fullText, bestBreakIdx); - if (lineHeight && maxHeight - element.scrollHeight >= lineHeight - 1) { - var idx = findNextCharacter(fullText, bestBreakIdx); - while (idx < fullText.length) { - truncateAt(fullText, idx); - if (fits()) { - bestBreakIdx = idx; - idx = findNextCharacter(fullText, idx); - } else { - break; - } - } - truncateAt(fullText, bestBreakIdx); - } - } - function truncateText(element, maxHeight, lineHeight) { - truncateWorker(element, maxHeight, element.innerText, function(text, idx) { - element.innerText = text.substring(0, idx) + "..."; - }, lineHeight); - } - exports.truncateText = truncateText; - var ttDeprecatedPolicy = typeof window === "undefined" ? void 0 : (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy("adaptivecards#deprecatedExportedFunctionPolicy", { - createHTML: function(value) { - return value; - } - }); - function truncate(element, maxHeight, lineHeight) { - truncateWorker(element, maxHeight, element.innerHTML, function(text, idx) { - var _a2; - var truncatedString = text.substring(0, idx) + "..."; - var truncatedHTML = (_a2 = ttDeprecatedPolicy === null || ttDeprecatedPolicy === void 0 ? void 0 : ttDeprecatedPolicy.createHTML(truncatedString)) !== null && _a2 !== void 0 ? _a2 : truncatedString; - element.innerHTML = truncatedHTML; - }, lineHeight); - } - exports.truncate = truncate; - function findBreakableIndices(html) { - var results = []; - var idx = findNextCharacter(html, -1); - while (idx < html.length) { - if (html[idx] === " ") { - results.push(idx); - } - idx = findNextCharacter(html, idx); - } - return results; - } - function findNextCharacter(html, currIdx) { - currIdx += 1; - while (currIdx < html.length && html[currIdx] === "<") { - while (currIdx < html.length && html[currIdx++] !== ">") { - continue; - } - } - return currIdx; - } - function getFitStatus(element, containerEnd) { - var start = element.offsetTop; - var end = start + element.clientHeight; - if (end <= containerEnd) { - return Enums.ContainerFitStatus.FullyInContainer; - } else if (start < containerEnd) { - return Enums.ContainerFitStatus.Overflowing; - } else { - return Enums.ContainerFitStatus.FullyOutOfContainer; - } - } - exports.getFitStatus = getFitStatus; - function getScrollX() { - return window.pageXOffset; - } - exports.getScrollX = getScrollX; - function getScrollY() { - return window.pageYOffset; - } - exports.getScrollY = getScrollY; - function clearElementChildren(element) { - while (element.firstChild) { - element.removeChild(element.firstChild); - } - } - exports.clearElementChildren = clearElementChildren; - } -}); - -// node_modules/adaptivecards/lib/serialization.js -var require_serialization = __commonJS({ - "node_modules/adaptivecards/lib/serialization.js"(exports) { - "use strict"; - var __extends = exports && exports.__extends || /* @__PURE__ */ function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - }(); - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SerializableObject = exports.property = exports.SerializableObjectSchema = exports.CustomProperty = exports.SerializableObjectCollectionProperty = exports.SerializableObjectProperty = exports.EnumProperty = exports.ValueSetProperty = exports.StringArrayProperty = exports.PixelSizeProperty = exports.NumProperty = exports.BoolProperty = exports.StringProperty = exports.PropertyDefinition = exports.BaseSerializationContext = exports.isVersionLessOrEqual = exports.Versions = exports.Version = void 0; - var shared_1 = require_shared(); - var Utils = require_utils(); - var Enums = require_enums(); - var strings_1 = require_strings(); - var Version = ( - /** @class */ - function() { - function Version2(major, minor, label) { - if (major === void 0) { - major = 1; - } - if (minor === void 0) { - minor = 1; - } - this._isValid = true; - this._major = major; - this._minor = minor; - this._label = label; - } - Version2.parse = function(versionString, context) { - if (!versionString) { - return void 0; - } - var result = new Version2(); - result._versionString = versionString; - var regEx = /(\d+).(\d+)/gi; - var matches = regEx.exec(versionString); - if (matches != null && matches.length === 3) { - result._major = parseInt(matches[1]); - result._minor = parseInt(matches[2]); - } else { - result._isValid = false; - } - if (!result._isValid) { - context.logParseEvent(void 0, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidVersionString(result._versionString)); - } - return result; - }; - Version2.prototype.toString = function() { - return !this._isValid ? this._versionString : this._major + "." + this._minor; - }; - Version2.prototype.toJSON = function() { - return this.toString(); - }; - Version2.prototype.compareTo = function(otherVersion) { - if (!this.isValid || !otherVersion.isValid) { - throw new Error("Cannot compare invalid version."); - } - if (this.major > otherVersion.major) { - return 1; - } else if (this.major < otherVersion.major) { - return -1; - } else if (this.minor > otherVersion.minor) { - return 1; - } else if (this.minor < otherVersion.minor) { - return -1; - } - return 0; - }; - Object.defineProperty(Version2.prototype, "label", { - get: function() { - return this._label ? this._label : this.toString(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Version2.prototype, "major", { - get: function() { - return this._major; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Version2.prototype, "minor", { - get: function() { - return this._minor; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Version2.prototype, "isValid", { - get: function() { - return this._isValid; - }, - enumerable: false, - configurable: true - }); - return Version2; - }() - ); - exports.Version = Version; - var Versions = ( - /** @class */ - function() { - function Versions2() { - } - Versions2.getAllDeclaredVersions = function() { - var ctor = Versions2; - var properties = []; - for (var propertyName in ctor) { - if (propertyName.match(/^v[0-9_]*$/)) { - try { - var propertyValue = ctor[propertyName]; - if (propertyValue instanceof Version) { - properties.push(propertyValue); - } - } catch (_a) { - } - } - } - return properties.sort(function(v1, v2) { - return v1.compareTo(v2); - }); - }; - Versions2.v1_0 = new Version(1, 0); - Versions2.v1_1 = new Version(1, 1); - Versions2.v1_2 = new Version(1, 2); - Versions2.v1_3 = new Version(1, 3); - Versions2.v1_4 = new Version(1, 4); - Versions2.v1_5 = new Version(1, 5); - Versions2.v1_6 = new Version(1, 6, "1.6 Preview"); - Versions2.latest = Versions2.v1_5; - return Versions2; - }() - ); - exports.Versions = Versions; - function isVersionLessOrEqual(version, targetVersion) { - if (version instanceof Version) { - if (targetVersion instanceof Version) { - return targetVersion.compareTo(version) >= 0; - } else { - return true; - } - } else { - return true; - } - } - exports.isVersionLessOrEqual = isVersionLessOrEqual; - var BaseSerializationContext = ( - /** @class */ - function() { - function BaseSerializationContext2(targetVersion) { - if (targetVersion === void 0) { - targetVersion = Versions.latest; - } - this._validationEvents = []; - this.targetVersion = targetVersion; - } - BaseSerializationContext2.prototype.serializeValue = function(target, propertyName, propertyValue, defaultValue, forceDeleteIfNullOrDefault) { - if (defaultValue === void 0) { - defaultValue = void 0; - } - if (forceDeleteIfNullOrDefault === void 0) { - forceDeleteIfNullOrDefault = false; - } - if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue) { - if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault) { - delete target[propertyName]; - } - } else if (propertyValue === defaultValue) { - delete target[propertyName]; - } else { - target[propertyName] = propertyValue; - } - }; - BaseSerializationContext2.prototype.serializeString = function(target, propertyName, propertyValue, defaultValue) { - if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue) { - if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) { - delete target[propertyName]; - } - } else { - target[propertyName] = propertyValue; - } - }; - BaseSerializationContext2.prototype.serializeBool = function(target, propertyName, propertyValue, defaultValue) { - if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue) { - if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) { - delete target[propertyName]; - } - } else { - target[propertyName] = propertyValue; - } - }; - BaseSerializationContext2.prototype.serializeNumber = function(target, propertyName, propertyValue, defaultValue) { - if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue || isNaN(propertyValue)) { - if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) { - delete target[propertyName]; - } - } else { - target[propertyName] = propertyValue; - } - }; - BaseSerializationContext2.prototype.serializeEnum = function(enumType, target, propertyName, propertyValue, defaultValue) { - if (defaultValue === void 0) { - defaultValue = void 0; - } - if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue) { - if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) { - delete target[propertyName]; - } - } else { - target[propertyName] = enumType[propertyValue]; - } - }; - BaseSerializationContext2.prototype.serializeArray = function(target, propertyName, propertyValue) { - var items = []; - if (propertyValue) { - for (var _i = 0, propertyValue_1 = propertyValue; _i < propertyValue_1.length; _i++) { - var item = propertyValue_1[_i]; - var serializedItem = void 0; - if (item instanceof SerializableObject) { - serializedItem = item.toJSON(this); - } else if (item.toJSON) { - serializedItem = item.toJSON(); - } else { - serializedItem = item; - } - if (serializedItem !== void 0) { - items.push(serializedItem); - } - } - } - if (items.length === 0) { - if (target.hasOwnProperty(propertyName) && Array.isArray(target[propertyName])) { - delete target[propertyName]; - } - } else { - this.serializeValue(target, propertyName, items); - } - }; - BaseSerializationContext2.prototype.clearEvents = function() { - this._validationEvents = []; - }; - BaseSerializationContext2.prototype.logEvent = function(source, phase, event, message) { - this._validationEvents.push({ - source, - phase, - event, - message - }); - }; - BaseSerializationContext2.prototype.logParseEvent = function(source, event, message) { - this.logEvent(source, Enums.ValidationPhase.Parse, event, message); - }; - BaseSerializationContext2.prototype.getEventAt = function(index) { - return this._validationEvents[index]; - }; - Object.defineProperty(BaseSerializationContext2.prototype, "eventCount", { - get: function() { - return this._validationEvents.length; - }, - enumerable: false, - configurable: true - }); - return BaseSerializationContext2; - }() - ); - exports.BaseSerializationContext = BaseSerializationContext; - var SimpleSerializationContext = ( - /** @class */ - function(_super) { - __extends(SimpleSerializationContext2, _super); - function SimpleSerializationContext2() { - return _super !== null && _super.apply(this, arguments) || this; - } - return SimpleSerializationContext2; - }(BaseSerializationContext) - ); - var PropertyDefinition = ( - /** @class */ - function() { - function PropertyDefinition2(targetVersion, name, defaultValue, onGetInitialValue) { - this.targetVersion = targetVersion; - this.name = name; - this.defaultValue = defaultValue; - this.onGetInitialValue = onGetInitialValue; - this.isSerializationEnabled = true; - this.sequentialNumber = PropertyDefinition2._sequentialNumber; - PropertyDefinition2._sequentialNumber++; - } - PropertyDefinition2.prototype.getInternalName = function() { - return this.name; - }; - PropertyDefinition2.prototype.parse = function(sender, source, context) { - return source[this.name]; - }; - PropertyDefinition2.prototype.toJSON = function(sender, target, value, context) { - context.serializeValue(target, this.name, value, this.defaultValue); - }; - PropertyDefinition2._sequentialNumber = 0; - return PropertyDefinition2; - }() - ); - exports.PropertyDefinition = PropertyDefinition; - var StringProperty = ( - /** @class */ - function(_super) { - __extends(StringProperty2, _super); - function StringProperty2(targetVersion, name, treatEmptyAsUndefined, regEx, defaultValue, onGetInitialValue) { - if (treatEmptyAsUndefined === void 0) { - treatEmptyAsUndefined = true; - } - var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.treatEmptyAsUndefined = treatEmptyAsUndefined; - _this.regEx = regEx; - _this.defaultValue = defaultValue; - _this.onGetInitialValue = onGetInitialValue; - return _this; - } - StringProperty2.prototype.parse = function(sender, source, context) { - var parsedValue = Utils.parseString(source[this.name], this.defaultValue); - var isUndefined = parsedValue === void 0 || parsedValue === "" && this.treatEmptyAsUndefined; - if (!isUndefined && this.regEx !== void 0) { - var matches = this.regEx.exec(parsedValue); - if (!matches) { - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(parsedValue, this.name)); - return void 0; - } - } - return parsedValue; - }; - StringProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeString(target, this.name, value === "" && this.treatEmptyAsUndefined ? void 0 : value, this.defaultValue); - }; - return StringProperty2; - }(PropertyDefinition) - ); - exports.StringProperty = StringProperty; - var BoolProperty = ( - /** @class */ - function(_super) { - __extends(BoolProperty2, _super); - function BoolProperty2(targetVersion, name, defaultValue, onGetInitialValue) { - var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.defaultValue = defaultValue; - _this.onGetInitialValue = onGetInitialValue; - return _this; - } - BoolProperty2.prototype.parse = function(sender, source, context) { - return Utils.parseBool(source[this.name], this.defaultValue); - }; - BoolProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeBool(target, this.name, value, this.defaultValue); - }; - return BoolProperty2; - }(PropertyDefinition) - ); - exports.BoolProperty = BoolProperty; - var NumProperty = ( - /** @class */ - function(_super) { - __extends(NumProperty2, _super); - function NumProperty2(targetVersion, name, defaultValue, onGetInitialValue) { - var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.defaultValue = defaultValue; - _this.onGetInitialValue = onGetInitialValue; - return _this; - } - NumProperty2.prototype.parse = function(sender, source, context) { - return Utils.parseNumber(source[this.name], this.defaultValue); - }; - NumProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeNumber(target, this.name, value, this.defaultValue); - }; - return NumProperty2; - }(PropertyDefinition) - ); - exports.NumProperty = NumProperty; - var PixelSizeProperty = ( - /** @class */ - function(_super) { - __extends(PixelSizeProperty2, _super); - function PixelSizeProperty2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PixelSizeProperty2.prototype.parse = function(sender, source, context) { - var result = void 0; - var value = source[this.name]; - if (typeof value === "string") { - var isValid = false; - try { - var size = shared_1.SizeAndUnit.parse(value, true); - if (size.unit === Enums.SizeUnit.Pixel) { - result = size.physicalSize; - isValid = true; - } - } catch (_a) { - } - if (!isValid) { - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(source[this.name], "minHeight")); - } - } - return result; - }; - PixelSizeProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeValue(target, this.name, typeof value === "number" && !isNaN(value) ? value + "px" : void 0); - }; - return PixelSizeProperty2; - }(PropertyDefinition) - ); - exports.PixelSizeProperty = PixelSizeProperty; - var StringArrayProperty = ( - /** @class */ - function(_super) { - __extends(StringArrayProperty2, _super); - function StringArrayProperty2(targetVersion, name, defaultValue, onGetInitialValue) { - var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.defaultValue = defaultValue; - _this.onGetInitialValue = onGetInitialValue; - return _this; - } - StringArrayProperty2.prototype.parse = function(sender, source, context) { - var sourceValue = source[this.name]; - if (sourceValue === void 0 || !Array.isArray(sourceValue)) { - return this.defaultValue; - } - var result = []; - for (var _i = 0, sourceValue_1 = sourceValue; _i < sourceValue_1.length; _i++) { - var value = sourceValue_1[_i]; - if (typeof value === "string") { - result.push(value); - } else { - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, 'Invalid array value "'.concat(JSON.stringify(value), '" of type "').concat(typeof value, '" ignored for "').concat(this.name, '".')); - } - } - return result; - }; - StringArrayProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeArray(target, this.name, value); - }; - return StringArrayProperty2; - }(PropertyDefinition) - ); - exports.StringArrayProperty = StringArrayProperty; - var ValueSetProperty = ( - /** @class */ - function(_super) { - __extends(ValueSetProperty2, _super); - function ValueSetProperty2(targetVersion, name, values, defaultValue, onGetInitialValue) { - var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.values = values; - _this.defaultValue = defaultValue; - _this.onGetInitialValue = onGetInitialValue; - return _this; - } - ValueSetProperty2.prototype.isValidValue = function(value, context) { - for (var _i = 0, _a = this.values; _i < _a.length; _i++) { - var versionedValue = _a[_i]; - if (value.toLowerCase() === versionedValue.value.toLowerCase()) { - var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion; - return targetVersion.compareTo(context.targetVersion) <= 0; - } - } - return false; - }; - ValueSetProperty2.prototype.parse = function(sender, source, context) { - var sourceValue = source[this.name]; - if (sourceValue === void 0) { - return this.defaultValue; - } - if (typeof sourceValue === "string") { - for (var _i = 0, _a = this.values; _i < _a.length; _i++) { - var versionedValue = _a[_i]; - if (sourceValue.toLowerCase() === versionedValue.value.toLowerCase()) { - var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion; - if (targetVersion.compareTo(context.targetVersion) <= 0) { - return versionedValue.value; - } else { - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString())); - return this.defaultValue; - } - } - } - } - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name)); - return this.defaultValue; - }; - ValueSetProperty2.prototype.toJSON = function(sender, target, value, context) { - var invalidValue = false; - if (value !== void 0) { - invalidValue = true; - for (var _i = 0, _a = this.values; _i < _a.length; _i++) { - var versionedValue = _a[_i]; - if (versionedValue.value === value) { - var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion; - if (targetVersion.compareTo(context.targetVersion) <= 0) { - invalidValue = false; - break; - } else { - context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(value, this.name, targetVersion.toString(), context.targetVersion.toString())); - } - } - } - } - if (!invalidValue) { - context.serializeValue(target, this.name, value, this.defaultValue, true); - } - }; - return ValueSetProperty2; - }(PropertyDefinition) - ); - exports.ValueSetProperty = ValueSetProperty; - var EnumProperty = ( - /** @class */ - function(_super) { - __extends(EnumProperty2, _super); - function EnumProperty2(targetVersion, name, enumType, defaultValue, values, onGetInitialValue) { - var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.enumType = enumType; - _this.defaultValue = defaultValue; - _this.onGetInitialValue = onGetInitialValue; - _this._values = []; - if (!values) { - for (var key in enumType) { - var keyAsNumber = parseInt(key, 10); - if (keyAsNumber >= 0) { - _this._values.push({ value: keyAsNumber }); - } - } - } else { - _this._values = values; - } - return _this; - } - EnumProperty2.prototype.parse = function(sender, source, context) { - var sourceValue = source[this.name]; - if (typeof sourceValue !== "string") { - return this.defaultValue; - } - var enumValue = Utils.getEnumValueByName(this.enumType, sourceValue); - if (enumValue !== void 0) { - for (var _i = 0, _a = this.values; _i < _a.length; _i++) { - var versionedValue = _a[_i]; - if (versionedValue.value === enumValue) { - var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion; - if (targetVersion.compareTo(context.targetVersion) <= 0) { - return enumValue; - } else { - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString())); - return this.defaultValue; - } - } - } - } - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name)); - return this.defaultValue; - }; - EnumProperty2.prototype.toJSON = function(sender, target, value, context) { - var invalidValue = false; - if (value !== void 0) { - invalidValue = true; - for (var _i = 0, _a = this.values; _i < _a.length; _i++) { - var versionedValue = _a[_i]; - if (versionedValue.value === value) { - var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion; - if (targetVersion.compareTo(context.targetVersion) <= 0) { - invalidValue = false; - break; - } else { - context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(value, this.name)); - } - } - } - } - if (!invalidValue) { - context.serializeEnum(this.enumType, target, this.name, value, this.defaultValue); - } - }; - Object.defineProperty(EnumProperty2.prototype, "values", { - get: function() { - return this._values; - }, - enumerable: false, - configurable: true - }); - return EnumProperty2; - }(PropertyDefinition) - ); - exports.EnumProperty = EnumProperty; - var SerializableObjectProperty = ( - /** @class */ - function(_super) { - __extends(SerializableObjectProperty2, _super); - function SerializableObjectProperty2(targetVersion, name, objectType, nullable, defaultValue) { - if (nullable === void 0) { - nullable = false; - } - var _this = _super.call(this, targetVersion, name, defaultValue, function(sender) { - return _this.nullable ? void 0 : new _this.objectType(); - }) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.objectType = objectType; - _this.nullable = nullable; - return _this; - } - SerializableObjectProperty2.prototype.parse = function(sender, source, context) { - var sourceValue = source[this.name]; - if (sourceValue === void 0) { - return this.onGetInitialValue ? this.onGetInitialValue(sender) : this.defaultValue; - } - var result = new this.objectType(); - result.parse(sourceValue, context); - return result; - }; - SerializableObjectProperty2.prototype.toJSON = function(sender, target, value, context) { - var serializedValue = void 0; - if (value !== void 0 && !value.hasAllDefaultValues()) { - serializedValue = value.toJSON(context); - } - if (typeof serializedValue === "object" && Object.keys(serializedValue).length === 0) { - serializedValue = void 0; - } - context.serializeValue(target, this.name, serializedValue, this.defaultValue, true); - }; - return SerializableObjectProperty2; - }(PropertyDefinition) - ); - exports.SerializableObjectProperty = SerializableObjectProperty; - var SerializableObjectCollectionProperty = ( - /** @class */ - function(_super) { - __extends(SerializableObjectCollectionProperty2, _super); - function SerializableObjectCollectionProperty2(targetVersion, name, objectType, onItemAdded) { - var _this = _super.call(this, targetVersion, name, void 0, function(sender) { - return []; - }) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.objectType = objectType; - _this.onItemAdded = onItemAdded; - return _this; - } - SerializableObjectCollectionProperty2.prototype.parse = function(sender, source, context) { - var result = []; - var sourceCollection = source[this.name]; - if (Array.isArray(sourceCollection)) { - for (var _i = 0, sourceCollection_1 = sourceCollection; _i < sourceCollection_1.length; _i++) { - var sourceItem = sourceCollection_1[_i]; - var item = new this.objectType(); - item.parse(sourceItem, context); - result.push(item); - if (this.onItemAdded) { - this.onItemAdded(sender, item); - } - } - } - return result.length > 0 ? result : this.onGetInitialValue ? this.onGetInitialValue(sender) : void 0; - }; - SerializableObjectCollectionProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeArray(target, this.name, value); - }; - return SerializableObjectCollectionProperty2; - }(PropertyDefinition) - ); - exports.SerializableObjectCollectionProperty = SerializableObjectCollectionProperty; - var CustomProperty = ( - /** @class */ - function(_super) { - __extends(CustomProperty2, _super); - function CustomProperty2(targetVersion, name, onParse, onToJSON, defaultValue, onGetInitialValue) { - var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.onParse = onParse; - _this.onToJSON = onToJSON; - _this.defaultValue = defaultValue; - _this.onGetInitialValue = onGetInitialValue; - if (!_this.onParse) { - throw new Error("CustomPropertyDefinition instances must have an onParse handler."); - } - if (!_this.onToJSON) { - throw new Error("CustomPropertyDefinition instances must have an onToJSON handler."); - } - return _this; - } - CustomProperty2.prototype.parse = function(sender, source, context) { - return this.onParse(sender, this, source, context); - }; - CustomProperty2.prototype.toJSON = function(sender, target, value, context) { - this.onToJSON(sender, this, target, value, context); - }; - return CustomProperty2; - }(PropertyDefinition) - ); - exports.CustomProperty = CustomProperty; - var SerializableObjectSchema = ( - /** @class */ - function() { - function SerializableObjectSchema2() { - this._properties = []; - } - SerializableObjectSchema2.prototype.indexOf = function(prop) { - for (var i = 0; i < this._properties.length; i++) { - if (this._properties[i] === prop) { - return i; - } - } - return -1; - }; - SerializableObjectSchema2.prototype.add = function() { - var properties = []; - for (var _i = 0; _i < arguments.length; _i++) { - properties[_i] = arguments[_i]; - } - for (var _a = 0, properties_1 = properties; _a < properties_1.length; _a++) { - var prop = properties_1[_a]; - if (this.indexOf(prop) === -1) { - this._properties.push(prop); - } - } - }; - SerializableObjectSchema2.prototype.remove = function() { - var properties = []; - for (var _i = 0; _i < arguments.length; _i++) { - properties[_i] = arguments[_i]; - } - for (var _a = 0, properties_2 = properties; _a < properties_2.length; _a++) { - var prop = properties_2[_a]; - while (true) { - var index = this.indexOf(prop); - if (index >= 0) { - this._properties.splice(index, 1); - } else { - break; - } - } - } - }; - SerializableObjectSchema2.prototype.getItemAt = function(index) { - return this._properties[index]; - }; - SerializableObjectSchema2.prototype.getCount = function() { - return this._properties.length; - }; - return SerializableObjectSchema2; - }() - ); - exports.SerializableObjectSchema = SerializableObjectSchema; - function property(prop) { - return function(target, propertyKey) { - var descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {}; - if (!descriptor.get && !descriptor.set) { - descriptor.get = function() { - return this.getValue(prop); - }; - descriptor.set = function(value) { - this.setValue(prop, value); - }; - Object.defineProperty(target, propertyKey, descriptor); - } - }; - } - exports.property = property; - var SerializableObject = ( - /** @class */ - function() { - function SerializableObject2() { - this._propertyBag = {}; - this._rawProperties = {}; - this.maxVersion = SerializableObject2.defaultMaxVersion; - var s = this.getSchema(); - for (var i = 0; i < s.getCount(); i++) { - var prop = s.getItemAt(i); - if (prop.onGetInitialValue) { - this.setValue(prop, prop.onGetInitialValue(this)); - } - } - } - SerializableObject2.prototype.getDefaultSerializationContext = function() { - return new SimpleSerializationContext(); - }; - SerializableObject2.prototype.populateSchema = function(schema) { - var ctor = this.constructor; - var properties = []; - for (var propertyName in ctor) { - try { - var propertyValue = ctor[propertyName]; - if (propertyValue instanceof PropertyDefinition) { - properties.push(propertyValue); - } - } catch (_a) { - } - } - if (properties.length > 0) { - var sortedProperties = properties.sort(function(p1, p2) { - if (p1.sequentialNumber > p2.sequentialNumber) { - return 1; - } else if (p1.sequentialNumber < p2.sequentialNumber) { - return -1; - } - return 0; - }); - schema.add.apply(schema, sortedProperties); - } - if (SerializableObject2.onRegisterCustomProperties) { - SerializableObject2.onRegisterCustomProperties(this, schema); - } - }; - SerializableObject2.prototype.getValue = function(prop) { - return this._propertyBag.hasOwnProperty(prop.getInternalName()) ? this._propertyBag[prop.getInternalName()] : prop.defaultValue; - }; - SerializableObject2.prototype.setValue = function(prop, value) { - if (value === void 0 || value === null) { - delete this._propertyBag[prop.getInternalName()]; - } else { - this._propertyBag[prop.getInternalName()] = value; - } - }; - SerializableObject2.prototype.internalParse = function(source, context) { - this._propertyBag = {}; - this._rawProperties = shared_1.GlobalSettings.enableFullJsonRoundTrip ? source ? source : {} : {}; - if (source) { - var s = this.getSchema(); - for (var i = 0; i < s.getCount(); i++) { - var prop = s.getItemAt(i); - if (prop.isSerializationEnabled) { - var propertyValue = prop.onGetInitialValue ? prop.onGetInitialValue(this) : void 0; - if (source.hasOwnProperty(prop.name)) { - if (prop.targetVersion.compareTo(context.targetVersion) <= 0) { - propertyValue = prop.parse(this, source, context); - } else { - context.logParseEvent(this, Enums.ValidationEvent.UnsupportedProperty, strings_1.Strings.errors.propertyNotSupported(prop.name, prop.targetVersion.toString(), context.targetVersion.toString())); - } - } - this.setValue(prop, propertyValue); - } - } - } else { - this.resetDefaultValues(); - } - }; - SerializableObject2.prototype.internalToJSON = function(target, context) { - var s = this.getSchema(); - var serializedProperties = []; - for (var i = 0; i < s.getCount(); i++) { - var prop = s.getItemAt(i); - if (prop.isSerializationEnabled && prop.targetVersion.compareTo(context.targetVersion) <= 0 && serializedProperties.indexOf(prop.name) === -1) { - prop.toJSON(this, target, this.getValue(prop), context); - serializedProperties.push(prop.name); - } - } - }; - SerializableObject2.prototype.shouldSerialize = function(_context) { - return true; - }; - SerializableObject2.prototype.parse = function(source, context) { - this.internalParse(source, context ? context : new SimpleSerializationContext()); - }; - SerializableObject2.prototype.toJSON = function(context) { - var effectiveContext; - if (context && context instanceof BaseSerializationContext) { - effectiveContext = context; - } else { - effectiveContext = this.getDefaultSerializationContext(); - effectiveContext.toJSONOriginalParam = context; - } - if (this.shouldSerialize(effectiveContext)) { - var result = void 0; - if (shared_1.GlobalSettings.enableFullJsonRoundTrip && this._rawProperties && typeof this._rawProperties === "object") { - result = this._rawProperties; - } else { - result = {}; - } - this.internalToJSON(result, effectiveContext); - return result; - } else { - return void 0; - } - }; - SerializableObject2.prototype.hasDefaultValue = function(prop) { - return this.getValue(prop) === prop.defaultValue; - }; - SerializableObject2.prototype.hasAllDefaultValues = function() { - var s = this.getSchema(); - for (var i = 0; i < s.getCount(); i++) { - var prop = s.getItemAt(i); - if (!this.hasDefaultValue(prop)) { - return false; - } - } - return true; - }; - SerializableObject2.prototype.resetDefaultValues = function() { - var s = this.getSchema(); - for (var i = 0; i < s.getCount(); i++) { - var prop = s.getItemAt(i); - this.setValue(prop, prop.defaultValue); - } - }; - SerializableObject2.prototype.setCustomProperty = function(name, value) { - var shouldDeleteProperty = typeof value === "string" && !value || value === void 0 || value === null; - if (shouldDeleteProperty) { - delete this._rawProperties[name]; - } else { - this._rawProperties[name] = value; - } - }; - SerializableObject2.prototype.getCustomProperty = function(name) { - return this._rawProperties[name]; - }; - SerializableObject2.prototype.getSchema = function() { - var schema = SerializableObject2._schemaCache[this.getSchemaKey()]; - if (!schema) { - schema = new SerializableObjectSchema(); - this.populateSchema(schema); - SerializableObject2._schemaCache[this.getSchemaKey()] = schema; - } - return schema; - }; - SerializableObject2.defaultMaxVersion = Versions.latest; - SerializableObject2._schemaCache = {}; - return SerializableObject2; - }() - ); - exports.SerializableObject = SerializableObject; - } -}); - -// node_modules/adaptivecards/lib/host-capabilities.js -var require_host_capabilities = __commonJS({ - "node_modules/adaptivecards/lib/host-capabilities.js"(exports) { - "use strict"; - var __extends = exports && exports.__extends || /* @__PURE__ */ function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - }(); - Object.defineProperty(exports, "__esModule", { value: true }); - exports.HostCapabilities = void 0; - var serialization_1 = require_serialization(); - var HostCapabilities = ( - /** @class */ - function(_super) { - __extends(HostCapabilities2, _super); - function HostCapabilities2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._capabilities = {}; - return _this; - } - HostCapabilities2.prototype.getSchemaKey = function() { - return "HostCapabilities"; - }; - HostCapabilities2.prototype.internalParse = function(source, context) { - _super.prototype.internalParse.call(this, source, context); - if (source) { - for (var name_1 in source) { - var jsonVersion = source[name_1]; - if (typeof jsonVersion === "string") { - if (jsonVersion === "*") { - this.addCapability(name_1, "*"); - } else { - var version = serialization_1.Version.parse(jsonVersion, context); - if (version === null || version === void 0 ? void 0 : version.isValid) { - this.addCapability(name_1, version); - } - } - } - } - } - }; - HostCapabilities2.prototype.internalToJSON = function(target, context) { - _super.prototype.internalToJSON.call(this, target, context); - for (var key in this._capabilities) { - target[key] = this._capabilities[key]; - } - }; - HostCapabilities2.prototype.addCapability = function(name, version) { - this._capabilities[name] = version; - }; - HostCapabilities2.prototype.removeCapability = function(name) { - delete this._capabilities[name]; - }; - HostCapabilities2.prototype.clear = function() { - this._capabilities = {}; - }; - HostCapabilities2.prototype.hasCapability = function(name, version) { - if (this._capabilities.hasOwnProperty(name)) { - if (version === "*" || this._capabilities[name] === "*") { - return true; - } - return version.compareTo(this._capabilities[name]) <= 0; - } - return false; - }; - HostCapabilities2.prototype.areAllMet = function(hostCapabilities) { - for (var capabilityName in this._capabilities) { - if (!hostCapabilities.hasCapability(capabilityName, this._capabilities[capabilityName])) { - return false; - } - } - return true; - }; - return HostCapabilities2; - }(serialization_1.SerializableObject) - ); - exports.HostCapabilities = HostCapabilities; - } -}); - -// node_modules/adaptivecards/lib/host-config.js -var require_host_config = __commonJS({ - "node_modules/adaptivecards/lib/host-config.js"(exports) { - "use strict"; - var __extends = exports && exports.__extends || /* @__PURE__ */ function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - }(); - Object.defineProperty(exports, "__esModule", { value: true }); - exports.defaultHostConfig = exports.HostConfig = exports.FontTypeSet = exports.FontTypeDefinition = exports.ContainerStyleSet = exports.ContainerStyleDefinition = exports.ColorSetDefinition = exports.ActionsConfig = exports.ShowCardActionConfig = exports.FactSetConfig = exports.FactTitleDefinition = exports.FactTextDefinition = exports.InputConfig = exports.InputLabelConfig = exports.RequiredInputLabelTextDefinition = exports.TextBlockConfig = exports.TextStyleSet = exports.TextStyleDefinition = exports.BaseTextDefinition = exports.TableConfig = exports.MediaConfig = exports.ImageSetConfig = exports.AdaptiveCardConfig = exports.TextColorDefinition = exports.ColorDefinition = void 0; - var Enums = require_enums(); - var Utils = require_utils(); - var Shared = require_shared(); - var host_capabilities_1 = require_host_capabilities(); - function parseHostConfigEnum(targetEnum, value, defaultValue) { - if (typeof value === "string") { - var parsedValue = Utils.parseEnum(targetEnum, value, defaultValue); - return parsedValue !== void 0 ? parsedValue : defaultValue; - } else if (typeof value === "number") { - return value; - } else { - return defaultValue; - } - } - var ColorDefinition = ( - /** @class */ - function() { - function ColorDefinition2(defaultColor, subtleColor) { - this.default = "#000000"; - this.subtle = "#666666"; - if (defaultColor) { - this.default = defaultColor; - } - if (subtleColor) { - this.subtle = subtleColor; - } - } - ColorDefinition2.prototype.parse = function(obj) { - if (obj) { - this.default = obj["default"] || this.default; - this.subtle = obj["subtle"] || this.subtle; - } - }; - return ColorDefinition2; - }() - ); - exports.ColorDefinition = ColorDefinition; - var TextColorDefinition = ( - /** @class */ - function(_super) { - __extends(TextColorDefinition2, _super); - function TextColorDefinition2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.highlightColors = new ColorDefinition("#22000000", "#11000000"); - return _this; - } - TextColorDefinition2.prototype.parse = function(obj) { - _super.prototype.parse.call(this, obj); - if (obj) { - this.highlightColors.parse(obj["highlightColors"]); - } - }; - return TextColorDefinition2; - }(ColorDefinition) - ); - exports.TextColorDefinition = TextColorDefinition; - var AdaptiveCardConfig = ( - /** @class */ - /* @__PURE__ */ function() { - function AdaptiveCardConfig2(obj) { - this.allowCustomStyle = false; - if (obj) { - this.allowCustomStyle = obj["allowCustomStyle"] || this.allowCustomStyle; - } - } - return AdaptiveCardConfig2; - }() - ); - exports.AdaptiveCardConfig = AdaptiveCardConfig; - var ImageSetConfig = ( - /** @class */ - function() { - function ImageSetConfig2(obj) { - this.imageSize = Enums.Size.Medium; - this.maxImageHeight = 100; - if (obj) { - this.imageSize = obj["imageSize"] != null ? obj["imageSize"] : this.imageSize; - this.maxImageHeight = Utils.parseNumber(obj["maxImageHeight"], 100); - } - } - ImageSetConfig2.prototype.toJSON = function() { - return { - imageSize: Enums.Size[this.imageSize], - maxImageHeight: this.maxImageHeight - }; - }; - return ImageSetConfig2; - }() - ); - exports.ImageSetConfig = ImageSetConfig; - var MediaConfig = ( - /** @class */ - function() { - function MediaConfig2(obj) { - this.allowInlinePlayback = true; - if (obj) { - this.defaultPoster = obj["defaultPoster"]; - this.allowInlinePlayback = obj["allowInlinePlayback"] || this.allowInlinePlayback; - } - } - MediaConfig2.prototype.toJSON = function() { - return { - defaultPoster: this.defaultPoster, - allowInlinePlayback: this.allowInlinePlayback - }; - }; - return MediaConfig2; - }() - ); - exports.MediaConfig = MediaConfig; - var TableConfig = ( - /** @class */ - function() { - function TableConfig2(obj) { - this.cellSpacing = 8; - if (obj) { - this.cellSpacing = obj.cellSpacing && typeof obj.cellSpacing === "number" ? obj.cellSpacing : this.cellSpacing; - } - } - TableConfig2.prototype.toJSON = function() { - return { - cellSpacing: this.cellSpacing - }; - }; - return TableConfig2; - }() - ); - exports.TableConfig = TableConfig; - var BaseTextDefinition = ( - /** @class */ - function() { - function BaseTextDefinition2(obj) { - this.size = Enums.TextSize.Default; - this.color = Enums.TextColor.Default; - this.isSubtle = false; - this.weight = Enums.TextWeight.Default; - this.parse(obj); - } - BaseTextDefinition2.prototype.parse = function(obj) { - if (obj) { - this.size = parseHostConfigEnum(Enums.TextSize, obj["size"], this.size); - this.color = parseHostConfigEnum(Enums.TextColor, obj["color"], this.color); - this.isSubtle = obj.isSubtle !== void 0 && typeof obj.isSubtle === "boolean" ? obj.isSubtle : this.isSubtle; - this.weight = parseHostConfigEnum(Enums.TextWeight, obj["weight"], this.getDefaultWeight()); - } - }; - BaseTextDefinition2.prototype.getDefaultWeight = function() { - return Enums.TextWeight.Default; - }; - BaseTextDefinition2.prototype.toJSON = function() { - return { - size: Enums.TextSize[this.size], - color: Enums.TextColor[this.color], - isSubtle: this.isSubtle, - weight: Enums.TextWeight[this.weight] - }; - }; - return BaseTextDefinition2; - }() - ); - exports.BaseTextDefinition = BaseTextDefinition; - var TextStyleDefinition = ( - /** @class */ - function(_super) { - __extends(TextStyleDefinition2, _super); - function TextStyleDefinition2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.fontType = Enums.FontType.Default; - return _this; - } - TextStyleDefinition2.prototype.parse = function(obj) { - _super.prototype.parse.call(this, obj); - if (obj) { - this.fontType = parseHostConfigEnum(Enums.FontType, obj.fontType, this.fontType); - } - }; - return TextStyleDefinition2; - }(BaseTextDefinition) - ); - exports.TextStyleDefinition = TextStyleDefinition; - var TextStyleSet = ( - /** @class */ - function() { - function TextStyleSet2(obj) { - this.default = new TextStyleDefinition(); - this.heading = new TextStyleDefinition({ - size: "Large", - weight: "Bolder" - }); - this.columnHeader = new TextStyleDefinition({ - weight: "Bolder" - }); - if (obj) { - this.heading.parse(obj.heading); - this.columnHeader.parse(obj.columnHeader); - } - } - TextStyleSet2.prototype.getStyleByName = function(name) { - switch (name.toLowerCase()) { - case "heading": - return this.heading; - case "columnHeader": - return this.columnHeader; - default: - return this.default; - } - }; - return TextStyleSet2; - }() - ); - exports.TextStyleSet = TextStyleSet; - var TextBlockConfig = ( - /** @class */ - /* @__PURE__ */ function() { - function TextBlockConfig2(obj) { - if (obj) { - this.headingLevel = Utils.parseNumber(obj.headingLevel); - } - } - return TextBlockConfig2; - }() - ); - exports.TextBlockConfig = TextBlockConfig; - var RequiredInputLabelTextDefinition = ( - /** @class */ - function(_super) { - __extends(RequiredInputLabelTextDefinition2, _super); - function RequiredInputLabelTextDefinition2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.suffix = " *"; - _this.suffixColor = Enums.TextColor.Attention; - return _this; - } - RequiredInputLabelTextDefinition2.prototype.parse = function(obj) { - _super.prototype.parse.call(this, obj); - if (obj) { - this.suffix = obj["suffix"] || this.suffix; - this.suffixColor = parseHostConfigEnum(Enums.TextColor, obj["suffixColor"], this.suffixColor); - } - }; - RequiredInputLabelTextDefinition2.prototype.toJSON = function() { - var result = _super.prototype.toJSON.call(this); - result["suffix"] = this.suffix; - result["suffixColor"] = Enums.TextColor[this.suffixColor]; - return result; - }; - return RequiredInputLabelTextDefinition2; - }(BaseTextDefinition) - ); - exports.RequiredInputLabelTextDefinition = RequiredInputLabelTextDefinition; - var InputLabelConfig = ( - /** @class */ - /* @__PURE__ */ function() { - function InputLabelConfig2(obj) { - this.inputSpacing = Enums.Spacing.Small; - this.requiredInputs = new RequiredInputLabelTextDefinition(); - this.optionalInputs = new BaseTextDefinition(); - if (obj) { - this.inputSpacing = parseHostConfigEnum(Enums.Spacing, obj["inputSpacing"], this.inputSpacing); - this.requiredInputs = new RequiredInputLabelTextDefinition(obj["requiredInputs"]); - this.optionalInputs = new BaseTextDefinition(obj["optionalInputs"]); - } - } - return InputLabelConfig2; - }() - ); - exports.InputLabelConfig = InputLabelConfig; - var InputConfig = ( - /** @class */ - /* @__PURE__ */ function() { - function InputConfig2(obj) { - this.label = new InputLabelConfig(); - this.errorMessage = new BaseTextDefinition({ - color: Enums.TextColor.Attention - }); - if (obj) { - this.label = new InputLabelConfig(obj["label"]); - this.errorMessage = new BaseTextDefinition(obj["errorMessage"]); - } - } - return InputConfig2; - }() - ); - exports.InputConfig = InputConfig; - var FactTextDefinition = ( - /** @class */ - function(_super) { - __extends(FactTextDefinition2, _super); - function FactTextDefinition2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.wrap = true; - return _this; - } - FactTextDefinition2.prototype.parse = function(obj) { - _super.prototype.parse.call(this, obj); - if (obj) { - this.wrap = obj["wrap"] != null ? obj["wrap"] : this.wrap; - } - }; - FactTextDefinition2.prototype.toJSON = function() { - var result = _super.prototype.toJSON.call(this); - result["wrap"] = this.wrap; - return result; - }; - return FactTextDefinition2; - }(BaseTextDefinition) - ); - exports.FactTextDefinition = FactTextDefinition; - var FactTitleDefinition = ( - /** @class */ - function(_super) { - __extends(FactTitleDefinition2, _super); - function FactTitleDefinition2(obj) { - var _this = _super.call(this, obj) || this; - _this.maxWidth = 150; - _this.weight = Enums.TextWeight.Bolder; - if (obj) { - _this.maxWidth = obj["maxWidth"] != null ? obj["maxWidth"] : _this.maxWidth; - _this.weight = parseHostConfigEnum(Enums.TextWeight, obj["weight"], Enums.TextWeight.Bolder); - } - return _this; - } - FactTitleDefinition2.prototype.getDefaultWeight = function() { - return Enums.TextWeight.Bolder; - }; - return FactTitleDefinition2; - }(FactTextDefinition) - ); - exports.FactTitleDefinition = FactTitleDefinition; - var FactSetConfig = ( - /** @class */ - /* @__PURE__ */ function() { - function FactSetConfig2(obj) { - this.title = new FactTitleDefinition(); - this.value = new FactTextDefinition(); - this.spacing = 10; - if (obj) { - this.title = new FactTitleDefinition(obj["title"]); - this.value = new FactTextDefinition(obj["value"]); - this.spacing = obj.spacing && obj.spacing != null ? obj.spacing && obj.spacing : this.spacing; - } - } - return FactSetConfig2; - }() - ); - exports.FactSetConfig = FactSetConfig; - var ShowCardActionConfig = ( - /** @class */ - function() { - function ShowCardActionConfig2(obj) { - this.actionMode = Enums.ShowCardActionMode.Inline; - this.inlineTopMargin = 16; - this.style = Enums.ContainerStyle.Emphasis; - if (obj) { - this.actionMode = parseHostConfigEnum(Enums.ShowCardActionMode, obj["actionMode"], Enums.ShowCardActionMode.Inline); - this.inlineTopMargin = obj["inlineTopMargin"] != null ? obj["inlineTopMargin"] : this.inlineTopMargin; - this.style = obj["style"] && typeof obj["style"] === "string" ? obj["style"] : Enums.ContainerStyle.Emphasis; - } - } - ShowCardActionConfig2.prototype.toJSON = function() { - return { - actionMode: Enums.ShowCardActionMode[this.actionMode], - inlineTopMargin: this.inlineTopMargin, - style: this.style - }; - }; - return ShowCardActionConfig2; - }() - ); - exports.ShowCardActionConfig = ShowCardActionConfig; - var ActionsConfig = ( - /** @class */ - function() { - function ActionsConfig2(obj) { - this.maxActions = 5; - this.spacing = Enums.Spacing.Default; - this.buttonSpacing = 20; - this.showCard = new ShowCardActionConfig(); - this.preExpandSingleShowCardAction = false; - this.actionsOrientation = Enums.Orientation.Horizontal; - this.actionAlignment = Enums.ActionAlignment.Left; - this.iconPlacement = Enums.ActionIconPlacement.LeftOfTitle; - this.allowTitleToWrap = false; - this.iconSize = 16; - if (obj) { - this.maxActions = obj["maxActions"] != null ? obj["maxActions"] : this.maxActions; - this.spacing = parseHostConfigEnum(Enums.Spacing, obj.spacing && obj.spacing, Enums.Spacing.Default); - this.buttonSpacing = obj["buttonSpacing"] != null ? obj["buttonSpacing"] : this.buttonSpacing; - this.showCard = new ShowCardActionConfig(obj["showCard"]); - this.preExpandSingleShowCardAction = Utils.parseBool(obj["preExpandSingleShowCardAction"], false); - this.actionsOrientation = parseHostConfigEnum(Enums.Orientation, obj["actionsOrientation"], Enums.Orientation.Horizontal); - this.actionAlignment = parseHostConfigEnum(Enums.ActionAlignment, obj["actionAlignment"], Enums.ActionAlignment.Left); - this.iconPlacement = parseHostConfigEnum(Enums.ActionIconPlacement, obj["iconPlacement"], Enums.ActionIconPlacement.LeftOfTitle); - this.allowTitleToWrap = obj["allowTitleToWrap"] != null ? obj["allowTitleToWrap"] : this.allowTitleToWrap; - try { - var sizeAndUnit = Shared.SizeAndUnit.parse(obj["iconSize"]); - if (sizeAndUnit.unit === Enums.SizeUnit.Pixel) { - this.iconSize = sizeAndUnit.physicalSize; - } - } catch (e) { - } - } - } - ActionsConfig2.prototype.toJSON = function() { - return { - maxActions: this.maxActions, - spacing: Enums.Spacing[this.spacing], - buttonSpacing: this.buttonSpacing, - showCard: this.showCard, - preExpandSingleShowCardAction: this.preExpandSingleShowCardAction, - actionsOrientation: Enums.Orientation[this.actionsOrientation], - actionAlignment: Enums.ActionAlignment[this.actionAlignment] - }; - }; - return ActionsConfig2; - }() - ); - exports.ActionsConfig = ActionsConfig; - var ColorSetDefinition = ( - /** @class */ - function() { - function ColorSetDefinition2(obj) { - this.default = new TextColorDefinition(); - this.dark = new TextColorDefinition(); - this.light = new TextColorDefinition(); - this.accent = new TextColorDefinition(); - this.good = new TextColorDefinition(); - this.warning = new TextColorDefinition(); - this.attention = new TextColorDefinition(); - this.parse(obj); - } - ColorSetDefinition2.prototype.parseSingleColor = function(obj, propertyName) { - if (obj) { - this[propertyName].parse(obj[propertyName]); - } - }; - ColorSetDefinition2.prototype.parse = function(obj) { - if (obj) { - this.parseSingleColor(obj, "default"); - this.parseSingleColor(obj, "dark"); - this.parseSingleColor(obj, "light"); - this.parseSingleColor(obj, "accent"); - this.parseSingleColor(obj, "good"); - this.parseSingleColor(obj, "warning"); - this.parseSingleColor(obj, "attention"); - } - }; - return ColorSetDefinition2; - }() - ); - exports.ColorSetDefinition = ColorSetDefinition; - var ContainerStyleDefinition = ( - /** @class */ - function() { - function ContainerStyleDefinition2(obj) { - this.foregroundColors = new ColorSetDefinition({ - "default": { default: "#333333", subtle: "#EE333333" }, - "dark": { default: "#000000", subtle: "#66000000" }, - "light": { default: "#FFFFFF", subtle: "#33000000" }, - "accent": { default: "#2E89FC", subtle: "#882E89FC" }, - "good": { default: "#028A02", subtle: "#DD027502" }, - "warning": { default: "#E69500", subtle: "#DDE69500" }, - "attention": { default: "#CC3300", subtle: "#DDCC3300" } - }); - this.parse(obj); - } - ContainerStyleDefinition2.prototype.parse = function(obj) { - if (obj) { - this.backgroundColor = obj["backgroundColor"]; - this.foregroundColors.parse(obj["foregroundColors"]); - this.highlightBackgroundColor = obj["highlightBackgroundColor"]; - this.highlightForegroundColor = obj["highlightForegroundColor"]; - this.borderColor = obj["borderColor"]; - } - }; - Object.defineProperty(ContainerStyleDefinition2.prototype, "isBuiltIn", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - return ContainerStyleDefinition2; - }() - ); - exports.ContainerStyleDefinition = ContainerStyleDefinition; - var BuiltInContainerStyleDefinition = ( - /** @class */ - function(_super) { - __extends(BuiltInContainerStyleDefinition2, _super); - function BuiltInContainerStyleDefinition2() { - return _super !== null && _super.apply(this, arguments) || this; - } - Object.defineProperty(BuiltInContainerStyleDefinition2.prototype, "isBuiltIn", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - return BuiltInContainerStyleDefinition2; - }(ContainerStyleDefinition) - ); - var ContainerStyleSet = ( - /** @class */ - function() { - function ContainerStyleSet2(obj) { - this._allStyles = {}; - this._allStyles[Enums.ContainerStyle.Default] = new BuiltInContainerStyleDefinition(); - this._allStyles[Enums.ContainerStyle.Emphasis] = new BuiltInContainerStyleDefinition(); - this._allStyles[Enums.ContainerStyle.Accent] = new BuiltInContainerStyleDefinition(); - this._allStyles[Enums.ContainerStyle.Good] = new BuiltInContainerStyleDefinition(); - this._allStyles[Enums.ContainerStyle.Attention] = new BuiltInContainerStyleDefinition(); - this._allStyles[Enums.ContainerStyle.Warning] = new BuiltInContainerStyleDefinition(); - if (obj) { - this._allStyles[Enums.ContainerStyle.Default].parse(obj[Enums.ContainerStyle.Default]); - this._allStyles[Enums.ContainerStyle.Emphasis].parse(obj[Enums.ContainerStyle.Emphasis]); - this._allStyles[Enums.ContainerStyle.Accent].parse(obj[Enums.ContainerStyle.Accent]); - this._allStyles[Enums.ContainerStyle.Good].parse(obj[Enums.ContainerStyle.Good]); - this._allStyles[Enums.ContainerStyle.Attention].parse(obj[Enums.ContainerStyle.Attention]); - this._allStyles[Enums.ContainerStyle.Warning].parse(obj[Enums.ContainerStyle.Warning]); - var customStyleArray = obj["customStyles"]; - if (customStyleArray && Array.isArray(customStyleArray)) { - for (var _i = 0, customStyleArray_1 = customStyleArray; _i < customStyleArray_1.length; _i++) { - var customStyle = customStyleArray_1[_i]; - if (customStyle) { - var styleName = customStyle["name"]; - if (styleName && typeof styleName === "string") { - if (this._allStyles.hasOwnProperty(styleName)) { - this._allStyles[styleName].parse(customStyle["style"]); - } else { - this._allStyles[styleName] = new ContainerStyleDefinition(customStyle["style"]); - } - } - } - } - } - } - } - ContainerStyleSet2.prototype.toJSON = function() { - var _this = this; - var customStyleArray = []; - Object.keys(this._allStyles).forEach(function(key) { - if (!_this._allStyles[key].isBuiltIn) { - customStyleArray.push({ - name: key, - style: _this._allStyles[key] - }); - } - }); - var result = { - default: this.default, - emphasis: this.emphasis - }; - if (customStyleArray.length > 0) { - result.customStyles = customStyleArray; - } - return result; - }; - ContainerStyleSet2.prototype.getStyleByName = function(name, defaultValue) { - if (name && this._allStyles.hasOwnProperty(name)) { - return this._allStyles[name]; - } else { - return defaultValue ? defaultValue : this._allStyles[Enums.ContainerStyle.Default]; - } - }; - Object.defineProperty(ContainerStyleSet2.prototype, "default", { - get: function() { - return this._allStyles[Enums.ContainerStyle.Default]; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ContainerStyleSet2.prototype, "emphasis", { - get: function() { - return this._allStyles[Enums.ContainerStyle.Emphasis]; - }, - enumerable: false, - configurable: true - }); - return ContainerStyleSet2; - }() - ); - exports.ContainerStyleSet = ContainerStyleSet; - var FontTypeDefinition = ( - /** @class */ - function() { - function FontTypeDefinition2(fontFamily) { - this.fontFamily = "Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif"; - this.fontSizes = { - small: 12, - default: 14, - medium: 17, - large: 21, - extraLarge: 26 - }; - this.fontWeights = { - lighter: 200, - default: 400, - bolder: 600 - }; - if (fontFamily) { - this.fontFamily = fontFamily; - } - } - FontTypeDefinition2.prototype.parse = function(obj) { - this.fontFamily = obj["fontFamily"] || this.fontFamily; - this.fontSizes = { - small: obj.fontSizes && obj.fontSizes["small"] || this.fontSizes.small, - default: obj.fontSizes && obj.fontSizes["default"] || this.fontSizes.default, - medium: obj.fontSizes && obj.fontSizes["medium"] || this.fontSizes.medium, - large: obj.fontSizes && obj.fontSizes["large"] || this.fontSizes.large, - extraLarge: obj.fontSizes && obj.fontSizes["extraLarge"] || this.fontSizes.extraLarge - }; - this.fontWeights = { - lighter: obj.fontWeights && obj.fontWeights["lighter"] || this.fontWeights.lighter, - default: obj.fontWeights && obj.fontWeights["default"] || this.fontWeights.default, - bolder: obj.fontWeights && obj.fontWeights["bolder"] || this.fontWeights.bolder - }; - }; - FontTypeDefinition2.monospace = new FontTypeDefinition2("'Courier New', Courier, monospace"); - return FontTypeDefinition2; - }() - ); - exports.FontTypeDefinition = FontTypeDefinition; - var FontTypeSet = ( - /** @class */ - function() { - function FontTypeSet2(obj) { - this.default = new FontTypeDefinition(); - this.monospace = new FontTypeDefinition("'Courier New', Courier, monospace"); - if (obj) { - this.default.parse(obj["default"]); - this.monospace.parse(obj["monospace"]); - } - } - FontTypeSet2.prototype.getStyleDefinition = function(style) { - switch (style) { - case Enums.FontType.Monospace: - return this.monospace; - case Enums.FontType.Default: - default: - return this.default; - } - }; - return FontTypeSet2; - }() - ); - exports.FontTypeSet = FontTypeSet; - var HostConfig = ( - /** @class */ - function() { - function HostConfig2(obj) { - this.hostCapabilities = new host_capabilities_1.HostCapabilities(); - this.choiceSetInputValueSeparator = ","; - this.supportsInteractivity = true; - this.spacing = { - small: 3, - default: 8, - medium: 20, - large: 30, - extraLarge: 40, - padding: 15 - }; - this.separator = { - lineThickness: 1, - lineColor: "#EEEEEE" - }; - this.imageSizes = { - small: 40, - medium: 80, - large: 160 - }; - this.containerStyles = new ContainerStyleSet(); - this.inputs = new InputConfig(); - this.actions = new ActionsConfig(); - this.adaptiveCard = new AdaptiveCardConfig(); - this.imageSet = new ImageSetConfig(); - this.media = new MediaConfig(); - this.factSet = new FactSetConfig(); - this.table = new TableConfig(); - this.textStyles = new TextStyleSet(); - this.textBlock = new TextBlockConfig(); - this.alwaysAllowBleed = false; - if (obj) { - if (typeof obj === "string" || obj instanceof String) { - obj = JSON.parse(obj); - } - this.choiceSetInputValueSeparator = obj && typeof obj["choiceSetInputValueSeparator"] === "string" ? obj["choiceSetInputValueSeparator"] : this.choiceSetInputValueSeparator; - this.supportsInteractivity = obj && typeof obj["supportsInteractivity"] === "boolean" ? obj["supportsInteractivity"] : this.supportsInteractivity; - this._legacyFontType = new FontTypeDefinition(); - this._legacyFontType.parse(obj); - if (obj.fontTypes) { - this.fontTypes = new FontTypeSet(obj.fontTypes); - } - if (obj.lineHeights) { - this.lineHeights = { - small: obj.lineHeights["small"], - default: obj.lineHeights["default"], - medium: obj.lineHeights["medium"], - large: obj.lineHeights["large"], - extraLarge: obj.lineHeights["extraLarge"] - }; - } - this.imageSizes = { - small: obj.imageSizes && obj.imageSizes["small"] || this.imageSizes.small, - medium: obj.imageSizes && obj.imageSizes["medium"] || this.imageSizes.medium, - large: obj.imageSizes && obj.imageSizes["large"] || this.imageSizes.large - }; - this.containerStyles = new ContainerStyleSet(obj["containerStyles"]); - this.spacing = { - small: obj.spacing && obj.spacing["small"] || this.spacing.small, - default: obj.spacing && obj.spacing["default"] || this.spacing.default, - medium: obj.spacing && obj.spacing["medium"] || this.spacing.medium, - large: obj.spacing && obj.spacing["large"] || this.spacing.large, - extraLarge: obj.spacing && obj.spacing["extraLarge"] || this.spacing.extraLarge, - padding: obj.spacing && obj.spacing["padding"] || this.spacing.padding - }; - this.separator = { - lineThickness: obj.separator && obj.separator["lineThickness"] || this.separator.lineThickness, - lineColor: obj.separator && obj.separator["lineColor"] || this.separator.lineColor - }; - this.inputs = new InputConfig(obj.inputs || this.inputs); - this.actions = new ActionsConfig(obj.actions || this.actions); - this.adaptiveCard = new AdaptiveCardConfig(obj.adaptiveCard || this.adaptiveCard); - this.imageSet = new ImageSetConfig(obj["imageSet"]); - this.factSet = new FactSetConfig(obj["factSet"]); - this.textStyles = new TextStyleSet(obj["textStyles"]); - this.textBlock = new TextBlockConfig(obj["textBlock"]); - } - } - HostConfig2.prototype.getFontTypeDefinition = function(style) { - if (this.fontTypes) { - return this.fontTypes.getStyleDefinition(style); - } else { - return style === Enums.FontType.Monospace ? FontTypeDefinition.monospace : this._legacyFontType; - } - }; - HostConfig2.prototype.getEffectiveSpacing = function(spacing) { - switch (spacing) { - case Enums.Spacing.Small: - return this.spacing.small; - case Enums.Spacing.Default: - return this.spacing.default; - case Enums.Spacing.Medium: - return this.spacing.medium; - case Enums.Spacing.Large: - return this.spacing.large; - case Enums.Spacing.ExtraLarge: - return this.spacing.extraLarge; - case Enums.Spacing.Padding: - return this.spacing.padding; - default: - return 0; - } - }; - HostConfig2.prototype.paddingDefinitionToSpacingDefinition = function(paddingDefinition) { - return new Shared.SpacingDefinition(this.getEffectiveSpacing(paddingDefinition.top), this.getEffectiveSpacing(paddingDefinition.right), this.getEffectiveSpacing(paddingDefinition.bottom), this.getEffectiveSpacing(paddingDefinition.left)); - }; - HostConfig2.prototype.makeCssClassNames = function() { - var classNames = []; - for (var _i = 0; _i < arguments.length; _i++) { - classNames[_i] = arguments[_i]; - } - var result = []; - for (var _a = 0, classNames_1 = classNames; _a < classNames_1.length; _a++) { - var className = classNames_1[_a]; - result.push((this.cssClassNamePrefix ? this.cssClassNamePrefix + "-" : "") + className); - } - return result; - }; - HostConfig2.prototype.makeCssClassName = function() { - var classNames = []; - for (var _i = 0; _i < arguments.length; _i++) { - classNames[_i] = arguments[_i]; - } - var result = this.makeCssClassNames.apply(this, classNames).join(" "); - return result ? result : ""; - }; - Object.defineProperty(HostConfig2.prototype, "fontFamily", { - get: function() { - return this._legacyFontType.fontFamily; - }, - set: function(value) { - this._legacyFontType.fontFamily = value; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(HostConfig2.prototype, "fontSizes", { - get: function() { - return this._legacyFontType.fontSizes; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(HostConfig2.prototype, "fontWeights", { - get: function() { - return this._legacyFontType.fontWeights; - }, - enumerable: false, - configurable: true - }); - return HostConfig2; - }() - ); - exports.HostConfig = HostConfig; - exports.defaultHostConfig = new HostConfig({ - supportsInteractivity: true, - spacing: { - small: 10, - default: 20, - medium: 30, - large: 40, - extraLarge: 50, - padding: 20 - }, - separator: { - lineThickness: 1, - lineColor: "#EEEEEE" - }, - fontTypes: { - default: { - fontFamily: "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif", - fontSizes: { - small: 12, - default: 14, - medium: 17, - large: 21, - extraLarge: 26 - }, - fontWeights: { - lighter: 200, - default: 400, - bolder: 600 - } - }, - monospace: { - fontFamily: "'Courier New', Courier, monospace", - fontSizes: { - small: 12, - default: 14, - medium: 17, - large: 21, - extraLarge: 26 - }, - fontWeights: { - lighter: 200, - default: 400, - bolder: 600 - } - } - }, - imageSizes: { - small: 40, - medium: 80, - large: 160 - }, - containerStyles: { - default: { - backgroundColor: "#FFFFFF", - foregroundColors: { - default: { - default: "#333333", - subtle: "#EE333333" - }, - dark: { - default: "#000000", - subtle: "#66000000" - }, - light: { - default: "#FFFFFF", - subtle: "#33000000" - }, - accent: { - default: "#2E89FC", - subtle: "#882E89FC" - }, - attention: { - default: "#cc3300", - subtle: "#DDcc3300" - }, - good: { - default: "#028A02", - subtle: "#DD027502" - }, - warning: { - default: "#e69500", - subtle: "#DDe69500" - } - } - }, - emphasis: { - backgroundColor: "#08000000", - foregroundColors: { - default: { - default: "#333333", - subtle: "#EE333333" - }, - dark: { - default: "#000000", - subtle: "#66000000" - }, - light: { - default: "#FFFFFF", - subtle: "#33000000" - }, - accent: { - default: "#2E89FC", - subtle: "#882E89FC" - }, - attention: { - default: "#cc3300", - subtle: "#DDcc3300" - }, - good: { - default: "#028A02", - subtle: "#DD027502" - }, - warning: { - default: "#e69500", - subtle: "#DDe69500" - } - } - }, - accent: { - backgroundColor: "#C7DEF9", - foregroundColors: { - default: { - default: "#333333", - subtle: "#EE333333" - }, - dark: { - default: "#000000", - subtle: "#66000000" - }, - light: { - default: "#FFFFFF", - subtle: "#33000000" - }, - accent: { - default: "#2E89FC", - subtle: "#882E89FC" - }, - attention: { - default: "#cc3300", - subtle: "#DDcc3300" - }, - good: { - default: "#028A02", - subtle: "#DD027502" - }, - warning: { - default: "#e69500", - subtle: "#DDe69500" - } - } - }, - good: { - backgroundColor: "#CCFFCC", - foregroundColors: { - default: { - default: "#333333", - subtle: "#EE333333" - }, - dark: { - default: "#000000", - subtle: "#66000000" - }, - light: { - default: "#FFFFFF", - subtle: "#33000000" - }, - accent: { - default: "#2E89FC", - subtle: "#882E89FC" - }, - attention: { - default: "#cc3300", - subtle: "#DDcc3300" - }, - good: { - default: "#028A02", - subtle: "#DD027502" - }, - warning: { - default: "#e69500", - subtle: "#DDe69500" - } - } - }, - attention: { - backgroundColor: "#FFC5B2", - foregroundColors: { - default: { - default: "#333333", - subtle: "#EE333333" - }, - dark: { - default: "#000000", - subtle: "#66000000" - }, - light: { - default: "#FFFFFF", - subtle: "#33000000" - }, - accent: { - default: "#2E89FC", - subtle: "#882E89FC" - }, - attention: { - default: "#cc3300", - subtle: "#DDcc3300" - }, - good: { - default: "#028A02", - subtle: "#DD027502" - }, - warning: { - default: "#e69500", - subtle: "#DDe69500" - } - } - }, - warning: { - backgroundColor: "#FFE2B2", - foregroundColors: { - default: { - default: "#333333", - subtle: "#EE333333" - }, - dark: { - default: "#000000", - subtle: "#66000000" - }, - light: { - default: "#FFFFFF", - subtle: "#33000000" - }, - accent: { - default: "#2E89FC", - subtle: "#882E89FC" - }, - attention: { - default: "#cc3300", - subtle: "#DDcc3300" - }, - good: { - default: "#028A02", - subtle: "#DD027502" - }, - warning: { - default: "#e69500", - subtle: "#DDe69500" - } - } - } - }, - inputs: { - label: { - requiredInputs: { - weight: Enums.TextWeight.Bolder, - suffix: " *", - suffixColor: Enums.TextColor.Attention - }, - optionalInputs: { - weight: Enums.TextWeight.Bolder - } - }, - errorMessage: { - color: Enums.TextColor.Attention, - weight: Enums.TextWeight.Bolder - } - }, - actions: { - maxActions: 5, - spacing: Enums.Spacing.Default, - buttonSpacing: 10, - showCard: { - actionMode: Enums.ShowCardActionMode.Inline, - inlineTopMargin: 16 - }, - actionsOrientation: Enums.Orientation.Horizontal, - actionAlignment: Enums.ActionAlignment.Left - }, - adaptiveCard: { - allowCustomStyle: false - }, - imageSet: { - imageSize: Enums.Size.Medium, - maxImageHeight: 100 - }, - factSet: { - title: { - color: Enums.TextColor.Default, - size: Enums.TextSize.Default, - isSubtle: false, - weight: Enums.TextWeight.Bolder, - wrap: true, - maxWidth: 150 - }, - value: { - color: Enums.TextColor.Default, - size: Enums.TextSize.Default, - isSubtle: false, - weight: Enums.TextWeight.Default, - wrap: true - }, - spacing: 10 - } - }); - } -}); - -// node_modules/adaptivecards/lib/registry.js -var require_registry = __commonJS({ - "node_modules/adaptivecards/lib/registry.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.GlobalRegistry = exports.CardObjectRegistry = exports.ElementSingletonBehavior = void 0; - var serialization_1 = require_serialization(); - var ElementSingletonBehavior; - (function(ElementSingletonBehavior2) { - ElementSingletonBehavior2[ElementSingletonBehavior2["Only"] = 0] = "Only"; - ElementSingletonBehavior2[ElementSingletonBehavior2["Allowed"] = 1] = "Allowed"; - ElementSingletonBehavior2[ElementSingletonBehavior2["NotAllowed"] = 2] = "NotAllowed"; - })(ElementSingletonBehavior = exports.ElementSingletonBehavior || (exports.ElementSingletonBehavior = {})); - var CardObjectRegistry = ( - /** @class */ - function() { - function CardObjectRegistry2() { - this._items = {}; - } - CardObjectRegistry2.prototype.findByName = function(typeName) { - return this._items.hasOwnProperty(typeName) ? this._items[typeName] : void 0; - }; - CardObjectRegistry2.prototype.clear = function() { - this._items = {}; - }; - CardObjectRegistry2.prototype.copyTo = function(target) { - var keys = Object.keys(this._items); - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - var typeRegistration = this._items[key]; - target.register(typeRegistration.typeName, typeRegistration.objectType, typeRegistration.schemaVersion, typeRegistration.singletonBehavior); - } - }; - CardObjectRegistry2.prototype.register = function(typeName, objectType, schemaVersion, singletonBehavior) { - if (schemaVersion === void 0) { - schemaVersion = serialization_1.Versions.v1_0; - } - if (singletonBehavior === void 0) { - singletonBehavior = ElementSingletonBehavior.NotAllowed; - } - var registrationInfo = this.findByName(typeName); - if (registrationInfo !== void 0) { - registrationInfo.objectType = objectType; - } else { - registrationInfo = { - typeName, - objectType, - schemaVersion, - singletonBehavior - }; - } - this._items[typeName] = registrationInfo; - }; - CardObjectRegistry2.prototype.unregister = function(typeName) { - delete this._items[typeName]; - }; - CardObjectRegistry2.prototype.createInstance = function(typeName, targetVersion) { - var registrationInfo = this.findByName(typeName); - return registrationInfo && registrationInfo.schemaVersion.compareTo(targetVersion) <= 0 ? new registrationInfo.objectType() : void 0; - }; - CardObjectRegistry2.prototype.getItemCount = function() { - return Object.keys(this._items).length; - }; - CardObjectRegistry2.prototype.getItemAt = function(index) { - var _this = this; - return Object.keys(this._items).map(function(e) { - return _this._items[e]; - })[index]; - }; - return CardObjectRegistry2; - }() - ); - exports.CardObjectRegistry = CardObjectRegistry; - var GlobalRegistry = ( - /** @class */ - function() { - function GlobalRegistry2() { - } - GlobalRegistry2.populateWithDefaultElements = function(registry) { - registry.clear(); - GlobalRegistry2.defaultElements.copyTo(registry); - }; - GlobalRegistry2.populateWithDefaultActions = function(registry) { - registry.clear(); - GlobalRegistry2.defaultActions.copyTo(registry); - }; - Object.defineProperty(GlobalRegistry2, "elements", { - get: function() { - if (!GlobalRegistry2._elements) { - GlobalRegistry2._elements = new CardObjectRegistry(); - GlobalRegistry2.populateWithDefaultElements(GlobalRegistry2._elements); - } - return GlobalRegistry2._elements; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(GlobalRegistry2, "actions", { - get: function() { - if (!GlobalRegistry2._actions) { - GlobalRegistry2._actions = new CardObjectRegistry(); - GlobalRegistry2.populateWithDefaultActions(GlobalRegistry2._actions); - } - return GlobalRegistry2._actions; - }, - enumerable: false, - configurable: true - }); - GlobalRegistry2.reset = function() { - GlobalRegistry2._elements = void 0; - GlobalRegistry2._actions = void 0; - }; - GlobalRegistry2.defaultElements = new CardObjectRegistry(); - GlobalRegistry2.defaultActions = new CardObjectRegistry(); - return GlobalRegistry2; - }() - ); - exports.GlobalRegistry = GlobalRegistry; - } -}); - -// node_modules/adaptivecards/lib/card-object.js -var require_card_object = __commonJS({ - "node_modules/adaptivecards/lib/card-object.js"(exports) { - "use strict"; - var __extends = exports && exports.__extends || /* @__PURE__ */ function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - }(); - var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") - r = Reflect.decorate(decorators, target, key, desc); - else - for (var i = decorators.length - 1; i >= 0; i--) - if (d = decorators[i]) - r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CardObject = exports.ValidationResults = void 0; - var Enums = require_enums(); - var strings_1 = require_strings(); - var shared_1 = require_shared(); - var host_capabilities_1 = require_host_capabilities(); - var serialization_1 = require_serialization(); - var ValidationResults = ( - /** @class */ - function() { - function ValidationResults2() { - this.allIds = {}; - this.validationEvents = []; - } - ValidationResults2.prototype.addFailure = function(cardObject, event, message) { - this.validationEvents.push({ - phase: Enums.ValidationPhase.Validation, - source: cardObject, - event, - message - }); - }; - return ValidationResults2; - }() - ); - exports.ValidationResults = ValidationResults; - var CardObject = ( - /** @class */ - function(_super) { - __extends(CardObject2, _super); - function CardObject2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._shouldFallback = false; - return _this; - } - CardObject2.prototype.getSchemaKey = function() { - return this.getJsonTypeName(); - }; - Object.defineProperty(CardObject2.prototype, "requires", { - get: function() { - return this.getValue(CardObject2.requiresProperty); - }, - enumerable: false, - configurable: true - }); - CardObject2.prototype.contains = function(node) { - if (this._renderedElement) { - return this._renderedElement.contains(node); - } - return false; - }; - CardObject2.prototype.preProcessPropertyValue = function(prop, propertyValue) { - var value = propertyValue === void 0 ? this.getValue(prop) : propertyValue; - if (shared_1.GlobalSettings.allowPreProcessingPropertyValues) { - var currentObject = this; - while (currentObject && !currentObject.onPreProcessPropertyValue) { - currentObject = currentObject.parent; - } - if (currentObject && currentObject.onPreProcessPropertyValue) { - return currentObject.onPreProcessPropertyValue(this, prop, value); - } - } - return value; - }; - CardObject2.prototype.setParent = function(value) { - this._parent = value; - }; - CardObject2.prototype.setShouldFallback = function(value) { - this._shouldFallback = value; - }; - CardObject2.prototype.shouldFallback = function() { - return this._shouldFallback || !this.requires.areAllMet(this.hostConfig.hostCapabilities); - }; - CardObject2.prototype.getRootObject = function() { - var currentObject = this; - while (currentObject.parent) { - currentObject = currentObject.parent; - } - return currentObject; - }; - CardObject2.prototype.internalValidateProperties = function(context) { - if (this.id) { - if (context.allIds.hasOwnProperty(this.id)) { - if (context.allIds[this.id] === 1) { - context.addFailure(this, Enums.ValidationEvent.DuplicateId, strings_1.Strings.errors.duplicateId(this.id)); - } - context.allIds[this.id] += 1; - } else { - context.allIds[this.id] = 1; - } - } - }; - CardObject2.prototype.validateProperties = function() { - var result = new ValidationResults(); - this.internalValidateProperties(result); - return result; - }; - CardObject2.prototype.findDOMNodeOwner = function(node) { - return this.contains(node) ? this : void 0; - }; - CardObject2.prototype.releaseDOMResources = function() { - }; - Object.defineProperty(CardObject2.prototype, "parent", { - get: function() { - return this._parent; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardObject2.prototype, "renderedElement", { - get: function() { - return this._renderedElement; - }, - enumerable: false, - configurable: true - }); - CardObject2.typeNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "type", void 0, void 0, void 0, function(sender) { - return sender.getJsonTypeName(); - }); - CardObject2.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "id"); - CardObject2.requiresProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_2, "requires", host_capabilities_1.HostCapabilities, false, new host_capabilities_1.HostCapabilities()); - __decorate([ - (0, serialization_1.property)(CardObject2.idProperty) - ], CardObject2.prototype, "id", void 0); - __decorate([ - (0, serialization_1.property)(CardObject2.requiresProperty) - ], CardObject2.prototype, "requires", null); - return CardObject2; - }(serialization_1.SerializableObject) - ); - exports.CardObject = CardObject; - } -}); - -// node_modules/adaptivecards/lib/text-formatters.js -var require_text_formatters = __commonJS({ - "node_modules/adaptivecards/lib/text-formatters.js"(exports) { - "use strict"; - var __extends = exports && exports.__extends || /* @__PURE__ */ function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - }(); - Object.defineProperty(exports, "__esModule", { value: true }); - exports.formatText = void 0; - var AbstractTextFormatter = ( - /** @class */ - function() { - function AbstractTextFormatter2(regularExpression) { - this._regularExpression = regularExpression; - } - AbstractTextFormatter2.prototype.format = function(lang, input) { - var matches; - if (input) { - var result = input; - while ((matches = this._regularExpression.exec(input)) != null) { - result = result.replace(matches[0], this.internalFormat(lang, matches)); - } - return result; - } else { - return input; - } - }; - return AbstractTextFormatter2; - }() - ); - var DateFormatter = ( - /** @class */ - function(_super) { - __extends(DateFormatter2, _super); - function DateFormatter2() { - return _super !== null && _super.apply(this, arguments) || this; - } - DateFormatter2.prototype.internalFormat = function(lang, matches) { - var date = new Date(Date.parse(matches[1])); - var format = matches[2] !== void 0 ? matches[2].toLowerCase() : "compact"; - if (format !== "compact") { - return date.toLocaleDateString(lang, { - day: "numeric", - weekday: format, - month: format, - year: "numeric" - }); - } else { - return date.toLocaleDateString(); - } - }; - return DateFormatter2; - }(AbstractTextFormatter) - ); - var TimeFormatter = ( - /** @class */ - function(_super) { - __extends(TimeFormatter2, _super); - function TimeFormatter2() { - return _super !== null && _super.apply(this, arguments) || this; - } - TimeFormatter2.prototype.internalFormat = function(lang, matches) { - var date = new Date(Date.parse(matches[1])); - return date.toLocaleTimeString(lang, { hour: "numeric", minute: "2-digit" }); - }; - return TimeFormatter2; - }(AbstractTextFormatter) - ); - function formatText(lang, text) { - var formatters = [ - new DateFormatter(/\{{2}DATE\((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|(?:(?:-|\+)\d{2}:\d{2})))(?:, ?(COMPACT|LONG|SHORT))?\)\}{2}/g), - new TimeFormatter(/\{{2}TIME\((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|(?:(?:-|\+)\d{2}:\d{2})))\)\}{2}/g) - ]; - var result = text; - for (var _i = 0, formatters_1 = formatters; _i < formatters_1.length; _i++) { - var formatter = formatters_1[_i]; - result = formatter.format(lang, result); - } - return result; - } - exports.formatText = formatText; - } -}); - -// node_modules/adaptivecards/lib/controls/constants.js -var require_constants = __commonJS({ - "node_modules/adaptivecards/lib/controls/constants.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Constants = void 0; - var Constants = ( - /** @class */ - function() { - function Constants2() { - } - Constants2.keys = { - tab: "Tab", - enter: "Enter", - escape: "Escape", - space: " ", - up: "ArrowUp", - down: "ArrowDown", - delete: "Delete" - }; - return Constants2; - }() - ); - exports.Constants = Constants; - } -}); - -// node_modules/adaptivecards/lib/controls/menu-item.js -var require_menu_item = __commonJS({ - "node_modules/adaptivecards/lib/controls/menu-item.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.MenuItem = void 0; - var host_config_1 = require_host_config(); - var constants_1 = require_constants(); - var MenuItem = ( - /** @class */ - function() { - function MenuItem2(key, value) { - this._isEnabled = true; - this.key = key; - this._value = value; - } - MenuItem2.prototype.click = function() { - if (this.isEnabled && this.onClick) { - this.onClick(this); - } - }; - MenuItem2.prototype.updateCssClasses = function() { - if (this._element) { - var effectiveHostConfig = this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig; - this._element.className = effectiveHostConfig.makeCssClassName("ac-ctrl"); - this._element.classList.add(effectiveHostConfig.makeCssClassName(this.isEnabled ? "ac-ctrl-dropdown-item" : "ac-ctrl-dropdown-item-disabled")); - if (!this.isEnabled) { - this._element.classList.add(effectiveHostConfig.makeCssClassName("ac-disabled")); - } - } - }; - MenuItem2.prototype.toString = function() { - return this.value; - }; - MenuItem2.prototype.render = function(hostConfig) { - var _this = this; - this._hostConfig = hostConfig; - if (!this._element) { - this._element = document.createElement("span"); - this._element.innerText = this.value; - this._element.setAttribute("role", "menuitem"); - if (!this.isEnabled) { - this._element.setAttribute("aria-disabled", "true"); - } - this._element.setAttribute("aria-current", "false"); - this._element.onmouseup = function(_e) { - _this.click(); - }; - this._element.onkeydown = function(e) { - if (e.key === constants_1.Constants.keys.enter) { - e.cancelBubble = true; - _this.click(); - } - }; - this.updateCssClasses(); - } - return this._element; - }; - Object.defineProperty(MenuItem2.prototype, "value", { - get: function() { - return this._value; - }, - set: function(newValue) { - this._value = newValue; - if (this._element) { - this._element.innerText = newValue; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(MenuItem2.prototype, "isEnabled", { - get: function() { - return this._isEnabled; - }, - set: function(value) { - if (this._isEnabled !== value) { - this._isEnabled = value; - this.updateCssClasses(); - } - }, - enumerable: false, - configurable: true - }); - return MenuItem2; - }() - ); - exports.MenuItem = MenuItem; - } -}); - -// node_modules/adaptivecards/lib/controls/collection.js -var require_collection = __commonJS({ - "node_modules/adaptivecards/lib/controls/collection.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Collection = void 0; - var Collection = ( - /** @class */ - function() { - function Collection2() { - this._items = []; - } - Collection2.prototype.get = function(index) { - return this._items[index]; - }; - Collection2.prototype.add = function(item) { - this._items.push(item); - if (this.onItemAdded) { - this.onItemAdded(item); - } - }; - Collection2.prototype.remove = function(item) { - var i = this._items.indexOf(item); - if (i >= 0) { - this._items = this._items.splice(i, 1); - if (this.onItemRemoved) { - this.onItemRemoved(item); - } - } - }; - Collection2.prototype.indexOf = function(item) { - return this._items.indexOf(item); - }; - Object.defineProperty(Collection2.prototype, "length", { - get: function() { - return this._items.length; - }, - enumerable: false, - configurable: true - }); - return Collection2; - }() - ); - exports.Collection = Collection; - } -}); - -// node_modules/adaptivecards/lib/controls/popup-control.js -var require_popup_control = __commonJS({ - "node_modules/adaptivecards/lib/controls/popup-control.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PopupControl = void 0; - var constants_1 = require_constants(); - var Utils = require_utils(); - var host_config_1 = require_host_config(); - var PopupControl = ( - /** @class */ - function() { - function PopupControl2() { - this._isOpen = false; - } - PopupControl2.prototype.keyDown = function(e) { - switch (e.key) { - case constants_1.Constants.keys.escape: - this.closePopup(true); - break; - } - }; - PopupControl2.prototype.render = function(_rootElementBounds) { - var _this = this; - var element = document.createElement("div"); - element.tabIndex = 0; - element.className = this.hostConfig.makeCssClassName("ac-ctrl", "ac-ctrl-popup-container"); - element.setAttribute("role", "dialog"); - element.setAttribute("aria-modal", "true"); - element.onkeydown = function(e) { - _this.keyDown(e); - return !e.cancelBubble; - }; - element.appendChild(this.renderContent()); - return element; - }; - PopupControl2.prototype.focus = function() { - if (this._popupElement) { - this._popupElement.firstElementChild.focus(); - } - }; - PopupControl2.prototype.popup = function(rootElement) { - var _a, _b, _c, _d, _f; - var _this = this; - if (!this._isOpen) { - this._overlayElement = document.createElement("div"); - this._overlayElement.className = this.hostConfig.makeCssClassName("ac-ctrl-overlay"); - this._overlayElement.tabIndex = 0; - this._overlayElement.style.width = document.documentElement.scrollWidth + "px"; - this._overlayElement.style.height = document.documentElement.scrollHeight + "px"; - this._overlayElement.onfocus = function(_e) { - _this.closePopup(true); - }; - document.body.appendChild(this._overlayElement); - var rootElementBounds = rootElement.getBoundingClientRect(); - this._popupElement = this.render(rootElementBounds); - (_a = this._popupElement.classList).remove.apply(_a, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideLeftToRight", "ac-ctrl-slideRightToLeft", "ac-ctrl-slideTopToBottom", "ac-ctrl-slideRightToLeft")); - window.addEventListener("resize", function(_e) { - _this.closePopup(true); - }); - var rootElementLabel = rootElement.getAttribute("aria-label"); - if (rootElementLabel) { - this._popupElement.setAttribute("aria-label", rootElementLabel); - } - this._overlayElement.appendChild(this._popupElement); - var popupElementBounds = this._popupElement.getBoundingClientRect(); - var availableSpaceBelow = window.innerHeight - rootElementBounds.bottom; - var availableSpaceAbove = rootElementBounds.top; - var availableSpaceRight = window.innerWidth - rootElementBounds.right; - var availableSpaceLeft = rootElementBounds.left; - var left = rootElementBounds.left + Utils.getScrollX(); - var top_1; - if (availableSpaceAbove < popupElementBounds.height && availableSpaceBelow < popupElementBounds.height) { - var actualPopupHeight = Math.min(popupElementBounds.height, window.innerHeight); - this._popupElement.style.maxHeight = actualPopupHeight + "px"; - if (actualPopupHeight < popupElementBounds.height) { - top_1 = Utils.getScrollY(); - } else { - top_1 = Utils.getScrollY() + rootElementBounds.top + (rootElementBounds.height - actualPopupHeight) / 2; - } - if (availableSpaceLeft < popupElementBounds.width && availableSpaceRight < popupElementBounds.width) { - var actualPopupWidth = Math.min(popupElementBounds.width, window.innerWidth); - this._popupElement.style.maxWidth = actualPopupWidth + "px"; - if (actualPopupWidth < popupElementBounds.width) { - left = Utils.getScrollX(); - } else { - left = Utils.getScrollX() + rootElementBounds.left + (rootElementBounds.width - actualPopupWidth) / 2; - } - } else { - if (availableSpaceRight >= popupElementBounds.width) { - left = Utils.getScrollX() + rootElementBounds.right; - (_b = this._popupElement.classList).add.apply(_b, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideLeftToRight")); - } else { - left = Utils.getScrollX() + rootElementBounds.left - popupElementBounds.width; - (_c = this._popupElement.classList).add.apply(_c, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideRightToLeft")); - } - } - } else { - if (availableSpaceBelow >= popupElementBounds.height) { - top_1 = Utils.getScrollY() + rootElementBounds.bottom; - (_d = this._popupElement.classList).add.apply(_d, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideTopToBottom")); - } else { - top_1 = Utils.getScrollY() + rootElementBounds.top - popupElementBounds.height; - (_f = this._popupElement.classList).add.apply(_f, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideBottomToTop")); - } - if (availableSpaceRight < popupElementBounds.width) { - left = Utils.getScrollX() + rootElementBounds.right - popupElementBounds.width; - } - } - this._popupElement.style.left = left + "px"; - this._popupElement.style.top = top_1 + "px"; - this._popupElement.focus(); - this._isOpen = true; - } - }; - PopupControl2.prototype.closePopup = function(wasCancelled) { - if (this._isOpen) { - document.body.removeChild(this._overlayElement); - this._isOpen = false; - if (this.onClose) { - this.onClose(this, wasCancelled); - } - } - }; - Object.defineProperty(PopupControl2.prototype, "hostConfig", { - get: function() { - return this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig; - }, - set: function(value) { - this._hostConfig = value; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(PopupControl2.prototype, "isOpen", { - get: function() { - return this._isOpen; - }, - enumerable: false, - configurable: true - }); - return PopupControl2; - }() - ); - exports.PopupControl = PopupControl; - } -}); - -// node_modules/adaptivecards/lib/controls/popup-menu.js -var require_popup_menu = __commonJS({ - "node_modules/adaptivecards/lib/controls/popup-menu.js"(exports) { - "use strict"; - var __extends = exports && exports.__extends || /* @__PURE__ */ function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - }(); - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PopupMenu = void 0; - var constants_1 = require_constants(); - var collection_1 = require_collection(); - var popup_control_1 = require_popup_control(); - var PopupMenu = ( - /** @class */ - function(_super) { - __extends(PopupMenu2, _super); - function PopupMenu2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._items = new collection_1.Collection(); - _this._renderedItems = []; - _this._selectedIndex = -1; - return _this; - } - PopupMenu2.prototype.renderContent = function() { - var element = document.createElement("div"); - element.className = this.hostConfig.makeCssClassName("ac-ctrl ac-popup"); - element.setAttribute("role", "listbox"); - for (var i = 0; i < this._items.length; i++) { - var renderedItem = this._items.get(i).render(this.hostConfig); - renderedItem.tabIndex = 0; - element.appendChild(renderedItem); - if (i === this.selectedIndex) { - renderedItem.focus(); - } - this._renderedItems.push(renderedItem); - } - return element; - }; - PopupMenu2.prototype.keyDown = function(e) { - _super.prototype.keyDown.call(this, e); - var selectedItemIndex = this._selectedIndex; - switch (e.key) { - case constants_1.Constants.keys.tab: - this.closePopup(true); - break; - case constants_1.Constants.keys.up: - if (selectedItemIndex <= 0) { - selectedItemIndex = this._renderedItems.length - 1; - } else { - selectedItemIndex--; - if (selectedItemIndex < 0) { - selectedItemIndex = this._renderedItems.length - 1; - } - } - this.selectedIndex = selectedItemIndex; - e.cancelBubble = true; - break; - case constants_1.Constants.keys.down: - if (selectedItemIndex < 0) { - selectedItemIndex = 0; - } else { - selectedItemIndex++; - if (selectedItemIndex >= this._renderedItems.length) { - selectedItemIndex = 0; - } - } - this.selectedIndex = selectedItemIndex; - e.cancelBubble = true; - break; - } - }; - Object.defineProperty(PopupMenu2.prototype, "items", { - get: function() { - return this._items; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(PopupMenu2.prototype, "selectedIndex", { - get: function() { - return this._selectedIndex; - }, - set: function(index) { - if (index >= 0 && index < this._renderedItems.length) { - this._renderedItems[index].focus(); - this._selectedIndex = index; - } - }, - enumerable: false, - configurable: true - }); - return PopupMenu2; - }(popup_control_1.PopupControl) - ); - exports.PopupMenu = PopupMenu; - } -}); - -// node_modules/adaptivecards/lib/controls/index.js -var require_controls = __commonJS({ - "node_modules/adaptivecards/lib/controls/index.js"(exports) { - "use strict"; - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - o[k2] = m[k]; - }); - var __exportStar = exports && exports.__exportStar || function(m, exports2) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) - __createBinding(exports2, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - __exportStar(require_menu_item(), exports); - __exportStar(require_popup_menu(), exports); - } -}); - -// node_modules/adaptivecards/lib/card-elements.js -var require_card_elements = __commonJS({ - "node_modules/adaptivecards/lib/card-elements.js"(exports) { - "use strict"; - var __extends = exports && exports.__extends || /* @__PURE__ */ function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - }(); - var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") - r = Reflect.decorate(decorators, target, key, desc); - else - for (var i = decorators.length - 1; i >= 0; i--) - if (d = decorators[i]) - r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __generator = exports && exports.__generator || function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) - throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (_) - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) - return t; - if (y = 0, t) - op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ContainerWithActions = exports.ColumnSet = exports.Column = exports.Container = exports.BackgroundImage = exports.ContainerBase = exports.StylableCardElementContainer = exports.ContainerStyleProperty = exports.ActionSet = exports.ShowCardAction = exports.HttpAction = exports.HttpHeader = exports.ToggleVisibilityAction = exports.OpenUrlAction = exports.ExecuteAction = exports.SubmitAction = exports.SubmitActionBase = exports.Action = exports.TimeInput = exports.TimeProperty = exports.DateInput = exports.NumberInput = exports.ChoiceSetInput = exports.Choice = exports.ToggleInput = exports.TextInput = exports.Input = exports.Media = exports.YouTubePlayer = exports.DailymotionPlayer = exports.VimeoPlayer = exports.IFrameMediaMediaPlayer = exports.CustomMediaPlayer = exports.HTML5MediaPlayer = exports.MediaPlayer = exports.MediaSource = exports.CaptionSource = exports.ContentSource = exports.ImageSet = exports.CardElementContainer = exports.Image = exports.FactSet = exports.Fact = exports.RichTextBlock = exports.TextRun = exports.TextBlock = exports.BaseTextBlock = exports.ActionProperty = exports.CardElement = exports.renderSeparation = void 0; - exports.SerializationContext = exports.AdaptiveCard = exports.Authentication = exports.TokenExchangeResource = exports.AuthCardButton = exports.RefreshDefinition = exports.RefreshActionProperty = void 0; - var Enums = require_enums(); - var shared_1 = require_shared(); - var Utils = require_utils(); - var host_config_1 = require_host_config(); - var TextFormatters = require_text_formatters(); - var card_object_1 = require_card_object(); - var serialization_1 = require_serialization(); - var registry_1 = require_registry(); - var strings_1 = require_strings(); - var controls_1 = require_controls(); - function clearElement(element) { - var _a, _b; - var trustedHtml = typeof window === "undefined" ? "" : (_b = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.emptyHTML) !== null && _b !== void 0 ? _b : ""; - element.innerHTML = trustedHtml; - } - function renderSeparation(hostConfig, separationDefinition, orientation) { - if (separationDefinition.spacing > 0 || separationDefinition.lineThickness && separationDefinition.lineThickness > 0) { - var separator = document.createElement("div"); - separator.className = hostConfig.makeCssClassName("ac-" + (orientation === Enums.Orientation.Horizontal ? "horizontal" : "vertical") + "-separator"); - separator.setAttribute("aria-hidden", "true"); - var color = separationDefinition.lineColor ? Utils.stringToCssColor(separationDefinition.lineColor) : ""; - if (orientation === Enums.Orientation.Horizontal) { - if (separationDefinition.lineThickness) { - separator.style.paddingTop = separationDefinition.spacing / 2 + "px"; - separator.style.marginBottom = separationDefinition.spacing / 2 + "px"; - separator.style.borderBottom = separationDefinition.lineThickness + "px solid " + color; - } else { - separator.style.height = separationDefinition.spacing + "px"; - } - } else { - if (separationDefinition.lineThickness) { - separator.style.paddingLeft = separationDefinition.spacing / 2 + "px"; - separator.style.marginRight = separationDefinition.spacing / 2 + "px"; - separator.style.borderRight = separationDefinition.lineThickness + "px solid " + color; - } else { - separator.style.width = separationDefinition.spacing + "px"; - } - } - separator.style.overflow = "hidden"; - separator.style.flex = "0 0 auto"; - return separator; - } else { - return void 0; - } - } - exports.renderSeparation = renderSeparation; - var CardElement = ( - /** @class */ - function(_super) { - __extends(CardElement2, _super); - function CardElement2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._truncatedDueToOverflow = false; - return _this; - } - Object.defineProperty(CardElement2.prototype, "lang", { - get: function() { - var lang = this.getValue(CardElement2.langProperty); - if (lang) { - return lang; - } else { - if (this.parent) { - return this.parent.lang; - } else { - return void 0; - } - } - }, - set: function(value) { - this.setValue(CardElement2.langProperty, value); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "isVisible", { - get: function() { - return this.getValue(CardElement2.isVisibleProperty); - }, - set: function(value) { - if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && !value) { - this.undoOverflowTruncation(); - } - if (this.isVisible !== value) { - this.setValue(CardElement2.isVisibleProperty, value); - this.updateRenderedElementVisibility(); - if (this._renderedElement) { - raiseElementVisibilityChangedEvent(this); - } - } - if (this._renderedElement) { - this._renderedElement.setAttribute("aria-expanded", value.toString()); - } - }, - enumerable: false, - configurable: true - }); - CardElement2.prototype.internalRenderSeparator = function() { - var renderedSeparator = renderSeparation(this.hostConfig, { - spacing: this.hostConfig.getEffectiveSpacing(this.spacing), - lineThickness: this.separator ? this.hostConfig.separator.lineThickness : void 0, - lineColor: this.separator ? this.hostConfig.separator.lineColor : void 0 - }, this.separatorOrientation); - if (shared_1.GlobalSettings.alwaysBleedSeparators && renderedSeparator && this.separatorOrientation === Enums.Orientation.Horizontal) { - var parentContainer = this.getParentContainer(); - if (parentContainer && parentContainer.getEffectivePadding()) { - var parentPhysicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(parentContainer.getEffectivePadding()); - renderedSeparator.style.marginLeft = "-" + parentPhysicalPadding.left + "px"; - renderedSeparator.style.marginRight = "-" + parentPhysicalPadding.right + "px"; - } - } - return renderedSeparator; - }; - CardElement2.prototype.updateRenderedElementVisibility = function() { - var displayMode = this.isDesignMode() || this.isVisible ? this._defaultRenderedElementDisplayMode : "none"; - if (this._renderedElement) { - if (displayMode) { - this._renderedElement.style.display = displayMode; - } else { - this._renderedElement.style.removeProperty("display"); - } - } - if (this._separatorElement) { - if (this.parent && this.parent.isFirstElement(this)) { - this._separatorElement.style.display = "none"; - } else { - if (displayMode) { - this._separatorElement.style.display = displayMode; - } else { - this._separatorElement.style.removeProperty("display"); - } - } - } - }; - CardElement2.prototype.hideElementDueToOverflow = function() { - if (this._renderedElement && this.isVisible) { - this._renderedElement.style.visibility = "hidden"; - this.isVisible = false; - raiseElementVisibilityChangedEvent(this, false); - } - }; - CardElement2.prototype.showElementHiddenDueToOverflow = function() { - if (this._renderedElement && !this.isVisible) { - this._renderedElement.style.removeProperty("visibility"); - this.isVisible = true; - raiseElementVisibilityChangedEvent(this, false); - } - }; - CardElement2.prototype.handleOverflow = function(maxHeight) { - if (this.isVisible || this.isHiddenDueToOverflow()) { - var handled = this.truncateOverflow(maxHeight); - this._truncatedDueToOverflow = handled || this._truncatedDueToOverflow; - if (!handled) { - this.hideElementDueToOverflow(); - } else if (handled && !this.isVisible) { - this.showElementHiddenDueToOverflow(); - } - } - }; - CardElement2.prototype.resetOverflow = function() { - var sizeChanged = false; - if (this._truncatedDueToOverflow) { - this.undoOverflowTruncation(); - this._truncatedDueToOverflow = false; - sizeChanged = true; - } - if (this.isHiddenDueToOverflow()) { - this.showElementHiddenDueToOverflow(); - } - return sizeChanged; - }; - CardElement2.prototype.getDefaultSerializationContext = function() { - return new SerializationContext(); - }; - CardElement2.prototype.createPlaceholderElement = function() { - var styleDefinition = this.getEffectiveStyleDefinition(); - var foregroundCssColor = Utils.stringToCssColor(styleDefinition.foregroundColors.default.subtle); - var element = document.createElement("div"); - element.style.border = "1px dashed " + foregroundCssColor; - element.style.padding = "4px"; - element.style.minHeight = "32px"; - element.style.fontSize = "10px"; - if (foregroundCssColor) { - element.style.color = foregroundCssColor; - } - element.innerText = "Empty " + this.getJsonTypeName(); - return element; - }; - CardElement2.prototype.adjustRenderedElementSize = function(renderedElement) { - if (this.height === "auto") { - renderedElement.style.flex = "0 0 auto"; - } else { - renderedElement.style.flex = "1 1 auto"; - } - }; - CardElement2.prototype.isDisplayed = function() { - return this._renderedElement !== void 0 && this.isVisible && this._renderedElement.offsetHeight > 0; - }; - CardElement2.prototype.overrideInternalRender = function() { - return this.internalRender(); - }; - CardElement2.prototype.applyPadding = function() { - if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) { - if (shared_1.GlobalSettings.alwaysBleedSeparators && !this.isBleeding()) { - var padding = new shared_1.PaddingDefinition(); - this.getImmediateSurroundingPadding(padding); - var physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding); - this.separatorElement.style.marginLeft = "-" + physicalPadding.left + "px"; - this.separatorElement.style.marginRight = "-" + physicalPadding.right + "px"; - } else { - this.separatorElement.style.marginRight = "0"; - this.separatorElement.style.marginLeft = "0"; - } - } - }; - CardElement2.prototype.truncateOverflow = function(_maxHeight) { - return false; - }; - CardElement2.prototype.undoOverflowTruncation = function() { - return; - }; - CardElement2.prototype.getDefaultPadding = function() { - return new shared_1.PaddingDefinition(); - }; - CardElement2.prototype.getHasBackground = function(ignoreBackgroundImages) { - if (ignoreBackgroundImages === void 0) { - ignoreBackgroundImages = false; - } - return false; - }; - CardElement2.prototype.getHasBorder = function() { - return false; - }; - CardElement2.prototype.getPadding = function() { - return this._padding; - }; - CardElement2.prototype.setPadding = function(value) { - this._padding = value; - }; - CardElement2.prototype.shouldSerialize = function(context) { - return context.elementRegistry.findByName(this.getJsonTypeName()) !== void 0; - }; - Object.defineProperty(CardElement2.prototype, "useDefaultSizing", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "separatorOrientation", { - get: function() { - return Enums.Orientation.Horizontal; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "defaultStyle", { - get: function() { - return Enums.ContainerStyle.Default; - }, - enumerable: false, - configurable: true - }); - CardElement2.prototype.parse = function(source, context) { - _super.prototype.parse.call(this, source, context ? context : new SerializationContext()); - }; - CardElement2.prototype.asString = function() { - return ""; - }; - CardElement2.prototype.isBleeding = function() { - return false; - }; - CardElement2.prototype.getEffectiveStyle = function() { - if (this.parent) { - return this.parent.getEffectiveStyle(); - } - return this.defaultStyle; - }; - CardElement2.prototype.getEffectiveStyleDefinition = function() { - return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle()); - }; - CardElement2.prototype.getEffectiveTextStyleDefinition = function() { - if (this.parent) { - return this.parent.getEffectiveTextStyleDefinition(); - } - return this.hostConfig.textStyles.default; - }; - CardElement2.prototype.getForbiddenActionTypes = function() { - return []; - }; - CardElement2.prototype.getImmediateSurroundingPadding = function(result, processTop, processRight, processBottom, processLeft) { - if (processTop === void 0) { - processTop = true; - } - if (processRight === void 0) { - processRight = true; - } - if (processBottom === void 0) { - processBottom = true; - } - if (processLeft === void 0) { - processLeft = true; - } - if (this.parent) { - var doProcessTop = processTop && this.parent.isTopElement(this); - var doProcessRight = processRight && this.parent.isRightMostElement(this); - var doProcessBottom = processBottom && this.parent.isBottomElement(this); - var doProcessLeft = processLeft && this.parent.isLeftMostElement(this); - var effectivePadding = this.parent.getEffectivePadding(); - if (effectivePadding) { - if (doProcessTop && effectivePadding.top !== Enums.Spacing.None) { - result.top = effectivePadding.top; - doProcessTop = false; - } - if (doProcessRight && effectivePadding.right !== Enums.Spacing.None) { - result.right = effectivePadding.right; - doProcessRight = false; - } - if (doProcessBottom && effectivePadding.bottom !== Enums.Spacing.None) { - result.bottom = effectivePadding.bottom; - doProcessBottom = false; - } - if (doProcessLeft && effectivePadding.left !== Enums.Spacing.None) { - result.left = effectivePadding.left; - doProcessLeft = false; - } - } - if (doProcessTop || doProcessRight || doProcessBottom || doProcessLeft) { - this.parent.getImmediateSurroundingPadding(result, doProcessTop, doProcessRight, doProcessBottom, doProcessLeft); - } - } - }; - CardElement2.prototype.getActionCount = function() { - return 0; - }; - CardElement2.prototype.getActionAt = function(index) { - throw new Error(strings_1.Strings.errors.indexOutOfRange(index)); - }; - CardElement2.prototype.indexOfAction = function(action) { - for (var i = 0; i < this.getActionCount(); i++) { - if (this.getActionAt(i) === action) { - return i; - } - } - return -1; - }; - CardElement2.prototype.remove = function() { - if (this.parent && this.parent instanceof CardElementContainer) { - return this.parent.removeItem(this); - } - return false; - }; - CardElement2.prototype.render = function() { - this._renderedElement = this.overrideInternalRender(); - this._separatorElement = this.internalRenderSeparator(); - if (this._renderedElement) { - if (this.id) { - this._renderedElement.id = this.id; - } - if (this.customCssSelector) { - this._renderedElement.classList.add(this.customCssSelector); - } - this._renderedElement.style.boxSizing = "border-box"; - this._defaultRenderedElementDisplayMode = this._renderedElement.style.display ? this._renderedElement.style.display : void 0; - this.adjustRenderedElementSize(this._renderedElement); - this.updateLayout(false); - } else if (this.isDesignMode()) { - this._renderedElement = this.createPlaceholderElement(); - } - this.getRootElement().updateActionsEnabledState(); - return this._renderedElement; - }; - CardElement2.prototype.updateLayout = function(_processChildren) { - if (_processChildren === void 0) { - _processChildren = true; - } - this.updateRenderedElementVisibility(); - this.applyPadding(); - }; - CardElement2.prototype.updateActionsEnabledState = function() { - var allActions = this.getRootElement().getAllActions(); - for (var _i = 0, allActions_1 = allActions; _i < allActions_1.length; _i++) { - var action = allActions_1[_i]; - action.updateEnabledState(); - } - }; - CardElement2.prototype.indexOf = function(_cardElement) { - return -1; - }; - CardElement2.prototype.isDesignMode = function() { - var rootElement = this.getRootElement(); - return rootElement instanceof AdaptiveCard && rootElement.designMode; - }; - CardElement2.prototype.isFirstElement = function(_element) { - return true; - }; - CardElement2.prototype.isLastElement = function(_element) { - return true; - }; - CardElement2.prototype.isAtTheVeryLeft = function() { - return this.parent ? this.parent.isLeftMostElement(this) && this.parent.isAtTheVeryLeft() : true; - }; - CardElement2.prototype.isAtTheVeryRight = function() { - return this.parent ? this.parent.isRightMostElement(this) && this.parent.isAtTheVeryRight() : true; - }; - CardElement2.prototype.isAtTheVeryTop = function() { - return this.parent ? this.parent.isFirstElement(this) && this.parent.isAtTheVeryTop() : true; - }; - CardElement2.prototype.isAtTheVeryBottom = function() { - return this.parent ? this.parent.isLastElement(this) && this.parent.isAtTheVeryBottom() : true; - }; - CardElement2.prototype.isBleedingAtTop = function() { - return false; - }; - CardElement2.prototype.isBleedingAtBottom = function() { - return false; - }; - CardElement2.prototype.isLeftMostElement = function(_element) { - return true; - }; - CardElement2.prototype.isRightMostElement = function(_element) { - return true; - }; - CardElement2.prototype.isTopElement = function(element) { - return this.isFirstElement(element); - }; - CardElement2.prototype.isBottomElement = function(element) { - return this.isLastElement(element); - }; - CardElement2.prototype.isHiddenDueToOverflow = function() { - return this._renderedElement !== void 0 && this._renderedElement.style.visibility === "hidden"; - }; - CardElement2.prototype.getRootElement = function() { - return this.getRootObject(); - }; - CardElement2.prototype.getParentContainer = function() { - var currentElement = this.parent; - while (currentElement) { - if (currentElement instanceof Container) { - return currentElement; - } - currentElement = currentElement.parent; - } - return void 0; - }; - CardElement2.prototype.getAllInputs = function(processActions) { - if (processActions === void 0) { - processActions = true; - } - return []; - }; - CardElement2.prototype.getAllActions = function() { - var result = []; - for (var i = 0; i < this.getActionCount(); i++) { - var action = this.getActionAt(i); - if (action) { - result.push(action); - } - } - return result; - }; - CardElement2.prototype.getResourceInformation = function() { - return []; - }; - CardElement2.prototype.getElementById = function(id) { - return this.id === id ? this : void 0; - }; - CardElement2.prototype.getActionById = function(_id) { - return void 0; - }; - CardElement2.prototype.getEffectivePadding = function() { - var padding = this.getPadding(); - return padding ? padding : this.getDefaultPadding(); - }; - CardElement2.prototype.getEffectiveHorizontalAlignment = function() { - if (this.horizontalAlignment !== void 0) { - return this.horizontalAlignment; - } - if (this.parent) { - return this.parent.getEffectiveHorizontalAlignment(); - } - return Enums.HorizontalAlignment.Left; - }; - Object.defineProperty(CardElement2.prototype, "hostConfig", { - get: function() { - if (this._hostConfig) { - return this._hostConfig; - } else { - if (this.parent) { - return this.parent.hostConfig; - } else { - return host_config_1.defaultHostConfig; - } - } - }, - set: function(value) { - this._hostConfig = value; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "index", { - get: function() { - if (this.parent) { - return this.parent.indexOf(this); - } else { - return 0; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "isInteractive", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "isStandalone", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "isInline", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "hasVisibleSeparator", { - get: function() { - if (this.parent && this.separatorElement) { - return !this.parent.isFirstElement(this) && (this.isVisible || this.isDesignMode()); - } else { - return false; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "separatorElement", { - get: function() { - return this._separatorElement; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CardElement2.prototype, "parent", { - get: function() { - return this._parent; - }, - enumerable: false, - configurable: true - }); - CardElement2.prototype.getElementSingletonBehavior = function() { - return registry_1.ElementSingletonBehavior.NotAllowed; - }; - CardElement2.langProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "lang", true, /^[a-z]{2,3}$/gi); - CardElement2.isVisibleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "isVisible", true); - CardElement2.separatorProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "separator", false); - CardElement2.heightProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_1, "height", [{ value: "auto" }, { value: "stretch" }], "auto"); - CardElement2.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "horizontalAlignment", Enums.HorizontalAlignment); - CardElement2.spacingProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "spacing", Enums.Spacing, Enums.Spacing.Default); - __decorate([ - (0, serialization_1.property)(CardElement2.horizontalAlignmentProperty) - ], CardElement2.prototype, "horizontalAlignment", void 0); - __decorate([ - (0, serialization_1.property)(CardElement2.spacingProperty) - ], CardElement2.prototype, "spacing", void 0); - __decorate([ - (0, serialization_1.property)(CardElement2.separatorProperty) - ], CardElement2.prototype, "separator", void 0); - __decorate([ - (0, serialization_1.property)(CardElement2.heightProperty) - ], CardElement2.prototype, "height", void 0); - __decorate([ - (0, serialization_1.property)(CardElement2.langProperty) - ], CardElement2.prototype, "lang", null); - __decorate([ - (0, serialization_1.property)(CardElement2.isVisibleProperty) - ], CardElement2.prototype, "isVisible", null); - return CardElement2; - }(card_object_1.CardObject) - ); - exports.CardElement = CardElement; - var ActionProperty = ( - /** @class */ - function(_super) { - __extends(ActionProperty2, _super); - function ActionProperty2(targetVersion, name, forbiddenActionTypes) { - if (forbiddenActionTypes === void 0) { - forbiddenActionTypes = []; - } - var _this = _super.call(this, targetVersion, name, void 0) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.forbiddenActionTypes = forbiddenActionTypes; - return _this; - } - ActionProperty2.prototype.parse = function(sender, source, context) { - var parent = sender; - return context.parseAction(parent, source[this.name], this.forbiddenActionTypes, parent.isDesignMode()); - }; - ActionProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeValue(target, this.name, value ? value.toJSON(context) : void 0, void 0, true); - }; - return ActionProperty2; - }(serialization_1.PropertyDefinition) - ); - exports.ActionProperty = ActionProperty; - var BaseTextBlock = ( - /** @class */ - function(_super) { - __extends(BaseTextBlock2, _super); - function BaseTextBlock2(text) { - var _this = _super.call(this) || this; - _this.ariaHidden = false; - if (text) { - _this.text = text; - } - return _this; - } - BaseTextBlock2.prototype.populateSchema = function(schema) { - _super.prototype.populateSchema.call(this, schema); - schema.remove(BaseTextBlock2.selectActionProperty); - }; - Object.defineProperty(BaseTextBlock2.prototype, "text", { - get: function() { - return this.getValue(BaseTextBlock2.textProperty); - }, - set: function(value) { - this.setText(value); - }, - enumerable: false, - configurable: true - }); - BaseTextBlock2.prototype.getFontSize = function(fontType) { - switch (this.effectiveSize) { - case Enums.TextSize.Small: - return fontType.fontSizes.small; - case Enums.TextSize.Medium: - return fontType.fontSizes.medium; - case Enums.TextSize.Large: - return fontType.fontSizes.large; - case Enums.TextSize.ExtraLarge: - return fontType.fontSizes.extraLarge; - default: - return fontType.fontSizes.default; - } - }; - BaseTextBlock2.prototype.getColorDefinition = function(colorSet, color) { - switch (color) { - case Enums.TextColor.Accent: - return colorSet.accent; - case Enums.TextColor.Dark: - return colorSet.dark; - case Enums.TextColor.Light: - return colorSet.light; - case Enums.TextColor.Good: - return colorSet.good; - case Enums.TextColor.Warning: - return colorSet.warning; - case Enums.TextColor.Attention: - return colorSet.attention; - default: - return colorSet.default; - } - }; - BaseTextBlock2.prototype.setText = function(value) { - this.setValue(BaseTextBlock2.textProperty, value); - }; - BaseTextBlock2.prototype.init = function(textDefinition) { - this.size = textDefinition.size; - this.weight = textDefinition.weight; - this.color = textDefinition.color; - this.isSubtle = textDefinition.isSubtle; - }; - BaseTextBlock2.prototype.asString = function() { - return this.text; - }; - BaseTextBlock2.prototype.applyStylesTo = function(targetElement) { - var fontType = this.hostConfig.getFontTypeDefinition(this.effectiveFontType); - if (fontType.fontFamily) { - targetElement.style.fontFamily = fontType.fontFamily; - } - var fontSize; - switch (this.effectiveSize) { - case Enums.TextSize.Small: - fontSize = fontType.fontSizes.small; - break; - case Enums.TextSize.Medium: - fontSize = fontType.fontSizes.medium; - break; - case Enums.TextSize.Large: - fontSize = fontType.fontSizes.large; - break; - case Enums.TextSize.ExtraLarge: - fontSize = fontType.fontSizes.extraLarge; - break; - default: - fontSize = fontType.fontSizes.default; - break; - } - targetElement.style.fontSize = fontSize + "px"; - var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor); - var targetColor = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.subtle : colorDefinition.default); - if (targetColor) { - targetElement.style.color = targetColor; - } - var fontWeight; - switch (this.effectiveWeight) { - case Enums.TextWeight.Lighter: - fontWeight = fontType.fontWeights.lighter; - break; - case Enums.TextWeight.Bolder: - fontWeight = fontType.fontWeights.bolder; - break; - default: - fontWeight = fontType.fontWeights.default; - break; - } - targetElement.style.fontWeight = fontWeight.toString(); - if (this.ariaHidden) { - targetElement.setAttribute("aria-hidden", "true"); - } - }; - BaseTextBlock2.prototype.getAllActions = function() { - var result = _super.prototype.getAllActions.call(this); - if (this.selectAction) { - result.push(this.selectAction); - } - return result; - }; - Object.defineProperty(BaseTextBlock2.prototype, "effectiveColor", { - get: function() { - return this.color !== void 0 ? this.color : this.getEffectiveTextStyleDefinition().color; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(BaseTextBlock2.prototype, "effectiveFontType", { - get: function() { - return this.fontType !== void 0 ? this.fontType : this.getEffectiveTextStyleDefinition().fontType; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(BaseTextBlock2.prototype, "effectiveIsSubtle", { - get: function() { - return this.isSubtle !== void 0 ? this.isSubtle : this.getEffectiveTextStyleDefinition().isSubtle; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(BaseTextBlock2.prototype, "effectiveSize", { - get: function() { - return this.size !== void 0 ? this.size : this.getEffectiveTextStyleDefinition().size; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(BaseTextBlock2.prototype, "effectiveWeight", { - get: function() { - return this.weight !== void 0 ? this.weight : this.getEffectiveTextStyleDefinition().weight; - }, - enumerable: false, - configurable: true - }); - BaseTextBlock2.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "text", true); - BaseTextBlock2.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "size", Enums.TextSize); - BaseTextBlock2.weightProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "weight", Enums.TextWeight); - BaseTextBlock2.colorProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "color", Enums.TextColor); - BaseTextBlock2.isSubtleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "isSubtle"); - BaseTextBlock2.fontTypeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, "fontType", Enums.FontType); - BaseTextBlock2.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, "selectAction", [ - "Action.ShowCard" - ]); - __decorate([ - (0, serialization_1.property)(BaseTextBlock2.sizeProperty) - ], BaseTextBlock2.prototype, "size", void 0); - __decorate([ - (0, serialization_1.property)(BaseTextBlock2.weightProperty) - ], BaseTextBlock2.prototype, "weight", void 0); - __decorate([ - (0, serialization_1.property)(BaseTextBlock2.colorProperty) - ], BaseTextBlock2.prototype, "color", void 0); - __decorate([ - (0, serialization_1.property)(BaseTextBlock2.fontTypeProperty) - ], BaseTextBlock2.prototype, "fontType", void 0); - __decorate([ - (0, serialization_1.property)(BaseTextBlock2.isSubtleProperty) - ], BaseTextBlock2.prototype, "isSubtle", void 0); - __decorate([ - (0, serialization_1.property)(BaseTextBlock2.textProperty) - ], BaseTextBlock2.prototype, "text", null); - __decorate([ - (0, serialization_1.property)(BaseTextBlock2.selectActionProperty) - ], BaseTextBlock2.prototype, "selectAction", void 0); - return BaseTextBlock2; - }(CardElement) - ); - exports.BaseTextBlock = BaseTextBlock; - var TextBlock = ( - /** @class */ - function(_super) { - __extends(TextBlock2, _super); - function TextBlock2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.wrap = false; - _this._treatAsPlainText = true; - _this.useMarkdown = true; - return _this; - } - TextBlock2.prototype.restoreOriginalContent = function() { - var _a2, _b2; - if (this.renderedElement !== void 0) { - if (this.maxLines && this.maxLines > 0) { - this.renderedElement.style.maxHeight = this._computedLineHeight * this.maxLines + "px"; - } - var originalHtml = (_b2 = (_a2 = TextBlock2._ttRoundtripPolicy) === null || _a2 === void 0 ? void 0 : _a2.createHTML(this._originalInnerHtml)) !== null && _b2 !== void 0 ? _b2 : this._originalInnerHtml; - this.renderedElement.innerHTML = originalHtml; - } - }; - TextBlock2.prototype.truncateIfSupported = function(maxHeight) { - if (this.renderedElement !== void 0) { - var children = this.renderedElement.children; - var isTextOnly = !children.length; - var truncationSupported = isTextOnly || children.length === 1 && children[0].tagName.toLowerCase() === "p" && !children[0].children.length; - if (truncationSupported) { - var element = isTextOnly ? this.renderedElement : children[0]; - Utils.truncateText(element, maxHeight, this._computedLineHeight); - return true; - } - } - return false; - }; - TextBlock2.prototype.setText = function(value) { - _super.prototype.setText.call(this, value); - this._processedText = void 0; - }; - TextBlock2.prototype.internalRender = function() { - var _this = this; - var _a2, _b2; - this._processedText = void 0; - if (this.text) { - var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty); - var hostConfig = this.hostConfig; - var element = void 0; - if (this.forElementId) { - var labelElement = document.createElement("label"); - labelElement.htmlFor = this.forElementId; - element = labelElement; - } else { - element = document.createElement("div"); - } - element.classList.add(hostConfig.makeCssClassName("ac-textBlock")); - element.style.overflow = "hidden"; - this.applyStylesTo(element); - if (this.style === "heading") { - element.setAttribute("role", "heading"); - var headingLevel = this.hostConfig.textBlock.headingLevel; - if (headingLevel !== void 0 && headingLevel > 0) { - element.setAttribute("aria-level", headingLevel.toString()); - } - } - if (this.selectAction && hostConfig.supportsInteractivity) { - element.onclick = function(e) { - if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) { - e.preventDefault(); - e.cancelBubble = true; - _this.selectAction.execute(); - } - }; - this.selectAction.setupElementForAccessibility(element); - if (this.selectAction.isEffectivelyEnabled()) { - element.classList.add(hostConfig.makeCssClassName("ac-selectable")); - } - } - if (!this._processedText) { - this._treatAsPlainText = true; - var formattedText = TextFormatters.formatText(this.lang, preProcessedText); - if (this.useMarkdown && formattedText) { - if (shared_1.GlobalSettings.allowMarkForTextHighlighting) { - formattedText = formattedText.replace(//g, "===").replace(/<\/mark>/g, "/==/"); - } - var markdownProcessingResult = AdaptiveCard.applyMarkdown(formattedText); - if (markdownProcessingResult.didProcess && markdownProcessingResult.outputHtml) { - this._processedText = markdownProcessingResult.outputHtml; - this._treatAsPlainText = false; - if (shared_1.GlobalSettings.allowMarkForTextHighlighting && this._processedText) { - var markStyle = ""; - var effectiveStyle = this.getEffectiveStyleDefinition(); - if (effectiveStyle.highlightBackgroundColor) { - markStyle += "background-color: " + effectiveStyle.highlightBackgroundColor + ";"; - } - if (effectiveStyle.highlightForegroundColor) { - markStyle += "color: " + effectiveStyle.highlightForegroundColor + ";"; - } - if (markStyle) { - markStyle = 'style="' + markStyle + '"'; - } - this._processedText = this._processedText.replace(/===/g, "").replace(/\/==\//g, ""); - } - } else { - this._processedText = formattedText; - this._treatAsPlainText = true; - } - } else { - this._processedText = formattedText; - this._treatAsPlainText = true; - } - } - if (!this._processedText) { - this._processedText = ""; - } - if (this._treatAsPlainText) { - element.innerText = this._processedText; - } else { - var processedHtml = (_b2 = (_a2 = TextBlock2._ttMarkdownPolicy) === null || _a2 === void 0 ? void 0 : _a2.createHTML(this._processedText)) !== null && _b2 !== void 0 ? _b2 : this._processedText; - element.innerHTML = processedHtml; - } - if (element.firstElementChild instanceof HTMLElement) { - var firstElementChild = element.firstElementChild; - firstElementChild.style.marginTop = "0px"; - firstElementChild.style.width = "100%"; - if (!this.wrap) { - firstElementChild.style.overflow = "hidden"; - firstElementChild.style.textOverflow = "ellipsis"; - } - } - if (element.lastElementChild instanceof HTMLElement) { - element.lastElementChild.style.marginBottom = "0px"; - } - var anchors = element.getElementsByTagName("a"); - var _loop_1 = function(anchor2) { - anchor2.classList.add(hostConfig.makeCssClassName("ac-anchor")); - anchor2.target = "_blank"; - anchor2.onclick = function(e) { - if (raiseAnchorClickedEvent(_this, anchor2, e)) { - e.preventDefault(); - e.cancelBubble = true; - } - }; - anchor2.oncontextmenu = function(e) { - if (raiseAnchorClickedEvent(_this, anchor2, e)) { - e.preventDefault(); - e.cancelBubble = true; - return false; - } - return true; - }; - }; - for (var _i = 0, _c = Array.from(anchors); _i < _c.length; _i++) { - var anchor = _c[_i]; - _loop_1(anchor); - } - if (this.wrap) { - element.style.wordWrap = "break-word"; - if (this.maxLines && this.maxLines > 0) { - element.style.overflow = "hidden"; - if (Utils.isInternetExplorer() || !shared_1.GlobalSettings.useWebkitLineClamp) { - element.style.maxHeight = this._computedLineHeight * this.maxLines + "px"; - } else { - element.style.removeProperty("line-height"); - element.style.display = "-webkit-box"; - element.style.webkitBoxOrient = "vertical"; - element.style.webkitLineClamp = this.maxLines.toString(); - } - } - } else { - element.style.whiteSpace = "nowrap"; - element.style.textOverflow = "ellipsis"; - } - if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation || shared_1.GlobalSettings.useAdvancedCardBottomTruncation) { - this._originalInnerHtml = element.innerHTML; - } - return element; - } else { - return void 0; - } - }; - TextBlock2.prototype.truncateOverflow = function(maxHeight) { - if (maxHeight >= this._computedLineHeight) { - return this.truncateIfSupported(maxHeight); - } - return false; - }; - TextBlock2.prototype.undoOverflowTruncation = function() { - this.restoreOriginalContent(); - if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines) { - var maxHeight = this._computedLineHeight * this.maxLines; - this.truncateIfSupported(maxHeight); - } - }; - TextBlock2.prototype.applyStylesTo = function(targetElement) { - _super.prototype.applyStylesTo.call(this, targetElement); - switch (this.getEffectiveHorizontalAlignment()) { - case Enums.HorizontalAlignment.Center: - targetElement.style.textAlign = "center"; - break; - case Enums.HorizontalAlignment.Right: - targetElement.style.textAlign = "end"; - break; - default: - targetElement.style.textAlign = "start"; - break; - } - var lineHeights = this.hostConfig.lineHeights; - if (lineHeights) { - switch (this.effectiveSize) { - case Enums.TextSize.Small: - this._computedLineHeight = lineHeights.small; - break; - case Enums.TextSize.Medium: - this._computedLineHeight = lineHeights.medium; - break; - case Enums.TextSize.Large: - this._computedLineHeight = lineHeights.large; - break; - case Enums.TextSize.ExtraLarge: - this._computedLineHeight = lineHeights.extraLarge; - break; - default: - this._computedLineHeight = lineHeights.default; - break; - } - } else { - this._computedLineHeight = this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType)) * 1.33; - } - targetElement.style.lineHeight = this._computedLineHeight + "px"; - }; - TextBlock2.prototype.getJsonTypeName = function() { - return "TextBlock"; - }; - TextBlock2.prototype.getEffectiveTextStyleDefinition = function() { - if (this.style) { - return this.hostConfig.textStyles.getStyleByName(this.style); - } - return _super.prototype.getEffectiveTextStyleDefinition.call(this); - }; - TextBlock2.prototype.updateLayout = function(processChildren) { - if (processChildren === void 0) { - processChildren = false; - } - _super.prototype.updateLayout.call(this, processChildren); - if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines && this.isDisplayed()) { - this.restoreOriginalContent(); - this.truncateIfSupported(this._computedLineHeight * this.maxLines); - } - }; - var _a, _b; - TextBlock2.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "wrap", false); - TextBlock2.maxLinesProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "maxLines"); - TextBlock2.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, "style", [ - { value: "default" }, - { value: "columnHeader" }, - { value: "heading" } - ]); - TextBlock2._ttMarkdownPolicy = typeof window === "undefined" ? void 0 : (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy("adaptivecards#markdownPassthroughPolicy", { createHTML: function(value) { - return value; - } }); - TextBlock2._ttRoundtripPolicy = typeof window === "undefined" ? void 0 : (_b = window.trustedTypes) === null || _b === void 0 ? void 0 : _b.createPolicy("adaptivecards#restoreContentsPolicy", { createHTML: function(value) { - return value; - } }); - __decorate([ - (0, serialization_1.property)(TextBlock2.wrapProperty) - ], TextBlock2.prototype, "wrap", void 0); - __decorate([ - (0, serialization_1.property)(TextBlock2.maxLinesProperty) - ], TextBlock2.prototype, "maxLines", void 0); - __decorate([ - (0, serialization_1.property)(TextBlock2.styleProperty) - ], TextBlock2.prototype, "style", void 0); - return TextBlock2; - }(BaseTextBlock) - ); - exports.TextBlock = TextBlock; - var TextRun = ( - /** @class */ - function(_super) { - __extends(TextRun2, _super); - function TextRun2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.italic = false; - _this.strikethrough = false; - _this.highlight = false; - _this.underline = false; - return _this; - } - TextRun2.prototype.populateSchema = function(schema) { - _super.prototype.populateSchema.call(this, schema); - schema.add(BaseTextBlock.selectActionProperty); - }; - TextRun2.prototype.internalRender = function() { - var _this = this; - if (this.text) { - var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty); - var hostConfig = this.hostConfig; - var formattedText = TextFormatters.formatText(this.lang, preProcessedText); - if (!formattedText) { - formattedText = ""; - } - var element = document.createElement("span"); - element.classList.add(hostConfig.makeCssClassName("ac-textRun")); - this.applyStylesTo(element); - if (this.selectAction && hostConfig.supportsInteractivity) { - var anchor = document.createElement("a"); - anchor.classList.add(hostConfig.makeCssClassName("ac-anchor")); - var href = this.selectAction.getHref(); - anchor.href = href ? href : ""; - anchor.target = "_blank"; - anchor.onclick = function(e) { - if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) { - e.preventDefault(); - e.cancelBubble = true; - _this.selectAction.execute(); - } - }; - this.selectAction.setupElementForAccessibility(anchor); - anchor.innerText = formattedText; - element.appendChild(anchor); - } else { - element.innerText = formattedText; - } - return element; - } else { - return void 0; - } - }; - TextRun2.prototype.applyStylesTo = function(targetElement) { - _super.prototype.applyStylesTo.call(this, targetElement); - if (this.italic) { - targetElement.style.fontStyle = "italic"; - } - if (this.strikethrough) { - targetElement.style.textDecoration = "line-through"; - } - if (this.highlight) { - var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor); - var backgroundColor = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.highlightColors.subtle : colorDefinition.highlightColors.default); - if (backgroundColor) { - targetElement.style.backgroundColor = backgroundColor; - } - } - if (this.underline) { - targetElement.style.textDecoration = "underline"; - } - }; - TextRun2.prototype.getJsonTypeName = function() { - return "TextRun"; - }; - Object.defineProperty(TextRun2.prototype, "isStandalone", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(TextRun2.prototype, "isInline", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - TextRun2.italicProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "italic", false); - TextRun2.strikethroughProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "strikethrough", false); - TextRun2.highlightProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "highlight", false); - TextRun2.underlineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, "underline", false); - __decorate([ - (0, serialization_1.property)(TextRun2.italicProperty) - ], TextRun2.prototype, "italic", void 0); - __decorate([ - (0, serialization_1.property)(TextRun2.strikethroughProperty) - ], TextRun2.prototype, "strikethrough", void 0); - __decorate([ - (0, serialization_1.property)(TextRun2.highlightProperty) - ], TextRun2.prototype, "highlight", void 0); - __decorate([ - (0, serialization_1.property)(TextRun2.underlineProperty) - ], TextRun2.prototype, "underline", void 0); - return TextRun2; - }(BaseTextBlock) - ); - exports.TextRun = TextRun; - var RichTextBlock = ( - /** @class */ - function(_super) { - __extends(RichTextBlock2, _super); - function RichTextBlock2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._inlines = []; - return _this; - } - RichTextBlock2.prototype.internalAddInline = function(inline, forceAdd) { - if (forceAdd === void 0) { - forceAdd = false; - } - if (!inline.isInline) { - throw new Error(strings_1.Strings.errors.elementCannotBeUsedAsInline()); - } - var doAdd = inline.parent === void 0 || forceAdd; - if (!doAdd && inline.parent !== this) { - throw new Error(strings_1.Strings.errors.inlineAlreadyParented()); - } else { - inline.setParent(this); - this._inlines.push(inline); - } - }; - RichTextBlock2.prototype.internalParse = function(source, context) { - _super.prototype.internalParse.call(this, source, context); - this._inlines = []; - if (Array.isArray(source["inlines"])) { - for (var _i = 0, _a = source["inlines"]; _i < _a.length; _i++) { - var jsonInline = _a[_i]; - var inline = void 0; - if (typeof jsonInline === "string") { - var textRun = new TextRun(); - textRun.text = jsonInline; - inline = textRun; - } else { - inline = context.parseElement(this, jsonInline, [], false); - } - if (inline) { - this.internalAddInline(inline, true); - } - } - } - }; - RichTextBlock2.prototype.internalToJSON = function(target, context) { - _super.prototype.internalToJSON.call(this, target, context); - if (this._inlines.length > 0) { - var jsonInlines = []; - for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) { - var inline = _a[_i]; - jsonInlines.push(inline.toJSON(context)); - } - context.serializeValue(target, "inlines", jsonInlines); - } - }; - RichTextBlock2.prototype.internalRender = function() { - if (this._inlines.length > 0) { - var element = void 0; - if (this.forElementId) { - var labelElement = document.createElement("label"); - labelElement.htmlFor = this.forElementId; - element = labelElement; - } else { - element = document.createElement("div"); - } - element.className = this.hostConfig.makeCssClassName("ac-richTextBlock"); - switch (this.getEffectiveHorizontalAlignment()) { - case Enums.HorizontalAlignment.Center: - element.style.textAlign = "center"; - break; - case Enums.HorizontalAlignment.Right: - element.style.textAlign = "end"; - break; - default: - element.style.textAlign = "start"; - break; - } - var renderedInlines = 0; - for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) { - var inline = _a[_i]; - var renderedInline = inline.render(); - if (renderedInline) { - element.appendChild(renderedInline); - renderedInlines++; - } - } - if (renderedInlines > 0) { - return element; - } - } - return void 0; - }; - RichTextBlock2.prototype.asString = function() { - var result = ""; - for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) { - var inline = _a[_i]; - result += inline.asString(); - } - return result; - }; - RichTextBlock2.prototype.getJsonTypeName = function() { - return "RichTextBlock"; - }; - RichTextBlock2.prototype.getInlineCount = function() { - return this._inlines.length; - }; - RichTextBlock2.prototype.getInlineAt = function(index) { - if (index >= 0 && index < this._inlines.length) { - return this._inlines[index]; - } else { - throw new Error(strings_1.Strings.errors.indexOutOfRange(index)); - } - }; - RichTextBlock2.prototype.addInline = function(inline) { - if (typeof inline === "string") { - this.internalAddInline(new TextRun(inline)); - } else { - this.internalAddInline(inline); - } - }; - RichTextBlock2.prototype.removeInline = function(inline) { - var index = this._inlines.indexOf(inline); - if (index >= 0) { - this._inlines[index].setParent(void 0); - this._inlines.splice(index, 1); - return true; - } - return false; - }; - return RichTextBlock2; - }(CardElement) - ); - exports.RichTextBlock = RichTextBlock; - var Fact = ( - /** @class */ - function(_super) { - __extends(Fact2, _super); - function Fact2(name, value) { - var _this = _super.call(this) || this; - _this.name = name; - _this.value = value; - return _this; - } - Fact2.prototype.getSchemaKey = function() { - return "Fact"; - }; - Fact2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "title"); - Fact2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value"); - __decorate([ - (0, serialization_1.property)(Fact2.titleProperty) - ], Fact2.prototype, "name", void 0); - __decorate([ - (0, serialization_1.property)(Fact2.valueProperty) - ], Fact2.prototype, "value", void 0); - return Fact2; - }(serialization_1.SerializableObject) - ); - exports.Fact = Fact; - var FactSet = ( - /** @class */ - function(_super) { - __extends(FactSet2, _super); - function FactSet2() { - return _super !== null && _super.apply(this, arguments) || this; - } - Object.defineProperty(FactSet2.prototype, "useDefaultSizing", { - //#endregion - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - FactSet2.prototype.internalRender = function() { - var element = void 0; - var hostConfig = this.hostConfig; - if (this.facts.length > 0) { - element = document.createElement("table"); - element.style.borderWidth = "0px"; - element.style.borderSpacing = "0px"; - element.style.borderStyle = "none"; - element.style.borderCollapse = "collapse"; - element.style.display = "block"; - element.style.overflow = "hidden"; - element.classList.add(hostConfig.makeCssClassName("ac-factset")); - element.setAttribute("role", "presentation"); - for (var i = 0; i < this.facts.length; i++) { - var trElement = document.createElement("tr"); - if (i > 0) { - trElement.style.marginTop = hostConfig.factSet.spacing + "px"; - } - var tdElement = document.createElement("td"); - tdElement.style.padding = "0"; - tdElement.classList.add(hostConfig.makeCssClassName("ac-fact-title")); - if (hostConfig.factSet.title.maxWidth) { - tdElement.style.maxWidth = hostConfig.factSet.title.maxWidth + "px"; - } - tdElement.style.verticalAlign = "top"; - var textBlock = new TextBlock(); - textBlock.setParent(this); - textBlock.text = !this.facts[i].name && this.isDesignMode() ? "Title" : this.facts[i].name; - textBlock.size = hostConfig.factSet.title.size; - textBlock.color = hostConfig.factSet.title.color; - textBlock.isSubtle = hostConfig.factSet.title.isSubtle; - textBlock.weight = hostConfig.factSet.title.weight; - textBlock.wrap = hostConfig.factSet.title.wrap; - textBlock.spacing = Enums.Spacing.None; - Utils.appendChild(tdElement, textBlock.render()); - Utils.appendChild(trElement, tdElement); - tdElement = document.createElement("td"); - tdElement.style.width = "10px"; - Utils.appendChild(trElement, tdElement); - tdElement = document.createElement("td"); - tdElement.style.padding = "0"; - tdElement.style.verticalAlign = "top"; - tdElement.classList.add(hostConfig.makeCssClassName("ac-fact-value")); - textBlock = new TextBlock(); - textBlock.setParent(this); - textBlock.text = this.facts[i].value; - textBlock.size = hostConfig.factSet.value.size; - textBlock.color = hostConfig.factSet.value.color; - textBlock.isSubtle = hostConfig.factSet.value.isSubtle; - textBlock.weight = hostConfig.factSet.value.weight; - textBlock.wrap = hostConfig.factSet.value.wrap; - textBlock.spacing = Enums.Spacing.None; - Utils.appendChild(tdElement, textBlock.render()); - Utils.appendChild(trElement, tdElement); - Utils.appendChild(element, trElement); - } - } - return element; - }; - FactSet2.prototype.getJsonTypeName = function() { - return "FactSet"; - }; - FactSet2.factsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, "facts", Fact); - __decorate([ - (0, serialization_1.property)(FactSet2.factsProperty) - ], FactSet2.prototype, "facts", void 0); - return FactSet2; - }(CardElement) - ); - exports.FactSet = FactSet; - var ImageDimensionProperty = ( - /** @class */ - function(_super) { - __extends(ImageDimensionProperty2, _super); - function ImageDimensionProperty2(targetVersion, name, internalName, fallbackProperty) { - var _this = _super.call(this, targetVersion, name) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.internalName = internalName; - _this.fallbackProperty = fallbackProperty; - return _this; - } - ImageDimensionProperty2.prototype.getInternalName = function() { - return this.internalName; - }; - ImageDimensionProperty2.prototype.parse = function(sender, source, context) { - var result = void 0; - var sourceValue = source[this.name]; - if (sourceValue === void 0) { - return this.defaultValue; - } - var isValid = false; - if (typeof sourceValue === "string") { - try { - var size = shared_1.SizeAndUnit.parse(sourceValue, true); - if (size.unit === Enums.SizeUnit.Pixel) { - result = size.physicalSize; - isValid = true; - } - } catch (_a) { - } - if (!isValid && this.fallbackProperty) { - isValid = this.fallbackProperty.isValidValue(sourceValue, context); - } - } - if (!isValid) { - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name)); - } - return result; - }; - ImageDimensionProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeValue(target, this.name, typeof value === "number" && !isNaN(value) ? value + "px" : void 0); - }; - return ImageDimensionProperty2; - }(serialization_1.PropertyDefinition) - ); - var Image = ( - /** @class */ - function(_super) { - __extends(Image2, _super); - function Image2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.size = Enums.Size.Auto; - _this.style = Enums.ImageStyle.Default; - return _this; - } - Image2.prototype.populateSchema = function(schema) { - _super.prototype.populateSchema.call(this, schema); - schema.remove(CardElement.heightProperty); - }; - Image2.prototype.applySize = function(element) { - if (this.pixelWidth || this.pixelHeight) { - if (this.pixelWidth) { - element.style.width = this.pixelWidth + "px"; - } - if (this.pixelHeight) { - element.style.height = this.pixelHeight + "px"; - } - } else { - if (this.maxHeight) { - switch (this.size) { - case Enums.Size.Small: - element.style.height = this.hostConfig.imageSizes.small + "px"; - break; - case Enums.Size.Large: - element.style.height = this.hostConfig.imageSizes.large + "px"; - break; - default: - element.style.height = this.hostConfig.imageSizes.medium + "px"; - break; - } - element.style.maxHeight = this.maxHeight + "px"; - } else { - switch (this.size) { - case Enums.Size.Stretch: - element.style.width = "100%"; - break; - case Enums.Size.Auto: - element.style.maxWidth = "100%"; - break; - case Enums.Size.Small: - element.style.width = this.hostConfig.imageSizes.small + "px"; - break; - case Enums.Size.Large: - element.style.width = this.hostConfig.imageSizes.large + "px"; - break; - case Enums.Size.Medium: - element.style.width = this.hostConfig.imageSizes.medium + "px"; - break; - } - element.style.maxHeight = "100%"; - } - } - }; - Object.defineProperty(Image2.prototype, "useDefaultSizing", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - Image2.prototype.internalRender = function() { - var _this = this; - var element = void 0; - if (this.url) { - element = document.createElement("div"); - element.style.display = "flex"; - element.style.alignItems = "flex-start"; - var hostConfig = this.hostConfig; - switch (this.getEffectiveHorizontalAlignment()) { - case Enums.HorizontalAlignment.Center: - element.style.justifyContent = "center"; - break; - case Enums.HorizontalAlignment.Right: - element.style.justifyContent = "flex-end"; - break; - default: - element.style.justifyContent = "flex-start"; - break; - } - var imageElement = document.createElement("img"); - imageElement.onload = function(_e) { - raiseImageLoadedEvent(_this); - }; - imageElement.onerror = function(_e) { - if (_this.renderedElement) { - var card = _this.getRootElement(); - _this.renderedElement; - if (card && card.designMode) { - var errorElement = document.createElement("div"); - errorElement.style.display = "flex"; - errorElement.style.alignItems = "center"; - errorElement.style.justifyContent = "center"; - errorElement.style.backgroundColor = "#EEEEEE"; - errorElement.style.color = "black"; - errorElement.innerText = ":-("; - errorElement.style.padding = "10px"; - _this.applySize(errorElement); - _this.renderedElement.appendChild(errorElement); - } - } - raiseImageLoadedEvent(_this); - }; - imageElement.style.minWidth = "0"; - imageElement.classList.add(hostConfig.makeCssClassName("ac-image")); - if (this.selectAction && hostConfig.supportsInteractivity) { - imageElement.onkeypress = function(e) { - if (_this.selectAction && _this.selectAction.isEffectivelyEnabled() && (e.code === "Enter" || e.code === "Space")) { - e.preventDefault(); - e.cancelBubble = true; - _this.selectAction.execute(); - } - }; - imageElement.onclick = function(e) { - if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) { - e.preventDefault(); - e.cancelBubble = true; - _this.selectAction.execute(); - } - }; - this.selectAction.setupElementForAccessibility(imageElement); - if (this.selectAction.isEffectivelyEnabled()) { - imageElement.classList.add(hostConfig.makeCssClassName("ac-selectable")); - } - } - this.applySize(imageElement); - if (this.style === Enums.ImageStyle.Person) { - imageElement.style.borderRadius = "50%"; - imageElement.style.backgroundPosition = "50% 50%"; - imageElement.style.backgroundRepeat = "no-repeat"; - } - var backgroundColor = Utils.stringToCssColor(this.backgroundColor); - if (backgroundColor) { - imageElement.style.backgroundColor = backgroundColor; - } - imageElement.src = this.preProcessPropertyValue(Image2.urlProperty); - var altTextProperty = this.preProcessPropertyValue(Image2.altTextProperty); - if (altTextProperty) { - imageElement.alt = altTextProperty; - } - element.appendChild(imageElement); - } - return element; - }; - Image2.prototype.getJsonTypeName = function() { - return "Image"; - }; - Image2.prototype.getAllActions = function() { - var result = _super.prototype.getAllActions.call(this); - if (this.selectAction) { - result.push(this.selectAction); - } - return result; - }; - Image2.prototype.getActionById = function(id) { - var result = _super.prototype.getActionById.call(this, id); - if (!result && this.selectAction) { - result = this.selectAction.getActionById(id); - } - return result; - }; - Image2.prototype.getResourceInformation = function() { - return this.url ? [{ url: this.url, mimeType: "image" }] : []; - }; - Image2.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "url"); - Image2.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "altText"); - Image2.backgroundColorProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "backgroundColor"); - Image2.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "style", Enums.ImageStyle, Enums.ImageStyle.Default); - Image2.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "size", Enums.Size, Enums.Size.Auto); - Image2.pixelWidthProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, "width", "pixelWidth"); - Image2.pixelHeightProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, "height", "pixelHeight", CardElement.heightProperty); - Image2.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, "selectAction", [ - "Action.ShowCard" - ]); - __decorate([ - (0, serialization_1.property)(Image2.urlProperty) - ], Image2.prototype, "url", void 0); - __decorate([ - (0, serialization_1.property)(Image2.altTextProperty) - ], Image2.prototype, "altText", void 0); - __decorate([ - (0, serialization_1.property)(Image2.backgroundColorProperty) - ], Image2.prototype, "backgroundColor", void 0); - __decorate([ - (0, serialization_1.property)(Image2.sizeProperty) - ], Image2.prototype, "size", void 0); - __decorate([ - (0, serialization_1.property)(Image2.styleProperty) - ], Image2.prototype, "style", void 0); - __decorate([ - (0, serialization_1.property)(Image2.pixelWidthProperty) - ], Image2.prototype, "pixelWidth", void 0); - __decorate([ - (0, serialization_1.property)(Image2.pixelHeightProperty) - ], Image2.prototype, "pixelHeight", void 0); - __decorate([ - (0, serialization_1.property)(Image2.selectActionProperty) - ], Image2.prototype, "selectAction", void 0); - return Image2; - }(CardElement) - ); - exports.Image = Image; - var CardElementContainer = ( - /** @class */ - function(_super) { - __extends(CardElementContainer2, _super); - function CardElementContainer2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.allowVerticalOverflow = false; - return _this; - } - CardElementContainer2.prototype.populateSchema = function(schema) { - _super.prototype.populateSchema.call(this, schema); - if (!this.isSelectable) { - schema.remove(CardElementContainer2.selectActionProperty); - } - }; - CardElementContainer2.prototype.isElementAllowed = function(element) { - return this.hostConfig.supportsInteractivity || !element.isInteractive; - }; - CardElementContainer2.prototype.applyPadding = function() { - _super.prototype.applyPadding.call(this); - if (!this.renderedElement) { - return; - } - var physicalPadding = new shared_1.SpacingDefinition(); - if (this.getEffectivePadding()) { - physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding()); - } - this.renderedElement.style.paddingTop = physicalPadding.top + "px"; - this.renderedElement.style.paddingRight = physicalPadding.right + "px"; - this.renderedElement.style.paddingBottom = physicalPadding.bottom + "px"; - this.renderedElement.style.paddingLeft = physicalPadding.left + "px"; - this.renderedElement.style.marginRight = "0"; - this.renderedElement.style.marginLeft = "0"; - }; - Object.defineProperty(CardElementContainer2.prototype, "isSelectable", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - CardElementContainer2.prototype.forbiddenChildElements = function() { - return []; - }; - CardElementContainer2.prototype.releaseDOMResources = function() { - _super.prototype.releaseDOMResources.call(this); - for (var i = 0; i < this.getItemCount(); i++) { - this.getItemAt(i).releaseDOMResources(); - } - }; - CardElementContainer2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - for (var i = 0; i < this.getItemCount(); i++) { - var item = this.getItemAt(i); - if (!this.hostConfig.supportsInteractivity && item.isInteractive) { - context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed()); - } - if (!this.isElementAllowed(item)) { - context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(item.getJsonTypeName())); - } - item.internalValidateProperties(context); - } - if (this._selectAction) { - this._selectAction.internalValidateProperties(context); - } - }; - CardElementContainer2.prototype.render = function() { - var _this = this; - var element = _super.prototype.render.call(this); - if (element) { - var hostConfig = this.hostConfig; - if (this.allowVerticalOverflow) { - element.style.overflowX = "hidden"; - element.style.overflowY = "auto"; - } - if (element && this.isSelectable && this._selectAction && hostConfig.supportsInteractivity) { - element.onclick = function(e) { - if (_this._selectAction && _this._selectAction.isEffectivelyEnabled()) { - e.preventDefault(); - e.cancelBubble = true; - _this._selectAction.execute(); - } - }; - element.onkeypress = function(e) { - if (_this._selectAction && _this._selectAction.isEffectivelyEnabled() && (e.code === "Enter" || e.code === "Space")) { - e.preventDefault(); - e.cancelBubble = true; - _this._selectAction.execute(); - } - }; - this._selectAction.setupElementForAccessibility(element); - if (this._selectAction.isEffectivelyEnabled()) { - element.classList.add(hostConfig.makeCssClassName("ac-selectable")); - } - } - } - return element; - }; - CardElementContainer2.prototype.updateLayout = function(processChildren) { - if (processChildren === void 0) { - processChildren = true; - } - _super.prototype.updateLayout.call(this, processChildren); - if (processChildren) { - for (var i = 0; i < this.getItemCount(); i++) { - this.getItemAt(i).updateLayout(); - } - } - }; - CardElementContainer2.prototype.getAllInputs = function(processActions) { - if (processActions === void 0) { - processActions = true; - } - var result = []; - for (var i = 0; i < this.getItemCount(); i++) { - result.push.apply(result, this.getItemAt(i).getAllInputs(processActions)); - } - return result; - }; - CardElementContainer2.prototype.getAllActions = function() { - var result = _super.prototype.getAllActions.call(this); - for (var i = 0; i < this.getItemCount(); i++) { - result.push.apply(result, this.getItemAt(i).getAllActions()); - } - if (this._selectAction) { - result.push(this._selectAction); - } - return result; - }; - CardElementContainer2.prototype.getResourceInformation = function() { - var result = []; - for (var i = 0; i < this.getItemCount(); i++) { - result.push.apply(result, this.getItemAt(i).getResourceInformation()); - } - return result; - }; - CardElementContainer2.prototype.getElementById = function(id) { - var result = _super.prototype.getElementById.call(this, id); - if (!result) { - for (var i = 0; i < this.getItemCount(); i++) { - result = this.getItemAt(i).getElementById(id); - if (result) { - break; - } - } - } - return result; - }; - CardElementContainer2.prototype.findDOMNodeOwner = function(node) { - var _a; - var target = void 0; - for (var i = 0; i < this.getItemCount(); i++) { - target = this.getItemAt(i).findDOMNodeOwner(node); - if (target) { - return target; - } - } - for (var i = 0; i < this.getActionCount(); i++) { - target = (_a = this.getActionAt(i)) === null || _a === void 0 ? void 0 : _a.findDOMNodeOwner(node); - if (target) { - return target; - } - } - return _super.prototype.findDOMNodeOwner.call(this, node); - }; - CardElementContainer2.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, "selectAction", [ - "Action.ShowCard" - ]); - __decorate([ - (0, serialization_1.property)(CardElementContainer2.selectActionProperty) - ], CardElementContainer2.prototype, "_selectAction", void 0); - return CardElementContainer2; - }(CardElement) - ); - exports.CardElementContainer = CardElementContainer; - var ImageSet = ( - /** @class */ - function(_super) { - __extends(ImageSet2, _super); - function ImageSet2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._images = []; - _this.imageSize = Enums.ImageSize.Medium; - return _this; - } - ImageSet2.prototype.internalRender = function() { - var element = void 0; - if (this._images.length > 0) { - element = document.createElement("div"); - element.style.display = "flex"; - element.style.flexWrap = "wrap"; - for (var _i = 0, _a = this._images; _i < _a.length; _i++) { - var image = _a[_i]; - switch (this.imageSize) { - case Enums.ImageSize.Small: - image.size = Enums.Size.Small; - break; - case Enums.ImageSize.Large: - image.size = Enums.Size.Large; - break; - default: - image.size = Enums.Size.Medium; - break; - } - image.maxHeight = this.hostConfig.imageSet.maxImageHeight; - var renderedImage = image.render(); - if (renderedImage) { - renderedImage.style.display = "inline-flex"; - renderedImage.style.margin = "0px"; - renderedImage.style.marginRight = "10px"; - Utils.appendChild(element, renderedImage); - } - } - } - return element; - }; - ImageSet2.prototype.getItemCount = function() { - return this._images.length; - }; - ImageSet2.prototype.getItemAt = function(index) { - return this._images[index]; - }; - ImageSet2.prototype.getFirstVisibleRenderedItem = function() { - return this._images && this._images.length > 0 ? this._images[0] : void 0; - }; - ImageSet2.prototype.getLastVisibleRenderedItem = function() { - return this._images && this._images.length > 0 ? this._images[this._images.length - 1] : void 0; - }; - ImageSet2.prototype.removeItem = function(item) { - if (item instanceof Image) { - var itemIndex = this._images.indexOf(item); - if (itemIndex >= 0) { - this._images.splice(itemIndex, 1); - item.setParent(void 0); - this.updateLayout(); - return true; - } - } - return false; - }; - ImageSet2.prototype.getJsonTypeName = function() { - return "ImageSet"; - }; - ImageSet2.prototype.addImage = function(image) { - if (!image.parent) { - this._images.push(image); - image.setParent(this); - } else { - throw new Error("This image already belongs to another ImageSet"); - } - }; - ImageSet2.prototype.indexOf = function(cardElement) { - return cardElement instanceof Image ? this._images.indexOf(cardElement) : -1; - }; - ImageSet2.imagesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, "images", Image, function(sender, item) { - item.setParent(sender); - }); - ImageSet2.imageSizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "imageSize", Enums.ImageSize, Enums.ImageSize.Medium); - __decorate([ - (0, serialization_1.property)(ImageSet2.imagesProperty) - ], ImageSet2.prototype, "_images", void 0); - __decorate([ - (0, serialization_1.property)(ImageSet2.imageSizeProperty) - ], ImageSet2.prototype, "imageSize", void 0); - return ImageSet2; - }(CardElementContainer) - ); - exports.ImageSet = ImageSet; - var ContentSource = ( - /** @class */ - function(_super) { - __extends(ContentSource2, _super); - function ContentSource2(url, mimeType) { - var _this = _super.call(this) || this; - _this.url = url; - _this.mimeType = mimeType; - return _this; - } - ContentSource2.prototype.isValid = function() { - return this.mimeType && this.url ? true : false; - }; - ContentSource2.mimeTypeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "mimeType"); - ContentSource2.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "url"); - __decorate([ - (0, serialization_1.property)(ContentSource2.mimeTypeProperty) - ], ContentSource2.prototype, "mimeType", void 0); - __decorate([ - (0, serialization_1.property)(ContentSource2.urlProperty) - ], ContentSource2.prototype, "url", void 0); - return ContentSource2; - }(serialization_1.SerializableObject) - ); - exports.ContentSource = ContentSource; - var CaptionSource = ( - /** @class */ - function(_super) { - __extends(CaptionSource2, _super); - function CaptionSource2(url, mimeType, label) { - var _this = _super.call(this, url, mimeType) || this; - _this.label = label; - return _this; - } - CaptionSource2.prototype.getSchemaKey = function() { - return "CaptionSource"; - }; - CaptionSource2.prototype.render = function() { - var result = void 0; - if (this.isValid()) { - result = document.createElement("track"); - result.src = this.url; - result.kind = "captions"; - result.label = this.label; - } - return result; - }; - CaptionSource2.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, "label"); - __decorate([ - (0, serialization_1.property)(CaptionSource2.labelProperty) - ], CaptionSource2.prototype, "label", void 0); - return CaptionSource2; - }(ContentSource) - ); - exports.CaptionSource = CaptionSource; - var MediaSource = ( - /** @class */ - function(_super) { - __extends(MediaSource2, _super); - function MediaSource2() { - return _super !== null && _super.apply(this, arguments) || this; - } - MediaSource2.prototype.getSchemaKey = function() { - return "MediaSource"; - }; - MediaSource2.prototype.render = function() { - var result = void 0; - if (this.isValid()) { - result = document.createElement("source"); - result.src = this.url; - result.type = this.mimeType; - } - return result; - }; - return MediaSource2; - }(ContentSource) - ); - exports.MediaSource = MediaSource; - var MediaPlayer = ( - /** @class */ - function() { - function MediaPlayer2() { - } - MediaPlayer2.prototype.play = function() { - }; - Object.defineProperty(MediaPlayer2.prototype, "posterUrl", { - get: function() { - return this._posterUrl; - }, - set: function(value) { - this._posterUrl = value; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(MediaPlayer2.prototype, "selectedMediaType", { - get: function() { - return void 0; - }, - enumerable: false, - configurable: true - }); - return MediaPlayer2; - }() - ); - exports.MediaPlayer = MediaPlayer; - var HTML5MediaPlayer = ( - /** @class */ - function(_super) { - __extends(HTML5MediaPlayer2, _super); - function HTML5MediaPlayer2(owner) { - var _this = _super.call(this) || this; - _this.owner = owner; - _this._selectedSources = []; - _this._captionSources = []; - _this.processSources(); - return _this; - } - HTML5MediaPlayer2.prototype.processSources = function() { - var _a; - this._selectedSources = []; - this._captionSources = []; - this._selectedMediaType = void 0; - for (var _i = 0, _b = this.owner.sources; _i < _b.length; _i++) { - var source = _b[_i]; - var mimeComponents = source.mimeType ? source.mimeType.split("/") : []; - if (mimeComponents.length === 2) { - if (!this._selectedMediaType) { - var index = HTML5MediaPlayer2.supportedMediaTypes.indexOf(mimeComponents[0]); - if (index >= 0) { - this._selectedMediaType = HTML5MediaPlayer2.supportedMediaTypes[index]; - } - } - if (mimeComponents[0] === this._selectedMediaType) { - this._selectedSources.push(source); - } - } - } - (_a = this._captionSources).push.apply(_a, this.owner.captionSources); - }; - HTML5MediaPlayer2.prototype.canPlay = function() { - return this._selectedSources.length > 0; - }; - HTML5MediaPlayer2.prototype.fetchVideoDetails = function() { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a) { - return [ - 2 - /*return*/ - ]; - }); - }); - }; - HTML5MediaPlayer2.prototype.render = function() { - if (this._selectedMediaType === "video") { - this._mediaElement = document.createElement("video"); - } else { - this._mediaElement = document.createElement("audio"); - } - this._mediaElement.setAttribute("aria-label", this.owner.altText ? this.owner.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel()); - this._mediaElement.setAttribute("webkit-playsinline", ""); - this._mediaElement.setAttribute("playsinline", ""); - this._mediaElement.setAttribute("crossorigin", ""); - this._mediaElement.autoplay = true; - this._mediaElement.controls = true; - if (Utils.isMobileOS()) { - this._mediaElement.muted = true; - } - this._mediaElement.preload = "none"; - this._mediaElement.style.width = "100%"; - for (var _i = 0, _a = this.owner.sources; _i < _a.length; _i++) { - var source = _a[_i]; - var renderedSource = source.render(); - Utils.appendChild(this._mediaElement, renderedSource); - } - for (var _b = 0, _c = this.owner.captionSources; _b < _c.length; _b++) { - var captionSource = _c[_b]; - if (captionSource.mimeType == "vtt") { - var renderedCaptionSource = captionSource.render(); - Utils.appendChild(this._mediaElement, renderedCaptionSource); - } - } - return this._mediaElement; - }; - HTML5MediaPlayer2.prototype.play = function() { - if (this._mediaElement) { - this._mediaElement.play(); - } - }; - Object.defineProperty(HTML5MediaPlayer2.prototype, "selectedMediaType", { - get: function() { - return this._selectedMediaType; - }, - enumerable: false, - configurable: true - }); - HTML5MediaPlayer2.supportedMediaTypes = ["audio", "video"]; - return HTML5MediaPlayer2; - }(MediaPlayer) - ); - exports.HTML5MediaPlayer = HTML5MediaPlayer; - var CustomMediaPlayer = ( - /** @class */ - function(_super) { - __extends(CustomMediaPlayer2, _super); - function CustomMediaPlayer2(matches) { - return _super.call(this) || this; - } - return CustomMediaPlayer2; - }(MediaPlayer) - ); - exports.CustomMediaPlayer = CustomMediaPlayer; - var IFrameMediaMediaPlayer = ( - /** @class */ - function(_super) { - __extends(IFrameMediaMediaPlayer2, _super); - function IFrameMediaMediaPlayer2(matches, iFrameTitle) { - var _this = _super.call(this, matches) || this; - _this.iFrameTitle = iFrameTitle; - if (matches.length >= 2) { - _this._videoId = matches[1]; - } - return _this; - } - IFrameMediaMediaPlayer2.prototype.canPlay = function() { - return this._videoId !== void 0; - }; - IFrameMediaMediaPlayer2.prototype.render = function() { - var container = document.createElement("div"); - container.style.position = "relative"; - container.style.width = "100%"; - container.style.height = "0"; - container.style.paddingBottom = "56.25%"; - var iFrame = document.createElement("iframe"); - iFrame.style.position = "absolute"; - iFrame.style.top = "0"; - iFrame.style.left = "0"; - iFrame.style.width = "100%"; - iFrame.style.height = "100%"; - iFrame.src = this.getEmbedVideoUrl(); - iFrame.frameBorder = "0"; - if (this.iFrameTitle) { - iFrame.title = this.iFrameTitle; - } - iFrame.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"; - iFrame.allowFullscreen = true; - container.appendChild(iFrame); - return container; - }; - Object.defineProperty(IFrameMediaMediaPlayer2.prototype, "videoId", { - get: function() { - return this._videoId; - }, - enumerable: false, - configurable: true - }); - return IFrameMediaMediaPlayer2; - }(CustomMediaPlayer) - ); - exports.IFrameMediaMediaPlayer = IFrameMediaMediaPlayer; - var VimeoPlayer = ( - /** @class */ - function(_super) { - __extends(VimeoPlayer2, _super); - function VimeoPlayer2() { - return _super !== null && _super.apply(this, arguments) || this; - } - VimeoPlayer2.prototype.fetchVideoDetails = function() { - return __awaiter(this, void 0, void 0, function() { - var oEmbedUrl, response, json; - return __generator(this, function(_a) { - switch (_a.label) { - case 0: - oEmbedUrl = "https://vimeo.com/api/oembed.json?url=".concat(this.getEmbedVideoUrl()); - return [4, fetch(oEmbedUrl)]; - case 1: - response = _a.sent(); - if (!response.ok) - return [3, 3]; - return [4, response.json()]; - case 2: - json = _a.sent(); - this.posterUrl = json["thumbnail_url"]; - _a.label = 3; - case 3: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - VimeoPlayer2.prototype.getEmbedVideoUrl = function() { - return "https://player.vimeo.com/video/".concat(this.videoId, "?autoplay=1"); - }; - return VimeoPlayer2; - }(IFrameMediaMediaPlayer) - ); - exports.VimeoPlayer = VimeoPlayer; - var DailymotionPlayer = ( - /** @class */ - function(_super) { - __extends(DailymotionPlayer2, _super); - function DailymotionPlayer2() { - return _super !== null && _super.apply(this, arguments) || this; - } - DailymotionPlayer2.prototype.fetchVideoDetails = function() { - return __awaiter(this, void 0, void 0, function() { - var apiUrl, response, json; - return __generator(this, function(_a) { - switch (_a.label) { - case 0: - apiUrl = "https://api.dailymotion.com/video/".concat(this.videoId, "?fields=thumbnail_720_url"); - return [4, fetch(apiUrl)]; - case 1: - response = _a.sent(); - if (!response.ok) - return [3, 3]; - return [4, response.json()]; - case 2: - json = _a.sent(); - this.posterUrl = json["thumbnail_720_url"]; - _a.label = 3; - case 3: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - DailymotionPlayer2.prototype.getEmbedVideoUrl = function() { - return "https://www.dailymotion.com/embed/video/".concat(this.videoId, "?autoplay=1"); - }; - return DailymotionPlayer2; - }(IFrameMediaMediaPlayer) - ); - exports.DailymotionPlayer = DailymotionPlayer; - var YouTubePlayer = ( - /** @class */ - function(_super) { - __extends(YouTubePlayer2, _super); - function YouTubePlayer2(matches, iFrameTitle) { - var _this = _super.call(this, matches, iFrameTitle) || this; - _this.iFrameTitle = iFrameTitle; - if (matches.length >= 3 && matches[2] !== void 0) { - _this._startTimeIndex = parseInt(matches[2]); - } - return _this; - } - YouTubePlayer2.prototype.fetchVideoDetails = function() { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a) { - this.posterUrl = this.videoId ? "https://img.youtube.com/vi/".concat(this.videoId, "/maxresdefault.jpg") : void 0; - return [ - 2 - /*return*/ - ]; - }); - }); - }; - YouTubePlayer2.prototype.getEmbedVideoUrl = function() { - var url = "https://www.youtube.com/embed/".concat(this.videoId, "?autoplay=1"); - if (this._startTimeIndex !== void 0) { - url += "&start=".concat(this._startTimeIndex); - } - return url; - }; - return YouTubePlayer2; - }(IFrameMediaMediaPlayer) - ); - exports.YouTubePlayer = YouTubePlayer; - var Media = ( - /** @class */ - function(_super) { - __extends(Media2, _super); - function Media2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.sources = []; - _this.captionSources = []; - return _this; - } - Media2.prototype.createMediaPlayer = function() { - for (var _i = 0, _a = Media2.customMediaPlayers; _i < _a.length; _i++) { - var provider = _a[_i]; - for (var _b = 0, _c = this.sources; _b < _c.length; _b++) { - var source = _c[_b]; - if (source.url) { - for (var _d = 0, _f = provider.urlPatterns; _d < _f.length; _d++) { - var pattern = _f[_d]; - var matches = pattern.exec(source.url); - if (matches !== null) { - return provider.createMediaPlayer(matches); - } - } - } - } - } - return new HTML5MediaPlayer(this); - }; - Media2.prototype.handlePlayButtonInvoke = function(event) { - if (this.hostConfig.media.allowInlinePlayback) { - event.preventDefault(); - event.cancelBubble = true; - if (this.renderedElement) { - var mediaPlayerElement = this._mediaPlayer.render(); - clearElement(this.renderedElement); - this.renderedElement.appendChild(mediaPlayerElement); - this._mediaPlayer.play(); - mediaPlayerElement.focus(); - } - } else { - if (Media2.onPlay) { - event.preventDefault(); - event.cancelBubble = true; - Media2.onPlay(this); - } - } - }; - Media2.prototype.displayPoster = function() { - return __awaiter(this, void 0, void 0, function() { - var playButtonArrowWidth, playButtonArrowHeight, posterRootElement_1, posterUrl, posterImageElement_1, playButtonOuterElement, playButtonInnerElement, playButtonContainer; - var _this = this; - return __generator(this, function(_a) { - if (this.renderedElement) { - playButtonArrowWidth = 12; - playButtonArrowHeight = 15; - posterRootElement_1 = document.createElement("div"); - posterRootElement_1.className = this.hostConfig.makeCssClassName("ac-media-poster"); - posterRootElement_1.setAttribute("role", "contentinfo"); - posterRootElement_1.setAttribute("aria-label", this.altText ? this.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel()); - posterRootElement_1.style.position = "relative"; - posterRootElement_1.style.display = "flex"; - posterUrl = this.poster ? this.poster : this._mediaPlayer.posterUrl; - if (!posterUrl) { - posterUrl = this.hostConfig.media.defaultPoster; - } - if (posterUrl) { - posterImageElement_1 = document.createElement("img"); - posterImageElement_1.style.width = "100%"; - posterImageElement_1.style.height = "100%"; - posterImageElement_1.setAttribute("role", "presentation"); - posterImageElement_1.onerror = function(_e) { - if (posterImageElement_1.parentNode) { - posterImageElement_1.parentNode.removeChild(posterImageElement_1); - } - posterRootElement_1.classList.add("empty"); - posterRootElement_1.style.minHeight = "150px"; - }; - posterImageElement_1.src = posterUrl; - posterRootElement_1.appendChild(posterImageElement_1); - } else { - posterRootElement_1.classList.add("empty"); - posterRootElement_1.style.minHeight = "150px"; - } - if (this.hostConfig.supportsInteractivity && this._mediaPlayer.canPlay()) { - playButtonOuterElement = document.createElement("div"); - playButtonOuterElement.tabIndex = 0; - playButtonOuterElement.setAttribute("role", "button"); - playButtonOuterElement.setAttribute("aria-label", strings_1.Strings.defaults.mediaPlayerPlayMedia()); - playButtonOuterElement.className = this.hostConfig.makeCssClassName("ac-media-playButton"); - playButtonOuterElement.style.display = "flex"; - playButtonOuterElement.style.alignItems = "center"; - playButtonOuterElement.style.justifyContent = "center"; - playButtonOuterElement.onclick = function(e) { - _this.handlePlayButtonInvoke(e); - }; - playButtonOuterElement.onkeypress = function(e) { - if (e.code === "Enter" || e.code === "Space") { - _this.handlePlayButtonInvoke(e); - } - }; - playButtonInnerElement = document.createElement("div"); - playButtonInnerElement.className = this.hostConfig.makeCssClassName("ac-media-playButton-arrow"); - playButtonInnerElement.style.width = playButtonArrowWidth + "px"; - playButtonInnerElement.style.height = playButtonArrowHeight + "px"; - playButtonInnerElement.style.borderTopWidth = playButtonArrowHeight / 2 + "px"; - playButtonInnerElement.style.borderBottomWidth = playButtonArrowHeight / 2 + "px"; - playButtonInnerElement.style.borderLeftWidth = playButtonArrowWidth + "px"; - playButtonInnerElement.style.borderRightWidth = "0"; - playButtonInnerElement.style.borderStyle = "solid"; - playButtonInnerElement.style.borderTopColor = "transparent"; - playButtonInnerElement.style.borderRightColor = "transparent"; - playButtonInnerElement.style.borderBottomColor = "transparent"; - playButtonInnerElement.style.transform = "translate(" + playButtonArrowWidth / 10 + "px,0px)"; - playButtonOuterElement.appendChild(playButtonInnerElement); - playButtonContainer = document.createElement("div"); - playButtonContainer.style.position = "absolute"; - playButtonContainer.style.left = "0"; - playButtonContainer.style.top = "0"; - playButtonContainer.style.width = "100%"; - playButtonContainer.style.height = "100%"; - playButtonContainer.style.display = "flex"; - playButtonContainer.style.justifyContent = "center"; - playButtonContainer.style.alignItems = "center"; - playButtonContainer.appendChild(playButtonOuterElement); - posterRootElement_1.appendChild(playButtonContainer); - } - clearElement(this.renderedElement); - this.renderedElement.appendChild(posterRootElement_1); - } - return [ - 2 - /*return*/ - ]; - }); - }); - }; - Media2.prototype.internalRender = function() { - var element = document.createElement("div"); - element.className = this.hostConfig.makeCssClassName("ac-media"); - return element; - }; - Media2.prototype.render = function() { - var _this = this; - var result = _super.prototype.render.call(this); - if (result) { - this._mediaPlayer = this.createMediaPlayer(); - this._mediaPlayer.fetchVideoDetails().then(function() { - return _this.displayPoster(); - }); - } - return result; - }; - Media2.prototype.releaseDOMResources = function() { - _super.prototype.releaseDOMResources.call(this); - this.displayPoster(); - }; - Media2.prototype.getJsonTypeName = function() { - return "Media"; - }; - Media2.prototype.getResourceInformation = function() { - var result = []; - if (this._mediaPlayer) { - var posterUrl = this.poster ? this.poster : this.hostConfig.media.defaultPoster; - if (posterUrl) { - result.push({ url: posterUrl, mimeType: "image" }); - } - } - for (var _i = 0, _a = this.sources; _i < _a.length; _i++) { - var mediaSource = _a[_i]; - if (mediaSource.isValid()) { - result.push({ - /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `mediaSource.url` is of type `string | undefined`, but is validated by `isValid()` call */ - url: mediaSource.url, - mimeType: mediaSource.mimeType - /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */ - }); - } - } - for (var _b = 0, _c = this.captionSources; _b < _c.length; _b++) { - var captionSource = _c[_b]; - if (captionSource.isValid()) { - result.push({ - /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `captionSource.url` is of type `string | undefined`, but is validated by `isValid()` call */ - url: captionSource.url, - mimeType: captionSource.mimeType - /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */ - }); - } - } - return result; - }; - Object.defineProperty(Media2.prototype, "selectedMediaType", { - get: function() { - return this._mediaPlayer.selectedMediaType; - }, - enumerable: false, - configurable: true - }); - Media2.customMediaPlayers = [ - { - urlPatterns: [ - /^(?:https?:\/\/)?(?:www.)?youtube.com\/watch\?(?=.*v=([\w\d-_]+))(?=(?:.*t=(\d+))?).*/gi, - /^(?:https?:\/\/)?youtu.be\/([\w\d-_]+)(?:\?t=(\d+))?/gi - ], - createMediaPlayer: function(matches) { - return new YouTubePlayer(matches, strings_1.Strings.defaults.youTubeVideoPlayer()); - } - }, - { - urlPatterns: [/^(?:https?:\/\/)?vimeo.com\/([\w\d-_]+).*/gi], - createMediaPlayer: function(matches) { - return new VimeoPlayer(matches, strings_1.Strings.defaults.vimeoVideoPlayer()); - } - }, - { - urlPatterns: [/^(?:https?:\/\/)?(?:www.)?dailymotion.com\/video\/([\w\d-_]+).*/gi], - createMediaPlayer: function(matches) { - return new DailymotionPlayer(matches, strings_1.Strings.defaults.dailymotionVideoPlayer()); - } - } - ]; - Media2.sourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_1, "sources", MediaSource); - Media2.captionSourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_6, "captionSources", CaptionSource); - Media2.posterProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "poster"); - Media2.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "altText"); - __decorate([ - (0, serialization_1.property)(Media2.sourcesProperty) - ], Media2.prototype, "sources", void 0); - __decorate([ - (0, serialization_1.property)(Media2.captionSourcesProperty) - ], Media2.prototype, "captionSources", void 0); - __decorate([ - (0, serialization_1.property)(Media2.posterProperty) - ], Media2.prototype, "poster", void 0); - __decorate([ - (0, serialization_1.property)(Media2.altTextProperty) - ], Media2.prototype, "altText", void 0); - return Media2; - }(CardElement) - ); - exports.Media = Media; - var Input = ( - /** @class */ - function(_super) { - __extends(Input2, _super); - function Input2() { - return _super !== null && _super.apply(this, arguments) || this; - } - Input2.prototype.getAllLabelIds = function() { - var labelIds = []; - if (this.labelledBy) { - labelIds.push(this.labelledBy); - } - if (this._renderedLabelElement) { - labelIds.push(this._renderedLabelElement.id); - } - if (this._renderedErrorMessageElement) { - labelIds.push(this._renderedErrorMessageElement.id); - } - return labelIds; - }; - Input2.prototype.updateInputControlAriaLabelledBy = function() { - if (this._renderedInputControlElement) { - var labelIds = this.getAllLabelIds(); - if (labelIds.length > 0) { - this._renderedInputControlElement.setAttribute("aria-labelledby", labelIds.join(" ")); - } else { - this._renderedInputControlElement.removeAttribute("aria-labelledby"); - } - } - }; - Object.defineProperty(Input2.prototype, "isNullable", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Input2.prototype, "renderedInputControlElement", { - get: function() { - return this._renderedInputControlElement; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Input2.prototype, "inputControlContainerElement", { - get: function() { - return this._inputControlContainerElement; - }, - enumerable: false, - configurable: true - }); - Input2.prototype.overrideInternalRender = function() { - var hostConfig = this.hostConfig; - this._outerContainerElement = document.createElement("div"); - this._outerContainerElement.style.display = "flex"; - this._outerContainerElement.style.flexDirection = "column"; - var renderedInputControlId = Utils.generateUniqueId(); - if (this.label) { - var labelRichTextBlock = new RichTextBlock(); - labelRichTextBlock.setParent(this); - labelRichTextBlock.forElementId = renderedInputControlId; - var labelInline = new TextRun(this.label); - labelRichTextBlock.addInline(labelInline); - if (this.isRequired) { - labelInline.init(hostConfig.inputs.label.requiredInputs); - var isRequiredCueInline = new TextRun(hostConfig.inputs.label.requiredInputs.suffix); - isRequiredCueInline.color = hostConfig.inputs.label.requiredInputs.suffixColor; - isRequiredCueInline.ariaHidden = true; - labelRichTextBlock.addInline(isRequiredCueInline); - } else { - labelInline.init(hostConfig.inputs.label.optionalInputs); - } - this._renderedLabelElement = labelRichTextBlock.render(); - if (this._renderedLabelElement) { - this._renderedLabelElement.id = Utils.generateUniqueId(); - this._renderedLabelElement.style.marginBottom = hostConfig.getEffectiveSpacing(hostConfig.inputs.label.inputSpacing) + "px"; - this._outerContainerElement.appendChild(this._renderedLabelElement); - } - } - this._inputControlContainerElement = document.createElement("div"); - this._inputControlContainerElement.className = hostConfig.makeCssClassName("ac-input-container"); - this._inputControlContainerElement.style.display = "flex"; - if (this.height === "stretch") { - this._inputControlContainerElement.style.alignItems = "stretch"; - this._inputControlContainerElement.style.flex = "1 1 auto"; - } - this._renderedInputControlElement = this.internalRender(); - if (this._renderedInputControlElement) { - this._renderedInputControlElement.id = renderedInputControlId; - this._renderedInputControlElement.style.minWidth = "0px"; - if (this.isNullable && this.isRequired) { - this._renderedInputControlElement.setAttribute("aria-required", "true"); - this._renderedInputControlElement.classList.add(hostConfig.makeCssClassName("ac-input-required")); - } - this._inputControlContainerElement.appendChild(this._renderedInputControlElement); - this._outerContainerElement.appendChild(this._inputControlContainerElement); - this.updateInputControlAriaLabelledBy(); - return this._outerContainerElement; - } - this.resetDirtyState(); - return void 0; - }; - Input2.prototype.valueChanged = function() { - this.getRootElement().updateActionsEnabledState(); - if (this.isValid()) { - this.resetValidationFailureCue(); - } - if (this.onValueChanged) { - this.onValueChanged(this); - } - raiseInputValueChangedEvent(this); - }; - Input2.prototype.resetValidationFailureCue = function() { - if (this.renderedInputControlElement) { - this.renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName("ac-input-validation-failed")); - this.updateInputControlAriaLabelledBy(); - if (this._renderedErrorMessageElement) { - this._outerContainerElement.removeChild(this._renderedErrorMessageElement); - this._renderedErrorMessageElement = void 0; - } - } - }; - Input2.prototype.showValidationErrorMessage = function() { - if (this.renderedElement && this.errorMessage && shared_1.GlobalSettings.displayInputValidationErrors) { - var errorMessageTextBlock = new TextBlock(); - errorMessageTextBlock.setParent(this); - errorMessageTextBlock.text = this.errorMessage; - errorMessageTextBlock.wrap = true; - errorMessageTextBlock.init(this.hostConfig.inputs.errorMessage); - this._renderedErrorMessageElement = errorMessageTextBlock.render(); - if (this._renderedErrorMessageElement) { - this._renderedErrorMessageElement.id = Utils.generateUniqueId(); - this._outerContainerElement.appendChild(this._renderedErrorMessageElement); - this.updateInputControlAriaLabelledBy(); - } - } - }; - Input2.prototype.focus = function() { - if (this._renderedInputControlElement) { - this._renderedInputControlElement.focus(); - } - }; - Input2.prototype.isValid = function() { - return true; - }; - Input2.prototype.isDirty = function() { - return this.value !== this._oldValue; - }; - Input2.prototype.resetDirtyState = function() { - this._oldValue = this.value; - }; - Input2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - if (!this.id) { - context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.inputsMustHaveUniqueId()); - } - if (this.isRequired) { - if (!this.label) { - context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveLabel, "Required inputs should have a label"); - } - if (!this.errorMessage) { - context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveErrorMessage, "Required inputs should have an error message"); - } - } - }; - Input2.prototype.validateValue = function() { - this.resetValidationFailureCue(); - var result = this.isRequired ? this.isSet() && this.isValid() : this.isValid(); - if (!result && this.renderedInputControlElement) { - this.renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName("ac-input-validation-failed")); - this.showValidationErrorMessage(); - } - return result; - }; - Input2.prototype.getAllInputs = function(processActions) { - if (processActions === void 0) { - processActions = true; - } - return [this]; - }; - Input2.prototype.render = function() { - var result = _super.prototype.render.call(this); - this.resetDirtyState(); - return result; - }; - Object.defineProperty(Input2.prototype, "isInteractive", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - Input2.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, "label", true); - Input2.isRequiredProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, "isRequired", false); - Input2.errorMessageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, "errorMessage", true); - __decorate([ - (0, serialization_1.property)(Input2.labelProperty) - ], Input2.prototype, "label", void 0); - __decorate([ - (0, serialization_1.property)(Input2.isRequiredProperty) - ], Input2.prototype, "isRequired", void 0); - __decorate([ - (0, serialization_1.property)(Input2.errorMessageProperty) - ], Input2.prototype, "errorMessage", void 0); - return Input2; - }(CardElement) - ); - exports.Input = Input; - var TextInput = ( - /** @class */ - function(_super) { - __extends(TextInput2, _super); - function TextInput2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.isMultiline = false; - _this.style = Enums.InputTextStyle.Text; - return _this; - } - TextInput2.prototype.setupInput = function(input) { - var _this = this; - input.style.flex = "1 1 auto"; - input.tabIndex = this.isDesignMode() ? -1 : 0; - if (this.placeholder) { - input.placeholder = this.placeholder; - input.setAttribute("aria-label", this.placeholder); - } - if (this.defaultValue) { - input.value = this.defaultValue; - } - if (this.maxLength && this.maxLength > 0) { - input.maxLength = this.maxLength; - } - input.oninput = function() { - _this.valueChanged(); - }; - input.onkeypress = function(e) { - if (e.ctrlKey && e.code === "Enter" && _this.inlineAction && _this.inlineAction.isEffectivelyEnabled()) { - _this.inlineAction.execute(); - } - }; - }; - TextInput2.prototype.internalRender = function() { - var result; - if (this.isMultiline && this.style !== Enums.InputTextStyle.Password) { - result = document.createElement("textarea"); - result.className = this.hostConfig.makeCssClassName("ac-input", "ac-textInput", "ac-multiline"); - if (this.height === "stretch") { - result.style.height = "initial"; - } - } else { - result = document.createElement("input"); - result.className = this.hostConfig.makeCssClassName("ac-input", "ac-textInput"); - result.type = Enums.InputTextStyle[this.style].toLowerCase(); - } - this.setupInput(result); - return result; - }; - TextInput2.prototype.overrideInternalRender = function() { - var _this = this; - var renderedInputControl = _super.prototype.overrideInternalRender.call(this); - if (this.inlineAction) { - var button_1 = document.createElement("button"); - button_1.className = this.hostConfig.makeCssClassName(this.inlineAction.isEffectivelyEnabled() ? "ac-inlineActionButton" : "ac-inlineActionButton-disabled"); - button_1.onclick = function(e) { - if (_this.inlineAction && _this.inlineAction.isEffectivelyEnabled()) { - e.preventDefault(); - e.cancelBubble = true; - _this.inlineAction.execute(); - } - }; - if (this.inlineAction.iconUrl) { - button_1.classList.add("iconOnly"); - var icon_1 = document.createElement("img"); - icon_1.style.height = "100%"; - icon_1.setAttribute("role", "presentation"); - icon_1.style.display = "none"; - icon_1.onload = function() { - icon_1.style.removeProperty("display"); - }; - icon_1.onerror = function() { - button_1.removeChild(icon_1); - button_1.classList.remove("iconOnly"); - button_1.classList.add("textOnly"); - button_1.textContent = _this.inlineAction && _this.inlineAction.title ? _this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle(); - }; - icon_1.src = this.inlineAction.iconUrl; - button_1.appendChild(icon_1); - button_1.title = this.inlineAction.title ? this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle(); - } else { - button_1.classList.add("textOnly"); - button_1.textContent = this.inlineAction.title ? this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle(); - } - this.inlineAction.setupElementForAccessibility(button_1, true); - button_1.style.marginLeft = "8px"; - this.inputControlContainerElement.appendChild(button_1); - } - return renderedInputControl; - }; - TextInput2.prototype.getJsonTypeName = function() { - return "Input.Text"; - }; - TextInput2.prototype.getAllActions = function() { - var result = _super.prototype.getAllActions.call(this); - if (this.inlineAction) { - result.push(this.inlineAction); - } - return result; - }; - TextInput2.prototype.getActionById = function(id) { - var result = _super.prototype.getActionById.call(this, id); - if (!result && this.inlineAction) { - result = this.inlineAction.getActionById(id); - } - return result; - }; - TextInput2.prototype.isSet = function() { - return this.value ? true : false; - }; - TextInput2.prototype.isValid = function() { - if (!this.value) { - return true; - } - if (this.regex) { - return new RegExp(this.regex, "g").test(this.value); - } - return true; - }; - Object.defineProperty(TextInput2.prototype, "value", { - get: function() { - if (this.renderedInputControlElement) { - if (this.isMultiline) { - return this.renderedInputControlElement.value; - } else { - return this.renderedInputControlElement.value; - } - } else { - return void 0; - } - }, - enumerable: false, - configurable: true - }); - TextInput2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value"); - TextInput2.maxLengthProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "maxLength"); - TextInput2.isMultilineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "isMultiline", false); - TextInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder"); - TextInput2.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "style", Enums.InputTextStyle, Enums.InputTextStyle.Text, [ - { value: Enums.InputTextStyle.Text }, - { value: Enums.InputTextStyle.Tel }, - { value: Enums.InputTextStyle.Url }, - { value: Enums.InputTextStyle.Email }, - { value: Enums.InputTextStyle.Password, targetVersion: serialization_1.Versions.v1_5 } - ]); - TextInput2.inlineActionProperty = new ActionProperty(serialization_1.Versions.v1_0, "inlineAction", [ - "Action.ShowCard" - ]); - TextInput2.regexProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, "regex", true); - __decorate([ - (0, serialization_1.property)(TextInput2.valueProperty) - ], TextInput2.prototype, "defaultValue", void 0); - __decorate([ - (0, serialization_1.property)(TextInput2.maxLengthProperty) - ], TextInput2.prototype, "maxLength", void 0); - __decorate([ - (0, serialization_1.property)(TextInput2.isMultilineProperty) - ], TextInput2.prototype, "isMultiline", void 0); - __decorate([ - (0, serialization_1.property)(TextInput2.placeholderProperty) - ], TextInput2.prototype, "placeholder", void 0); - __decorate([ - (0, serialization_1.property)(TextInput2.styleProperty) - ], TextInput2.prototype, "style", void 0); - __decorate([ - (0, serialization_1.property)(TextInput2.inlineActionProperty) - ], TextInput2.prototype, "inlineAction", void 0); - __decorate([ - (0, serialization_1.property)(TextInput2.regexProperty) - ], TextInput2.prototype, "regex", void 0); - return TextInput2; - }(Input) - ); - exports.TextInput = TextInput; - var ToggleInput = ( - /** @class */ - function(_super) { - __extends(ToggleInput2, _super); - function ToggleInput2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.valueOn = "true"; - _this.valueOff = "false"; - _this.wrap = false; - return _this; - } - ToggleInput2.prototype.updateInputControlAriaLabelledBy = function() { - if (this._checkboxInputElement) { - var joinedLabelIds = this.getAllLabelIds().join(" "); - if (this._checkboxInputLabelElement && this._checkboxInputLabelElement.id) { - joinedLabelIds += " " + this._checkboxInputLabelElement.id; - } - if (joinedLabelIds) { - this._checkboxInputElement.setAttribute("aria-labelledby", joinedLabelIds); - } else { - this._checkboxInputElement.removeAttribute("aria-labelledby"); - } - } - }; - ToggleInput2.prototype.internalRender = function() { - var _this = this; - var element = document.createElement("div"); - element.className = this.hostConfig.makeCssClassName("ac-input", "ac-toggleInput"); - element.style.width = "100%"; - element.style.display = "flex"; - element.style.alignItems = "center"; - this._checkboxInputElement = document.createElement("input"); - this._checkboxInputElement.id = Utils.generateUniqueId(); - this._checkboxInputElement.type = "checkbox"; - this._checkboxInputElement.style.display = "inline-block"; - this._checkboxInputElement.style.verticalAlign = "middle"; - this._checkboxInputElement.style.margin = "0"; - this._checkboxInputElement.style.flex = "0 0 auto"; - if (this.title) { - this._checkboxInputElement.setAttribute("aria-label", this.title); - } - if (this.isRequired) { - this._checkboxInputElement.setAttribute("aria-required", "true"); - } - this._checkboxInputElement.tabIndex = this.isDesignMode() ? -1 : 0; - if (this.defaultValue === this.valueOn) { - this._checkboxInputElement.checked = true; - } - this._oldCheckboxValue = this._checkboxInputElement.checked; - this._checkboxInputElement.onchange = function() { - _this.valueChanged(); - }; - Utils.appendChild(element, this._checkboxInputElement); - if (this.title || this.isDesignMode()) { - var label = new TextBlock(); - label.setParent(this); - label.forElementId = this._checkboxInputElement.id; - label.hostConfig = this.hostConfig; - label.text = !this.title ? this.getJsonTypeName() : this.title; - label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox; - label.wrap = this.wrap; - this._checkboxInputLabelElement = label.render(); - if (this._checkboxInputLabelElement) { - this._checkboxInputLabelElement.id = Utils.generateUniqueId(); - this._checkboxInputLabelElement.style.display = "inline-block"; - this._checkboxInputLabelElement.style.flex = "1 1 auto"; - this._checkboxInputLabelElement.style.marginLeft = "6px"; - this._checkboxInputLabelElement.style.verticalAlign = "middle"; - var spacerElement = document.createElement("div"); - spacerElement.style.width = "6px"; - Utils.appendChild(element, spacerElement); - Utils.appendChild(element, this._checkboxInputLabelElement); - } - } - return element; - }; - Object.defineProperty(ToggleInput2.prototype, "isNullable", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - ToggleInput2.prototype.getJsonTypeName = function() { - return "Input.Toggle"; - }; - ToggleInput2.prototype.focus = function() { - if (this._checkboxInputElement) { - this._checkboxInputElement.focus(); - } - }; - ToggleInput2.prototype.isSet = function() { - if (this.isRequired) { - return this.value === this.valueOn; - } - return this.value ? true : false; - }; - ToggleInput2.prototype.isDirty = function() { - return this._checkboxInputElement ? this._checkboxInputElement.checked !== this._oldCheckboxValue : false; - }; - Object.defineProperty(ToggleInput2.prototype, "value", { - get: function() { - if (this._checkboxInputElement) { - return this._checkboxInputElement.checked ? this.valueOn : this.valueOff; - } else { - return void 0; - } - }, - enumerable: false, - configurable: true - }); - ToggleInput2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value"); - ToggleInput2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "title"); - ToggleInput2.valueOnProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "valueOn", true, void 0, "true", function(sender) { - return "true"; - }); - ToggleInput2.valueOffProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "valueOff", true, void 0, "false", function(sender) { - return "false"; - }); - ToggleInput2.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "wrap", false); - __decorate([ - (0, serialization_1.property)(ToggleInput2.valueProperty) - ], ToggleInput2.prototype, "defaultValue", void 0); - __decorate([ - (0, serialization_1.property)(ToggleInput2.titleProperty) - ], ToggleInput2.prototype, "title", void 0); - __decorate([ - (0, serialization_1.property)(ToggleInput2.valueOnProperty) - ], ToggleInput2.prototype, "valueOn", void 0); - __decorate([ - (0, serialization_1.property)(ToggleInput2.valueOffProperty) - ], ToggleInput2.prototype, "valueOff", void 0); - __decorate([ - (0, serialization_1.property)(ToggleInput2.wrapProperty) - ], ToggleInput2.prototype, "wrap", void 0); - return ToggleInput2; - }(Input) - ); - exports.ToggleInput = ToggleInput; - var Choice = ( - /** @class */ - function(_super) { - __extends(Choice2, _super); - function Choice2(title, value) { - var _this = _super.call(this) || this; - _this.title = title; - _this.value = value; - return _this; - } - Choice2.prototype.getSchemaKey = function() { - return "Choice"; - }; - Choice2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "title"); - Choice2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value"); - __decorate([ - (0, serialization_1.property)(Choice2.titleProperty) - ], Choice2.prototype, "title", void 0); - __decorate([ - (0, serialization_1.property)(Choice2.valueProperty) - ], Choice2.prototype, "value", void 0); - return Choice2; - }(serialization_1.SerializableObject) - ); - exports.Choice = Choice; - var ChoiceSetInput = ( - /** @class */ - function(_super) { - __extends(ChoiceSetInput2, _super); - function ChoiceSetInput2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.isMultiSelect = false; - _this.wrap = false; - _this.choices = []; - return _this; - } - Object.defineProperty(ChoiceSetInput2.prototype, "isCompact", { - get: function() { - return !this.style || this.style === "compact"; - }, - set: function(value) { - this.style = value ? void 0 : "expanded"; - }, - enumerable: false, - configurable: true - }); - ChoiceSetInput2.getUniqueCategoryName = function() { - var uniqueCategoryName = "__ac-category" + ChoiceSetInput2._uniqueCategoryCounter; - ChoiceSetInput2._uniqueCategoryCounter++; - return uniqueCategoryName; - }; - ChoiceSetInput2.prototype.internalApplyAriaCurrent = function() { - if (this._selectElement) { - var options = this._selectElement.options; - if (options) { - for (var _i = 0, _a = Array.from(options); _i < _a.length; _i++) { - var option = _a[_i]; - if (option.selected) { - option.setAttribute("aria-current", "true"); - } else { - option.removeAttribute("aria-current"); - } - } - } - } - }; - ChoiceSetInput2.prototype.renderCompoundInput = function(cssClassName, type, defaultValues) { - var _this = this; - var element = document.createElement("div"); - element.className = this.hostConfig.makeCssClassName("ac-input", cssClassName); - element.style.width = "100%"; - element.tabIndex = this.isDesignMode() ? -1 : 0; - this._toggleInputs = []; - this._labels = []; - for (var _i = 0, _a = this.choices; _i < _a.length; _i++) { - var choice = _a[_i]; - var input = document.createElement("input"); - input.id = Utils.generateUniqueId(); - input.type = type; - input.style.margin = "0"; - input.style.display = "inline-block"; - input.style.verticalAlign = "middle"; - input.style.flex = "0 0 auto"; - input.name = this.id ? this.id : this._uniqueCategoryName; - if (this.isRequired) { - input.setAttribute("aria-required", "true"); - } - input.tabIndex = this.isDesignMode() ? -1 : 0; - if (choice.value) { - input.value = choice.value; - } - if (choice.title) { - input.setAttribute("aria-label", choice.title); - } - if (defaultValues && choice.value) { - if (defaultValues.indexOf(choice.value) >= 0) { - input.checked = true; - } - } - input.onchange = function() { - _this.valueChanged(); - }; - this._toggleInputs.push(input); - var compoundInput = document.createElement("div"); - compoundInput.style.display = "flex"; - compoundInput.style.alignItems = "center"; - Utils.appendChild(compoundInput, input); - var label = new TextBlock(); - label.setParent(this); - label.forElementId = input.id; - label.hostConfig = this.hostConfig; - label.text = choice.title ? choice.title : "Choice " + this._toggleInputs.length; - label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox; - label.wrap = this.wrap; - var labelElement = label.render(); - this._labels.push(labelElement); - if (labelElement) { - labelElement.id = Utils.generateUniqueId(); - labelElement.style.display = "inline-block"; - labelElement.style.flex = "1 1 auto"; - labelElement.style.marginLeft = "6px"; - labelElement.style.verticalAlign = "middle"; - var spacerElement = document.createElement("div"); - spacerElement.style.width = "6px"; - Utils.appendChild(compoundInput, spacerElement); - Utils.appendChild(compoundInput, labelElement); - } - Utils.appendChild(element, compoundInput); - } - return element; - }; - ChoiceSetInput2.prototype.updateInputControlAriaLabelledBy = function() { - if ((this.isMultiSelect || this.style === "expanded") && this._toggleInputs && this._labels) { - var labelIds = this.getAllLabelIds(); - for (var i = 0; i < this._toggleInputs.length; i++) { - var joinedLabelIds = labelIds.join(" "); - var label = this._labels[i]; - if (label && label.id) { - joinedLabelIds += " " + label.id; - } - if (joinedLabelIds) { - this._toggleInputs[i].setAttribute("aria-labelledby", joinedLabelIds); - } else { - this._toggleInputs[i].removeAttribute("aria-labelledby"); - } - } - } else { - _super.prototype.updateInputControlAriaLabelledBy.call(this); - } - }; - ChoiceSetInput2.prototype.internalRender = function() { - var _this = this; - this._uniqueCategoryName = ChoiceSetInput2.getUniqueCategoryName(); - if (this.isMultiSelect) { - return this.renderCompoundInput("ac-choiceSetInput-multiSelect", "checkbox", this.defaultValue ? this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator) : void 0); - } else { - if (this.style === "expanded") { - return this.renderCompoundInput("ac-choiceSetInput-expanded", "radio", this.defaultValue ? [this.defaultValue] : void 0); - } else if (this.style === "filtered") { - var inputContainer = document.createElement("div"); - inputContainer.style.width = "100%"; - this._textInput = document.createElement("input"); - this._textInput.className = this.hostConfig.makeCssClassName("ac-input", "ac-multichoiceInput", "ac-choiceSetInput-filtered"); - this._textInput.type = "text"; - this._textInput.style.width = "100%"; - this._textInput.oninput = function() { - _this.valueChanged(); - if (_this._textInput) { - if (_this.value) { - _this._textInput.removeAttribute("placeholder"); - _this._textInput.removeAttribute("aria-label"); - } else if (_this.placeholder) { - _this._textInput.placeholder = _this.placeholder; - _this._textInput.setAttribute("aria-label", _this.placeholder); - } - } - }; - if (this.defaultValue) { - this._textInput.value = this.defaultValue; - } - if (this.placeholder && !this._textInput.value) { - this._textInput.placeholder = this.placeholder; - this._textInput.setAttribute("aria-label", this.placeholder); - } - this._textInput.tabIndex = this.isDesignMode() ? -1 : 0; - var dataList = document.createElement("datalist"); - dataList.id = Utils.generateUniqueId(); - for (var _i = 0, _a = this.choices; _i < _a.length; _i++) { - var choice = _a[_i]; - var option = document.createElement("option"); - if (choice.title) { - option.value = choice.title; - option.setAttribute("aria-label", choice.title); - } - option.tabIndex = this.isDesignMode() ? -1 : 0; - dataList.appendChild(option); - } - this._textInput.setAttribute("list", dataList.id); - inputContainer.append(this._textInput, dataList); - return inputContainer; - } else { - this._selectElement = document.createElement("select"); - this._selectElement.className = this.hostConfig.makeCssClassName("ac-input", "ac-multichoiceInput", "ac-choiceSetInput-compact"); - this._selectElement.style.width = "100%"; - this._selectElement.tabIndex = this.isDesignMode() ? -1 : 0; - var placeholderOption = document.createElement("option"); - placeholderOption.selected = true; - placeholderOption.disabled = true; - placeholderOption.hidden = true; - placeholderOption.value = ""; - if (this.placeholder) { - placeholderOption.text = this.placeholder; - } - Utils.appendChild(this._selectElement, placeholderOption); - for (var _b = 0, _c = this.choices; _b < _c.length; _b++) { - var choice = _c[_b]; - var option = document.createElement("option"); - option.value = choice.value; - if (choice.title) { - option.text = choice.title; - option.setAttribute("aria-label", choice.title); - } - option.tabIndex = this.isDesignMode() ? -1 : 0; - if (choice.value === this.defaultValue) { - option.selected = true; - } - Utils.appendChild(this._selectElement, option); - } - this._selectElement.onchange = function() { - _this.internalApplyAriaCurrent(); - _this.valueChanged(); - }; - this.internalApplyAriaCurrent(); - return this._selectElement; - } - } - }; - ChoiceSetInput2.prototype.getJsonTypeName = function() { - return "Input.ChoiceSet"; - }; - ChoiceSetInput2.prototype.focus = function() { - if (this._toggleInputs && (this.isMultiSelect || this.style === "expanded")) { - if (this._toggleInputs.length > 0) { - this._toggleInputs[0].focus(); - } - } else if (this._textInput) { - this._textInput.focus(); - } else { - _super.prototype.focus.call(this); - } - }; - ChoiceSetInput2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - if (this.choices.length === 0) { - context.addFailure(this, Enums.ValidationEvent.CollectionCantBeEmpty, strings_1.Strings.errors.choiceSetMustHaveAtLeastOneChoice()); - } - for (var _i = 0, _a = this.choices; _i < _a.length; _i++) { - var choice = _a[_i]; - if (!choice.title || !choice.value) { - context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.choiceSetChoicesMustHaveTitleAndValue()); - } - } - }; - ChoiceSetInput2.prototype.isSet = function() { - return this.value ? true : false; - }; - ChoiceSetInput2.prototype.isValid = function() { - if (this._textInput) { - if (this.value === "" || this.value === this.placeholder) { - return true; - } - for (var _i = 0, _a = this.choices; _i < _a.length; _i++) { - var choice = _a[_i]; - if (this.value === choice.value) { - return true; - } - } - return false; - } - return _super.prototype.isValid.call(this); - }; - Object.defineProperty(ChoiceSetInput2.prototype, "value", { - get: function() { - if (!this.isMultiSelect) { - if (this._selectElement) { - return this._selectElement.selectedIndex > 0 ? this._selectElement.value : void 0; - } else if (this._textInput) { - for (var _i = 0, _a = this.choices; _i < _a.length; _i++) { - var choice = _a[_i]; - if (choice.title && this._textInput.value === choice.title) { - return choice.value; - } - } - return this._textInput.value; - } else if (this._toggleInputs && this._toggleInputs.length > 0) { - for (var _b = 0, _c = this._toggleInputs; _b < _c.length; _b++) { - var toggleInput = _c[_b]; - if (toggleInput.checked) { - return toggleInput.value; - } - } - } - return void 0; - } else { - if (!this._toggleInputs || this._toggleInputs.length === 0) { - return void 0; - } - var result = ""; - for (var _d = 0, _f = this._toggleInputs; _d < _f.length; _d++) { - var toggleInput = _f[_d]; - if (toggleInput.checked) { - if (result !== "") { - result += this.hostConfig.choiceSetInputValueSeparator; - } - result += toggleInput.value; - } - } - return result ? result : void 0; - } - }, - enumerable: false, - configurable: true - }); - ChoiceSetInput2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value"); - ChoiceSetInput2.choicesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, "choices", Choice); - ChoiceSetInput2.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_0, "style", [ - { value: "compact" }, - { value: "expanded" }, - { value: "filtered", targetVersion: serialization_1.Versions.v1_5 } - ], "compact"); - ChoiceSetInput2.isMultiSelectProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "isMultiSelect", false); - ChoiceSetInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder"); - ChoiceSetInput2.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "wrap", false); - ChoiceSetInput2._uniqueCategoryCounter = 0; - __decorate([ - (0, serialization_1.property)(ChoiceSetInput2.valueProperty) - ], ChoiceSetInput2.prototype, "defaultValue", void 0); - __decorate([ - (0, serialization_1.property)(ChoiceSetInput2.styleProperty) - ], ChoiceSetInput2.prototype, "style", void 0); - __decorate([ - (0, serialization_1.property)(ChoiceSetInput2.isMultiSelectProperty) - ], ChoiceSetInput2.prototype, "isMultiSelect", void 0); - __decorate([ - (0, serialization_1.property)(ChoiceSetInput2.placeholderProperty) - ], ChoiceSetInput2.prototype, "placeholder", void 0); - __decorate([ - (0, serialization_1.property)(ChoiceSetInput2.wrapProperty) - ], ChoiceSetInput2.prototype, "wrap", void 0); - __decorate([ - (0, serialization_1.property)(ChoiceSetInput2.choicesProperty) - ], ChoiceSetInput2.prototype, "choices", void 0); - return ChoiceSetInput2; - }(Input) - ); - exports.ChoiceSetInput = ChoiceSetInput; - var NumberInput = ( - /** @class */ - function(_super) { - __extends(NumberInput2, _super); - function NumberInput2() { - return _super !== null && _super.apply(this, arguments) || this; - } - NumberInput2.prototype.internalRender = function() { - var _this = this; - this._numberInputElement = document.createElement("input"); - this._numberInputElement.setAttribute("type", "number"); - if (this.min !== void 0) { - this._numberInputElement.setAttribute("min", this.min.toString()); - } - if (this.max !== void 0) { - this._numberInputElement.setAttribute("max", this.max.toString()); - } - this._numberInputElement.className = this.hostConfig.makeCssClassName("ac-input", "ac-numberInput"); - this._numberInputElement.style.width = "100%"; - this._numberInputElement.tabIndex = this.isDesignMode() ? -1 : 0; - if (this.defaultValue !== void 0) { - this._numberInputElement.valueAsNumber = this.defaultValue; - } - if (this.placeholder) { - this._numberInputElement.placeholder = this.placeholder; - this._numberInputElement.setAttribute("aria-label", this.placeholder); - } - this._numberInputElement.oninput = function() { - _this.valueChanged(); - }; - return this._numberInputElement; - }; - NumberInput2.prototype.getJsonTypeName = function() { - return "Input.Number"; - }; - NumberInput2.prototype.isSet = function() { - return this.value !== void 0 && !isNaN(this.value); - }; - NumberInput2.prototype.isValid = function() { - if (this.value === void 0) { - return !this.isRequired; - } - var result = true; - if (this.min !== void 0) { - result = result && this.value >= this.min; - } - if (this.max !== void 0) { - result = result && this.value <= this.max; - } - return result; - }; - Object.defineProperty(NumberInput2.prototype, "value", { - get: function() { - return this._numberInputElement ? this._numberInputElement.valueAsNumber : void 0; - }, - set: function(value) { - if (value && this._numberInputElement) { - this._numberInputElement.value = value.toString(); - } - }, - enumerable: false, - configurable: true - }); - NumberInput2.valueProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "value"); - NumberInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder"); - NumberInput2.minProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "min"); - NumberInput2.maxProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "max"); - __decorate([ - (0, serialization_1.property)(NumberInput2.valueProperty) - ], NumberInput2.prototype, "defaultValue", void 0); - __decorate([ - (0, serialization_1.property)(NumberInput2.minProperty) - ], NumberInput2.prototype, "min", void 0); - __decorate([ - (0, serialization_1.property)(NumberInput2.maxProperty) - ], NumberInput2.prototype, "max", void 0); - __decorate([ - (0, serialization_1.property)(NumberInput2.placeholderProperty) - ], NumberInput2.prototype, "placeholder", void 0); - return NumberInput2; - }(Input) - ); - exports.NumberInput = NumberInput; - var DateInput = ( - /** @class */ - function(_super) { - __extends(DateInput2, _super); - function DateInput2() { - return _super !== null && _super.apply(this, arguments) || this; - } - DateInput2.prototype.internalRender = function() { - var _this = this; - this._dateInputElement = document.createElement("input"); - this._dateInputElement.setAttribute("type", "date"); - if (this.min) { - this._dateInputElement.setAttribute("min", this.min); - } - if (this.max) { - this._dateInputElement.setAttribute("max", this.max); - } - if (this.placeholder) { - this._dateInputElement.placeholder = this.placeholder; - this._dateInputElement.setAttribute("aria-label", this.placeholder); - } - this._dateInputElement.tabIndex = this.isDesignMode() ? -1 : 0; - this._dateInputElement.className = this.hostConfig.makeCssClassName("ac-input", "ac-dateInput"); - this._dateInputElement.style.width = "100%"; - this._dateInputElement.oninput = function() { - _this.valueChanged(); - }; - if (this.defaultValue) { - this._dateInputElement.value = this.defaultValue; - } - return this._dateInputElement; - }; - DateInput2.prototype.getJsonTypeName = function() { - return "Input.Date"; - }; - DateInput2.prototype.isSet = function() { - return this.value ? true : false; - }; - DateInput2.prototype.isValid = function() { - if (!this.value) { - return !this.isRequired; - } - var valueAsDate = new Date(this.value); - var result = true; - if (this.min) { - var minDate = new Date(this.min); - result = result && valueAsDate >= minDate; - } - if (this.max) { - var maxDate = new Date(this.max); - result = result && valueAsDate <= maxDate; - } - return result; - }; - Object.defineProperty(DateInput2.prototype, "value", { - get: function() { - return this._dateInputElement ? this._dateInputElement.value : void 0; - }, - enumerable: false, - configurable: true - }); - DateInput2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value"); - DateInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder"); - DateInput2.minProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "min"); - DateInput2.maxProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "max"); - __decorate([ - (0, serialization_1.property)(DateInput2.valueProperty) - ], DateInput2.prototype, "defaultValue", void 0); - __decorate([ - (0, serialization_1.property)(DateInput2.minProperty) - ], DateInput2.prototype, "min", void 0); - __decorate([ - (0, serialization_1.property)(DateInput2.maxProperty) - ], DateInput2.prototype, "max", void 0); - __decorate([ - (0, serialization_1.property)(DateInput2.placeholderProperty) - ], DateInput2.prototype, "placeholder", void 0); - return DateInput2; - }(Input) - ); - exports.DateInput = DateInput; - var TimeProperty = ( - /** @class */ - function(_super) { - __extends(TimeProperty2, _super); - function TimeProperty2(targetVersion, name) { - var _this = _super.call(this, targetVersion, name, function(sender, prop, source, context) { - var value = source[prop.name]; - if (typeof value === "string" && value && /^[0-9]{2}:[0-9]{2}$/.test(value)) { - return value; - } - return void 0; - }, function(sender, prop, target, value, context) { - context.serializeValue(target, prop.name, value); - }) || this; - _this.targetVersion = targetVersion; - _this.name = name; - return _this; - } - return TimeProperty2; - }(serialization_1.CustomProperty) - ); - exports.TimeProperty = TimeProperty; - var TimeInput = ( - /** @class */ - function(_super) { - __extends(TimeInput2, _super); - function TimeInput2() { - return _super !== null && _super.apply(this, arguments) || this; - } - TimeInput2.convertTimeStringToDate = function(timeString) { - return /* @__PURE__ */ new Date("1973-09-04T" + timeString + ":00Z"); - }; - TimeInput2.prototype.internalRender = function() { - var _this = this; - this._timeInputElement = document.createElement("input"); - this._timeInputElement.setAttribute("type", "time"); - if (this.min) { - this._timeInputElement.setAttribute("min", this.min); - } - if (this.max) { - this._timeInputElement.setAttribute("max", this.max); - } - this._timeInputElement.className = this.hostConfig.makeCssClassName("ac-input", "ac-timeInput"); - this._timeInputElement.style.width = "100%"; - this._timeInputElement.oninput = function() { - _this.valueChanged(); - }; - if (this.placeholder) { - this._timeInputElement.placeholder = this.placeholder; - this._timeInputElement.setAttribute("aria-label", this.placeholder); - } - this._timeInputElement.tabIndex = this.isDesignMode() ? -1 : 0; - if (this.defaultValue) { - this._timeInputElement.value = this.defaultValue; - } - return this._timeInputElement; - }; - TimeInput2.prototype.getJsonTypeName = function() { - return "Input.Time"; - }; - TimeInput2.prototype.isSet = function() { - return this.value ? true : false; - }; - TimeInput2.prototype.isValid = function() { - if (!this.value) { - return !this.isRequired; - } - var valueAsDate = TimeInput2.convertTimeStringToDate(this.value); - var result = true; - if (this.min) { - var minDate = TimeInput2.convertTimeStringToDate(this.min); - result = result && valueAsDate >= minDate; - } - if (this.max) { - var maxDate = TimeInput2.convertTimeStringToDate(this.max); - result = result && valueAsDate <= maxDate; - } - return result; - }; - Object.defineProperty(TimeInput2.prototype, "value", { - get: function() { - return this._timeInputElement ? this._timeInputElement.value : void 0; - }, - enumerable: false, - configurable: true - }); - TimeInput2.valueProperty = new TimeProperty(serialization_1.Versions.v1_0, "value"); - TimeInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder"); - TimeInput2.minProperty = new TimeProperty(serialization_1.Versions.v1_0, "min"); - TimeInput2.maxProperty = new TimeProperty(serialization_1.Versions.v1_0, "max"); - __decorate([ - (0, serialization_1.property)(TimeInput2.valueProperty) - ], TimeInput2.prototype, "defaultValue", void 0); - __decorate([ - (0, serialization_1.property)(TimeInput2.minProperty) - ], TimeInput2.prototype, "min", void 0); - __decorate([ - (0, serialization_1.property)(TimeInput2.maxProperty) - ], TimeInput2.prototype, "max", void 0); - __decorate([ - (0, serialization_1.property)(TimeInput2.placeholderProperty) - ], TimeInput2.prototype, "placeholder", void 0); - return TimeInput2; - }(Input) - ); - exports.TimeInput = TimeInput; - var Action = ( - /** @class */ - function(_super) { - __extends(Action2, _super); - function Action2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.style = Enums.ActionStyle.Default; - _this.mode = Enums.ActionMode.Primary; - _this._state = 0; - _this._isFocusable = true; - return _this; - } - Action2.prototype.renderButtonContent = function() { - if (this.renderedElement) { - var hostConfig = this.hostConfig; - var titleElement = document.createElement("div"); - titleElement.style.overflow = "hidden"; - titleElement.style.textOverflow = "ellipsis"; - if (!(hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle || hostConfig.actions.allowTitleToWrap)) { - titleElement.style.whiteSpace = "nowrap"; - } - if (this.title) { - titleElement.innerText = this.title; - } - if (!this.iconUrl) { - this.renderedElement.classList.add("noIcon"); - this.renderedElement.appendChild(titleElement); - } else { - var iconElement = document.createElement("img"); - iconElement.src = this.iconUrl; - iconElement.style.width = hostConfig.actions.iconSize + "px"; - iconElement.style.height = hostConfig.actions.iconSize + "px"; - iconElement.style.flex = "0 0 auto"; - if (hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle) { - this.renderedElement.classList.add("iconAbove"); - this.renderedElement.style.flexDirection = "column"; - if (this.title) { - iconElement.style.marginBottom = "6px"; - } - } else { - this.renderedElement.classList.add("iconLeft"); - iconElement.style.maxHeight = "100%"; - if (this.title) { - iconElement.style.marginRight = "6px"; - } - } - this.renderedElement.appendChild(iconElement); - this.renderedElement.appendChild(titleElement); - } - } - }; - Action2.prototype.getParentContainer = function() { - if (this.parent instanceof Container) { - return this.parent; - } - return this.parent ? this.parent.getParentContainer() : void 0; - }; - Action2.prototype.isDesignMode = function() { - var rootElement = this.getRootObject(); - return rootElement instanceof CardElement && rootElement.isDesignMode(); - }; - Action2.prototype.updateCssClasses = function() { - var _a, _b; - if (this.parent && this.renderedElement) { - var hostConfig = this.parent.hostConfig; - this.renderedElement.className = hostConfig.makeCssClassName(this.isEffectivelyEnabled() ? "ac-pushButton" : "ac-pushButton-disabled"); - var parentContainer = this.getParentContainer(); - if (parentContainer) { - var parentContainerStyle = parentContainer.getEffectiveStyle(); - if (parentContainerStyle) { - this.renderedElement.classList.add("style-" + parentContainerStyle); - } - } - this.renderedElement.tabIndex = !this.isDesignMode() && this.isFocusable ? 0 : -1; - switch (this._state) { - case 0: - break; - case 1: - this.renderedElement.classList.add(hostConfig.makeCssClassName("expanded")); - break; - case 2: - this.renderedElement.classList.add(hostConfig.makeCssClassName("subdued")); - break; - } - if (this.style && this.isEffectivelyEnabled()) { - if (this.style === Enums.ActionStyle.Positive) { - (_a = this.renderedElement.classList).add.apply(_a, hostConfig.makeCssClassNames("primary", "style-positive")); - } else { - (_b = this.renderedElement.classList).add.apply(_b, hostConfig.makeCssClassNames("style-" + this.style.toLowerCase())); - } - } - } - }; - Action2.prototype.getDefaultSerializationContext = function() { - return new SerializationContext(); - }; - Action2.prototype.internalGetReferencedInputs = function() { - return {}; - }; - Action2.prototype.internalPrepareForExecution = function(_inputs) { - }; - Action2.prototype.internalValidateInputs = function(referencedInputs) { - var result = []; - if (referencedInputs) { - for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) { - var key = _a[_i]; - var input = referencedInputs[key]; - if (!input.validateValue()) { - result.push(input); - } - } - } - return result; - }; - Action2.prototype.shouldSerialize = function(context) { - return context.actionRegistry.findByName(this.getJsonTypeName()) !== void 0; - }; - Action2.prototype.raiseExecuteActionEvent = function() { - if (this.onExecute) { - this.onExecute(this); - } - raiseExecuteActionEvent(this); - }; - Action2.prototype.internalAfterExecute = function() { - var rootObject = this.getRootObject(); - if (rootObject instanceof CardElement) { - rootObject.updateActionsEnabledState(); - } - }; - Action2.prototype.getHref = function() { - return ""; - }; - Action2.prototype.getAriaRole = function() { - return "button"; - }; - Action2.prototype.setupElementForAccessibility = function(element, promoteTooltipToLabel) { - if (promoteTooltipToLabel === void 0) { - promoteTooltipToLabel = false; - } - element.tabIndex = this.isEffectivelyEnabled() && !this.isDesignMode() ? 0 : -1; - element.setAttribute("role", this.getAriaRole()); - if (element instanceof HTMLButtonElement) { - element.disabled = !this.isEffectivelyEnabled(); - } - if (!this.isEffectivelyEnabled()) { - element.setAttribute("aria-disabled", "true"); - } else { - element.removeAttribute("aria-disabled"); - element.classList.add(this.hostConfig.makeCssClassName("ac-selectable")); - } - if (this.title) { - element.setAttribute("aria-label", this.title); - element.title = this.title; - } else { - element.removeAttribute("aria-label"); - element.removeAttribute("title"); - } - if (this.tooltip) { - var targetAriaAttribute = promoteTooltipToLabel ? this.title ? "aria-description" : "aria-label" : "aria-description"; - element.setAttribute(targetAriaAttribute, this.tooltip); - element.title = this.tooltip; - } - }; - Action2.prototype.parse = function(source, context) { - return _super.prototype.parse.call(this, source, context ? context : new SerializationContext()); - }; - Action2.prototype.render = function() { - var _this = this; - var buttonElement = document.createElement("button"); - buttonElement.type = "button"; - buttonElement.style.display = "flex"; - buttonElement.style.alignItems = "center"; - buttonElement.style.justifyContent = "center"; - buttonElement.onclick = function(e) { - if (_this.isEffectivelyEnabled()) { - e.preventDefault(); - e.cancelBubble = true; - _this.execute(); - } - }; - this._renderedElement = buttonElement; - this.renderButtonContent(); - this.updateCssClasses(); - this.setupElementForAccessibility(buttonElement); - }; - Action2.prototype.execute = function() { - if (this._actionCollection) { - this._actionCollection.actionExecuted(this); - } - this.raiseExecuteActionEvent(); - this.internalAfterExecute(); - }; - Action2.prototype.prepareForExecution = function() { - var referencedInputs = this.getReferencedInputs(); - var invalidInputs = this.internalValidateInputs(referencedInputs); - if (invalidInputs.length > 0) { - invalidInputs[0].focus(); - return false; - } - this.internalPrepareForExecution(referencedInputs); - return true; - }; - Action2.prototype.remove = function() { - if (this._actionCollection) { - return this._actionCollection.removeAction(this); - } - return false; - }; - Action2.prototype.getAllInputs = function(processActions) { - if (processActions === void 0) { - processActions = true; - } - return []; - }; - Action2.prototype.getAllActions = function() { - return [this]; - }; - Action2.prototype.getResourceInformation = function() { - return this.iconUrl ? [{ url: this.iconUrl, mimeType: "image" }] : []; - }; - Action2.prototype.getActionById = function(id) { - return this.id === id ? this : void 0; - }; - Action2.prototype.getReferencedInputs = function() { - return this.internalGetReferencedInputs(); - }; - Action2.prototype.validateInputs = function() { - return this.internalValidateInputs(this.getReferencedInputs()); - }; - Action2.prototype.updateEnabledState = function() { - }; - Action2.prototype.isEffectivelyEnabled = function() { - return this.isEnabled; - }; - Object.defineProperty(Action2.prototype, "isPrimary", { - get: function() { - return this.style === Enums.ActionStyle.Positive; - }, - set: function(value) { - if (value) { - this.style = Enums.ActionStyle.Positive; - } else { - if (this.style === Enums.ActionStyle.Positive) { - this.style = Enums.ActionStyle.Default; - } - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Action2.prototype, "hostConfig", { - get: function() { - return this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Action2.prototype, "parent", { - get: function() { - return this._parent; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Action2.prototype, "state", { - get: function() { - return this._state; - }, - set: function(value) { - if (this._state !== value) { - this._state = value; - this.updateCssClasses(); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Action2.prototype, "isFocusable", { - get: function() { - return this._isFocusable; - }, - set: function(value) { - if (this._isFocusable !== value) { - this._isFocusable = value; - this.updateCssClasses(); - } - }, - enumerable: false, - configurable: true - }); - Action2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "title"); - Action2.iconUrlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "iconUrl"); - Action2.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_2, "style", [ - { value: Enums.ActionStyle.Default }, - { value: Enums.ActionStyle.Positive }, - { value: Enums.ActionStyle.Destructive } - ], Enums.ActionStyle.Default); - Action2.modeProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, "mode", [{ value: Enums.ActionMode.Primary }, { value: Enums.ActionMode.Secondary }], Enums.ActionMode.Primary); - Action2.tooltipProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_5, "tooltip"); - Action2.isEnabledProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, "isEnabled", true); - __decorate([ - (0, serialization_1.property)(Action2.titleProperty) - ], Action2.prototype, "title", void 0); - __decorate([ - (0, serialization_1.property)(Action2.iconUrlProperty) - ], Action2.prototype, "iconUrl", void 0); - __decorate([ - (0, serialization_1.property)(Action2.styleProperty) - ], Action2.prototype, "style", void 0); - __decorate([ - (0, serialization_1.property)(Action2.modeProperty) - ], Action2.prototype, "mode", void 0); - __decorate([ - (0, serialization_1.property)(Action2.tooltipProperty) - ], Action2.prototype, "tooltip", void 0); - __decorate([ - (0, serialization_1.property)(Action2.isEnabledProperty) - ], Action2.prototype, "isEnabled", void 0); - return Action2; - }(card_object_1.CardObject) - ); - exports.Action = Action; - var SubmitActionBase = ( - /** @class */ - function(_super) { - __extends(SubmitActionBase2, _super); - function SubmitActionBase2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.disabledUnlessAssociatedInputsChange = false; - _this._isPrepared = false; - _this._areReferencedInputsDirty = false; - return _this; - } - SubmitActionBase2.prototype.internalGetReferencedInputs = function() { - var result = {}; - if (this.associatedInputs !== "none") { - var current = this.parent; - var inputs = []; - while (current) { - inputs.push.apply(inputs, current.getAllInputs(false)); - current = current.parent; - } - for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) { - var input = inputs_1[_i]; - if (input.id) { - result[input.id] = input; - } - } - } - return result; - }; - SubmitActionBase2.prototype.internalPrepareForExecution = function(inputs) { - if (this._originalData) { - this._processedData = JSON.parse(JSON.stringify(this._originalData)); - } else { - this._processedData = {}; - } - if (this._processedData && inputs) { - for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) { - var key = _a[_i]; - var input = inputs[key]; - if (input.id && input.isSet()) { - this._processedData[input.id] = typeof input.value === "string" ? input.value : input.value.toString(); - } - } - } - this._isPrepared = true; - }; - SubmitActionBase2.prototype.internalAfterExecute = function() { - if (shared_1.GlobalSettings.resetInputsDirtyStateAfterActionExecution) { - this.resetReferencedInputsDirtyState(); - } - }; - SubmitActionBase2.prototype.resetReferencedInputsDirtyState = function() { - var referencedInputs = this.getReferencedInputs(); - this._areReferencedInputsDirty = false; - if (referencedInputs) { - for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) { - var key = _a[_i]; - var input = referencedInputs[key]; - input.resetDirtyState(); - } - } - }; - SubmitActionBase2.prototype.updateEnabledState = function() { - this._areReferencedInputsDirty = false; - var referencedInputs = this.getReferencedInputs(); - if (referencedInputs) { - for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) { - var key = _a[_i]; - var input = referencedInputs[key]; - if (input.isDirty()) { - this._areReferencedInputsDirty = true; - break; - } - } - } - this.updateCssClasses(); - if (this._renderedElement) { - this.setupElementForAccessibility(this._renderedElement); - } - }; - SubmitActionBase2.prototype.isEffectivelyEnabled = function() { - var result = _super.prototype.isEffectivelyEnabled.call(this); - return this.disabledUnlessAssociatedInputsChange ? result && this._areReferencedInputsDirty : result; - }; - Object.defineProperty(SubmitActionBase2.prototype, "data", { - get: function() { - return this._isPrepared ? this._processedData : this._originalData; - }, - set: function(value) { - this._originalData = value; - this._isPrepared = false; - }, - enumerable: false, - configurable: true - }); - SubmitActionBase2.dataProperty = new serialization_1.PropertyDefinition(serialization_1.Versions.v1_0, "data"); - SubmitActionBase2.associatedInputsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_3, "associatedInputs", function(sender, prop, source, context) { - var value = source[prop.name]; - if (value !== void 0 && typeof value === "string") { - return value.toLowerCase() === "none" ? "none" : "auto"; - } - return void 0; - }, function(sender, prop, target, value, context) { - context.serializeValue(target, prop.name, value); - }); - SubmitActionBase2.disabledUnlessAssociatedInputsChangeProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_6, "disabledUnlessAssociatedInputsChange", false); - __decorate([ - (0, serialization_1.property)(SubmitActionBase2.dataProperty) - ], SubmitActionBase2.prototype, "_originalData", void 0); - __decorate([ - (0, serialization_1.property)(SubmitActionBase2.associatedInputsProperty) - ], SubmitActionBase2.prototype, "associatedInputs", void 0); - __decorate([ - (0, serialization_1.property)(SubmitActionBase2.disabledUnlessAssociatedInputsChangeProperty) - ], SubmitActionBase2.prototype, "disabledUnlessAssociatedInputsChange", void 0); - return SubmitActionBase2; - }(Action) - ); - exports.SubmitActionBase = SubmitActionBase; - var SubmitAction = ( - /** @class */ - function(_super) { - __extends(SubmitAction2, _super); - function SubmitAction2() { - return _super !== null && _super.apply(this, arguments) || this; - } - SubmitAction2.prototype.getJsonTypeName = function() { - return SubmitAction2.JsonTypeName; - }; - SubmitAction2.JsonTypeName = "Action.Submit"; - return SubmitAction2; - }(SubmitActionBase) - ); - exports.SubmitAction = SubmitAction; - var ExecuteAction = ( - /** @class */ - function(_super) { - __extends(ExecuteAction2, _super); - function ExecuteAction2() { - return _super !== null && _super.apply(this, arguments) || this; - } - ExecuteAction2.prototype.getJsonTypeName = function() { - return ExecuteAction2.JsonTypeName; - }; - ExecuteAction2.JsonTypeName = "Action.Execute"; - ExecuteAction2.verbProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "verb"); - __decorate([ - (0, serialization_1.property)(ExecuteAction2.verbProperty) - ], ExecuteAction2.prototype, "verb", void 0); - return ExecuteAction2; - }(SubmitActionBase) - ); - exports.ExecuteAction = ExecuteAction; - var OpenUrlAction = ( - /** @class */ - function(_super) { - __extends(OpenUrlAction2, _super); - function OpenUrlAction2() { - return _super !== null && _super.apply(this, arguments) || this; - } - OpenUrlAction2.prototype.getJsonTypeName = function() { - return OpenUrlAction2.JsonTypeName; - }; - OpenUrlAction2.prototype.getAriaRole = function() { - return "link"; - }; - OpenUrlAction2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - if (!this.url) { - context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("url")); - } - }; - OpenUrlAction2.prototype.getHref = function() { - return this.url; - }; - OpenUrlAction2.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "url"); - OpenUrlAction2.JsonTypeName = "Action.OpenUrl"; - __decorate([ - (0, serialization_1.property)(OpenUrlAction2.urlProperty) - ], OpenUrlAction2.prototype, "url", void 0); - return OpenUrlAction2; - }(Action) - ); - exports.OpenUrlAction = OpenUrlAction; - var ToggleVisibilityAction = ( - /** @class */ - function(_super) { - __extends(ToggleVisibilityAction2, _super); - function ToggleVisibilityAction2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.targetElements = {}; - return _this; - } - ToggleVisibilityAction2.prototype.updateAriaControlsAttribute = function() { - if (this.targetElements) { - var elementIds = Object.keys(this.targetElements); - if (this._renderedElement) { - if (elementIds.length > 0) { - this._renderedElement.setAttribute("aria-controls", elementIds.join(" ")); - } else { - this._renderedElement.removeAttribute("aria-controls"); - } - } - } - }; - ToggleVisibilityAction2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - if (!this.targetElements) { - context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("targetElements")); - } - }; - ToggleVisibilityAction2.prototype.getJsonTypeName = function() { - return ToggleVisibilityAction2.JsonTypeName; - }; - ToggleVisibilityAction2.prototype.render = function() { - _super.prototype.render.call(this); - this.updateAriaControlsAttribute(); - }; - ToggleVisibilityAction2.prototype.execute = function() { - _super.prototype.execute.call(this); - if (this.parent) { - for (var _i = 0, _a = Object.keys(this.targetElements); _i < _a.length; _i++) { - var elementId = _a[_i]; - var targetElement = this.parent.getRootElement().getElementById(elementId); - if (targetElement) { - if (typeof this.targetElements[elementId] === "boolean") { - targetElement.isVisible = this.targetElements[elementId]; - } else { - targetElement.isVisible = !targetElement.isVisible; - } - } - } - } - }; - ToggleVisibilityAction2.prototype.addTargetElement = function(elementId, isVisible) { - if (isVisible === void 0) { - isVisible = void 0; - } - this.targetElements[elementId] = isVisible; - this.updateAriaControlsAttribute(); - }; - ToggleVisibilityAction2.prototype.removeTargetElement = function(elementId) { - delete this.targetElements[elementId]; - this.updateAriaControlsAttribute(); - }; - ToggleVisibilityAction2.targetElementsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_2, "targetElements", function(sender, prop, source, context) { - var result = {}; - if (Array.isArray(source[prop.name])) { - for (var _i = 0, _a = source[prop.name]; _i < _a.length; _i++) { - var item = _a[_i]; - if (typeof item === "string") { - result[item] = void 0; - } else if (typeof item === "object") { - var elementId = item["elementId"]; - if (typeof elementId === "string") { - result[elementId] = Utils.parseBool(item["isVisible"]); - } - } - } - } - return result; - }, function(sender, prop, target, value, context) { - var targetElements = []; - for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) { - var id = _a[_i]; - if (typeof value[id] === "boolean") { - targetElements.push({ - elementId: id, - isVisible: value[id] - }); - } else { - targetElements.push(id); - } - } - context.serializeArray(target, prop.name, targetElements); - }, {}, function(sender) { - return {}; - }); - ToggleVisibilityAction2.JsonTypeName = "Action.ToggleVisibility"; - __decorate([ - (0, serialization_1.property)(ToggleVisibilityAction2.targetElementsProperty) - ], ToggleVisibilityAction2.prototype, "targetElements", void 0); - return ToggleVisibilityAction2; - }(Action) - ); - exports.ToggleVisibilityAction = ToggleVisibilityAction; - var StringWithSubstitutionProperty = ( - /** @class */ - function(_super) { - __extends(StringWithSubstitutionProperty2, _super); - function StringWithSubstitutionProperty2(targetVersion, name) { - var _this = _super.call(this, targetVersion, name, void 0, function() { - return new shared_1.StringWithSubstitutions(); - }) || this; - _this.targetVersion = targetVersion; - _this.name = name; - return _this; - } - StringWithSubstitutionProperty2.prototype.parse = function(sender, source, context) { - var result = new shared_1.StringWithSubstitutions(); - result.set(Utils.parseString(source[this.name])); - return result; - }; - StringWithSubstitutionProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeValue(target, this.name, value.getOriginal()); - }; - return StringWithSubstitutionProperty2; - }(serialization_1.PropertyDefinition) - ); - var HttpHeader = ( - /** @class */ - function(_super) { - __extends(HttpHeader2, _super); - function HttpHeader2(name, value) { - if (name === void 0) { - name = ""; - } - if (value === void 0) { - value = ""; - } - var _this = _super.call(this) || this; - _this.name = name; - _this.value = value; - return _this; - } - HttpHeader2.prototype.getSchemaKey = function() { - return "HttpHeader"; - }; - HttpHeader2.prototype.getReferencedInputs = function(inputs, referencedInputs) { - this._value.getReferencedInputs(inputs, referencedInputs); - }; - HttpHeader2.prototype.prepareForExecution = function(inputs) { - this._value.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded); - }; - Object.defineProperty(HttpHeader2.prototype, "value", { - get: function() { - return this._value.get(); - }, - set: function(newValue) { - this._value.set(newValue); - }, - enumerable: false, - configurable: true - }); - HttpHeader2.nameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "name"); - HttpHeader2.valueProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, "value"); - __decorate([ - (0, serialization_1.property)(HttpHeader2.nameProperty) - ], HttpHeader2.prototype, "name", void 0); - __decorate([ - (0, serialization_1.property)(HttpHeader2.valueProperty) - ], HttpHeader2.prototype, "_value", void 0); - return HttpHeader2; - }(serialization_1.SerializableObject) - ); - exports.HttpHeader = HttpHeader; - var HttpAction = ( - /** @class */ - function(_super) { - __extends(HttpAction2, _super); - function HttpAction2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._ignoreInputValidation = false; - return _this; - } - HttpAction2.prototype.internalGetReferencedInputs = function() { - var allInputs = this.parent ? this.parent.getRootElement().getAllInputs() : []; - var result = {}; - this._url.getReferencedInputs(allInputs, result); - for (var _i = 0, _a = this.headers; _i < _a.length; _i++) { - var header = _a[_i]; - header.getReferencedInputs(allInputs, result); - } - this._body.getReferencedInputs(allInputs, result); - return result; - }; - HttpAction2.prototype.internalPrepareForExecution = function(inputs) { - if (inputs) { - this._url.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded); - var contentType = shared_1.ContentTypes.applicationJson; - for (var _i = 0, _a = this.headers; _i < _a.length; _i++) { - var header = _a[_i]; - header.prepareForExecution(inputs); - if (header.name && header.name.toLowerCase() === "content-type") { - contentType = header.value; - } - } - this._body.substituteInputValues(inputs, contentType); - } - }; - HttpAction2.prototype.getJsonTypeName = function() { - return HttpAction2.JsonTypeName; - }; - HttpAction2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - if (!this.url) { - context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("url")); - } - if (this.headers.length > 0) { - for (var _i = 0, _a = this.headers; _i < _a.length; _i++) { - var header = _a[_i]; - if (!header.name) { - context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.actionHttpHeadersMustHaveNameAndValue()); - } - } - } - }; - Object.defineProperty(HttpAction2.prototype, "ignoreInputValidation", { - get: function() { - return this._ignoreInputValidation; - }, - set: function(value) { - this._ignoreInputValidation = value; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(HttpAction2.prototype, "url", { - get: function() { - return this._url.get(); - }, - set: function(value) { - this._url.set(value); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(HttpAction2.prototype, "body", { - get: function() { - return this._body.get(); - }, - set: function(value) { - this._body.set(value); - }, - enumerable: false, - configurable: true - }); - HttpAction2.urlProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, "url"); - HttpAction2.bodyProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, "body"); - HttpAction2.methodProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "method"); - HttpAction2.headersProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, "headers", HttpHeader); - HttpAction2.ignoreInputValidationProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, "ignoreInputValidation", false); - HttpAction2.JsonTypeName = "Action.Http"; - __decorate([ - (0, serialization_1.property)(HttpAction2.urlProperty) - ], HttpAction2.prototype, "_url", void 0); - __decorate([ - (0, serialization_1.property)(HttpAction2.bodyProperty) - ], HttpAction2.prototype, "_body", void 0); - __decorate([ - (0, serialization_1.property)(HttpAction2.methodProperty) - ], HttpAction2.prototype, "method", void 0); - __decorate([ - (0, serialization_1.property)(HttpAction2.headersProperty) - ], HttpAction2.prototype, "headers", void 0); - __decorate([ - (0, serialization_1.property)(HttpAction2.ignoreInputValidationProperty) - ], HttpAction2.prototype, "_ignoreInputValidation", void 0); - return HttpAction2; - }(Action) - ); - exports.HttpAction = HttpAction; - var ShowCardAction = ( - /** @class */ - function(_super) { - __extends(ShowCardAction2, _super); - function ShowCardAction2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.card = new InlineAdaptiveCard(); - return _this; - } - ShowCardAction2.prototype.updateCssClasses = function() { - _super.prototype.updateCssClasses.call(this); - if (this.renderedElement) { - var effectiveHostConfig = this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig; - this.renderedElement.classList.add(effectiveHostConfig.makeCssClassName("expandable")); - this.renderedElement.setAttribute("aria-expanded", (this.state === 1).toString()); - } - }; - ShowCardAction2.prototype.internalParse = function(source, context) { - _super.prototype.internalParse.call(this, source, context); - var jsonCard = source["card"]; - if (jsonCard) { - this.card.parse(jsonCard, context); - } else { - context.logParseEvent(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.showCardMustHaveCard()); - } - }; - ShowCardAction2.prototype.internalToJSON = function(target, context) { - _super.prototype.internalToJSON.call(this, target, context); - if (this.card) { - context.serializeValue(target, "card", this.card.toJSON(context)); - } - }; - ShowCardAction2.prototype.raiseExecuteActionEvent = function() { - if (this.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Popup) { - _super.prototype.raiseExecuteActionEvent.call(this); - } - }; - ShowCardAction2.prototype.releaseDOMResources = function() { - _super.prototype.releaseDOMResources.call(this); - this.card.releaseDOMResources(); - }; - ShowCardAction2.prototype.getJsonTypeName = function() { - return ShowCardAction2.JsonTypeName; - }; - ShowCardAction2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - this.card.internalValidateProperties(context); - }; - ShowCardAction2.prototype.setParent = function(value) { - _super.prototype.setParent.call(this, value); - this.card.setParent(value); - }; - ShowCardAction2.prototype.getAllInputs = function(processActions) { - if (processActions === void 0) { - processActions = true; - } - return this.card.getAllInputs(processActions); - }; - ShowCardAction2.prototype.getAllActions = function() { - var result = _super.prototype.getAllActions.call(this); - result.push.apply(result, this.card.getAllActions()); - return result; - }; - ShowCardAction2.prototype.getResourceInformation = function() { - var result = _super.prototype.getResourceInformation.call(this); - result.push.apply(result, this.card.getResourceInformation()); - return result; - }; - ShowCardAction2.prototype.getActionById = function(id) { - var result = _super.prototype.getActionById.call(this, id); - if (!result) { - result = this.card.getActionById(id); - } - return result; - }; - ShowCardAction2.JsonTypeName = "Action.ShowCard"; - return ShowCardAction2; - }(Action) - ); - exports.ShowCardAction = ShowCardAction; - var OverflowAction = ( - /** @class */ - function(_super) { - __extends(OverflowAction2, _super); - function OverflowAction2(actions) { - var _this = _super.call(this) || this; - _this._actions = actions; - _this.title = strings_1.Strings.defaults.overflowButtonText(); - return _this; - } - OverflowAction2.prototype.getActions = function() { - return this._actions; - }; - OverflowAction2.prototype.getAllActions = function() { - var result = _super.prototype.getAllActions.call(this); - result.push.apply(result, this._actions); - return result; - }; - OverflowAction2.prototype.getJsonTypeName = function() { - return ShowCardAction.JsonTypeName; - }; - OverflowAction2.prototype.execute = function() { - var _this = this; - var _a; - var shouldDisplayPopupMenu = !raiseDisplayOverflowActionMenuEvent(this, this.renderedElement); - if (shouldDisplayPopupMenu && this.renderedElement) { - var contextMenu_1 = new controls_1.PopupMenu(); - contextMenu_1.hostConfig = this.hostConfig; - var _loop_2 = function(i2) { - var menuItem = new controls_1.MenuItem(i2.toString(), (_a = this_1._actions[i2].title) !== null && _a !== void 0 ? _a : ""); - menuItem.isEnabled = this_1._actions[i2].isEnabled; - menuItem.onClick = function() { - var actionToExecute = _this._actions[i2]; - contextMenu_1.closePopup(false); - if (actionToExecute.isEnabled) { - actionToExecute.execute(); - } - }; - contextMenu_1.items.add(menuItem); - }; - var this_1 = this; - for (var i = 0; i < this._actions.length; i++) { - _loop_2(i); - } - contextMenu_1.popup(this.renderedElement); - } - }; - OverflowAction2.JsonTypeName = "Action.Overflow"; - return OverflowAction2; - }(Action) - ); - var ActionCollection = ( - /** @class */ - function() { - function ActionCollection2(owner) { - this._items = []; - this._renderedActions = []; - this._owner = owner; - } - ActionCollection2.prototype.isActionAllowed = function(action) { - var forbiddenTypes = this._owner.getForbiddenActionTypes(); - if (forbiddenTypes) { - for (var _i = 0, forbiddenTypes_1 = forbiddenTypes; _i < forbiddenTypes_1.length; _i++) { - var forbiddenType = forbiddenTypes_1[_i]; - if (action.constructor === forbiddenType) { - return false; - } - } - } - return true; - }; - ActionCollection2.prototype.refreshContainer = function() { - clearElement(this._actionCardContainer); - if (!this._actionCard) { - this._actionCardContainer.style.marginTop = "0px"; - return; - } - this._actionCardContainer.style.marginTop = this.renderedActionCount > 0 ? this._owner.hostConfig.actions.showCard.inlineTopMargin + "px" : "0px"; - var padding = this._owner.getEffectivePadding(); - this._owner.getImmediateSurroundingPadding(padding); - var physicalPadding = this._owner.hostConfig.paddingDefinitionToSpacingDefinition(padding); - if (this._actionCard) { - this._actionCard.style.paddingLeft = physicalPadding.left + "px"; - this._actionCard.style.paddingRight = physicalPadding.right + "px"; - this._actionCard.style.marginLeft = "-" + physicalPadding.left + "px"; - this._actionCard.style.marginRight = "-" + physicalPadding.right + "px"; - if (physicalPadding.bottom !== 0 && !this._owner.isDesignMode()) { - this._actionCard.style.paddingBottom = physicalPadding.bottom + "px"; - this._actionCard.style.marginBottom = "-" + physicalPadding.bottom + "px"; - } - Utils.appendChild(this._actionCardContainer, this._actionCard); - } - }; - ActionCollection2.prototype.layoutChanged = function() { - this._owner.getRootElement().updateLayout(); - }; - ActionCollection2.prototype.showActionCard = function(action, suppressStyle, raiseEvent) { - if (suppressStyle === void 0) { - suppressStyle = false; - } - if (raiseEvent === void 0) { - raiseEvent = true; - } - action.card.suppressStyle = suppressStyle; - var renderedCard = action.card.renderedElement && !this._owner.isDesignMode() ? action.card.renderedElement : action.card.render(); - this._actionCard = renderedCard; - this._expandedAction = action; - this.refreshContainer(); - if (raiseEvent) { - this.layoutChanged(); - raiseInlineCardExpandedEvent(action, true); - } - }; - ActionCollection2.prototype.collapseExpandedAction = function() { - for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) { - var action = _a[_i]; - action.state = 0; - } - var previouslyExpandedAction = this._expandedAction; - this._expandedAction = void 0; - this._actionCard = void 0; - this.refreshContainer(); - if (previouslyExpandedAction) { - this.layoutChanged(); - raiseInlineCardExpandedEvent(previouslyExpandedAction, false); - } - }; - ActionCollection2.prototype.expandShowCardAction = function(action, raiseEvent) { - var _this = this; - var afterSelectedAction = false; - for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) { - var renderedAction = _a[_i]; - if (this._owner.hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal && afterSelectedAction) { - renderedAction.isFocusable = false; - } - if (renderedAction !== action) { - renderedAction.state = 2; - } else { - renderedAction.state = 1; - afterSelectedAction = true; - if (renderedAction.renderedElement) { - renderedAction.renderedElement.onblur = function(_e) { - for (var _i2 = 0, _a2 = _this._renderedActions; _i2 < _a2.length; _i2++) { - var ra = _a2[_i2]; - ra.isFocusable = true; - } - }; - } - } - } - this.showActionCard(action, !(this._owner.isAtTheVeryLeft() && this._owner.isAtTheVeryRight()), raiseEvent); - }; - ActionCollection2.prototype.releaseDOMResources = function() { - for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) { - var action = _a[_i]; - action.releaseDOMResources(); - } - }; - ActionCollection2.prototype.actionExecuted = function(action) { - if (!(action instanceof ShowCardAction)) { - this.collapseExpandedAction(); - } else { - if (action === this._expandedAction) { - this.collapseExpandedAction(); - } else if (this._owner.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Inline) { - this.expandShowCardAction(action, true); - } - } - }; - ActionCollection2.prototype.parse = function(source, context) { - this.clear(); - if (Array.isArray(source)) { - for (var _i = 0, source_1 = source; _i < source_1.length; _i++) { - var jsonAction = source_1[_i]; - var forbiddenActions = []; - if (this._owner instanceof ContainerWithActions) { - forbiddenActions = this._owner.getForbiddenActionNames(); - } - var action = context.parseAction(this._owner, jsonAction, forbiddenActions, !this._owner.isDesignMode()); - if (action) { - this.addAction(action); - } - } - } - }; - ActionCollection2.prototype.toJSON = function(target, propertyName, context) { - context.serializeArray(target, propertyName, this._items); - }; - ActionCollection2.prototype.getActionAt = function(id) { - return this._items[id]; - }; - ActionCollection2.prototype.getActionCount = function() { - return this._items.length; - }; - ActionCollection2.prototype.getActionById = function(id) { - var result = void 0; - for (var _i = 0, _a = this._items; _i < _a.length; _i++) { - var item = _a[_i]; - result = item.getActionById(id); - if (result) { - break; - } - } - return result; - }; - ActionCollection2.prototype.validateProperties = function(context) { - if (this._owner.hostConfig.actions.maxActions && this._items.length > this._owner.hostConfig.actions.maxActions) { - context.addFailure(this._owner, Enums.ValidationEvent.TooManyActions, strings_1.Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions)); - } - if (this._items.length > 0 && !this._owner.hostConfig.supportsInteractivity) { - context.addFailure(this._owner, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed()); - } - for (var _i = 0, _a = this._items; _i < _a.length; _i++) { - var item = _a[_i]; - if (!this.isActionAllowed(item)) { - context.addFailure(this._owner, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(item.getJsonTypeName())); - } - item.internalValidateProperties(context); - } - }; - ActionCollection2.prototype.render = function(orientation) { - var hostConfig = this._owner.hostConfig; - if (!hostConfig.supportsInteractivity) { - return void 0; - } - var element = document.createElement("div"); - var maxActions = hostConfig.actions.maxActions ? Math.min(hostConfig.actions.maxActions, this._items.length) : this._items.length; - this._actionCardContainer = document.createElement("div"); - this._renderedActions = []; - if (hostConfig.actions.preExpandSingleShowCardAction && maxActions === 1 && this._items[0] instanceof ShowCardAction && this.isActionAllowed(this._items[0])) { - this.showActionCard(this._items[0], true); - this._renderedActions.push(this._items[0]); - } else { - var buttonStrip = document.createElement("div"); - buttonStrip.className = hostConfig.makeCssClassName("ac-actionSet"); - buttonStrip.style.display = "flex"; - if (orientation === Enums.Orientation.Horizontal) { - buttonStrip.style.flexDirection = "row"; - if (this._owner.horizontalAlignment && hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch) { - switch (this._owner.horizontalAlignment) { - case Enums.HorizontalAlignment.Center: - buttonStrip.style.justifyContent = "center"; - break; - case Enums.HorizontalAlignment.Right: - buttonStrip.style.justifyContent = "flex-end"; - break; - default: - buttonStrip.style.justifyContent = "flex-start"; - break; - } - } else { - switch (hostConfig.actions.actionAlignment) { - case Enums.ActionAlignment.Center: - buttonStrip.style.justifyContent = "center"; - break; - case Enums.ActionAlignment.Right: - buttonStrip.style.justifyContent = "flex-end"; - break; - default: - buttonStrip.style.justifyContent = "flex-start"; - break; - } - } - } else { - buttonStrip.style.flexDirection = "column"; - if (this._owner.horizontalAlignment && hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch) { - switch (this._owner.horizontalAlignment) { - case Enums.HorizontalAlignment.Center: - buttonStrip.style.alignItems = "center"; - break; - case Enums.HorizontalAlignment.Right: - buttonStrip.style.alignItems = "flex-end"; - break; - default: - buttonStrip.style.alignItems = "flex-start"; - break; - } - } else { - switch (hostConfig.actions.actionAlignment) { - case Enums.ActionAlignment.Center: - buttonStrip.style.alignItems = "center"; - break; - case Enums.ActionAlignment.Right: - buttonStrip.style.alignItems = "flex-end"; - break; - case Enums.ActionAlignment.Stretch: - buttonStrip.style.alignItems = "stretch"; - break; - default: - buttonStrip.style.alignItems = "flex-start"; - break; - } - } - } - var allowedActions = this._items.filter(this.isActionAllowed.bind(this)); - var primaryActions_1 = []; - var secondaryActions_1 = []; - if (!this._owner.isDesignMode()) { - allowedActions.forEach(function(action2) { - return action2.mode === Enums.ActionMode.Secondary ? secondaryActions_1.push(action2) : primaryActions_1.push(action2); - }); - var overflowPrimaryActions = primaryActions_1.splice(hostConfig.actions.maxActions); - if (shared_1.GlobalSettings.allowMoreThanMaxActionsInOverflowMenu) { - secondaryActions_1.push.apply(secondaryActions_1, overflowPrimaryActions); - } - var shouldRenderOverflowActionButton = true; - if (secondaryActions_1.length > 0) { - if (!this._overflowAction) { - this._overflowAction = new OverflowAction(secondaryActions_1); - this._overflowAction.setParent(this._owner); - this._overflowAction["_actionCollection"] = this; - } - var isRootAction = this._owner instanceof AdaptiveCard && !this._owner.parent; - shouldRenderOverflowActionButton = !raiseRenderOverflowActionsEvent(this._overflowAction, isRootAction); - } - if (this._overflowAction && shouldRenderOverflowActionButton) { - primaryActions_1.push(this._overflowAction); - } - } else { - primaryActions_1 = allowedActions; - } - for (var i = 0; i < primaryActions_1.length; i++) { - var action = primaryActions_1[i]; - action.render(); - if (action.renderedElement) { - if (hostConfig.actions.actionsOrientation === Enums.Orientation.Horizontal && hostConfig.actions.actionAlignment === Enums.ActionAlignment.Stretch) { - action.renderedElement.style.flex = "0 1 100%"; - } else { - action.renderedElement.style.flex = "0 1 auto"; - } - buttonStrip.appendChild(action.renderedElement); - this._renderedActions.push(action); - if (i < primaryActions_1.length - 1 && hostConfig.actions.buttonSpacing > 0) { - var spacer = document.createElement("div"); - if (orientation === Enums.Orientation.Horizontal) { - spacer.style.flex = "0 0 auto"; - spacer.style.width = hostConfig.actions.buttonSpacing + "px"; - } else { - spacer.style.height = hostConfig.actions.buttonSpacing + "px"; - } - Utils.appendChild(buttonStrip, spacer); - } - } - } - var buttonStripContainer = document.createElement("div"); - buttonStripContainer.style.overflow = "hidden"; - buttonStripContainer.appendChild(buttonStrip); - Utils.appendChild(element, buttonStripContainer); - } - Utils.appendChild(element, this._actionCardContainer); - for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) { - var renderedAction = _a[_i]; - if (renderedAction.state === 1) { - this.expandShowCardAction(renderedAction, false); - break; - } - } - return this._renderedActions.length > 0 ? element : void 0; - }; - ActionCollection2.prototype.addAction = function(action) { - if (!action) { - throw new Error("The action parameter cannot be null."); - } - if ((!action.parent || action.parent === this._owner) && this._items.indexOf(action) < 0) { - this._items.push(action); - if (!action.parent) { - action.setParent(this._owner); - } - action["_actionCollection"] = this; - } else { - throw new Error(strings_1.Strings.errors.actionAlreadyParented()); - } - }; - ActionCollection2.prototype.removeAction = function(action) { - if (this.expandedAction && this._expandedAction === action) { - this.collapseExpandedAction(); - } - var actionIndex = this._items.indexOf(action); - if (actionIndex >= 0) { - this._items.splice(actionIndex, 1); - action.setParent(void 0); - action["_actionCollection"] = void 0; - for (var i = 0; i < this._renderedActions.length; i++) { - if (this._renderedActions[i] === action) { - this._renderedActions.splice(i, 1); - break; - } - } - return true; - } - return false; - }; - ActionCollection2.prototype.clear = function() { - this._items = []; - this._renderedActions = []; - this._expandedAction = void 0; - }; - ActionCollection2.prototype.getAllInputs = function(processActions) { - if (processActions === void 0) { - processActions = true; - } - var result = []; - if (processActions) { - for (var _i = 0, _a = this._items; _i < _a.length; _i++) { - var action = _a[_i]; - result.push.apply(result, action.getAllInputs()); - } - } - return result; - }; - ActionCollection2.prototype.getResourceInformation = function() { - var result = []; - for (var _i = 0, _a = this._items; _i < _a.length; _i++) { - var action = _a[_i]; - result.push.apply(result, action.getResourceInformation()); - } - return result; - }; - Object.defineProperty(ActionCollection2.prototype, "renderedActionCount", { - get: function() { - return this._renderedActions.length; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ActionCollection2.prototype, "expandedAction", { - get: function() { - return this._expandedAction; - }, - enumerable: false, - configurable: true - }); - return ActionCollection2; - }() - ); - var ActionSet = ( - /** @class */ - function(_super) { - __extends(ActionSet2, _super); - function ActionSet2() { - var _this = _super.call(this) || this; - _this._actionCollection = new ActionCollection(_this); - return _this; - } - ActionSet2.prototype.internalParse = function(source, context) { - _super.prototype.internalParse.call(this, source, context); - this._actionCollection.parse(source["actions"], context); - }; - ActionSet2.prototype.internalToJSON = function(target, context) { - _super.prototype.internalToJSON.call(this, target, context); - this._actionCollection.toJSON(target, "actions", context); - }; - ActionSet2.prototype.internalRender = function() { - return this._actionCollection.render(this.orientation !== void 0 ? this.orientation : this.hostConfig.actions.actionsOrientation); - }; - ActionSet2.prototype.releaseDOMResources = function() { - _super.prototype.releaseDOMResources.call(this); - this._actionCollection.releaseDOMResources(); - }; - ActionSet2.prototype.isBleedingAtBottom = function() { - if (this._actionCollection.renderedActionCount === 0) { - return _super.prototype.isBleedingAtBottom.call(this); - } else { - if (this._actionCollection.getActionCount() === 1) { - return this._actionCollection.expandedAction !== void 0 && !this.hostConfig.actions.preExpandSingleShowCardAction; - } else { - return this._actionCollection.expandedAction !== void 0; - } - } - }; - ActionSet2.prototype.getJsonTypeName = function() { - return "ActionSet"; - }; - ActionSet2.prototype.getActionCount = function() { - return this._actionCollection.getActionCount(); - }; - ActionSet2.prototype.getActionAt = function(index) { - if (index >= 0 && index < this.getActionCount()) { - return this._actionCollection.getActionAt(index); - } else { - return _super.prototype.getActionAt.call(this, index); - } - }; - ActionSet2.prototype.getActionById = function(id) { - var result = this._actionCollection.getActionById(id); - return result ? result : _super.prototype.getActionById.call(this, id); - }; - ActionSet2.prototype.getAllActions = function() { - var result = _super.prototype.getAllActions.call(this); - for (var i = 0; i < this.getActionCount(); i++) { - var action = this.getActionAt(i); - if (action) { - result.push(action); - } - } - return result; - }; - ActionSet2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - this._actionCollection.validateProperties(context); - }; - ActionSet2.prototype.addAction = function(action) { - this._actionCollection.addAction(action); - }; - ActionSet2.prototype.getAllInputs = function(processActions) { - if (processActions === void 0) { - processActions = true; - } - return processActions ? this._actionCollection.getAllInputs() : []; - }; - ActionSet2.prototype.getResourceInformation = function() { - return this._actionCollection.getResourceInformation(); - }; - ActionSet2.prototype.findDOMNodeOwner = function(node) { - var target = void 0; - for (var i = 0; i < this.getActionCount(); i++) { - var action = this.getActionAt(i); - if (action) { - target = action.findDOMNodeOwner(node); - if (target) { - return target; - } - } - } - return _super.prototype.findDOMNodeOwner.call(this, node); - }; - Object.defineProperty(ActionSet2.prototype, "isInteractive", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - ActionSet2.orientationProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, "orientation", Enums.Orientation); - __decorate([ - (0, serialization_1.property)(ActionSet2.orientationProperty) - ], ActionSet2.prototype, "orientation", void 0); - return ActionSet2; - }(CardElement) - ); - exports.ActionSet = ActionSet; - var ContainerStyleProperty = ( - /** @class */ - function(_super) { - __extends(ContainerStyleProperty2, _super); - function ContainerStyleProperty2(targetVersion, name, defaultValue, onGetInitialValue) { - var _this = _super.call(this, targetVersion, name, [ - { value: Enums.ContainerStyle.Default }, - { value: Enums.ContainerStyle.Emphasis }, - { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Accent }, - { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Good }, - { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Attention }, - { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Warning } - ], defaultValue, onGetInitialValue) || this; - _this.targetVersion = targetVersion; - _this.name = name; - _this.defaultValue = defaultValue; - _this.onGetInitialValue = onGetInitialValue; - return _this; - } - return ContainerStyleProperty2; - }(serialization_1.ValueSetProperty) - ); - exports.ContainerStyleProperty = ContainerStyleProperty; - var StylableCardElementContainer = ( - /** @class */ - function(_super) { - __extends(StylableCardElementContainer2, _super); - function StylableCardElementContainer2() { - return _super !== null && _super.apply(this, arguments) || this; - } - Object.defineProperty(StylableCardElementContainer2.prototype, "style", { - get: function() { - if (this.allowCustomStyle) { - var style = this.getValue(StylableCardElementContainer2.styleProperty); - if (style && this.hostConfig.containerStyles.getStyleByName(style)) { - return style; - } - } - return void 0; - }, - set: function(value) { - this.setValue(StylableCardElementContainer2.styleProperty, value); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StylableCardElementContainer2.prototype, "allowCustomStyle", { - //#endregion - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StylableCardElementContainer2.prototype, "hasExplicitStyle", { - get: function() { - return this.getValue(StylableCardElementContainer2.styleProperty) !== void 0; - }, - enumerable: false, - configurable: true - }); - StylableCardElementContainer2.prototype.applyBorder = function() { - }; - StylableCardElementContainer2.prototype.applyBackground = function() { - if (this.renderedElement) { - var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle)); - if (styleDefinition.backgroundColor) { - var bgColor = Utils.stringToCssColor(styleDefinition.backgroundColor); - if (bgColor) { - this.renderedElement.style.backgroundColor = bgColor; - } - } - } - }; - StylableCardElementContainer2.prototype.applyPadding = function() { - _super.prototype.applyPadding.call(this); - if (!this.renderedElement) { - return; - } - var physicalPadding = new shared_1.SpacingDefinition(); - if (this.getEffectivePadding()) { - physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding()); - } - this.renderedElement.style.paddingTop = physicalPadding.top + "px"; - this.renderedElement.style.paddingRight = physicalPadding.right + "px"; - this.renderedElement.style.paddingBottom = physicalPadding.bottom + "px"; - this.renderedElement.style.paddingLeft = physicalPadding.left + "px"; - if (this.isBleeding()) { - var padding = new shared_1.PaddingDefinition(); - this.getImmediateSurroundingPadding(padding); - var surroundingPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding); - this.renderedElement.style.marginRight = "-" + surroundingPadding.right + "px"; - this.renderedElement.style.marginLeft = "-" + surroundingPadding.left + "px"; - if (!this.isDesignMode()) { - this.renderedElement.style.marginTop = "-" + surroundingPadding.top + "px"; - this.renderedElement.style.marginBottom = "-" + surroundingPadding.bottom + "px"; - } - if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) { - this.separatorElement.style.marginLeft = "-" + surroundingPadding.left + "px"; - this.separatorElement.style.marginRight = "-" + surroundingPadding.right + "px"; - } - } else { - this.renderedElement.style.marginRight = "0"; - this.renderedElement.style.marginLeft = "0"; - this.renderedElement.style.marginTop = "0"; - this.renderedElement.style.marginBottom = "0"; - if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) { - this.separatorElement.style.marginRight = "0"; - this.separatorElement.style.marginLeft = "0"; - } - } - }; - StylableCardElementContainer2.prototype.getHasBackground = function(ignoreBackgroundImages) { - if (ignoreBackgroundImages === void 0) { - ignoreBackgroundImages = false; - } - var currentElement = this.parent; - while (currentElement) { - var currentElementHasBackgroundImage = false; - if (ignoreBackgroundImages) { - currentElementHasBackgroundImage = false; - } else { - currentElementHasBackgroundImage = currentElement instanceof Container ? currentElement.backgroundImage.isValid() : false; - } - if (currentElement instanceof StylableCardElementContainer2) { - if (this.hasExplicitStyle && (currentElement.getEffectiveStyle() !== this.getEffectiveStyle() || currentElementHasBackgroundImage)) { - return true; - } - } - currentElement = currentElement.parent; - } - return false; - }; - StylableCardElementContainer2.prototype.getDefaultPadding = function() { - return this.getHasBackground() || this.getHasBorder() ? new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding) : _super.prototype.getDefaultPadding.call(this); - }; - StylableCardElementContainer2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - var explicitStyle = this.getValue(StylableCardElementContainer2.styleProperty); - if (explicitStyle !== void 0) { - var styleDefinition = this.hostConfig.containerStyles.getStyleByName(explicitStyle); - if (!styleDefinition) { - context.addFailure(this, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(explicitStyle, "style")); - } - } - }; - StylableCardElementContainer2.prototype.render = function() { - var renderedElement = _super.prototype.render.call(this); - if (renderedElement && this.getHasBackground()) { - this.applyBackground(); - } - this.applyBorder(); - return renderedElement; - }; - StylableCardElementContainer2.prototype.getEffectiveStyle = function() { - var effectiveStyle = this.style; - return effectiveStyle ? effectiveStyle : _super.prototype.getEffectiveStyle.call(this); - }; - StylableCardElementContainer2.styleProperty = new ContainerStyleProperty(serialization_1.Versions.v1_0, "style"); - __decorate([ - (0, serialization_1.property)(StylableCardElementContainer2.styleProperty) - ], StylableCardElementContainer2.prototype, "style", null); - return StylableCardElementContainer2; - }(CardElementContainer) - ); - exports.StylableCardElementContainer = StylableCardElementContainer; - var ContainerBase = ( - /** @class */ - function(_super) { - __extends(ContainerBase2, _super); - function ContainerBase2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._bleed = false; - return _this; - } - ContainerBase2.prototype.adjustRenderedElementSize = function(renderedElement) { - _super.prototype.adjustRenderedElementSize.call(this, renderedElement); - if (this.minPixelHeight) { - renderedElement.style.minHeight = this.minPixelHeight + "px"; - } - }; - ContainerBase2.prototype.getHasExpandedAction = function() { - return false; - }; - ContainerBase2.prototype.getBleed = function() { - return this._bleed; - }; - ContainerBase2.prototype.setBleed = function(value) { - this._bleed = value; - }; - Object.defineProperty(ContainerBase2.prototype, "renderedActionCount", { - get: function() { - return 0; - }, - enumerable: false, - configurable: true - }); - ContainerBase2.prototype.isBleeding = function() { - return (this.getHasBackground() || this.hostConfig.alwaysAllowBleed) && this.getBleed(); - }; - ContainerBase2.bleedProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "bleed", false); - ContainerBase2.minHeightProperty = new serialization_1.PixelSizeProperty(serialization_1.Versions.v1_2, "minHeight"); - __decorate([ - (0, serialization_1.property)(ContainerBase2.bleedProperty) - ], ContainerBase2.prototype, "_bleed", void 0); - __decorate([ - (0, serialization_1.property)(ContainerBase2.minHeightProperty) - ], ContainerBase2.prototype, "minPixelHeight", void 0); - return ContainerBase2; - }(StylableCardElementContainer) - ); - exports.ContainerBase = ContainerBase; - var BackgroundImage = ( - /** @class */ - function(_super) { - __extends(BackgroundImage2, _super); - function BackgroundImage2() { - return _super !== null && _super.apply(this, arguments) || this; - } - BackgroundImage2.prototype.getSchemaKey = function() { - return "BackgroundImage"; - }; - BackgroundImage2.prototype.internalParse = function(source, context) { - if (typeof source === "string") { - this.resetDefaultValues(); - this.url = source; - } else { - return _super.prototype.internalParse.call(this, source, context); - } - }; - BackgroundImage2.prototype.apply = function(element) { - if (this.url && element.renderedElement) { - element.renderedElement.style.backgroundImage = "url('" + element.preProcessPropertyValue(BackgroundImage2.urlProperty, this.url) + "')"; - switch (this.fillMode) { - case Enums.FillMode.Repeat: - element.renderedElement.style.backgroundRepeat = "repeat"; - break; - case Enums.FillMode.RepeatHorizontally: - element.renderedElement.style.backgroundRepeat = "repeat-x"; - break; - case Enums.FillMode.RepeatVertically: - element.renderedElement.style.backgroundRepeat = "repeat-y"; - break; - case Enums.FillMode.Cover: - default: - element.renderedElement.style.backgroundRepeat = "no-repeat"; - element.renderedElement.style.backgroundSize = "cover"; - break; - } - switch (this.horizontalAlignment) { - case Enums.HorizontalAlignment.Left: - break; - case Enums.HorizontalAlignment.Center: - element.renderedElement.style.backgroundPositionX = "center"; - break; - case Enums.HorizontalAlignment.Right: - element.renderedElement.style.backgroundPositionX = "right"; - break; - } - switch (this.verticalAlignment) { - case Enums.VerticalAlignment.Top: - break; - case Enums.VerticalAlignment.Center: - element.renderedElement.style.backgroundPositionY = "center"; - break; - case Enums.VerticalAlignment.Bottom: - element.renderedElement.style.backgroundPositionY = "bottom"; - break; - } - } - }; - BackgroundImage2.prototype.isValid = function() { - return this.url ? true : false; - }; - BackgroundImage2.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "url"); - BackgroundImage2.fillModeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, "fillMode", Enums.FillMode, Enums.FillMode.Cover); - BackgroundImage2.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, "horizontalAlignment", Enums.HorizontalAlignment, Enums.HorizontalAlignment.Left); - BackgroundImage2.verticalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, "verticalAlignment", Enums.VerticalAlignment, Enums.VerticalAlignment.Top); - __decorate([ - (0, serialization_1.property)(BackgroundImage2.urlProperty) - ], BackgroundImage2.prototype, "url", void 0); - __decorate([ - (0, serialization_1.property)(BackgroundImage2.fillModeProperty) - ], BackgroundImage2.prototype, "fillMode", void 0); - __decorate([ - (0, serialization_1.property)(BackgroundImage2.horizontalAlignmentProperty) - ], BackgroundImage2.prototype, "horizontalAlignment", void 0); - __decorate([ - (0, serialization_1.property)(BackgroundImage2.verticalAlignmentProperty) - ], BackgroundImage2.prototype, "verticalAlignment", void 0); - return BackgroundImage2; - }(serialization_1.SerializableObject) - ); - exports.BackgroundImage = BackgroundImage; - var Container = ( - /** @class */ - function(_super) { - __extends(Container2, _super); - function Container2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._items = []; - _this._renderedItems = []; - return _this; - } - Object.defineProperty(Container2.prototype, "backgroundImage", { - get: function() { - return this.getValue(Container2.backgroundImageProperty); - }, - enumerable: false, - configurable: true - }); - Container2.prototype.insertItemAt = function(item, index, forceInsert) { - if (!item.parent || forceInsert) { - if (item.isStandalone) { - if (index < 0 || index >= this._items.length) { - this._items.push(item); - } else { - this._items.splice(index, 0, item); - } - item.setParent(this); - } else { - throw new Error(strings_1.Strings.errors.elementTypeNotStandalone(item.getJsonTypeName())); - } - } else { - throw new Error(strings_1.Strings.errors.elementAlreadyParented()); - } - }; - Container2.prototype.getItemsCollectionPropertyName = function() { - return "items"; - }; - Container2.prototype.applyBackground = function() { - if (this.backgroundImage.isValid() && this.renderedElement) { - this.backgroundImage.apply(this); - } - _super.prototype.applyBackground.call(this); - }; - Container2.prototype.applyRTL = function(element) { - if (this.rtl !== void 0) { - element.dir = this.rtl ? "rtl" : "ltr"; - } - }; - Container2.prototype.internalRender = function() { - this._renderedItems = []; - var hostConfig = this.hostConfig; - var element = document.createElement("div"); - this.applyRTL(element); - element.classList.add(hostConfig.makeCssClassName("ac-container")); - element.style.display = "flex"; - element.style.flexDirection = "column"; - if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) { - element.style.minHeight = "-webkit-min-content"; - } - switch (this.getEffectiveVerticalContentAlignment()) { - case Enums.VerticalAlignment.Center: - element.style.justifyContent = "center"; - break; - case Enums.VerticalAlignment.Bottom: - element.style.justifyContent = "flex-end"; - break; - default: - element.style.justifyContent = "flex-start"; - break; - } - if (this._items.length > 0) { - for (var _i = 0, _a = this._items; _i < _a.length; _i++) { - var item = _a[_i]; - var renderedItem = this.isElementAllowed(item) ? item.render() : void 0; - if (renderedItem) { - if (this._renderedItems.length > 0 && item.separatorElement) { - item.separatorElement.style.flex = "0 0 auto"; - Utils.appendChild(element, item.separatorElement); - } - Utils.appendChild(element, renderedItem); - this._renderedItems.push(item); - } - } - } else { - if (this.isDesignMode()) { - var placeholderElement = this.createPlaceholderElement(); - placeholderElement.style.width = "100%"; - placeholderElement.style.height = "100%"; - element.appendChild(placeholderElement); - } - } - return element; - }; - Container2.prototype.truncateOverflow = function(maxHeight) { - if (this.renderedElement) { - var boundary_1 = this.renderedElement.offsetTop + maxHeight + 1; - var handleElement_1 = function(cardElement) { - var elt = cardElement.renderedElement; - if (elt) { - switch (Utils.getFitStatus(elt, boundary_1)) { - case Enums.ContainerFitStatus.FullyInContainer: - var sizeChanged = cardElement["resetOverflow"](); - if (sizeChanged) { - handleElement_1(cardElement); - } - break; - case Enums.ContainerFitStatus.Overflowing: - var containerMaxHeight = boundary_1 - elt.offsetTop; - cardElement["handleOverflow"](containerMaxHeight); - break; - case Enums.ContainerFitStatus.FullyOutOfContainer: - cardElement["handleOverflow"](0); - break; - } - } - }; - for (var _i = 0, _a = this._items; _i < _a.length; _i++) { - var item = _a[_i]; - handleElement_1(item); - } - return true; - } - return false; - }; - Container2.prototype.undoOverflowTruncation = function() { - for (var _i = 0, _a = this._items; _i < _a.length; _i++) { - var item = _a[_i]; - item["resetOverflow"](); - } - }; - Container2.prototype.getHasBackground = function(ignoreBackgroundImages) { - if (ignoreBackgroundImages === void 0) { - ignoreBackgroundImages = false; - } - var result = ignoreBackgroundImages ? false : this.backgroundImage.isValid(); - return result || _super.prototype.getHasBackground.call(this, ignoreBackgroundImages); - }; - Container2.prototype.canHostSingletons = function() { - return false; - }; - Container2.prototype.internalParse = function(source, context) { - _super.prototype.internalParse.call(this, source, context); - this.clear(); - this.setShouldFallback(false); - var jsonItems = source[this.getItemsCollectionPropertyName()]; - if (!Array.isArray(jsonItems) && typeof jsonItems === "object" && this.canHostSingletons()) { - var typeName = Utils.parseString(jsonItems["type"]); - if (typeName) { - var registration = context.elementRegistry.findByName(typeName); - if ((registration === null || registration === void 0 ? void 0 : registration.singletonBehavior) !== registry_1.ElementSingletonBehavior.NotAllowed) { - var element = context.parseElement(this, jsonItems, [], !this.isDesignMode(), true); - if (element) { - this.insertItemAt(element, -1, true); - } - } - } - } else if (Array.isArray(jsonItems)) { - for (var _i = 0, jsonItems_1 = jsonItems; _i < jsonItems_1.length; _i++) { - var item = jsonItems_1[_i]; - var element = context.parseElement(this, item, this.forbiddenChildElements(), !this.isDesignMode()); - if (element) { - this.insertItemAt(element, -1, true); - } - } - } - }; - Container2.prototype.internalToJSON = function(target, context) { - _super.prototype.internalToJSON.call(this, target, context); - var collectionPropertyName = this.getItemsCollectionPropertyName(); - if (this._items.length === 1 && this._items[0].getElementSingletonBehavior() === registry_1.ElementSingletonBehavior.Only) { - context.serializeValue(target, collectionPropertyName, this._items[0].toJSON(context)); - } else { - context.serializeArray(target, collectionPropertyName, this._items); - } - }; - Object.defineProperty(Container2.prototype, "isSelectable", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - Container2.prototype.getEffectivePadding = function() { - if (shared_1.GlobalSettings.removePaddingFromContainersWithBackgroundImage && !this.getHasBackground(true)) { - return new shared_1.PaddingDefinition(); - } - return _super.prototype.getEffectivePadding.call(this); - }; - Container2.prototype.getEffectiveVerticalContentAlignment = function() { - if (this.verticalContentAlignment !== void 0) { - return this.verticalContentAlignment; - } - var parentContainer = this.getParentContainer(); - return parentContainer ? parentContainer.getEffectiveVerticalContentAlignment() : Enums.VerticalAlignment.Top; - }; - Container2.prototype.getItemCount = function() { - return this._items.length; - }; - Container2.prototype.getItemAt = function(index) { - return this._items[index]; - }; - Container2.prototype.getFirstVisibleRenderedItem = function() { - if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) { - for (var _i = 0, _a = this._renderedItems; _i < _a.length; _i++) { - var item = _a[_i]; - if (item.isVisible) { - return item; - } - } - } - return void 0; - }; - Container2.prototype.getLastVisibleRenderedItem = function() { - if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) { - for (var i = this._renderedItems.length - 1; i >= 0; i--) { - if (this._renderedItems[i].isVisible) { - return this._renderedItems[i]; - } - } - } - return void 0; - }; - Container2.prototype.getJsonTypeName = function() { - return "Container"; - }; - Container2.prototype.isFirstElement = function(element) { - var designMode = this.isDesignMode(); - for (var _i = 0, _a = this._items; _i < _a.length; _i++) { - var item = _a[_i]; - if (item.isVisible || designMode) { - return item === element; - } - } - return false; - }; - Container2.prototype.isLastElement = function(element) { - var designMode = this.isDesignMode(); - for (var i = this._items.length - 1; i >= 0; i--) { - if (this._items[i].isVisible || designMode) { - return this._items[i] === element; - } - } - return false; - }; - Container2.prototype.isRtl = function() { - if (this.rtl !== void 0) { - return this.rtl; - } else { - var parentContainer = this.getParentContainer(); - return parentContainer ? parentContainer.isRtl() : false; - } - }; - Container2.prototype.isBleedingAtTop = function() { - var firstRenderedItem = this.getFirstVisibleRenderedItem(); - return this.isBleeding() || (firstRenderedItem ? firstRenderedItem.isBleedingAtTop() : false); - }; - Container2.prototype.isBleedingAtBottom = function() { - var lastRenderedItem = this.getLastVisibleRenderedItem(); - return this.isBleeding() || (lastRenderedItem ? lastRenderedItem.isBleedingAtBottom() && lastRenderedItem.getEffectiveStyle() === this.getEffectiveStyle() : false); - }; - Container2.prototype.indexOf = function(cardElement) { - return this._items.indexOf(cardElement); - }; - Container2.prototype.addItem = function(item) { - this.insertItemAt(item, -1, false); - }; - Container2.prototype.insertItemBefore = function(item, insertBefore) { - this.insertItemAt(item, this._items.indexOf(insertBefore), false); - }; - Container2.prototype.insertItemAfter = function(item, insertAfter) { - this.insertItemAt(item, this._items.indexOf(insertAfter) + 1, false); - }; - Container2.prototype.removeItem = function(item) { - var itemIndex = this._items.indexOf(item); - if (itemIndex >= 0) { - this._items.splice(itemIndex, 1); - item.setParent(void 0); - this.updateLayout(); - return true; - } - return false; - }; - Container2.prototype.clear = function() { - this._items = []; - this._renderedItems = []; - }; - Container2.prototype.getResourceInformation = function() { - var result = _super.prototype.getResourceInformation.call(this); - if (this.backgroundImage.isValid()) { - result.push({ - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- validated by `isValid()` - url: this.backgroundImage.url, - mimeType: "image" - }); - } - return result; - }; - Container2.prototype.getActionById = function(id) { - var result = _super.prototype.getActionById.call(this, id); - if (!result) { - if (this.selectAction) { - result = this.selectAction.getActionById(id); - } - if (!result) { - for (var _i = 0, _a = this._items; _i < _a.length; _i++) { - var item = _a[_i]; - result = item.getActionById(id); - if (result) { - break; - } - } - } - } - return result; - }; - Object.defineProperty(Container2.prototype, "padding", { - get: function() { - return this.getPadding(); - }, - set: function(value) { - this.setPadding(value); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Container2.prototype, "selectAction", { - get: function() { - return this._selectAction; - }, - set: function(value) { - this._selectAction = value; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Container2.prototype, "bleed", { - get: function() { - return this.getBleed(); - }, - set: function(value) { - this.setBleed(value); - }, - enumerable: false, - configurable: true - }); - Container2.backgroundImageProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_0, "backgroundImage", BackgroundImage); - Container2.verticalContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, "verticalContentAlignment", Enums.VerticalAlignment); - Container2.rtlProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "rtl"); - __decorate([ - (0, serialization_1.property)(Container2.backgroundImageProperty) - ], Container2.prototype, "backgroundImage", null); - __decorate([ - (0, serialization_1.property)(Container2.verticalContentAlignmentProperty) - ], Container2.prototype, "verticalContentAlignment", void 0); - __decorate([ - (0, serialization_1.property)(Container2.rtlProperty) - ], Container2.prototype, "rtl", void 0); - return Container2; - }(ContainerBase) - ); - exports.Container = Container; - var Column = ( - /** @class */ - function(_super) { - __extends(Column2, _super); - function Column2(width) { - if (width === void 0) { - width = "stretch"; - } - var _this = _super.call(this) || this; - _this.width = "stretch"; - _this._computedWeight = 0; - _this.width = width; - return _this; - } - Column2.prototype.adjustRenderedElementSize = function(renderedElement) { - var minDesignTimeColumnHeight = 20; - if (this.isDesignMode()) { - renderedElement.style.minWidth = "20px"; - renderedElement.style.minHeight = (!this.minPixelHeight ? minDesignTimeColumnHeight : Math.max(this.minPixelHeight, minDesignTimeColumnHeight)) + "px"; - } else { - renderedElement.style.minWidth = "0"; - if (this.minPixelHeight) { - renderedElement.style.minHeight = this.minPixelHeight + "px"; - } - } - if (this.width === "auto") { - renderedElement.style.flex = "0 1 auto"; - } else if (this.width === "stretch") { - renderedElement.style.flex = "1 1 50px"; - } else if (this.width instanceof shared_1.SizeAndUnit) { - if (this.width.unit === Enums.SizeUnit.Pixel) { - renderedElement.style.flex = "0 0 auto"; - renderedElement.style.width = this.width.physicalSize + "px"; - } else { - renderedElement.style.flex = "1 1 " + (this._computedWeight > 0 ? this._computedWeight : this.width.physicalSize) + "%"; - } - } - }; - Column2.prototype.shouldSerialize = function(_context) { - return true; - }; - Object.defineProperty(Column2.prototype, "separatorOrientation", { - get: function() { - return Enums.Orientation.Vertical; - }, - enumerable: false, - configurable: true - }); - Column2.prototype.getJsonTypeName = function() { - return "Column"; - }; - Object.defineProperty(Column2.prototype, "hasVisibleSeparator", { - get: function() { - if (this.parent && this.parent instanceof ColumnSet) { - return this.separatorElement !== void 0 && !this.parent.isLeftMostElement(this); - } else { - return false; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Column2.prototype, "isStandalone", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - Column2.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, "width", function(sender, prop, source, context) { - var result = prop.defaultValue; - var value = source[prop.name]; - var invalidWidth = false; - if (typeof value === "number" && !isNaN(value)) { - result = new shared_1.SizeAndUnit(value, Enums.SizeUnit.Weight); - } else if (value === "auto" || value === "stretch") { - result = value; - } else if (typeof value === "string") { - try { - result = shared_1.SizeAndUnit.parse(value); - if (result.unit === Enums.SizeUnit.Pixel && prop.targetVersion.compareTo(context.targetVersion) > 0) { - invalidWidth = true; - } - } catch (e) { - invalidWidth = true; - } - } else { - invalidWidth = true; - } - if (invalidWidth) { - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value)); - result = "auto"; - } - return result; - }, function(sender, property, target, value, context) { - if (value instanceof shared_1.SizeAndUnit) { - if (value.unit === Enums.SizeUnit.Pixel) { - context.serializeValue(target, "width", value.physicalSize + "px"); - } else { - context.serializeNumber(target, "width", value.physicalSize); - } - } else { - context.serializeValue(target, "width", value); - } - }, "stretch"); - __decorate([ - (0, serialization_1.property)(Column2.widthProperty) - ], Column2.prototype, "width", void 0); - return Column2; - }(Container) - ); - exports.Column = Column; - var ColumnSet = ( - /** @class */ - function(_super) { - __extends(ColumnSet2, _super); - function ColumnSet2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._columns = []; - return _this; - } - ColumnSet2.prototype.createColumnInstance = function(source, context) { - return context.parseCardObject(this, source, [], !this.isDesignMode(), function(typeName) { - return !typeName || typeName === "Column" ? new Column() : void 0; - }, function(typeName, _errorType) { - context.logParseEvent(void 0, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName)); - }); - }; - ColumnSet2.prototype.internalRender = function() { - this._renderedColumns = []; - if (this._columns.length > 0) { - var hostConfig = this.hostConfig; - var element = document.createElement("div"); - element.className = hostConfig.makeCssClassName("ac-columnSet"); - element.style.display = "flex"; - if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) { - element.style.minHeight = "-webkit-min-content"; - } - switch (this.getEffectiveHorizontalAlignment()) { - case Enums.HorizontalAlignment.Center: - element.style.justifyContent = "center"; - break; - case Enums.HorizontalAlignment.Right: - element.style.justifyContent = "flex-end"; - break; - default: - element.style.justifyContent = "flex-start"; - break; - } - var totalWeight = 0; - for (var _i = 0, _a = this._columns; _i < _a.length; _i++) { - var column = _a[_i]; - if (column.width instanceof shared_1.SizeAndUnit && column.width.unit === Enums.SizeUnit.Weight) { - totalWeight += column.width.physicalSize; - } - } - for (var _b = 0, _c = this._columns; _b < _c.length; _b++) { - var column = _c[_b]; - if (column.width instanceof shared_1.SizeAndUnit && column.width.unit === Enums.SizeUnit.Weight && totalWeight > 0) { - var computedWeight = 100 / totalWeight * column.width.physicalSize; - column["_computedWeight"] = computedWeight; - } - var renderedColumn = column.render(); - if (renderedColumn) { - if (this._renderedColumns.length > 0 && column.separatorElement) { - column.separatorElement.style.flex = "0 0 auto"; - Utils.appendChild(element, column.separatorElement); - } - Utils.appendChild(element, renderedColumn); - this._renderedColumns.push(column); - } - } - return this._renderedColumns.length > 0 ? element : void 0; - } else { - return void 0; - } - }; - ColumnSet2.prototype.truncateOverflow = function(maxHeight) { - for (var _i = 0, _a = this._columns; _i < _a.length; _i++) { - var column = _a[_i]; - column["handleOverflow"](maxHeight); - } - return true; - }; - ColumnSet2.prototype.undoOverflowTruncation = function() { - for (var _i = 0, _a = this._columns; _i < _a.length; _i++) { - var column = _a[_i]; - column["resetOverflow"](); - } - }; - Object.defineProperty(ColumnSet2.prototype, "isSelectable", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - ColumnSet2.prototype.internalParse = function(source, context) { - _super.prototype.internalParse.call(this, source, context); - this._columns = []; - this._renderedColumns = []; - var jsonColumns = source["columns"]; - if (Array.isArray(jsonColumns)) { - for (var _i = 0, jsonColumns_1 = jsonColumns; _i < jsonColumns_1.length; _i++) { - var item = jsonColumns_1[_i]; - var column = this.createColumnInstance(item, context); - if (column) { - this._columns.push(column); - } - } - } - }; - ColumnSet2.prototype.internalToJSON = function(target, context) { - _super.prototype.internalToJSON.call(this, target, context); - context.serializeArray(target, "columns", this._columns); - }; - ColumnSet2.prototype.isFirstElement = function(element) { - for (var _i = 0, _a = this._columns; _i < _a.length; _i++) { - var column = _a[_i]; - if (column.isVisible) { - return column === element; - } - } - return false; - }; - ColumnSet2.prototype.isBleedingAtTop = function() { - if (this.isBleeding()) { - return true; - } - if (this._renderedColumns && this._renderedColumns.length > 0) { - for (var _i = 0, _a = this._columns; _i < _a.length; _i++) { - var column = _a[_i]; - if (column.isBleedingAtTop()) { - return true; - } - } - } - return false; - }; - ColumnSet2.prototype.isBleedingAtBottom = function() { - if (this.isBleeding()) { - return true; - } - if (this._renderedColumns && this._renderedColumns.length > 0) { - for (var _i = 0, _a = this._columns; _i < _a.length; _i++) { - var column = _a[_i]; - if (column.isBleedingAtBottom()) { - return true; - } - } - } - return false; - }; - ColumnSet2.prototype.getItemCount = function() { - return this._columns.length; - }; - ColumnSet2.prototype.getFirstVisibleRenderedItem = function() { - if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) { - return this._renderedColumns[0]; - } else { - return void 0; - } - }; - ColumnSet2.prototype.getLastVisibleRenderedItem = function() { - if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) { - return this._renderedColumns[this._renderedColumns.length - 1]; - } else { - return void 0; - } - }; - ColumnSet2.prototype.getColumnAt = function(index) { - return this._columns[index]; - }; - ColumnSet2.prototype.getItemAt = function(index) { - return this.getColumnAt(index); - }; - ColumnSet2.prototype.getJsonTypeName = function() { - return "ColumnSet"; - }; - ColumnSet2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - var weightedColumns = 0; - var stretchedColumns = 0; - for (var _i = 0, _a = this._columns; _i < _a.length; _i++) { - var column = _a[_i]; - if (typeof column.width === "number") { - weightedColumns++; - } else if (column.width === "stretch") { - stretchedColumns++; - } - } - if (weightedColumns > 0 && stretchedColumns > 0) { - context.addFailure(this, Enums.ValidationEvent.Hint, strings_1.Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet()); - } - }; - ColumnSet2.prototype.addColumn = function(column) { - if (!column.parent) { - this._columns.push(column); - column.setParent(this); - } else { - throw new Error(strings_1.Strings.errors.columnAlreadyBelongsToAnotherSet()); - } - }; - ColumnSet2.prototype.removeItem = function(item) { - if (item instanceof Column) { - var itemIndex = this._columns.indexOf(item); - if (itemIndex >= 0) { - this._columns.splice(itemIndex, 1); - item.setParent(void 0); - this.updateLayout(); - return true; - } - } - return false; - }; - ColumnSet2.prototype.indexOf = function(cardElement) { - return cardElement instanceof Column ? this._columns.indexOf(cardElement) : -1; - }; - ColumnSet2.prototype.isLeftMostElement = function(element) { - return this._columns.indexOf(element) === 0; - }; - ColumnSet2.prototype.isRightMostElement = function(element) { - return this._columns.indexOf(element) === this._columns.length - 1; - }; - ColumnSet2.prototype.isTopElement = function(element) { - return this._columns.indexOf(element) >= 0; - }; - ColumnSet2.prototype.isBottomElement = function(element) { - return this._columns.indexOf(element) >= 0; - }; - ColumnSet2.prototype.getActionById = function(id) { - var result = void 0; - for (var _i = 0, _a = this._columns; _i < _a.length; _i++) { - var column = _a[_i]; - result = column.getActionById(id); - if (result) { - break; - } - } - return result; - }; - Object.defineProperty(ColumnSet2.prototype, "bleed", { - get: function() { - return this.getBleed(); - }, - set: function(value) { - this.setBleed(value); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ColumnSet2.prototype, "padding", { - get: function() { - return this.getPadding(); - }, - set: function(value) { - this.setPadding(value); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ColumnSet2.prototype, "selectAction", { - get: function() { - return this._selectAction; - }, - set: function(value) { - this._selectAction = value; - }, - enumerable: false, - configurable: true - }); - return ColumnSet2; - }(ContainerBase) - ); - exports.ColumnSet = ColumnSet; - function raiseImageLoadedEvent(image) { - var card = image.getRootElement(); - var onImageLoadedHandler = card && card.onImageLoaded ? card.onImageLoaded : AdaptiveCard.onImageLoaded; - if (onImageLoadedHandler) { - onImageLoadedHandler(image); - } - } - function raiseAnchorClickedEvent(element, anchor, ev) { - var card = element.getRootElement(); - var onAnchorClickedHandler = card && card.onAnchorClicked ? card.onAnchorClicked : AdaptiveCard.onAnchorClicked; - return onAnchorClickedHandler !== void 0 ? onAnchorClickedHandler(element, anchor, ev) : false; - } - function raiseExecuteActionEvent(action) { - var card = action.parent ? action.parent.getRootElement() : void 0; - var onExecuteActionHandler = card && card.onExecuteAction ? card.onExecuteAction : AdaptiveCard.onExecuteAction; - if (action.prepareForExecution() && onExecuteActionHandler) { - onExecuteActionHandler(action); - } - } - function raiseInlineCardExpandedEvent(action, isExpanded) { - var card = action.parent ? action.parent.getRootElement() : void 0; - var onInlineCardExpandedHandler = card && card.onInlineCardExpanded ? card.onInlineCardExpanded : AdaptiveCard.onInlineCardExpanded; - if (onInlineCardExpandedHandler) { - onInlineCardExpandedHandler(action, isExpanded); - } - } - function raiseInputValueChangedEvent(input) { - var card = input.getRootElement(); - var onInputValueChangedHandler = card && card.onInputValueChanged ? card.onInputValueChanged : AdaptiveCard.onInputValueChanged; - if (onInputValueChangedHandler) { - onInputValueChangedHandler(input); - } - } - function raiseElementVisibilityChangedEvent(element, shouldUpdateLayout) { - if (shouldUpdateLayout === void 0) { - shouldUpdateLayout = true; - } - var rootElement = element.getRootElement(); - if (shouldUpdateLayout) { - rootElement.updateLayout(); - } - var card = rootElement; - var onElementVisibilityChangedHandler = card && card.onElementVisibilityChanged ? card.onElementVisibilityChanged : AdaptiveCard.onElementVisibilityChanged; - if (onElementVisibilityChangedHandler !== void 0) { - onElementVisibilityChangedHandler(element); - } - } - function raiseDisplayOverflowActionMenuEvent(action, target) { - var card = action.parent ? action.parent.getRootElement() : void 0; - var onDisplayOverflowActionMenuHandler = card && card.onDisplayOverflowActionMenu ? card.onDisplayOverflowActionMenu : AdaptiveCard.onDisplayOverflowActionMenu; - return onDisplayOverflowActionMenuHandler !== void 0 ? onDisplayOverflowActionMenuHandler(action.getActions(), target) : false; - } - function raiseRenderOverflowActionsEvent(action, isAtRootLevelActions) { - var card = action.parent ? action.parent.getRootElement() : void 0; - var onRenderOverflowActionsHandler = card && card.onRenderOverflowActions ? card.onRenderOverflowActions : AdaptiveCard.onRenderOverflowActions; - return onRenderOverflowActionsHandler !== void 0 ? onRenderOverflowActionsHandler(action.getActions(), isAtRootLevelActions) : false; - } - var ContainerWithActions = ( - /** @class */ - function(_super) { - __extends(ContainerWithActions2, _super); - function ContainerWithActions2() { - var _this = _super.call(this) || this; - _this._actionCollection = new ActionCollection(_this); - return _this; - } - ContainerWithActions2.prototype.internalParse = function(source, context) { - _super.prototype.internalParse.call(this, source, context); - this.parseActions(source, context); - }; - ContainerWithActions2.prototype.parseActions = function(source, context) { - this._actionCollection.parse(source["actions"], context); - }; - ContainerWithActions2.prototype.internalToJSON = function(target, context) { - _super.prototype.internalToJSON.call(this, target, context); - this._actionCollection.toJSON(target, "actions", context); - }; - ContainerWithActions2.prototype.internalRender = function() { - var element = _super.prototype.internalRender.call(this); - if (element) { - var renderedActions = this._actionCollection.render(this.hostConfig.actions.actionsOrientation); - if (renderedActions) { - Utils.appendChild(element, renderSeparation(this.hostConfig, { - spacing: this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing) - }, Enums.Orientation.Horizontal)); - Utils.appendChild(element, renderedActions); - } - if (this.renderIfEmpty) { - return element; - } else { - return element.children.length > 0 ? element : void 0; - } - } else { - return void 0; - } - }; - ContainerWithActions2.prototype.getHasExpandedAction = function() { - if (this.renderedActionCount === 0) { - return false; - } else if (this.renderedActionCount === 1) { - return this._actionCollection.expandedAction !== void 0 && !this.hostConfig.actions.preExpandSingleShowCardAction; - } else { - return this._actionCollection.expandedAction !== void 0; - } - }; - Object.defineProperty(ContainerWithActions2.prototype, "renderedActionCount", { - get: function() { - return this._actionCollection.renderedActionCount; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ContainerWithActions2.prototype, "renderIfEmpty", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - ContainerWithActions2.prototype.releaseDOMResources = function() { - _super.prototype.releaseDOMResources.call(this); - this._actionCollection.releaseDOMResources(); - }; - ContainerWithActions2.prototype.getActionCount = function() { - return this._actionCollection.getActionCount(); - }; - ContainerWithActions2.prototype.getActionAt = function(index) { - if (index >= 0 && index < this.getActionCount()) { - return this._actionCollection.getActionAt(index); - } else { - return _super.prototype.getActionAt.call(this, index); - } - }; - ContainerWithActions2.prototype.getActionById = function(id) { - var result = this._actionCollection.getActionById(id); - return result ? result : _super.prototype.getActionById.call(this, id); - }; - ContainerWithActions2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - if (this._actionCollection) { - this._actionCollection.validateProperties(context); - } - }; - ContainerWithActions2.prototype.isLastElement = function(element) { - return _super.prototype.isLastElement.call(this, element) && this._actionCollection.getActionCount() === 0; - }; - ContainerWithActions2.prototype.addAction = function(action) { - this._actionCollection.addAction(action); - }; - ContainerWithActions2.prototype.clear = function() { - _super.prototype.clear.call(this); - this._actionCollection.clear(); - }; - ContainerWithActions2.prototype.getAllInputs = function(processActions) { - if (processActions === void 0) { - processActions = true; - } - var result = _super.prototype.getAllInputs.call(this, processActions); - if (processActions) { - result.push.apply(result, this._actionCollection.getAllInputs(processActions)); - } - return result; - }; - ContainerWithActions2.prototype.getResourceInformation = function() { - var result = _super.prototype.getResourceInformation.call(this); - result.push.apply(result, this._actionCollection.getResourceInformation()); - return result; - }; - ContainerWithActions2.prototype.isBleedingAtBottom = function() { - if (this._actionCollection.renderedActionCount === 0) { - return _super.prototype.isBleedingAtBottom.call(this); - } else { - if (this._actionCollection.getActionCount() === 1) { - return this._actionCollection.expandedAction !== void 0 && !this.hostConfig.actions.preExpandSingleShowCardAction; - } else { - return this._actionCollection.expandedAction !== void 0; - } - } - }; - ContainerWithActions2.prototype.getForbiddenActionNames = function() { - return []; - }; - Object.defineProperty(ContainerWithActions2.prototype, "isStandalone", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - return ContainerWithActions2; - }(Container) - ); - exports.ContainerWithActions = ContainerWithActions; - var RefreshActionProperty = ( - /** @class */ - function(_super) { - __extends(RefreshActionProperty2, _super); - function RefreshActionProperty2(targetVersion, name) { - var _this = _super.call(this, targetVersion, name, void 0) || this; - _this.targetVersion = targetVersion; - _this.name = name; - return _this; - } - RefreshActionProperty2.prototype.parse = function(sender, source, context) { - var action = context.parseAction(sender.parent, source[this.name], [], false); - if (action !== void 0) { - if (action instanceof ExecuteAction) { - return action; - } - context.logParseEvent(sender, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(action.getJsonTypeName())); - } - context.logParseEvent(sender, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("action")); - return void 0; - }; - RefreshActionProperty2.prototype.toJSON = function(sender, target, value, context) { - context.serializeValue(target, this.name, value ? value.toJSON(context) : void 0, void 0, true); - }; - return RefreshActionProperty2; - }(serialization_1.PropertyDefinition) - ); - exports.RefreshActionProperty = RefreshActionProperty; - var RefreshDefinition = ( - /** @class */ - function(_super) { - __extends(RefreshDefinition2, _super); - function RefreshDefinition2() { - return _super !== null && _super.apply(this, arguments) || this; - } - Object.defineProperty(RefreshDefinition2.prototype, "action", { - get: function() { - return this.getValue(RefreshDefinition2.actionProperty); - }, - set: function(value) { - this.setValue(RefreshDefinition2.actionProperty, value); - if (value) { - value.setParent(this.parent); - } - }, - enumerable: false, - configurable: true - }); - RefreshDefinition2.prototype.getSchemaKey = function() { - return "RefreshDefinition"; - }; - RefreshDefinition2.actionProperty = new RefreshActionProperty(serialization_1.Versions.v1_4, "action"); - RefreshDefinition2.userIdsProperty = new serialization_1.StringArrayProperty(serialization_1.Versions.v1_4, "userIds"); - __decorate([ - (0, serialization_1.property)(RefreshDefinition2.actionProperty) - ], RefreshDefinition2.prototype, "action", null); - __decorate([ - (0, serialization_1.property)(RefreshDefinition2.userIdsProperty) - ], RefreshDefinition2.prototype, "userIds", void 0); - return RefreshDefinition2; - }(serialization_1.SerializableObject) - ); - exports.RefreshDefinition = RefreshDefinition; - var AuthCardButton = ( - /** @class */ - function(_super) { - __extends(AuthCardButton2, _super); - function AuthCardButton2() { - return _super !== null && _super.apply(this, arguments) || this; - } - AuthCardButton2.prototype.getSchemaKey = function() { - return "AuthCardButton"; - }; - AuthCardButton2.typeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "type"); - AuthCardButton2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "title"); - AuthCardButton2.imageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "image"); - AuthCardButton2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "value"); - __decorate([ - (0, serialization_1.property)(AuthCardButton2.typeProperty) - ], AuthCardButton2.prototype, "type", void 0); - __decorate([ - (0, serialization_1.property)(AuthCardButton2.titleProperty) - ], AuthCardButton2.prototype, "title", void 0); - __decorate([ - (0, serialization_1.property)(AuthCardButton2.imageProperty) - ], AuthCardButton2.prototype, "image", void 0); - __decorate([ - (0, serialization_1.property)(AuthCardButton2.valueProperty) - ], AuthCardButton2.prototype, "value", void 0); - return AuthCardButton2; - }(serialization_1.SerializableObject) - ); - exports.AuthCardButton = AuthCardButton; - var TokenExchangeResource = ( - /** @class */ - function(_super) { - __extends(TokenExchangeResource2, _super); - function TokenExchangeResource2() { - return _super !== null && _super.apply(this, arguments) || this; - } - TokenExchangeResource2.prototype.getSchemaKey = function() { - return "TokenExchangeResource"; - }; - TokenExchangeResource2.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "id"); - TokenExchangeResource2.uriProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "uri"); - TokenExchangeResource2.providerIdProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "providerId"); - __decorate([ - (0, serialization_1.property)(TokenExchangeResource2.idProperty) - ], TokenExchangeResource2.prototype, "id", void 0); - __decorate([ - (0, serialization_1.property)(TokenExchangeResource2.uriProperty) - ], TokenExchangeResource2.prototype, "uri", void 0); - __decorate([ - (0, serialization_1.property)(TokenExchangeResource2.providerIdProperty) - ], TokenExchangeResource2.prototype, "providerId", void 0); - return TokenExchangeResource2; - }(serialization_1.SerializableObject) - ); - exports.TokenExchangeResource = TokenExchangeResource; - var Authentication = ( - /** @class */ - function(_super) { - __extends(Authentication2, _super); - function Authentication2() { - return _super !== null && _super.apply(this, arguments) || this; - } - Authentication2.prototype.getSchemaKey = function() { - return "Authentication"; - }; - Authentication2.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "text"); - Authentication2.connectionNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "connectionName"); - Authentication2.buttonsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_4, "buttons", AuthCardButton); - Authentication2.tokenExchangeResourceProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, "tokenExchangeResource", TokenExchangeResource, true); - __decorate([ - (0, serialization_1.property)(Authentication2.textProperty) - ], Authentication2.prototype, "text", void 0); - __decorate([ - (0, serialization_1.property)(Authentication2.connectionNameProperty) - ], Authentication2.prototype, "connectionName", void 0); - __decorate([ - (0, serialization_1.property)(Authentication2.buttonsProperty) - ], Authentication2.prototype, "buttons", void 0); - __decorate([ - (0, serialization_1.property)(Authentication2.tokenExchangeResourceProperty) - ], Authentication2.prototype, "tokenExchangeResource", void 0); - return Authentication2; - }(serialization_1.SerializableObject) - ); - exports.Authentication = Authentication; - var AdaptiveCard = ( - /** @class */ - function(_super) { - __extends(AdaptiveCard2, _super); - function AdaptiveCard2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.designMode = false; - return _this; - } - Object.defineProperty(AdaptiveCard2.prototype, "refresh", { - get: function() { - return this.getValue(AdaptiveCard2.refreshProperty); - }, - set: function(value) { - this.setValue(AdaptiveCard2.refreshProperty, value); - if (value) { - value.parent = this; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(AdaptiveCard2, "processMarkdown", { - get: function() { - throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved()); - }, - // eslint-disable-next-line @typescript-eslint/naming-convention - set: function(_value) { - throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved()); - }, - enumerable: false, - configurable: true - }); - AdaptiveCard2.applyMarkdown = function(text) { - var result = { - didProcess: false - }; - if (AdaptiveCard2.onProcessMarkdown) { - AdaptiveCard2.onProcessMarkdown(text, result); - } else if (window.markdownit) { - var markdownIt = window.markdownit; - result.outputHtml = markdownIt().render(text); - result.didProcess = true; - } else if (!AdaptiveCard2._haveWarnedAboutNoMarkdownProcessing) { - console.warn(strings_1.Strings.errors.markdownProcessingNotEnabled); - AdaptiveCard2._haveWarnedAboutNoMarkdownProcessing = true; - } - return result; - }; - AdaptiveCard2.prototype.isVersionSupported = function() { - if (this.bypassVersionCheck) { - return true; - } else { - var unsupportedVersion = !this.version || !this.version.isValid || this.maxVersion.major < this.version.major || this.maxVersion.major === this.version.major && this.maxVersion.minor < this.version.minor; - return !unsupportedVersion; - } - }; - AdaptiveCard2.prototype.getDefaultSerializationContext = function() { - return new SerializationContext(this.version); - }; - AdaptiveCard2.prototype.getItemsCollectionPropertyName = function() { - return "body"; - }; - AdaptiveCard2.prototype.canHostSingletons = function() { - return true; - }; - AdaptiveCard2.prototype.internalParse = function(source, context) { - this._fallbackCard = void 0; - var fallbackElement = context.parseElement(void 0, source["fallback"], this.forbiddenChildElements(), !this.isDesignMode()); - if (fallbackElement) { - this._fallbackCard = new AdaptiveCard2(); - this._fallbackCard.addItem(fallbackElement); - } - _super.prototype.internalParse.call(this, source, context); - }; - AdaptiveCard2.prototype.internalToJSON = function(target, context) { - this.setValue(AdaptiveCard2.versionProperty, context.targetVersion); - _super.prototype.internalToJSON.call(this, target, context); - }; - AdaptiveCard2.prototype.internalRender = function() { - var renderedElement = _super.prototype.internalRender.call(this); - if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && renderedElement) { - renderedElement.style.removeProperty("minHeight"); - } - return renderedElement; - }; - AdaptiveCard2.prototype.getHasBackground = function(ignoreBackgroundImages) { - if (ignoreBackgroundImages === void 0) { - ignoreBackgroundImages = false; - } - return true; - }; - AdaptiveCard2.prototype.getDefaultPadding = function() { - return new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding); - }; - AdaptiveCard2.prototype.shouldSerialize = function(_context) { - return true; - }; - Object.defineProperty(AdaptiveCard2.prototype, "renderIfEmpty", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(AdaptiveCard2.prototype, "bypassVersionCheck", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(AdaptiveCard2.prototype, "allowCustomStyle", { - get: function() { - return this.hostConfig.adaptiveCard && this.hostConfig.adaptiveCard.allowCustomStyle; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(AdaptiveCard2.prototype, "hasBackground", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - AdaptiveCard2.prototype.getJsonTypeName = function() { - return "AdaptiveCard"; - }; - AdaptiveCard2.prototype.internalValidateProperties = function(context) { - _super.prototype.internalValidateProperties.call(this, context); - if (this.getValue(CardElement.typeNameProperty) !== "AdaptiveCard") { - context.addFailure(this, Enums.ValidationEvent.MissingCardType, strings_1.Strings.errors.invalidCardType()); - } - if (!this.bypassVersionCheck && !this.version) { - context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("version")); - } else if (!this.isVersionSupported()) { - context.addFailure(this, Enums.ValidationEvent.UnsupportedCardVersion, strings_1.Strings.errors.unsupportedCardVersion(this.version.toString(), this.maxVersion.toString())); - } - }; - AdaptiveCard2.prototype.render = function(target) { - var renderedCard; - if (this.shouldFallback() && this._fallbackCard) { - this._fallbackCard.hostConfig = this.hostConfig; - renderedCard = this._fallbackCard.render(); - } else { - renderedCard = _super.prototype.render.call(this); - if (renderedCard) { - renderedCard.classList.add(this.hostConfig.makeCssClassName("ac-adaptiveCard")); - if (shared_1.GlobalSettings.setTabIndexAtCardRoot) { - renderedCard.tabIndex = 0; - } - if (this.speak) { - renderedCard.setAttribute("aria-label", this.speak); - } - } - } - if (target) { - Utils.appendChild(target, renderedCard); - this.updateLayout(); - } - return renderedCard; - }; - AdaptiveCard2.prototype.updateLayout = function(processChildren) { - if (processChildren === void 0) { - processChildren = true; - } - _super.prototype.updateLayout.call(this, processChildren); - if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && this.isDisplayed()) { - var padding = this.hostConfig.getEffectiveSpacing(Enums.Spacing.Default); - this["handleOverflow"](this.renderedElement.offsetHeight - padding); - } - }; - AdaptiveCard2.prototype.shouldFallback = function() { - return _super.prototype.shouldFallback.call(this) || !this.isVersionSupported(); - }; - Object.defineProperty(AdaptiveCard2.prototype, "hasVisibleSeparator", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - AdaptiveCard2.schemaUrl = "http://adaptivecards.io/schemas/adaptive-card.json"; - AdaptiveCard2.$schemaProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, "$schema", function(sender, property, source, context) { - return AdaptiveCard2.schemaUrl; - }, function(sender, prop, target, value, context) { - context.serializeValue(target, prop.name, AdaptiveCard2.schemaUrl); - }); - AdaptiveCard2.versionProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, "version", function(sender, prop, source, context) { - var version = serialization_1.Version.parse(source[prop.name], context); - if (version === void 0) { - version = serialization_1.Versions.latest; - context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidCardVersion(version.toString())); - } - return version; - }, function(sender, prop, target, value, context) { - if (value !== void 0) { - context.serializeValue(target, prop.name, value.toString()); - } - }, serialization_1.Versions.v1_0); - AdaptiveCard2.fallbackTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "fallbackText"); - AdaptiveCard2.speakProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "speak"); - AdaptiveCard2.refreshProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, "refresh", RefreshDefinition, true); - AdaptiveCard2.authenticationProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, "authentication", Authentication, true); - AdaptiveCard2._haveWarnedAboutNoMarkdownProcessing = false; - __decorate([ - (0, serialization_1.property)(AdaptiveCard2.versionProperty) - ], AdaptiveCard2.prototype, "version", void 0); - __decorate([ - (0, serialization_1.property)(AdaptiveCard2.fallbackTextProperty) - ], AdaptiveCard2.prototype, "fallbackText", void 0); - __decorate([ - (0, serialization_1.property)(AdaptiveCard2.speakProperty) - ], AdaptiveCard2.prototype, "speak", void 0); - __decorate([ - (0, serialization_1.property)(AdaptiveCard2.refreshProperty) - ], AdaptiveCard2.prototype, "refresh", null); - __decorate([ - (0, serialization_1.property)(AdaptiveCard2.authenticationProperty) - ], AdaptiveCard2.prototype, "authentication", void 0); - return AdaptiveCard2; - }(ContainerWithActions) - ); - exports.AdaptiveCard = AdaptiveCard; - var InlineAdaptiveCard = ( - /** @class */ - function(_super) { - __extends(InlineAdaptiveCard2, _super); - function InlineAdaptiveCard2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.suppressStyle = false; - return _this; - } - InlineAdaptiveCard2.prototype.getSchemaKey = function() { - return "InlineAdaptiveCard"; - }; - InlineAdaptiveCard2.prototype.populateSchema = function(schema) { - _super.prototype.populateSchema.call(this, schema); - schema.remove(AdaptiveCard.$schemaProperty, AdaptiveCard.versionProperty); - }; - InlineAdaptiveCard2.prototype.getDefaultPadding = function() { - return new shared_1.PaddingDefinition(this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding, this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding); - }; - Object.defineProperty(InlineAdaptiveCard2.prototype, "bypassVersionCheck", { - get: function() { - return true; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(InlineAdaptiveCard2.prototype, "defaultStyle", { - get: function() { - if (this.suppressStyle) { - return Enums.ContainerStyle.Default; - } else { - return this.hostConfig.actions.showCard.style ? this.hostConfig.actions.showCard.style : Enums.ContainerStyle.Emphasis; - } - }, - enumerable: false, - configurable: true - }); - InlineAdaptiveCard2.prototype.render = function(target) { - var renderedCard = _super.prototype.render.call(this, target); - if (renderedCard) { - renderedCard.setAttribute("aria-live", "polite"); - renderedCard.removeAttribute("tabindex"); - } - return renderedCard; - }; - return InlineAdaptiveCard2; - }(AdaptiveCard) - ); - var SerializationContext = ( - /** @class */ - function(_super) { - __extends(SerializationContext2, _super); - function SerializationContext2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._forbiddenTypes = /* @__PURE__ */ new Set(); - return _this; - } - SerializationContext2.prototype.internalParseCardObject = function(parent, source, forbiddenTypes, allowFallback, createInstanceCallback, logParseEvent, parsingSingletonObject) { - var _this = this; - if (parsingSingletonObject === void 0) { - parsingSingletonObject = false; - } - var result = void 0; - if (source && typeof source === "object") { - var oldForbiddenTypes_1 = /* @__PURE__ */ new Set(); - this._forbiddenTypes.forEach(function(type) { - oldForbiddenTypes_1.add(type); - }); - forbiddenTypes.forEach(function(type) { - _this._forbiddenTypes.add(type); - }); - var typeName = Utils.parseString(source["type"]); - var ignoreForbiddenType = parsingSingletonObject && typeName === "Carousel"; - if (typeName && this._forbiddenTypes.has(typeName) && !ignoreForbiddenType) { - logParseEvent(typeName, Enums.TypeErrorType.ForbiddenType); - } else { - var tryToFallback = false; - result = createInstanceCallback(typeName); - if (!result) { - tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback; - logParseEvent(typeName, Enums.TypeErrorType.UnknownType); - } else { - result.setParent(parent); - result.parse(source, this); - tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback && result.shouldFallback(); - } - if (tryToFallback) { - var fallback = source["fallback"]; - if (!fallback && parent) { - parent.setShouldFallback(true); - } - if (typeof fallback === "string" && fallback.toLowerCase() === "drop") { - result = void 0; - } else if (typeof fallback === "object") { - result = this.internalParseCardObject(parent, fallback, forbiddenTypes, true, createInstanceCallback, logParseEvent); - } - } - } - this._forbiddenTypes = oldForbiddenTypes_1; - } - return result; - }; - SerializationContext2.prototype.cardObjectParsed = function(o, source) { - if (o instanceof Action && this.onParseAction) { - this.onParseAction(o, source, this); - } else if (o instanceof CardElement && this.onParseElement) { - this.onParseElement(o, source, this); - } - }; - SerializationContext2.prototype.shouldSerialize = function(o) { - if (o instanceof Action) { - return this.actionRegistry.findByName(o.getJsonTypeName()) !== void 0; - } else if (o instanceof CardElement) { - return this.elementRegistry.findByName(o.getJsonTypeName()) !== void 0; - } else { - return true; - } - }; - SerializationContext2.prototype.parseCardObject = function(parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent, parsingSingletonObject) { - if (parsingSingletonObject === void 0) { - parsingSingletonObject = false; - } - var forbiddenTypes = new Set(forbiddenTypeNames); - var result = this.internalParseCardObject(parent, source, forbiddenTypes, allowFallback, createInstanceCallback, logParseEvent, parsingSingletonObject); - if (result !== void 0) { - this.cardObjectParsed(result, source); - } - return result; - }; - SerializationContext2.prototype.parseElement = function(parent, source, forbiddenTypes, allowFallback, _parsingSingletonObject) { - var _this = this; - if (_parsingSingletonObject === void 0) { - _parsingSingletonObject = false; - } - return this.parseCardObject(parent, source, forbiddenTypes, allowFallback, function(typeName) { - return _this.elementRegistry.createInstance(typeName, _this.targetVersion); - }, function(typeName, errorType) { - if (errorType === Enums.TypeErrorType.UnknownType) { - _this.logParseEvent(void 0, Enums.ValidationEvent.UnknownElementType, strings_1.Strings.errors.unknownElementType(typeName)); - } else { - _this.logParseEvent(void 0, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName)); - } - }, _parsingSingletonObject); - }; - SerializationContext2.prototype.parseAction = function(parent, source, forbiddenActionTypes, allowFallback) { - var _this = this; - return this.parseCardObject(parent, source, forbiddenActionTypes, allowFallback, function(typeName) { - return _this.actionRegistry.createInstance(typeName, _this.targetVersion); - }, function(typeName, errorType) { - if (errorType === Enums.TypeErrorType.UnknownType) { - _this.logParseEvent(void 0, Enums.ValidationEvent.UnknownActionType, strings_1.Strings.errors.unknownActionType(typeName)); - } else { - _this.logParseEvent(void 0, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(typeName)); - } - }); - }; - Object.defineProperty(SerializationContext2.prototype, "elementRegistry", { - get: function() { - var _a; - return (_a = this._elementRegistry) !== null && _a !== void 0 ? _a : registry_1.GlobalRegistry.elements; - }, - enumerable: false, - configurable: true - }); - SerializationContext2.prototype.setElementRegistry = function(value) { - this._elementRegistry = value; - }; - Object.defineProperty(SerializationContext2.prototype, "actionRegistry", { - get: function() { - var _a; - return (_a = this._actionRegistry) !== null && _a !== void 0 ? _a : registry_1.GlobalRegistry.actions; - }, - enumerable: false, - configurable: true - }); - SerializationContext2.prototype.setActionRegistry = function(value) { - this._actionRegistry = value; - }; - return SerializationContext2; - }(serialization_1.BaseSerializationContext) - ); - exports.SerializationContext = SerializationContext; - registry_1.GlobalRegistry.defaultElements.register("Container", Container); - registry_1.GlobalRegistry.defaultElements.register("TextBlock", TextBlock); - registry_1.GlobalRegistry.defaultElements.register("RichTextBlock", RichTextBlock, serialization_1.Versions.v1_2); - registry_1.GlobalRegistry.defaultElements.register("TextRun", TextRun, serialization_1.Versions.v1_2); - registry_1.GlobalRegistry.defaultElements.register("Image", Image); - registry_1.GlobalRegistry.defaultElements.register("ImageSet", ImageSet); - registry_1.GlobalRegistry.defaultElements.register("Media", Media, serialization_1.Versions.v1_1); - registry_1.GlobalRegistry.defaultElements.register("FactSet", FactSet); - registry_1.GlobalRegistry.defaultElements.register("ColumnSet", ColumnSet); - registry_1.GlobalRegistry.defaultElements.register("ActionSet", ActionSet, serialization_1.Versions.v1_2); - registry_1.GlobalRegistry.defaultElements.register("Input.Text", TextInput); - registry_1.GlobalRegistry.defaultElements.register("Input.Date", DateInput); - registry_1.GlobalRegistry.defaultElements.register("Input.Time", TimeInput); - registry_1.GlobalRegistry.defaultElements.register("Input.Number", NumberInput); - registry_1.GlobalRegistry.defaultElements.register("Input.ChoiceSet", ChoiceSetInput); - registry_1.GlobalRegistry.defaultElements.register("Input.Toggle", ToggleInput); - registry_1.GlobalRegistry.defaultActions.register(OpenUrlAction.JsonTypeName, OpenUrlAction); - registry_1.GlobalRegistry.defaultActions.register(SubmitAction.JsonTypeName, SubmitAction); - registry_1.GlobalRegistry.defaultActions.register(ShowCardAction.JsonTypeName, ShowCardAction); - registry_1.GlobalRegistry.defaultActions.register(ToggleVisibilityAction.JsonTypeName, ToggleVisibilityAction, serialization_1.Versions.v1_2); - registry_1.GlobalRegistry.defaultActions.register(ExecuteAction.JsonTypeName, ExecuteAction, serialization_1.Versions.v1_4); - } -}); - -// node_modules/adaptivecards/lib/table.js -var require_table = __commonJS({ - "node_modules/adaptivecards/lib/table.js"(exports) { - "use strict"; - var __extends = exports && exports.__extends || /* @__PURE__ */ function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - }(); - var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") - r = Reflect.decorate(decorators, target, key, desc); - else - for (var i = decorators.length - 1; i >= 0; i--) - if (d = decorators[i]) - r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Table = exports.TableRow = exports.TableCell = exports.StylableContainer = exports.TableColumnDefinition = void 0; - var card_elements_1 = require_card_elements(); - var enums_1 = require_enums(); - var registry_1 = require_registry(); - var serialization_1 = require_serialization(); - var shared_1 = require_shared(); - var strings_1 = require_strings(); - var utils_1 = require_utils(); - var TableColumnDefinition = ( - /** @class */ - function(_super) { - __extends(TableColumnDefinition2, _super); - function TableColumnDefinition2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.width = new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight); - return _this; - } - TableColumnDefinition2.prototype.getSchemaKey = function() { - return "ColumnDefinition"; - }; - TableColumnDefinition2.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "horizontalCellContentAlignment", enums_1.HorizontalAlignment); - TableColumnDefinition2.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "verticalCellContentAlignment", enums_1.VerticalAlignment); - TableColumnDefinition2.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_5, "width", function(sender, prop, source, context) { - var result = prop.defaultValue; - var value = source[prop.name]; - var invalidWidth = false; - if (typeof value === "number" && !isNaN(value)) { - result = new shared_1.SizeAndUnit(value, enums_1.SizeUnit.Weight); - } else if (typeof value === "string") { - try { - result = shared_1.SizeAndUnit.parse(value); - } catch (e) { - invalidWidth = true; - } - } else { - invalidWidth = true; - } - if (invalidWidth) { - context.logParseEvent(sender, enums_1.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value)); - } - return result; - }, function(sender, property, target, value, context) { - if (value.unit === enums_1.SizeUnit.Pixel) { - context.serializeValue(target, "width", value.physicalSize + "px"); - } else { - context.serializeNumber(target, "width", value.physicalSize); - } - }, new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight)); - __decorate([ - (0, serialization_1.property)(TableColumnDefinition2.horizontalCellContentAlignmentProperty) - ], TableColumnDefinition2.prototype, "horizontalCellContentAlignment", void 0); - __decorate([ - (0, serialization_1.property)(TableColumnDefinition2.verticalCellContentAlignmentProperty) - ], TableColumnDefinition2.prototype, "verticalCellContentAlignment", void 0); - __decorate([ - (0, serialization_1.property)(TableColumnDefinition2.widthProperty) - ], TableColumnDefinition2.prototype, "width", void 0); - return TableColumnDefinition2; - }(serialization_1.SerializableObject) - ); - exports.TableColumnDefinition = TableColumnDefinition; - var StylableContainer = ( - /** @class */ - function(_super) { - __extends(StylableContainer2, _super); - function StylableContainer2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._items = []; - return _this; - } - StylableContainer2.prototype.parseItem = function(source, context) { - var _this = this; - return context.parseCardObject( - this, - source, - [], - // Forbidden types not supported for elements for now - !this.isDesignMode(), - function(typeName) { - return _this.createItemInstance(typeName); - }, - function(typeName, _errorType) { - context.logParseEvent(void 0, enums_1.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName)); - } - ); - }; - StylableContainer2.prototype.internalAddItem = function(item) { - if (!item.parent) { - this._items.push(item); - item.setParent(this); - } else { - throw new Error(strings_1.Strings.errors.elementAlreadyParented()); - } - }; - StylableContainer2.prototype.internalRemoveItem = function(item) { - var itemIndex = this._items.indexOf(item); - if (itemIndex >= 0) { - this._items.splice(itemIndex, 1); - item.setParent(void 0); - this.updateLayout(); - return true; - } - return false; - }; - StylableContainer2.prototype.internalIndexOf = function(item) { - return this._items.indexOf(item); - }; - StylableContainer2.prototype.internalParse = function(source, context) { - _super.prototype.internalParse.call(this, source, context); - this._items = []; - var items = source[this.getCollectionPropertyName()]; - if (Array.isArray(items)) { - for (var _i = 0, items_1 = items; _i < items_1.length; _i++) { - var item = items_1[_i]; - var instance = this.parseItem(item, context); - if (instance) { - this._items.push(instance); - } - } - } - }; - StylableContainer2.prototype.internalToJSON = function(target, context) { - _super.prototype.internalToJSON.call(this, target, context); - context.serializeArray(target, this.getCollectionPropertyName(), this._items); - }; - StylableContainer2.prototype.removeItem = function(item) { - return this.internalRemoveItem(item); - }; - StylableContainer2.prototype.getItemCount = function() { - return this._items.length; - }; - StylableContainer2.prototype.getItemAt = function(index) { - return this._items[index]; - }; - StylableContainer2.prototype.getFirstVisibleRenderedItem = function() { - return this.getItemCount() > 0 ? this.getItemAt(0) : void 0; - }; - StylableContainer2.prototype.getLastVisibleRenderedItem = function() { - return this.getItemCount() > 0 ? this.getItemAt(this.getItemCount() - 1) : void 0; - }; - return StylableContainer2; - }(card_elements_1.StylableCardElementContainer) - ); - exports.StylableContainer = StylableContainer; - var TableCell = ( - /** @class */ - function(_super) { - __extends(TableCell2, _super); - function TableCell2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._columnIndex = -1; - _this._cellType = "data"; - return _this; - } - TableCell2.prototype.getHasBorder = function() { - return this.parentRow.parentTable.showGridLines; - }; - TableCell2.prototype.applyBorder = function() { - if (this.renderedElement && this.getHasBorder()) { - var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.parentRow.parentTable.gridStyle); - if (styleDefinition.borderColor) { - var borderColor = (0, utils_1.stringToCssColor)(styleDefinition.borderColor); - if (borderColor) { - this.renderedElement.style.borderRight = "1px solid " + borderColor; - this.renderedElement.style.borderBottom = "1px solid " + borderColor; - } - } - } - }; - TableCell2.prototype.getDefaultPadding = function() { - return this.getHasBackground() || this.getHasBorder() ? new shared_1.PaddingDefinition(enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small) : _super.prototype.getDefaultPadding.call(this); - }; - TableCell2.prototype.internalRender = function() { - var cellElement = _super.prototype.internalRender.call(this); - if (cellElement) { - cellElement.setAttribute("role", this.cellType === "data" ? "cell" : "columnheader"); - cellElement.style.minWidth = "0"; - if (this.cellType === "header") { - cellElement.setAttribute("scope", "col"); - } - } - return cellElement; - }; - TableCell2.prototype.shouldSerialize = function(_context) { - return true; - }; - TableCell2.prototype.getJsonTypeName = function() { - return "TableCell"; - }; - TableCell2.prototype.getEffectiveTextStyleDefinition = function() { - if (this.cellType === "header") { - return this.hostConfig.textStyles.columnHeader; - } - return _super.prototype.getEffectiveTextStyleDefinition.call(this); - }; - TableCell2.prototype.getEffectiveHorizontalAlignment = function() { - if (this.horizontalAlignment !== void 0) { - return this.horizontalAlignment; - } - if (this.parentRow.horizontalCellContentAlignment !== void 0) { - return this.parentRow.horizontalCellContentAlignment; - } - if (this.columnIndex >= 0) { - var horizontalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).horizontalCellContentAlignment; - if (horizontalAlignment !== void 0) { - return horizontalAlignment; - } - } - if (this.parentRow.parentTable.horizontalCellContentAlignment !== void 0) { - return this.parentRow.parentTable.horizontalCellContentAlignment; - } - return _super.prototype.getEffectiveHorizontalAlignment.call(this); - }; - TableCell2.prototype.getEffectiveVerticalContentAlignment = function() { - if (this.verticalContentAlignment !== void 0) { - return this.verticalContentAlignment; - } - if (this.parentRow.verticalCellContentAlignment !== void 0) { - return this.parentRow.verticalCellContentAlignment; - } - if (this.columnIndex >= 0) { - var verticalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).verticalCellContentAlignment; - if (verticalAlignment !== void 0) { - return verticalAlignment; - } - } - if (this.parentRow.parentTable.verticalCellContentAlignment !== void 0) { - return this.parentRow.parentTable.verticalCellContentAlignment; - } - return _super.prototype.getEffectiveVerticalContentAlignment.call(this); - }; - Object.defineProperty(TableCell2.prototype, "columnIndex", { - get: function() { - return this._columnIndex; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(TableCell2.prototype, "cellType", { - get: function() { - return this._cellType; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(TableCell2.prototype, "parentRow", { - get: function() { - return this.parent; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(TableCell2.prototype, "isStandalone", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - return TableCell2; - }(card_elements_1.Container) - ); - exports.TableCell = TableCell; - var TableRow = ( - /** @class */ - function(_super) { - __extends(TableRow2, _super); - function TableRow2() { - return _super !== null && _super.apply(this, arguments) || this; - } - TableRow2.prototype.getDefaultPadding = function() { - return new shared_1.PaddingDefinition(enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None); - }; - TableRow2.prototype.applyBackground = function() { - if (this.renderedElement) { - var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle)); - if (styleDefinition.backgroundColor) { - var bgColor = (0, utils_1.stringToCssColor)(styleDefinition.backgroundColor); - if (bgColor) { - this.renderedElement.style.backgroundColor = bgColor; - } - } - } - }; - TableRow2.prototype.getCollectionPropertyName = function() { - return "cells"; - }; - TableRow2.prototype.createItemInstance = function(typeName) { - return !typeName || typeName === "TableCell" ? new TableCell() : void 0; - }; - TableRow2.prototype.internalRender = function() { - var isFirstRow = this.getIsFirstRow(); - var cellSpacing = this.hostConfig.table.cellSpacing; - var rowElement = document.createElement("div"); - rowElement.setAttribute("role", "row"); - rowElement.style.display = "flex"; - rowElement.style.flexDirection = "row"; - for (var i = 0; i < Math.min(this.getItemCount(), this.parentTable.getColumnCount()); i++) { - var cell = this.getItemAt(i); - cell["_columnIndex"] = i; - cell["_cellType"] = this.parentTable.firstRowAsHeaders && isFirstRow ? "header" : "data"; - var renderedCell = cell.render(); - if (renderedCell) { - var column = this.parentTable.getColumnAt(i); - if (column.computedWidth.unit === enums_1.SizeUnit.Pixel) { - renderedCell.style.flex = "0 0 " + column.computedWidth.physicalSize + "px"; - } else { - renderedCell.style.flex = "1 1 " + column.computedWidth.physicalSize + "%"; - } - if (i > 0 && !this.parentTable.showGridLines && cellSpacing > 0) { - renderedCell.style.marginLeft = cellSpacing + "px"; - } - rowElement.appendChild(renderedCell); - } - } - return rowElement.children.length > 0 ? rowElement : void 0; - }; - TableRow2.prototype.shouldSerialize = function(_context) { - return true; - }; - TableRow2.prototype.addCell = function(cell) { - this.internalAddItem(cell); - }; - TableRow2.prototype.removeCellAt = function(columnIndex) { - if (columnIndex >= 0 && columnIndex < this.getItemCount()) { - return this.removeItem(this.getItemAt(columnIndex)); - } - return false; - }; - TableRow2.prototype.indexOf = function(cardElement) { - return cardElement instanceof TableCell ? this.internalIndexOf(cardElement) : -1; - }; - TableRow2.prototype.ensureHasEnoughCells = function(cellCount) { - while (this.getItemCount() < cellCount) { - this.addCell(new TableCell()); - } - }; - TableRow2.prototype.getJsonTypeName = function() { - return "TableRow"; - }; - TableRow2.prototype.getIsFirstRow = function() { - return this.parentTable.getItemAt(0) === this; - }; - Object.defineProperty(TableRow2.prototype, "parentTable", { - get: function() { - return this.parent; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(TableRow2.prototype, "isStandalone", { - get: function() { - return false; - }, - enumerable: false, - configurable: true - }); - TableRow2.styleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, "style"); - TableRow2.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "horizontalCellContentAlignment", enums_1.HorizontalAlignment); - TableRow2.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "verticalCellContentAlignment", enums_1.VerticalAlignment); - __decorate([ - (0, serialization_1.property)(TableRow2.horizontalCellContentAlignmentProperty) - ], TableRow2.prototype, "horizontalCellContentAlignment", void 0); - __decorate([ - (0, serialization_1.property)(TableRow2.verticalCellContentAlignmentProperty) - ], TableRow2.prototype, "verticalCellContentAlignment", void 0); - return TableRow2; - }(StylableContainer) - ); - exports.TableRow = TableRow; - var Table = ( - /** @class */ - function(_super) { - __extends(Table2, _super); - function Table2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._columns = []; - _this.firstRowAsHeaders = true; - _this.showGridLines = true; - return _this; - } - Object.defineProperty(Table2.prototype, "gridStyle", { - get: function() { - var style = this.getValue(Table2.gridStyleProperty); - if (style && this.hostConfig.containerStyles.getStyleByName(style)) { - return style; - } - return void 0; - }, - set: function(value) { - this.setValue(Table2.gridStyleProperty, value); - }, - enumerable: false, - configurable: true - }); - Table2.prototype.ensureRowsHaveEnoughCells = function() { - for (var i = 0; i < this.getItemCount(); i++) { - this.getItemAt(i).ensureHasEnoughCells(this.getColumnCount()); - } - }; - Table2.prototype.removeCellsFromColumn = function(columnIndex) { - for (var i = 0; i < this.getItemCount(); i++) { - this.getItemAt(i).removeCellAt(columnIndex); - } - }; - Table2.prototype.getCollectionPropertyName = function() { - return "rows"; - }; - Table2.prototype.createItemInstance = function(typeName) { - return !typeName || typeName === "TableRow" ? new TableRow() : void 0; - }; - Table2.prototype.internalParse = function(source, context) { - _super.prototype.internalParse.call(this, source, context); - this.ensureRowsHaveEnoughCells(); - }; - Table2.prototype.internalRender = function() { - if (this.getItemCount() > 0) { - var totalWeights = 0; - for (var _i = 0, _a = this._columns; _i < _a.length; _i++) { - var column = _a[_i]; - if (column.width.unit === enums_1.SizeUnit.Weight) { - totalWeights += column.width.physicalSize; - } - } - for (var _b = 0, _c = this._columns; _b < _c.length; _b++) { - var column = _c[_b]; - if (column.width.unit === enums_1.SizeUnit.Pixel) { - column.computedWidth = new shared_1.SizeAndUnit(column.width.physicalSize, enums_1.SizeUnit.Pixel); - } else { - column.computedWidth = new shared_1.SizeAndUnit(100 / totalWeights * column.width.physicalSize, enums_1.SizeUnit.Weight); - } - } - var tableElement = document.createElement("div"); - tableElement.setAttribute("role", "table"); - tableElement.style.display = "flex"; - tableElement.style.flexDirection = "column"; - if (this.showGridLines) { - var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.gridStyle); - if (styleDefinition.borderColor) { - var borderColor = (0, utils_1.stringToCssColor)(styleDefinition.borderColor); - if (borderColor) { - tableElement.style.borderTop = "1px solid " + borderColor; - tableElement.style.borderLeft = "1px solid " + borderColor; - } - } - } - var cellSpacing = this.hostConfig.table.cellSpacing; - for (var i = 0; i < this.getItemCount(); i++) { - var renderedRow = this.getItemAt(i).render(); - if (renderedRow) { - if (i > 0 && !this.showGridLines && cellSpacing > 0) { - var separatorRow = document.createElement("div"); - separatorRow.setAttribute("aria-hidden", "true"); - separatorRow.style.height = cellSpacing + "px"; - tableElement.appendChild(separatorRow); - } - tableElement.appendChild(renderedRow); - } - } - return tableElement; - } - return void 0; - }; - Table2.prototype.addColumn = function(column) { - this._columns.push(column); - this.ensureRowsHaveEnoughCells(); - }; - Table2.prototype.removeColumn = function(column) { - var index = this._columns.indexOf(column); - if (index >= 0) { - this.removeCellsFromColumn(index); - this._columns.splice(index, 1); - } - }; - Table2.prototype.getColumnCount = function() { - return this._columns.length; - }; - Table2.prototype.getColumnAt = function(index) { - return this._columns[index]; - }; - Table2.prototype.addRow = function(row) { - this.internalAddItem(row); - row.ensureHasEnoughCells(this.getColumnCount()); - }; - Table2.prototype.indexOf = function(cardElement) { - return cardElement instanceof TableRow ? this.internalIndexOf(cardElement) : -1; - }; - Table2.prototype.getJsonTypeName = function() { - return "Table"; - }; - Table2._columnsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_5, "columns", TableColumnDefinition); - Table2.firstRowAsHeadersProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, "firstRowAsHeaders", true); - Table2.showGridLinesProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, "showGridLines", true); - Table2.gridStyleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, "gridStyle"); - Table2.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "horizontalCellContentAlignment", enums_1.HorizontalAlignment); - Table2.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "verticalCellContentAlignment", enums_1.VerticalAlignment); - __decorate([ - (0, serialization_1.property)(Table2._columnsProperty) - ], Table2.prototype, "_columns", void 0); - __decorate([ - (0, serialization_1.property)(Table2.firstRowAsHeadersProperty) - ], Table2.prototype, "firstRowAsHeaders", void 0); - __decorate([ - (0, serialization_1.property)(Table2.showGridLinesProperty) - ], Table2.prototype, "showGridLines", void 0); - __decorate([ - (0, serialization_1.property)(Table2.gridStyleProperty) - ], Table2.prototype, "gridStyle", null); - __decorate([ - (0, serialization_1.property)(Table2.horizontalCellContentAlignmentProperty) - ], Table2.prototype, "horizontalCellContentAlignment", void 0); - __decorate([ - (0, serialization_1.property)(Table2.verticalCellContentAlignmentProperty) - ], Table2.prototype, "verticalCellContentAlignment", void 0); - return Table2; - }(StylableContainer) - ); - exports.Table = Table; - registry_1.GlobalRegistry.defaultElements.register("Table", Table, serialization_1.Versions.v1_5); - } -}); - -// node_modules/adaptivecards/lib/channel-adapter.js -var require_channel_adapter = __commonJS({ - "node_modules/adaptivecards/lib/channel-adapter.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ChannelAdapter = void 0; - var ChannelAdapter = ( - /** @class */ - /* @__PURE__ */ function() { - function ChannelAdapter2() { - } - return ChannelAdapter2; - }() - ); - exports.ChannelAdapter = ChannelAdapter; - } -}); - -// node_modules/adaptivecards/lib/activity-request.js -var require_activity_request = __commonJS({ - "node_modules/adaptivecards/lib/activity-request.js"(exports) { - "use strict"; - var __extends = exports && exports.__extends || /* @__PURE__ */ function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - }(); - Object.defineProperty(exports, "__esModule", { value: true }); - exports.LoginRequestResponse = exports.ErrorResponse = exports.SuccessResponse = exports.ActivityResponse = exports.ActivityRequestError = exports.ActivityRequestTrigger = void 0; - var ActivityRequestTrigger; - (function(ActivityRequestTrigger2) { - ActivityRequestTrigger2["Automatic"] = "automatic"; - ActivityRequestTrigger2["Manual"] = "manual"; - })(ActivityRequestTrigger = exports.ActivityRequestTrigger || (exports.ActivityRequestTrigger = {})); - var ActivityRequestError = ( - /** @class */ - /* @__PURE__ */ function() { - function ActivityRequestError2(code, message) { - this.code = code; - this.message = message; - } - return ActivityRequestError2; - }() - ); - exports.ActivityRequestError = ActivityRequestError; - var ActivityResponse = ( - /** @class */ - /* @__PURE__ */ function() { - function ActivityResponse2(request) { - this.request = request; - } - return ActivityResponse2; - }() - ); - exports.ActivityResponse = ActivityResponse; - var SuccessResponse = ( - /** @class */ - function(_super) { - __extends(SuccessResponse2, _super); - function SuccessResponse2(request, rawContent) { - var _this = _super.call(this, request) || this; - _this.request = request; - _this.rawContent = rawContent; - return _this; - } - return SuccessResponse2; - }(ActivityResponse) - ); - exports.SuccessResponse = SuccessResponse; - var ErrorResponse = ( - /** @class */ - function(_super) { - __extends(ErrorResponse2, _super); - function ErrorResponse2(request, error) { - var _this = _super.call(this, request) || this; - _this.request = request; - _this.error = error; - return _this; - } - return ErrorResponse2; - }(ActivityResponse) - ); - exports.ErrorResponse = ErrorResponse; - var LoginRequestResponse = ( - /** @class */ - function(_super) { - __extends(LoginRequestResponse2, _super); - function LoginRequestResponse2(request, auth) { - var _this = _super.call(this, request) || this; - _this.request = request; - _this._auth = auth; - for (var _i = 0, _a = _this._auth.buttons; _i < _a.length; _i++) { - var button = _a[_i]; - if (button.type === "signin" && button.value !== void 0) { - try { - new URL(button.value); - _this.signinButton = button; - break; - } catch (e) { - } - } - } - return _this; - } - Object.defineProperty(LoginRequestResponse2.prototype, "tokenExchangeResource", { - get: function() { - return this._auth.tokenExchangeResource; - }, - enumerable: false, - configurable: true - }); - return LoginRequestResponse2; - }(ActivityResponse) - ); - exports.LoginRequestResponse = LoginRequestResponse; - } -}); - -// node_modules/adaptivecards/lib/adaptive-applet.js -var require_adaptive_applet = __commonJS({ - "node_modules/adaptivecards/lib/adaptive-applet.js"(exports) { - "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __generator = exports && exports.__generator || function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) - throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (_) - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) - return t; - if (y = 0, t) - op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.AdaptiveApplet = void 0; - var Enums = require_enums(); - var Utils = require_utils(); - var shared_1 = require_shared(); - var activity_request_1 = require_activity_request(); - var strings_1 = require_strings(); - var card_elements_1 = require_card_elements(); - var serialization_1 = require_serialization(); - function logEvent(level, message) { - var optionalParams = []; - for (var _i = 2; _i < arguments.length; _i++) { - optionalParams[_i - 2] = arguments[_i]; - } - if (shared_1.GlobalSettings.applets.logEnabled) { - if (shared_1.GlobalSettings.applets.onLogEvent) { - shared_1.GlobalSettings.applets.onLogEvent(level, message, optionalParams); - } else { - switch (level) { - case Enums.LogLevel.Warning: - console.warn(message, optionalParams); - break; - case Enums.LogLevel.Error: - console.error(message, optionalParams); - break; - default: - console.log(message, optionalParams); - break; - } - } - } - } - var ActivityRequest = ( - /** @class */ - function() { - function ActivityRequest2(action, trigger, consecutiveRefreshes) { - this.action = action; - this.trigger = trigger; - this.consecutiveRefreshes = consecutiveRefreshes; - this.attemptNumber = 0; - } - ActivityRequest2.prototype.retryAsync = function() { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a) { - if (this.onSend) { - this.onSend(this); - } - return [ - 2 - /*return*/ - ]; - }); - }); - }; - return ActivityRequest2; - }() - ); - var AdaptiveApplet = ( - /** @class */ - function() { - function AdaptiveApplet2() { - this._allowAutomaticCardUpdate = false; - this.renderedElement = document.createElement("div"); - this.renderedElement.className = "aaf-cardHost"; - this.renderedElement.style.position = "relative"; - this.renderedElement.style.display = "flex"; - this.renderedElement.style.flexDirection = "column"; - this._cardHostElement = document.createElement("div"); - this._refreshButtonHostElement = document.createElement("div"); - this._refreshButtonHostElement.className = "aaf-refreshButtonHost"; - this._refreshButtonHostElement.style.display = "none"; - this.renderedElement.appendChild(this._cardHostElement); - this.renderedElement.appendChild(this._refreshButtonHostElement); - } - AdaptiveApplet2.prototype.displayCard = function(card) { - if (card.renderedElement) { - Utils.clearElementChildren(this._cardHostElement); - this._refreshButtonHostElement.style.display = "none"; - this._cardHostElement.appendChild(card.renderedElement); - } else { - throw new Error("displayCard: undefined card."); - } - }; - AdaptiveApplet2.prototype.showManualRefreshButton = function(refreshAction) { - var _this = this; - var displayBuiltInManualRefreshButton = this.onShowManualRefreshButton ? this.onShowManualRefreshButton(this) : true; - if (displayBuiltInManualRefreshButton) { - this._refreshButtonHostElement.style.display = "none"; - var renderedRefreshButton = void 0; - if (this.onRenderManualRefreshButton) { - renderedRefreshButton = this.onRenderManualRefreshButton(this); - } else { - var message = strings_1.Strings.runtime.refreshThisCard(); - if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic) { - var autoRefreshPausedMessage = strings_1.Strings.runtime.automaticRefreshPaused(); - if (autoRefreshPausedMessage[autoRefreshPausedMessage.length - 1] !== " ") { - autoRefreshPausedMessage += " "; - } - message = strings_1.Strings.runtime.clckToRestartAutomaticRefresh(); - } - var cardPayload = { - type: "AdaptiveCard", - version: "1.2", - body: [ - { - type: "RichTextBlock", - horizontalAlignment: "right", - inlines: [ - { - type: "TextRun", - text: message, - selectAction: { - type: "Action.Submit", - id: "refreshCard" - } - } - ] - } - ] - }; - var card = new card_elements_1.AdaptiveCard(); - card.parse(cardPayload, new card_elements_1.SerializationContext(serialization_1.Versions.v1_2)); - card.onExecuteAction = function(action) { - if (action.id === "refreshCard") { - Utils.clearElementChildren(_this._refreshButtonHostElement); - _this.internalExecuteAction(refreshAction, activity_request_1.ActivityRequestTrigger.Automatic, 0); - } - }; - renderedRefreshButton = card.render(); - } - if (renderedRefreshButton) { - Utils.clearElementChildren(this._refreshButtonHostElement); - this._refreshButtonHostElement.appendChild(renderedRefreshButton); - this._refreshButtonHostElement.style.removeProperty("display"); - } - } - }; - AdaptiveApplet2.prototype.createActivityRequest = function(action, trigger, consecutiveRefreshes) { - var _this = this; - if (this.card) { - var request_1 = new ActivityRequest(action, trigger, consecutiveRefreshes); - request_1.onSend = function(sender) { - sender.attemptNumber++; - void _this.internalSendActivityRequestAsync(request_1); - }; - var cancel = this.onPrepareActivityRequest ? !this.onPrepareActivityRequest(this, request_1, action) : false; - return cancel ? void 0 : request_1; - } else { - throw new Error("createActivityRequest: no card has been set."); - } - }; - AdaptiveApplet2.prototype.createMagicCodeInputCard = function(attemptNumber) { - var payload = { - type: "AdaptiveCard", - version: "1.0", - body: [ - { - type: "TextBlock", - color: "attention", - text: attemptNumber === 1 ? void 0 : "That didn't work... let's try again.", - wrap: true, - horizontalAlignment: "center" - }, - { - type: "TextBlock", - text: 'Please login in the popup. You will obtain a magic code. Paste that code below and select "Submit"', - wrap: true, - horizontalAlignment: "center" - }, - { - type: "Input.Text", - id: "magicCode", - placeholder: "Enter magic code" - }, - { - type: "ActionSet", - horizontalAlignment: "center", - actions: [ - { - type: "Action.Submit", - id: AdaptiveApplet2._submitMagicCodeActionId, - title: "Submit" - }, - { - type: "Action.Submit", - id: AdaptiveApplet2._cancelMagicCodeAuthActionId, - title: "Cancel" - } - ] - } - ] - }; - var card = new card_elements_1.AdaptiveCard(); - card.parse(payload); - return card; - }; - AdaptiveApplet2.prototype.cancelAutomaticRefresh = function() { - if (this._allowAutomaticCardUpdate) { - logEvent(Enums.LogLevel.Warning, "Automatic card refresh has been cancelled as a result of the user interacting with the card."); - } - this._allowAutomaticCardUpdate = false; - }; - AdaptiveApplet2.prototype.createSerializationContext = function() { - return this.onCreateSerializationContext ? this.onCreateSerializationContext(this) : new card_elements_1.SerializationContext(); - }; - AdaptiveApplet2.prototype.internalSetCard = function(payload, consecutiveRefreshes) { - var _this = this; - if (typeof payload === "object" && payload["type"] === "AdaptiveCard") { - this._cardPayload = payload; - } - if (this._cardPayload) { - try { - var card = new card_elements_1.AdaptiveCard(); - if (this.hostConfig) { - card.hostConfig = this.hostConfig; - } - var serializationContext = this.createSerializationContext(); - card.parse(this._cardPayload, serializationContext); - var doChangeCard = this.onCardChanging ? this.onCardChanging(this, this._cardPayload) : true; - if (doChangeCard) { - this._card = card; - if (this._card.authentication && this._card.authentication.tokenExchangeResource && this.onPrefetchSSOToken) { - this.onPrefetchSSOToken(this, this._card.authentication.tokenExchangeResource); - } - this._card.onExecuteAction = function(action) { - _this.cancelAutomaticRefresh(); - _this.internalExecuteAction(action, activity_request_1.ActivityRequestTrigger.Manual, 0); - }; - this._card.onInputValueChanged = function(_input) { - _this.cancelAutomaticRefresh(); - }; - this._card.render(); - if (this._card.renderedElement) { - this.displayCard(this._card); - if (this.onCardChanged) { - this.onCardChanged(this); - } - if (this._card.refresh) { - if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic && consecutiveRefreshes < shared_1.GlobalSettings.applets.refresh.maximumConsecutiveAutomaticRefreshes) { - if (shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes <= 0) { - logEvent(Enums.LogLevel.Info, "Triggering automatic card refresh number " + (consecutiveRefreshes + 1)); - this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveRefreshes + 1); - } else { - logEvent(Enums.LogLevel.Info, "Scheduling automatic card refresh number " + (consecutiveRefreshes + 1) + " in " + shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes + "ms"); - var action_1 = this._card.refresh.action; - this._allowAutomaticCardUpdate = true; - window.setTimeout(function() { - if (_this._allowAutomaticCardUpdate) { - _this.internalExecuteAction(action_1, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveRefreshes + 1); - } - }, shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes); - } - } else if (shared_1.GlobalSettings.applets.refresh.mode !== Enums.RefreshMode.Disabled) { - if (consecutiveRefreshes > 0) { - logEvent(Enums.LogLevel.Warning, "Stopping automatic refreshes after " + consecutiveRefreshes + " consecutive refreshes."); - } else { - logEvent(Enums.LogLevel.Warning, "The card has a refresh section, but automatic refreshes are disabled."); - } - if (shared_1.GlobalSettings.applets.refresh.allowManualRefreshesAfterAutomaticRefreshes || shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Manual) { - logEvent(Enums.LogLevel.Info, "Showing manual refresh button."); - this.showManualRefreshButton(this._card.refresh.action); - } - } - } - } - } - } catch (error) { - logEvent(Enums.LogLevel.Error, "setCard: " + error); - } - } - }; - AdaptiveApplet2.prototype.internalExecuteAction = function(action, trigger, consecutiveRefreshes) { - if (action instanceof card_elements_1.ExecuteAction) { - if (this.channelAdapter) { - var request = this.createActivityRequest(action, trigger, consecutiveRefreshes); - if (request) { - void request.retryAsync(); - } - } else { - throw new Error("internalExecuteAction: No channel adapter set."); - } - } - if (this.onAction) { - this.onAction(this, action); - } - }; - AdaptiveApplet2.prototype.createProgressOverlay = function(request) { - if (!this._progressOverlay) { - if (this.onCreateProgressOverlay) { - this._progressOverlay = this.onCreateProgressOverlay(this, request); - } else { - this._progressOverlay = document.createElement("div"); - this._progressOverlay.className = "aaf-progress-overlay"; - var spinner = document.createElement("div"); - spinner.className = "aaf-spinner"; - spinner.style.width = "28px"; - spinner.style.height = "28px"; - this._progressOverlay.appendChild(spinner); - } - } - return this._progressOverlay; - }; - AdaptiveApplet2.prototype.removeProgressOverlay = function(request) { - if (this.onRemoveProgressOverlay) { - this.onRemoveProgressOverlay(this, request); - } - if (this._progressOverlay !== void 0) { - this.renderedElement.removeChild(this._progressOverlay); - this._progressOverlay = void 0; - } - }; - AdaptiveApplet2.prototype.activityRequestSucceeded = function(response, parsedContent) { - if (this.onActivityRequestSucceeded) { - this.onActivityRequestSucceeded(this, response, parsedContent); - } - }; - AdaptiveApplet2.prototype.activityRequestFailed = function(response) { - return this.onActivityRequestFailed ? this.onActivityRequestFailed(this, response) : shared_1.GlobalSettings.applets.defaultTimeBetweenRetryAttempts; - }; - AdaptiveApplet2.prototype.showAuthCodeInputDialog = function(request) { - var _this = this; - var showBuiltInAuthCodeInputCard = this.onShowAuthCodeInputDialog ? this.onShowAuthCodeInputDialog(this, request) : true; - if (showBuiltInAuthCodeInputCard) { - var authCodeInputCard = this.createMagicCodeInputCard(request.attemptNumber); - authCodeInputCard.render(); - authCodeInputCard.onExecuteAction = function(submitMagicCodeAction) { - if (_this.card && submitMagicCodeAction instanceof card_elements_1.SubmitAction) { - switch (submitMagicCodeAction.id) { - case AdaptiveApplet2._submitMagicCodeActionId: - var authCode = void 0; - if (submitMagicCodeAction.data && typeof submitMagicCodeAction.data["magicCode"] === "string") { - authCode = submitMagicCodeAction.data["magicCode"]; - } - if (authCode) { - _this.displayCard(_this.card); - request.authCode = authCode; - void request.retryAsync(); - } else { - alert("Please enter the magic code you received."); - } - break; - case AdaptiveApplet2._cancelMagicCodeAuthActionId: - logEvent(Enums.LogLevel.Warning, "Authentication cancelled by user."); - _this.displayCard(_this.card); - break; - default: - logEvent(Enums.LogLevel.Error, "Unexpected action taken from magic code input card (id = " + submitMagicCodeAction.id + ")"); - alert(strings_1.Strings.magicCodeInputCard.somethingWentWrong()); - break; - } - } - }; - this.displayCard(authCodeInputCard); - } - }; - AdaptiveApplet2.prototype.internalSendActivityRequestAsync = function(request) { - return __awaiter(this, void 0, void 0, function() { - var overlay, done, _loop_1, this_1, state_1; - return __generator(this, function(_a) { - switch (_a.label) { - case 0: - if (!this.channelAdapter) { - throw new Error("internalSendActivityRequestAsync: channelAdapter is not set."); - } - overlay = this.createProgressOverlay(request); - if (overlay !== void 0) { - this.renderedElement.appendChild(overlay); - } - done = false; - _loop_1 = function() { - var response, error_1, parsedContent, retryIn_1, attemptOAuth, left, top_1; - return __generator(this, function(_b) { - switch (_b.label) { - case 0: - response = void 0; - if (request.attemptNumber === 1) { - logEvent(Enums.LogLevel.Info, "Sending activity request to channel (attempt " + request.attemptNumber + ")"); - } else { - logEvent(Enums.LogLevel.Info, "Re-sending activity request to channel (attempt " + request.attemptNumber + ")"); - } - _b.label = 1; - case 1: - _b.trys.push([1, 3, , 4]); - return [4, this_1.channelAdapter.sendRequestAsync(request)]; - case 2: - response = _b.sent(); - return [3, 4]; - case 3: - error_1 = _b.sent(); - logEvent(Enums.LogLevel.Error, "Activity request failed: " + error_1); - this_1.removeProgressOverlay(request); - done = true; - return [3, 4]; - case 4: - if (!response) - return [3, 10]; - if (!(response instanceof activity_request_1.SuccessResponse)) - return [3, 5]; - this_1.removeProgressOverlay(request); - if (response.rawContent === void 0) { - throw new Error("internalSendActivityRequestAsync: Action.Execute result is undefined"); - } - parsedContent = response.rawContent; - try { - parsedContent = JSON.parse(response.rawContent); - } catch (_c) { - } - if (typeof parsedContent === "string") { - logEvent(Enums.LogLevel.Info, "The activity request returned a string after " + request.attemptNumber + " attempt(s)."); - this_1.activityRequestSucceeded(response, parsedContent); - } else if (typeof parsedContent === "object" && parsedContent["type"] === "AdaptiveCard") { - logEvent(Enums.LogLevel.Info, "The activity request returned an Adaptive Card after " + request.attemptNumber + " attempt(s)."); - this_1.internalSetCard(parsedContent, request.consecutiveRefreshes); - this_1.activityRequestSucceeded(response, this_1.card); - } else { - throw new Error("internalSendActivityRequestAsync: Action.Execute result is of unsupported type (" + typeof response.rawContent + ")"); - } - done = true; - return [3, 10]; - case 5: - if (!(response instanceof activity_request_1.ErrorResponse)) - return [3, 9]; - retryIn_1 = this_1.activityRequestFailed(response); - if (!(retryIn_1 >= 0 && request.attemptNumber < shared_1.GlobalSettings.applets.maximumRetryAttempts)) - return [3, 7]; - logEvent(Enums.LogLevel.Warning, "Activity request failed: ".concat(response.error.message, ". Retrying in ").concat(retryIn_1, "ms")); - request.attemptNumber++; - return [4, new Promise(function(resolve, _reject) { - window.setTimeout(function() { - resolve(); - }, retryIn_1); - })]; - case 6: - _b.sent(); - return [3, 8]; - case 7: - logEvent(Enums.LogLevel.Error, "Activity request failed: ".concat(response.error.message, ". Giving up after ").concat(request.attemptNumber, " attempt(s)")); - this_1.removeProgressOverlay(request); - done = true; - _b.label = 8; - case 8: - return [3, 10]; - case 9: - if (response instanceof activity_request_1.LoginRequestResponse) { - logEvent(Enums.LogLevel.Info, "The activity request returned a LoginRequestResponse after " + request.attemptNumber + " attempt(s)."); - if (request.attemptNumber <= shared_1.GlobalSettings.applets.maximumRetryAttempts) { - attemptOAuth = true; - if (response.tokenExchangeResource && this_1.onSSOTokenNeeded) { - attemptOAuth = !this_1.onSSOTokenNeeded(this_1, request, response.tokenExchangeResource); - } - if (attemptOAuth) { - this_1.removeProgressOverlay(request); - if (response.signinButton === void 0) { - throw new Error("internalSendActivityRequestAsync: the login request doesn't contain a valid signin URL."); - } - logEvent(Enums.LogLevel.Info, "Login required at " + response.signinButton.value); - if (this_1.onShowSigninPrompt) { - this_1.onShowSigninPrompt(this_1, request, response.signinButton); - } else { - this_1.showAuthCodeInputDialog(request); - left = window.screenX + (window.outerWidth - shared_1.GlobalSettings.applets.authPromptWidth) / 2; - top_1 = window.screenY + (window.outerHeight - shared_1.GlobalSettings.applets.authPromptHeight) / 2; - window.open(response.signinButton.value, response.signinButton.title ? response.signinButton.title : "Sign in", "width=".concat(shared_1.GlobalSettings.applets.authPromptWidth, ",height=").concat(shared_1.GlobalSettings.applets.authPromptHeight, ",left=").concat(left, ",top=").concat(top_1)); - } - } - } else { - logEvent(Enums.LogLevel.Error, "Authentication failed. Giving up after " + request.attemptNumber + " attempt(s)"); - alert(strings_1.Strings.magicCodeInputCard.authenticationFailed()); - } - return [2, "break"]; - } else { - throw new Error("Unhandled response type: " + JSON.stringify(response)); - } - _b.label = 10; - case 10: - return [ - 2 - /*return*/ - ]; - } - }); - }; - this_1 = this; - _a.label = 1; - case 1: - if (!!done) - return [3, 3]; - return [5, _loop_1()]; - case 2: - state_1 = _a.sent(); - if (state_1 === "break") - return [3, 3]; - return [3, 1]; - case 3: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - AdaptiveApplet2.prototype.refreshCard = function() { - if (this._card && this._card.refresh) { - this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Manual, 0); - } - }; - AdaptiveApplet2.prototype.setCard = function(payload) { - this.internalSetCard(payload, 0); - }; - Object.defineProperty(AdaptiveApplet2.prototype, "card", { - get: function() { - return this._card; - }, - enumerable: false, - configurable: true - }); - AdaptiveApplet2._submitMagicCodeActionId = "submitMagicCode"; - AdaptiveApplet2._cancelMagicCodeAuthActionId = "cancelMagicCodeAuth"; - return AdaptiveApplet2; - }() - ); - exports.AdaptiveApplet = AdaptiveApplet; - } -}); - -// node_modules/adaptivecards/lib/adaptivecards.js -var require_adaptivecards = __commonJS({ - "node_modules/adaptivecards/lib/adaptivecards.js"(exports) { - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - o[k2] = m[k]; - }); - var __exportStar = exports && exports.__exportStar || function(m, exports2) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) - __createBinding(exports2, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - __exportStar(require_strings(), exports); - __exportStar(require_enums(), exports); - __exportStar(require_shared(), exports); - __exportStar(require_utils(), exports); - __exportStar(require_serialization(), exports); - __exportStar(require_host_capabilities(), exports); - __exportStar(require_host_config(), exports); - __exportStar(require_registry(), exports); - __exportStar(require_card_object(), exports); - __exportStar(require_card_elements(), exports); - __exportStar(require_table(), exports); - __exportStar(require_channel_adapter(), exports); - __exportStar(require_activity_request(), exports); - __exportStar(require_adaptive_applet(), exports); - } -}); -export default require_adaptivecards(); -/*! Bundled license information: - -adaptivecards/lib/shared.js: - (** - * Fast UUID generator, RFC4122 version 4 compliant. - * @author Jeff Ward (jcward.com). - * @license MIT license - * @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136 - **) -*/ -//# sourceMappingURL=adaptivecards.js.map diff --git a/docs/.vitepress/cache/deps/adaptivecards.js.map b/docs/.vitepress/cache/deps/adaptivecards.js.map deleted file mode 100644 index 4b0a288..0000000 --- a/docs/.vitepress/cache/deps/adaptivecards.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../node_modules/adaptivecards/src/strings.ts", "../../../../node_modules/adaptivecards/src/enums.ts", "../../../../node_modules/adaptivecards/src/shared.ts", "../../../../node_modules/adaptivecards/src/utils.ts", "../../../../node_modules/adaptivecards/src/serialization.ts", "../../../../node_modules/adaptivecards/src/host-capabilities.ts", "../../../../node_modules/adaptivecards/src/host-config.ts", "../../../../node_modules/adaptivecards/src/registry.ts", "../../../../node_modules/adaptivecards/src/card-object.ts", "../../../../node_modules/adaptivecards/src/text-formatters.ts", "../../../../node_modules/adaptivecards/src/controls/constants.ts", "../../../../node_modules/adaptivecards/src/controls/menu-item.ts", "../../../../node_modules/adaptivecards/src/controls/collection.ts", "../../../../node_modules/adaptivecards/src/controls/popup-control.ts", "../../../../node_modules/adaptivecards/src/controls/popup-menu.ts", "../../../../node_modules/adaptivecards/src/controls/index.ts", "../../../../node_modules/adaptivecards/src/card-elements.ts", "../../../../node_modules/adaptivecards/src/table.ts", "../../../../node_modules/adaptivecards/src/channel-adapter.ts", "../../../../node_modules/adaptivecards/src/activity-request.ts", "../../../../node_modules/adaptivecards/src/adaptive-applet.ts", "../../../../node_modules/adaptivecards/src/adaptivecards.ts"], - "sourcesContent": ["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class Strings {\r\n static readonly errors = {\r\n unknownElementType: (typeName: string) =>\r\n `Unknown element type \"${typeName}\". Fallback will be used if present.`,\r\n unknownActionType: (typeName: string) =>\r\n `Unknown action type \"${typeName}\". Fallback will be used if present.`,\r\n elementTypeNotAllowed: (typeName: string) =>\r\n `Element type \"${typeName}\" is not allowed in this context.`,\r\n actionTypeNotAllowed: (typeName: string) =>\r\n `Action type \"${typeName}\" is not allowed in this context.`,\r\n invalidPropertyValue: (value: any, propertyName: string) =>\r\n `Invalid value \"${value}\" for property \"${propertyName}\".`,\r\n showCardMustHaveCard: () =>\r\n `\"An Action.ShowCard must have its \"card\" property set to a valid AdaptiveCard object.`,\r\n invalidColumnWidth: (invalidWidth: string) =>\r\n `Invalid column width \"${invalidWidth}\" - defaulting to \"auto\".`,\r\n invalidCardVersion: (defaultingToVersion: string) =>\r\n `Invalid card version. Defaulting to \"${defaultingToVersion}\".`,\r\n invalidVersionString: (versionString: string) =>\r\n `Invalid version string \"${versionString}\".`,\r\n propertyValueNotSupported: (\r\n value: any,\r\n propertyName: string,\r\n supportedInVersion: string,\r\n versionUsed: string\r\n ) =>\r\n `Value \"${value}\" for property \"${propertyName}\" is supported in version ${supportedInVersion}, but you are using version ${versionUsed}.`,\r\n propertyNotSupported: (\r\n propertyName: string,\r\n supportedInVersion: string,\r\n versionUsed: string\r\n ) =>\r\n `Property \"${propertyName}\" is supported in version ${supportedInVersion}, but you are using version ${versionUsed}.`,\r\n indexOutOfRange: (index: number) => `Index out of range (${index}).`,\r\n elementCannotBeUsedAsInline: () =>\r\n \"RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline.\",\r\n inlineAlreadyParented: () =>\r\n \"RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock.\",\r\n interactivityNotAllowed: () => \"Interactivity is not allowed.\",\r\n inputsMustHaveUniqueId: () => \"All inputs must have a unique Id.\",\r\n choiceSetMustHaveAtLeastOneChoice: () =>\r\n \"An Input.ChoiceSet must have at least one choice defined.\",\r\n choiceSetChoicesMustHaveTitleAndValue: () =>\r\n \"All choices in an Input.ChoiceSet must have their title and value properties set.\",\r\n propertyMustBeSet: (propertyName: string) => `Property \"${propertyName}\" must be set.`,\r\n actionHttpHeadersMustHaveNameAndValue: () =>\r\n \"All headers of an Action.Http must have their name and value properties set.\",\r\n tooManyActions: (maximumActions: number) =>\r\n `Maximum number of actions exceeded (${maximumActions}).`,\r\n tooLittleTimeDelay: (minAutoplayDelay: number) =>\r\n `Autoplay Delay is too short (${minAutoplayDelay}).`,\r\n columnAlreadyBelongsToAnotherSet: () => \"This column already belongs to another ColumnSet.\",\r\n invalidCardType: () =>\r\n `Invalid or missing card type. Make sure the card's type property is set to \"AdaptiveCard\".`,\r\n unsupportedCardVersion: (version: string, maxSupportedVersion: string) =>\r\n `The specified card version (${version}) is not supported or still in preview. The latest released card version is ${maxSupportedVersion}.`,\r\n duplicateId: (id: string) => `Duplicate Id \"${id}\".`,\r\n markdownProcessingNotEnabled: () =>\r\n \"Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown\",\r\n processMarkdownEventRemoved: () =>\r\n \"The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.\",\r\n elementAlreadyParented: () => \"The element already belongs to another container.\",\r\n actionAlreadyParented: () => \"The action already belongs to another element.\",\r\n elementTypeNotStandalone: (typeName: string) =>\r\n `Elements of type ${typeName} cannot be used as standalone elements.`\r\n };\r\n static readonly magicCodeInputCard = {\r\n tryAgain: () => \"That didn't work... let's try again.\",\r\n pleaseLogin: () =>\r\n 'Please login in the popup. You will obtain a magic code. Paste that code below and select \"Submit\"',\r\n enterMagicCode: () => \"Enter magic code\",\r\n pleaseEnterMagicCodeYouReceived: () => \"Please enter the magic code you received.\",\r\n submit: () => \"Submit\",\r\n cancel: () => \"Cancel\",\r\n somethingWentWrong: () => \"Something went wrong. This action can't be handled.\",\r\n authenticationFailed: () => \"Authentication failed.\"\r\n };\r\n static readonly runtime = {\r\n automaticRefreshPaused: () => \"Automatic refresh paused.\",\r\n clckToRestartAutomaticRefresh: () => \"Click to restart.\",\r\n refreshThisCard: () => \"Refresh this card\"\r\n };\r\n static readonly hints = {\r\n dontUseWeightedAndStrecthedColumnsInSameSet: () =>\r\n \"It is not recommended to use weighted and stretched columns in the same ColumnSet, because in such a situation stretched columns will always get the minimum amount of space.\"\r\n };\r\n static readonly defaults = {\r\n inlineActionTitle: () => \"Inline Action\",\r\n overflowButtonText: () => \"...\",\r\n mediaPlayerAriaLabel: () => \"Media content\",\r\n mediaPlayerPlayMedia: () => \"Play media\",\r\n youTubeVideoPlayer: () => \"YouTube video player\",\r\n vimeoVideoPlayer: () => \"Vimeo video player\",\r\n dailymotionVideoPlayer: () => \"Dailymotion video player\"\r\n };\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\n/*\r\n This should really be a string enum, e.g.\r\n\r\n export enum ContainerStyle {\r\n Default = \"default\",\r\n Emphasis = \"emphasis\"\r\n }\r\n\r\n However, some hosts do not use a version of TypeScript\r\n recent enough to understand string enums. This is\r\n a compatible construct that does not require using\r\n a more recent version of TypeScript.\r\n\r\n Also note the \"weird\" way these readonly fields are declared is to work around\r\n a breaking change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n and adopt this syntax for all other static readonly fields.\r\n*/\r\n/* eslint-disable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention */\r\nexport class ContainerStyle {\r\n static readonly Default: \"default\" = \"default\";\r\n static readonly Emphasis: \"emphasis\" = \"emphasis\";\r\n static readonly Accent: \"accent\" = \"accent\";\r\n static readonly Good: \"good\" = \"good\";\r\n static readonly Attention: \"attention\" = \"attention\";\r\n static readonly Warning: \"warning\" = \"warning\";\r\n}\r\n\r\nexport class ActionStyle {\r\n static readonly Default: \"default\" = \"default\";\r\n static readonly Positive: \"positive\" = \"positive\";\r\n static readonly Destructive: \"destructive\" = \"destructive\";\r\n}\r\n\r\nexport class ActionMode {\r\n static readonly Primary: \"primary\" = \"primary\";\r\n static readonly Secondary: \"secondary\" = \"secondary\";\r\n}\r\n/* eslint-enable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention */\r\n\r\nexport enum Size {\r\n Auto,\r\n Stretch,\r\n Small,\r\n Medium,\r\n Large\r\n}\r\n\r\nexport enum ImageSize {\r\n Small,\r\n Medium,\r\n Large\r\n}\r\n\r\nexport enum SizeUnit {\r\n Weight,\r\n Pixel\r\n}\r\n\r\nexport enum TextSize {\r\n Small,\r\n Default,\r\n Medium,\r\n Large,\r\n ExtraLarge\r\n}\r\n\r\nexport enum TextWeight {\r\n Lighter,\r\n Default,\r\n Bolder\r\n}\r\n\r\nexport enum FontType {\r\n Default,\r\n Monospace\r\n}\r\n\r\nexport enum Spacing {\r\n None,\r\n Small,\r\n Default,\r\n Medium,\r\n Large,\r\n ExtraLarge,\r\n Padding\r\n}\r\n\r\nexport enum TextColor {\r\n Default,\r\n Dark,\r\n Light,\r\n Accent,\r\n Good,\r\n Warning,\r\n Attention\r\n}\r\n\r\nexport enum HorizontalAlignment {\r\n Left,\r\n Center,\r\n Right\r\n}\r\n\r\nexport enum VerticalAlignment {\r\n Top,\r\n Center,\r\n Bottom\r\n}\r\n\r\nexport enum ActionAlignment {\r\n Left,\r\n Center,\r\n Right,\r\n Stretch\r\n}\r\n\r\nexport enum ImageStyle {\r\n Default,\r\n Person\r\n}\r\n\r\nexport enum ShowCardActionMode {\r\n Inline,\r\n Popup\r\n}\r\n\r\nexport enum Orientation {\r\n Horizontal,\r\n Vertical\r\n}\r\n\r\nexport enum FillMode {\r\n Cover,\r\n RepeatHorizontally,\r\n RepeatVertically,\r\n Repeat\r\n}\r\n\r\nexport enum ActionIconPlacement {\r\n LeftOfTitle,\r\n AboveTitle\r\n}\r\n\r\nexport enum InputTextStyle {\r\n Text,\r\n Tel,\r\n Url,\r\n Email,\r\n Password\r\n}\r\n\r\nexport enum ValidationPhase {\r\n Parse,\r\n ToJSON,\r\n Validation\r\n}\r\n\r\nexport enum ValidationEvent {\r\n Hint,\r\n ActionTypeNotAllowed,\r\n CollectionCantBeEmpty,\r\n Deprecated,\r\n ElementTypeNotAllowed,\r\n InteractivityNotAllowed,\r\n InvalidPropertyValue,\r\n MissingCardType,\r\n PropertyCantBeNull,\r\n TooManyActions,\r\n UnknownActionType,\r\n UnknownElementType,\r\n UnsupportedCardVersion,\r\n DuplicateId,\r\n UnsupportedProperty,\r\n RequiredInputsShouldHaveLabel,\r\n RequiredInputsShouldHaveErrorMessage,\r\n Other\r\n}\r\n\r\nexport enum ContainerFitStatus {\r\n FullyInContainer,\r\n Overflowing,\r\n FullyOutOfContainer\r\n}\r\n\r\nexport enum TypeErrorType {\r\n UnknownType,\r\n ForbiddenType\r\n}\r\n\r\nexport enum RefreshMode {\r\n Disabled,\r\n Manual,\r\n Automatic\r\n}\r\n\r\nexport enum LogLevel {\r\n Info,\r\n Warning,\r\n Error\r\n}", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\n\r\nexport type Refresh = {\r\n mode: Enums.RefreshMode;\r\n timeBetweenAutomaticRefreshes: number;\r\n maximumConsecutiveAutomaticRefreshes: number;\r\n allowManualRefreshesAfterAutomaticRefreshes: boolean;\r\n};\r\n\r\nexport type AppletsSettings = {\r\n logEnabled: boolean;\r\n logLevel: Enums.LogLevel;\r\n maximumRetryAttempts: number;\r\n defaultTimeBetweenRetryAttempts: number;\r\n authPromptWidth: number;\r\n authPromptHeight: number;\r\n readonly refresh: Refresh;\r\n onLogEvent?: (level: Enums.LogLevel, message?: any, ...optionalParams: any[]) => void;\r\n};\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class GlobalSettings {\r\n static useAdvancedTextBlockTruncation: boolean = true;\r\n static useAdvancedCardBottomTruncation: boolean = false;\r\n static useMarkdownInRadioButtonAndCheckbox: boolean = true;\r\n static allowMarkForTextHighlighting: boolean = false;\r\n static alwaysBleedSeparators: boolean = false;\r\n static enableFullJsonRoundTrip: boolean = false;\r\n static displayInputValidationErrors: boolean = true;\r\n static allowPreProcessingPropertyValues: boolean = false;\r\n static setTabIndexAtCardRoot: boolean = true;\r\n static enableFallback: boolean = true;\r\n static useWebkitLineClamp: boolean = true;\r\n static allowMoreThanMaxActionsInOverflowMenu: boolean = false;\r\n static removePaddingFromContainersWithBackgroundImage: boolean = false;\r\n static resetInputsDirtyStateAfterActionExecution: boolean = true;\r\n\r\n static readonly applets: AppletsSettings = {\r\n logEnabled: true,\r\n logLevel: Enums.LogLevel.Error,\r\n maximumRetryAttempts: 3,\r\n defaultTimeBetweenRetryAttempts: 3000, // 3 seconds\r\n authPromptWidth: 400,\r\n authPromptHeight: 600,\r\n refresh: {\r\n mode: Enums.RefreshMode.Manual,\r\n timeBetweenAutomaticRefreshes: 3000, // 3 seconds\r\n maximumConsecutiveAutomaticRefreshes: 3,\r\n allowManualRefreshesAfterAutomaticRefreshes: true\r\n }\r\n };\r\n}\r\n\r\nexport const ContentTypes = {\r\n applicationJson: \"application/json\",\r\n applicationXWwwFormUrlencoded: \"application/x-www-form-urlencoded\"\r\n};\r\n\r\nexport interface ISeparationDefinition {\r\n spacing: number;\r\n lineThickness?: number;\r\n lineColor?: string;\r\n}\r\n\r\nexport interface IInput {\r\n id?: string;\r\n value?: string;\r\n validateValue(): boolean;\r\n}\r\n\r\nexport type Dictionary = { [key: string]: T };\r\n\r\nexport class StringWithSubstitutions {\r\n private _isProcessed: boolean = false;\r\n private _original?: string;\r\n private _processed?: string;\r\n\r\n getReferencedInputs(inputs: IInput[], referencedInputs: Dictionary) {\r\n if (!referencedInputs) {\r\n throw new Error(\"The referencedInputs parameter cannot be null.\");\r\n }\r\n\r\n if (this._original) {\r\n for (const input of inputs) {\r\n const matches = new RegExp(\"\\\\{{2}(\" + input.id + \").value\\\\}{2}\", \"gi\").exec(\r\n this._original\r\n );\r\n\r\n if (matches != null && input.id) {\r\n referencedInputs[input.id] = input;\r\n }\r\n }\r\n }\r\n }\r\n\r\n substituteInputValues(inputs: Dictionary, contentType: string) {\r\n this._processed = this._original;\r\n\r\n if (this._original) {\r\n const regEx = /\\{{2}([a-z0-9_$@]+).value\\}{2}/gi;\r\n let matches;\r\n\r\n while ((matches = regEx.exec(this._original)) !== null && this._processed) {\r\n for (const key of Object.keys(inputs)) {\r\n if (key.toLowerCase() === matches[1].toLowerCase()) {\r\n const matchedInput = inputs[key];\r\n\r\n let valueForReplace = \"\";\r\n\r\n if (matchedInput.value) {\r\n valueForReplace = matchedInput.value;\r\n }\r\n\r\n if (contentType === ContentTypes.applicationJson) {\r\n valueForReplace = JSON.stringify(valueForReplace);\r\n valueForReplace = valueForReplace.slice(1, -1);\r\n } else if (contentType === ContentTypes.applicationXWwwFormUrlencoded) {\r\n valueForReplace = encodeURIComponent(valueForReplace);\r\n }\r\n\r\n this._processed = this._processed.replace(matches[0], valueForReplace);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n this._isProcessed = true;\r\n }\r\n\r\n getOriginal(): string | undefined {\r\n return this._original;\r\n }\r\n\r\n get(): string | undefined {\r\n if (!this._isProcessed) {\r\n return this._original;\r\n } else {\r\n return this._processed;\r\n }\r\n }\r\n\r\n set(value: string | undefined) {\r\n this._original = value;\r\n this._isProcessed = false;\r\n }\r\n}\r\n\r\nexport class SpacingDefinition {\r\n left: number = 0;\r\n top: number = 0;\r\n right: number = 0;\r\n bottom: number = 0;\r\n\r\n constructor(top: number = 0, right: number = 0, bottom: number = 0, left: number = 0) {\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n this.left = left;\r\n }\r\n}\r\n\r\nexport class PaddingDefinition {\r\n top: Enums.Spacing = Enums.Spacing.None;\r\n right: Enums.Spacing = Enums.Spacing.None;\r\n bottom: Enums.Spacing = Enums.Spacing.None;\r\n left: Enums.Spacing = Enums.Spacing.None;\r\n\r\n constructor(\r\n top: Enums.Spacing = Enums.Spacing.None,\r\n right: Enums.Spacing = Enums.Spacing.None,\r\n bottom: Enums.Spacing = Enums.Spacing.None,\r\n left: Enums.Spacing = Enums.Spacing.None\r\n ) {\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n this.left = left;\r\n }\r\n}\r\n\r\nexport class SizeAndUnit {\r\n physicalSize: number;\r\n unit: Enums.SizeUnit;\r\n\r\n static parse(input: string, requireUnitSpecifier: boolean = false): SizeAndUnit {\r\n const result = new SizeAndUnit(0, Enums.SizeUnit.Weight);\r\n\r\n if (typeof input === \"number\") {\r\n result.physicalSize = input;\r\n\r\n return result;\r\n } else if (typeof input === \"string\") {\r\n const regExp = /^([0-9]+)(px|\\*)?$/g;\r\n const matches = regExp.exec(input);\r\n const expectedMatchCount = requireUnitSpecifier ? 3 : 2;\r\n\r\n if (matches && matches.length >= expectedMatchCount) {\r\n result.physicalSize = parseInt(matches[1]);\r\n\r\n if (matches.length === 3) {\r\n if (matches[2] === \"px\") {\r\n result.unit = Enums.SizeUnit.Pixel;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n\r\n throw new Error(\"Invalid size: \" + input);\r\n }\r\n\r\n constructor(physicalSize: number, unit: Enums.SizeUnit) {\r\n this.physicalSize = physicalSize;\r\n this.unit = unit;\r\n }\r\n}\r\n\r\nexport interface IResourceInformation {\r\n url: string;\r\n mimeType: string;\r\n}\r\n\r\n/**\r\n * Fast UUID generator, RFC4122 version 4 compliant.\r\n * @author Jeff Ward (jcward.com).\r\n * @license MIT license\r\n * @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\r\n **/\r\n/* eslint-disable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention, no-bitwise */\r\nexport class UUID {\r\n private static lut: string[] = [];\r\n\r\n static generate(): string {\r\n const d0 = (Math.random() * 0xffffffff) | 0;\r\n const d1 = (Math.random() * 0xffffffff) | 0;\r\n const d2 = (Math.random() * 0xffffffff) | 0;\r\n const d3 = (Math.random() * 0xffffffff) | 0;\r\n\r\n return (\r\n UUID.lut[d0 & 0xff] +\r\n UUID.lut[(d0 >> 8) & 0xff] +\r\n UUID.lut[(d0 >> 16) & 0xff] +\r\n UUID.lut[(d0 >> 24) & 0xff] +\r\n \"-\" +\r\n UUID.lut[d1 & 0xff] +\r\n UUID.lut[(d1 >> 8) & 0xff] +\r\n \"-\" +\r\n UUID.lut[((d1 >> 16) & 0x0f) | 0x40] +\r\n UUID.lut[(d1 >> 24) & 0xff] +\r\n \"-\" +\r\n UUID.lut[(d2 & 0x3f) | 0x80] +\r\n UUID.lut[(d2 >> 8) & 0xff] +\r\n \"-\" +\r\n UUID.lut[(d2 >> 16) & 0xff] +\r\n UUID.lut[(d2 >> 24) & 0xff] +\r\n UUID.lut[d3 & 0xff] +\r\n UUID.lut[(d3 >> 8) & 0xff] +\r\n UUID.lut[(d3 >> 16) & 0xff] +\r\n UUID.lut[(d3 >> 24) & 0xff]\r\n );\r\n }\r\n\r\n static initialize() {\r\n for (let i = 0; i < 256; i++) {\r\n UUID.lut[i] = (i < 16 ? \"0\" : \"\") + i.toString(16);\r\n }\r\n }\r\n}\r\n\r\nUUID.initialize();\r\n/* eslint-enable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention, no-bitwise */\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport * as Shared from \"./shared\";\r\n\r\n// To work around TypeScript complaining about documentMode not being declared\r\n// on type Document\r\ndeclare global {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n interface Document {\r\n documentMode?: any;\r\n }\r\n}\r\n\r\nexport function isInternetExplorer(): boolean {\r\n // The documentMode property only exists in IE\r\n return window.document.documentMode !== undefined;\r\n}\r\n\r\nexport function isMobileOS(): boolean {\r\n const userAgent = window.navigator.userAgent;\r\n\r\n return (\r\n !!userAgent.match(/Android/i) || !!userAgent.match(/iPad/i) || !!userAgent.match(/iPhone/i)\r\n );\r\n}\r\n\r\n/**\r\n * Generate a UUID prepended with \"__ac-\"\r\n */\r\nexport function generateUniqueId(): string {\r\n return \"__ac-\" + Shared.UUID.generate();\r\n}\r\n\r\nexport function appendChild(node: Node, child: Node | undefined) {\r\n if (child) {\r\n node.appendChild(child);\r\n }\r\n}\r\n\r\nexport function parseString(obj: any, defaultValue?: string): string | undefined {\r\n return typeof obj === \"string\" ? obj : defaultValue;\r\n}\r\n\r\nexport function parseNumber(obj: any, defaultValue?: number): number | undefined {\r\n return typeof obj === \"number\" ? obj : defaultValue;\r\n}\r\n\r\nexport function parseBool(value: any, defaultValue?: boolean): boolean | undefined {\r\n if (typeof value === \"boolean\") {\r\n return value;\r\n } else if (typeof value === \"string\") {\r\n switch (value.toLowerCase()) {\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n default:\r\n return defaultValue;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n}\r\n\r\nexport function getEnumValueByName(\r\n enumType: { [s: number]: string },\r\n name: string\r\n): number | undefined {\r\n // eslint-disable-next-line guard-for-in\r\n for (const key in enumType) {\r\n const keyAsNumber = parseInt(key, 10);\r\n\r\n if (keyAsNumber >= 0) {\r\n const value = enumType[key];\r\n\r\n if (value && typeof value === \"string\" && value.toLowerCase() === name.toLowerCase()) {\r\n return keyAsNumber;\r\n }\r\n }\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nexport function parseEnum(\r\n enumType: { [s: number]: string },\r\n name: string,\r\n defaultValue?: number\r\n): number | undefined {\r\n if (!name) {\r\n return defaultValue;\r\n }\r\n\r\n const enumValue = getEnumValueByName(enumType, name);\r\n\r\n return enumValue !== undefined ? enumValue : defaultValue;\r\n}\r\n\r\nexport function stringToCssColor(color: string | undefined): string | undefined {\r\n if (color) {\r\n const regEx = /#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi;\r\n const matches = regEx.exec(color);\r\n\r\n if (matches && matches[4]) {\r\n const a = parseInt(matches[1], 16) / 255;\r\n const r = parseInt(matches[2], 16);\r\n const g = parseInt(matches[3], 16);\r\n const b = parseInt(matches[4], 16);\r\n\r\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + a + \")\";\r\n }\r\n }\r\n\r\n return color;\r\n}\r\n\r\nfunction truncateWorker(\r\n element: HTMLElement,\r\n maxHeight: number,\r\n fullText: string,\r\n truncateAt: (text: string, idx: number) => void,\r\n lineHeight?: number\r\n) {\r\n const fits = () => {\r\n // Allow a one pixel overflow to account for rounding differences\r\n // between browsers\r\n return maxHeight - element.scrollHeight >= -1.0;\r\n };\r\n\r\n if (fits()) {\r\n return;\r\n }\r\n\r\n const breakableIndices = findBreakableIndices(fullText);\r\n let lo = 0;\r\n let hi = breakableIndices.length;\r\n let bestBreakIdx = 0;\r\n\r\n // Do a binary search for the longest string that fits\r\n while (lo < hi) {\r\n const mid = Math.floor((lo + hi) / 2);\r\n truncateAt(fullText, breakableIndices[mid]);\r\n\r\n if (fits()) {\r\n bestBreakIdx = breakableIndices[mid];\r\n lo = mid + 1;\r\n } else {\r\n hi = mid;\r\n }\r\n }\r\n\r\n truncateAt(fullText, bestBreakIdx);\r\n\r\n // If we have extra room, try to expand the string letter by letter\r\n // (covers the case where we have to break in the middle of a long word)\r\n if (lineHeight && maxHeight - element.scrollHeight >= lineHeight - 1.0) {\r\n let idx = findNextCharacter(fullText, bestBreakIdx);\r\n\r\n while (idx < fullText.length) {\r\n truncateAt(fullText, idx);\r\n\r\n if (fits()) {\r\n bestBreakIdx = idx;\r\n idx = findNextCharacter(fullText, idx);\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n truncateAt(fullText, bestBreakIdx);\r\n }\r\n}\r\n\r\nexport function truncateText(element: HTMLElement, maxHeight: number, lineHeight?: number) {\r\n truncateWorker(\r\n element,\r\n maxHeight,\r\n element.innerText,\r\n (text: string, idx: number) => {\r\n element.innerText = text.substring(0, idx) + \"...\";\r\n },\r\n lineHeight\r\n );\r\n}\r\n\r\n/**\r\n * {@link truncate} has been deprecated and is no longer in use internally. This policy passes\r\n * content through as it always has, which is _supposed_ to be dealing with text only (see {@link\r\n * TextBlock.truncateIfSupported}), but had a bug where it might actually pass through an element\r\n * for which innerHTML yielded actual HTML (since fixed).\r\n */\r\nconst ttDeprecatedPolicy = (typeof window === 'undefined') ? undefined : window.trustedTypes?.createPolicy(\"adaptivecards#deprecatedExportedFunctionPolicy\", {\r\n createHTML: (value) => value\r\n});\r\n\r\n/** @deprecated Use {@link truncateText} instead. */\r\nexport function truncate(element: HTMLElement, maxHeight: number, lineHeight?: number) {\r\n truncateWorker(\r\n element,\r\n maxHeight,\r\n element.innerHTML,\r\n (text: string, idx: number) => {\r\n const truncatedString = text.substring(0, idx) + \"...\";\r\n const truncatedHTML =\r\n ttDeprecatedPolicy?.createHTML(truncatedString) ?? truncatedString;\r\n element.innerHTML = truncatedHTML as string;\r\n },\r\n lineHeight\r\n );\r\n}\r\n\r\nfunction findBreakableIndices(html: string): number[] {\r\n const results: number[] = [];\r\n let idx = findNextCharacter(html, -1);\r\n\r\n while (idx < html.length) {\r\n if (html[idx] === \" \") {\r\n results.push(idx);\r\n }\r\n\r\n idx = findNextCharacter(html, idx);\r\n }\r\n\r\n return results;\r\n}\r\n\r\nfunction findNextCharacter(html: string, currIdx: number): number {\r\n currIdx += 1;\r\n\r\n // If we found the start of an HTML tag, keep advancing until we get\r\n // past it, so we don't end up truncating in the middle of the tag\r\n while (currIdx < html.length && html[currIdx] === \"<\") {\r\n while (currIdx < html.length && html[currIdx++] !== \">\") {\r\n continue;\r\n }\r\n }\r\n\r\n return currIdx;\r\n}\r\n\r\nexport function getFitStatus(element: HTMLElement, containerEnd: number): Enums.ContainerFitStatus {\r\n const start = element.offsetTop;\r\n const end = start + element.clientHeight;\r\n\r\n if (end <= containerEnd) {\r\n return Enums.ContainerFitStatus.FullyInContainer;\r\n } else if (start < containerEnd) {\r\n return Enums.ContainerFitStatus.Overflowing;\r\n } else {\r\n return Enums.ContainerFitStatus.FullyOutOfContainer;\r\n }\r\n}\r\n\r\nexport function getScrollX(): number {\r\n return window.pageXOffset;\r\n}\r\n\r\nexport function getScrollY(): number {\r\n return window.pageYOffset;\r\n}\r\n\r\nexport function clearElementChildren(element: HTMLElement) {\r\n while (element.firstChild) {\r\n element.removeChild(element.firstChild);\r\n }\r\n}", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { GlobalSettings, SizeAndUnit } from \"./shared\";\r\nimport * as Utils from \"./utils\";\r\nimport * as Enums from \"./enums\";\r\nimport { Strings } from \"./strings\";\r\n\r\nexport interface IValidationEvent {\r\n source?: SerializableObject;\r\n phase: Enums.ValidationPhase;\r\n event: Enums.ValidationEvent;\r\n message: string;\r\n}\r\n\r\nexport class Version {\r\n private _versionString: string;\r\n private _major: number;\r\n private _minor: number;\r\n private _isValid: boolean = true;\r\n private _label?: string;\r\n\r\n constructor(major: number = 1, minor: number = 1, label?: string) {\r\n this._major = major;\r\n this._minor = minor;\r\n this._label = label;\r\n }\r\n\r\n static parse(versionString: string, context: BaseSerializationContext): Version | undefined {\r\n if (!versionString) {\r\n return undefined;\r\n }\r\n\r\n const result = new Version();\r\n result._versionString = versionString;\r\n\r\n const regEx = /(\\d+).(\\d+)/gi;\r\n const matches = regEx.exec(versionString);\r\n\r\n if (matches != null && matches.length === 3) {\r\n result._major = parseInt(matches[1]);\r\n result._minor = parseInt(matches[2]);\r\n } else {\r\n result._isValid = false;\r\n }\r\n\r\n if (!result._isValid) {\r\n context.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidVersionString(result._versionString)\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n toString(): string {\r\n return !this._isValid ? this._versionString : this._major + \".\" + this._minor;\r\n }\r\n\r\n toJSON(): any {\r\n return this.toString();\r\n }\r\n\r\n compareTo(otherVersion: Version): number {\r\n if (!this.isValid || !otherVersion.isValid) {\r\n throw new Error(\"Cannot compare invalid version.\");\r\n }\r\n\r\n if (this.major > otherVersion.major) {\r\n return 1;\r\n } else if (this.major < otherVersion.major) {\r\n return -1;\r\n } else if (this.minor > otherVersion.minor) {\r\n return 1;\r\n } else if (this.minor < otherVersion.minor) {\r\n return -1;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n get label(): string {\r\n return this._label ? this._label : this.toString();\r\n }\r\n\r\n get major(): number {\r\n return this._major;\r\n }\r\n\r\n get minor(): number {\r\n return this._minor;\r\n }\r\n\r\n get isValid(): boolean {\r\n return this._isValid;\r\n }\r\n}\r\n\r\nexport type TargetVersion = Version | \"*\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class Versions {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n static readonly v1_0 = new Version(1, 0);\r\n static readonly v1_1 = new Version(1, 1);\r\n static readonly v1_2 = new Version(1, 2);\r\n static readonly v1_3 = new Version(1, 3);\r\n static readonly v1_4 = new Version(1, 4);\r\n static readonly v1_5 = new Version(1, 5);\r\n // If preview tag is added/removed from any version,\r\n // don't forget to update .ac-schema-version-1-?::after too in adaptivecards-site\\themes\\adaptivecards\\source\\css\\style.css\r\n static readonly v1_6 = new Version(1, 6, \"1.6 Preview\");\r\n static readonly latest = Versions.v1_5;\r\n /* eslint-enable @typescript-eslint/naming-convention */\r\n\r\n static getAllDeclaredVersions(): Version[] {\r\n const ctor = Versions;\r\n const properties: Version[] = [];\r\n\r\n for (const propertyName in ctor) {\r\n if (propertyName.match(/^v[0-9_]*$/)) {\r\n // filter latest\r\n try {\r\n const propertyValue = ctor[propertyName];\r\n\r\n if (propertyValue instanceof Version) {\r\n properties.push(propertyValue);\r\n }\r\n } catch {\r\n // If a property happens to have a getter function and\r\n // it throws an exception, we need to catch it here\r\n }\r\n }\r\n }\r\n return properties.sort((v1: Version, v2: Version) => v1.compareTo(v2));\r\n }\r\n}\r\n\r\nexport function isVersionLessOrEqual(\r\n version: TargetVersion,\r\n targetVersion: TargetVersion\r\n): boolean {\r\n if (version instanceof Version) {\r\n if (targetVersion instanceof Version) {\r\n return targetVersion.compareTo(version) >= 0;\r\n } else {\r\n // Target version is *\r\n return true;\r\n }\r\n } else {\r\n // Version is *\r\n return true;\r\n }\r\n}\r\n\r\nexport abstract class BaseSerializationContext {\r\n private _validationEvents: IValidationEvent[] = [];\r\n\r\n toJSONOriginalParam: any;\r\n targetVersion: Version;\r\n\r\n constructor(targetVersion: Version = Versions.latest) {\r\n this.targetVersion = targetVersion;\r\n }\r\n\r\n serializeValue(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue: any,\r\n defaultValue: any = undefined,\r\n forceDeleteIfNullOrDefault: boolean = false\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault) {\r\n delete target[propertyName];\r\n }\r\n } else if (propertyValue === defaultValue) {\r\n delete target[propertyName];\r\n } else {\r\n target[propertyName] = propertyValue;\r\n }\r\n }\r\n\r\n serializeString(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue?: string,\r\n defaultValue?: string\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n target[propertyName] = propertyValue;\r\n }\r\n }\r\n\r\n serializeBool(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue?: boolean,\r\n defaultValue?: boolean\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n target[propertyName] = propertyValue;\r\n }\r\n }\r\n\r\n serializeNumber(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue?: number,\r\n defaultValue?: number\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue ||\r\n isNaN(propertyValue)\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n target[propertyName] = propertyValue;\r\n }\r\n }\r\n\r\n serializeEnum(\r\n enumType: { [s: number]: string },\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue: number | undefined,\r\n defaultValue: number | undefined = undefined\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n target[propertyName] = enumType[propertyValue];\r\n }\r\n }\r\n\r\n serializeArray(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue: any[] | undefined\r\n ) {\r\n const items = [];\r\n\r\n if (propertyValue) {\r\n for (const item of propertyValue) {\r\n let serializedItem: any = undefined;\r\n\r\n if (item instanceof SerializableObject) {\r\n serializedItem = item.toJSON(this);\r\n } else if (item.toJSON) {\r\n serializedItem = item.toJSON();\r\n } else {\r\n serializedItem = item;\r\n }\r\n\r\n if (serializedItem !== undefined) {\r\n items.push(serializedItem);\r\n }\r\n }\r\n }\r\n\r\n if (items.length === 0) {\r\n if (target.hasOwnProperty(propertyName) && Array.isArray(target[propertyName])) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n this.serializeValue(target, propertyName, items);\r\n }\r\n }\r\n\r\n clearEvents() {\r\n this._validationEvents = [];\r\n }\r\n\r\n logEvent(\r\n source: SerializableObject | undefined,\r\n phase: Enums.ValidationPhase,\r\n event: Enums.ValidationEvent,\r\n message: string\r\n ) {\r\n this._validationEvents.push({\r\n source: source,\r\n phase: phase,\r\n event: event,\r\n message: message\r\n });\r\n }\r\n\r\n logParseEvent(\r\n source: SerializableObject | undefined,\r\n event: Enums.ValidationEvent,\r\n message: string\r\n ) {\r\n this.logEvent(source, Enums.ValidationPhase.Parse, event, message);\r\n }\r\n\r\n getEventAt(index: number): IValidationEvent {\r\n return this._validationEvents[index];\r\n }\r\n\r\n get eventCount(): number {\r\n return this._validationEvents.length;\r\n }\r\n}\r\n\r\nclass SimpleSerializationContext extends BaseSerializationContext {}\r\n\r\nexport class PropertyDefinition {\r\n private static _sequentialNumber: number = 0;\r\n\r\n getInternalName(): string {\r\n return this.name;\r\n }\r\n\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): any {\r\n return source[this.name];\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: any,\r\n context: BaseSerializationContext\r\n ): void {\r\n context.serializeValue(target, this.name, value, this.defaultValue);\r\n }\r\n\r\n readonly sequentialNumber: number;\r\n\r\n isSerializationEnabled: boolean = true;\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: any,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => any\r\n ) {\r\n this.sequentialNumber = PropertyDefinition._sequentialNumber;\r\n\r\n PropertyDefinition._sequentialNumber++;\r\n }\r\n}\r\n\r\nexport class StringProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): string | undefined {\r\n const parsedValue = Utils.parseString(source[this.name], this.defaultValue);\r\n const isUndefined =\r\n parsedValue === undefined || (parsedValue === \"\" && this.treatEmptyAsUndefined);\r\n\r\n if (!isUndefined && this.regEx !== undefined) {\r\n const matches = this.regEx.exec(parsedValue);\r\n\r\n if (!matches) {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(parsedValue, this.name)\r\n );\r\n\r\n return undefined;\r\n }\r\n }\r\n\r\n return parsedValue;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: string | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeString(\r\n target,\r\n this.name,\r\n value === \"\" && this.treatEmptyAsUndefined ? undefined : value,\r\n this.defaultValue\r\n );\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly treatEmptyAsUndefined: boolean = true,\r\n readonly regEx?: RegExp,\r\n readonly defaultValue?: string,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => string\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class BoolProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): boolean | undefined {\r\n return Utils.parseBool(source[this.name], this.defaultValue);\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: object,\r\n value: boolean | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeBool(target, this.name, value, this.defaultValue);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: boolean,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => any\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class NumProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): number | undefined {\r\n return Utils.parseNumber(source[this.name], this.defaultValue);\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: number | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeNumber(target, this.name, value, this.defaultValue);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: number,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => any\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class PixelSizeProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): number | undefined {\r\n let result: number | undefined = undefined;\r\n const value = source[this.name];\r\n\r\n if (typeof value === \"string\") {\r\n let isValid = false;\r\n\r\n try {\r\n const size = SizeAndUnit.parse(value, true);\r\n\r\n if (size.unit === Enums.SizeUnit.Pixel) {\r\n result = size.physicalSize;\r\n\r\n isValid = true;\r\n }\r\n } catch {\r\n // Do nothing. A parse error is emitted below\r\n }\r\n\r\n if (!isValid) {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(source[this.name], \"minHeight\")\r\n );\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: number | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeValue(\r\n target,\r\n this.name,\r\n typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined\r\n );\r\n }\r\n}\r\n\r\nexport interface IVersionedValue {\r\n value: TValue;\r\n targetVersion?: Version;\r\n}\r\n\r\nexport class StringArrayProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): string[] | undefined {\r\n const sourceValue = source[this.name];\r\n\r\n if (sourceValue === undefined || !Array.isArray(sourceValue)) {\r\n return this.defaultValue;\r\n }\r\n\r\n const result: string[] = [];\r\n\r\n for (const value of sourceValue) {\r\n if (typeof value === \"string\") {\r\n result.push(value);\r\n } else {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n `Invalid array value \"${JSON.stringify(\r\n value\r\n )}\" of type \"${typeof value}\" ignored for \"${this.name}\".`\r\n );\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: string[] | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeArray(target, this.name, value);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: string[],\r\n readonly onGetInitialValue?: (sender: SerializableObject) => string[] | undefined\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class ValueSetProperty extends PropertyDefinition {\r\n isValidValue(value: string, context: BaseSerializationContext): boolean {\r\n for (const versionedValue of this.values) {\r\n if (value.toLowerCase() === versionedValue.value.toLowerCase()) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n return targetVersion.compareTo(context.targetVersion) <= 0;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): string | undefined {\r\n const sourceValue = source[this.name];\r\n\r\n if (sourceValue === undefined) {\r\n return this.defaultValue;\r\n }\r\n\r\n if (typeof sourceValue === \"string\") {\r\n for (const versionedValue of this.values) {\r\n if (sourceValue.toLowerCase() === versionedValue.value.toLowerCase()) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n return versionedValue.value;\r\n } else {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.propertyValueNotSupported(\r\n sourceValue,\r\n this.name,\r\n targetVersion.toString(),\r\n context.targetVersion.toString()\r\n )\r\n );\r\n\r\n return this.defaultValue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(sourceValue, this.name)\r\n );\r\n\r\n return this.defaultValue;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: string | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n let invalidValue = false;\r\n\r\n if (value !== undefined) {\r\n invalidValue = true;\r\n\r\n for (const versionedValue of this.values) {\r\n if (versionedValue.value === value) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n invalidValue = false;\r\n\r\n break;\r\n } else {\r\n context.logEvent(\r\n sender,\r\n Enums.ValidationPhase.ToJSON,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.propertyValueNotSupported(\r\n value,\r\n this.name,\r\n targetVersion.toString(),\r\n context.targetVersion.toString()\r\n )\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!invalidValue) {\r\n context.serializeValue(target, this.name, value, this.defaultValue, true);\r\n }\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly values: IVersionedValue[],\r\n readonly defaultValue?: string,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => string\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class EnumProperty extends PropertyDefinition {\r\n private _values: IVersionedValue[] = [];\r\n\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): number | undefined {\r\n const sourceValue = source[this.name];\r\n\r\n if (typeof sourceValue !== \"string\") {\r\n return this.defaultValue;\r\n }\r\n\r\n const enumValue = Utils.getEnumValueByName(this.enumType, sourceValue);\r\n\r\n if (enumValue !== undefined) {\r\n for (const versionedValue of this.values) {\r\n if (versionedValue.value === enumValue) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n return enumValue;\r\n } else {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.propertyValueNotSupported(\r\n sourceValue,\r\n this.name,\r\n targetVersion.toString(),\r\n context.targetVersion.toString()\r\n )\r\n );\r\n\r\n return this.defaultValue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(sourceValue, this.name)\r\n );\r\n\r\n return this.defaultValue;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: number | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n let invalidValue = false;\r\n\r\n if (value !== undefined) {\r\n invalidValue = true;\r\n\r\n for (const versionedValue of this.values) {\r\n if (versionedValue.value === value) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n invalidValue = false;\r\n\r\n break;\r\n } else {\r\n context.logEvent(\r\n sender,\r\n Enums.ValidationPhase.ToJSON,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(value, this.name)\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!invalidValue) {\r\n context.serializeEnum(this.enumType, target, this.name, value, this.defaultValue);\r\n }\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly enumType: TEnum,\r\n readonly defaultValue?: number,\r\n values?: IVersionedValue[],\r\n readonly onGetInitialValue?: (sender: SerializableObject) => number\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n\r\n if (!values) {\r\n // eslint-disable-next-line guard-for-in\r\n for (const key in enumType) {\r\n const keyAsNumber = parseInt(key, 10);\r\n\r\n if (keyAsNumber >= 0) {\r\n this._values.push({ value: keyAsNumber });\r\n }\r\n }\r\n } else {\r\n this._values = values;\r\n }\r\n }\r\n\r\n get values(): IVersionedValue[] {\r\n return this._values;\r\n }\r\n}\r\n\r\nexport type SerializableObjectType = { new (): SerializableObject };\r\n\r\nexport class SerializableObjectProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): SerializableObject | undefined {\r\n const sourceValue = source[this.name];\r\n\r\n if (sourceValue === undefined) {\r\n return this.onGetInitialValue ? this.onGetInitialValue(sender) : this.defaultValue;\r\n }\r\n\r\n const result = new this.objectType();\r\n result.parse(sourceValue, context);\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: SerializableObject | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n let serializedValue: object | undefined = undefined;\r\n\r\n if (value !== undefined && !value.hasAllDefaultValues()) {\r\n serializedValue = value.toJSON(context);\r\n }\r\n\r\n if (typeof serializedValue === \"object\" && Object.keys(serializedValue).length === 0) {\r\n serializedValue = undefined;\r\n }\r\n\r\n context.serializeValue(target, this.name, serializedValue, this.defaultValue, true);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly objectType: SerializableObjectType,\r\n readonly nullable: boolean = false,\r\n defaultValue?: SerializableObject\r\n ) {\r\n super(targetVersion, name, defaultValue, (sender: SerializableObject) => {\r\n return this.nullable ? undefined : new this.objectType();\r\n });\r\n }\r\n}\r\n\r\nexport class SerializableObjectCollectionProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): SerializableObject[] | undefined {\r\n const result: SerializableObject[] | undefined = [];\r\n\r\n const sourceCollection = source[this.name];\r\n\r\n if (Array.isArray(sourceCollection)) {\r\n for (const sourceItem of sourceCollection) {\r\n const item = new this.objectType();\r\n item.parse(sourceItem, context);\r\n\r\n result.push(item);\r\n\r\n if (this.onItemAdded) {\r\n this.onItemAdded(sender, item);\r\n }\r\n }\r\n }\r\n\r\n return result.length > 0\r\n ? result\r\n : this.onGetInitialValue\r\n ? this.onGetInitialValue(sender)\r\n : undefined;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: SerializableObject[] | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeArray(target, this.name, value);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly objectType: SerializableObjectType,\r\n readonly onItemAdded?: (sender: SerializableObject, item: SerializableObject) => void\r\n ) {\r\n super(targetVersion, name, undefined, (sender: SerializableObject) => {\r\n return [];\r\n });\r\n }\r\n}\r\n\r\nexport class CustomProperty extends PropertyDefinition {\r\n parse(sender: SerializableObject, source: PropertyBag, context: BaseSerializationContext): T {\r\n return this.onParse(sender, this, source, context);\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: T,\r\n context: BaseSerializationContext\r\n ) {\r\n this.onToJSON(sender, this, target, value, context);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly onParse: (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => T,\r\n readonly onToJSON: (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n target: PropertyBag,\r\n value: T,\r\n context: BaseSerializationContext\r\n ) => void,\r\n readonly defaultValue?: T,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => T\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n\r\n if (!this.onParse) {\r\n throw new Error(\"CustomPropertyDefinition instances must have an onParse handler.\");\r\n }\r\n\r\n if (!this.onToJSON) {\r\n throw new Error(\"CustomPropertyDefinition instances must have an onToJSON handler.\");\r\n }\r\n }\r\n}\r\n\r\nexport class SerializableObjectSchema {\r\n private _properties: PropertyDefinition[] = [];\r\n\r\n indexOf(prop: PropertyDefinition): number {\r\n for (let i = 0; i < this._properties.length; i++) {\r\n if (this._properties[i] === prop) {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n add(...properties: PropertyDefinition[]) {\r\n for (const prop of properties) {\r\n if (this.indexOf(prop) === -1) {\r\n this._properties.push(prop);\r\n }\r\n }\r\n }\r\n\r\n remove(...properties: PropertyDefinition[]) {\r\n for (const prop of properties) {\r\n while (true) {\r\n const index = this.indexOf(prop);\r\n\r\n if (index >= 0) {\r\n this._properties.splice(index, 1);\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n getItemAt(index: number): PropertyDefinition {\r\n return this._properties[index];\r\n }\r\n\r\n getCount(): number {\r\n return this._properties.length;\r\n }\r\n}\r\n\r\n// This is a decorator function, used to map SerializableObject descendant class members to\r\n// schema properties\r\nexport function property(prop: PropertyDefinition) {\r\n return function (target: any, propertyKey: string) {\r\n const descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {};\r\n\r\n if (!descriptor.get && !descriptor.set) {\r\n descriptor.get = function (this: SerializableObject) {\r\n return this.getValue(prop);\r\n };\r\n descriptor.set = function (this: SerializableObject, value: any) {\r\n this.setValue(prop, value);\r\n };\r\n\r\n Object.defineProperty(target, propertyKey, descriptor);\r\n }\r\n };\r\n}\r\n\r\nexport type PropertyBag = { [propertyName: string]: any };\r\n\r\nexport abstract class SerializableObject {\r\n static onRegisterCustomProperties?: (\r\n sender: SerializableObject,\r\n schema: SerializableObjectSchema\r\n ) => void;\r\n static defaultMaxVersion: Version = Versions.latest;\r\n\r\n private static readonly _schemaCache: { [typeName: string]: SerializableObjectSchema } = {};\r\n\r\n private _propertyBag: PropertyBag = {};\r\n private _rawProperties: PropertyBag = {};\r\n\r\n protected abstract getSchemaKey(): string;\r\n\r\n protected getDefaultSerializationContext(): BaseSerializationContext {\r\n return new SimpleSerializationContext();\r\n }\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n const ctor = this.constructor;\r\n const properties: PropertyDefinition[] = [];\r\n\r\n // eslint-disable-next-line guard-for-in\r\n for (const propertyName in ctor) {\r\n try {\r\n const propertyValue = ctor[propertyName];\r\n\r\n if (propertyValue instanceof PropertyDefinition) {\r\n properties.push(propertyValue);\r\n }\r\n } catch {\r\n // If a property happens to have a getter function and\r\n // it throws an exception, we need to catch it here\r\n }\r\n }\r\n\r\n if (properties.length > 0) {\r\n const sortedProperties = properties.sort(\r\n (p1: PropertyDefinition, p2: PropertyDefinition) => {\r\n if (p1.sequentialNumber > p2.sequentialNumber) {\r\n return 1;\r\n } else if (p1.sequentialNumber < p2.sequentialNumber) {\r\n return -1;\r\n }\r\n\r\n return 0;\r\n }\r\n );\r\n\r\n schema.add(...sortedProperties);\r\n }\r\n\r\n if (SerializableObject.onRegisterCustomProperties) {\r\n SerializableObject.onRegisterCustomProperties(this, schema);\r\n }\r\n }\r\n\r\n protected getValue(prop: PropertyDefinition): any {\r\n return this._propertyBag.hasOwnProperty(prop.getInternalName())\r\n ? this._propertyBag[prop.getInternalName()]\r\n : prop.defaultValue;\r\n }\r\n\r\n protected setValue(prop: PropertyDefinition, value: any) {\r\n if (value === undefined || value === null) {\r\n delete this._propertyBag[prop.getInternalName()];\r\n } else {\r\n this._propertyBag[prop.getInternalName()] = value;\r\n }\r\n }\r\n\r\n protected internalParse(source: PropertyBag, context: BaseSerializationContext) {\r\n this._propertyBag = {};\r\n this._rawProperties = GlobalSettings.enableFullJsonRoundTrip ? (source ? source : {}) : {};\r\n\r\n if (source) {\r\n const s = this.getSchema();\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n if (prop.isSerializationEnabled) {\r\n let propertyValue = prop.onGetInitialValue\r\n ? prop.onGetInitialValue(this)\r\n : undefined;\r\n\r\n if (source.hasOwnProperty(prop.name)) {\r\n if (prop.targetVersion.compareTo(context.targetVersion) <= 0) {\r\n propertyValue = prop.parse(this, source, context);\r\n } else {\r\n context.logParseEvent(\r\n this,\r\n Enums.ValidationEvent.UnsupportedProperty,\r\n Strings.errors.propertyNotSupported(\r\n prop.name,\r\n prop.targetVersion.toString(),\r\n context.targetVersion.toString()\r\n )\r\n );\r\n }\r\n }\r\n\r\n this.setValue(prop, propertyValue);\r\n }\r\n }\r\n } else {\r\n this.resetDefaultValues();\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: BaseSerializationContext) {\r\n const s = this.getSchema();\r\n const serializedProperties: string[] = [];\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n // Avoid serializing the same property multiple times. This is necessary\r\n // because some property definitions map to the same underlying schema\r\n // property\r\n if (\r\n prop.isSerializationEnabled &&\r\n prop.targetVersion.compareTo(context.targetVersion) <= 0 &&\r\n serializedProperties.indexOf(prop.name) === -1\r\n ) {\r\n prop.toJSON(this, target, this.getValue(prop), context);\r\n\r\n serializedProperties.push(prop.name);\r\n }\r\n }\r\n }\r\n\r\n protected shouldSerialize(_context: BaseSerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n maxVersion: Version = SerializableObject.defaultMaxVersion;\r\n\r\n constructor() {\r\n const s = this.getSchema();\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n if (prop.onGetInitialValue) {\r\n this.setValue(prop, prop.onGetInitialValue(this));\r\n }\r\n }\r\n }\r\n\r\n parse(source: PropertyBag, context?: BaseSerializationContext) {\r\n this.internalParse(source, context ? context : new SimpleSerializationContext());\r\n }\r\n\r\n toJSON(context?: BaseSerializationContext): PropertyBag | undefined {\r\n let effectiveContext: BaseSerializationContext;\r\n\r\n if (context && context instanceof BaseSerializationContext) {\r\n effectiveContext = context;\r\n } else {\r\n effectiveContext = this.getDefaultSerializationContext();\r\n effectiveContext.toJSONOriginalParam = context;\r\n }\r\n\r\n if (this.shouldSerialize(effectiveContext)) {\r\n let result: PropertyBag;\r\n\r\n if (\r\n GlobalSettings.enableFullJsonRoundTrip &&\r\n this._rawProperties &&\r\n typeof this._rawProperties === \"object\"\r\n ) {\r\n result = this._rawProperties;\r\n } else {\r\n result = {};\r\n }\r\n\r\n this.internalToJSON(result, effectiveContext);\r\n\r\n return result;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n hasDefaultValue(prop: PropertyDefinition): boolean {\r\n return this.getValue(prop) === prop.defaultValue;\r\n }\r\n\r\n hasAllDefaultValues(): boolean {\r\n const s = this.getSchema();\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n if (!this.hasDefaultValue(prop)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n resetDefaultValues() {\r\n const s = this.getSchema();\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n this.setValue(prop, prop.defaultValue);\r\n }\r\n }\r\n\r\n setCustomProperty(name: string, value: any) {\r\n const shouldDeleteProperty =\r\n (typeof value === \"string\" && !value) || value === undefined || value === null;\r\n\r\n if (shouldDeleteProperty) {\r\n delete this._rawProperties[name];\r\n } else {\r\n this._rawProperties[name] = value;\r\n }\r\n }\r\n\r\n getCustomProperty(name: string): any {\r\n return this._rawProperties[name];\r\n }\r\n\r\n getSchema(): SerializableObjectSchema {\r\n let schema: SerializableObjectSchema = SerializableObject._schemaCache[this.getSchemaKey()];\r\n\r\n if (!schema) {\r\n schema = new SerializableObjectSchema();\r\n\r\n this.populateSchema(schema);\r\n\r\n SerializableObject._schemaCache[this.getSchemaKey()] = schema;\r\n }\r\n\r\n return schema;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {\r\n TargetVersion,\r\n Version,\r\n SerializableObject,\r\n BaseSerializationContext,\r\n PropertyBag\r\n} from \"./serialization\";\r\n\r\nexport class HostCapabilities extends SerializableObject {\r\n private _capabilities: { [key: string]: TargetVersion } = {};\r\n\r\n protected getSchemaKey(): string {\r\n return \"HostCapabilities\";\r\n }\r\n\r\n protected internalParse(source: any, context: BaseSerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n if (source) {\r\n // eslint-disable-next-line guard-for-in\r\n for (const name in source) {\r\n const jsonVersion = source[name];\r\n\r\n if (typeof jsonVersion === \"string\") {\r\n if (jsonVersion === \"*\") {\r\n this.addCapability(name, \"*\");\r\n } else {\r\n const version = Version.parse(jsonVersion, context);\r\n\r\n if (version?.isValid) {\r\n this.addCapability(name, version);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: BaseSerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n // eslint-disable-next-line guard-for-in\r\n for (const key in this._capabilities) {\r\n target[key] = this._capabilities[key];\r\n }\r\n }\r\n\r\n addCapability(name: string, version: TargetVersion) {\r\n this._capabilities[name] = version;\r\n }\r\n\r\n removeCapability(name: string) {\r\n delete this._capabilities[name];\r\n }\r\n\r\n clear() {\r\n this._capabilities = {};\r\n }\r\n\r\n hasCapability(name: string, version: TargetVersion): boolean {\r\n if (this._capabilities.hasOwnProperty(name)) {\r\n if (version === \"*\" || this._capabilities[name] === \"*\") {\r\n return true;\r\n }\r\n\r\n return version.compareTo(this._capabilities[name]) <= 0;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n areAllMet(hostCapabilities: HostCapabilities): boolean {\r\n for (const capabilityName in this._capabilities) {\r\n if (\r\n !hostCapabilities.hasCapability(capabilityName, this._capabilities[capabilityName])\r\n ) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport * as Utils from \"./utils\";\r\nimport * as Shared from \"./shared\";\r\nimport { HostCapabilities } from \"./host-capabilities\";\r\n\r\nfunction parseHostConfigEnum(\r\n targetEnum: { [s: number]: string },\r\n value: string | number,\r\n defaultValue: number\r\n): number {\r\n if (typeof value === \"string\") {\r\n const parsedValue = Utils.parseEnum(targetEnum, value, defaultValue);\r\n\r\n return parsedValue !== undefined ? parsedValue : defaultValue;\r\n } else if (typeof value === \"number\") {\r\n return value;\r\n } else {\r\n return defaultValue;\r\n }\r\n}\r\n\r\nexport class ColorDefinition {\r\n default: string = \"#000000\";\r\n subtle: string = \"#666666\";\r\n\r\n constructor(defaultColor?: string, subtleColor?: string) {\r\n if (defaultColor) {\r\n this.default = defaultColor;\r\n }\r\n\r\n if (subtleColor) {\r\n this.subtle = subtleColor;\r\n }\r\n }\r\n\r\n parse(obj?: any) {\r\n if (obj) {\r\n this.default = obj[\"default\"] || this.default;\r\n this.subtle = obj[\"subtle\"] || this.subtle;\r\n }\r\n }\r\n}\r\n\r\nexport class TextColorDefinition extends ColorDefinition {\r\n readonly highlightColors = new ColorDefinition(\"#22000000\", \"#11000000\");\r\n\r\n parse(obj?: any) {\r\n super.parse(obj);\r\n\r\n if (obj) {\r\n this.highlightColors.parse(obj[\"highlightColors\"]);\r\n }\r\n }\r\n}\r\n\r\nexport class AdaptiveCardConfig {\r\n allowCustomStyle: boolean = false;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.allowCustomStyle = obj[\"allowCustomStyle\"] || this.allowCustomStyle;\r\n }\r\n }\r\n}\r\n\r\nexport class ImageSetConfig {\r\n imageSize: Enums.Size = Enums.Size.Medium;\r\n maxImageHeight: number = 100;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.imageSize = obj[\"imageSize\"] != null ? obj[\"imageSize\"] : this.imageSize;\r\n this.maxImageHeight = Utils.parseNumber(obj[\"maxImageHeight\"], 100)!;\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n imageSize: Enums.Size[this.imageSize],\r\n maxImageHeight: this.maxImageHeight\r\n };\r\n }\r\n}\r\n\r\nexport class MediaConfig {\r\n defaultPoster?: string;\r\n allowInlinePlayback: boolean = true;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.defaultPoster = obj[\"defaultPoster\"];\r\n this.allowInlinePlayback = obj[\"allowInlinePlayback\"] || this.allowInlinePlayback;\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n defaultPoster: this.defaultPoster,\r\n allowInlinePlayback: this.allowInlinePlayback\r\n };\r\n }\r\n}\r\n\r\nexport class TableConfig {\r\n cellSpacing: number = 8;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.cellSpacing =\r\n obj.cellSpacing && typeof obj.cellSpacing === \"number\"\r\n ? obj.cellSpacing\r\n : this.cellSpacing;\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n cellSpacing: this.cellSpacing\r\n };\r\n }\r\n}\r\n\r\nexport class BaseTextDefinition {\r\n size: Enums.TextSize = Enums.TextSize.Default;\r\n color: Enums.TextColor = Enums.TextColor.Default;\r\n isSubtle: boolean = false;\r\n weight: Enums.TextWeight = Enums.TextWeight.Default;\r\n\r\n constructor(obj?: any) {\r\n this.parse(obj);\r\n }\r\n\r\n parse(obj: any) {\r\n if (obj) {\r\n this.size = parseHostConfigEnum(Enums.TextSize, obj[\"size\"], this.size);\r\n this.color = parseHostConfigEnum(Enums.TextColor, obj[\"color\"], this.color);\r\n this.isSubtle =\r\n obj.isSubtle !== undefined && typeof obj.isSubtle === \"boolean\"\r\n ? obj.isSubtle\r\n : this.isSubtle;\r\n this.weight = parseHostConfigEnum(\r\n Enums.TextWeight,\r\n obj[\"weight\"],\r\n this.getDefaultWeight()\r\n );\r\n }\r\n }\r\n\r\n getDefaultWeight(): Enums.TextWeight {\r\n return Enums.TextWeight.Default;\r\n }\r\n\r\n toJSON(): any {\r\n return {\r\n size: Enums.TextSize[this.size],\r\n color: Enums.TextColor[this.color],\r\n isSubtle: this.isSubtle,\r\n weight: Enums.TextWeight[this.weight]\r\n };\r\n }\r\n}\r\n\r\nexport class TextStyleDefinition extends BaseTextDefinition {\r\n fontType: Enums.FontType = Enums.FontType.Default;\r\n\r\n parse(obj: any) {\r\n super.parse(obj);\r\n\r\n if (obj) {\r\n this.fontType = parseHostConfigEnum(Enums.FontType, obj.fontType, this.fontType);\r\n }\r\n }\r\n}\r\n\r\nexport class TextStyleSet {\r\n readonly default: TextStyleDefinition = new TextStyleDefinition();\r\n readonly heading: TextStyleDefinition = new TextStyleDefinition({\r\n size: \"Large\",\r\n weight: \"Bolder\"\r\n });\r\n readonly columnHeader: TextStyleDefinition = new TextStyleDefinition({\r\n weight: \"Bolder\"\r\n });\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.heading.parse(obj.heading);\r\n this.columnHeader.parse(obj.columnHeader);\r\n }\r\n }\r\n\r\n getStyleByName(name: string): TextStyleDefinition {\r\n switch (name.toLowerCase()) {\r\n case \"heading\":\r\n return this.heading;\r\n case \"columnHeader\":\r\n return this.columnHeader;\r\n default:\r\n return this.default;\r\n }\r\n }\r\n}\r\n\r\nexport class TextBlockConfig {\r\n headingLevel?: number;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.headingLevel = Utils.parseNumber(obj.headingLevel);\r\n }\r\n }\r\n}\r\n\r\nexport class RequiredInputLabelTextDefinition extends BaseTextDefinition {\r\n suffix?: string = \" *\";\r\n suffixColor: Enums.TextColor = Enums.TextColor.Attention;\r\n\r\n parse(obj?: any) {\r\n super.parse(obj);\r\n\r\n if (obj) {\r\n this.suffix = obj[\"suffix\"] || this.suffix;\r\n this.suffixColor = parseHostConfigEnum(\r\n Enums.TextColor,\r\n obj[\"suffixColor\"],\r\n this.suffixColor\r\n );\r\n }\r\n }\r\n\r\n toJSON(): any {\r\n const result = super.toJSON();\r\n result[\"suffix\"] = this.suffix;\r\n result[\"suffixColor\"] = Enums.TextColor[this.suffixColor];\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport class InputLabelConfig {\r\n inputSpacing: Enums.Spacing = Enums.Spacing.Small;\r\n readonly requiredInputs: RequiredInputLabelTextDefinition =\r\n new RequiredInputLabelTextDefinition();\r\n readonly optionalInputs: BaseTextDefinition = new BaseTextDefinition();\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.inputSpacing = parseHostConfigEnum(\r\n Enums.Spacing,\r\n obj[\"inputSpacing\"],\r\n this.inputSpacing\r\n );\r\n this.requiredInputs = new RequiredInputLabelTextDefinition(obj[\"requiredInputs\"]);\r\n this.optionalInputs = new BaseTextDefinition(obj[\"optionalInputs\"]);\r\n }\r\n }\r\n}\r\n\r\nexport class InputConfig {\r\n readonly label: InputLabelConfig = new InputLabelConfig();\r\n readonly errorMessage: BaseTextDefinition = new BaseTextDefinition({\r\n color: Enums.TextColor.Attention\r\n });\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.label = new InputLabelConfig(obj[\"label\"]);\r\n this.errorMessage = new BaseTextDefinition(obj[\"errorMessage\"]);\r\n }\r\n }\r\n}\r\n\r\nexport class FactTextDefinition extends BaseTextDefinition {\r\n wrap: boolean = true;\r\n\r\n parse(obj?: any) {\r\n super.parse(obj);\r\n\r\n if (obj) {\r\n this.wrap = obj[\"wrap\"] != null ? obj[\"wrap\"] : this.wrap;\r\n }\r\n }\r\n\r\n toJSON(): any {\r\n const result = super.toJSON();\r\n result[\"wrap\"] = this.wrap;\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport class FactTitleDefinition extends FactTextDefinition {\r\n maxWidth?: number = 150;\r\n weight: Enums.TextWeight = Enums.TextWeight.Bolder;\r\n\r\n constructor(obj?: any) {\r\n super(obj);\r\n\r\n if (obj) {\r\n this.maxWidth = obj[\"maxWidth\"] != null ? obj[\"maxWidth\"] : this.maxWidth;\r\n this.weight = parseHostConfigEnum(\r\n Enums.TextWeight,\r\n obj[\"weight\"],\r\n Enums.TextWeight.Bolder\r\n );\r\n }\r\n }\r\n\r\n getDefaultWeight() {\r\n return Enums.TextWeight.Bolder;\r\n }\r\n}\r\n\r\nexport class FactSetConfig {\r\n readonly title: FactTitleDefinition = new FactTitleDefinition();\r\n readonly value: FactTextDefinition = new FactTextDefinition();\r\n spacing: number = 10;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.title = new FactTitleDefinition(obj[\"title\"]);\r\n this.value = new FactTextDefinition(obj[\"value\"]);\r\n this.spacing =\r\n obj.spacing && obj.spacing != null ? obj.spacing && obj.spacing : this.spacing;\r\n }\r\n }\r\n}\r\n\r\nexport class ShowCardActionConfig {\r\n actionMode: Enums.ShowCardActionMode = Enums.ShowCardActionMode.Inline;\r\n inlineTopMargin: number = 16;\r\n style?: string = Enums.ContainerStyle.Emphasis;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.actionMode = parseHostConfigEnum(\r\n Enums.ShowCardActionMode,\r\n obj[\"actionMode\"],\r\n Enums.ShowCardActionMode.Inline\r\n );\r\n this.inlineTopMargin =\r\n obj[\"inlineTopMargin\"] != null ? obj[\"inlineTopMargin\"] : this.inlineTopMargin;\r\n this.style =\r\n obj[\"style\"] && typeof obj[\"style\"] === \"string\"\r\n ? obj[\"style\"]\r\n : Enums.ContainerStyle.Emphasis;\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n actionMode: Enums.ShowCardActionMode[this.actionMode],\r\n inlineTopMargin: this.inlineTopMargin,\r\n style: this.style\r\n };\r\n }\r\n}\r\n\r\nexport class ActionsConfig {\r\n maxActions: number = 5;\r\n spacing: Enums.Spacing = Enums.Spacing.Default;\r\n buttonSpacing: number = 20;\r\n readonly showCard: ShowCardActionConfig = new ShowCardActionConfig();\r\n preExpandSingleShowCardAction?: boolean = false;\r\n actionsOrientation: Enums.Orientation = Enums.Orientation.Horizontal;\r\n actionAlignment: Enums.ActionAlignment = Enums.ActionAlignment.Left;\r\n iconPlacement: Enums.ActionIconPlacement = Enums.ActionIconPlacement.LeftOfTitle;\r\n allowTitleToWrap: boolean = false;\r\n iconSize: number = 16;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.maxActions = obj[\"maxActions\"] != null ? obj[\"maxActions\"] : this.maxActions;\r\n this.spacing = parseHostConfigEnum(\r\n Enums.Spacing,\r\n obj.spacing && obj.spacing,\r\n Enums.Spacing.Default\r\n );\r\n this.buttonSpacing =\r\n obj[\"buttonSpacing\"] != null ? obj[\"buttonSpacing\"] : this.buttonSpacing;\r\n this.showCard = new ShowCardActionConfig(obj[\"showCard\"]);\r\n this.preExpandSingleShowCardAction = Utils.parseBool(\r\n obj[\"preExpandSingleShowCardAction\"],\r\n false\r\n );\r\n this.actionsOrientation = parseHostConfigEnum(\r\n Enums.Orientation,\r\n obj[\"actionsOrientation\"],\r\n Enums.Orientation.Horizontal\r\n );\r\n this.actionAlignment = parseHostConfigEnum(\r\n Enums.ActionAlignment,\r\n obj[\"actionAlignment\"],\r\n Enums.ActionAlignment.Left\r\n );\r\n this.iconPlacement = parseHostConfigEnum(\r\n Enums.ActionIconPlacement,\r\n obj[\"iconPlacement\"],\r\n Enums.ActionIconPlacement.LeftOfTitle\r\n );\r\n this.allowTitleToWrap =\r\n obj[\"allowTitleToWrap\"] != null ? obj[\"allowTitleToWrap\"] : this.allowTitleToWrap;\r\n\r\n try {\r\n const sizeAndUnit = Shared.SizeAndUnit.parse(obj[\"iconSize\"]);\r\n\r\n if (sizeAndUnit.unit === Enums.SizeUnit.Pixel) {\r\n this.iconSize = sizeAndUnit.physicalSize;\r\n }\r\n } catch (e) {\r\n // Swallow this, keep default icon size\r\n }\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n maxActions: this.maxActions,\r\n spacing: Enums.Spacing[this.spacing],\r\n buttonSpacing: this.buttonSpacing,\r\n showCard: this.showCard,\r\n preExpandSingleShowCardAction: this.preExpandSingleShowCardAction,\r\n actionsOrientation: Enums.Orientation[this.actionsOrientation],\r\n actionAlignment: Enums.ActionAlignment[this.actionAlignment]\r\n };\r\n }\r\n}\r\n\r\nexport class ColorSetDefinition {\r\n private parseSingleColor(obj: any, propertyName: string) {\r\n if (obj) {\r\n ((this)[propertyName] as TextColorDefinition).parse(obj[propertyName]);\r\n }\r\n }\r\n\r\n default: TextColorDefinition = new TextColorDefinition();\r\n dark: TextColorDefinition = new TextColorDefinition();\r\n light: TextColorDefinition = new TextColorDefinition();\r\n accent: TextColorDefinition = new TextColorDefinition();\r\n good: TextColorDefinition = new TextColorDefinition();\r\n warning: TextColorDefinition = new TextColorDefinition();\r\n attention: TextColorDefinition = new TextColorDefinition();\r\n\r\n constructor(obj?: any) {\r\n this.parse(obj);\r\n }\r\n\r\n parse(obj: any) {\r\n if (obj) {\r\n this.parseSingleColor(obj, \"default\");\r\n this.parseSingleColor(obj, \"dark\");\r\n this.parseSingleColor(obj, \"light\");\r\n this.parseSingleColor(obj, \"accent\");\r\n this.parseSingleColor(obj, \"good\");\r\n this.parseSingleColor(obj, \"warning\");\r\n this.parseSingleColor(obj, \"attention\");\r\n }\r\n }\r\n}\r\n\r\nexport class ContainerStyleDefinition {\r\n backgroundColor?: string;\r\n\r\n readonly foregroundColors: ColorSetDefinition = new ColorSetDefinition({\r\n \"default\": { default: \"#333333\", subtle: \"#EE333333\" },\r\n \"dark\": { default: \"#000000\", subtle: \"#66000000\" },\r\n \"light\": { default: \"#FFFFFF\", subtle: \"#33000000\" },\r\n \"accent\": { default: \"#2E89FC\", subtle: \"#882E89FC\" },\r\n \"good\": { default: \"#028A02\", subtle: \"#DD027502\" },\r\n \"warning\": { default: \"#E69500\", subtle: \"#DDE69500\" },\r\n \"attention\": { default: \"#CC3300\", subtle: \"#DDCC3300\" }\r\n });\r\n\r\n highlightBackgroundColor?: string;\r\n highlightForegroundColor?: string;\r\n borderColor?: string;\r\n\r\n parse(obj: any) {\r\n if (obj) {\r\n this.backgroundColor = obj[\"backgroundColor\"];\r\n\r\n this.foregroundColors.parse(obj[\"foregroundColors\"]);\r\n\r\n this.highlightBackgroundColor = obj[\"highlightBackgroundColor\"];\r\n this.highlightForegroundColor = obj[\"highlightForegroundColor\"];\r\n\r\n this.borderColor = obj[\"borderColor\"];\r\n }\r\n }\r\n\r\n constructor(obj?: any) {\r\n this.parse(obj);\r\n }\r\n\r\n get isBuiltIn(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nclass BuiltInContainerStyleDefinition extends ContainerStyleDefinition {\r\n get isBuiltIn(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport interface ILineHeightDefinitions {\r\n small: number;\r\n medium: number;\r\n default: number;\r\n large: number;\r\n extraLarge: number;\r\n}\r\n\r\nexport class ContainerStyleSet {\r\n private _allStyles: { [key: string]: ContainerStyleDefinition } = {};\r\n\r\n constructor(obj?: any) {\r\n this._allStyles[Enums.ContainerStyle.Default] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Emphasis] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Accent] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Good] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Attention] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Warning] = new BuiltInContainerStyleDefinition();\r\n\r\n if (obj) {\r\n this._allStyles[Enums.ContainerStyle.Default].parse(obj[Enums.ContainerStyle.Default]);\r\n this._allStyles[Enums.ContainerStyle.Emphasis].parse(\r\n obj[Enums.ContainerStyle.Emphasis]\r\n );\r\n this._allStyles[Enums.ContainerStyle.Accent].parse(obj[Enums.ContainerStyle.Accent]);\r\n this._allStyles[Enums.ContainerStyle.Good].parse(obj[Enums.ContainerStyle.Good]);\r\n this._allStyles[Enums.ContainerStyle.Attention].parse(\r\n obj[Enums.ContainerStyle.Attention]\r\n );\r\n this._allStyles[Enums.ContainerStyle.Warning].parse(obj[Enums.ContainerStyle.Warning]);\r\n\r\n const customStyleArray = obj[\"customStyles\"];\r\n\r\n if (customStyleArray && Array.isArray(customStyleArray)) {\r\n for (const customStyle of customStyleArray) {\r\n if (customStyle) {\r\n const styleName = customStyle[\"name\"];\r\n\r\n if (styleName && typeof styleName === \"string\") {\r\n if (this._allStyles.hasOwnProperty(styleName)) {\r\n this._allStyles[styleName].parse(customStyle[\"style\"]);\r\n } else {\r\n this._allStyles[styleName] = new ContainerStyleDefinition(\r\n customStyle[\"style\"]\r\n );\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n toJSON() {\r\n const customStyleArray: any[] = [];\r\n\r\n Object.keys(this._allStyles).forEach((key) => {\r\n if (!this._allStyles[key].isBuiltIn) {\r\n customStyleArray.push({\r\n name: key,\r\n style: this._allStyles[key]\r\n });\r\n }\r\n });\r\n\r\n const result: any = {\r\n default: this.default,\r\n emphasis: this.emphasis\r\n };\r\n\r\n if (customStyleArray.length > 0) {\r\n result.customStyles = customStyleArray;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getStyleByName(\r\n name: string | undefined,\r\n defaultValue?: ContainerStyleDefinition\r\n ): ContainerStyleDefinition {\r\n if (name && this._allStyles.hasOwnProperty(name)) {\r\n return this._allStyles[name];\r\n } else {\r\n return defaultValue ? defaultValue : this._allStyles[Enums.ContainerStyle.Default];\r\n }\r\n }\r\n\r\n get default(): ContainerStyleDefinition {\r\n return this._allStyles[Enums.ContainerStyle.Default];\r\n }\r\n\r\n get emphasis(): ContainerStyleDefinition {\r\n return this._allStyles[Enums.ContainerStyle.Emphasis];\r\n }\r\n}\r\n\r\nexport interface IFontSizeDefinitions {\r\n small: number;\r\n default: number;\r\n medium: number;\r\n large: number;\r\n extraLarge: number;\r\n}\r\n\r\nexport interface IFontWeightDefinitions {\r\n lighter: number;\r\n default: number;\r\n bolder: number;\r\n}\r\n\r\nexport class FontTypeDefinition {\r\n static readonly monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\r\n\r\n fontFamily?: string = \"Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif\";\r\n\r\n fontSizes: IFontSizeDefinitions = {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n };\r\n\r\n fontWeights: IFontWeightDefinitions = {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n };\r\n\r\n constructor(fontFamily?: string) {\r\n if (fontFamily) {\r\n this.fontFamily = fontFamily;\r\n }\r\n }\r\n\r\n parse(obj?: any) {\r\n this.fontFamily = obj[\"fontFamily\"] || this.fontFamily;\r\n this.fontSizes = {\r\n small: (obj.fontSizes && obj.fontSizes[\"small\"]) || this.fontSizes.small,\r\n default: (obj.fontSizes && obj.fontSizes[\"default\"]) || this.fontSizes.default,\r\n medium: (obj.fontSizes && obj.fontSizes[\"medium\"]) || this.fontSizes.medium,\r\n large: (obj.fontSizes && obj.fontSizes[\"large\"]) || this.fontSizes.large,\r\n extraLarge: (obj.fontSizes && obj.fontSizes[\"extraLarge\"]) || this.fontSizes.extraLarge\r\n };\r\n this.fontWeights = {\r\n lighter: (obj.fontWeights && obj.fontWeights[\"lighter\"]) || this.fontWeights.lighter,\r\n default: (obj.fontWeights && obj.fontWeights[\"default\"]) || this.fontWeights.default,\r\n bolder: (obj.fontWeights && obj.fontWeights[\"bolder\"]) || this.fontWeights.bolder\r\n };\r\n }\r\n}\r\n\r\nexport class FontTypeSet {\r\n default: FontTypeDefinition;\r\n monospace: FontTypeDefinition;\r\n\r\n constructor(obj?: any) {\r\n this.default = new FontTypeDefinition();\r\n this.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\r\n\r\n if (obj) {\r\n this.default.parse(obj[\"default\"]);\r\n this.monospace.parse(obj[\"monospace\"]);\r\n }\r\n }\r\n\r\n getStyleDefinition(style: Enums.FontType | undefined): FontTypeDefinition {\r\n switch (style) {\r\n case Enums.FontType.Monospace:\r\n return this.monospace;\r\n case Enums.FontType.Default:\r\n default:\r\n return this.default;\r\n }\r\n }\r\n}\r\n\r\nexport class HostConfig {\r\n readonly hostCapabilities = new HostCapabilities();\r\n\r\n private _legacyFontType: FontTypeDefinition;\r\n\r\n choiceSetInputValueSeparator: string = \",\";\r\n supportsInteractivity: boolean = true;\r\n lineHeights?: ILineHeightDefinitions;\r\n fontTypes?: FontTypeSet;\r\n\r\n readonly spacing = {\r\n small: 3,\r\n default: 8,\r\n medium: 20,\r\n large: 30,\r\n extraLarge: 40,\r\n padding: 15\r\n };\r\n\r\n readonly separator = {\r\n lineThickness: 1,\r\n lineColor: \"#EEEEEE\"\r\n };\r\n\r\n readonly imageSizes = {\r\n small: 40,\r\n medium: 80,\r\n large: 160\r\n };\r\n\r\n readonly containerStyles: ContainerStyleSet = new ContainerStyleSet();\r\n readonly inputs: InputConfig = new InputConfig();\r\n readonly actions: ActionsConfig = new ActionsConfig();\r\n readonly adaptiveCard: AdaptiveCardConfig = new AdaptiveCardConfig();\r\n readonly imageSet: ImageSetConfig = new ImageSetConfig();\r\n readonly media: MediaConfig = new MediaConfig();\r\n readonly factSet: FactSetConfig = new FactSetConfig();\r\n readonly table: TableConfig = new TableConfig();\r\n readonly textStyles: TextStyleSet = new TextStyleSet();\r\n readonly textBlock: TextBlockConfig = new TextBlockConfig();\r\n\r\n cssClassNamePrefix?: string;\r\n alwaysAllowBleed: boolean = false;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n if (typeof obj === \"string\" || obj instanceof String) {\r\n obj = JSON.parse(obj as string);\r\n }\r\n\r\n this.choiceSetInputValueSeparator =\r\n obj && typeof obj[\"choiceSetInputValueSeparator\"] === \"string\"\r\n ? obj[\"choiceSetInputValueSeparator\"]\r\n : this.choiceSetInputValueSeparator;\r\n this.supportsInteractivity =\r\n obj && typeof obj[\"supportsInteractivity\"] === \"boolean\"\r\n ? obj[\"supportsInteractivity\"]\r\n : this.supportsInteractivity;\r\n\r\n this._legacyFontType = new FontTypeDefinition();\r\n this._legacyFontType.parse(obj);\r\n\r\n if (obj.fontTypes) {\r\n this.fontTypes = new FontTypeSet(obj.fontTypes);\r\n }\r\n\r\n if (obj.lineHeights) {\r\n this.lineHeights = {\r\n small: obj.lineHeights[\"small\"],\r\n default: obj.lineHeights[\"default\"],\r\n medium: obj.lineHeights[\"medium\"],\r\n large: obj.lineHeights[\"large\"],\r\n extraLarge: obj.lineHeights[\"extraLarge\"]\r\n };\r\n }\r\n\r\n this.imageSizes = {\r\n small: (obj.imageSizes && obj.imageSizes[\"small\"]) || this.imageSizes.small,\r\n medium: (obj.imageSizes && obj.imageSizes[\"medium\"]) || this.imageSizes.medium,\r\n large: (obj.imageSizes && obj.imageSizes[\"large\"]) || this.imageSizes.large\r\n };\r\n\r\n this.containerStyles = new ContainerStyleSet(obj[\"containerStyles\"]);\r\n this.spacing = {\r\n small: (obj.spacing && obj.spacing[\"small\"]) || this.spacing.small,\r\n default: (obj.spacing && obj.spacing[\"default\"]) || this.spacing.default,\r\n medium: (obj.spacing && obj.spacing[\"medium\"]) || this.spacing.medium,\r\n large: (obj.spacing && obj.spacing[\"large\"]) || this.spacing.large,\r\n extraLarge: (obj.spacing && obj.spacing[\"extraLarge\"]) || this.spacing.extraLarge,\r\n padding: (obj.spacing && obj.spacing[\"padding\"]) || this.spacing.padding\r\n };\r\n\r\n this.separator = {\r\n lineThickness:\r\n (obj.separator && obj.separator[\"lineThickness\"]) ||\r\n this.separator.lineThickness,\r\n lineColor: (obj.separator && obj.separator[\"lineColor\"]) || this.separator.lineColor\r\n };\r\n\r\n this.inputs = new InputConfig(obj.inputs || this.inputs);\r\n this.actions = new ActionsConfig(obj.actions || this.actions);\r\n this.adaptiveCard = new AdaptiveCardConfig(obj.adaptiveCard || this.adaptiveCard);\r\n this.imageSet = new ImageSetConfig(obj[\"imageSet\"]);\r\n this.factSet = new FactSetConfig(obj[\"factSet\"]);\r\n this.textStyles = new TextStyleSet(obj[\"textStyles\"]);\r\n this.textBlock = new TextBlockConfig(obj[\"textBlock\"]);\r\n }\r\n }\r\n\r\n getFontTypeDefinition(style?: Enums.FontType): FontTypeDefinition {\r\n if (this.fontTypes) {\r\n return this.fontTypes.getStyleDefinition(style);\r\n } else {\r\n return style === Enums.FontType.Monospace\r\n ? FontTypeDefinition.monospace\r\n : this._legacyFontType;\r\n }\r\n }\r\n\r\n getEffectiveSpacing(spacing: Enums.Spacing): number {\r\n switch (spacing) {\r\n case Enums.Spacing.Small:\r\n return this.spacing.small;\r\n case Enums.Spacing.Default:\r\n return this.spacing.default;\r\n case Enums.Spacing.Medium:\r\n return this.spacing.medium;\r\n case Enums.Spacing.Large:\r\n return this.spacing.large;\r\n case Enums.Spacing.ExtraLarge:\r\n return this.spacing.extraLarge;\r\n case Enums.Spacing.Padding:\r\n return this.spacing.padding;\r\n default:\r\n return 0;\r\n }\r\n }\r\n\r\n paddingDefinitionToSpacingDefinition(\r\n paddingDefinition: Shared.PaddingDefinition\r\n ): Shared.SpacingDefinition {\r\n return new Shared.SpacingDefinition(\r\n this.getEffectiveSpacing(paddingDefinition.top),\r\n this.getEffectiveSpacing(paddingDefinition.right),\r\n this.getEffectiveSpacing(paddingDefinition.bottom),\r\n this.getEffectiveSpacing(paddingDefinition.left)\r\n );\r\n }\r\n\r\n makeCssClassNames(...classNames: string[]): string[] {\r\n const result: string[] = [];\r\n\r\n for (const className of classNames) {\r\n result.push((this.cssClassNamePrefix ? this.cssClassNamePrefix + \"-\" : \"\") + className);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n makeCssClassName(...classNames: string[]): string {\r\n const result = this.makeCssClassNames(...classNames).join(\" \");\r\n\r\n return result ? result : \"\";\r\n }\r\n\r\n get fontFamily(): string | undefined {\r\n return this._legacyFontType.fontFamily;\r\n }\r\n\r\n set fontFamily(value: string | undefined) {\r\n this._legacyFontType.fontFamily = value;\r\n }\r\n\r\n get fontSizes(): IFontSizeDefinitions {\r\n return this._legacyFontType.fontSizes;\r\n }\r\n\r\n get fontWeights(): IFontWeightDefinitions {\r\n return this._legacyFontType.fontWeights;\r\n }\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const defaultHostConfig: HostConfig = new HostConfig({\r\n supportsInteractivity: true,\r\n spacing: {\r\n small: 10,\r\n default: 20,\r\n medium: 30,\r\n large: 40,\r\n extraLarge: 50,\r\n padding: 20\r\n },\r\n separator: {\r\n lineThickness: 1,\r\n lineColor: \"#EEEEEE\"\r\n },\r\n fontTypes: {\r\n default: {\r\n fontFamily: \"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n },\r\n monospace: {\r\n fontFamily: \"'Courier New', Courier, monospace\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n }\r\n },\r\n imageSizes: {\r\n small: 40,\r\n medium: 80,\r\n large: 160\r\n },\r\n containerStyles: {\r\n default: {\r\n backgroundColor: \"#FFFFFF\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n emphasis: {\r\n backgroundColor: \"#08000000\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n accent: {\r\n backgroundColor: \"#C7DEF9\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n good: {\r\n backgroundColor: \"#CCFFCC\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n attention: {\r\n backgroundColor: \"#FFC5B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n warning: {\r\n backgroundColor: \"#FFE2B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n }\r\n },\r\n inputs: {\r\n label: {\r\n requiredInputs: {\r\n weight: Enums.TextWeight.Bolder,\r\n suffix: \" *\",\r\n suffixColor: Enums.TextColor.Attention\r\n },\r\n optionalInputs: {\r\n weight: Enums.TextWeight.Bolder\r\n }\r\n },\r\n errorMessage: {\r\n color: Enums.TextColor.Attention,\r\n weight: Enums.TextWeight.Bolder\r\n }\r\n },\r\n actions: {\r\n maxActions: 5,\r\n spacing: Enums.Spacing.Default,\r\n buttonSpacing: 10,\r\n showCard: {\r\n actionMode: Enums.ShowCardActionMode.Inline,\r\n inlineTopMargin: 16\r\n },\r\n actionsOrientation: Enums.Orientation.Horizontal,\r\n actionAlignment: Enums.ActionAlignment.Left\r\n },\r\n adaptiveCard: {\r\n allowCustomStyle: false\r\n },\r\n imageSet: {\r\n imageSize: Enums.Size.Medium,\r\n maxImageHeight: 100\r\n },\r\n factSet: {\r\n title: {\r\n color: Enums.TextColor.Default,\r\n size: Enums.TextSize.Default,\r\n isSubtle: false,\r\n weight: Enums.TextWeight.Bolder,\r\n wrap: true,\r\n maxWidth: 150\r\n },\r\n value: {\r\n color: Enums.TextColor.Default,\r\n size: Enums.TextSize.Default,\r\n isSubtle: false,\r\n weight: Enums.TextWeight.Default,\r\n wrap: true\r\n },\r\n spacing: 10\r\n }\r\n});\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { CardElement, Action } from \"./card-elements\";\r\nimport { SerializableObject, Version, Versions } from \"./serialization\";\r\n\r\n/**\r\n * Describes whether a certain element can be parsed in a \"singleton\" context.\r\n * Specifically, is the element allowed to exist as an object in a context where the\r\n * parent expects an Array of elements (e.g. `AdaptiveCard.body`)\r\n *\r\n * @example - Singleton element in a container (note `items` contains an `object` rather than an `Array`)\r\n * ```json\r\n * {\r\n * \"type\": \"Container\",\r\n * \"items\": {\r\n * \"type\": \"AllowedSingletonElement\"\r\n * }\r\n * }\r\n * ```\r\n */\r\nexport enum ElementSingletonBehavior {\r\n /** Element only valid in a singleton context. */\r\n Only,\r\n /** Element is allowed in a singleton context, but not required to be a singleton. */\r\n Allowed,\r\n /** Element is not allowed to exist in a singleton context. */\r\n NotAllowed\r\n}\r\n\r\nexport interface ITypeRegistration {\r\n typeName: string;\r\n objectType: { new (): T };\r\n schemaVersion: Version;\r\n singletonBehavior: ElementSingletonBehavior;\r\n}\r\n\r\nexport class CardObjectRegistry {\r\n private _items: { [typeName: string]: ITypeRegistration } = {};\r\n\r\n findByName(typeName: string): ITypeRegistration | undefined {\r\n return this._items.hasOwnProperty(typeName) ? this._items[typeName] : undefined;\r\n }\r\n\r\n clear() {\r\n this._items = {};\r\n }\r\n\r\n copyTo(target: CardObjectRegistry) {\r\n const keys = Object.keys(this._items);\r\n\r\n for (const key of keys) {\r\n const typeRegistration = this._items[key];\r\n\r\n target.register(\r\n typeRegistration.typeName,\r\n typeRegistration.objectType,\r\n typeRegistration.schemaVersion,\r\n typeRegistration.singletonBehavior\r\n );\r\n }\r\n }\r\n\r\n register(\r\n typeName: string,\r\n objectType: { new (): T },\r\n schemaVersion: Version = Versions.v1_0,\r\n singletonBehavior: ElementSingletonBehavior = ElementSingletonBehavior.NotAllowed\r\n ) {\r\n let registrationInfo = this.findByName(typeName);\r\n\r\n if (registrationInfo !== undefined) {\r\n registrationInfo.objectType = objectType;\r\n } else {\r\n registrationInfo = {\r\n typeName: typeName,\r\n objectType: objectType,\r\n schemaVersion: schemaVersion,\r\n singletonBehavior: singletonBehavior\r\n };\r\n }\r\n\r\n this._items[typeName] = registrationInfo;\r\n }\r\n\r\n unregister(typeName: string) {\r\n delete this._items[typeName];\r\n }\r\n\r\n createInstance(typeName: string, targetVersion: Version): T | undefined {\r\n const registrationInfo = this.findByName(typeName);\r\n\r\n return registrationInfo && registrationInfo.schemaVersion.compareTo(targetVersion) <= 0\r\n ? new registrationInfo.objectType()\r\n : undefined;\r\n }\r\n\r\n getItemCount(): number {\r\n return Object.keys(this._items).length;\r\n }\r\n\r\n getItemAt(index: number): ITypeRegistration {\r\n return Object.keys(this._items).map((e) => this._items[e])[index];\r\n }\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class GlobalRegistry {\r\n private static _elements?: CardObjectRegistry;\r\n private static _actions?: CardObjectRegistry;\r\n\r\n static populateWithDefaultElements(registry: CardObjectRegistry) {\r\n registry.clear();\r\n\r\n GlobalRegistry.defaultElements.copyTo(registry);\r\n }\r\n\r\n static populateWithDefaultActions(registry: CardObjectRegistry) {\r\n registry.clear();\r\n\r\n GlobalRegistry.defaultActions.copyTo(registry);\r\n }\r\n\r\n static readonly defaultElements = new CardObjectRegistry();\r\n static readonly defaultActions = new CardObjectRegistry();\r\n static get elements(): CardObjectRegistry {\r\n if (!GlobalRegistry._elements) {\r\n GlobalRegistry._elements = new CardObjectRegistry();\r\n GlobalRegistry.populateWithDefaultElements(GlobalRegistry._elements);\r\n }\r\n\r\n return GlobalRegistry._elements;\r\n }\r\n\r\n static get actions(): CardObjectRegistry {\r\n if (!GlobalRegistry._actions) {\r\n GlobalRegistry._actions = new CardObjectRegistry();\r\n GlobalRegistry.populateWithDefaultActions(GlobalRegistry._actions);\r\n }\r\n\r\n return GlobalRegistry._actions;\r\n }\r\n\r\n static reset() {\r\n GlobalRegistry._elements = undefined;\r\n GlobalRegistry._actions = undefined;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport { Strings } from \"./strings\";\r\nimport { Dictionary, GlobalSettings } from \"./shared\";\r\nimport { HostConfig } from \"./host-config\";\r\nimport { HostCapabilities } from \"./host-capabilities\";\r\nimport {\r\n Versions,\r\n property,\r\n SerializableObject,\r\n StringProperty,\r\n SerializableObjectProperty,\r\n IValidationEvent,\r\n PropertyDefinition\r\n} from \"./serialization\";\r\n\r\nexport class ValidationResults {\r\n readonly allIds: Dictionary = {};\r\n readonly validationEvents: IValidationEvent[] = [];\r\n\r\n addFailure(cardObject: CardObject, event: Enums.ValidationEvent, message: string) {\r\n this.validationEvents.push({\r\n phase: Enums.ValidationPhase.Validation,\r\n source: cardObject,\r\n event: event,\r\n message: message\r\n });\r\n }\r\n}\r\n\r\nexport type CardObjectType = { new (): CardObject };\r\n\r\nexport abstract class CardObject extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly typeNameProperty = new StringProperty(\r\n Versions.v1_0,\r\n \"type\",\r\n undefined,\r\n undefined,\r\n undefined,\r\n (sender: object) => {\r\n return (sender).getJsonTypeName();\r\n }\r\n );\r\n static readonly idProperty = new StringProperty(Versions.v1_0, \"id\");\r\n static readonly requiresProperty = new SerializableObjectProperty(\r\n Versions.v1_2,\r\n \"requires\",\r\n HostCapabilities,\r\n false,\r\n new HostCapabilities()\r\n );\r\n\r\n protected getSchemaKey(): string {\r\n return this.getJsonTypeName();\r\n }\r\n\r\n @property(CardObject.idProperty)\r\n id?: string;\r\n\r\n @property(CardObject.requiresProperty)\r\n get requires(): HostCapabilities {\r\n return this.getValue(CardObject.requiresProperty);\r\n }\r\n\r\n //#endregion\r\n\r\n private _shouldFallback: boolean = false;\r\n\r\n protected _parent?: CardObject;\r\n protected _renderedElement?: HTMLElement;\r\n\r\n /**\r\n * Checks if this CardObject contains the given DOM Node.\r\n * @param node The DOM Node to look for.\r\n * @returns `true` if the DOM Node was found, `false` otherwise.\r\n */\r\n protected contains(node: Node): boolean {\r\n if (this._renderedElement) {\r\n return this._renderedElement.contains(node);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n onPreProcessPropertyValue?: (\r\n sender: CardObject,\r\n property: PropertyDefinition,\r\n value: any\r\n ) => any;\r\n\r\n abstract getJsonTypeName(): string;\r\n\r\n abstract get hostConfig(): HostConfig;\r\n\r\n preProcessPropertyValue(prop: PropertyDefinition, propertyValue?: any): any {\r\n const value = propertyValue === undefined ? this.getValue(prop) : propertyValue;\r\n\r\n if (GlobalSettings.allowPreProcessingPropertyValues) {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n let currentObject: CardObject | undefined = this;\r\n\r\n while (currentObject && !currentObject.onPreProcessPropertyValue) {\r\n currentObject = currentObject.parent;\r\n }\r\n\r\n if (currentObject && currentObject.onPreProcessPropertyValue) {\r\n return currentObject.onPreProcessPropertyValue(this, prop, value);\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n setParent(value: CardObject | undefined) {\r\n this._parent = value;\r\n }\r\n\r\n setShouldFallback(value: boolean) {\r\n this._shouldFallback = value;\r\n }\r\n\r\n shouldFallback(): boolean {\r\n return this._shouldFallback || !this.requires.areAllMet(this.hostConfig.hostCapabilities);\r\n }\r\n\r\n getRootObject(): CardObject {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n let currentObject: CardObject = this;\r\n\r\n while (currentObject.parent) {\r\n currentObject = currentObject.parent;\r\n }\r\n\r\n return currentObject;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n if (this.id) {\r\n if (context.allIds.hasOwnProperty(this.id)) {\r\n if (context.allIds[this.id] === 1) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.DuplicateId,\r\n Strings.errors.duplicateId(this.id)\r\n );\r\n }\r\n\r\n context.allIds[this.id] += 1;\r\n } else {\r\n context.allIds[this.id] = 1;\r\n }\r\n }\r\n }\r\n\r\n validateProperties(): ValidationResults {\r\n const result = new ValidationResults();\r\n\r\n this.internalValidateProperties(result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Recursively searches this CardObject and any children to find the\r\n * innermost CardObject that owns the given DOM Node.\r\n *\r\n * @param node The DOM Node to look for.\r\n *\r\n * @returns The owner of the given DOM Node, or `undefined` if no owner was found.\r\n */\r\n findDOMNodeOwner(node: Node): CardObject | undefined {\r\n // default implementation for CardObjects with no associated children\r\n return this.contains(node) ? this : undefined;\r\n }\r\n\r\n releaseDOMResources() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n get parent(): CardObject | undefined {\r\n return this._parent;\r\n }\r\n\r\n get renderedElement(): HTMLElement | undefined {\r\n return this._renderedElement;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nabstract class AbstractTextFormatter {\r\n private _regularExpression: RegExp;\r\n\r\n protected abstract internalFormat(lang: string | undefined, matches: RegExpExecArray): string;\r\n\r\n constructor(regularExpression: RegExp) {\r\n this._regularExpression = regularExpression;\r\n }\r\n\r\n format(lang: string | undefined, input: string | undefined): string | undefined {\r\n let matches;\r\n\r\n if (input) {\r\n let result = input;\r\n\r\n while ((matches = this._regularExpression.exec(input)) != null) {\r\n result = result.replace(matches[0], this.internalFormat(lang, matches));\r\n }\r\n\r\n return result;\r\n } else {\r\n return input;\r\n }\r\n }\r\n}\r\n\r\nclass DateFormatter extends AbstractTextFormatter {\r\n protected internalFormat(lang: string | undefined, matches: RegExpExecArray): string {\r\n const date = new Date(Date.parse(matches[1]));\r\n const format = matches[2] !== undefined ? matches[2].toLowerCase() : \"compact\";\r\n\r\n if (format !== \"compact\") {\r\n return date.toLocaleDateString(lang, {\r\n day: \"numeric\",\r\n weekday: format,\r\n month: format,\r\n year: \"numeric\"\r\n } as Intl.DateTimeFormatOptions);\r\n } else {\r\n return date.toLocaleDateString();\r\n }\r\n }\r\n}\r\n\r\nclass TimeFormatter extends AbstractTextFormatter {\r\n protected internalFormat(lang: string | undefined, matches: RegExpExecArray): string {\r\n const date = new Date(Date.parse(matches[1]));\r\n\r\n return date.toLocaleTimeString(lang, { hour: \"numeric\", minute: \"2-digit\" });\r\n }\r\n}\r\n\r\nexport function formatText(lang: string | undefined, text: string | undefined): string | undefined {\r\n const formatters: AbstractTextFormatter[] = [\r\n new DateFormatter(\r\n /\\{{2}DATE\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))(?:, ?(COMPACT|LONG|SHORT))?\\)\\}{2}/g\r\n ),\r\n new TimeFormatter(\r\n /\\{{2}TIME\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))\\)\\}{2}/g\r\n )\r\n ];\r\n\r\n let result = text;\r\n\r\n for (const formatter of formatters) {\r\n result = formatter.format(lang, result);\r\n }\r\n\r\n return result;\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class Constants {\r\n static readonly keys = {\r\n tab: \"Tab\",\r\n enter: \"Enter\",\r\n escape: \"Escape\",\r\n space: \" \",\r\n up: \"ArrowUp\",\r\n down: \"ArrowDown\",\r\n delete: \"Delete\"\r\n } as const;\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { defaultHostConfig, HostConfig } from \"../host-config\";\r\nimport { Constants } from \"./constants\";\r\n\r\nexport class MenuItem {\r\n private _hostConfig?: HostConfig;\r\n private _element: HTMLElement;\r\n private _value: string;\r\n private _isEnabled: boolean = true;\r\n\r\n private click() {\r\n if (this.isEnabled && this.onClick) {\r\n this.onClick(this);\r\n }\r\n }\r\n\r\n private updateCssClasses() {\r\n if (this._element) {\r\n const effectiveHostConfig = this._hostConfig ? this._hostConfig : defaultHostConfig;\r\n\r\n this._element.className = effectiveHostConfig.makeCssClassName(\"ac-ctrl\");\r\n this._element.classList.add(\r\n effectiveHostConfig.makeCssClassName(\r\n this.isEnabled ? \"ac-ctrl-dropdown-item\" : \"ac-ctrl-dropdown-item-disabled\"\r\n )\r\n );\r\n\r\n if (!this.isEnabled) {\r\n this._element.classList.add(effectiveHostConfig.makeCssClassName(\"ac-disabled\"));\r\n }\r\n }\r\n }\r\n\r\n readonly key: string;\r\n\r\n onClick?: (item: MenuItem) => void;\r\n\r\n constructor(key: string, value: string) {\r\n this.key = key;\r\n this._value = value;\r\n }\r\n\r\n toString(): string {\r\n return this.value;\r\n }\r\n\r\n render(hostConfig?: HostConfig): HTMLElement {\r\n this._hostConfig = hostConfig;\r\n\r\n if (!this._element) {\r\n this._element = document.createElement(\"span\");\r\n this._element.innerText = this.value;\r\n this._element.setAttribute(\"role\", \"menuitem\");\r\n\r\n if (!this.isEnabled) {\r\n this._element.setAttribute(\"aria-disabled\", \"true\");\r\n }\r\n\r\n this._element.setAttribute(\"aria-current\", \"false\");\r\n this._element.onmouseup = (_e) => {\r\n this.click();\r\n };\r\n this._element.onkeydown = (e) => {\r\n if (e.key === Constants.keys.enter) {\r\n e.cancelBubble = true;\r\n\r\n this.click();\r\n }\r\n };\r\n\r\n this.updateCssClasses();\r\n }\r\n\r\n return this._element;\r\n }\r\n\r\n get value(): string {\r\n return this._value;\r\n }\r\n\r\n set value(newValue: string) {\r\n this._value = newValue;\r\n\r\n if (this._element) {\r\n this._element.innerText = newValue;\r\n }\r\n }\r\n\r\n get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n\r\n set isEnabled(value: boolean) {\r\n if (this._isEnabled !== value) {\r\n this._isEnabled = value;\r\n\r\n this.updateCssClasses();\r\n }\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport class Collection {\r\n private _items: Array = [];\r\n\r\n onItemAdded: (item: TItem) => void;\r\n onItemRemoved: (item: TItem) => void;\r\n\r\n get(index: number): TItem {\r\n return this._items[index];\r\n }\r\n\r\n add(item: TItem) {\r\n this._items.push(item);\r\n\r\n if (this.onItemAdded) {\r\n this.onItemAdded(item);\r\n }\r\n }\r\n\r\n remove(item: TItem) {\r\n const i = this._items.indexOf(item);\r\n\r\n if (i >= 0) {\r\n this._items = this._items.splice(i, 1);\r\n\r\n if (this.onItemRemoved) {\r\n this.onItemRemoved(item);\r\n }\r\n }\r\n }\r\n\r\n indexOf(item: TItem): number {\r\n return this._items.indexOf(item);\r\n }\r\n\r\n get length(): number {\r\n return this._items.length;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Constants } from \"./constants\";\r\nimport * as Utils from \"../utils\";\r\nimport { defaultHostConfig, HostConfig } from \"../host-config\";\r\n\r\nexport abstract class PopupControl {\r\n private _isOpen: boolean = false;\r\n private _overlayElement: HTMLElement;\r\n private _popupElement: HTMLElement;\r\n private _hostConfig?: HostConfig;\r\n\r\n protected abstract renderContent(): HTMLElement;\r\n\r\n onClose: (popupControl: PopupControl, wasCancelled: boolean) => void;\r\n\r\n keyDown(e: KeyboardEvent) {\r\n switch (e.key) {\r\n case Constants.keys.escape:\r\n this.closePopup(true);\r\n\r\n break;\r\n }\r\n }\r\n\r\n render(_rootElementBounds: ClientRect): HTMLElement {\r\n const element = document.createElement(\"div\");\r\n element.tabIndex = 0;\r\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl\", \"ac-ctrl-popup-container\");\r\n element.setAttribute(\"role\", \"dialog\");\r\n element.setAttribute(\"aria-modal\", \"true\");\r\n element.onkeydown = (e) => {\r\n this.keyDown(e);\r\n\r\n return !e.cancelBubble;\r\n };\r\n\r\n element.appendChild(this.renderContent());\r\n\r\n return element;\r\n }\r\n\r\n focus() {\r\n if (this._popupElement) {\r\n (this._popupElement.firstElementChild).focus();\r\n }\r\n }\r\n\r\n popup(rootElement: HTMLElement) {\r\n if (!this._isOpen) {\r\n this._overlayElement = document.createElement(\"div\");\r\n this._overlayElement.className = this.hostConfig.makeCssClassName(\"ac-ctrl-overlay\");\r\n this._overlayElement.tabIndex = 0;\r\n this._overlayElement.style.width = document.documentElement.scrollWidth + \"px\";\r\n this._overlayElement.style.height = document.documentElement.scrollHeight + \"px\";\r\n this._overlayElement.onfocus = (_e) => {\r\n this.closePopup(true);\r\n };\r\n\r\n document.body.appendChild(this._overlayElement);\r\n\r\n const rootElementBounds = rootElement.getBoundingClientRect();\r\n\r\n this._popupElement = this.render(rootElementBounds);\r\n this._popupElement.classList.remove(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideLeftToRight\",\r\n \"ac-ctrl-slideRightToLeft\",\r\n \"ac-ctrl-slideTopToBottom\",\r\n \"ac-ctrl-slideRightToLeft\"\r\n )\r\n );\r\n\r\n window.addEventListener(\"resize\", (_e) => {\r\n this.closePopup(true);\r\n });\r\n\r\n const rootElementLabel = rootElement.getAttribute(\"aria-label\");\r\n if (rootElementLabel) {\r\n this._popupElement.setAttribute(\"aria-label\", rootElementLabel);\r\n }\r\n\r\n this._overlayElement.appendChild(this._popupElement);\r\n\r\n const popupElementBounds = this._popupElement.getBoundingClientRect();\r\n\r\n const availableSpaceBelow = window.innerHeight - rootElementBounds.bottom;\r\n const availableSpaceAbove = rootElementBounds.top;\r\n const availableSpaceRight = window.innerWidth - rootElementBounds.right;\r\n const availableSpaceLeft = rootElementBounds.left;\r\n\r\n let left = rootElementBounds.left + Utils.getScrollX();\r\n let top;\r\n\r\n if (\r\n availableSpaceAbove < popupElementBounds.height &&\r\n availableSpaceBelow < popupElementBounds.height\r\n ) {\r\n // Not enough space above or below root element\r\n const actualPopupHeight = Math.min(popupElementBounds.height, window.innerHeight);\r\n\r\n this._popupElement.style.maxHeight = actualPopupHeight + \"px\";\r\n\r\n if (actualPopupHeight < popupElementBounds.height) {\r\n top = Utils.getScrollY();\r\n } else {\r\n top =\r\n Utils.getScrollY() +\r\n rootElementBounds.top +\r\n (rootElementBounds.height - actualPopupHeight) / 2;\r\n }\r\n\r\n if (\r\n availableSpaceLeft < popupElementBounds.width &&\r\n availableSpaceRight < popupElementBounds.width\r\n ) {\r\n // Not enough space left or right of root element\r\n const actualPopupWidth = Math.min(popupElementBounds.width, window.innerWidth);\r\n\r\n this._popupElement.style.maxWidth = actualPopupWidth + \"px\";\r\n\r\n if (actualPopupWidth < popupElementBounds.width) {\r\n left = Utils.getScrollX();\r\n } else {\r\n left =\r\n Utils.getScrollX() +\r\n rootElementBounds.left +\r\n (rootElementBounds.width - actualPopupWidth) / 2;\r\n }\r\n } else {\r\n // Enough space on the left or right of the root element\r\n if (availableSpaceRight >= popupElementBounds.width) {\r\n left = Utils.getScrollX() + rootElementBounds.right;\r\n\r\n this._popupElement.classList.add(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideLeftToRight\"\r\n )\r\n );\r\n } else {\r\n left =\r\n Utils.getScrollX() + rootElementBounds.left - popupElementBounds.width;\r\n\r\n this._popupElement.classList.add(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideRightToLeft\"\r\n )\r\n );\r\n }\r\n }\r\n } else {\r\n // Enough space above or below root element\r\n if (availableSpaceBelow >= popupElementBounds.height) {\r\n top = Utils.getScrollY() + rootElementBounds.bottom;\r\n\r\n this._popupElement.classList.add(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideTopToBottom\"\r\n )\r\n );\r\n } else {\r\n top = Utils.getScrollY() + rootElementBounds.top - popupElementBounds.height;\r\n\r\n this._popupElement.classList.add(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideBottomToTop\"\r\n )\r\n );\r\n }\r\n\r\n if (availableSpaceRight < popupElementBounds.width) {\r\n left = Utils.getScrollX() + rootElementBounds.right - popupElementBounds.width;\r\n }\r\n }\r\n\r\n this._popupElement.style.left = left + \"px\";\r\n this._popupElement.style.top = top + \"px\";\r\n\r\n this._popupElement.focus();\r\n\r\n this._isOpen = true;\r\n }\r\n }\r\n\r\n closePopup(wasCancelled: boolean) {\r\n if (this._isOpen) {\r\n document.body.removeChild(this._overlayElement);\r\n\r\n this._isOpen = false;\r\n\r\n if (this.onClose) {\r\n this.onClose(this, wasCancelled);\r\n }\r\n }\r\n }\r\n\r\n get hostConfig(): HostConfig {\r\n return this._hostConfig ? this._hostConfig : defaultHostConfig;\r\n }\r\n\r\n set hostConfig(value: HostConfig) {\r\n this._hostConfig = value;\r\n }\r\n\r\n get isOpen(): boolean {\r\n return this._isOpen;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Constants } from \"./constants\";\r\nimport { Collection } from \"./collection\";\r\nimport { PopupControl } from \"./popup-control\";\r\nimport { MenuItem } from \"./menu-item\";\r\n\r\nexport class PopupMenu extends PopupControl {\r\n private _items: Collection = new Collection();\r\n private _renderedItems: Array = [];\r\n private _selectedIndex: number = -1;\r\n\r\n protected renderContent(): HTMLElement {\r\n const element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl ac-popup\");\r\n element.setAttribute(\"role\", \"listbox\");\r\n\r\n for (let i = 0; i < this._items.length; i++) {\r\n const renderedItem = this._items.get(i).render(this.hostConfig);\r\n renderedItem.tabIndex = 0;\r\n\r\n element.appendChild(renderedItem);\r\n\r\n if (i === this.selectedIndex) {\r\n renderedItem.focus();\r\n }\r\n\r\n this._renderedItems.push(renderedItem);\r\n }\r\n\r\n return element;\r\n }\r\n\r\n keyDown(e: KeyboardEvent) {\r\n super.keyDown(e);\r\n\r\n let selectedItemIndex = this._selectedIndex;\r\n\r\n switch (e.key) {\r\n case Constants.keys.tab:\r\n this.closePopup(true);\r\n\r\n break;\r\n /*\r\n case Constants.keys.enter:\r\n if (this.selectedIndex >= 0) {\r\n this.selectedIndex = this.selectedIndex;\r\n\r\n this.close();\r\n }\r\n\r\n break;\r\n */\r\n case Constants.keys.up:\r\n if (selectedItemIndex <= 0) {\r\n selectedItemIndex = this._renderedItems.length - 1;\r\n } else {\r\n selectedItemIndex--;\r\n\r\n if (selectedItemIndex < 0) {\r\n selectedItemIndex = this._renderedItems.length - 1;\r\n }\r\n }\r\n\r\n this.selectedIndex = selectedItemIndex;\r\n\r\n e.cancelBubble = true;\r\n\r\n break;\r\n case Constants.keys.down:\r\n if (selectedItemIndex < 0) {\r\n selectedItemIndex = 0;\r\n } else {\r\n selectedItemIndex++;\r\n\r\n if (selectedItemIndex >= this._renderedItems.length) {\r\n selectedItemIndex = 0;\r\n }\r\n }\r\n\r\n this.selectedIndex = selectedItemIndex;\r\n\r\n e.cancelBubble = true;\r\n\r\n break;\r\n }\r\n }\r\n\r\n get items(): Collection {\r\n return this._items;\r\n }\r\n\r\n get selectedIndex(): number {\r\n return this._selectedIndex;\r\n }\r\n\r\n set selectedIndex(index: number) {\r\n if (index >= 0 && index < this._renderedItems.length) {\r\n this._renderedItems[index].focus();\r\n\r\n this._selectedIndex = index;\r\n }\r\n }\r\n}\r\n", "// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport * from \"./menu-item\";\r\nexport * from \"./popup-menu\";\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport {\r\n PaddingDefinition,\r\n GlobalSettings,\r\n SizeAndUnit,\r\n SpacingDefinition,\r\n ISeparationDefinition,\r\n Dictionary,\r\n StringWithSubstitutions,\r\n ContentTypes,\r\n IInput,\r\n IResourceInformation\r\n} from \"./shared\";\r\nimport * as Utils from \"./utils\";\r\nimport {\r\n HostConfig,\r\n defaultHostConfig,\r\n BaseTextDefinition,\r\n FontTypeDefinition,\r\n ColorSetDefinition,\r\n TextColorDefinition,\r\n ContainerStyleDefinition,\r\n TextStyleDefinition\r\n} from \"./host-config\";\r\nimport * as TextFormatters from \"./text-formatters\";\r\nimport { CardObject, ValidationResults } from \"./card-object\";\r\nimport {\r\n Versions,\r\n Version,\r\n property,\r\n BaseSerializationContext,\r\n SerializableObject,\r\n SerializableObjectSchema,\r\n StringProperty,\r\n BoolProperty,\r\n ValueSetProperty,\r\n EnumProperty,\r\n SerializableObjectCollectionProperty,\r\n SerializableObjectProperty,\r\n PixelSizeProperty,\r\n NumProperty,\r\n PropertyBag,\r\n CustomProperty,\r\n PropertyDefinition,\r\n StringArrayProperty\r\n} from \"./serialization\";\r\nimport { CardObjectRegistry, GlobalRegistry, ElementSingletonBehavior } from \"./registry\";\r\nimport { Strings } from \"./strings\";\r\nimport { MenuItem, PopupMenu } from \"./controls\";\r\n\r\n\r\nfunction clearElement(element: HTMLElement) : void {\r\n const trustedHtml = (typeof window === 'undefined') ? \"\" : (window.trustedTypes?.emptyHTML ?? \"\");\r\n element.innerHTML = trustedHtml as string;\r\n}\r\n\r\nexport function renderSeparation(\r\n hostConfig: HostConfig,\r\n separationDefinition: ISeparationDefinition,\r\n orientation: Enums.Orientation\r\n): HTMLElement | undefined {\r\n if (\r\n separationDefinition.spacing > 0 ||\r\n (separationDefinition.lineThickness && separationDefinition.lineThickness > 0)\r\n ) {\r\n const separator = document.createElement(\"div\");\r\n separator.className = hostConfig.makeCssClassName(\r\n \"ac-\" +\r\n (orientation === Enums.Orientation.Horizontal ? \"horizontal\" : \"vertical\") +\r\n \"-separator\"\r\n );\r\n separator.setAttribute(\"aria-hidden\", \"true\");\r\n\r\n const color = separationDefinition.lineColor\r\n ? Utils.stringToCssColor(separationDefinition.lineColor)\r\n : \"\";\r\n\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n if (separationDefinition.lineThickness) {\r\n separator.style.paddingTop = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.marginBottom = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.borderBottom =\r\n separationDefinition.lineThickness + \"px solid \" + color;\r\n } else {\r\n separator.style.height = separationDefinition.spacing + \"px\";\r\n }\r\n } else {\r\n if (separationDefinition.lineThickness) {\r\n separator.style.paddingLeft = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.marginRight = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.borderRight =\r\n separationDefinition.lineThickness + \"px solid \" + color;\r\n } else {\r\n separator.style.width = separationDefinition.spacing + \"px\";\r\n }\r\n }\r\n\r\n separator.style.overflow = \"hidden\";\r\n separator.style.flex = \"0 0 auto\";\r\n\r\n return separator;\r\n } else {\r\n return undefined;\r\n }\r\n}\r\n\r\nexport type CardElementHeight = \"auto\" | \"stretch\";\r\n\r\nexport abstract class CardElement extends CardObject {\r\n //#region Schema\r\n\r\n static readonly langProperty = new StringProperty(\r\n Versions.v1_1,\r\n \"lang\",\r\n true,\r\n /^[a-z]{2,3}$/gi\r\n );\r\n static readonly isVisibleProperty = new BoolProperty(Versions.v1_2, \"isVisible\", true);\r\n static readonly separatorProperty = new BoolProperty(Versions.v1_0, \"separator\", false);\r\n static readonly heightProperty = new ValueSetProperty(\r\n Versions.v1_1,\r\n \"height\",\r\n [{ value: \"auto\" }, { value: \"stretch\" }],\r\n \"auto\"\r\n );\r\n static readonly horizontalAlignmentProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"horizontalAlignment\",\r\n Enums.HorizontalAlignment\r\n );\r\n static readonly spacingProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"spacing\",\r\n Enums.Spacing,\r\n Enums.Spacing.Default\r\n );\r\n\r\n @property(CardElement.horizontalAlignmentProperty)\r\n horizontalAlignment?: Enums.HorizontalAlignment;\r\n\r\n @property(CardElement.spacingProperty)\r\n spacing: Enums.Spacing;\r\n\r\n @property(CardElement.separatorProperty)\r\n separator: boolean;\r\n\r\n @property(CardElement.heightProperty)\r\n height: CardElementHeight;\r\n\r\n @property(CardElement.langProperty)\r\n get lang(): string | undefined {\r\n const lang = this.getValue(CardElement.langProperty);\r\n\r\n if (lang) {\r\n return lang;\r\n } else {\r\n if (this.parent) {\r\n return this.parent.lang;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n set lang(value: string | undefined) {\r\n this.setValue(CardElement.langProperty, value);\r\n }\r\n\r\n @property(CardElement.isVisibleProperty)\r\n get isVisible(): boolean {\r\n return this.getValue(CardElement.isVisibleProperty);\r\n }\r\n\r\n set isVisible(value: boolean) {\r\n // If the element is going to be hidden, reset any changes that were due\r\n // to overflow truncation (this ensures that if the element is later\r\n // un-hidden it has the right content)\r\n if (GlobalSettings.useAdvancedCardBottomTruncation && !value) {\r\n this.undoOverflowTruncation();\r\n }\r\n\r\n if (this.isVisible !== value) {\r\n this.setValue(CardElement.isVisibleProperty, value);\r\n\r\n this.updateRenderedElementVisibility();\r\n\r\n if (this._renderedElement) {\r\n raiseElementVisibilityChangedEvent(this);\r\n }\r\n }\r\n\r\n if (this._renderedElement) {\r\n this._renderedElement.setAttribute(\"aria-expanded\", value.toString());\r\n }\r\n }\r\n\r\n //#endregion\r\n\r\n private _hostConfig?: HostConfig;\r\n private _separatorElement?: HTMLElement;\r\n private _truncatedDueToOverflow: boolean = false;\r\n private _defaultRenderedElementDisplayMode?: string;\r\n private _padding?: PaddingDefinition;\r\n\r\n private internalRenderSeparator(): HTMLElement | undefined {\r\n const renderedSeparator = renderSeparation(\r\n this.hostConfig,\r\n {\r\n spacing: this.hostConfig.getEffectiveSpacing(this.spacing),\r\n lineThickness: this.separator ? this.hostConfig.separator.lineThickness : undefined,\r\n lineColor: this.separator ? this.hostConfig.separator.lineColor : undefined\r\n },\r\n this.separatorOrientation\r\n );\r\n\r\n if (\r\n GlobalSettings.alwaysBleedSeparators &&\r\n renderedSeparator &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal\r\n ) {\r\n // Adjust separator's margins if the option to always bleed separators is turned on\r\n const parentContainer = this.getParentContainer();\r\n\r\n if (parentContainer && parentContainer.getEffectivePadding()) {\r\n const parentPhysicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(\r\n parentContainer.getEffectivePadding()\r\n );\r\n\r\n renderedSeparator.style.marginLeft = \"-\" + parentPhysicalPadding.left + \"px\";\r\n renderedSeparator.style.marginRight = \"-\" + parentPhysicalPadding.right + \"px\";\r\n }\r\n }\r\n\r\n return renderedSeparator;\r\n }\r\n\r\n private updateRenderedElementVisibility() {\r\n const displayMode =\r\n this.isDesignMode() || this.isVisible\r\n ? this._defaultRenderedElementDisplayMode\r\n : \"none\";\r\n\r\n if (this._renderedElement) {\r\n if (displayMode) {\r\n this._renderedElement.style.display = displayMode;\r\n } else {\r\n this._renderedElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n\r\n if (this._separatorElement) {\r\n if (this.parent && this.parent.isFirstElement(this)) {\r\n this._separatorElement.style.display = \"none\";\r\n } else {\r\n if (displayMode) {\r\n this._separatorElement.style.display = displayMode;\r\n } else {\r\n this._separatorElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n private hideElementDueToOverflow() {\r\n if (this._renderedElement && this.isVisible) {\r\n this._renderedElement.style.visibility = \"hidden\";\r\n\r\n this.isVisible = false;\r\n raiseElementVisibilityChangedEvent(this, false);\r\n }\r\n }\r\n\r\n private showElementHiddenDueToOverflow() {\r\n if (this._renderedElement && !this.isVisible) {\r\n this._renderedElement.style.removeProperty(\"visibility\");\r\n\r\n this.isVisible = true;\r\n raiseElementVisibilityChangedEvent(this, false);\r\n }\r\n }\r\n\r\n // Marked private to emulate internal access\r\n private handleOverflow(maxHeight: number) {\r\n if (this.isVisible || this.isHiddenDueToOverflow()) {\r\n const handled = this.truncateOverflow(maxHeight);\r\n\r\n // Even if we were unable to truncate the element to fit this time,\r\n // it still could have been previously truncated\r\n this._truncatedDueToOverflow = handled || this._truncatedDueToOverflow;\r\n\r\n if (!handled) {\r\n this.hideElementDueToOverflow();\r\n } else if (handled && !this.isVisible) {\r\n this.showElementHiddenDueToOverflow();\r\n }\r\n }\r\n }\r\n\r\n // Marked private to emulate internal access\r\n private resetOverflow(): boolean {\r\n let sizeChanged = false;\r\n\r\n if (this._truncatedDueToOverflow) {\r\n this.undoOverflowTruncation();\r\n this._truncatedDueToOverflow = false;\r\n sizeChanged = true;\r\n }\r\n\r\n if (this.isHiddenDueToOverflow()) {\r\n this.showElementHiddenDueToOverflow();\r\n }\r\n\r\n return sizeChanged;\r\n }\r\n\r\n protected getDefaultSerializationContext(): BaseSerializationContext {\r\n return new SerializationContext();\r\n }\r\n\r\n protected createPlaceholderElement(): HTMLElement {\r\n const styleDefinition = this.getEffectiveStyleDefinition();\r\n const foregroundCssColor = Utils.stringToCssColor(\r\n styleDefinition.foregroundColors.default.subtle\r\n );\r\n\r\n const element = document.createElement(\"div\");\r\n element.style.border = \"1px dashed \" + foregroundCssColor;\r\n element.style.padding = \"4px\";\r\n element.style.minHeight = \"32px\";\r\n element.style.fontSize = \"10px\";\r\n\r\n if (foregroundCssColor) {\r\n element.style.color = foregroundCssColor;\r\n }\r\n\r\n element.innerText = \"Empty \" + this.getJsonTypeName();\r\n\r\n return element;\r\n }\r\n\r\n protected adjustRenderedElementSize(renderedElement: HTMLElement) {\r\n if (this.height === \"auto\") {\r\n renderedElement.style.flex = \"0 0 auto\";\r\n } else {\r\n renderedElement.style.flex = \"1 1 auto\";\r\n }\r\n }\r\n\r\n protected isDisplayed(): boolean {\r\n return (\r\n this._renderedElement !== undefined &&\r\n this.isVisible &&\r\n this._renderedElement.offsetHeight > 0\r\n );\r\n }\r\n\r\n protected abstract internalRender(): HTMLElement | undefined;\r\n\r\n protected overrideInternalRender(): HTMLElement | undefined {\r\n return this.internalRender();\r\n }\r\n\r\n protected applyPadding() {\r\n if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n if (GlobalSettings.alwaysBleedSeparators && !this.isBleeding()) {\r\n const padding = new PaddingDefinition();\r\n\r\n this.getImmediateSurroundingPadding(padding);\r\n\r\n const physicalPadding =\r\n this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n\r\n this.separatorElement.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\r\n this.separatorElement.style.marginRight = \"-\" + physicalPadding.right + \"px\";\r\n } else {\r\n this.separatorElement.style.marginRight = \"0\";\r\n this.separatorElement.style.marginLeft = \"0\";\r\n }\r\n }\r\n }\r\n\r\n /*\r\n * Called when this element overflows the bottom of the card.\r\n * maxHeight will be the amount of space still available on the card (0 if\r\n * the element is fully off the card).\r\n */\r\n protected truncateOverflow(_maxHeight: number): boolean {\r\n // Child implementations should return true if the element handled\r\n // the truncation request such that its content fits within maxHeight,\r\n // false if the element should fall back to being hidden\r\n return false;\r\n }\r\n\r\n /*\r\n * This should reverse any changes performed in truncateOverflow().\r\n */\r\n protected undoOverflowTruncation() {\r\n return;\r\n }\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return new PaddingDefinition();\r\n }\r\n\r\n protected getHasBackground(ignoreBackgroundImages: boolean = false): boolean {\r\n return false;\r\n }\r\n\r\n protected getHasBorder(): boolean {\r\n return false;\r\n }\r\n\r\n protected getPadding(): PaddingDefinition | undefined {\r\n return this._padding;\r\n }\r\n\r\n protected setPadding(value: PaddingDefinition | undefined) {\r\n this._padding = value;\r\n }\r\n\r\n protected shouldSerialize(context: SerializationContext): boolean {\r\n return context.elementRegistry.findByName(this.getJsonTypeName()) !== undefined;\r\n }\r\n\r\n protected get useDefaultSizing(): boolean {\r\n return true;\r\n }\r\n\r\n protected get separatorOrientation(): Enums.Orientation {\r\n return Enums.Orientation.Horizontal;\r\n }\r\n\r\n protected get defaultStyle(): string {\r\n return Enums.ContainerStyle.Default;\r\n }\r\n\r\n customCssSelector?: string;\r\n\r\n parse(source: any, context?: SerializationContext) {\r\n super.parse(source, context ? context : new SerializationContext());\r\n }\r\n\r\n asString(): string | undefined {\r\n return \"\";\r\n }\r\n\r\n isBleeding(): boolean {\r\n return false;\r\n }\r\n\r\n getEffectiveStyle(): string {\r\n if (this.parent) {\r\n return this.parent.getEffectiveStyle();\r\n }\r\n\r\n return this.defaultStyle;\r\n }\r\n\r\n getEffectiveStyleDefinition(): ContainerStyleDefinition {\r\n return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle());\r\n }\r\n\r\n getEffectiveTextStyleDefinition(): TextStyleDefinition {\r\n if (this.parent) {\r\n return this.parent.getEffectiveTextStyleDefinition();\r\n }\r\n\r\n return this.hostConfig.textStyles.default;\r\n }\r\n\r\n getForbiddenActionTypes(): ActionType[] {\r\n return [];\r\n }\r\n\r\n getImmediateSurroundingPadding(\r\n result: PaddingDefinition,\r\n processTop: boolean = true,\r\n processRight: boolean = true,\r\n processBottom: boolean = true,\r\n processLeft: boolean = true\r\n ) {\r\n if (this.parent) {\r\n let doProcessTop = processTop && this.parent.isTopElement(this);\r\n let doProcessRight = processRight && this.parent.isRightMostElement(this);\r\n let doProcessBottom = processBottom && this.parent.isBottomElement(this);\r\n let doProcessLeft = processLeft && this.parent.isLeftMostElement(this);\r\n\r\n const effectivePadding = this.parent.getEffectivePadding();\r\n\r\n if (effectivePadding) {\r\n if (doProcessTop && effectivePadding.top !== Enums.Spacing.None) {\r\n result.top = effectivePadding.top;\r\n\r\n doProcessTop = false;\r\n }\r\n\r\n if (doProcessRight && effectivePadding.right !== Enums.Spacing.None) {\r\n result.right = effectivePadding.right;\r\n\r\n doProcessRight = false;\r\n }\r\n\r\n if (doProcessBottom && effectivePadding.bottom !== Enums.Spacing.None) {\r\n result.bottom = effectivePadding.bottom;\r\n\r\n doProcessBottom = false;\r\n }\r\n\r\n if (doProcessLeft && effectivePadding.left !== Enums.Spacing.None) {\r\n result.left = effectivePadding.left;\r\n\r\n doProcessLeft = false;\r\n }\r\n }\r\n\r\n if (doProcessTop || doProcessRight || doProcessBottom || doProcessLeft) {\r\n this.parent.getImmediateSurroundingPadding(\r\n result,\r\n doProcessTop,\r\n doProcessRight,\r\n doProcessBottom,\r\n doProcessLeft\r\n );\r\n }\r\n }\r\n }\r\n\r\n getActionCount(): number {\r\n return 0;\r\n }\r\n\r\n getActionAt(index: number): Action | undefined {\r\n throw new Error(Strings.errors.indexOutOfRange(index));\r\n }\r\n\r\n indexOfAction(action: Action): number {\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n if (this.getActionAt(i) === action) {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n remove(): boolean {\r\n if (this.parent && this.parent instanceof CardElementContainer) {\r\n return this.parent.removeItem(this);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n this._renderedElement = this.overrideInternalRender();\r\n this._separatorElement = this.internalRenderSeparator();\r\n\r\n if (this._renderedElement) {\r\n if (this.id) {\r\n this._renderedElement.id = this.id;\r\n }\r\n\r\n if (this.customCssSelector) {\r\n this._renderedElement.classList.add(this.customCssSelector);\r\n }\r\n\r\n this._renderedElement.style.boxSizing = \"border-box\";\r\n this._defaultRenderedElementDisplayMode = this._renderedElement.style.display\r\n ? this._renderedElement.style.display\r\n : undefined;\r\n\r\n this.adjustRenderedElementSize(this._renderedElement);\r\n this.updateLayout(false);\r\n } else if (this.isDesignMode()) {\r\n this._renderedElement = this.createPlaceholderElement();\r\n }\r\n\r\n this.getRootElement().updateActionsEnabledState();\r\n\r\n return this._renderedElement;\r\n }\r\n\r\n updateLayout(_processChildren: boolean = true) {\r\n this.updateRenderedElementVisibility();\r\n this.applyPadding();\r\n }\r\n\r\n updateActionsEnabledState() {\r\n const allActions = this.getRootElement().getAllActions();\r\n\r\n for (let action of allActions) {\r\n action.updateEnabledState();\r\n }\r\n }\r\n\r\n indexOf(_cardElement: CardElement): number {\r\n return -1;\r\n }\r\n\r\n isDesignMode(): boolean {\r\n const rootElement = this.getRootElement();\r\n\r\n return rootElement instanceof AdaptiveCard && rootElement.designMode;\r\n }\r\n\r\n isFirstElement(_element: CardElement): boolean {\r\n return true;\r\n }\r\n\r\n isLastElement(_element: CardElement): boolean {\r\n return true;\r\n }\r\n\r\n isAtTheVeryLeft(): boolean {\r\n return this.parent\r\n ? this.parent.isLeftMostElement(this) && this.parent.isAtTheVeryLeft()\r\n : true;\r\n }\r\n\r\n isAtTheVeryRight(): boolean {\r\n return this.parent\r\n ? this.parent.isRightMostElement(this) && this.parent.isAtTheVeryRight()\r\n : true;\r\n }\r\n\r\n isAtTheVeryTop(): boolean {\r\n return this.parent\r\n ? this.parent.isFirstElement(this) && this.parent.isAtTheVeryTop()\r\n : true;\r\n }\r\n\r\n isAtTheVeryBottom(): boolean {\r\n return this.parent\r\n ? this.parent.isLastElement(this) && this.parent.isAtTheVeryBottom()\r\n : true;\r\n }\r\n\r\n isBleedingAtTop(): boolean {\r\n return false;\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n return false;\r\n }\r\n\r\n isLeftMostElement(_element: CardElement): boolean {\r\n return true;\r\n }\r\n\r\n isRightMostElement(_element: CardElement): boolean {\r\n return true;\r\n }\r\n\r\n isTopElement(element: CardElement): boolean {\r\n return this.isFirstElement(element);\r\n }\r\n\r\n isBottomElement(element: CardElement): boolean {\r\n return this.isLastElement(element);\r\n }\r\n\r\n isHiddenDueToOverflow(): boolean {\r\n return (\r\n this._renderedElement !== undefined &&\r\n this._renderedElement.style.visibility === \"hidden\"\r\n );\r\n }\r\n\r\n getRootElement(): CardElement {\r\n return this.getRootObject() as CardElement;\r\n }\r\n\r\n getParentContainer(): Container | undefined {\r\n let currentElement = this.parent;\r\n\r\n while (currentElement) {\r\n if (currentElement instanceof Container) {\r\n return currentElement;\r\n }\r\n\r\n currentElement = currentElement.parent;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return [];\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result: Action[] = [];\r\n\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n let action = this.getActionAt(i);\r\n\r\n if (action) {\r\n result.push(action);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n return [];\r\n }\r\n\r\n getElementById(id: string): CardElement | undefined {\r\n return this.id === id ? this : undefined;\r\n }\r\n\r\n getActionById(_id: string): Action | undefined {\r\n return undefined;\r\n }\r\n\r\n getEffectivePadding(): PaddingDefinition {\r\n const padding = this.getPadding();\r\n\r\n return padding ? padding : this.getDefaultPadding();\r\n }\r\n\r\n getEffectiveHorizontalAlignment(): Enums.HorizontalAlignment {\r\n if (this.horizontalAlignment !== undefined) {\r\n return this.horizontalAlignment;\r\n }\r\n\r\n if (this.parent) {\r\n return this.parent.getEffectiveHorizontalAlignment();\r\n }\r\n\r\n return Enums.HorizontalAlignment.Left;\r\n }\r\n\r\n get hostConfig(): HostConfig {\r\n if (this._hostConfig) {\r\n return this._hostConfig;\r\n } else {\r\n if (this.parent) {\r\n return this.parent.hostConfig;\r\n } else {\r\n return defaultHostConfig;\r\n }\r\n }\r\n }\r\n\r\n set hostConfig(value: HostConfig) {\r\n this._hostConfig = value;\r\n }\r\n\r\n get index(): number {\r\n if (this.parent) {\r\n return this.parent.indexOf(this);\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n get isInteractive(): boolean {\r\n return false;\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return true;\r\n }\r\n\r\n get isInline(): boolean {\r\n return false;\r\n }\r\n\r\n get hasVisibleSeparator(): boolean {\r\n if (this.parent && this.separatorElement) {\r\n return !this.parent.isFirstElement(this) && (this.isVisible || this.isDesignMode());\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n get separatorElement(): HTMLElement | undefined {\r\n return this._separatorElement;\r\n }\r\n\r\n get parent(): CardElement | undefined {\r\n return this._parent;\r\n }\r\n\r\n getElementSingletonBehavior(): ElementSingletonBehavior {\r\n return ElementSingletonBehavior.NotAllowed;\r\n }\r\n}\r\n\r\nexport class ActionProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: SerializationContext\r\n ): Action | undefined {\r\n const parent = sender;\r\n\r\n return context.parseAction(\r\n parent,\r\n source[this.name],\r\n this.forbiddenActionTypes,\r\n parent.isDesignMode()\r\n );\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: Action | undefined,\r\n context: SerializationContext\r\n ) {\r\n context.serializeValue(\r\n target,\r\n this.name,\r\n value ? value.toJSON(context) : undefined,\r\n undefined,\r\n true\r\n );\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly forbiddenActionTypes: string[] = []\r\n ) {\r\n super(targetVersion, name, undefined);\r\n }\r\n}\r\n\r\nexport abstract class BaseTextBlock extends CardElement {\r\n //#region Schema\r\n\r\n static readonly textProperty = new StringProperty(Versions.v1_0, \"text\", true);\r\n static readonly sizeProperty = new EnumProperty(Versions.v1_0, \"size\", Enums.TextSize);\r\n static readonly weightProperty = new EnumProperty(Versions.v1_0, \"weight\", Enums.TextWeight);\r\n static readonly colorProperty = new EnumProperty(Versions.v1_0, \"color\", Enums.TextColor);\r\n static readonly isSubtleProperty = new BoolProperty(Versions.v1_0, \"isSubtle\");\r\n static readonly fontTypeProperty = new EnumProperty(Versions.v1_2, \"fontType\", Enums.FontType);\r\n static readonly selectActionProperty = new ActionProperty(Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n // selectAction is declared on BaseTextBlock but is only exposed on TextRun,\r\n // so the property is removed from the BaseTextBlock schema.\r\n schema.remove(BaseTextBlock.selectActionProperty);\r\n }\r\n\r\n @property(BaseTextBlock.sizeProperty)\r\n size?: Enums.TextSize;\r\n\r\n @property(BaseTextBlock.weightProperty)\r\n weight?: Enums.TextWeight;\r\n\r\n @property(BaseTextBlock.colorProperty)\r\n color?: Enums.TextColor;\r\n\r\n @property(BaseTextBlock.fontTypeProperty)\r\n fontType?: Enums.FontType;\r\n\r\n @property(BaseTextBlock.isSubtleProperty)\r\n isSubtle?: boolean;\r\n\r\n @property(BaseTextBlock.textProperty)\r\n get text(): string | undefined {\r\n return this.getValue(BaseTextBlock.textProperty);\r\n }\r\n\r\n set text(value: string | undefined) {\r\n this.setText(value);\r\n }\r\n\r\n @property(BaseTextBlock.selectActionProperty)\r\n selectAction?: Action;\r\n\r\n //#endregion\r\n\r\n protected getFontSize(fontType: FontTypeDefinition): number {\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n return fontType.fontSizes.small;\r\n case Enums.TextSize.Medium:\r\n return fontType.fontSizes.medium;\r\n case Enums.TextSize.Large:\r\n return fontType.fontSizes.large;\r\n case Enums.TextSize.ExtraLarge:\r\n return fontType.fontSizes.extraLarge;\r\n default:\r\n return fontType.fontSizes.default;\r\n }\r\n }\r\n\r\n protected getColorDefinition(\r\n colorSet: ColorSetDefinition,\r\n color: Enums.TextColor\r\n ): TextColorDefinition {\r\n switch (color) {\r\n case Enums.TextColor.Accent:\r\n return colorSet.accent;\r\n case Enums.TextColor.Dark:\r\n return colorSet.dark;\r\n case Enums.TextColor.Light:\r\n return colorSet.light;\r\n case Enums.TextColor.Good:\r\n return colorSet.good;\r\n case Enums.TextColor.Warning:\r\n return colorSet.warning;\r\n case Enums.TextColor.Attention:\r\n return colorSet.attention;\r\n default:\r\n return colorSet.default;\r\n }\r\n }\r\n\r\n protected setText(value: string | undefined) {\r\n this.setValue(BaseTextBlock.textProperty, value);\r\n }\r\n\r\n ariaHidden: boolean = false;\r\n\r\n constructor(text?: string) {\r\n super();\r\n\r\n if (text) {\r\n this.text = text;\r\n }\r\n }\r\n\r\n init(textDefinition: BaseTextDefinition) {\r\n this.size = textDefinition.size;\r\n this.weight = textDefinition.weight;\r\n this.color = textDefinition.color;\r\n this.isSubtle = textDefinition.isSubtle;\r\n }\r\n\r\n asString(): string | undefined {\r\n return this.text;\r\n }\r\n\r\n applyStylesTo(targetElement: HTMLElement) {\r\n const fontType = this.hostConfig.getFontTypeDefinition(this.effectiveFontType);\r\n\r\n if (fontType.fontFamily) {\r\n targetElement.style.fontFamily = fontType.fontFamily;\r\n }\r\n\r\n let fontSize: number;\r\n\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n fontSize = fontType.fontSizes.small;\r\n break;\r\n case Enums.TextSize.Medium:\r\n fontSize = fontType.fontSizes.medium;\r\n break;\r\n case Enums.TextSize.Large:\r\n fontSize = fontType.fontSizes.large;\r\n break;\r\n case Enums.TextSize.ExtraLarge:\r\n fontSize = fontType.fontSizes.extraLarge;\r\n break;\r\n default:\r\n fontSize = fontType.fontSizes.default;\r\n break;\r\n }\r\n\r\n targetElement.style.fontSize = fontSize + \"px\";\r\n\r\n const colorDefinition = this.getColorDefinition(\r\n this.getEffectiveStyleDefinition().foregroundColors,\r\n this.effectiveColor\r\n );\r\n\r\n const targetColor = Utils.stringToCssColor(\r\n this.effectiveIsSubtle ? colorDefinition.subtle : colorDefinition.default\r\n );\r\n if (targetColor) {\r\n targetElement.style.color = targetColor;\r\n }\r\n\r\n let fontWeight: number;\r\n\r\n switch (this.effectiveWeight) {\r\n case Enums.TextWeight.Lighter:\r\n fontWeight = fontType.fontWeights.lighter;\r\n break;\r\n case Enums.TextWeight.Bolder:\r\n fontWeight = fontType.fontWeights.bolder;\r\n break;\r\n default:\r\n fontWeight = fontType.fontWeights.default;\r\n break;\r\n }\r\n\r\n targetElement.style.fontWeight = fontWeight.toString();\r\n\r\n if (this.ariaHidden) {\r\n targetElement.setAttribute(\"aria-hidden\", \"true\");\r\n }\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n if (this.selectAction) {\r\n result.push(this.selectAction);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get effectiveColor(): Enums.TextColor {\r\n return this.color !== undefined ? this.color : this.getEffectiveTextStyleDefinition().color;\r\n }\r\n\r\n get effectiveFontType(): Enums.FontType {\r\n return this.fontType !== undefined\r\n ? this.fontType\r\n : this.getEffectiveTextStyleDefinition().fontType;\r\n }\r\n\r\n get effectiveIsSubtle(): boolean {\r\n return this.isSubtle !== undefined\r\n ? this.isSubtle\r\n : this.getEffectiveTextStyleDefinition().isSubtle;\r\n }\r\n\r\n get effectiveSize(): Enums.TextSize {\r\n return this.size !== undefined ? this.size : this.getEffectiveTextStyleDefinition().size;\r\n }\r\n\r\n get effectiveWeight(): Enums.TextWeight {\r\n return this.weight !== undefined\r\n ? this.weight\r\n : this.getEffectiveTextStyleDefinition().weight;\r\n }\r\n}\r\n\r\nexport type TextBlockStyle = \"default\" | \"heading\" | \"columnHeader\";\r\n\r\nexport class TextBlock extends BaseTextBlock {\r\n //#region Schema\r\n\r\n static readonly wrapProperty = new BoolProperty(Versions.v1_0, \"wrap\", false);\r\n static readonly maxLinesProperty = new NumProperty(Versions.v1_0, \"maxLines\");\r\n static readonly styleProperty = new ValueSetProperty(Versions.v1_5, \"style\", [\r\n { value: \"default\" },\r\n { value: \"columnHeader\" },\r\n { value: \"heading\" }\r\n ]);\r\n\r\n @property(TextBlock.wrapProperty)\r\n wrap: boolean = false;\r\n\r\n @property(TextBlock.maxLinesProperty)\r\n maxLines?: number;\r\n\r\n @property(TextBlock.styleProperty)\r\n style?: TextBlockStyle;\r\n\r\n //#endregion\r\n\r\n private _computedLineHeight: number;\r\n private _originalInnerHtml: string;\r\n private _processedText?: string;\r\n private _treatAsPlainText: boolean = true;\r\n\r\n private restoreOriginalContent() {\r\n if (this.renderedElement !== undefined) {\r\n if (this.maxLines && this.maxLines > 0) {\r\n this.renderedElement.style.maxHeight =\r\n this._computedLineHeight * this.maxLines + \"px\";\r\n }\r\n\r\n const originalHtml = TextBlock._ttRoundtripPolicy?.createHTML(this._originalInnerHtml) ?? this._originalInnerHtml;\r\n this.renderedElement.innerHTML = originalHtml as string;\r\n }\r\n }\r\n\r\n private truncateIfSupported(maxHeight: number): boolean {\r\n if (this.renderedElement !== undefined) {\r\n // For now, only truncate TextBlocks that contain just a single\r\n // paragraph -- since the maxLines calculation doesn't take into\r\n // account Markdown lists\r\n const children = this.renderedElement.children;\r\n const isTextOnly = !children.length;\r\n const truncationSupported =\r\n isTextOnly ||\r\n (children.length === 1 && (children[0]).tagName.toLowerCase() === \"p\" && !(children[0]).children.length);\r\n\r\n if (truncationSupported) {\r\n const element = isTextOnly ? this.renderedElement : children[0];\r\n\r\n Utils.truncateText(element, maxHeight, this._computedLineHeight);\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n // Markdown processing is handled outside of Adaptive Cards. It's up to the host to ensure that markdown is safely\r\n // processed.\r\n private static readonly _ttMarkdownPolicy = (typeof window === 'undefined') ? undefined : window.trustedTypes?.createPolicy(\r\n \"adaptivecards#markdownPassthroughPolicy\",\r\n { createHTML: (value) => value }\r\n );\r\n\r\n // When \"advanced\" truncation is enabled (see GlobalSettings.useAdvancedCardBottomTruncation and\r\n // GlobalSettings.useAdvancedTextBlockTruncation), we store the original pre-truncation content in\r\n // _originalInnerHtml so that we can restore/recalculate truncation later if space availability has changed (see\r\n // TextBlock.restoreOriginalContent())\r\n private static readonly _ttRoundtripPolicy = (typeof window === 'undefined') ? undefined : window.trustedTypes?.createPolicy(\r\n \"adaptivecards#restoreContentsPolicy\",\r\n { createHTML: (value) => value }\r\n );\r\n\r\n protected setText(value: string) {\r\n super.setText(value);\r\n\r\n this._processedText = undefined;\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._processedText = undefined;\r\n\r\n if (this.text) {\r\n const preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\r\n const hostConfig = this.hostConfig;\r\n\r\n let element: HTMLElement;\r\n\r\n if (this.forElementId) {\r\n const labelElement = document.createElement(\"label\");\r\n labelElement.htmlFor = this.forElementId;\r\n\r\n element = labelElement;\r\n } else {\r\n element = document.createElement(\"div\");\r\n }\r\n\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-textBlock\"));\r\n element.style.overflow = \"hidden\";\r\n\r\n this.applyStylesTo(element);\r\n\r\n if (this.style === \"heading\") {\r\n element.setAttribute(\"role\", \"heading\");\r\n\r\n const headingLevel = this.hostConfig.textBlock.headingLevel;\r\n\r\n if (headingLevel !== undefined && headingLevel > 0) {\r\n element.setAttribute(\"aria-level\", headingLevel.toString());\r\n }\r\n }\r\n\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n element.onclick = (e) => {\r\n if (this.selectAction && this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.selectAction.execute();\r\n }\r\n };\r\n\r\n this.selectAction.setupElementForAccessibility(element);\r\n\r\n if (this.selectAction.isEffectivelyEnabled()) {\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n\r\n if (!this._processedText) {\r\n this._treatAsPlainText = true;\r\n\r\n let formattedText = TextFormatters.formatText(this.lang, preProcessedText);\r\n\r\n if (this.useMarkdown && formattedText) {\r\n if (GlobalSettings.allowMarkForTextHighlighting) {\r\n formattedText = formattedText\r\n .replace(//g, \"===\")\r\n .replace(/<\\/mark>/g, \"/==/\");\r\n }\r\n\r\n const markdownProcessingResult = AdaptiveCard.applyMarkdown(formattedText);\r\n\r\n if (\r\n markdownProcessingResult.didProcess &&\r\n markdownProcessingResult.outputHtml\r\n ) {\r\n this._processedText = markdownProcessingResult.outputHtml;\r\n this._treatAsPlainText = false;\r\n\r\n // Only process tag if markdown processing was applied because\r\n // markdown processing is also responsible for sanitizing the input string\r\n if (GlobalSettings.allowMarkForTextHighlighting && this._processedText) {\r\n let markStyle: string = \"\";\r\n const effectiveStyle = this.getEffectiveStyleDefinition();\r\n\r\n if (effectiveStyle.highlightBackgroundColor) {\r\n markStyle +=\r\n \"background-color: \" +\r\n effectiveStyle.highlightBackgroundColor +\r\n \";\";\r\n }\r\n\r\n if (effectiveStyle.highlightForegroundColor) {\r\n markStyle +=\r\n \"color: \" + effectiveStyle.highlightForegroundColor + \";\";\r\n }\r\n\r\n if (markStyle) {\r\n markStyle = 'style=\"' + markStyle + '\"';\r\n }\r\n\r\n this._processedText = this._processedText\r\n .replace(/===/g, \"\")\r\n .replace(/\\/==\\//g, \"\");\r\n }\r\n } else {\r\n this._processedText = formattedText;\r\n this._treatAsPlainText = true;\r\n }\r\n } else {\r\n this._processedText = formattedText;\r\n this._treatAsPlainText = true;\r\n }\r\n }\r\n\r\n if (!this._processedText) {\r\n this._processedText = \"\";\r\n }\r\n\r\n if (this._treatAsPlainText) {\r\n element.innerText = this._processedText;\r\n } else {\r\n const processedHtml =\r\n TextBlock._ttMarkdownPolicy?.createHTML(this._processedText) ??\r\n this._processedText;\r\n element.innerHTML = processedHtml as string;\r\n }\r\n\r\n if (element.firstElementChild instanceof HTMLElement) {\r\n const firstElementChild = element.firstElementChild;\r\n firstElementChild.style.marginTop = \"0px\";\r\n firstElementChild.style.width = \"100%\";\r\n\r\n if (!this.wrap) {\r\n firstElementChild.style.overflow = \"hidden\";\r\n firstElementChild.style.textOverflow = \"ellipsis\";\r\n }\r\n }\r\n\r\n if (element.lastElementChild instanceof HTMLElement) {\r\n element.lastElementChild.style.marginBottom = \"0px\";\r\n }\r\n\r\n const anchors = element.getElementsByTagName(\"a\");\r\n\r\n for (const anchor of Array.from(anchors)) {\r\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\r\n anchor.target = \"_blank\";\r\n anchor.onclick = (e: MouseEvent) => {\r\n if (raiseAnchorClickedEvent(this, anchor, e)) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n }\r\n };\r\n anchor.oncontextmenu = (e: MouseEvent) => {\r\n if (raiseAnchorClickedEvent(this, anchor, e)) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n }\r\n\r\n if (this.wrap) {\r\n element.style.wordWrap = \"break-word\";\r\n\r\n if (this.maxLines && this.maxLines > 0) {\r\n element.style.overflow = \"hidden\";\r\n\r\n if (Utils.isInternetExplorer() || !GlobalSettings.useWebkitLineClamp) {\r\n element.style.maxHeight = this._computedLineHeight * this.maxLines + \"px\";\r\n } else {\r\n // While non standard, --webkit-line-clamp works in every browser (except IE)\r\n // and is a great solution to support the maxLines feature with ellipsis\r\n // truncation. With --webkit-line-clamp there is need to use explicit line heights\r\n element.style.removeProperty(\"line-height\");\r\n element.style.display = \"-webkit-box\";\r\n element.style.webkitBoxOrient = \"vertical\";\r\n element.style.webkitLineClamp = this.maxLines.toString();\r\n }\r\n }\r\n } else {\r\n element.style.whiteSpace = \"nowrap\";\r\n element.style.textOverflow = \"ellipsis\";\r\n }\r\n\r\n if (\r\n GlobalSettings.useAdvancedTextBlockTruncation ||\r\n GlobalSettings.useAdvancedCardBottomTruncation\r\n ) {\r\n this._originalInnerHtml = element.innerHTML;\r\n }\r\n\r\n return element;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n protected truncateOverflow(maxHeight: number): boolean {\r\n if (maxHeight >= this._computedLineHeight) {\r\n return this.truncateIfSupported(maxHeight);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected undoOverflowTruncation() {\r\n this.restoreOriginalContent();\r\n\r\n if (GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines) {\r\n const maxHeight = this._computedLineHeight * this.maxLines;\r\n\r\n this.truncateIfSupported(maxHeight);\r\n }\r\n }\r\n\r\n useMarkdown: boolean = true;\r\n forElementId?: string;\r\n\r\n applyStylesTo(targetElement: HTMLElement) {\r\n super.applyStylesTo(targetElement);\r\n\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n targetElement.style.textAlign = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n targetElement.style.textAlign = \"end\";\r\n break;\r\n default:\r\n targetElement.style.textAlign = \"start\";\r\n break;\r\n }\r\n\r\n const lineHeights = this.hostConfig.lineHeights;\r\n\r\n if (lineHeights) {\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n this._computedLineHeight = lineHeights.small;\r\n break;\r\n case Enums.TextSize.Medium:\r\n this._computedLineHeight = lineHeights.medium;\r\n break;\r\n case Enums.TextSize.Large:\r\n this._computedLineHeight = lineHeights.large;\r\n break;\r\n case Enums.TextSize.ExtraLarge:\r\n this._computedLineHeight = lineHeights.extraLarge;\r\n break;\r\n default:\r\n this._computedLineHeight = lineHeights.default;\r\n break;\r\n }\r\n } else {\r\n // Looks like 1.33 is the magic number to compute line-height\r\n // from font size.\r\n this._computedLineHeight =\r\n this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType)) *\r\n 1.33;\r\n }\r\n\r\n targetElement.style.lineHeight = this._computedLineHeight + \"px\";\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"TextBlock\";\r\n }\r\n\r\n getEffectiveTextStyleDefinition(): TextStyleDefinition {\r\n if (this.style) {\r\n return this.hostConfig.textStyles.getStyleByName(this.style);\r\n }\r\n\r\n return super.getEffectiveTextStyleDefinition();\r\n }\r\n\r\n updateLayout(processChildren: boolean = false) {\r\n super.updateLayout(processChildren);\r\n\r\n if (GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines && this.isDisplayed()) {\r\n // Reset the element's innerHTML in case the available room for\r\n // content has increased\r\n this.restoreOriginalContent();\r\n this.truncateIfSupported(this._computedLineHeight * this.maxLines);\r\n }\r\n }\r\n}\r\n\r\nexport class TextRun extends BaseTextBlock {\r\n //#region Schema\r\n\r\n static readonly italicProperty = new BoolProperty(Versions.v1_2, \"italic\", false);\r\n static readonly strikethroughProperty = new BoolProperty(Versions.v1_2, \"strikethrough\", false);\r\n static readonly highlightProperty = new BoolProperty(Versions.v1_2, \"highlight\", false);\r\n static readonly underlineProperty = new BoolProperty(Versions.v1_3, \"underline\", false);\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n schema.add(BaseTextBlock.selectActionProperty);\r\n }\r\n\r\n @property(TextRun.italicProperty)\r\n italic: boolean = false;\r\n\r\n @property(TextRun.strikethroughProperty)\r\n strikethrough: boolean = false;\r\n\r\n @property(TextRun.highlightProperty)\r\n highlight: boolean = false;\r\n\r\n @property(TextRun.underlineProperty)\r\n underline: boolean = false;\r\n\r\n //#endregion\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n if (this.text) {\r\n const preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\r\n const hostConfig = this.hostConfig;\r\n\r\n let formattedText = TextFormatters.formatText(this.lang, preProcessedText);\r\n\r\n if (!formattedText) {\r\n formattedText = \"\";\r\n }\r\n\r\n const element = document.createElement(\"span\");\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-textRun\"));\r\n\r\n this.applyStylesTo(element);\r\n\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n const anchor = document.createElement(\"a\");\r\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\r\n\r\n const href = this.selectAction.getHref();\r\n\r\n anchor.href = href ? href : \"\";\r\n anchor.target = \"_blank\";\r\n anchor.onclick = (e) => {\r\n if (this.selectAction && this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.selectAction.execute();\r\n }\r\n };\r\n\r\n this.selectAction.setupElementForAccessibility(anchor);\r\n\r\n anchor.innerText = formattedText;\r\n\r\n element.appendChild(anchor);\r\n } else {\r\n element.innerText = formattedText;\r\n }\r\n\r\n return element;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n applyStylesTo(targetElement: HTMLElement) {\r\n super.applyStylesTo(targetElement);\r\n\r\n if (this.italic) {\r\n targetElement.style.fontStyle = \"italic\";\r\n }\r\n\r\n if (this.strikethrough) {\r\n targetElement.style.textDecoration = \"line-through\";\r\n }\r\n\r\n if (this.highlight) {\r\n const colorDefinition = this.getColorDefinition(\r\n this.getEffectiveStyleDefinition().foregroundColors,\r\n this.effectiveColor\r\n );\r\n\r\n const backgroundColor = Utils.stringToCssColor(\r\n this.effectiveIsSubtle\r\n ? colorDefinition.highlightColors.subtle\r\n : colorDefinition.highlightColors.default\r\n );\r\n if (backgroundColor) {\r\n targetElement.style.backgroundColor = backgroundColor;\r\n }\r\n }\r\n\r\n if (this.underline) {\r\n targetElement.style.textDecoration = \"underline\";\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"TextRun\";\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n\r\n get isInline(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport class RichTextBlock extends CardElement {\r\n private _inlines: CardElement[] = [];\r\n\r\n private internalAddInline(inline: CardElement, forceAdd: boolean = false) {\r\n if (!inline.isInline) {\r\n throw new Error(Strings.errors.elementCannotBeUsedAsInline());\r\n }\r\n\r\n const doAdd: boolean = inline.parent === undefined || forceAdd;\r\n\r\n if (!doAdd && inline.parent !== this) {\r\n throw new Error(Strings.errors.inlineAlreadyParented());\r\n } else {\r\n inline.setParent(this);\r\n\r\n this._inlines.push(inline);\r\n }\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this._inlines = [];\r\n\r\n if (Array.isArray(source[\"inlines\"])) {\r\n for (const jsonInline of source[\"inlines\"]) {\r\n let inline: CardElement | undefined;\r\n\r\n if (typeof jsonInline === \"string\") {\r\n const textRun = new TextRun();\r\n textRun.text = jsonInline;\r\n\r\n inline = textRun;\r\n } else {\r\n // No fallback for inlines in 1.2\r\n inline = context.parseElement(this, jsonInline, [], false);\r\n }\r\n\r\n if (inline) {\r\n this.internalAddInline(inline, true);\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n if (this._inlines.length > 0) {\r\n const jsonInlines: any[] = [];\r\n\r\n for (const inline of this._inlines) {\r\n jsonInlines.push(inline.toJSON(context));\r\n }\r\n\r\n context.serializeValue(target, \"inlines\", jsonInlines);\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n if (this._inlines.length > 0) {\r\n let element: HTMLElement;\r\n\r\n if (this.forElementId) {\r\n const labelElement = document.createElement(\"label\");\r\n labelElement.htmlFor = this.forElementId;\r\n\r\n element = labelElement;\r\n } else {\r\n element = document.createElement(\"div\");\r\n }\r\n\r\n element.className = this.hostConfig.makeCssClassName(\"ac-richTextBlock\");\r\n\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.textAlign = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.textAlign = \"end\";\r\n break;\r\n default:\r\n element.style.textAlign = \"start\";\r\n break;\r\n }\r\n\r\n let renderedInlines: number = 0;\r\n\r\n for (const inline of this._inlines) {\r\n const renderedInline = inline.render();\r\n\r\n if (renderedInline) {\r\n element.appendChild(renderedInline);\r\n\r\n renderedInlines++;\r\n }\r\n }\r\n\r\n if (renderedInlines > 0) {\r\n return element;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n forElementId?: string;\r\n\r\n asString(): string | undefined {\r\n let result = \"\";\r\n\r\n for (const inline of this._inlines) {\r\n result += inline.asString();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"RichTextBlock\";\r\n }\r\n\r\n getInlineCount(): number {\r\n return this._inlines.length;\r\n }\r\n\r\n getInlineAt(index: number): CardElement {\r\n if (index >= 0 && index < this._inlines.length) {\r\n return this._inlines[index];\r\n } else {\r\n throw new Error(Strings.errors.indexOutOfRange(index));\r\n }\r\n }\r\n\r\n addInline(inline: CardElement | string) {\r\n if (typeof inline === \"string\") {\r\n this.internalAddInline(new TextRun(inline));\r\n } else {\r\n this.internalAddInline(inline);\r\n }\r\n }\r\n\r\n removeInline(inline: CardElement): boolean {\r\n const index = this._inlines.indexOf(inline);\r\n\r\n if (index >= 0) {\r\n this._inlines[index].setParent(undefined);\r\n this._inlines.splice(index, 1);\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n\r\nexport class Fact extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly titleProperty = new StringProperty(Versions.v1_0, \"title\");\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n\r\n // For historic reasons, the \"title\" schema property is exposed as \"name\" in the OM.\r\n @property(Fact.titleProperty)\r\n name?: string;\r\n\r\n @property(Fact.valueProperty)\r\n value?: string;\r\n\r\n //#endregion\r\n\r\n protected getSchemaKey(): string {\r\n return \"Fact\";\r\n }\r\n\r\n constructor(name?: string, value?: string) {\r\n super();\r\n\r\n this.name = name;\r\n this.value = value;\r\n }\r\n}\r\n\r\nexport class FactSet extends CardElement {\r\n //#region Schema\r\n\r\n static readonly factsProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_0,\r\n \"facts\",\r\n Fact\r\n );\r\n\r\n @property(FactSet.factsProperty)\r\n facts: Fact[];\r\n\r\n //#endregion\r\n\r\n protected get useDefaultSizing(): boolean {\r\n return false;\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n let element: HTMLElement | undefined = undefined;\r\n const hostConfig = this.hostConfig;\r\n\r\n if (this.facts.length > 0) {\r\n element = document.createElement(\"table\");\r\n element.style.borderWidth = \"0px\";\r\n element.style.borderSpacing = \"0px\";\r\n element.style.borderStyle = \"none\";\r\n element.style.borderCollapse = \"collapse\";\r\n element.style.display = \"block\";\r\n element.style.overflow = \"hidden\";\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-factset\"));\r\n element.setAttribute(\"role\", \"presentation\");\r\n\r\n for (let i = 0; i < this.facts.length; i++) {\r\n const trElement = document.createElement(\"tr\");\r\n\r\n if (i > 0) {\r\n trElement.style.marginTop = hostConfig.factSet.spacing + \"px\";\r\n }\r\n\r\n // Title column\r\n let tdElement = document.createElement(\"td\");\r\n tdElement.style.padding = \"0\";\r\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-title\"));\r\n\r\n if (hostConfig.factSet.title.maxWidth) {\r\n tdElement.style.maxWidth = hostConfig.factSet.title.maxWidth + \"px\";\r\n }\r\n\r\n tdElement.style.verticalAlign = \"top\";\r\n\r\n let textBlock = new TextBlock();\r\n textBlock.setParent(this);\r\n textBlock.text =\r\n !this.facts[i].name && this.isDesignMode() ? \"Title\" : this.facts[i].name;\r\n textBlock.size = hostConfig.factSet.title.size;\r\n textBlock.color = hostConfig.factSet.title.color;\r\n textBlock.isSubtle = hostConfig.factSet.title.isSubtle;\r\n textBlock.weight = hostConfig.factSet.title.weight;\r\n textBlock.wrap = hostConfig.factSet.title.wrap;\r\n textBlock.spacing = Enums.Spacing.None;\r\n\r\n Utils.appendChild(tdElement, textBlock.render());\r\n Utils.appendChild(trElement, tdElement);\r\n\r\n // Spacer column\r\n tdElement = document.createElement(\"td\");\r\n tdElement.style.width = \"10px\";\r\n\r\n Utils.appendChild(trElement, tdElement);\r\n\r\n // Value column\r\n tdElement = document.createElement(\"td\");\r\n tdElement.style.padding = \"0\";\r\n tdElement.style.verticalAlign = \"top\";\r\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-value\"));\r\n\r\n textBlock = new TextBlock();\r\n textBlock.setParent(this);\r\n textBlock.text = this.facts[i].value;\r\n textBlock.size = hostConfig.factSet.value.size;\r\n textBlock.color = hostConfig.factSet.value.color;\r\n textBlock.isSubtle = hostConfig.factSet.value.isSubtle;\r\n textBlock.weight = hostConfig.factSet.value.weight;\r\n textBlock.wrap = hostConfig.factSet.value.wrap;\r\n textBlock.spacing = Enums.Spacing.None;\r\n\r\n Utils.appendChild(tdElement, textBlock.render());\r\n Utils.appendChild(trElement, tdElement);\r\n Utils.appendChild(element, trElement);\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"FactSet\";\r\n }\r\n}\r\n\r\nclass ImageDimensionProperty extends PropertyDefinition {\r\n getInternalName(): string {\r\n return this.internalName;\r\n }\r\n\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): number | undefined {\r\n let result: number | undefined = undefined;\r\n const sourceValue = source[this.name];\r\n\r\n if (sourceValue === undefined) {\r\n return this.defaultValue;\r\n }\r\n\r\n let isValid = false;\r\n\r\n if (typeof sourceValue === \"string\") {\r\n try {\r\n const size = SizeAndUnit.parse(sourceValue, true);\r\n\r\n if (size.unit === Enums.SizeUnit.Pixel) {\r\n result = size.physicalSize;\r\n\r\n isValid = true;\r\n }\r\n } catch {\r\n // Swallow the exception\r\n }\r\n\r\n // If the source value isn't valid per this property definition,\r\n // check its validity per the fallback property, if specified\r\n if (!isValid && this.fallbackProperty) {\r\n isValid = this.fallbackProperty.isValidValue(sourceValue, context);\r\n }\r\n }\r\n\r\n if (!isValid) {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(sourceValue, this.name)\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: number | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeValue(\r\n target,\r\n this.name,\r\n typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined\r\n );\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly internalName: string,\r\n readonly fallbackProperty?: ValueSetProperty\r\n ) {\r\n super(targetVersion, name);\r\n }\r\n}\r\n\r\nexport class Image extends CardElement {\r\n //#region Schema\r\n\r\n static readonly urlProperty = new StringProperty(Versions.v1_0, \"url\");\r\n static readonly altTextProperty = new StringProperty(Versions.v1_0, \"altText\");\r\n static readonly backgroundColorProperty = new StringProperty(Versions.v1_1, \"backgroundColor\");\r\n static readonly styleProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"style\",\r\n Enums.ImageStyle,\r\n Enums.ImageStyle.Default\r\n );\r\n static readonly sizeProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"size\",\r\n Enums.Size,\r\n Enums.Size.Auto\r\n );\r\n static readonly pixelWidthProperty = new ImageDimensionProperty(\r\n Versions.v1_1,\r\n \"width\",\r\n \"pixelWidth\"\r\n );\r\n static readonly pixelHeightProperty = new ImageDimensionProperty(\r\n Versions.v1_1,\r\n \"height\",\r\n \"pixelHeight\",\r\n CardElement.heightProperty\r\n );\r\n static readonly selectActionProperty = new ActionProperty(Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n schema.remove(CardElement.heightProperty);\r\n }\r\n\r\n @property(Image.urlProperty)\r\n url?: string;\r\n\r\n @property(Image.altTextProperty)\r\n altText?: string;\r\n\r\n @property(Image.backgroundColorProperty)\r\n backgroundColor?: string;\r\n\r\n @property(Image.sizeProperty)\r\n size: Enums.Size = Enums.Size.Auto;\r\n\r\n @property(Image.styleProperty)\r\n style: Enums.ImageStyle = Enums.ImageStyle.Default;\r\n\r\n @property(Image.pixelWidthProperty)\r\n pixelWidth?: number;\r\n\r\n @property(Image.pixelHeightProperty)\r\n pixelHeight?: number;\r\n\r\n @property(Image.selectActionProperty)\r\n selectAction?: Action;\r\n\r\n //#endregion\r\n\r\n private applySize(element: HTMLElement) {\r\n if (this.pixelWidth || this.pixelHeight) {\r\n if (this.pixelWidth) {\r\n element.style.width = this.pixelWidth + \"px\";\r\n }\r\n\r\n if (this.pixelHeight) {\r\n element.style.height = this.pixelHeight + \"px\";\r\n }\r\n } else {\r\n if (this.maxHeight) {\r\n // If the image is constrained in height, we set its height property and\r\n // auto and stretch are ignored (default to medium). THis is necessary for\r\n // ImageSet which uses a maximum image height as opposed to the cards width\r\n // as a constraining dimension\r\n switch (this.size) {\r\n case Enums.Size.Small:\r\n element.style.height = this.hostConfig.imageSizes.small + \"px\";\r\n break;\r\n case Enums.Size.Large:\r\n element.style.height = this.hostConfig.imageSizes.large + \"px\";\r\n break;\r\n default:\r\n element.style.height = this.hostConfig.imageSizes.medium + \"px\";\r\n break;\r\n }\r\n\r\n element.style.maxHeight = this.maxHeight + \"px\";\r\n } else {\r\n switch (this.size) {\r\n case Enums.Size.Stretch:\r\n element.style.width = \"100%\";\r\n break;\r\n case Enums.Size.Auto:\r\n element.style.maxWidth = \"100%\";\r\n break;\r\n case Enums.Size.Small:\r\n element.style.width = this.hostConfig.imageSizes.small + \"px\";\r\n break;\r\n case Enums.Size.Large:\r\n element.style.width = this.hostConfig.imageSizes.large + \"px\";\r\n break;\r\n case Enums.Size.Medium:\r\n element.style.width = this.hostConfig.imageSizes.medium + \"px\";\r\n break;\r\n }\r\n\r\n element.style.maxHeight = \"100%\";\r\n }\r\n }\r\n }\r\n\r\n protected get useDefaultSizing() {\r\n return false;\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n let element: HTMLElement | undefined = undefined;\r\n\r\n if (this.url) {\r\n element = document.createElement(\"div\");\r\n element.style.display = \"flex\";\r\n element.style.alignItems = \"flex-start\";\r\n\r\n // Cache hostConfig to avoid walking the parent hierarchy multiple times\r\n const hostConfig = this.hostConfig;\r\n\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n\r\n const imageElement = document.createElement(\"img\");\r\n imageElement.onload = (_e: Event) => {\r\n raiseImageLoadedEvent(this);\r\n };\r\n imageElement.onerror = (_e: Event) => {\r\n if (this.renderedElement) {\r\n const card = this.getRootElement() as AdaptiveCard;\r\n\r\n this.renderedElement;\r\n\r\n if (card && card.designMode) {\r\n const errorElement = document.createElement(\"div\");\r\n errorElement.style.display = \"flex\";\r\n errorElement.style.alignItems = \"center\";\r\n errorElement.style.justifyContent = \"center\";\r\n errorElement.style.backgroundColor = \"#EEEEEE\";\r\n errorElement.style.color = \"black\";\r\n errorElement.innerText = \":-(\";\r\n errorElement.style.padding = \"10px\";\r\n\r\n this.applySize(errorElement);\r\n\r\n this.renderedElement.appendChild(errorElement);\r\n }\r\n }\r\n\r\n raiseImageLoadedEvent(this);\r\n };\r\n imageElement.style.minWidth = \"0\";\r\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-image\"));\r\n\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n imageElement.onkeypress = (e) => {\r\n if (\r\n this.selectAction &&\r\n this.selectAction.isEffectivelyEnabled() &&\r\n (e.code === \"Enter\" || e.code === \"Space\")\r\n ) {\r\n // enter or space pressed\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.selectAction.execute();\r\n }\r\n };\r\n\r\n imageElement.onclick = (e) => {\r\n if (this.selectAction && this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.selectAction.execute();\r\n }\r\n };\r\n\r\n this.selectAction.setupElementForAccessibility(imageElement);\r\n\r\n if (this.selectAction.isEffectivelyEnabled()) {\r\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n\r\n this.applySize(imageElement);\r\n\r\n if (this.style === Enums.ImageStyle.Person) {\r\n imageElement.style.borderRadius = \"50%\";\r\n imageElement.style.backgroundPosition = \"50% 50%\";\r\n imageElement.style.backgroundRepeat = \"no-repeat\";\r\n }\r\n\r\n const backgroundColor = Utils.stringToCssColor(this.backgroundColor);\r\n if (backgroundColor) {\r\n imageElement.style.backgroundColor = backgroundColor;\r\n }\r\n\r\n imageElement.src = this.preProcessPropertyValue(Image.urlProperty);\r\n\r\n const altTextProperty = this.preProcessPropertyValue(Image.altTextProperty);\r\n if (altTextProperty) {\r\n imageElement.alt = altTextProperty;\r\n }\r\n\r\n element.appendChild(imageElement);\r\n }\r\n\r\n return element;\r\n }\r\n\r\n maxHeight?: number;\r\n\r\n getJsonTypeName(): string {\r\n return \"Image\";\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n if (this.selectAction) {\r\n result.push(this.selectAction);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getActionById(id: string) {\r\n let result = super.getActionById(id);\r\n\r\n if (!result && this.selectAction) {\r\n result = this.selectAction.getActionById(id);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n return this.url ? [{ url: this.url, mimeType: \"image\" }] : [];\r\n }\r\n}\r\n\r\nexport abstract class CardElementContainer extends CardElement {\r\n //#region Schema\r\n\r\n static readonly selectActionProperty = new ActionProperty(Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n if (!this.isSelectable) {\r\n schema.remove(CardElementContainer.selectActionProperty);\r\n }\r\n }\r\n\r\n @property(CardElementContainer.selectActionProperty)\r\n protected _selectAction?: Action;\r\n\r\n //#endregion\r\n\r\n protected isElementAllowed(element: CardElement) {\r\n return this.hostConfig.supportsInteractivity || !element.isInteractive;\r\n }\r\n\r\n protected applyPadding() {\r\n super.applyPadding();\r\n\r\n if (!this.renderedElement) {\r\n return;\r\n }\r\n\r\n let physicalPadding = new SpacingDefinition();\r\n\r\n if (this.getEffectivePadding()) {\r\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(\r\n this.getEffectivePadding()\r\n );\r\n }\r\n\r\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\r\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\r\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\r\n\r\n this.renderedElement.style.marginRight = \"0\";\r\n this.renderedElement.style.marginLeft = \"0\";\r\n }\r\n\r\n protected get isSelectable(): boolean {\r\n return false;\r\n }\r\n\r\n // This function is kept but return [] when removing Carousel from code\r\n protected forbiddenChildElements(): string[] {\r\n return [];\r\n }\r\n\r\n abstract getItemCount(): number;\r\n abstract getItemAt(index: number): CardElement;\r\n abstract getFirstVisibleRenderedItem(): CardElement | undefined;\r\n abstract getLastVisibleRenderedItem(): CardElement | undefined;\r\n abstract removeItem(item: CardElement): boolean;\r\n\r\n allowVerticalOverflow: boolean = false;\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).releaseDOMResources();\r\n }\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n const item = this.getItemAt(i);\r\n\r\n if (!this.hostConfig.supportsInteractivity && item.isInteractive) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.InteractivityNotAllowed,\r\n Strings.errors.interactivityNotAllowed()\r\n );\r\n }\r\n\r\n if (!this.isElementAllowed(item)) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.InteractivityNotAllowed,\r\n Strings.errors.elementTypeNotAllowed(item.getJsonTypeName())\r\n );\r\n }\r\n\r\n item.internalValidateProperties(context);\r\n }\r\n\r\n if (this._selectAction) {\r\n this._selectAction.internalValidateProperties(context);\r\n }\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n const element = super.render();\r\n\r\n if (element) {\r\n const hostConfig = this.hostConfig;\r\n\r\n if (this.allowVerticalOverflow) {\r\n element.style.overflowX = \"hidden\";\r\n element.style.overflowY = \"auto\";\r\n }\r\n\r\n if (\r\n element &&\r\n this.isSelectable &&\r\n this._selectAction &&\r\n hostConfig.supportsInteractivity\r\n ) {\r\n element.onclick = (e) => {\r\n if (this._selectAction && this._selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this._selectAction.execute();\r\n }\r\n };\r\n\r\n element.onkeypress = (e) => {\r\n if (\r\n this._selectAction &&\r\n this._selectAction.isEffectivelyEnabled() &&\r\n (e.code === \"Enter\" || e.code === \"Space\")\r\n ) {\r\n // Enter or space pressed\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this._selectAction.execute();\r\n }\r\n };\r\n\r\n this._selectAction.setupElementForAccessibility(element);\r\n\r\n if (this._selectAction.isEffectivelyEnabled()) {\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n updateLayout(processChildren: boolean = true) {\r\n super.updateLayout(processChildren);\r\n\r\n if (processChildren) {\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).updateLayout();\r\n }\r\n }\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n let result: Input[] = [];\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n result.push(...this.getItemAt(i).getAllInputs(processActions));\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n result.push(...this.getItemAt(i).getAllActions());\r\n }\r\n\r\n if (this._selectAction) {\r\n result.push(this._selectAction);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n let result: IResourceInformation[] = [];\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n result.push(...this.getItemAt(i).getResourceInformation());\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getElementById(id: string): CardElement | undefined {\r\n let result = super.getElementById(id);\r\n\r\n if (!result) {\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n result = this.getItemAt(i).getElementById(id);\r\n\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n findDOMNodeOwner(node: Node): CardObject | undefined {\r\n let target: CardObject | undefined = undefined;\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n // recur through child elements\r\n target = this.getItemAt(i).findDOMNodeOwner(node);\r\n\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n\r\n // If not found in children, check the actions\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n target = this.getActionAt(i)?.findDOMNodeOwner(node);\r\n\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n\r\n // if not found in children or actions, defer to parent implementation\r\n return super.findDOMNodeOwner(node);\r\n }\r\n}\r\n\r\nexport class ImageSet extends CardElementContainer {\r\n //#region Schema\r\n\r\n static readonly imagesProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_0,\r\n \"images\",\r\n Image,\r\n (sender: SerializableObject, item: Image) => {\r\n item.setParent(sender);\r\n }\r\n );\r\n static readonly imageSizeProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"imageSize\",\r\n Enums.ImageSize,\r\n Enums.ImageSize.Medium\r\n );\r\n\r\n @property(ImageSet.imagesProperty)\r\n private _images: Image[] = [];\r\n\r\n @property(ImageSet.imageSizeProperty)\r\n imageSize: Enums.ImageSize = Enums.ImageSize.Medium;\r\n\r\n //#endregion\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n let element: HTMLElement | undefined = undefined;\r\n\r\n if (this._images.length > 0) {\r\n element = document.createElement(\"div\");\r\n element.style.display = \"flex\";\r\n element.style.flexWrap = \"wrap\";\r\n\r\n for (const image of this._images) {\r\n switch (this.imageSize) {\r\n case Enums.ImageSize.Small:\r\n image.size = Enums.Size.Small;\r\n break;\r\n case Enums.ImageSize.Large:\r\n image.size = Enums.Size.Large;\r\n break;\r\n default:\r\n image.size = Enums.Size.Medium;\r\n break;\r\n }\r\n\r\n image.maxHeight = this.hostConfig.imageSet.maxImageHeight;\r\n\r\n const renderedImage = image.render();\r\n\r\n if (renderedImage) {\r\n renderedImage.style.display = \"inline-flex\";\r\n renderedImage.style.margin = \"0px\";\r\n renderedImage.style.marginRight = \"10px\";\r\n\r\n Utils.appendChild(element, renderedImage);\r\n }\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n getItemCount(): number {\r\n return this._images.length;\r\n }\r\n\r\n getItemAt(index: number): CardElement {\r\n return this._images[index];\r\n }\r\n\r\n getFirstVisibleRenderedItem(): CardElement | undefined {\r\n return this._images && this._images.length > 0 ? this._images[0] : undefined;\r\n }\r\n\r\n getLastVisibleRenderedItem(): CardElement | undefined {\r\n return this._images && this._images.length > 0\r\n ? this._images[this._images.length - 1]\r\n : undefined;\r\n }\r\n\r\n removeItem(item: CardElement): boolean {\r\n if (item instanceof Image) {\r\n const itemIndex = this._images.indexOf(item);\r\n\r\n if (itemIndex >= 0) {\r\n this._images.splice(itemIndex, 1);\r\n\r\n item.setParent(undefined);\r\n\r\n this.updateLayout();\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"ImageSet\";\r\n }\r\n\r\n addImage(image: Image) {\r\n if (!image.parent) {\r\n this._images.push(image);\r\n\r\n image.setParent(this);\r\n } else {\r\n throw new Error(\"This image already belongs to another ImageSet\");\r\n }\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return cardElement instanceof Image ? this._images.indexOf(cardElement) : -1;\r\n }\r\n}\r\n\r\nexport abstract class ContentSource extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly mimeTypeProperty = new StringProperty(Versions.v1_1, \"mimeType\");\r\n static readonly urlProperty = new StringProperty(Versions.v1_1, \"url\");\r\n\r\n @property(ContentSource.mimeTypeProperty)\r\n mimeType?: string;\r\n\r\n @property(ContentSource.urlProperty)\r\n url?: string;\r\n\r\n //#endregion\r\n\r\n constructor(url?: string, mimeType?: string) {\r\n super();\r\n\r\n this.url = url;\r\n this.mimeType = mimeType;\r\n }\r\n\r\n isValid(): boolean {\r\n return this.mimeType && this.url ? true : false;\r\n }\r\n}\r\n\r\nexport class CaptionSource extends ContentSource {\r\n //#region Schema\r\n\r\n static readonly labelProperty = new StringProperty(Versions.v1_6, \"label\");\r\n\r\n @property(CaptionSource.labelProperty)\r\n label?: string;\r\n\r\n //#endregion\r\n\r\n constructor(url?: string, mimeType?: string, label?: string) {\r\n super(url, mimeType);\r\n\r\n this.label = label;\r\n }\r\n\r\n protected getSchemaKey(): string {\r\n return \"CaptionSource\";\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n let result: HTMLTrackElement | undefined = undefined;\r\n\r\n if (this.isValid()) {\r\n result = document.createElement(\"track\");\r\n result.src = this.url!;\r\n result.kind = \"captions\";\r\n result.label = this.label!;\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport class MediaSource extends ContentSource {\r\n protected getSchemaKey(): string {\r\n return \"MediaSource\";\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n let result: HTMLSourceElement | undefined = undefined;\r\n\r\n if (this.isValid()) {\r\n result = document.createElement(\"source\");\r\n result.src = this.url!;\r\n result.type = this.mimeType!;\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport abstract class MediaPlayer {\r\n private _posterUrl?: string;\r\n\r\n abstract canPlay(): boolean;\r\n abstract render(): HTMLElement;\r\n abstract fetchVideoDetails(): Promise;\r\n\r\n play() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n get posterUrl(): string | undefined {\r\n return this._posterUrl;\r\n }\r\n\r\n protected set posterUrl(value: string | undefined) {\r\n this._posterUrl = value;\r\n }\r\n\r\n get selectedMediaType(): string | undefined {\r\n return undefined;\r\n }\r\n}\r\n\r\nexport class HTML5MediaPlayer extends MediaPlayer {\r\n private _selectedMediaType?: string;\r\n private _selectedSources: MediaSource[] = [];\r\n private _captionSources: CaptionSource[] = [];\r\n private _mediaElement?: HTMLMediaElement;\r\n\r\n private processSources() {\r\n this._selectedSources = [];\r\n this._captionSources = [];\r\n this._selectedMediaType = undefined;\r\n\r\n for (const source of this.owner.sources) {\r\n const mimeComponents = source.mimeType ? source.mimeType.split(\"/\") : [];\r\n\r\n if (mimeComponents.length === 2) {\r\n if (!this._selectedMediaType) {\r\n const index = HTML5MediaPlayer.supportedMediaTypes.indexOf(mimeComponents[0]);\r\n\r\n if (index >= 0) {\r\n this._selectedMediaType = HTML5MediaPlayer.supportedMediaTypes[index];\r\n }\r\n }\r\n if (mimeComponents[0] === this._selectedMediaType) {\r\n this._selectedSources.push(source);\r\n }\r\n }\r\n }\r\n\r\n this._captionSources.push(...this.owner.captionSources);\r\n }\r\n\r\n static readonly supportedMediaTypes = [\"audio\", \"video\"];\r\n\r\n constructor(readonly owner: Media) {\r\n super();\r\n\r\n this.processSources();\r\n }\r\n\r\n canPlay(): boolean {\r\n return this._selectedSources.length > 0;\r\n }\r\n\r\n async fetchVideoDetails() {\r\n // Nothing to fetch for the HTML5 media player\r\n }\r\n\r\n render(): HTMLElement {\r\n if (this._selectedMediaType === \"video\") {\r\n this._mediaElement = document.createElement(\"video\");\r\n } else {\r\n this._mediaElement = document.createElement(\"audio\");\r\n }\r\n\r\n this._mediaElement.setAttribute(\r\n \"aria-label\",\r\n this.owner.altText ? this.owner.altText : Strings.defaults.mediaPlayerAriaLabel()\r\n );\r\n this._mediaElement.setAttribute(\"webkit-playsinline\", \"\");\r\n this._mediaElement.setAttribute(\"playsinline\", \"\");\r\n // We enable crossorigin for cases where the caption file has a different domain than\r\n // the video file. If the caption file lives in a different domain than the video file\r\n // and crossorigin is not set, then the caption file will fail to load.\r\n this._mediaElement.setAttribute(\"crossorigin\", \"\");\r\n this._mediaElement.autoplay = true;\r\n this._mediaElement.controls = true;\r\n\r\n if (Utils.isMobileOS()) {\r\n this._mediaElement.muted = true;\r\n }\r\n\r\n this._mediaElement.preload = \"none\";\r\n this._mediaElement.style.width = \"100%\";\r\n\r\n for (const source of this.owner.sources) {\r\n const renderedSource = source.render();\r\n\r\n Utils.appendChild(this._mediaElement, renderedSource);\r\n }\r\n\r\n for (const captionSource of this.owner.captionSources) {\r\n if (captionSource.mimeType == \"vtt\") {\r\n const renderedCaptionSource = captionSource.render();\r\n\r\n Utils.appendChild(this._mediaElement, renderedCaptionSource);\r\n }\r\n }\r\n\r\n return this._mediaElement;\r\n }\r\n\r\n play() {\r\n if (this._mediaElement) {\r\n this._mediaElement.play();\r\n }\r\n }\r\n\r\n get selectedMediaType(): string | undefined {\r\n return this._selectedMediaType;\r\n }\r\n}\r\n\r\nexport abstract class CustomMediaPlayer extends MediaPlayer {\r\n constructor(matches: RegExpExecArray) {\r\n super();\r\n }\r\n}\r\n\r\nexport abstract class IFrameMediaMediaPlayer extends CustomMediaPlayer {\r\n private _videoId?: string;\r\n\r\n constructor(matches: RegExpExecArray, readonly iFrameTitle?: string) {\r\n super(matches);\r\n\r\n if (matches.length >= 2) {\r\n this._videoId = matches[1];\r\n }\r\n }\r\n\r\n abstract getEmbedVideoUrl(): string;\r\n\r\n canPlay(): boolean {\r\n return this._videoId !== undefined;\r\n }\r\n\r\n render(): HTMLElement {\r\n let container = document.createElement(\"div\");\r\n container.style.position = \"relative\";\r\n container.style.width = \"100%\";\r\n container.style.height = \"0\";\r\n container.style.paddingBottom = \"56.25%\";\r\n\r\n let iFrame = document.createElement(\"iframe\");\r\n iFrame.style.position = \"absolute\";\r\n iFrame.style.top = \"0\";\r\n iFrame.style.left = \"0\";\r\n iFrame.style.width = \"100%\";\r\n iFrame.style.height = \"100%\";\r\n iFrame.src = this.getEmbedVideoUrl();\r\n iFrame.frameBorder = \"0\";\r\n\r\n if (this.iFrameTitle) {\r\n iFrame.title = this.iFrameTitle;\r\n }\r\n\r\n iFrame.allow =\r\n \"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\";\r\n iFrame.allowFullscreen = true;\r\n\r\n container.appendChild(iFrame);\r\n\r\n return container;\r\n }\r\n\r\n get videoId(): string | undefined {\r\n return this._videoId;\r\n }\r\n}\r\n\r\nexport class VimeoPlayer extends IFrameMediaMediaPlayer {\r\n async fetchVideoDetails(): Promise {\r\n const oEmbedUrl = `https://vimeo.com/api/oembed.json?url=${this.getEmbedVideoUrl()}`;\r\n\r\n let response = await fetch(oEmbedUrl);\r\n\r\n if (response.ok) {\r\n let json = await response.json();\r\n\r\n this.posterUrl = json[\"thumbnail_url\"];\r\n }\r\n }\r\n\r\n getEmbedVideoUrl(): string {\r\n return `https://player.vimeo.com/video/${this.videoId}?autoplay=1`;\r\n }\r\n}\r\n\r\nexport class DailymotionPlayer extends IFrameMediaMediaPlayer {\r\n async fetchVideoDetails(): Promise {\r\n const apiUrl = `https://api.dailymotion.com/video/${this.videoId}?fields=thumbnail_720_url`;\r\n\r\n let response = await fetch(apiUrl);\r\n\r\n if (response.ok) {\r\n let json = await response.json();\r\n\r\n this.posterUrl = json[\"thumbnail_720_url\"];\r\n }\r\n }\r\n\r\n getEmbedVideoUrl(): string {\r\n return `https://www.dailymotion.com/embed/video/${this.videoId}?autoplay=1`;\r\n }\r\n}\r\n\r\nexport class YouTubePlayer extends IFrameMediaMediaPlayer {\r\n private _startTimeIndex?: number;\r\n\r\n constructor(matches: RegExpExecArray, readonly iFrameTitle?: string) {\r\n super(matches, iFrameTitle);\r\n\r\n if (matches.length >= 3 && matches[2] !== undefined) {\r\n this._startTimeIndex = parseInt(matches[2]);\r\n }\r\n }\r\n\r\n async fetchVideoDetails(): Promise {\r\n this.posterUrl = this.videoId\r\n ? `https://img.youtube.com/vi/${this.videoId}/maxresdefault.jpg`\r\n : undefined;\r\n }\r\n\r\n getEmbedVideoUrl(): string {\r\n let url = `https://www.youtube.com/embed/${this.videoId}?autoplay=1`;\r\n\r\n if (this._startTimeIndex !== undefined) {\r\n url += `&start=${this._startTimeIndex}`;\r\n }\r\n\r\n return url;\r\n }\r\n}\r\n\r\nexport interface ICustomMediaPlayer {\r\n urlPatterns: RegExp[];\r\n createMediaPlayer: (matches: RegExpExecArray) => CustomMediaPlayer;\r\n}\r\n\r\nexport class Media extends CardElement {\r\n static customMediaPlayers: ICustomMediaPlayer[] = [\r\n {\r\n urlPatterns: [\r\n /^(?:https?:\\/\\/)?(?:www.)?youtube.com\\/watch\\?(?=.*v=([\\w\\d-_]+))(?=(?:.*t=(\\d+))?).*/gi,\r\n /^(?:https?:\\/\\/)?youtu.be\\/([\\w\\d-_]+)(?:\\?t=(\\d+))?/gi\r\n ],\r\n createMediaPlayer: (matches) =>\r\n new YouTubePlayer(matches, Strings.defaults.youTubeVideoPlayer())\r\n },\r\n {\r\n urlPatterns: [/^(?:https?:\\/\\/)?vimeo.com\\/([\\w\\d-_]+).*/gi],\r\n createMediaPlayer: (matches) =>\r\n new VimeoPlayer(matches, Strings.defaults.vimeoVideoPlayer())\r\n },\r\n {\r\n urlPatterns: [/^(?:https?:\\/\\/)?(?:www.)?dailymotion.com\\/video\\/([\\w\\d-_]+).*/gi],\r\n createMediaPlayer: (matches) =>\r\n new DailymotionPlayer(matches, Strings.defaults.dailymotionVideoPlayer())\r\n }\r\n ];\r\n\r\n //#region Schema\r\n\r\n static readonly sourcesProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_1,\r\n \"sources\",\r\n MediaSource\r\n );\r\n static readonly captionSourcesProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_6,\r\n \"captionSources\",\r\n CaptionSource\r\n );\r\n static readonly posterProperty = new StringProperty(Versions.v1_1, \"poster\");\r\n static readonly altTextProperty = new StringProperty(Versions.v1_1, \"altText\");\r\n\r\n @property(Media.sourcesProperty)\r\n sources: MediaSource[] = [];\r\n\r\n @property(Media.captionSourcesProperty)\r\n captionSources: CaptionSource[] = [];\r\n\r\n @property(Media.posterProperty)\r\n poster?: string;\r\n\r\n @property(Media.altTextProperty)\r\n altText?: string;\r\n\r\n //#endregion\r\n\r\n private _mediaPlayer: MediaPlayer;\r\n\r\n private createMediaPlayer(): MediaPlayer {\r\n for (let provider of Media.customMediaPlayers) {\r\n for (let source of this.sources) {\r\n if (source.url) {\r\n for (let pattern of provider.urlPatterns) {\r\n let matches = pattern.exec(source.url);\r\n\r\n if (matches !== null) {\r\n return provider.createMediaPlayer(matches);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return new HTML5MediaPlayer(this);\r\n }\r\n\r\n private handlePlayButtonInvoke(event: UIEvent): void {\r\n if (this.hostConfig.media.allowInlinePlayback) {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n\r\n if (this.renderedElement) {\r\n const mediaPlayerElement = this._mediaPlayer.render();\r\n clearElement(this.renderedElement);\r\n this.renderedElement.appendChild(mediaPlayerElement);\r\n\r\n this._mediaPlayer.play();\r\n\r\n mediaPlayerElement.focus();\r\n }\r\n } else {\r\n if (Media.onPlay) {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n\r\n Media.onPlay(this);\r\n }\r\n }\r\n }\r\n\r\n private async displayPoster() {\r\n if (this.renderedElement) {\r\n const playButtonArrowWidth = 12;\r\n const playButtonArrowHeight = 15;\r\n\r\n const posterRootElement = document.createElement(\"div\");\r\n posterRootElement.className = this.hostConfig.makeCssClassName(\"ac-media-poster\");\r\n posterRootElement.setAttribute(\"role\", \"contentinfo\");\r\n posterRootElement.setAttribute(\r\n \"aria-label\",\r\n this.altText ? this.altText : Strings.defaults.mediaPlayerAriaLabel()\r\n );\r\n posterRootElement.style.position = \"relative\";\r\n posterRootElement.style.display = \"flex\";\r\n\r\n let posterUrl = this.poster ? this.poster : this._mediaPlayer.posterUrl;\r\n\r\n if (!posterUrl) {\r\n posterUrl = this.hostConfig.media.defaultPoster;\r\n }\r\n\r\n if (posterUrl) {\r\n const posterImageElement = document.createElement(\"img\");\r\n posterImageElement.style.width = \"100%\";\r\n posterImageElement.style.height = \"100%\";\r\n posterImageElement.setAttribute(\"role\", \"presentation\");\r\n\r\n posterImageElement.onerror = (_e: Event) => {\r\n if (posterImageElement.parentNode) {\r\n posterImageElement.parentNode.removeChild(posterImageElement);\r\n }\r\n\r\n posterRootElement.classList.add(\"empty\");\r\n posterRootElement.style.minHeight = \"150px\";\r\n };\r\n\r\n posterImageElement.src = posterUrl;\r\n\r\n posterRootElement.appendChild(posterImageElement);\r\n } else {\r\n posterRootElement.classList.add(\"empty\");\r\n posterRootElement.style.minHeight = \"150px\";\r\n }\r\n\r\n if (this.hostConfig.supportsInteractivity && this._mediaPlayer.canPlay()) {\r\n const playButtonOuterElement = document.createElement(\"div\");\r\n playButtonOuterElement.tabIndex = 0;\r\n playButtonOuterElement.setAttribute(\"role\", \"button\");\r\n playButtonOuterElement.setAttribute(\r\n \"aria-label\",\r\n Strings.defaults.mediaPlayerPlayMedia()\r\n );\r\n playButtonOuterElement.className =\r\n this.hostConfig.makeCssClassName(\"ac-media-playButton\");\r\n playButtonOuterElement.style.display = \"flex\";\r\n playButtonOuterElement.style.alignItems = \"center\";\r\n playButtonOuterElement.style.justifyContent = \"center\";\r\n playButtonOuterElement.onclick = (e) => {\r\n this.handlePlayButtonInvoke(e);\r\n };\r\n\r\n playButtonOuterElement.onkeypress = (e: KeyboardEvent) => {\r\n if (e.code === \"Enter\" || e.code === \"Space\") {\r\n // space or enter\r\n this.handlePlayButtonInvoke(e);\r\n }\r\n };\r\n\r\n const playButtonInnerElement = document.createElement(\"div\");\r\n playButtonInnerElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-media-playButton-arrow\"\r\n );\r\n playButtonInnerElement.style.width = playButtonArrowWidth + \"px\";\r\n playButtonInnerElement.style.height = playButtonArrowHeight + \"px\";\r\n playButtonInnerElement.style.borderTopWidth = playButtonArrowHeight / 2 + \"px\";\r\n playButtonInnerElement.style.borderBottomWidth = playButtonArrowHeight / 2 + \"px\";\r\n playButtonInnerElement.style.borderLeftWidth = playButtonArrowWidth + \"px\";\r\n playButtonInnerElement.style.borderRightWidth = \"0\";\r\n playButtonInnerElement.style.borderStyle = \"solid\";\r\n playButtonInnerElement.style.borderTopColor = \"transparent\";\r\n playButtonInnerElement.style.borderRightColor = \"transparent\";\r\n playButtonInnerElement.style.borderBottomColor = \"transparent\";\r\n playButtonInnerElement.style.transform =\r\n \"translate(\" + playButtonArrowWidth / 10 + \"px,0px)\";\r\n\r\n playButtonOuterElement.appendChild(playButtonInnerElement);\r\n\r\n const playButtonContainer = document.createElement(\"div\");\r\n playButtonContainer.style.position = \"absolute\";\r\n playButtonContainer.style.left = \"0\";\r\n playButtonContainer.style.top = \"0\";\r\n playButtonContainer.style.width = \"100%\";\r\n playButtonContainer.style.height = \"100%\";\r\n playButtonContainer.style.display = \"flex\";\r\n playButtonContainer.style.justifyContent = \"center\";\r\n playButtonContainer.style.alignItems = \"center\";\r\n\r\n playButtonContainer.appendChild(playButtonOuterElement);\r\n posterRootElement.appendChild(playButtonContainer);\r\n }\r\n\r\n clearElement(this.renderedElement);\r\n this.renderedElement.appendChild(posterRootElement);\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-media\");\r\n\r\n return element;\r\n }\r\n\r\n static onPlay?: (sender: Media) => void;\r\n\r\n render(): HTMLElement | undefined {\r\n let result = super.render();\r\n\r\n if (result) {\r\n this._mediaPlayer = this.createMediaPlayer();\r\n\r\n this._mediaPlayer.fetchVideoDetails().then(() => this.displayPoster());\r\n }\r\n\r\n return result;\r\n }\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n this.displayPoster();\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Media\";\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n const result: IResourceInformation[] = [];\r\n\r\n if (this._mediaPlayer) {\r\n const posterUrl = this.poster ? this.poster : this.hostConfig.media.defaultPoster;\r\n\r\n if (posterUrl) {\r\n result.push({ url: posterUrl, mimeType: \"image\" });\r\n }\r\n }\r\n\r\n for (const mediaSource of this.sources) {\r\n if (mediaSource.isValid()) {\r\n result.push({\r\n /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `mediaSource.url` is of type `string | undefined`, but is validated by `isValid()` call */\r\n url: mediaSource.url!,\r\n mimeType: mediaSource.mimeType!\r\n /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */\r\n });\r\n }\r\n }\r\n\r\n for (const captionSource of this.captionSources) {\r\n if (captionSource.isValid()) {\r\n result.push({\r\n /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `captionSource.url` is of type `string | undefined`, but is validated by `isValid()` call */\r\n url: captionSource.url!,\r\n mimeType: captionSource.mimeType!\r\n /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */\r\n });\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get selectedMediaType(): string | undefined {\r\n return this._mediaPlayer.selectedMediaType;\r\n }\r\n}\r\n\r\nexport abstract class Input extends CardElement implements IInput {\r\n //#region Schema\r\n\r\n static readonly labelProperty = new StringProperty(Versions.v1_3, \"label\", true);\r\n static readonly isRequiredProperty = new BoolProperty(Versions.v1_3, \"isRequired\", false);\r\n static readonly errorMessageProperty = new StringProperty(Versions.v1_3, \"errorMessage\", true);\r\n\r\n @property(Input.labelProperty)\r\n label?: string;\r\n\r\n @property(Input.isRequiredProperty)\r\n isRequired: boolean;\r\n\r\n @property(Input.errorMessageProperty)\r\n errorMessage?: string;\r\n\r\n //#endregion\r\n\r\n private _outerContainerElement: HTMLElement;\r\n private _inputControlContainerElement: HTMLElement;\r\n private _renderedErrorMessageElement?: HTMLElement;\r\n private _renderedLabelElement?: HTMLElement;\r\n private _renderedInputControlElement?: HTMLElement;\r\n private _oldValue: any;\r\n\r\n protected getAllLabelIds(): string[] {\r\n const labelIds: string[] = [];\r\n\r\n if (this.labelledBy) {\r\n labelIds.push(this.labelledBy);\r\n }\r\n\r\n if (this._renderedLabelElement) {\r\n labelIds.push(this._renderedLabelElement.id);\r\n }\r\n\r\n if (this._renderedErrorMessageElement) {\r\n labelIds.push(this._renderedErrorMessageElement.id);\r\n }\r\n\r\n return labelIds;\r\n }\r\n\r\n protected updateInputControlAriaLabelledBy() {\r\n if (this._renderedInputControlElement) {\r\n const labelIds: string[] = this.getAllLabelIds();\r\n\r\n if (labelIds.length > 0) {\r\n this._renderedInputControlElement.setAttribute(\r\n \"aria-labelledby\",\r\n labelIds.join(\" \")\r\n );\r\n } else {\r\n this._renderedInputControlElement.removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n }\r\n\r\n protected get isNullable(): boolean {\r\n return true;\r\n }\r\n\r\n protected get renderedInputControlElement(): HTMLElement | undefined {\r\n return this._renderedInputControlElement;\r\n }\r\n\r\n protected get inputControlContainerElement(): HTMLElement {\r\n return this._inputControlContainerElement;\r\n }\r\n\r\n protected overrideInternalRender(): HTMLElement | undefined {\r\n const hostConfig = this.hostConfig;\r\n\r\n this._outerContainerElement = document.createElement(\"div\");\r\n this._outerContainerElement.style.display = \"flex\";\r\n this._outerContainerElement.style.flexDirection = \"column\";\r\n\r\n const renderedInputControlId = Utils.generateUniqueId();\r\n\r\n if (this.label) {\r\n const labelRichTextBlock = new RichTextBlock();\r\n labelRichTextBlock.setParent(this);\r\n labelRichTextBlock.forElementId = renderedInputControlId;\r\n\r\n const labelInline = new TextRun(this.label);\r\n labelRichTextBlock.addInline(labelInline);\r\n\r\n if (this.isRequired) {\r\n labelInline.init(hostConfig.inputs.label.requiredInputs);\r\n\r\n const isRequiredCueInline = new TextRun(\r\n hostConfig.inputs.label.requiredInputs.suffix\r\n );\r\n isRequiredCueInline.color = hostConfig.inputs.label.requiredInputs.suffixColor;\r\n isRequiredCueInline.ariaHidden = true;\r\n\r\n labelRichTextBlock.addInline(isRequiredCueInline);\r\n } else {\r\n labelInline.init(hostConfig.inputs.label.optionalInputs);\r\n }\r\n\r\n this._renderedLabelElement = labelRichTextBlock.render();\r\n\r\n if (this._renderedLabelElement) {\r\n this._renderedLabelElement.id = Utils.generateUniqueId();\r\n this._renderedLabelElement.style.marginBottom =\r\n hostConfig.getEffectiveSpacing(hostConfig.inputs.label.inputSpacing) + \"px\";\r\n\r\n this._outerContainerElement.appendChild(this._renderedLabelElement);\r\n }\r\n }\r\n\r\n this._inputControlContainerElement = document.createElement(\"div\");\r\n this._inputControlContainerElement.className =\r\n hostConfig.makeCssClassName(\"ac-input-container\");\r\n this._inputControlContainerElement.style.display = \"flex\";\r\n\r\n if (this.height === \"stretch\") {\r\n this._inputControlContainerElement.style.alignItems = \"stretch\";\r\n this._inputControlContainerElement.style.flex = \"1 1 auto\";\r\n }\r\n\r\n this._renderedInputControlElement = this.internalRender();\r\n\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.id = renderedInputControlId;\r\n this._renderedInputControlElement.style.minWidth = \"0px\";\r\n\r\n if (this.isNullable && this.isRequired) {\r\n this._renderedInputControlElement.setAttribute(\"aria-required\", \"true\");\r\n this._renderedInputControlElement.classList.add(\r\n hostConfig.makeCssClassName(\"ac-input-required\")\r\n );\r\n }\r\n\r\n this._inputControlContainerElement.appendChild(this._renderedInputControlElement);\r\n this._outerContainerElement.appendChild(this._inputControlContainerElement);\r\n\r\n this.updateInputControlAriaLabelledBy();\r\n\r\n return this._outerContainerElement;\r\n }\r\n\r\n this.resetDirtyState();\r\n\r\n return undefined;\r\n }\r\n\r\n protected valueChanged() {\r\n this.getRootElement().updateActionsEnabledState();\r\n\r\n if (this.isValid()) {\r\n this.resetValidationFailureCue();\r\n }\r\n\r\n if (this.onValueChanged) {\r\n this.onValueChanged(this);\r\n }\r\n\r\n raiseInputValueChangedEvent(this);\r\n }\r\n\r\n protected resetValidationFailureCue() {\r\n if (this.renderedInputControlElement) {\r\n this.renderedInputControlElement.classList.remove(\r\n this.hostConfig.makeCssClassName(\"ac-input-validation-failed\")\r\n );\r\n\r\n this.updateInputControlAriaLabelledBy();\r\n\r\n if (this._renderedErrorMessageElement) {\r\n this._outerContainerElement.removeChild(this._renderedErrorMessageElement);\r\n\r\n this._renderedErrorMessageElement = undefined;\r\n }\r\n }\r\n }\r\n\r\n protected showValidationErrorMessage() {\r\n if (\r\n this.renderedElement &&\r\n this.errorMessage &&\r\n GlobalSettings.displayInputValidationErrors\r\n ) {\r\n const errorMessageTextBlock = new TextBlock();\r\n errorMessageTextBlock.setParent(this);\r\n errorMessageTextBlock.text = this.errorMessage;\r\n errorMessageTextBlock.wrap = true;\r\n errorMessageTextBlock.init(this.hostConfig.inputs.errorMessage);\r\n\r\n this._renderedErrorMessageElement = errorMessageTextBlock.render();\r\n\r\n if (this._renderedErrorMessageElement) {\r\n this._renderedErrorMessageElement.id = Utils.generateUniqueId();\r\n this._outerContainerElement.appendChild(this._renderedErrorMessageElement);\r\n\r\n this.updateInputControlAriaLabelledBy();\r\n }\r\n }\r\n }\r\n\r\n onValueChanged: (sender: Input) => void;\r\n\r\n labelledBy?: string;\r\n\r\n abstract isSet(): boolean;\r\n\r\n focus() {\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.focus();\r\n }\r\n }\r\n\r\n isValid(): boolean {\r\n return true;\r\n }\r\n\r\n isDirty(): boolean {\r\n return this.value !== this._oldValue;\r\n }\r\n\r\n resetDirtyState() {\r\n this._oldValue = this.value;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (!this.id) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.inputsMustHaveUniqueId()\r\n );\r\n }\r\n\r\n if (this.isRequired) {\r\n if (!this.label) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.RequiredInputsShouldHaveLabel,\r\n \"Required inputs should have a label\"\r\n );\r\n }\r\n\r\n if (!this.errorMessage) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.RequiredInputsShouldHaveErrorMessage,\r\n \"Required inputs should have an error message\"\r\n );\r\n }\r\n }\r\n }\r\n\r\n validateValue(): boolean {\r\n this.resetValidationFailureCue();\r\n\r\n const result = this.isRequired ? this.isSet() && this.isValid() : this.isValid();\r\n\r\n if (!result && this.renderedInputControlElement) {\r\n this.renderedInputControlElement.classList.add(\r\n this.hostConfig.makeCssClassName(\"ac-input-validation-failed\")\r\n );\r\n\r\n this.showValidationErrorMessage();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return [this];\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n let result = super.render();\r\n\r\n this.resetDirtyState();\r\n\r\n return result;\r\n }\r\n\r\n abstract get value(): any;\r\n\r\n get isInteractive(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport class TextInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n static readonly maxLengthProperty = new NumProperty(Versions.v1_0, \"maxLength\");\r\n static readonly isMultilineProperty = new BoolProperty(Versions.v1_0, \"isMultiline\", false);\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly styleProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"style\",\r\n Enums.InputTextStyle,\r\n Enums.InputTextStyle.Text,\r\n [\r\n { value: Enums.InputTextStyle.Text },\r\n { value: Enums.InputTextStyle.Tel },\r\n { value: Enums.InputTextStyle.Url },\r\n { value: Enums.InputTextStyle.Email },\r\n { value: Enums.InputTextStyle.Password, targetVersion: Versions.v1_5 }\r\n ]\r\n );\r\n static readonly inlineActionProperty = new ActionProperty(Versions.v1_0, \"inlineAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n static readonly regexProperty = new StringProperty(Versions.v1_3, \"regex\", true);\r\n\r\n @property(TextInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(TextInput.maxLengthProperty)\r\n maxLength?: number;\r\n\r\n @property(TextInput.isMultilineProperty)\r\n isMultiline: boolean = false;\r\n\r\n @property(TextInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n @property(TextInput.styleProperty)\r\n style: Enums.InputTextStyle = Enums.InputTextStyle.Text;\r\n\r\n @property(TextInput.inlineActionProperty)\r\n inlineAction?: Action;\r\n\r\n @property(TextInput.regexProperty)\r\n regex?: string;\r\n\r\n //#endregion\r\n\r\n private setupInput(input: HTMLInputElement | HTMLTextAreaElement) {\r\n input.style.flex = \"1 1 auto\";\r\n\r\n input.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (this.placeholder) {\r\n input.placeholder = this.placeholder;\r\n input.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n if (this.defaultValue) {\r\n input.value = this.defaultValue;\r\n }\r\n\r\n if (this.maxLength && this.maxLength > 0) {\r\n input.maxLength = this.maxLength;\r\n }\r\n\r\n input.oninput = () => {\r\n this.valueChanged();\r\n };\r\n input.onkeypress = (e: KeyboardEvent) => {\r\n // Ctrl+Enter pressed\r\n if (\r\n e.ctrlKey &&\r\n e.code === \"Enter\" &&\r\n this.inlineAction &&\r\n this.inlineAction.isEffectivelyEnabled()\r\n ) {\r\n this.inlineAction.execute();\r\n }\r\n };\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n let result: HTMLInputElement | HTMLTextAreaElement;\r\n\r\n if (this.isMultiline && this.style !== Enums.InputTextStyle.Password) {\r\n result = document.createElement(\"textarea\");\r\n result.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-textInput\",\r\n \"ac-multiline\"\r\n );\r\n\r\n if (this.height === \"stretch\") {\r\n result.style.height = \"initial\";\r\n }\r\n } else {\r\n result = document.createElement(\"input\");\r\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\");\r\n result.type = Enums.InputTextStyle[this.style].toLowerCase();\r\n }\r\n\r\n this.setupInput(result);\r\n\r\n return result;\r\n }\r\n\r\n protected overrideInternalRender(): HTMLElement | undefined {\r\n const renderedInputControl = super.overrideInternalRender();\r\n\r\n if (this.inlineAction) {\r\n const button = document.createElement(\"button\");\r\n button.className = this.hostConfig.makeCssClassName(\r\n this.inlineAction.isEffectivelyEnabled()\r\n ? \"ac-inlineActionButton\"\r\n : \"ac-inlineActionButton-disabled\"\r\n );\r\n\r\n button.onclick = (e) => {\r\n if (this.inlineAction && this.inlineAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.inlineAction.execute();\r\n }\r\n };\r\n\r\n if (this.inlineAction.iconUrl) {\r\n button.classList.add(\"iconOnly\");\r\n\r\n const icon = document.createElement(\"img\");\r\n icon.style.height = \"100%\";\r\n icon.setAttribute(\"role\", \"presentation\");\r\n\r\n // The below trick is necessary as a workaround in Chrome where the icon is initially displayed\r\n // at its native size then resized to 100% of the button's height. This cfreates an unpleasant\r\n // flicker. On top of that, Chrome's flex implementation fails to prperly re-layout the button\r\n // after the image has loaded and been gicven its final size. The below trick also fixes that.\r\n icon.style.display = \"none\";\r\n icon.onload = () => {\r\n icon.style.removeProperty(\"display\");\r\n };\r\n icon.onerror = () => {\r\n button.removeChild(icon);\r\n button.classList.remove(\"iconOnly\");\r\n button.classList.add(\"textOnly\");\r\n button.textContent =\r\n this.inlineAction && this.inlineAction.title\r\n ? this.inlineAction.title\r\n : Strings.defaults.inlineActionTitle();\r\n };\r\n\r\n icon.src = this.inlineAction.iconUrl;\r\n\r\n button.appendChild(icon);\r\n button.title = this.inlineAction.title\r\n ? this.inlineAction.title\r\n : Strings.defaults.inlineActionTitle();\r\n } else {\r\n button.classList.add(\"textOnly\");\r\n button.textContent = this.inlineAction.title\r\n ? this.inlineAction.title\r\n : Strings.defaults.inlineActionTitle();\r\n }\r\n\r\n this.inlineAction.setupElementForAccessibility(button, true);\r\n\r\n button.style.marginLeft = \"8px\";\r\n\r\n this.inputControlContainerElement.appendChild(button);\r\n }\r\n\r\n return renderedInputControl;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Text\";\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n if (this.inlineAction) {\r\n result.push(this.inlineAction);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getActionById(id: string) {\r\n let result = super.getActionById(id);\r\n\r\n if (!result && this.inlineAction) {\r\n result = this.inlineAction.getActionById(id);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value ? true : false;\r\n }\r\n\r\n isValid(): boolean {\r\n if (!this.value) {\r\n return true;\r\n }\r\n\r\n if (this.regex) {\r\n return new RegExp(this.regex, \"g\").test(this.value);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n get value(): string | undefined {\r\n if (this.renderedInputControlElement) {\r\n if (this.isMultiline) {\r\n return (this.renderedInputControlElement).value;\r\n } else {\r\n return (this.renderedInputControlElement).value;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n}\r\n\r\nexport class ToggleInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n static readonly titleProperty = new StringProperty(Versions.v1_0, \"title\");\r\n static readonly valueOnProperty = new StringProperty(\r\n Versions.v1_0,\r\n \"valueOn\",\r\n true,\r\n undefined,\r\n \"true\",\r\n (sender: SerializableObject) => {\r\n return \"true\";\r\n }\r\n );\r\n static readonly valueOffProperty = new StringProperty(\r\n Versions.v1_0,\r\n \"valueOff\",\r\n true,\r\n undefined,\r\n \"false\",\r\n (sender: SerializableObject) => {\r\n return \"false\";\r\n }\r\n );\r\n static readonly wrapProperty = new BoolProperty(Versions.v1_2, \"wrap\", false);\r\n\r\n @property(ToggleInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(ToggleInput.titleProperty)\r\n title?: string;\r\n\r\n @property(ToggleInput.valueOnProperty)\r\n valueOn: string = \"true\";\r\n\r\n @property(ToggleInput.valueOffProperty)\r\n valueOff: string = \"false\";\r\n\r\n @property(ToggleInput.wrapProperty)\r\n wrap: boolean = false;\r\n\r\n //#endregion\r\n\r\n private _checkboxInputElement: HTMLInputElement;\r\n private _checkboxInputLabelElement: HTMLElement | undefined;\r\n private _oldCheckboxValue: boolean;\r\n\r\n protected updateInputControlAriaLabelledBy() {\r\n if (this._checkboxInputElement) {\r\n let joinedLabelIds = this.getAllLabelIds().join(\" \");\r\n\r\n if (this._checkboxInputLabelElement && this._checkboxInputLabelElement.id) {\r\n joinedLabelIds += \" \" + this._checkboxInputLabelElement.id;\r\n }\r\n\r\n if (joinedLabelIds) {\r\n this._checkboxInputElement.setAttribute(\"aria-labelledby\", joinedLabelIds);\r\n } else {\r\n this._checkboxInputElement.removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-toggleInput\");\r\n element.style.width = \"100%\";\r\n element.style.display = \"flex\";\r\n element.style.alignItems = \"center\";\r\n\r\n this._checkboxInputElement = document.createElement(\"input\");\r\n this._checkboxInputElement.id = Utils.generateUniqueId();\r\n this._checkboxInputElement.type = \"checkbox\";\r\n this._checkboxInputElement.style.display = \"inline-block\";\r\n this._checkboxInputElement.style.verticalAlign = \"middle\";\r\n this._checkboxInputElement.style.margin = \"0\";\r\n this._checkboxInputElement.style.flex = \"0 0 auto\";\r\n\r\n if (this.title) {\r\n this._checkboxInputElement.setAttribute(\"aria-label\", this.title);\r\n }\r\n\r\n if (this.isRequired) {\r\n this._checkboxInputElement.setAttribute(\"aria-required\", \"true\");\r\n }\r\n\r\n this._checkboxInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (this.defaultValue === this.valueOn) {\r\n this._checkboxInputElement.checked = true;\r\n }\r\n\r\n this._oldCheckboxValue = this._checkboxInputElement.checked;\r\n\r\n this._checkboxInputElement.onchange = () => {\r\n this.valueChanged();\r\n };\r\n\r\n Utils.appendChild(element, this._checkboxInputElement);\r\n\r\n if (this.title || this.isDesignMode()) {\r\n const label = new TextBlock();\r\n label.setParent(this);\r\n label.forElementId = this._checkboxInputElement.id;\r\n label.hostConfig = this.hostConfig;\r\n label.text = !this.title ? this.getJsonTypeName() : this.title;\r\n label.useMarkdown = GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\r\n label.wrap = this.wrap;\r\n\r\n this._checkboxInputLabelElement = label.render();\r\n\r\n if (this._checkboxInputLabelElement) {\r\n this._checkboxInputLabelElement.id = Utils.generateUniqueId();\r\n this._checkboxInputLabelElement.style.display = \"inline-block\";\r\n this._checkboxInputLabelElement.style.flex = \"1 1 auto\";\r\n this._checkboxInputLabelElement.style.marginLeft = \"6px\";\r\n this._checkboxInputLabelElement.style.verticalAlign = \"middle\";\r\n\r\n const spacerElement = document.createElement(\"div\");\r\n spacerElement.style.width = \"6px\";\r\n\r\n Utils.appendChild(element, spacerElement);\r\n Utils.appendChild(element, this._checkboxInputLabelElement);\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n protected get isNullable(): boolean {\r\n return false;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Toggle\";\r\n }\r\n\r\n focus() {\r\n if (this._checkboxInputElement) {\r\n this._checkboxInputElement.focus();\r\n }\r\n }\r\n\r\n isSet(): boolean {\r\n if (this.isRequired) {\r\n return this.value === this.valueOn;\r\n }\r\n\r\n return this.value ? true : false;\r\n }\r\n\r\n isDirty(): boolean {\r\n return this._checkboxInputElement\r\n ? this._checkboxInputElement.checked !== this._oldCheckboxValue\r\n : false;\r\n }\r\n\r\n get value(): string | undefined {\r\n if (this._checkboxInputElement) {\r\n return this._checkboxInputElement.checked ? this.valueOn : this.valueOff;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n}\r\n\r\nexport class Choice extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly titleProperty = new StringProperty(Versions.v1_0, \"title\");\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n\r\n @property(Choice.titleProperty)\r\n title?: string;\r\n\r\n @property(Choice.valueProperty)\r\n value?: string;\r\n\r\n //#endregion\r\n\r\n protected getSchemaKey(): string {\r\n return \"Choice\";\r\n }\r\n\r\n constructor(title?: string, value?: string) {\r\n super();\r\n\r\n this.title = title;\r\n this.value = value;\r\n }\r\n}\r\n\r\nexport class ChoiceSetInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n static readonly choicesProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_0,\r\n \"choices\",\r\n Choice\r\n );\r\n static readonly styleProperty = new ValueSetProperty(\r\n Versions.v1_0,\r\n \"style\",\r\n [\r\n { value: \"compact\" },\r\n { value: \"expanded\" },\r\n { value: \"filtered\", targetVersion: Versions.v1_5 }\r\n ],\r\n \"compact\"\r\n );\r\n static readonly isMultiSelectProperty = new BoolProperty(Versions.v1_0, \"isMultiSelect\", false);\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly wrapProperty = new BoolProperty(Versions.v1_2, \"wrap\", false);\r\n\r\n @property(ChoiceSetInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(ChoiceSetInput.styleProperty)\r\n style?: \"compact\" | \"expanded\" | \"filtered\";\r\n\r\n get isCompact(): boolean {\r\n return !this.style || this.style === \"compact\";\r\n }\r\n\r\n set isCompact(value: boolean) {\r\n this.style = value ? undefined : \"expanded\";\r\n }\r\n\r\n @property(ChoiceSetInput.isMultiSelectProperty)\r\n isMultiSelect: boolean = false;\r\n\r\n @property(ChoiceSetInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n @property(ChoiceSetInput.wrapProperty)\r\n wrap: boolean = false;\r\n\r\n @property(ChoiceSetInput.choicesProperty)\r\n choices: Choice[] = [];\r\n\r\n //#endregion\r\n\r\n private static _uniqueCategoryCounter = 0;\r\n\r\n private static getUniqueCategoryName(): string {\r\n const uniqueCategoryName = \"__ac-category\" + ChoiceSetInput._uniqueCategoryCounter;\r\n\r\n ChoiceSetInput._uniqueCategoryCounter++;\r\n\r\n return uniqueCategoryName;\r\n }\r\n\r\n private _uniqueCategoryName: string;\r\n private _selectElement: HTMLSelectElement | undefined;\r\n private _textInput: HTMLInputElement | undefined;\r\n private _toggleInputs: HTMLInputElement[] | undefined;\r\n private _labels: Array;\r\n\r\n // Make sure `aria-current` is applied to the currently-selected item\r\n private internalApplyAriaCurrent(): void {\r\n if (this._selectElement) {\r\n const options = this._selectElement.options;\r\n\r\n if (options) {\r\n for (const option of Array.from(options)) {\r\n if (option.selected) {\r\n option.setAttribute(\"aria-current\", \"true\");\r\n } else {\r\n option.removeAttribute(\"aria-current\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private renderCompoundInput(\r\n cssClassName: string,\r\n type: \"checkbox\" | \"radio\",\r\n defaultValues: string[] | undefined\r\n ): HTMLElement {\r\n const element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", cssClassName);\r\n element.style.width = \"100%\";\r\n\r\n element.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n this._toggleInputs = [];\r\n this._labels = [];\r\n\r\n for (const choice of this.choices) {\r\n const input = document.createElement(\"input\");\r\n input.id = Utils.generateUniqueId();\r\n input.type = type;\r\n input.style.margin = \"0\";\r\n input.style.display = \"inline-block\";\r\n input.style.verticalAlign = \"middle\";\r\n input.style.flex = \"0 0 auto\";\r\n input.name = this.id ? this.id : this._uniqueCategoryName;\r\n\r\n if (this.isRequired) {\r\n input.setAttribute(\"aria-required\", \"true\");\r\n }\r\n\r\n input.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (choice.value) {\r\n input.value = choice.value;\r\n }\r\n\r\n if (choice.title) {\r\n input.setAttribute(\"aria-label\", choice.title);\r\n }\r\n\r\n if (defaultValues && choice.value) {\r\n if (defaultValues.indexOf(choice.value) >= 0) {\r\n input.checked = true;\r\n }\r\n }\r\n\r\n input.onchange = () => {\r\n this.valueChanged();\r\n };\r\n\r\n this._toggleInputs.push(input);\r\n\r\n const compoundInput = document.createElement(\"div\");\r\n compoundInput.style.display = \"flex\";\r\n compoundInput.style.alignItems = \"center\";\r\n\r\n Utils.appendChild(compoundInput, input);\r\n\r\n const label = new TextBlock();\r\n label.setParent(this);\r\n label.forElementId = input.id;\r\n label.hostConfig = this.hostConfig;\r\n label.text = choice.title ? choice.title : \"Choice \" + this._toggleInputs.length;\r\n label.useMarkdown = GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\r\n label.wrap = this.wrap;\r\n\r\n const labelElement = label.render();\r\n\r\n this._labels.push(labelElement);\r\n\r\n if (labelElement) {\r\n labelElement.id = Utils.generateUniqueId();\r\n labelElement.style.display = \"inline-block\";\r\n labelElement.style.flex = \"1 1 auto\";\r\n labelElement.style.marginLeft = \"6px\";\r\n labelElement.style.verticalAlign = \"middle\";\r\n\r\n const spacerElement = document.createElement(\"div\");\r\n spacerElement.style.width = \"6px\";\r\n\r\n Utils.appendChild(compoundInput, spacerElement);\r\n Utils.appendChild(compoundInput, labelElement);\r\n }\r\n\r\n Utils.appendChild(element, compoundInput);\r\n }\r\n\r\n return element;\r\n }\r\n\r\n protected updateInputControlAriaLabelledBy() {\r\n if (\r\n (this.isMultiSelect || this.style === \"expanded\") &&\r\n this._toggleInputs &&\r\n this._labels\r\n ) {\r\n const labelIds: string[] = this.getAllLabelIds();\r\n\r\n for (let i = 0; i < this._toggleInputs.length; i++) {\r\n let joinedLabelIds = labelIds.join(\" \");\r\n const label = this._labels[i];\r\n\r\n if (label && label.id) {\r\n joinedLabelIds += \" \" + label.id;\r\n }\r\n\r\n if (joinedLabelIds) {\r\n this._toggleInputs[i].setAttribute(\"aria-labelledby\", joinedLabelIds);\r\n } else {\r\n this._toggleInputs[i].removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n } else {\r\n super.updateInputControlAriaLabelledBy();\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._uniqueCategoryName = ChoiceSetInput.getUniqueCategoryName();\r\n\r\n if (this.isMultiSelect) {\r\n // Render as a list of toggle inputs\r\n return this.renderCompoundInput(\r\n \"ac-choiceSetInput-multiSelect\",\r\n \"checkbox\",\r\n this.defaultValue\r\n ? this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator)\r\n : undefined\r\n );\r\n } else {\r\n if (this.style === \"expanded\") {\r\n // Render as a series of radio buttons\r\n return this.renderCompoundInput(\r\n \"ac-choiceSetInput-expanded\",\r\n \"radio\",\r\n this.defaultValue ? [this.defaultValue] : undefined\r\n );\r\n } else if (this.style === \"filtered\") {\r\n // Render as a text input coupled with a datalist\r\n const inputContainer = document.createElement(\"div\");\r\n inputContainer.style.width = \"100%\";\r\n\r\n this._textInput = document.createElement(\"input\");\r\n this._textInput.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-multichoiceInput\",\r\n \"ac-choiceSetInput-filtered\"\r\n );\r\n this._textInput.type = \"text\";\r\n this._textInput.style.width = \"100%\";\r\n this._textInput.oninput = () => {\r\n this.valueChanged();\r\n\r\n if (this._textInput) {\r\n // Remove aria-label when value is not empty so narration software doesn't\r\n // read the placeholder\r\n if (this.value) {\r\n this._textInput.removeAttribute(\"placeholder\");\r\n this._textInput.removeAttribute(\"aria-label\");\r\n } else if (this.placeholder) {\r\n this._textInput.placeholder = this.placeholder;\r\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n }\r\n };\r\n\r\n if (this.defaultValue) {\r\n this._textInput.value = this.defaultValue;\r\n }\r\n\r\n if (this.placeholder && !this._textInput.value) {\r\n this._textInput.placeholder = this.placeholder;\r\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n this._textInput.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n const dataList = document.createElement(\"datalist\");\r\n dataList.id = Utils.generateUniqueId();\r\n\r\n for (const choice of this.choices) {\r\n const option = document.createElement(\"option\");\r\n // To fix https://stackoverflow.com/questions/29882361/show-datalist-labels-but-submit-the-actual-value\r\n // value is mapped to choice.title other than choice.value\r\n if (choice.title) {\r\n option.value = choice.title;\r\n option.setAttribute(\"aria-label\", choice.title);\r\n }\r\n\r\n option.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n dataList.appendChild(option);\r\n }\r\n\r\n this._textInput.setAttribute(\"list\", dataList.id);\r\n\r\n inputContainer.append(this._textInput, dataList);\r\n\r\n return inputContainer;\r\n } else {\r\n // Render as a combo box\r\n this._selectElement = document.createElement(\"select\");\r\n this._selectElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-multichoiceInput\",\r\n \"ac-choiceSetInput-compact\"\r\n );\r\n this._selectElement.style.width = \"100%\";\r\n\r\n this._selectElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n const placeholderOption = document.createElement(\"option\");\r\n placeholderOption.selected = true;\r\n placeholderOption.disabled = true;\r\n placeholderOption.hidden = true;\r\n placeholderOption.value = \"\";\r\n\r\n if (this.placeholder) {\r\n placeholderOption.text = this.placeholder;\r\n }\r\n\r\n Utils.appendChild(this._selectElement, placeholderOption);\r\n\r\n for (const choice of this.choices) {\r\n const option = document.createElement(\"option\");\r\n option.value = choice.value!;\r\n\r\n if (choice.title) {\r\n option.text = choice.title;\r\n option.setAttribute(\"aria-label\", choice.title);\r\n }\r\n\r\n option.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (choice.value === this.defaultValue) {\r\n option.selected = true;\r\n }\r\n\r\n Utils.appendChild(this._selectElement, option);\r\n }\r\n\r\n this._selectElement.onchange = () => {\r\n this.internalApplyAriaCurrent();\r\n this.valueChanged();\r\n };\r\n\r\n this.internalApplyAriaCurrent();\r\n\r\n return this._selectElement;\r\n }\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.ChoiceSet\";\r\n }\r\n\r\n focus() {\r\n if (this._toggleInputs && (this.isMultiSelect || this.style === \"expanded\")) {\r\n if (this._toggleInputs.length > 0) {\r\n this._toggleInputs[0].focus();\r\n }\r\n } else if (this._textInput) {\r\n this._textInput.focus();\r\n } else {\r\n super.focus();\r\n }\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (this.choices.length === 0) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.CollectionCantBeEmpty,\r\n Strings.errors.choiceSetMustHaveAtLeastOneChoice()\r\n );\r\n }\r\n\r\n for (const choice of this.choices) {\r\n if (!choice.title || !choice.value) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.choiceSetChoicesMustHaveTitleAndValue()\r\n );\r\n }\r\n }\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value ? true : false;\r\n }\r\n\r\n isValid(): boolean {\r\n if (this._textInput) {\r\n if (this.value === \"\" || this.value === this.placeholder) {\r\n return true;\r\n }\r\n for (const choice of this.choices) {\r\n if (this.value === choice.value) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n return super.isValid();\r\n }\r\n\r\n get value(): string | undefined {\r\n if (!this.isMultiSelect) {\r\n if (this._selectElement) {\r\n return this._selectElement.selectedIndex > 0\r\n ? this._selectElement.value\r\n : undefined;\r\n } else if (this._textInput) {\r\n for (const choice of this.choices) {\r\n if (choice.title && this._textInput.value === choice.title) {\r\n return choice.value;\r\n }\r\n }\r\n return this._textInput.value;\r\n } else if (this._toggleInputs && this._toggleInputs.length > 0) {\r\n for (const toggleInput of this._toggleInputs) {\r\n if (toggleInput.checked) {\r\n return toggleInput.value;\r\n }\r\n }\r\n }\r\n\r\n return undefined;\r\n } else {\r\n if (!this._toggleInputs || this._toggleInputs.length === 0) {\r\n return undefined;\r\n }\r\n\r\n let result: string = \"\";\r\n\r\n for (const toggleInput of this._toggleInputs) {\r\n if (toggleInput.checked) {\r\n if (result !== \"\") {\r\n result += this.hostConfig.choiceSetInputValueSeparator;\r\n }\r\n\r\n result += toggleInput.value;\r\n }\r\n }\r\n\r\n return result ? result : undefined;\r\n }\r\n }\r\n}\r\n\r\nexport class NumberInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new NumProperty(Versions.v1_0, \"value\");\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly minProperty = new NumProperty(Versions.v1_0, \"min\");\r\n static readonly maxProperty = new NumProperty(Versions.v1_0, \"max\");\r\n\r\n @property(NumberInput.valueProperty)\r\n defaultValue?: number;\r\n\r\n @property(NumberInput.minProperty)\r\n min?: number;\r\n\r\n @property(NumberInput.maxProperty)\r\n max?: number;\r\n\r\n @property(NumberInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n //#endregion\r\n\r\n private _numberInputElement: HTMLInputElement;\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._numberInputElement = document.createElement(\"input\");\r\n this._numberInputElement.setAttribute(\"type\", \"number\");\r\n\r\n if (this.min !== undefined) {\r\n this._numberInputElement.setAttribute(\"min\", this.min.toString());\r\n }\r\n\r\n if (this.max !== undefined) {\r\n this._numberInputElement.setAttribute(\"max\", this.max.toString());\r\n }\r\n\r\n this._numberInputElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-numberInput\"\r\n );\r\n this._numberInputElement.style.width = \"100%\";\r\n\r\n this._numberInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (this.defaultValue !== undefined) {\r\n this._numberInputElement.valueAsNumber = this.defaultValue;\r\n }\r\n\r\n if (this.placeholder) {\r\n this._numberInputElement.placeholder = this.placeholder;\r\n this._numberInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n this._numberInputElement.oninput = () => {\r\n this.valueChanged();\r\n };\r\n\r\n return this._numberInputElement;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Number\";\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value !== undefined && !isNaN(this.value);\r\n }\r\n\r\n isValid(): boolean {\r\n if (this.value === undefined) {\r\n return !this.isRequired;\r\n }\r\n\r\n let result = true;\r\n\r\n if (this.min !== undefined) {\r\n result = result && this.value >= this.min;\r\n }\r\n\r\n if (this.max !== undefined) {\r\n result = result && this.value <= this.max;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get value(): number | undefined {\r\n return this._numberInputElement ? this._numberInputElement.valueAsNumber : undefined;\r\n }\r\n\r\n set value(value: number | undefined) {\r\n if (value && this._numberInputElement) {\r\n this._numberInputElement.value = value.toString();\r\n }\r\n }\r\n}\r\n\r\nexport class DateInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly minProperty = new StringProperty(Versions.v1_0, \"min\");\r\n static readonly maxProperty = new StringProperty(Versions.v1_0, \"max\");\r\n\r\n @property(DateInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(DateInput.minProperty)\r\n min?: string;\r\n\r\n @property(DateInput.maxProperty)\r\n max?: string;\r\n\r\n @property(DateInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n //#endregion\r\n\r\n private _dateInputElement: HTMLInputElement;\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._dateInputElement = document.createElement(\"input\");\r\n this._dateInputElement.setAttribute(\"type\", \"date\");\r\n\r\n if (this.min) {\r\n this._dateInputElement.setAttribute(\"min\", this.min);\r\n }\r\n\r\n if (this.max) {\r\n this._dateInputElement.setAttribute(\"max\", this.max);\r\n }\r\n\r\n if (this.placeholder) {\r\n this._dateInputElement.placeholder = this.placeholder;\r\n this._dateInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n this._dateInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n this._dateInputElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-dateInput\"\r\n );\r\n this._dateInputElement.style.width = \"100%\";\r\n\r\n this._dateInputElement.oninput = () => {\r\n this.valueChanged();\r\n };\r\n\r\n if (this.defaultValue) {\r\n this._dateInputElement.value = this.defaultValue;\r\n }\r\n\r\n return this._dateInputElement;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Date\";\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value ? true : false;\r\n }\r\n\r\n isValid(): boolean {\r\n if (!this.value) {\r\n return !this.isRequired;\r\n }\r\n\r\n const valueAsDate = new Date(this.value);\r\n\r\n let result = true;\r\n\r\n if (this.min) {\r\n const minDate = new Date(this.min);\r\n\r\n result = result && valueAsDate >= minDate;\r\n }\r\n\r\n if (this.max) {\r\n const maxDate = new Date(this.max);\r\n\r\n result = result && valueAsDate <= maxDate;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get value(): string | undefined {\r\n return this._dateInputElement ? this._dateInputElement.value : undefined;\r\n }\r\n}\r\n\r\nexport class TimeProperty extends CustomProperty {\r\n constructor(readonly targetVersion: Version, readonly name: string) {\r\n super(\r\n targetVersion,\r\n name,\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n const value = source[prop.name];\r\n\r\n if (typeof value === \"string\" && value && /^[0-9]{2}:[0-9]{2}$/.test(value)) {\r\n return value;\r\n }\r\n\r\n return undefined;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: string | undefined,\r\n context: BaseSerializationContext\r\n ) => {\r\n context.serializeValue(target, prop.name, value);\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport class TimeInput extends Input {\r\n private static convertTimeStringToDate(timeString: string): Date {\r\n return new Date(\"1973-09-04T\" + timeString + \":00Z\");\r\n }\r\n\r\n //#region Schema\r\n\r\n static readonly valueProperty = new TimeProperty(Versions.v1_0, \"value\");\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly minProperty = new TimeProperty(Versions.v1_0, \"min\");\r\n static readonly maxProperty = new TimeProperty(Versions.v1_0, \"max\");\r\n\r\n @property(TimeInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(TimeInput.minProperty)\r\n min?: string;\r\n\r\n @property(TimeInput.maxProperty)\r\n max?: string;\r\n\r\n @property(TimeInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n //#endregion\r\n\r\n private _timeInputElement: HTMLInputElement;\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._timeInputElement = document.createElement(\"input\");\r\n this._timeInputElement.setAttribute(\"type\", \"time\");\r\n\r\n if (this.min) {\r\n this._timeInputElement.setAttribute(\"min\", this.min);\r\n }\r\n\r\n if (this.max) {\r\n this._timeInputElement.setAttribute(\"max\", this.max);\r\n }\r\n\r\n this._timeInputElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-timeInput\"\r\n );\r\n this._timeInputElement.style.width = \"100%\";\r\n this._timeInputElement.oninput = () => {\r\n this.valueChanged();\r\n };\r\n\r\n if (this.placeholder) {\r\n this._timeInputElement.placeholder = this.placeholder;\r\n this._timeInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n this._timeInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (this.defaultValue) {\r\n this._timeInputElement.value = this.defaultValue;\r\n }\r\n\r\n return this._timeInputElement;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Time\";\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value ? true : false;\r\n }\r\n\r\n isValid(): boolean {\r\n if (!this.value) {\r\n return !this.isRequired;\r\n }\r\n\r\n const valueAsDate = TimeInput.convertTimeStringToDate(this.value);\r\n\r\n let result = true;\r\n\r\n if (this.min) {\r\n const minDate = TimeInput.convertTimeStringToDate(this.min);\r\n\r\n result = result && valueAsDate >= minDate;\r\n }\r\n\r\n if (this.max) {\r\n const maxDate = TimeInput.convertTimeStringToDate(this.max);\r\n\r\n result = result && valueAsDate <= maxDate;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get value(): string | undefined {\r\n return this._timeInputElement ? this._timeInputElement.value : undefined;\r\n }\r\n}\r\n\r\nexport const enum ActionButtonState {\r\n Normal,\r\n Expanded,\r\n Subdued\r\n}\r\n\r\nexport type ActionType = { new (): Action };\r\n\r\nexport abstract class Action extends CardObject {\r\n //#region Schema\r\n\r\n static readonly titleProperty = new StringProperty(Versions.v1_0, \"title\");\r\n static readonly iconUrlProperty = new StringProperty(Versions.v1_1, \"iconUrl\");\r\n static readonly styleProperty = new ValueSetProperty(\r\n Versions.v1_2,\r\n \"style\",\r\n [\r\n { value: Enums.ActionStyle.Default },\r\n { value: Enums.ActionStyle.Positive },\r\n { value: Enums.ActionStyle.Destructive }\r\n ],\r\n Enums.ActionStyle.Default\r\n );\r\n static readonly modeProperty = new ValueSetProperty(\r\n Versions.v1_5,\r\n \"mode\",\r\n [{ value: Enums.ActionMode.Primary }, { value: Enums.ActionMode.Secondary }],\r\n Enums.ActionMode.Primary\r\n );\r\n static readonly tooltipProperty = new StringProperty(Versions.v1_5, \"tooltip\");\r\n static readonly isEnabledProperty = new BoolProperty(Versions.v1_5, \"isEnabled\", true);\r\n\r\n @property(Action.titleProperty)\r\n title?: string;\r\n\r\n @property(Action.iconUrlProperty)\r\n iconUrl?: string;\r\n\r\n @property(Action.styleProperty)\r\n style: string = Enums.ActionStyle.Default;\r\n\r\n @property(Action.modeProperty)\r\n mode: string = Enums.ActionMode.Primary;\r\n\r\n @property(Action.tooltipProperty)\r\n tooltip?: string;\r\n\r\n @property(Action.isEnabledProperty)\r\n isEnabled: boolean;\r\n\r\n //#endregion\r\n\r\n private renderButtonContent() {\r\n if (this.renderedElement) {\r\n // Cache hostConfig for perf\r\n const hostConfig = this.hostConfig;\r\n\r\n const titleElement = document.createElement(\"div\");\r\n titleElement.style.overflow = \"hidden\";\r\n titleElement.style.textOverflow = \"ellipsis\";\r\n\r\n if (\r\n !(\r\n hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle ||\r\n hostConfig.actions.allowTitleToWrap\r\n )\r\n ) {\r\n titleElement.style.whiteSpace = \"nowrap\";\r\n }\r\n\r\n if (this.title) {\r\n titleElement.innerText = this.title;\r\n }\r\n\r\n if (!this.iconUrl) {\r\n this.renderedElement.classList.add(\"noIcon\");\r\n this.renderedElement.appendChild(titleElement);\r\n } else {\r\n const iconElement = document.createElement(\"img\");\r\n iconElement.src = this.iconUrl;\r\n iconElement.style.width = hostConfig.actions.iconSize + \"px\";\r\n iconElement.style.height = hostConfig.actions.iconSize + \"px\";\r\n iconElement.style.flex = \"0 0 auto\";\r\n\r\n if (hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle) {\r\n this.renderedElement.classList.add(\"iconAbove\");\r\n this.renderedElement.style.flexDirection = \"column\";\r\n\r\n if (this.title) {\r\n iconElement.style.marginBottom = \"6px\";\r\n }\r\n } else {\r\n this.renderedElement.classList.add(\"iconLeft\");\r\n\r\n iconElement.style.maxHeight = \"100%\";\r\n\r\n if (this.title) {\r\n iconElement.style.marginRight = \"6px\";\r\n }\r\n }\r\n\r\n this.renderedElement.appendChild(iconElement);\r\n this.renderedElement.appendChild(titleElement);\r\n }\r\n }\r\n }\r\n\r\n private getParentContainer(): Container | undefined {\r\n if (this.parent instanceof Container) {\r\n return this.parent;\r\n }\r\n\r\n return this.parent ? this.parent.getParentContainer() : undefined;\r\n }\r\n\r\n private _state: ActionButtonState = ActionButtonState.Normal;\r\n private _actionCollection?: ActionCollection; // hold the reference to its action collection\r\n private _isFocusable: boolean = true;\r\n\r\n isDesignMode(): boolean {\r\n const rootElement = this.getRootObject();\r\n\r\n return rootElement instanceof CardElement && rootElement.isDesignMode();\r\n }\r\n\r\n protected updateCssClasses() {\r\n if (this.parent && this.renderedElement) {\r\n const hostConfig = this.parent.hostConfig;\r\n\r\n this.renderedElement.className = hostConfig.makeCssClassName(\r\n this.isEffectivelyEnabled() ? \"ac-pushButton\" : \"ac-pushButton-disabled\"\r\n );\r\n\r\n const parentContainer = this.getParentContainer();\r\n\r\n if (parentContainer) {\r\n const parentContainerStyle = parentContainer.getEffectiveStyle();\r\n\r\n if (parentContainerStyle) {\r\n this.renderedElement.classList.add(\"style-\" + parentContainerStyle);\r\n }\r\n }\r\n\r\n this.renderedElement.tabIndex = !this.isDesignMode() && this.isFocusable ? 0 : -1;\r\n\r\n switch (this._state) {\r\n case ActionButtonState.Normal:\r\n // No additional classes needed\r\n break;\r\n\r\n case ActionButtonState.Expanded:\r\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"expanded\"));\r\n break;\r\n case ActionButtonState.Subdued:\r\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"subdued\"));\r\n break;\r\n }\r\n\r\n if (this.style && this.isEffectivelyEnabled()) {\r\n if (this.style === Enums.ActionStyle.Positive) {\r\n this.renderedElement.classList.add(\r\n ...hostConfig.makeCssClassNames(\"primary\", \"style-positive\")\r\n );\r\n } else {\r\n this.renderedElement.classList.add(\r\n ...hostConfig.makeCssClassNames(\"style-\" + this.style.toLowerCase())\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected getDefaultSerializationContext(): BaseSerializationContext {\r\n return new SerializationContext();\r\n }\r\n\r\n protected internalGetReferencedInputs(): Dictionary {\r\n return {};\r\n }\r\n\r\n protected internalPrepareForExecution(_inputs: Dictionary | undefined) {\r\n // Do nothing in base implementation\r\n }\r\n\r\n protected internalValidateInputs(referencedInputs: Dictionary | undefined): Input[] {\r\n const result: Input[] = [];\r\n\r\n if (referencedInputs) {\r\n for (const key of Object.keys(referencedInputs)) {\r\n const input = referencedInputs[key];\r\n\r\n if (!input.validateValue()) {\r\n result.push(input);\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n protected shouldSerialize(context: SerializationContext): boolean {\r\n return context.actionRegistry.findByName(this.getJsonTypeName()) !== undefined;\r\n }\r\n\r\n protected raiseExecuteActionEvent() {\r\n if (this.onExecute) {\r\n this.onExecute(this);\r\n }\r\n\r\n raiseExecuteActionEvent(this);\r\n }\r\n\r\n protected internalAfterExecute() {\r\n let rootObject = this.getRootObject();\r\n\r\n if (rootObject instanceof CardElement) {\r\n rootObject.updateActionsEnabledState();\r\n }\r\n }\r\n\r\n onExecute: (sender: Action) => void;\r\n\r\n getHref(): string | undefined {\r\n return \"\";\r\n }\r\n\r\n getAriaRole(): string {\r\n return \"button\";\r\n }\r\n\r\n setupElementForAccessibility(element: HTMLElement, promoteTooltipToLabel: boolean = false) {\r\n element.tabIndex = this.isEffectivelyEnabled() && !this.isDesignMode() ? 0 : -1;\r\n\r\n element.setAttribute(\"role\", this.getAriaRole());\r\n\r\n if (element instanceof HTMLButtonElement) {\r\n element.disabled = !this.isEffectivelyEnabled();\r\n }\r\n\r\n if (!this.isEffectivelyEnabled()) {\r\n element.setAttribute(\"aria-disabled\", \"true\");\r\n } else {\r\n element.removeAttribute(\"aria-disabled\");\r\n element.classList.add(this.hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n\r\n if (this.title) {\r\n element.setAttribute(\"aria-label\", this.title);\r\n element.title = this.title;\r\n } else {\r\n element.removeAttribute(\"aria-label\");\r\n element.removeAttribute(\"title\");\r\n }\r\n\r\n if (this.tooltip) {\r\n const targetAriaAttribute = promoteTooltipToLabel\r\n ? this.title\r\n ? \"aria-description\"\r\n : \"aria-label\"\r\n : \"aria-description\";\r\n\r\n element.setAttribute(targetAriaAttribute, this.tooltip);\r\n element.title = this.tooltip;\r\n }\r\n }\r\n\r\n parse(source: any, context?: SerializationContext) {\r\n return super.parse(source, context ? context : new SerializationContext());\r\n }\r\n\r\n render() {\r\n const buttonElement = document.createElement(\"button\");\r\n buttonElement.type = \"button\";\r\n buttonElement.style.display = \"flex\";\r\n buttonElement.style.alignItems = \"center\";\r\n buttonElement.style.justifyContent = \"center\";\r\n buttonElement.onclick = (e) => {\r\n if (this.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.execute();\r\n }\r\n };\r\n\r\n this._renderedElement = buttonElement;\r\n\r\n this.renderButtonContent();\r\n this.updateCssClasses();\r\n this.setupElementForAccessibility(buttonElement);\r\n }\r\n\r\n execute() {\r\n if (this._actionCollection) {\r\n this._actionCollection.actionExecuted(this);\r\n }\r\n\r\n this.raiseExecuteActionEvent();\r\n this.internalAfterExecute();\r\n }\r\n\r\n prepareForExecution(): boolean {\r\n const referencedInputs = this.getReferencedInputs();\r\n const invalidInputs = this.internalValidateInputs(referencedInputs);\r\n\r\n if (invalidInputs.length > 0) {\r\n invalidInputs[0].focus();\r\n\r\n return false;\r\n }\r\n\r\n this.internalPrepareForExecution(referencedInputs);\r\n\r\n return true;\r\n }\r\n\r\n remove(): boolean {\r\n if (this._actionCollection) {\r\n return this._actionCollection.removeAction(this);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return [];\r\n }\r\n\r\n getAllActions(): Action[] {\r\n return [this];\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n return this.iconUrl ? [{ url: this.iconUrl, mimeType: \"image\" }] : [];\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n return this.id === id ? this : undefined;\r\n }\r\n\r\n getReferencedInputs(): Dictionary | undefined {\r\n return this.internalGetReferencedInputs();\r\n }\r\n\r\n /**\r\n * Validates the inputs associated with this action.\r\n *\r\n * @returns A list of inputs that failed validation, or an empty array if no input failed validation.\r\n */\r\n validateInputs(): Input[] {\r\n return this.internalValidateInputs(this.getReferencedInputs());\r\n }\r\n\r\n updateEnabledState() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n isEffectivelyEnabled(): boolean {\r\n return this.isEnabled;\r\n }\r\n\r\n get isPrimary(): boolean {\r\n return this.style === Enums.ActionStyle.Positive;\r\n }\r\n\r\n set isPrimary(value: boolean) {\r\n if (value) {\r\n this.style = Enums.ActionStyle.Positive;\r\n } else {\r\n if (this.style === Enums.ActionStyle.Positive) {\r\n this.style = Enums.ActionStyle.Default;\r\n }\r\n }\r\n }\r\n\r\n get hostConfig(): HostConfig {\r\n return this.parent ? this.parent.hostConfig : defaultHostConfig;\r\n }\r\n\r\n get parent(): CardElement | undefined {\r\n return this._parent;\r\n }\r\n\r\n get state(): ActionButtonState {\r\n return this._state;\r\n }\r\n\r\n set state(value: ActionButtonState) {\r\n if (this._state !== value) {\r\n this._state = value;\r\n\r\n this.updateCssClasses();\r\n }\r\n }\r\n\r\n get isFocusable(): boolean {\r\n return this._isFocusable;\r\n }\r\n\r\n set isFocusable(value: boolean) {\r\n if (this._isFocusable !== value) {\r\n this._isFocusable = value;\r\n\r\n this.updateCssClasses();\r\n }\r\n }\r\n}\r\n\r\nexport abstract class SubmitActionBase extends Action {\r\n //#region Schema\r\n\r\n static readonly dataProperty = new PropertyDefinition(Versions.v1_0, \"data\");\r\n static readonly associatedInputsProperty = new CustomProperty(\r\n Versions.v1_3,\r\n \"associatedInputs\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n const value = source[prop.name];\r\n\r\n if (value !== undefined && typeof value === \"string\") {\r\n return value.toLowerCase() === \"none\" ? \"none\" : \"auto\";\r\n }\r\n\r\n return undefined;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: string | undefined,\r\n context: BaseSerializationContext\r\n ) => {\r\n context.serializeValue(target, prop.name, value);\r\n }\r\n );\r\n static readonly disabledUnlessAssociatedInputsChangeProperty = new BoolProperty(\r\n Versions.v1_6,\r\n \"disabledUnlessAssociatedInputsChange\",\r\n false\r\n );\r\n\r\n @property(SubmitActionBase.dataProperty)\r\n private _originalData?: PropertyBag;\r\n\r\n @property(SubmitActionBase.associatedInputsProperty)\r\n associatedInputs?: \"auto\" | \"none\";\r\n\r\n @property(SubmitActionBase.disabledUnlessAssociatedInputsChangeProperty)\r\n disabledUnlessAssociatedInputsChange: boolean = false;\r\n\r\n //#endregion\r\n\r\n private _isPrepared: boolean = false;\r\n private _processedData?: PropertyBag;\r\n private _areReferencedInputsDirty: boolean = false;\r\n\r\n protected internalGetReferencedInputs(): Dictionary {\r\n const result: Dictionary = {};\r\n\r\n if (this.associatedInputs !== \"none\") {\r\n let current: CardElement | undefined = this.parent;\r\n let inputs: Input[] = [];\r\n\r\n while (current) {\r\n inputs.push(...current.getAllInputs(false));\r\n\r\n current = current.parent;\r\n }\r\n\r\n for (const input of inputs) {\r\n if (input.id) {\r\n result[input.id] = input;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n protected internalPrepareForExecution(inputs: Dictionary | undefined) {\r\n if (this._originalData) {\r\n this._processedData = JSON.parse(JSON.stringify(this._originalData));\r\n } else {\r\n this._processedData = {};\r\n }\r\n\r\n if (this._processedData && inputs) {\r\n for (const key of Object.keys(inputs)) {\r\n const input = inputs[key];\r\n\r\n if (input.id && input.isSet()) {\r\n this._processedData[input.id] =\r\n typeof input.value === \"string\" ? input.value : input.value.toString();\r\n }\r\n }\r\n }\r\n\r\n this._isPrepared = true;\r\n }\r\n\r\n protected internalAfterExecute() {\r\n if (GlobalSettings.resetInputsDirtyStateAfterActionExecution) {\r\n this.resetReferencedInputsDirtyState();\r\n }\r\n }\r\n\r\n resetReferencedInputsDirtyState() {\r\n let referencedInputs = this.getReferencedInputs();\r\n\r\n this._areReferencedInputsDirty = false;\r\n\r\n if (referencedInputs) {\r\n for (const key of Object.keys(referencedInputs)) {\r\n const input = referencedInputs[key];\r\n\r\n input.resetDirtyState();\r\n }\r\n }\r\n }\r\n\r\n updateEnabledState() {\r\n this._areReferencedInputsDirty = false;\r\n\r\n let referencedInputs = this.getReferencedInputs();\r\n\r\n if (referencedInputs) {\r\n for (const key of Object.keys(referencedInputs)) {\r\n const input = referencedInputs[key];\r\n\r\n if (input.isDirty()) {\r\n this._areReferencedInputsDirty = true;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateCssClasses();\r\n\r\n if (this._renderedElement) {\r\n this.setupElementForAccessibility(this._renderedElement);\r\n }\r\n }\r\n\r\n isEffectivelyEnabled(): boolean {\r\n let result = super.isEffectivelyEnabled();\r\n\r\n return this.disabledUnlessAssociatedInputsChange\r\n ? result && this._areReferencedInputsDirty\r\n : result;\r\n }\r\n\r\n get data(): object | undefined {\r\n return this._isPrepared ? this._processedData : this._originalData;\r\n }\r\n\r\n set data(value: object | undefined) {\r\n this._originalData = value;\r\n this._isPrepared = false;\r\n }\r\n}\r\n\r\nexport class SubmitAction extends SubmitActionBase {\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.Submit\" = \"Action.Submit\";\r\n\r\n getJsonTypeName(): string {\r\n return SubmitAction.JsonTypeName;\r\n }\r\n}\r\n\r\nexport class ExecuteAction extends SubmitActionBase {\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.Execute\" = \"Action.Execute\";\r\n\r\n //#region Schema\r\n\r\n static readonly verbProperty = new StringProperty(Versions.v1_4, \"verb\");\r\n\r\n @property(ExecuteAction.verbProperty)\r\n verb: string;\r\n\r\n //#endregion\r\n\r\n getJsonTypeName(): string {\r\n return ExecuteAction.JsonTypeName;\r\n }\r\n}\r\n\r\nexport class OpenUrlAction extends Action {\r\n //#region Schema\r\n\r\n static readonly urlProperty = new StringProperty(Versions.v1_0, \"url\");\r\n\r\n @property(OpenUrlAction.urlProperty)\r\n url?: string;\r\n\r\n //#endregion\r\n\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.OpenUrl\" = \"Action.OpenUrl\";\r\n\r\n getJsonTypeName(): string {\r\n return OpenUrlAction.JsonTypeName;\r\n }\r\n\r\n getAriaRole(): string {\r\n return \"link\";\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (!this.url) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"url\")\r\n );\r\n }\r\n }\r\n\r\n getHref(): string | undefined {\r\n return this.url;\r\n }\r\n}\r\n\r\nexport class ToggleVisibilityAction extends Action {\r\n //#region Schema\r\n\r\n static readonly targetElementsProperty = new CustomProperty(\r\n Versions.v1_2,\r\n \"targetElements\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n const result: PropertyBag = {};\r\n\r\n if (Array.isArray(source[prop.name])) {\r\n for (const item of source[prop.name]) {\r\n if (typeof item === \"string\") {\r\n result[item] = undefined;\r\n } else if (typeof item === \"object\") {\r\n const elementId = item[\"elementId\"];\r\n\r\n if (typeof elementId === \"string\") {\r\n result[elementId] = Utils.parseBool(item[\"isVisible\"]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n const targetElements: any[] = [];\r\n\r\n for (const id of Object.keys(value)) {\r\n if (typeof value[id] === \"boolean\") {\r\n targetElements.push({\r\n elementId: id,\r\n isVisible: value[id]\r\n });\r\n } else {\r\n targetElements.push(id);\r\n }\r\n }\r\n\r\n context.serializeArray(target, prop.name, targetElements);\r\n },\r\n {},\r\n (sender: SerializableObject) => {\r\n return {};\r\n }\r\n );\r\n\r\n @property(ToggleVisibilityAction.targetElementsProperty)\r\n targetElements: { [key: string]: any } = {};\r\n\r\n //#endregion\r\n\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.ToggleVisibility\" = \"Action.ToggleVisibility\";\r\n\r\n private updateAriaControlsAttribute() {\r\n // apply aria labels to make it clear which elements this action will toggle\r\n if (this.targetElements) {\r\n const elementIds = Object.keys(this.targetElements);\r\n\r\n if (this._renderedElement) {\r\n if (elementIds.length > 0) {\r\n this._renderedElement.setAttribute(\"aria-controls\", elementIds.join(\" \"));\r\n } else {\r\n this._renderedElement.removeAttribute(\"aria-controls\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (!this.targetElements) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"targetElements\")\r\n );\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return ToggleVisibilityAction.JsonTypeName;\r\n }\r\n\r\n render() {\r\n super.render();\r\n\r\n this.updateAriaControlsAttribute();\r\n }\r\n\r\n execute() {\r\n super.execute();\r\n if (this.parent) {\r\n for (const elementId of Object.keys(this.targetElements)) {\r\n const targetElement = this.parent.getRootElement().getElementById(elementId);\r\n\r\n if (targetElement) {\r\n if (typeof this.targetElements[elementId] === \"boolean\") {\r\n targetElement.isVisible = this.targetElements[elementId];\r\n } else {\r\n targetElement.isVisible = !targetElement.isVisible;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n addTargetElement(elementId: string, isVisible: boolean | undefined = undefined) {\r\n this.targetElements[elementId] = isVisible;\r\n this.updateAriaControlsAttribute();\r\n }\r\n\r\n removeTargetElement(elementId: string) {\r\n delete this.targetElements[elementId];\r\n this.updateAriaControlsAttribute();\r\n }\r\n}\r\n\r\nclass StringWithSubstitutionProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): StringWithSubstitutions {\r\n const result = new StringWithSubstitutions();\r\n result.set(Utils.parseString(source[this.name]));\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: StringWithSubstitutions,\r\n context: BaseSerializationContext\r\n ): void {\r\n context.serializeValue(target, this.name, value.getOriginal());\r\n }\r\n\r\n constructor(readonly targetVersion: Version, readonly name: string) {\r\n super(targetVersion, name, undefined, () => {\r\n return new StringWithSubstitutions();\r\n });\r\n }\r\n}\r\n\r\nexport class HttpHeader extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly nameProperty = new StringProperty(Versions.v1_0, \"name\");\r\n static readonly valueProperty = new StringWithSubstitutionProperty(Versions.v1_0, \"value\");\r\n\r\n protected getSchemaKey(): string {\r\n return \"HttpHeader\";\r\n }\r\n\r\n @property(HttpHeader.nameProperty)\r\n name: string;\r\n\r\n @property(HttpHeader.valueProperty)\r\n private _value: StringWithSubstitutions;\r\n\r\n //#endregion\r\n\r\n constructor(name: string = \"\", value: string = \"\") {\r\n super();\r\n\r\n this.name = name;\r\n this.value = value;\r\n }\r\n\r\n getReferencedInputs(inputs: Input[], referencedInputs: Dictionary) {\r\n this._value.getReferencedInputs(inputs, referencedInputs);\r\n }\r\n\r\n prepareForExecution(inputs: Dictionary) {\r\n this._value.substituteInputValues(inputs, ContentTypes.applicationXWwwFormUrlencoded);\r\n }\r\n\r\n get value(): string | undefined {\r\n return this._value.get();\r\n }\r\n\r\n set value(newValue: string | undefined) {\r\n this._value.set(newValue);\r\n }\r\n}\r\n\r\nexport class HttpAction extends Action {\r\n //#region Schema\r\n\r\n static readonly urlProperty = new StringWithSubstitutionProperty(Versions.v1_0, \"url\");\r\n static readonly bodyProperty = new StringWithSubstitutionProperty(Versions.v1_0, \"body\");\r\n static readonly methodProperty = new StringProperty(Versions.v1_0, \"method\");\r\n static readonly headersProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_0,\r\n \"headers\",\r\n HttpHeader\r\n );\r\n static readonly ignoreInputValidationProperty = new BoolProperty(\r\n Versions.v1_3,\r\n \"ignoreInputValidation\",\r\n false\r\n );\r\n\r\n @property(HttpAction.urlProperty)\r\n private _url: StringWithSubstitutions;\r\n\r\n @property(HttpAction.bodyProperty)\r\n private _body: StringWithSubstitutions;\r\n\r\n @property(HttpAction.methodProperty)\r\n method?: string;\r\n\r\n @property(HttpAction.headersProperty)\r\n headers: HttpHeader[];\r\n\r\n @property(HttpAction.ignoreInputValidationProperty)\r\n private _ignoreInputValidation: boolean = false;\r\n\r\n //#endregion\r\n\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.Http\" = \"Action.Http\";\r\n\r\n protected internalGetReferencedInputs(): Dictionary {\r\n const allInputs = this.parent ? this.parent.getRootElement().getAllInputs() : [];\r\n const result: Dictionary = {};\r\n\r\n this._url.getReferencedInputs(allInputs, result);\r\n\r\n for (const header of this.headers) {\r\n header.getReferencedInputs(allInputs, result);\r\n }\r\n\r\n this._body.getReferencedInputs(allInputs, result);\r\n\r\n return result;\r\n }\r\n\r\n protected internalPrepareForExecution(inputs: Dictionary | undefined) {\r\n if (inputs) {\r\n this._url.substituteInputValues(inputs, ContentTypes.applicationXWwwFormUrlencoded);\r\n\r\n let contentType = ContentTypes.applicationJson;\r\n\r\n for (const header of this.headers) {\r\n header.prepareForExecution(inputs);\r\n\r\n if (header.name && header.name.toLowerCase() === \"content-type\") {\r\n contentType = header.value!;\r\n }\r\n }\r\n\r\n this._body.substituteInputValues(inputs, contentType);\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return HttpAction.JsonTypeName;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (!this.url) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"url\")\r\n );\r\n }\r\n\r\n if (this.headers.length > 0) {\r\n for (const header of this.headers) {\r\n if (!header.name) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.actionHttpHeadersMustHaveNameAndValue()\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n get ignoreInputValidation(): boolean {\r\n return this._ignoreInputValidation;\r\n }\r\n\r\n set ignoreInputValidation(value: boolean) {\r\n this._ignoreInputValidation = value;\r\n }\r\n\r\n get url(): string | undefined {\r\n return this._url.get();\r\n }\r\n\r\n set url(value: string | undefined) {\r\n this._url.set(value);\r\n }\r\n\r\n get body(): string | undefined {\r\n return this._body.get();\r\n }\r\n\r\n set body(value: string | undefined) {\r\n this._body.set(value);\r\n }\r\n}\r\n\r\nexport class ShowCardAction extends Action {\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.ShowCard\" = \"Action.ShowCard\";\r\n\r\n protected updateCssClasses() {\r\n super.updateCssClasses();\r\n\r\n if (this.renderedElement) {\r\n const effectiveHostConfig = this.parent ? this.parent.hostConfig : defaultHostConfig;\r\n\r\n this.renderedElement.classList.add(effectiveHostConfig.makeCssClassName(\"expandable\"));\r\n this.renderedElement.setAttribute(\r\n \"aria-expanded\",\r\n (this.state === ActionButtonState.Expanded).toString()\r\n );\r\n }\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n const jsonCard = source[\"card\"];\r\n\r\n if (jsonCard) {\r\n this.card.parse(jsonCard, context);\r\n } else {\r\n context.logParseEvent(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.showCardMustHaveCard()\r\n );\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n if (this.card) {\r\n context.serializeValue(target, \"card\", this.card.toJSON(context));\r\n }\r\n }\r\n\r\n protected raiseExecuteActionEvent() {\r\n if (this.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Popup) {\r\n // Only raise the event in Popup mode.\r\n super.raiseExecuteActionEvent();\r\n }\r\n }\r\n\r\n readonly card: AdaptiveCard = new InlineAdaptiveCard();\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n this.card.releaseDOMResources();\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return ShowCardAction.JsonTypeName;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n this.card.internalValidateProperties(context);\r\n }\r\n\r\n setParent(value: CardElement) {\r\n super.setParent(value);\r\n\r\n this.card.setParent(value);\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return this.card.getAllInputs(processActions);\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n result.push(...this.card.getAllActions());\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n let result = super.getResourceInformation();\r\n\r\n result.push(...this.card.getResourceInformation());\r\n\r\n return result;\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n let result = super.getActionById(id);\r\n\r\n if (!result) {\r\n result = this.card.getActionById(id);\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nclass OverflowAction extends Action {\r\n static readonly JsonTypeName: \"Action.Overflow\" = \"Action.Overflow\";\r\n private _actions: Action[];\r\n\r\n constructor(actions: Action[]) {\r\n super();\r\n this._actions = actions;\r\n\r\n this.title = Strings.defaults.overflowButtonText();\r\n }\r\n\r\n getActions(): readonly Action[] {\r\n return this._actions;\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n result.push(...this._actions);\r\n\r\n return result;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return ShowCardAction.JsonTypeName;\r\n }\r\n\r\n execute() {\r\n const shouldDisplayPopupMenu = !raiseDisplayOverflowActionMenuEvent(\r\n this,\r\n this.renderedElement\r\n );\r\n\r\n if (shouldDisplayPopupMenu && this.renderedElement) {\r\n const contextMenu = new PopupMenu();\r\n contextMenu.hostConfig = this.hostConfig;\r\n\r\n for (let i = 0; i < this._actions.length; i++) {\r\n const menuItem = new MenuItem(i.toString(), this._actions[i].title ?? \"\");\r\n menuItem.isEnabled = this._actions[i].isEnabled;\r\n menuItem.onClick = () => {\r\n const actionToExecute = this._actions[i];\r\n\r\n contextMenu.closePopup(false);\r\n\r\n if (actionToExecute.isEnabled) {\r\n actionToExecute.execute();\r\n }\r\n };\r\n\r\n contextMenu.items.add(menuItem);\r\n }\r\n\r\n contextMenu.popup(this.renderedElement);\r\n }\r\n }\r\n}\r\n\r\nclass ActionCollection {\r\n private _owner: CardElement;\r\n private _actionCardContainer: HTMLDivElement;\r\n private _expandedAction?: ShowCardAction;\r\n private _actionCard?: HTMLElement;\r\n\r\n private isActionAllowed(action: Action): boolean {\r\n const forbiddenTypes = this._owner.getForbiddenActionTypes();\r\n\r\n if (forbiddenTypes) {\r\n for (const forbiddenType of forbiddenTypes) {\r\n if (action.constructor === forbiddenType) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n private refreshContainer() {\r\n clearElement(this._actionCardContainer);\r\n\r\n if (!this._actionCard) {\r\n this._actionCardContainer.style.marginTop = \"0px\";\r\n\r\n return;\r\n }\r\n\r\n this._actionCardContainer.style.marginTop =\r\n this.renderedActionCount > 0\r\n ? this._owner.hostConfig.actions.showCard.inlineTopMargin + \"px\"\r\n : \"0px\";\r\n\r\n const padding = this._owner.getEffectivePadding();\r\n\r\n this._owner.getImmediateSurroundingPadding(padding);\r\n\r\n const physicalPadding =\r\n this._owner.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n\r\n if (this._actionCard) {\r\n this._actionCard.style.paddingLeft = physicalPadding.left + \"px\";\r\n this._actionCard.style.paddingRight = physicalPadding.right + \"px\";\r\n\r\n this._actionCard.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\r\n this._actionCard.style.marginRight = \"-\" + physicalPadding.right + \"px\";\r\n\r\n if (physicalPadding.bottom !== 0 && !this._owner.isDesignMode()) {\r\n this._actionCard.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this._actionCard.style.marginBottom = \"-\" + physicalPadding.bottom + \"px\";\r\n }\r\n\r\n Utils.appendChild(this._actionCardContainer, this._actionCard);\r\n }\r\n }\r\n\r\n private layoutChanged() {\r\n this._owner.getRootElement().updateLayout();\r\n }\r\n\r\n private showActionCard(\r\n action: ShowCardAction,\r\n suppressStyle: boolean = false,\r\n raiseEvent: boolean = true\r\n ) {\r\n (action.card).suppressStyle = suppressStyle;\r\n\r\n // Always re-render a ShowCard action in design mode; reuse already rendered ShowCard (if available) otherwise\r\n const renderedCard =\r\n action.card.renderedElement && !this._owner.isDesignMode()\r\n ? action.card.renderedElement\r\n : action.card.render();\r\n\r\n this._actionCard = renderedCard;\r\n this._expandedAction = action;\r\n\r\n this.refreshContainer();\r\n\r\n if (raiseEvent) {\r\n this.layoutChanged();\r\n\r\n raiseInlineCardExpandedEvent(action, true);\r\n }\r\n }\r\n\r\n private collapseExpandedAction() {\r\n for (const action of this._renderedActions) {\r\n action.state = ActionButtonState.Normal;\r\n }\r\n\r\n const previouslyExpandedAction = this._expandedAction;\r\n\r\n this._expandedAction = undefined;\r\n this._actionCard = undefined;\r\n\r\n this.refreshContainer();\r\n\r\n if (previouslyExpandedAction) {\r\n this.layoutChanged();\r\n\r\n raiseInlineCardExpandedEvent(previouslyExpandedAction, false);\r\n }\r\n }\r\n\r\n private expandShowCardAction(action: ShowCardAction, raiseEvent: boolean) {\r\n let afterSelectedAction = false;\r\n\r\n for (const renderedAction of this._renderedActions) {\r\n // Remove actions after selected action from tabOrder if the actions are oriented horizontally, to skip focus directly to expanded card\r\n if (\r\n this._owner.hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal &&\r\n afterSelectedAction\r\n ) {\r\n renderedAction.isFocusable = false;\r\n }\r\n\r\n if (renderedAction !== action) {\r\n renderedAction.state = ActionButtonState.Subdued;\r\n } else {\r\n renderedAction.state = ActionButtonState.Expanded;\r\n\r\n afterSelectedAction = true;\r\n\r\n if (renderedAction.renderedElement) {\r\n renderedAction.renderedElement.onblur = (_e) => {\r\n for (const ra of this._renderedActions) {\r\n ra.isFocusable = true;\r\n }\r\n };\r\n }\r\n }\r\n }\r\n\r\n this.showActionCard(\r\n action,\r\n !(this._owner.isAtTheVeryLeft() && this._owner.isAtTheVeryRight()),\r\n raiseEvent\r\n );\r\n }\r\n\r\n private _items: Action[] = [];\r\n private _overflowAction?: OverflowAction;\r\n private _renderedActions: Action[] = [];\r\n\r\n constructor(owner: CardElement) {\r\n this._owner = owner;\r\n }\r\n\r\n releaseDOMResources() {\r\n for (let action of this._renderedActions) {\r\n action.releaseDOMResources();\r\n }\r\n }\r\n\r\n actionExecuted(action: Action) {\r\n if (!(action instanceof ShowCardAction)) {\r\n this.collapseExpandedAction();\r\n } else {\r\n if (action === this._expandedAction) {\r\n this.collapseExpandedAction();\r\n } else if (\r\n this._owner.hostConfig.actions.showCard.actionMode ===\r\n Enums.ShowCardActionMode.Inline\r\n ) {\r\n this.expandShowCardAction(action, true);\r\n }\r\n }\r\n }\r\n\r\n parse(source: any, context: SerializationContext) {\r\n this.clear();\r\n\r\n if (Array.isArray(source)) {\r\n for (const jsonAction of source) {\r\n let forbiddenActions: string[] = [];\r\n\r\n // If the action owner is a ContainerWithActions, we should check for forbidden actions\r\n if (this._owner instanceof ContainerWithActions) {\r\n forbiddenActions = this._owner.getForbiddenActionNames();\r\n }\r\n\r\n const action = context.parseAction(\r\n this._owner,\r\n jsonAction,\r\n forbiddenActions,\r\n !this._owner.isDesignMode()\r\n );\r\n\r\n if (action) {\r\n this.addAction(action);\r\n }\r\n }\r\n }\r\n }\r\n\r\n toJSON(target: PropertyBag, propertyName: string, context: SerializationContext): any {\r\n context.serializeArray(target, propertyName, this._items);\r\n }\r\n\r\n getActionAt(id: number): Action | undefined {\r\n return this._items[id];\r\n }\r\n\r\n getActionCount(): number {\r\n return this._items.length;\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n let result: Action | undefined = undefined;\r\n\r\n for (const item of this._items) {\r\n result = item.getActionById(id);\r\n\r\n if (result) {\r\n break;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n validateProperties(context: ValidationResults) {\r\n if (\r\n this._owner.hostConfig.actions.maxActions &&\r\n this._items.length > this._owner.hostConfig.actions.maxActions\r\n ) {\r\n context.addFailure(\r\n this._owner,\r\n Enums.ValidationEvent.TooManyActions,\r\n Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions)\r\n );\r\n }\r\n\r\n if (this._items.length > 0 && !this._owner.hostConfig.supportsInteractivity) {\r\n context.addFailure(\r\n this._owner,\r\n Enums.ValidationEvent.InteractivityNotAllowed,\r\n Strings.errors.interactivityNotAllowed()\r\n );\r\n }\r\n\r\n for (const item of this._items) {\r\n if (!this.isActionAllowed(item)) {\r\n context.addFailure(\r\n this._owner,\r\n Enums.ValidationEvent.ActionTypeNotAllowed,\r\n Strings.errors.actionTypeNotAllowed(item.getJsonTypeName())\r\n );\r\n }\r\n\r\n item.internalValidateProperties(context);\r\n }\r\n }\r\n\r\n render(orientation: Enums.Orientation): HTMLElement | undefined {\r\n // Cache hostConfig for better perf\r\n const hostConfig = this._owner.hostConfig;\r\n\r\n if (!hostConfig.supportsInteractivity) {\r\n return undefined;\r\n }\r\n\r\n const element = document.createElement(\"div\");\r\n const maxActions = hostConfig.actions.maxActions\r\n ? Math.min(hostConfig.actions.maxActions, this._items.length)\r\n : this._items.length;\r\n\r\n this._actionCardContainer = document.createElement(\"div\");\r\n this._renderedActions = [];\r\n\r\n if (\r\n hostConfig.actions.preExpandSingleShowCardAction &&\r\n maxActions === 1 &&\r\n this._items[0] instanceof ShowCardAction &&\r\n this.isActionAllowed(this._items[0])\r\n ) {\r\n this.showActionCard(this._items[0], true);\r\n this._renderedActions.push(this._items[0]);\r\n } else {\r\n const buttonStrip = document.createElement(\"div\");\r\n buttonStrip.className = hostConfig.makeCssClassName(\"ac-actionSet\");\r\n buttonStrip.style.display = \"flex\";\r\n\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n buttonStrip.style.flexDirection = \"row\";\r\n\r\n if (\r\n this._owner.horizontalAlignment &&\r\n hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch\r\n ) {\r\n switch (this._owner.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Center:\r\n buttonStrip.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n buttonStrip.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n } else {\r\n switch (hostConfig.actions.actionAlignment) {\r\n case Enums.ActionAlignment.Center:\r\n buttonStrip.style.justifyContent = \"center\";\r\n break;\r\n case Enums.ActionAlignment.Right:\r\n buttonStrip.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n }\r\n } else {\r\n buttonStrip.style.flexDirection = \"column\";\r\n\r\n if (\r\n this._owner.horizontalAlignment &&\r\n hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch\r\n ) {\r\n switch (this._owner.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Center:\r\n buttonStrip.style.alignItems = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n buttonStrip.style.alignItems = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.alignItems = \"flex-start\";\r\n break;\r\n }\r\n } else {\r\n switch (hostConfig.actions.actionAlignment) {\r\n case Enums.ActionAlignment.Center:\r\n buttonStrip.style.alignItems = \"center\";\r\n break;\r\n case Enums.ActionAlignment.Right:\r\n buttonStrip.style.alignItems = \"flex-end\";\r\n break;\r\n case Enums.ActionAlignment.Stretch:\r\n buttonStrip.style.alignItems = \"stretch\";\r\n break;\r\n default:\r\n buttonStrip.style.alignItems = \"flex-start\";\r\n break;\r\n }\r\n }\r\n }\r\n\r\n const allowedActions = this._items.filter(this.isActionAllowed.bind(this));\r\n\r\n let primaryActions: Action[] = [];\r\n const secondaryActions: Action[] = [];\r\n\r\n if (!this._owner.isDesignMode()) {\r\n allowedActions.forEach((action) =>\r\n action.mode === Enums.ActionMode.Secondary\r\n ? secondaryActions.push(action)\r\n : primaryActions.push(action)\r\n );\r\n\r\n // If primaryActions.length > maxActions, extra actions are moved to overflow\r\n const overflowPrimaryActions = primaryActions.splice(hostConfig.actions.maxActions);\r\n\r\n if (GlobalSettings.allowMoreThanMaxActionsInOverflowMenu) {\r\n secondaryActions.push(...overflowPrimaryActions);\r\n }\r\n\r\n let shouldRenderOverflowActionButton = true;\r\n\r\n if (secondaryActions.length > 0) {\r\n if (!this._overflowAction) {\r\n this._overflowAction = new OverflowAction(secondaryActions);\r\n this._overflowAction.setParent(this._owner);\r\n this._overflowAction[\"_actionCollection\"] = this;\r\n }\r\n\r\n const isRootAction = this._owner instanceof AdaptiveCard && !this._owner.parent;\r\n shouldRenderOverflowActionButton = !raiseRenderOverflowActionsEvent(\r\n this._overflowAction,\r\n isRootAction\r\n );\r\n }\r\n\r\n if (this._overflowAction && shouldRenderOverflowActionButton) {\r\n primaryActions.push(this._overflowAction);\r\n }\r\n } else {\r\n primaryActions = allowedActions;\r\n }\r\n\r\n for (let i = 0; i < primaryActions.length; i++) {\r\n const action = primaryActions[i];\r\n action.render();\r\n\r\n if (action.renderedElement) {\r\n if (\r\n hostConfig.actions.actionsOrientation === Enums.Orientation.Horizontal &&\r\n hostConfig.actions.actionAlignment === Enums.ActionAlignment.Stretch\r\n ) {\r\n action.renderedElement.style.flex = \"0 1 100%\";\r\n } else {\r\n action.renderedElement.style.flex = \"0 1 auto\";\r\n }\r\n\r\n buttonStrip.appendChild(action.renderedElement);\r\n\r\n this._renderedActions.push(action);\r\n\r\n if (i < primaryActions.length - 1 && hostConfig.actions.buttonSpacing > 0) {\r\n const spacer = document.createElement(\"div\");\r\n\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n spacer.style.flex = \"0 0 auto\";\r\n spacer.style.width = hostConfig.actions.buttonSpacing + \"px\";\r\n } else {\r\n spacer.style.height = hostConfig.actions.buttonSpacing + \"px\";\r\n }\r\n\r\n Utils.appendChild(buttonStrip, spacer);\r\n }\r\n }\r\n }\r\n\r\n const buttonStripContainer = document.createElement(\"div\");\r\n buttonStripContainer.style.overflow = \"hidden\";\r\n buttonStripContainer.appendChild(buttonStrip);\r\n\r\n Utils.appendChild(element, buttonStripContainer);\r\n }\r\n\r\n Utils.appendChild(element, this._actionCardContainer);\r\n\r\n for (const renderedAction of this._renderedActions) {\r\n if (renderedAction.state === ActionButtonState.Expanded) {\r\n this.expandShowCardAction(renderedAction, false);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this._renderedActions.length > 0 ? element : undefined;\r\n }\r\n\r\n addAction(action: Action) {\r\n if (!action) {\r\n throw new Error(\"The action parameter cannot be null.\");\r\n }\r\n\r\n if ((!action.parent || action.parent === this._owner) && this._items.indexOf(action) < 0) {\r\n this._items.push(action);\r\n\r\n if (!action.parent) {\r\n action.setParent(this._owner);\r\n }\r\n\r\n action[\"_actionCollection\"] = this;\r\n } else {\r\n throw new Error(Strings.errors.actionAlreadyParented());\r\n }\r\n }\r\n\r\n removeAction(action: Action): boolean {\r\n if (this.expandedAction && this._expandedAction === action) {\r\n this.collapseExpandedAction();\r\n }\r\n\r\n const actionIndex = this._items.indexOf(action);\r\n\r\n if (actionIndex >= 0) {\r\n this._items.splice(actionIndex, 1);\r\n\r\n action.setParent(undefined);\r\n\r\n action[\"_actionCollection\"] = undefined;\r\n\r\n for (let i = 0; i < this._renderedActions.length; i++) {\r\n if (this._renderedActions[i] === action) {\r\n this._renderedActions.splice(i, 1);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n clear() {\r\n this._items = [];\r\n this._renderedActions = [];\r\n this._expandedAction = undefined;\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n let result: Input[] = [];\r\n\r\n if (processActions) {\r\n for (const action of this._items) {\r\n result.push(...action.getAllInputs());\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n let result: IResourceInformation[] = [];\r\n\r\n for (const action of this._items) {\r\n result.push(...action.getResourceInformation());\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get renderedActionCount(): number {\r\n return this._renderedActions.length;\r\n }\r\n\r\n get expandedAction(): ShowCardAction | undefined {\r\n return this._expandedAction;\r\n }\r\n}\r\n\r\nexport class ActionSet extends CardElement {\r\n //#region Schema\r\n\r\n static readonly orientationProperty = new EnumProperty(\r\n Versions.v1_1,\r\n \"orientation\",\r\n Enums.Orientation\r\n );\r\n\r\n @property(ActionSet.orientationProperty)\r\n orientation?: Enums.Orientation;\r\n\r\n //#endregion\r\n\r\n private _actionCollection: ActionCollection;\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this._actionCollection.parse(source[\"actions\"], context);\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n this._actionCollection.toJSON(target, \"actions\", context);\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n return this._actionCollection.render(\r\n this.orientation !== undefined\r\n ? this.orientation\r\n : this.hostConfig.actions.actionsOrientation\r\n );\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this._actionCollection = new ActionCollection(this);\r\n }\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n this._actionCollection.releaseDOMResources();\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n if (this._actionCollection.renderedActionCount === 0) {\r\n return super.isBleedingAtBottom();\r\n } else {\r\n if (this._actionCollection.getActionCount() === 1) {\r\n return (\r\n this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction\r\n );\r\n } else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"ActionSet\";\r\n }\r\n\r\n getActionCount(): number {\r\n return this._actionCollection.getActionCount();\r\n }\r\n\r\n getActionAt(index: number): Action | undefined {\r\n if (index >= 0 && index < this.getActionCount()) {\r\n return this._actionCollection.getActionAt(index);\r\n } else {\r\n return super.getActionAt(index);\r\n }\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n const result: Action | undefined = this._actionCollection.getActionById(id);\r\n\r\n return result ? result : super.getActionById(id);\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n let action = this.getActionAt(i);\r\n\r\n if (action) {\r\n result.push(action);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n this._actionCollection.validateProperties(context);\r\n }\r\n\r\n addAction(action: Action) {\r\n this._actionCollection.addAction(action);\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return processActions ? this._actionCollection.getAllInputs() : [];\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n return this._actionCollection.getResourceInformation();\r\n }\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n findDOMNodeOwner(node: Node): CardObject | undefined {\r\n let target: CardObject | undefined = undefined;\r\n\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n const action = this.getActionAt(i);\r\n\r\n if (action) {\r\n // recur through each Action\r\n target = action.findDOMNodeOwner(node);\r\n\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n }\r\n\r\n // if not found in any Action, defer to parent implementation\r\n return super.findDOMNodeOwner(node);\r\n }\r\n\r\n get isInteractive(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport class ContainerStyleProperty extends ValueSetProperty {\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: string,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => string\r\n ) {\r\n super(\r\n targetVersion,\r\n name,\r\n [\r\n { value: Enums.ContainerStyle.Default },\r\n { value: Enums.ContainerStyle.Emphasis },\r\n { targetVersion: Versions.v1_2, value: Enums.ContainerStyle.Accent },\r\n { targetVersion: Versions.v1_2, value: Enums.ContainerStyle.Good },\r\n { targetVersion: Versions.v1_2, value: Enums.ContainerStyle.Attention },\r\n { targetVersion: Versions.v1_2, value: Enums.ContainerStyle.Warning }\r\n ],\r\n defaultValue,\r\n onGetInitialValue\r\n );\r\n }\r\n}\r\n\r\nexport abstract class StylableCardElementContainer extends CardElementContainer {\r\n //#region Schema\r\n\r\n static readonly styleProperty = new ContainerStyleProperty(Versions.v1_0, \"style\");\r\n\r\n @property(StylableCardElementContainer.styleProperty)\r\n get style(): string | undefined {\r\n if (this.allowCustomStyle) {\r\n const style = this.getValue(StylableCardElementContainer.styleProperty);\r\n\r\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\r\n return style;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n set style(value: string | undefined) {\r\n this.setValue(StylableCardElementContainer.styleProperty, value);\r\n }\r\n\r\n //#endregion\r\n\r\n protected get allowCustomStyle(): boolean {\r\n return true;\r\n }\r\n\r\n protected get hasExplicitStyle(): boolean {\r\n return this.getValue(StylableCardElementContainer.styleProperty) !== undefined;\r\n }\r\n\r\n protected applyBorder() {\r\n // No border in base implementation\r\n }\r\n\r\n protected applyBackground() {\r\n if (this.renderedElement) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(\r\n this.style,\r\n this.hostConfig.containerStyles.getStyleByName(this.defaultStyle)\r\n );\r\n\r\n if (styleDefinition.backgroundColor) {\r\n const bgColor = Utils.stringToCssColor(styleDefinition.backgroundColor);\r\n if (bgColor) {\r\n this.renderedElement.style.backgroundColor = bgColor;\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected applyPadding() {\r\n super.applyPadding();\r\n\r\n if (!this.renderedElement) {\r\n return;\r\n }\r\n\r\n let physicalPadding = new SpacingDefinition();\r\n\r\n if (this.getEffectivePadding()) {\r\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(\r\n this.getEffectivePadding()\r\n );\r\n }\r\n\r\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\r\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\r\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\r\n\r\n if (this.isBleeding()) {\r\n // Bleed into the first parent that does have padding\r\n const padding = new PaddingDefinition();\r\n\r\n this.getImmediateSurroundingPadding(padding);\r\n\r\n const surroundingPadding =\r\n this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n\r\n this.renderedElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\r\n this.renderedElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\r\n\r\n if (!this.isDesignMode()) {\r\n this.renderedElement.style.marginTop = \"-\" + surroundingPadding.top + \"px\";\r\n this.renderedElement.style.marginBottom = \"-\" + surroundingPadding.bottom + \"px\";\r\n }\r\n\r\n if (\r\n this.separatorElement &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal\r\n ) {\r\n this.separatorElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\r\n this.separatorElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\r\n }\r\n } else {\r\n this.renderedElement.style.marginRight = \"0\";\r\n this.renderedElement.style.marginLeft = \"0\";\r\n this.renderedElement.style.marginTop = \"0\";\r\n this.renderedElement.style.marginBottom = \"0\";\r\n\r\n if (\r\n this.separatorElement &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal\r\n ) {\r\n this.separatorElement.style.marginRight = \"0\";\r\n this.separatorElement.style.marginLeft = \"0\";\r\n }\r\n }\r\n }\r\n\r\n protected getHasBackground(ignoreBackgroundImages: boolean = false): boolean {\r\n let currentElement: CardElement | undefined = this.parent;\r\n\r\n while (currentElement) {\r\n let currentElementHasBackgroundImage: boolean = false;\r\n\r\n if (ignoreBackgroundImages) {\r\n currentElementHasBackgroundImage = false;\r\n } else {\r\n currentElementHasBackgroundImage =\r\n currentElement instanceof Container\r\n ? currentElement.backgroundImage.isValid()\r\n : false;\r\n }\r\n\r\n if (currentElement instanceof StylableCardElementContainer) {\r\n if (\r\n this.hasExplicitStyle &&\r\n (currentElement.getEffectiveStyle() !== this.getEffectiveStyle() ||\r\n currentElementHasBackgroundImage)\r\n ) {\r\n return true;\r\n }\r\n }\r\n\r\n currentElement = currentElement.parent;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return this.getHasBackground() || this.getHasBorder()\r\n ? new PaddingDefinition(\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding\r\n )\r\n : super.getDefaultPadding();\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n const explicitStyle = this.getValue(StylableCardElementContainer.styleProperty);\r\n\r\n if (explicitStyle !== undefined) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(explicitStyle);\r\n\r\n if (!styleDefinition) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(explicitStyle, \"style\")\r\n );\r\n }\r\n }\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n const renderedElement = super.render();\r\n\r\n if (renderedElement && this.getHasBackground()) {\r\n this.applyBackground();\r\n }\r\n\r\n this.applyBorder();\r\n\r\n return renderedElement;\r\n }\r\n\r\n getEffectiveStyle(): string {\r\n const effectiveStyle = this.style;\r\n\r\n return effectiveStyle ? effectiveStyle : super.getEffectiveStyle();\r\n }\r\n}\r\n\r\nexport abstract class ContainerBase extends StylableCardElementContainer {\r\n //#region Schema\r\n\r\n static readonly bleedProperty = new BoolProperty(Versions.v1_2, \"bleed\", false);\r\n static readonly minHeightProperty = new PixelSizeProperty(Versions.v1_2, \"minHeight\");\r\n\r\n @property(ContainerBase.bleedProperty)\r\n private _bleed: boolean = false;\r\n\r\n @property(ContainerBase.minHeightProperty)\r\n minPixelHeight?: number;\r\n\r\n //#endregion\r\n\r\n protected adjustRenderedElementSize(renderedElement: HTMLElement) {\r\n super.adjustRenderedElementSize(renderedElement);\r\n\r\n if (this.minPixelHeight) {\r\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\r\n }\r\n }\r\n\r\n protected getHasExpandedAction(): boolean {\r\n return false;\r\n }\r\n\r\n protected getBleed(): boolean {\r\n return this._bleed;\r\n }\r\n\r\n protected setBleed(value: boolean) {\r\n this._bleed = value;\r\n }\r\n\r\n protected get renderedActionCount(): number {\r\n return 0;\r\n }\r\n\r\n isBleeding(): boolean {\r\n return (this.getHasBackground() || this.hostConfig.alwaysAllowBleed) && this.getBleed();\r\n }\r\n}\r\n\r\nexport class BackgroundImage extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly urlProperty = new StringProperty(Versions.v1_0, \"url\");\r\n static readonly fillModeProperty = new EnumProperty(\r\n Versions.v1_2,\r\n \"fillMode\",\r\n Enums.FillMode,\r\n Enums.FillMode.Cover\r\n );\r\n static readonly horizontalAlignmentProperty = new EnumProperty(\r\n Versions.v1_2,\r\n \"horizontalAlignment\",\r\n Enums.HorizontalAlignment,\r\n Enums.HorizontalAlignment.Left\r\n );\r\n static readonly verticalAlignmentProperty = new EnumProperty(\r\n Versions.v1_2,\r\n \"verticalAlignment\",\r\n Enums.VerticalAlignment,\r\n Enums.VerticalAlignment.Top\r\n );\r\n\r\n @property(BackgroundImage.urlProperty)\r\n url?: string;\r\n\r\n @property(BackgroundImage.fillModeProperty)\r\n fillMode: Enums.FillMode;\r\n\r\n @property(BackgroundImage.horizontalAlignmentProperty)\r\n horizontalAlignment: Enums.HorizontalAlignment;\r\n\r\n @property(BackgroundImage.verticalAlignmentProperty)\r\n verticalAlignment: Enums.VerticalAlignment;\r\n\r\n //#endregion\r\n\r\n protected getSchemaKey(): string {\r\n return \"BackgroundImage\";\r\n }\r\n\r\n protected internalParse(source: any, context: BaseSerializationContext) {\r\n if (typeof source === \"string\") {\r\n this.resetDefaultValues();\r\n this.url = source;\r\n } else {\r\n return super.internalParse(source, context);\r\n }\r\n }\r\n\r\n apply(element: CardElement) {\r\n if (this.url && element.renderedElement) {\r\n element.renderedElement.style.backgroundImage =\r\n \"url('\" +\r\n element.preProcessPropertyValue(BackgroundImage.urlProperty, this.url) +\r\n \"')\";\r\n\r\n switch (this.fillMode) {\r\n case Enums.FillMode.Repeat:\r\n element.renderedElement.style.backgroundRepeat = \"repeat\";\r\n break;\r\n case Enums.FillMode.RepeatHorizontally:\r\n element.renderedElement.style.backgroundRepeat = \"repeat-x\";\r\n break;\r\n case Enums.FillMode.RepeatVertically:\r\n element.renderedElement.style.backgroundRepeat = \"repeat-y\";\r\n break;\r\n case Enums.FillMode.Cover:\r\n default:\r\n element.renderedElement.style.backgroundRepeat = \"no-repeat\";\r\n element.renderedElement.style.backgroundSize = \"cover\";\r\n break;\r\n }\r\n\r\n switch (this.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Left:\r\n break;\r\n case Enums.HorizontalAlignment.Center:\r\n element.renderedElement.style.backgroundPositionX = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.renderedElement.style.backgroundPositionX = \"right\";\r\n break;\r\n }\r\n\r\n switch (this.verticalAlignment) {\r\n case Enums.VerticalAlignment.Top:\r\n break;\r\n case Enums.VerticalAlignment.Center:\r\n element.renderedElement.style.backgroundPositionY = \"center\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n element.renderedElement.style.backgroundPositionY = \"bottom\";\r\n break;\r\n }\r\n }\r\n }\r\n\r\n isValid(): boolean {\r\n return this.url ? true : false;\r\n }\r\n}\r\n\r\nexport class Container extends ContainerBase {\r\n //#region Schema\r\n static readonly backgroundImageProperty = new SerializableObjectProperty(\r\n Versions.v1_0,\r\n \"backgroundImage\",\r\n BackgroundImage\r\n );\r\n static readonly verticalContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_1,\r\n \"verticalContentAlignment\",\r\n Enums.VerticalAlignment\r\n );\r\n static readonly rtlProperty = new BoolProperty(Versions.v1_0, \"rtl\");\r\n\r\n @property(Container.backgroundImageProperty)\r\n get backgroundImage(): BackgroundImage {\r\n return this.getValue(Container.backgroundImageProperty);\r\n }\r\n\r\n @property(Container.verticalContentAlignmentProperty)\r\n verticalContentAlignment?: Enums.VerticalAlignment;\r\n\r\n @property(Container.rtlProperty)\r\n rtl?: boolean;\r\n\r\n //#endregion\r\n\r\n private _items: CardElement[] = [];\r\n private _renderedItems: CardElement[] = [];\r\n\r\n protected insertItemAt(item: CardElement, index: number, forceInsert: boolean) {\r\n if (!item.parent || forceInsert) {\r\n if (item.isStandalone) {\r\n if (index < 0 || index >= this._items.length) {\r\n this._items.push(item);\r\n } else {\r\n this._items.splice(index, 0, item);\r\n }\r\n\r\n item.setParent(this);\r\n } else {\r\n throw new Error(Strings.errors.elementTypeNotStandalone(item.getJsonTypeName()));\r\n }\r\n } else {\r\n throw new Error(Strings.errors.elementAlreadyParented());\r\n }\r\n }\r\n\r\n protected getItemsCollectionPropertyName(): string {\r\n return \"items\";\r\n }\r\n\r\n protected applyBackground() {\r\n if (this.backgroundImage.isValid() && this.renderedElement) {\r\n this.backgroundImage.apply(this);\r\n }\r\n\r\n super.applyBackground();\r\n }\r\n\r\n protected applyRTL(element: HTMLElement) {\r\n if (this.rtl !== undefined) {\r\n element.dir = this.rtl ? \"rtl\" : \"ltr\";\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._renderedItems = [];\r\n\r\n // Cache hostConfig to avoid walking the parent hierarchy several times\r\n const hostConfig = this.hostConfig;\r\n\r\n const element = document.createElement(\"div\");\r\n\r\n this.applyRTL(element);\r\n\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-container\"));\r\n element.style.display = \"flex\";\r\n element.style.flexDirection = \"column\";\r\n\r\n if (GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // Forces the container to be at least as tall as its content.\r\n //\r\n // Fixes a quirk in Chrome where, for nested flex elements, the\r\n // inner element's height would never exceed the outer element's\r\n // height. This caused overflow truncation to break -- containers\r\n // would always be measured as not overflowing, since their heights\r\n // were constrained by their parents as opposed to truly reflecting\r\n // the height of their content.\r\n //\r\n // See the \"Browser Rendering Notes\" section of this answer:\r\n // https://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size\r\n element.style.minHeight = \"-webkit-min-content\";\r\n }\r\n\r\n switch (this.getEffectiveVerticalContentAlignment()) {\r\n case Enums.VerticalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n\r\n if (this._items.length > 0) {\r\n for (const item of this._items) {\r\n const renderedItem = this.isElementAllowed(item) ? item.render() : undefined;\r\n\r\n if (renderedItem) {\r\n if (this._renderedItems.length > 0 && item.separatorElement) {\r\n item.separatorElement.style.flex = \"0 0 auto\";\r\n\r\n Utils.appendChild(element, item.separatorElement);\r\n }\r\n\r\n Utils.appendChild(element, renderedItem);\r\n\r\n this._renderedItems.push(item);\r\n }\r\n }\r\n } else {\r\n if (this.isDesignMode()) {\r\n const placeholderElement = this.createPlaceholderElement();\r\n placeholderElement.style.width = \"100%\";\r\n placeholderElement.style.height = \"100%\";\r\n\r\n element.appendChild(placeholderElement);\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n protected truncateOverflow(maxHeight: number): boolean {\r\n if (this.renderedElement) {\r\n // Add 1 to account for rounding differences between browsers\r\n const boundary = this.renderedElement.offsetTop + maxHeight + 1;\r\n\r\n const handleElement = (cardElement: CardElement) => {\r\n const elt = cardElement.renderedElement;\r\n\r\n if (elt) {\r\n switch (Utils.getFitStatus(elt, boundary)) {\r\n case Enums.ContainerFitStatus.FullyInContainer:\r\n const sizeChanged = cardElement[\"resetOverflow\"]();\r\n // If the element's size changed after resetting content,\r\n // we have to check if it still fits fully in the card\r\n if (sizeChanged) {\r\n handleElement(cardElement);\r\n }\r\n break;\r\n case Enums.ContainerFitStatus.Overflowing:\r\n const containerMaxHeight = boundary - elt.offsetTop;\r\n cardElement[\"handleOverflow\"](containerMaxHeight);\r\n break;\r\n case Enums.ContainerFitStatus.FullyOutOfContainer:\r\n cardElement[\"handleOverflow\"](0);\r\n break;\r\n }\r\n }\r\n };\r\n\r\n for (const item of this._items) {\r\n handleElement(item);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected undoOverflowTruncation() {\r\n for (const item of this._items) {\r\n item[\"resetOverflow\"]();\r\n }\r\n }\r\n\r\n protected getHasBackground(ignoreBackgroundImages: boolean = false): boolean {\r\n let result = ignoreBackgroundImages ? false : this.backgroundImage.isValid();\r\n\r\n return result || super.getHasBackground(ignoreBackgroundImages);\r\n }\r\n\r\n protected canHostSingletons() {\r\n return false;\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this.clear();\r\n this.setShouldFallback(false);\r\n\r\n let jsonItems = source[this.getItemsCollectionPropertyName()];\r\n\r\n if (\r\n !Array.isArray(jsonItems) &&\r\n typeof jsonItems === \"object\" &&\r\n this.canHostSingletons()\r\n ) {\r\n const typeName = Utils.parseString(jsonItems[\"type\"]);\r\n if (typeName) {\r\n const registration = context.elementRegistry.findByName(typeName);\r\n if (registration?.singletonBehavior !== ElementSingletonBehavior.NotAllowed) {\r\n const element = context.parseElement(\r\n this,\r\n jsonItems,\r\n [],\r\n !this.isDesignMode(),\r\n true\r\n );\r\n\r\n if (element) {\r\n this.insertItemAt(element, -1, true);\r\n }\r\n }\r\n }\r\n } else if (Array.isArray(jsonItems)) {\r\n for (const item of jsonItems) {\r\n const element = context.parseElement(\r\n this,\r\n item,\r\n this.forbiddenChildElements(),\r\n !this.isDesignMode()\r\n );\r\n\r\n if (element) {\r\n this.insertItemAt(element, -1, true);\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n const collectionPropertyName = this.getItemsCollectionPropertyName();\r\n\r\n if (\r\n this._items.length === 1 &&\r\n this._items[0].getElementSingletonBehavior() === ElementSingletonBehavior.Only\r\n ) {\r\n // If the element is only allowed in a singleton context, parse it to an object instead of an array\r\n context.serializeValue(target, collectionPropertyName, this._items[0].toJSON(context));\r\n } else {\r\n context.serializeArray(target, collectionPropertyName, this._items);\r\n }\r\n }\r\n\r\n protected get isSelectable(): boolean {\r\n return true;\r\n }\r\n\r\n getEffectivePadding(): PaddingDefinition {\r\n if (\r\n GlobalSettings.removePaddingFromContainersWithBackgroundImage &&\r\n !this.getHasBackground(true)\r\n ) {\r\n return new PaddingDefinition();\r\n }\r\n\r\n return super.getEffectivePadding();\r\n }\r\n\r\n getEffectiveVerticalContentAlignment(): Enums.VerticalAlignment {\r\n if (this.verticalContentAlignment !== undefined) {\r\n return this.verticalContentAlignment;\r\n }\r\n\r\n const parentContainer = this.getParentContainer();\r\n\r\n return parentContainer\r\n ? parentContainer.getEffectiveVerticalContentAlignment()\r\n : Enums.VerticalAlignment.Top;\r\n }\r\n\r\n getItemCount(): number {\r\n return this._items.length;\r\n }\r\n\r\n getItemAt(index: number): CardElement {\r\n return this._items[index];\r\n }\r\n\r\n getFirstVisibleRenderedItem(): CardElement | undefined {\r\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\r\n for (const item of this._renderedItems) {\r\n if (item.isVisible) {\r\n return item;\r\n }\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n getLastVisibleRenderedItem(): CardElement | undefined {\r\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\r\n for (let i = this._renderedItems.length - 1; i >= 0; i--) {\r\n if (this._renderedItems[i].isVisible) {\r\n return this._renderedItems[i];\r\n }\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Container\";\r\n }\r\n\r\n isFirstElement(element: CardElement): boolean {\r\n const designMode = this.isDesignMode();\r\n\r\n for (const item of this._items) {\r\n if (item.isVisible || designMode) {\r\n return item === element;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isLastElement(element: CardElement): boolean {\r\n const designMode = this.isDesignMode();\r\n\r\n for (let i = this._items.length - 1; i >= 0; i--) {\r\n if (this._items[i].isVisible || designMode) {\r\n return this._items[i] === element;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isRtl(): boolean {\r\n if (this.rtl !== undefined) {\r\n return this.rtl;\r\n } else {\r\n const parentContainer = this.getParentContainer();\r\n\r\n return parentContainer ? parentContainer.isRtl() : false;\r\n }\r\n }\r\n\r\n isBleedingAtTop(): boolean {\r\n const firstRenderedItem = this.getFirstVisibleRenderedItem();\r\n\r\n return (\r\n this.isBleeding() || (firstRenderedItem ? firstRenderedItem.isBleedingAtTop() : false)\r\n );\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n const lastRenderedItem = this.getLastVisibleRenderedItem();\r\n\r\n return (\r\n this.isBleeding() ||\r\n (lastRenderedItem\r\n ? lastRenderedItem.isBleedingAtBottom() &&\r\n lastRenderedItem.getEffectiveStyle() === this.getEffectiveStyle()\r\n : false)\r\n );\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return this._items.indexOf(cardElement);\r\n }\r\n\r\n addItem(item: CardElement) {\r\n this.insertItemAt(item, -1, false);\r\n }\r\n\r\n insertItemBefore(item: CardElement, insertBefore: CardElement) {\r\n this.insertItemAt(item, this._items.indexOf(insertBefore), false);\r\n }\r\n\r\n insertItemAfter(item: CardElement, insertAfter: CardElement) {\r\n this.insertItemAt(item, this._items.indexOf(insertAfter) + 1, false);\r\n }\r\n\r\n removeItem(item: CardElement): boolean {\r\n const itemIndex = this._items.indexOf(item);\r\n\r\n if (itemIndex >= 0) {\r\n this._items.splice(itemIndex, 1);\r\n\r\n item.setParent(undefined);\r\n\r\n this.updateLayout();\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n clear() {\r\n this._items = [];\r\n this._renderedItems = [];\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n const result = super.getResourceInformation();\r\n\r\n if (this.backgroundImage.isValid()) {\r\n result.push({\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- validated by `isValid()`\r\n url: this.backgroundImage.url!,\r\n mimeType: \"image\"\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n let result: Action | undefined = super.getActionById(id);\r\n\r\n if (!result) {\r\n if (this.selectAction) {\r\n result = this.selectAction.getActionById(id);\r\n }\r\n\r\n if (!result) {\r\n for (const item of this._items) {\r\n result = item.getActionById(id);\r\n\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get padding(): PaddingDefinition | undefined {\r\n return this.getPadding();\r\n }\r\n\r\n set padding(value: PaddingDefinition | undefined) {\r\n this.setPadding(value);\r\n }\r\n\r\n get selectAction(): Action | undefined {\r\n return this._selectAction;\r\n }\r\n\r\n set selectAction(value: Action | undefined) {\r\n this._selectAction = value;\r\n }\r\n\r\n get bleed(): boolean {\r\n return this.getBleed();\r\n }\r\n\r\n set bleed(value: boolean) {\r\n this.setBleed(value);\r\n }\r\n}\r\n\r\nexport type ColumnWidth = SizeAndUnit | \"auto\" | \"stretch\";\r\n\r\nexport class Column extends Container {\r\n //#region Schema\r\n\r\n static readonly widthProperty = new CustomProperty(\r\n Versions.v1_0,\r\n \"width\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n let result: ColumnWidth = prop.defaultValue;\r\n const value = source[prop.name];\r\n let invalidWidth = false;\r\n\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new SizeAndUnit(value, Enums.SizeUnit.Weight);\r\n } else if (value === \"auto\" || value === \"stretch\") {\r\n result = value;\r\n } else if (typeof value === \"string\") {\r\n try {\r\n result = SizeAndUnit.parse(value);\r\n\r\n if (\r\n result.unit === Enums.SizeUnit.Pixel &&\r\n prop.targetVersion.compareTo(context.targetVersion) > 0\r\n ) {\r\n invalidWidth = true;\r\n }\r\n } catch (e) {\r\n invalidWidth = true;\r\n }\r\n } else {\r\n invalidWidth = true;\r\n }\r\n\r\n if (invalidWidth) {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidColumnWidth(value)\r\n );\r\n\r\n result = \"auto\";\r\n }\r\n\r\n return result;\r\n },\r\n (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n target: PropertyBag,\r\n value: ColumnWidth,\r\n context: BaseSerializationContext\r\n ) => {\r\n if (value instanceof SizeAndUnit) {\r\n if (value.unit === Enums.SizeUnit.Pixel) {\r\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\r\n } else {\r\n context.serializeNumber(target, \"width\", value.physicalSize);\r\n }\r\n } else {\r\n context.serializeValue(target, \"width\", value);\r\n }\r\n },\r\n \"stretch\"\r\n );\r\n\r\n @property(Column.widthProperty)\r\n width: ColumnWidth = \"stretch\";\r\n\r\n //#endregion\r\n\r\n private _computedWeight: number = 0;\r\n\r\n protected adjustRenderedElementSize(renderedElement: HTMLElement) {\r\n const minDesignTimeColumnHeight = 20;\r\n\r\n if (this.isDesignMode()) {\r\n renderedElement.style.minWidth = \"20px\";\r\n renderedElement.style.minHeight =\r\n (!this.minPixelHeight\r\n ? minDesignTimeColumnHeight\r\n : Math.max(this.minPixelHeight, minDesignTimeColumnHeight)) + \"px\";\r\n } else {\r\n renderedElement.style.minWidth = \"0\";\r\n\r\n if (this.minPixelHeight) {\r\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\r\n }\r\n }\r\n\r\n if (this.width === \"auto\") {\r\n renderedElement.style.flex = \"0 1 auto\";\r\n } else if (this.width === \"stretch\") {\r\n renderedElement.style.flex = \"1 1 50px\";\r\n } else if (this.width instanceof SizeAndUnit) {\r\n if (this.width.unit === Enums.SizeUnit.Pixel) {\r\n renderedElement.style.flex = \"0 0 auto\";\r\n renderedElement.style.width = this.width.physicalSize + \"px\";\r\n } else {\r\n renderedElement.style.flex =\r\n \"1 1 \" +\r\n (this._computedWeight > 0 ? this._computedWeight : this.width.physicalSize) +\r\n \"%\";\r\n }\r\n }\r\n }\r\n\r\n protected shouldSerialize(_context: SerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n protected get separatorOrientation(): Enums.Orientation {\r\n return Enums.Orientation.Vertical;\r\n }\r\n\r\n constructor(width: ColumnWidth = \"stretch\") {\r\n super();\r\n\r\n this.width = width;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Column\";\r\n }\r\n\r\n get hasVisibleSeparator(): boolean {\r\n if (this.parent && this.parent instanceof ColumnSet) {\r\n return this.separatorElement !== undefined && !this.parent.isLeftMostElement(this);\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport class ColumnSet extends ContainerBase {\r\n private _columns: Column[] = [];\r\n private _renderedColumns: Column[];\r\n\r\n private createColumnInstance(source: any, context: SerializationContext): Column | undefined {\r\n return context.parseCardObject(\r\n this,\r\n source,\r\n [],\r\n !this.isDesignMode(),\r\n (typeName: string) => {\r\n return !typeName || typeName === \"Column\" ? new Column() : undefined;\r\n },\r\n (typeName: string, _errorType: Enums.TypeErrorType) => {\r\n context.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.ElementTypeNotAllowed,\r\n Strings.errors.elementTypeNotAllowed(typeName)\r\n );\r\n }\r\n );\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._renderedColumns = [];\r\n\r\n if (this._columns.length > 0) {\r\n // Cache hostConfig to avoid walking the parent hierarchy several times\r\n const hostConfig = this.hostConfig;\r\n\r\n const element = document.createElement(\"div\");\r\n element.className = hostConfig.makeCssClassName(\"ac-columnSet\");\r\n element.style.display = \"flex\";\r\n\r\n if (GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // See comment in Container.internalRender()\r\n element.style.minHeight = \"-webkit-min-content\";\r\n }\r\n\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n\r\n let totalWeight: number = 0;\r\n\r\n for (const column of this._columns) {\r\n if (\r\n column.width instanceof SizeAndUnit &&\r\n column.width.unit === Enums.SizeUnit.Weight\r\n ) {\r\n totalWeight += column.width.physicalSize;\r\n }\r\n }\r\n\r\n for (const column of this._columns) {\r\n if (\r\n column.width instanceof SizeAndUnit &&\r\n column.width.unit === Enums.SizeUnit.Weight &&\r\n totalWeight > 0\r\n ) {\r\n const computedWeight = (100 / totalWeight) * column.width.physicalSize;\r\n\r\n // Best way to emulate \"internal\" access I know of\r\n column[\"_computedWeight\"] = computedWeight;\r\n }\r\n\r\n const renderedColumn = column.render();\r\n\r\n if (renderedColumn) {\r\n if (this._renderedColumns.length > 0 && column.separatorElement) {\r\n column.separatorElement.style.flex = \"0 0 auto\";\r\n\r\n Utils.appendChild(element, column.separatorElement);\r\n }\r\n\r\n Utils.appendChild(element, renderedColumn);\r\n\r\n this._renderedColumns.push(column);\r\n }\r\n }\r\n\r\n return this._renderedColumns.length > 0 ? element : undefined;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n protected truncateOverflow(maxHeight: number): boolean {\r\n for (const column of this._columns) {\r\n column[\"handleOverflow\"](maxHeight);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n protected undoOverflowTruncation() {\r\n for (const column of this._columns) {\r\n column[\"resetOverflow\"]();\r\n }\r\n }\r\n\r\n protected get isSelectable(): boolean {\r\n return true;\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this._columns = [];\r\n this._renderedColumns = [];\r\n\r\n const jsonColumns = source[\"columns\"];\r\n\r\n if (Array.isArray(jsonColumns)) {\r\n for (const item of jsonColumns) {\r\n const column = this.createColumnInstance(item, context);\r\n\r\n if (column) {\r\n this._columns.push(column);\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n context.serializeArray(target, \"columns\", this._columns);\r\n }\r\n\r\n isFirstElement(element: CardElement): boolean {\r\n for (const column of this._columns) {\r\n if (column.isVisible) {\r\n return column === element;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isBleedingAtTop(): boolean {\r\n if (this.isBleeding()) {\r\n return true;\r\n }\r\n\r\n if (this._renderedColumns && this._renderedColumns.length > 0) {\r\n for (const column of this._columns) {\r\n if (column.isBleedingAtTop()) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n if (this.isBleeding()) {\r\n return true;\r\n }\r\n\r\n if (this._renderedColumns && this._renderedColumns.length > 0) {\r\n for (const column of this._columns) {\r\n if (column.isBleedingAtBottom()) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n getItemCount(): number {\r\n return this._columns.length;\r\n }\r\n\r\n getFirstVisibleRenderedItem(): CardElement | undefined {\r\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\r\n return this._renderedColumns[0];\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n getLastVisibleRenderedItem(): CardElement | undefined {\r\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\r\n return this._renderedColumns[this._renderedColumns.length - 1];\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n getColumnAt(index: number): Column {\r\n return this._columns[index];\r\n }\r\n\r\n getItemAt(index: number): CardElement {\r\n return this.getColumnAt(index);\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"ColumnSet\";\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n let weightedColumns: number = 0;\r\n let stretchedColumns: number = 0;\r\n\r\n for (const column of this._columns) {\r\n if (typeof column.width === \"number\") {\r\n weightedColumns++;\r\n } else if (column.width === \"stretch\") {\r\n stretchedColumns++;\r\n }\r\n }\r\n\r\n if (weightedColumns > 0 && stretchedColumns > 0) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.Hint,\r\n Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet()\r\n );\r\n }\r\n }\r\n\r\n addColumn(column: Column) {\r\n if (!column.parent) {\r\n this._columns.push(column);\r\n\r\n column.setParent(this);\r\n } else {\r\n throw new Error(Strings.errors.columnAlreadyBelongsToAnotherSet());\r\n }\r\n }\r\n\r\n removeItem(item: CardElement): boolean {\r\n if (item instanceof Column) {\r\n const itemIndex = this._columns.indexOf(item);\r\n\r\n if (itemIndex >= 0) {\r\n this._columns.splice(itemIndex, 1);\r\n\r\n item.setParent(undefined);\r\n\r\n this.updateLayout();\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return cardElement instanceof Column ? this._columns.indexOf(cardElement) : -1;\r\n }\r\n\r\n isLeftMostElement(element: CardElement): boolean {\r\n return this._columns.indexOf(element) === 0;\r\n }\r\n\r\n isRightMostElement(element: CardElement): boolean {\r\n return this._columns.indexOf(element) === this._columns.length - 1;\r\n }\r\n\r\n isTopElement(element: CardElement): boolean {\r\n return this._columns.indexOf(element) >= 0;\r\n }\r\n\r\n isBottomElement(element: CardElement): boolean {\r\n return this._columns.indexOf(element) >= 0;\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n let result: Action | undefined = undefined;\r\n\r\n for (const column of this._columns) {\r\n result = column.getActionById(id);\r\n\r\n if (result) {\r\n break;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get bleed(): boolean {\r\n return this.getBleed();\r\n }\r\n\r\n set bleed(value: boolean) {\r\n this.setBleed(value);\r\n }\r\n\r\n get padding(): PaddingDefinition | undefined {\r\n return this.getPadding();\r\n }\r\n\r\n set padding(value: PaddingDefinition | undefined) {\r\n this.setPadding(value);\r\n }\r\n\r\n get selectAction(): Action | undefined {\r\n return this._selectAction;\r\n }\r\n\r\n set selectAction(value: Action | undefined) {\r\n this._selectAction = value;\r\n }\r\n}\r\n\r\nfunction raiseImageLoadedEvent(image: Image) {\r\n const card = image.getRootElement() as AdaptiveCard;\r\n const onImageLoadedHandler =\r\n card && card.onImageLoaded ? card.onImageLoaded : AdaptiveCard.onImageLoaded;\r\n\r\n if (onImageLoadedHandler) {\r\n onImageLoadedHandler(image);\r\n }\r\n}\r\n\r\nfunction raiseAnchorClickedEvent(\r\n element: CardElement,\r\n anchor: HTMLAnchorElement,\r\n ev?: MouseEvent\r\n): boolean {\r\n const card = element.getRootElement() as AdaptiveCard;\r\n const onAnchorClickedHandler =\r\n card && card.onAnchorClicked ? card.onAnchorClicked : AdaptiveCard.onAnchorClicked;\r\n\r\n return onAnchorClickedHandler !== undefined\r\n ? onAnchorClickedHandler(element, anchor, ev)\r\n : false;\r\n}\r\n\r\nfunction raiseExecuteActionEvent(action: Action) {\r\n const card = action.parent ? (action.parent.getRootElement() as AdaptiveCard) : undefined;\r\n const onExecuteActionHandler =\r\n card && card.onExecuteAction ? card.onExecuteAction : AdaptiveCard.onExecuteAction;\r\n\r\n if (action.prepareForExecution() && onExecuteActionHandler) {\r\n onExecuteActionHandler(action);\r\n }\r\n}\r\n\r\nfunction raiseInlineCardExpandedEvent(action: ShowCardAction, isExpanded: boolean) {\r\n const card = action.parent ? (action.parent.getRootElement() as AdaptiveCard) : undefined;\r\n const onInlineCardExpandedHandler =\r\n card && card.onInlineCardExpanded\r\n ? card.onInlineCardExpanded\r\n : AdaptiveCard.onInlineCardExpanded;\r\n\r\n if (onInlineCardExpandedHandler) {\r\n onInlineCardExpandedHandler(action, isExpanded);\r\n }\r\n}\r\n\r\nfunction raiseInputValueChangedEvent(input: Input) {\r\n const card = input.getRootElement() as AdaptiveCard;\r\n const onInputValueChangedHandler =\r\n card && card.onInputValueChanged\r\n ? card.onInputValueChanged\r\n : AdaptiveCard.onInputValueChanged;\r\n\r\n if (onInputValueChangedHandler) {\r\n onInputValueChangedHandler(input);\r\n }\r\n}\r\n\r\nfunction raiseElementVisibilityChangedEvent(\r\n element: CardElement,\r\n shouldUpdateLayout: boolean = true\r\n) {\r\n const rootElement = element.getRootElement();\r\n\r\n if (shouldUpdateLayout) {\r\n rootElement.updateLayout();\r\n }\r\n\r\n const card = rootElement as AdaptiveCard;\r\n const onElementVisibilityChangedHandler =\r\n card && card.onElementVisibilityChanged\r\n ? card.onElementVisibilityChanged\r\n : AdaptiveCard.onElementVisibilityChanged;\r\n\r\n if (onElementVisibilityChangedHandler !== undefined) {\r\n onElementVisibilityChangedHandler(element);\r\n }\r\n}\r\n\r\n/**\r\n * @returns return false to continue with default context menu; return true to skip SDK default context menu\r\n */\r\nfunction raiseDisplayOverflowActionMenuEvent(\r\n action: OverflowAction,\r\n target?: HTMLElement\r\n): boolean {\r\n const card = action.parent ? (action.parent.getRootElement() as AdaptiveCard) : undefined;\r\n const onDisplayOverflowActionMenuHandler =\r\n card && card.onDisplayOverflowActionMenu\r\n ? card.onDisplayOverflowActionMenu\r\n : AdaptiveCard.onDisplayOverflowActionMenu;\r\n\r\n return onDisplayOverflowActionMenuHandler !== undefined\r\n ? onDisplayOverflowActionMenuHandler(action.getActions(), target)\r\n : false;\r\n}\r\n\r\n/**\r\n * @returns return false to continue with default action button; return true to skip SDK default action button\r\n */\r\nfunction raiseRenderOverflowActionsEvent(\r\n action: OverflowAction,\r\n isAtRootLevelActions: boolean\r\n): boolean {\r\n const card = action.parent ? (action.parent.getRootElement() as AdaptiveCard) : undefined;\r\n const onRenderOverflowActionsHandler =\r\n card && card.onRenderOverflowActions\r\n ? card.onRenderOverflowActions\r\n : AdaptiveCard.onRenderOverflowActions;\r\n\r\n return onRenderOverflowActionsHandler !== undefined\r\n ? onRenderOverflowActionsHandler(action.getActions(), isAtRootLevelActions)\r\n : false;\r\n}\r\n\r\nexport abstract class ContainerWithActions extends Container {\r\n private _actionCollection: ActionCollection;\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this.parseActions(source, context);\r\n }\r\n\r\n protected parseActions(source: any, context: SerializationContext) {\r\n this._actionCollection.parse(source[\"actions\"], context);\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n this._actionCollection.toJSON(target, \"actions\", context);\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const element = super.internalRender();\r\n\r\n if (element) {\r\n const renderedActions = this._actionCollection.render(\r\n this.hostConfig.actions.actionsOrientation\r\n );\r\n\r\n if (renderedActions) {\r\n Utils.appendChild(\r\n element,\r\n renderSeparation(\r\n this.hostConfig,\r\n {\r\n spacing: this.hostConfig.getEffectiveSpacing(\r\n this.hostConfig.actions.spacing\r\n )\r\n },\r\n Enums.Orientation.Horizontal\r\n )\r\n );\r\n Utils.appendChild(element, renderedActions);\r\n }\r\n\r\n if (this.renderIfEmpty) {\r\n return element;\r\n } else {\r\n return element.children.length > 0 ? element : undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n protected getHasExpandedAction(): boolean {\r\n if (this.renderedActionCount === 0) {\r\n return false;\r\n } else if (this.renderedActionCount === 1) {\r\n return (\r\n this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction\r\n );\r\n } else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n\r\n protected get renderedActionCount(): number {\r\n return this._actionCollection.renderedActionCount;\r\n }\r\n\r\n protected get renderIfEmpty(): boolean {\r\n return false;\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this._actionCollection = new ActionCollection(this);\r\n }\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n this._actionCollection.releaseDOMResources();\r\n }\r\n\r\n getActionCount(): number {\r\n return this._actionCollection.getActionCount();\r\n }\r\n\r\n getActionAt(index: number): Action | undefined {\r\n if (index >= 0 && index < this.getActionCount()) {\r\n return this._actionCollection.getActionAt(index);\r\n } else {\r\n return super.getActionAt(index);\r\n }\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n const result: Action | undefined = this._actionCollection.getActionById(id);\r\n\r\n return result ? result : super.getActionById(id);\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (this._actionCollection) {\r\n this._actionCollection.validateProperties(context);\r\n }\r\n }\r\n\r\n isLastElement(element: CardElement): boolean {\r\n return super.isLastElement(element) && this._actionCollection.getActionCount() === 0;\r\n }\r\n\r\n addAction(action: Action) {\r\n this._actionCollection.addAction(action);\r\n }\r\n\r\n clear() {\r\n super.clear();\r\n\r\n this._actionCollection.clear();\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n let result = super.getAllInputs(processActions);\r\n\r\n if (processActions) {\r\n result.push(...this._actionCollection.getAllInputs(processActions));\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n let result = super.getResourceInformation();\r\n\r\n result.push(...this._actionCollection.getResourceInformation());\r\n\r\n return result;\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n if (this._actionCollection.renderedActionCount === 0) {\r\n return super.isBleedingAtBottom();\r\n } else {\r\n if (this._actionCollection.getActionCount() === 1) {\r\n return (\r\n this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction\r\n );\r\n } else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n }\r\n\r\n getForbiddenActionNames(): string[] {\r\n return [];\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport interface IMarkdownProcessingResult {\r\n didProcess: boolean;\r\n outputHtml?: any;\r\n}\r\n\r\nexport class RefreshActionProperty extends PropertyDefinition {\r\n parse(\r\n sender: RefreshDefinition,\r\n source: PropertyBag,\r\n context: SerializationContext\r\n ): ExecuteAction | undefined {\r\n const action = context.parseAction(sender.parent, source[this.name], [], false);\r\n\r\n if (action !== undefined) {\r\n if (action instanceof ExecuteAction) {\r\n return action;\r\n }\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.ActionTypeNotAllowed,\r\n Strings.errors.actionTypeNotAllowed(action.getJsonTypeName())\r\n );\r\n }\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"action\")\r\n );\r\n\r\n return undefined;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: ExecuteAction | undefined,\r\n context: SerializationContext\r\n ) {\r\n context.serializeValue(\r\n target,\r\n this.name,\r\n value ? value.toJSON(context) : undefined,\r\n undefined,\r\n true\r\n );\r\n }\r\n\r\n constructor(readonly targetVersion: Version, readonly name: string) {\r\n super(targetVersion, name, undefined);\r\n }\r\n}\r\n\r\nexport class RefreshDefinition extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly actionProperty = new RefreshActionProperty(Versions.v1_4, \"action\");\r\n static readonly userIdsProperty = new StringArrayProperty(Versions.v1_4, \"userIds\");\r\n\r\n @property(RefreshDefinition.actionProperty)\r\n get action(): ExecuteAction {\r\n return this.getValue(RefreshDefinition.actionProperty);\r\n }\r\n\r\n set action(value: ExecuteAction) {\r\n this.setValue(RefreshDefinition.actionProperty, value);\r\n\r\n if (value) {\r\n value.setParent(this.parent);\r\n }\r\n }\r\n\r\n @property(RefreshDefinition.userIdsProperty)\r\n userIds?: string[];\r\n\r\n protected getSchemaKey(): string {\r\n return \"RefreshDefinition\";\r\n }\r\n\r\n //#endregion\r\n\r\n parent: CardElement;\r\n}\r\n\r\nexport class AuthCardButton extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly typeProperty = new StringProperty(Versions.v1_4, \"type\");\r\n static readonly titleProperty = new StringProperty(Versions.v1_4, \"title\");\r\n static readonly imageProperty = new StringProperty(Versions.v1_4, \"image\");\r\n static readonly valueProperty = new StringProperty(Versions.v1_4, \"value\");\r\n\r\n protected getSchemaKey(): string {\r\n return \"AuthCardButton\";\r\n }\r\n\r\n //#endregion\r\n\r\n @property(AuthCardButton.typeProperty)\r\n type: string;\r\n\r\n @property(AuthCardButton.titleProperty)\r\n title?: string;\r\n\r\n @property(AuthCardButton.imageProperty)\r\n image?: string;\r\n\r\n @property(AuthCardButton.valueProperty)\r\n value: string;\r\n}\r\n\r\nexport class TokenExchangeResource extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly idProperty = new StringProperty(Versions.v1_4, \"id\");\r\n static readonly uriProperty = new StringProperty(Versions.v1_4, \"uri\");\r\n static readonly providerIdProperty = new StringProperty(Versions.v1_4, \"providerId\");\r\n\r\n protected getSchemaKey(): string {\r\n return \"TokenExchangeResource\";\r\n }\r\n\r\n //#endregion\r\n\r\n @property(TokenExchangeResource.idProperty)\r\n id?: string;\r\n\r\n @property(TokenExchangeResource.uriProperty)\r\n uri?: string;\r\n\r\n @property(TokenExchangeResource.providerIdProperty)\r\n providerId?: string;\r\n}\r\n\r\nexport class Authentication extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly textProperty = new StringProperty(Versions.v1_4, \"text\");\r\n static readonly connectionNameProperty = new StringProperty(Versions.v1_4, \"connectionName\");\r\n static readonly buttonsProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_4,\r\n \"buttons\",\r\n AuthCardButton\r\n );\r\n static readonly tokenExchangeResourceProperty = new SerializableObjectProperty(\r\n Versions.v1_4,\r\n \"tokenExchangeResource\",\r\n TokenExchangeResource,\r\n true\r\n );\r\n\r\n protected getSchemaKey(): string {\r\n return \"Authentication\";\r\n }\r\n\r\n //#endregion\r\n\r\n @property(Authentication.textProperty)\r\n text?: string;\r\n\r\n @property(Authentication.connectionNameProperty)\r\n connectionName?: string;\r\n\r\n @property(Authentication.buttonsProperty)\r\n buttons: AuthCardButton[];\r\n\r\n @property(Authentication.tokenExchangeResourceProperty)\r\n tokenExchangeResource?: TokenExchangeResource;\r\n}\r\n\r\n// @dynamic\r\nexport class AdaptiveCard extends ContainerWithActions {\r\n static readonly schemaUrl = \"http://adaptivecards.io/schemas/adaptive-card.json\";\r\n\r\n //#region Schema\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n protected static readonly $schemaProperty = new CustomProperty(\r\n Versions.v1_0,\r\n \"$schema\",\r\n (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n return AdaptiveCard.schemaUrl;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: Versions | undefined,\r\n context: BaseSerializationContext\r\n ) => {\r\n context.serializeValue(target, prop.name, AdaptiveCard.schemaUrl);\r\n }\r\n );\r\n\r\n static readonly versionProperty = new CustomProperty(\r\n Versions.v1_0,\r\n \"version\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n let version = Version.parse(source[prop.name], context);\r\n\r\n if (version === undefined) {\r\n version = Versions.latest;\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidCardVersion(version.toString())\r\n );\r\n }\r\n\r\n return version;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: Version | undefined,\r\n context: BaseSerializationContext\r\n ) => {\r\n if (value !== undefined) {\r\n context.serializeValue(target, prop.name, value.toString());\r\n }\r\n },\r\n Versions.v1_0\r\n );\r\n\r\n static readonly fallbackTextProperty = new StringProperty(Versions.v1_0, \"fallbackText\");\r\n static readonly speakProperty = new StringProperty(Versions.v1_0, \"speak\");\r\n static readonly refreshProperty = new SerializableObjectProperty(\r\n Versions.v1_4,\r\n \"refresh\",\r\n RefreshDefinition,\r\n true\r\n );\r\n static readonly authenticationProperty = new SerializableObjectProperty(\r\n Versions.v1_4,\r\n \"authentication\",\r\n Authentication,\r\n true\r\n );\r\n\r\n @property(AdaptiveCard.versionProperty)\r\n version: Version;\r\n\r\n @property(AdaptiveCard.fallbackTextProperty)\r\n fallbackText?: string;\r\n\r\n @property(AdaptiveCard.speakProperty)\r\n speak?: string;\r\n\r\n @property(AdaptiveCard.refreshProperty)\r\n get refresh(): RefreshDefinition | undefined {\r\n return this.getValue(AdaptiveCard.refreshProperty);\r\n }\r\n\r\n set refresh(value: RefreshDefinition | undefined) {\r\n this.setValue(AdaptiveCard.refreshProperty, value);\r\n\r\n if (value) {\r\n value.parent = this;\r\n }\r\n }\r\n\r\n @property(AdaptiveCard.authenticationProperty)\r\n authentication?: Authentication;\r\n\r\n //#endregion\r\n\r\n private static _haveWarnedAboutNoMarkdownProcessing = false;\r\n\r\n static onAnchorClicked?: (\r\n element: CardElement,\r\n anchor: HTMLAnchorElement,\r\n ev?: MouseEvent\r\n ) => boolean;\r\n static onExecuteAction?: (action: Action) => void;\r\n static onElementVisibilityChanged?: (element: CardElement) => void;\r\n static onImageLoaded?: (image: Image) => void;\r\n static onInlineCardExpanded?: (action: ShowCardAction, isExpanded: boolean) => void;\r\n static onInputValueChanged?: (input: Input) => void;\r\n static onProcessMarkdown?: (text: string, result: IMarkdownProcessingResult) => void;\r\n static onDisplayOverflowActionMenu?: (\r\n actions: readonly Action[],\r\n target?: HTMLElement\r\n ) => boolean;\r\n static onRenderOverflowActions?: (\r\n actions: readonly Action[],\r\n isRootLevelActions: boolean\r\n ) => boolean;\r\n\r\n static get processMarkdown(): (text: string) => string {\r\n throw new Error(Strings.errors.processMarkdownEventRemoved());\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n static set processMarkdown(_value: (text: string) => string) {\r\n throw new Error(Strings.errors.processMarkdownEventRemoved());\r\n }\r\n\r\n static applyMarkdown(text: string): IMarkdownProcessingResult {\r\n const result: IMarkdownProcessingResult = {\r\n didProcess: false\r\n };\r\n\r\n if (AdaptiveCard.onProcessMarkdown) {\r\n AdaptiveCard.onProcessMarkdown(text, result);\r\n } else if ((window).markdownit) {\r\n // Check for markdownit\r\n const markdownIt: any = (window).markdownit;\r\n result.outputHtml = markdownIt().render(text);\r\n result.didProcess = true;\r\n } else if (!AdaptiveCard._haveWarnedAboutNoMarkdownProcessing) {\r\n // eslint-disable-next-line no-console\r\n console.warn(Strings.errors.markdownProcessingNotEnabled);\r\n AdaptiveCard._haveWarnedAboutNoMarkdownProcessing = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private _fallbackCard?: AdaptiveCard;\r\n\r\n private isVersionSupported(): boolean {\r\n if (this.bypassVersionCheck) {\r\n return true;\r\n } else {\r\n const unsupportedVersion: boolean =\r\n !this.version ||\r\n !this.version.isValid ||\r\n this.maxVersion.major < this.version.major ||\r\n (this.maxVersion.major === this.version.major &&\r\n this.maxVersion.minor < this.version.minor);\r\n\r\n return !unsupportedVersion;\r\n }\r\n }\r\n\r\n protected getDefaultSerializationContext(): BaseSerializationContext {\r\n return new SerializationContext(this.version);\r\n }\r\n\r\n protected getItemsCollectionPropertyName(): string {\r\n return \"body\";\r\n }\r\n\r\n protected canHostSingletons() {\r\n return true;\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n this._fallbackCard = undefined;\r\n\r\n const fallbackElement = context.parseElement(\r\n undefined,\r\n source[\"fallback\"],\r\n this.forbiddenChildElements(),\r\n !this.isDesignMode()\r\n );\r\n\r\n if (fallbackElement) {\r\n this._fallbackCard = new AdaptiveCard();\r\n this._fallbackCard.addItem(fallbackElement);\r\n }\r\n\r\n super.internalParse(source, context);\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n this.setValue(AdaptiveCard.versionProperty, context.targetVersion);\r\n\r\n super.internalToJSON(target, context);\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const renderedElement = super.internalRender();\r\n\r\n if (GlobalSettings.useAdvancedCardBottomTruncation && renderedElement) {\r\n // Unlike containers, the root card element should be allowed to\r\n // be shorter than its content (otherwise the overflow truncation\r\n // logic would never get triggered)\r\n renderedElement.style.removeProperty(\"minHeight\");\r\n }\r\n\r\n return renderedElement;\r\n }\r\n\r\n protected getHasBackground(ignoreBackgroundImages: boolean = false): boolean {\r\n return true;\r\n }\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return new PaddingDefinition(\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding\r\n );\r\n }\r\n\r\n protected shouldSerialize(_context: SerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n protected get renderIfEmpty(): boolean {\r\n return true;\r\n }\r\n\r\n protected get bypassVersionCheck(): boolean {\r\n return false;\r\n }\r\n\r\n protected get allowCustomStyle() {\r\n return this.hostConfig.adaptiveCard && this.hostConfig.adaptiveCard.allowCustomStyle;\r\n }\r\n\r\n protected get hasBackground(): boolean {\r\n return true;\r\n }\r\n\r\n onAnchorClicked?: (element: CardElement, anchor: HTMLAnchorElement, ev?: MouseEvent) => boolean;\r\n onExecuteAction?: (action: Action) => void;\r\n onElementVisibilityChanged?: (element: CardElement) => void;\r\n onImageLoaded?: (image: Image) => void;\r\n onInlineCardExpanded?: (action: ShowCardAction, isExpanded: boolean) => void;\r\n onInputValueChanged?: (input: Input) => void;\r\n onDisplayOverflowActionMenu?: (actions: readonly Action[], target?: HTMLElement) => boolean;\r\n onRenderOverflowActions?: (actions: readonly Action[], isRootLevelActions: boolean) => boolean;\r\n\r\n designMode: boolean = false;\r\n\r\n getJsonTypeName(): string {\r\n return \"AdaptiveCard\";\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (this.getValue(CardElement.typeNameProperty) !== \"AdaptiveCard\") {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.MissingCardType,\r\n Strings.errors.invalidCardType()\r\n );\r\n }\r\n\r\n if (!this.bypassVersionCheck && !this.version) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"version\")\r\n );\r\n } else if (!this.isVersionSupported()) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.UnsupportedCardVersion,\r\n Strings.errors.unsupportedCardVersion(\r\n this.version.toString(),\r\n this.maxVersion.toString()\r\n )\r\n );\r\n }\r\n }\r\n\r\n render(target?: HTMLElement): HTMLElement | undefined {\r\n let renderedCard: HTMLElement | undefined;\r\n\r\n if (this.shouldFallback() && this._fallbackCard) {\r\n this._fallbackCard.hostConfig = this.hostConfig;\r\n\r\n renderedCard = this._fallbackCard.render();\r\n } else {\r\n renderedCard = super.render();\r\n\r\n if (renderedCard) {\r\n renderedCard.classList.add(this.hostConfig.makeCssClassName(\"ac-adaptiveCard\"));\r\n\r\n // Having a tabIndex on the root container for a card can mess up accessibility in some scenarios.\r\n // However, we've shipped this behavior before, and so can't just turn it off in a point release. For\r\n // now, to unblock accessibility scenarios for our customers, we've got an option to turn it off. In a\r\n // future release, we should strongly consider flipping the default such that we *don't* emit a tabIndex\r\n // by default.\r\n if (GlobalSettings.setTabIndexAtCardRoot) {\r\n renderedCard.tabIndex = 0;\r\n }\r\n\r\n if (this.speak) {\r\n renderedCard.setAttribute(\"aria-label\", this.speak);\r\n }\r\n }\r\n }\r\n\r\n if (target) {\r\n Utils.appendChild(target, renderedCard);\r\n\r\n this.updateLayout();\r\n }\r\n\r\n return renderedCard;\r\n }\r\n\r\n updateLayout(processChildren: boolean = true) {\r\n super.updateLayout(processChildren);\r\n\r\n if (GlobalSettings.useAdvancedCardBottomTruncation && this.isDisplayed()) {\r\n const padding = this.hostConfig.getEffectiveSpacing(Enums.Spacing.Default);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n this[\"handleOverflow\"](this.renderedElement!.offsetHeight - padding);\r\n }\r\n }\r\n\r\n shouldFallback(): boolean {\r\n return super.shouldFallback() || !this.isVersionSupported();\r\n }\r\n\r\n get hasVisibleSeparator(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nclass InlineAdaptiveCard extends AdaptiveCard {\r\n //#region Schema\r\n\r\n protected getSchemaKey(): string {\r\n return \"InlineAdaptiveCard\";\r\n }\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n schema.remove(AdaptiveCard.$schemaProperty, AdaptiveCard.versionProperty);\r\n }\r\n\r\n //#endregion\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return new PaddingDefinition(\r\n this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding,\r\n Enums.Spacing.Padding\r\n );\r\n }\r\n\r\n protected get bypassVersionCheck(): boolean {\r\n return true;\r\n }\r\n\r\n protected get defaultStyle(): string {\r\n if (this.suppressStyle) {\r\n return Enums.ContainerStyle.Default;\r\n } else {\r\n return this.hostConfig.actions.showCard.style\r\n ? this.hostConfig.actions.showCard.style\r\n : Enums.ContainerStyle.Emphasis;\r\n }\r\n }\r\n\r\n suppressStyle: boolean = false;\r\n\r\n render(target?: HTMLElement): HTMLElement | undefined {\r\n const renderedCard = super.render(target);\r\n\r\n if (renderedCard) {\r\n renderedCard.setAttribute(\"aria-live\", \"polite\");\r\n renderedCard.removeAttribute(\"tabindex\");\r\n }\r\n\r\n return renderedCard;\r\n }\r\n}\r\n\r\nexport class SerializationContext extends BaseSerializationContext {\r\n private _elementRegistry?: CardObjectRegistry;\r\n private _actionRegistry?: CardObjectRegistry;\r\n\r\n private _forbiddenTypes: Set = new Set();\r\n private internalParseCardObject(\r\n parent: CardElement | undefined,\r\n source: any,\r\n forbiddenTypes: Set,\r\n allowFallback: boolean,\r\n createInstanceCallback: (typeName: string | undefined) => T | undefined,\r\n logParseEvent: (typeName: string | undefined, errorType: Enums.TypeErrorType) => void,\r\n parsingSingletonObject: boolean = false\r\n ): T | undefined {\r\n let result: T | undefined = undefined;\r\n\r\n if (source && typeof source === \"object\") {\r\n const oldForbiddenTypes = new Set();\r\n this._forbiddenTypes.forEach((type) => {\r\n oldForbiddenTypes.add(type);\r\n });\r\n forbiddenTypes.forEach((type) => {\r\n this._forbiddenTypes.add(type);\r\n });\r\n\r\n const typeName = Utils.parseString(source[\"type\"]);\r\n\r\n const ignoreForbiddenType = parsingSingletonObject && typeName === \"Carousel\";\r\n\r\n if (typeName && this._forbiddenTypes.has(typeName) && !ignoreForbiddenType) {\r\n logParseEvent(typeName, Enums.TypeErrorType.ForbiddenType);\r\n } else {\r\n let tryToFallback = false;\r\n\r\n result = createInstanceCallback(typeName);\r\n\r\n if (!result) {\r\n tryToFallback = GlobalSettings.enableFallback && allowFallback;\r\n\r\n logParseEvent(typeName, Enums.TypeErrorType.UnknownType);\r\n } else {\r\n result.setParent(parent);\r\n result.parse(source, this);\r\n\r\n tryToFallback =\r\n GlobalSettings.enableFallback && allowFallback && result.shouldFallback();\r\n }\r\n\r\n if (tryToFallback) {\r\n const fallback = source[\"fallback\"];\r\n\r\n if (!fallback && parent) {\r\n parent.setShouldFallback(true);\r\n }\r\n if (typeof fallback === \"string\" && fallback.toLowerCase() === \"drop\") {\r\n result = undefined;\r\n } else if (typeof fallback === \"object\") {\r\n result = this.internalParseCardObject(\r\n parent,\r\n fallback,\r\n forbiddenTypes,\r\n true,\r\n createInstanceCallback,\r\n logParseEvent\r\n );\r\n }\r\n }\r\n }\r\n\r\n this._forbiddenTypes = oldForbiddenTypes;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n protected cardObjectParsed(o: SerializableObject, source: any) {\r\n if (o instanceof Action && this.onParseAction) {\r\n this.onParseAction(o, source, this);\r\n } else if (o instanceof CardElement && this.onParseElement) {\r\n this.onParseElement(o, source, this);\r\n }\r\n }\r\n\r\n onParseAction?: (action: Action, source: any, context: SerializationContext) => void;\r\n onParseElement?: (element: CardElement, source: any, context: SerializationContext) => void;\r\n\r\n shouldSerialize(o: SerializableObject): boolean {\r\n if (o instanceof Action) {\r\n return this.actionRegistry.findByName(o.getJsonTypeName()) !== undefined;\r\n } else if (o instanceof CardElement) {\r\n return this.elementRegistry.findByName(o.getJsonTypeName()) !== undefined;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n parseCardObject(\r\n parent: CardElement | undefined,\r\n source: any,\r\n forbiddenTypeNames: string[],\r\n allowFallback: boolean,\r\n createInstanceCallback: (typeName: string) => T | undefined,\r\n logParseEvent: (typeName: string, errorType: Enums.TypeErrorType) => void,\r\n parsingSingletonObject: boolean = false\r\n ): T | undefined {\r\n const forbiddenTypes = new Set(forbiddenTypeNames);\r\n const result = this.internalParseCardObject(\r\n parent,\r\n source,\r\n forbiddenTypes,\r\n allowFallback,\r\n createInstanceCallback,\r\n logParseEvent,\r\n parsingSingletonObject\r\n );\r\n\r\n if (result !== undefined) {\r\n this.cardObjectParsed(result, source);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n parseElement(\r\n parent: CardElement | undefined,\r\n source: any,\r\n forbiddenTypes: string[],\r\n allowFallback: boolean,\r\n _parsingSingletonObject: boolean = false\r\n ): CardElement | undefined {\r\n return this.parseCardObject(\r\n parent,\r\n source,\r\n forbiddenTypes,\r\n allowFallback,\r\n (typeName: string) => {\r\n return this.elementRegistry.createInstance(typeName, this.targetVersion);\r\n },\r\n (typeName: string, errorType: Enums.TypeErrorType) => {\r\n if (errorType === Enums.TypeErrorType.UnknownType) {\r\n this.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.UnknownElementType,\r\n Strings.errors.unknownElementType(typeName)\r\n );\r\n } else {\r\n this.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.ElementTypeNotAllowed,\r\n Strings.errors.elementTypeNotAllowed(typeName)\r\n );\r\n }\r\n },\r\n _parsingSingletonObject\r\n );\r\n }\r\n\r\n parseAction(\r\n parent: CardElement,\r\n source: any,\r\n forbiddenActionTypes: string[],\r\n allowFallback: boolean\r\n ): Action | undefined {\r\n return this.parseCardObject(\r\n parent,\r\n source,\r\n forbiddenActionTypes,\r\n allowFallback,\r\n (typeName: string) => {\r\n return this.actionRegistry.createInstance(typeName, this.targetVersion);\r\n },\r\n (typeName: string, errorType: Enums.TypeErrorType) => {\r\n if (errorType === Enums.TypeErrorType.UnknownType) {\r\n this.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.UnknownActionType,\r\n Strings.errors.unknownActionType(typeName)\r\n );\r\n } else {\r\n this.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.ActionTypeNotAllowed,\r\n Strings.errors.actionTypeNotAllowed(typeName)\r\n );\r\n }\r\n }\r\n );\r\n }\r\n\r\n get elementRegistry(): CardObjectRegistry {\r\n return this._elementRegistry ?? GlobalRegistry.elements;\r\n }\r\n\r\n // Not using a property setter here because the setter should accept \"undefined\"\r\n // whereas the getter should never return undefined.\r\n setElementRegistry(value: CardObjectRegistry | undefined) {\r\n this._elementRegistry = value;\r\n }\r\n\r\n get actionRegistry(): CardObjectRegistry {\r\n return this._actionRegistry ?? GlobalRegistry.actions;\r\n }\r\n\r\n // Not using a property setter here because the setter should accept \"undefined\"\r\n // whereas the getter should never return undefined.\r\n setActionRegistry(value: CardObjectRegistry | undefined) {\r\n this._actionRegistry = value;\r\n }\r\n}\r\n\r\nGlobalRegistry.defaultElements.register(\"Container\", Container);\r\nGlobalRegistry.defaultElements.register(\"TextBlock\", TextBlock);\r\nGlobalRegistry.defaultElements.register(\"RichTextBlock\", RichTextBlock, Versions.v1_2);\r\nGlobalRegistry.defaultElements.register(\"TextRun\", TextRun, Versions.v1_2);\r\nGlobalRegistry.defaultElements.register(\"Image\", Image);\r\nGlobalRegistry.defaultElements.register(\"ImageSet\", ImageSet);\r\nGlobalRegistry.defaultElements.register(\"Media\", Media, Versions.v1_1);\r\nGlobalRegistry.defaultElements.register(\"FactSet\", FactSet);\r\nGlobalRegistry.defaultElements.register(\"ColumnSet\", ColumnSet);\r\nGlobalRegistry.defaultElements.register(\"ActionSet\", ActionSet, Versions.v1_2);\r\nGlobalRegistry.defaultElements.register(\"Input.Text\", TextInput);\r\nGlobalRegistry.defaultElements.register(\"Input.Date\", DateInput);\r\nGlobalRegistry.defaultElements.register(\"Input.Time\", TimeInput);\r\nGlobalRegistry.defaultElements.register(\"Input.Number\", NumberInput);\r\nGlobalRegistry.defaultElements.register(\"Input.ChoiceSet\", ChoiceSetInput);\r\nGlobalRegistry.defaultElements.register(\"Input.Toggle\", ToggleInput);\r\n\r\nGlobalRegistry.defaultActions.register(OpenUrlAction.JsonTypeName, OpenUrlAction);\r\nGlobalRegistry.defaultActions.register(SubmitAction.JsonTypeName, SubmitAction);\r\nGlobalRegistry.defaultActions.register(ShowCardAction.JsonTypeName, ShowCardAction);\r\nGlobalRegistry.defaultActions.register(\r\n ToggleVisibilityAction.JsonTypeName,\r\n ToggleVisibilityAction,\r\n Versions.v1_2\r\n);\r\nGlobalRegistry.defaultActions.register(ExecuteAction.JsonTypeName, ExecuteAction, Versions.v1_4);\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {\r\n CardElement,\r\n StylableCardElementContainer,\r\n SerializationContext,\r\n Container,\r\n ContainerStyleProperty\r\n} from \"./card-elements\";\r\nimport {\r\n HorizontalAlignment,\r\n VerticalAlignment,\r\n SizeUnit,\r\n ValidationEvent,\r\n TypeErrorType,\r\n Spacing\r\n} from \"./enums\";\r\nimport { TextStyleDefinition } from \"./host-config\";\r\nimport { GlobalRegistry } from \"./registry\";\r\nimport {\r\n BaseSerializationContext,\r\n BoolProperty,\r\n CustomProperty,\r\n EnumProperty,\r\n property,\r\n PropertyBag,\r\n PropertyDefinition,\r\n SerializableObject,\r\n SerializableObjectCollectionProperty,\r\n Versions\r\n} from \"./serialization\";\r\nimport { SizeAndUnit, PaddingDefinition } from \"./shared\";\r\nimport { Strings } from \"./strings\";\r\nimport { stringToCssColor } from \"./utils\";\r\n\r\nexport class TableColumnDefinition extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly horizontalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"horizontalCellContentAlignment\",\r\n HorizontalAlignment\r\n );\r\n static readonly verticalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"verticalCellContentAlignment\",\r\n VerticalAlignment\r\n );\r\n\r\n static readonly widthProperty = new CustomProperty(\r\n Versions.v1_5,\r\n \"width\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n let result: SizeAndUnit = prop.defaultValue;\r\n const value = source[prop.name];\r\n let invalidWidth = false;\r\n\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new SizeAndUnit(value, SizeUnit.Weight);\r\n } else if (typeof value === \"string\") {\r\n try {\r\n result = SizeAndUnit.parse(value);\r\n } catch (e) {\r\n invalidWidth = true;\r\n }\r\n } else {\r\n invalidWidth = true;\r\n }\r\n\r\n if (invalidWidth) {\r\n context.logParseEvent(\r\n sender,\r\n ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidColumnWidth(value)\r\n );\r\n }\r\n\r\n return result;\r\n },\r\n (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n target: PropertyBag,\r\n value: SizeAndUnit,\r\n context: BaseSerializationContext\r\n ) => {\r\n if (value.unit === SizeUnit.Pixel) {\r\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\r\n } else {\r\n context.serializeNumber(target, \"width\", value.physicalSize);\r\n }\r\n },\r\n new SizeAndUnit(1, SizeUnit.Weight)\r\n );\r\n\r\n @property(TableColumnDefinition.horizontalCellContentAlignmentProperty)\r\n horizontalCellContentAlignment?: HorizontalAlignment;\r\n\r\n @property(TableColumnDefinition.verticalCellContentAlignmentProperty)\r\n verticalCellContentAlignment?: VerticalAlignment;\r\n\r\n @property(TableColumnDefinition.widthProperty)\r\n width: SizeAndUnit = new SizeAndUnit(1, SizeUnit.Weight);\r\n\r\n getSchemaKey(): string {\r\n return \"ColumnDefinition\";\r\n }\r\n\r\n //#endregion\r\n\r\n computedWidth: SizeAndUnit;\r\n}\r\n\r\nexport abstract class StylableContainer<\r\n T extends CardElement\r\n> extends StylableCardElementContainer {\r\n private _items: T[] = [];\r\n\r\n private parseItem(source: any, context: SerializationContext): T | undefined {\r\n return context.parseCardObject(\r\n this,\r\n source,\r\n [], // Forbidden types not supported for elements for now\r\n !this.isDesignMode(),\r\n (typeName: string) => {\r\n return this.createItemInstance(typeName);\r\n },\r\n (typeName: string, _errorType: TypeErrorType) => {\r\n context.logParseEvent(\r\n undefined,\r\n ValidationEvent.ElementTypeNotAllowed,\r\n Strings.errors.elementTypeNotAllowed(typeName)\r\n );\r\n }\r\n );\r\n }\r\n\r\n protected abstract getCollectionPropertyName(): string;\r\n protected abstract createItemInstance(typeName: string): T | undefined;\r\n\r\n protected internalAddItem(item: T) {\r\n if (!item.parent) {\r\n this._items.push(item);\r\n\r\n item.setParent(this);\r\n } else {\r\n throw new Error(Strings.errors.elementAlreadyParented());\r\n }\r\n }\r\n\r\n protected internalRemoveItem(item: T): boolean {\r\n const itemIndex = this._items.indexOf(item);\r\n\r\n if (itemIndex >= 0) {\r\n this._items.splice(itemIndex, 1);\r\n\r\n item.setParent(undefined);\r\n\r\n this.updateLayout();\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected internalIndexOf(item: T): number {\r\n return this._items.indexOf(item);\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this._items = [];\r\n\r\n const items = source[this.getCollectionPropertyName()];\r\n\r\n if (Array.isArray(items)) {\r\n for (const item of items) {\r\n const instance = this.parseItem(item, context);\r\n\r\n if (instance) {\r\n this._items.push(instance);\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n context.serializeArray(target, this.getCollectionPropertyName(), this._items);\r\n }\r\n\r\n removeItem(item: T): boolean {\r\n return this.internalRemoveItem(item);\r\n }\r\n\r\n getItemCount(): number {\r\n return this._items.length;\r\n }\r\n\r\n getItemAt(index: number): T {\r\n return this._items[index];\r\n }\r\n\r\n getFirstVisibleRenderedItem(): T | undefined {\r\n return this.getItemCount() > 0 ? this.getItemAt(0) : undefined;\r\n }\r\n\r\n getLastVisibleRenderedItem(): T | undefined {\r\n return this.getItemCount() > 0 ? this.getItemAt(this.getItemCount() - 1) : undefined;\r\n }\r\n}\r\n\r\nexport type CellType = \"data\" | \"header\";\r\n\r\nexport class TableCell extends Container {\r\n private _columnIndex: number = -1;\r\n private _cellType: CellType = \"data\";\r\n\r\n protected getHasBorder(): boolean {\r\n return this.parentRow.parentTable.showGridLines;\r\n }\r\n\r\n protected applyBorder() {\r\n if (this.renderedElement && this.getHasBorder()) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(\r\n this.parentRow.parentTable.gridStyle\r\n );\r\n\r\n if (styleDefinition.borderColor) {\r\n const borderColor = stringToCssColor(styleDefinition.borderColor);\r\n\r\n if (borderColor) {\r\n this.renderedElement.style.borderRight = \"1px solid \" + borderColor;\r\n this.renderedElement.style.borderBottom = \"1px solid \" + borderColor;\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return this.getHasBackground() || this.getHasBorder()\r\n ? new PaddingDefinition(Spacing.Small, Spacing.Small, Spacing.Small, Spacing.Small)\r\n : super.getDefaultPadding();\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const cellElement = super.internalRender();\r\n\r\n if (cellElement) {\r\n cellElement.setAttribute(\"role\", this.cellType === \"data\" ? \"cell\" : \"columnheader\");\r\n cellElement.style.minWidth = \"0\";\r\n\r\n if (this.cellType === \"header\") {\r\n cellElement.setAttribute(\"scope\", \"col\");\r\n }\r\n }\r\n\r\n return cellElement;\r\n }\r\n\r\n protected shouldSerialize(_context: SerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"TableCell\";\r\n }\r\n\r\n getEffectiveTextStyleDefinition(): TextStyleDefinition {\r\n if (this.cellType === \"header\") {\r\n return this.hostConfig.textStyles.columnHeader;\r\n }\r\n\r\n return super.getEffectiveTextStyleDefinition();\r\n }\r\n\r\n getEffectiveHorizontalAlignment(): HorizontalAlignment {\r\n if (this.horizontalAlignment !== undefined) {\r\n return this.horizontalAlignment;\r\n }\r\n\r\n if (this.parentRow.horizontalCellContentAlignment !== undefined) {\r\n return this.parentRow.horizontalCellContentAlignment;\r\n }\r\n\r\n if (this.columnIndex >= 0) {\r\n const horizontalAlignment = this.parentRow.parentTable.getColumnAt(\r\n this.columnIndex\r\n ).horizontalCellContentAlignment;\r\n\r\n if (horizontalAlignment !== undefined) {\r\n return horizontalAlignment;\r\n }\r\n }\r\n\r\n if (this.parentRow.parentTable.horizontalCellContentAlignment !== undefined) {\r\n return this.parentRow.parentTable.horizontalCellContentAlignment;\r\n }\r\n\r\n return super.getEffectiveHorizontalAlignment();\r\n }\r\n\r\n getEffectiveVerticalContentAlignment(): VerticalAlignment {\r\n if (this.verticalContentAlignment !== undefined) {\r\n return this.verticalContentAlignment;\r\n }\r\n\r\n if (this.parentRow.verticalCellContentAlignment !== undefined) {\r\n return this.parentRow.verticalCellContentAlignment;\r\n }\r\n\r\n if (this.columnIndex >= 0) {\r\n const verticalAlignment = this.parentRow.parentTable.getColumnAt(\r\n this.columnIndex\r\n ).verticalCellContentAlignment;\r\n\r\n if (verticalAlignment !== undefined) {\r\n return verticalAlignment;\r\n }\r\n }\r\n\r\n if (this.parentRow.parentTable.verticalCellContentAlignment !== undefined) {\r\n return this.parentRow.parentTable.verticalCellContentAlignment;\r\n }\r\n\r\n return super.getEffectiveVerticalContentAlignment();\r\n }\r\n\r\n get columnIndex(): number {\r\n return this._columnIndex;\r\n }\r\n\r\n get cellType(): CellType {\r\n return this._cellType;\r\n }\r\n\r\n get parentRow(): TableRow {\r\n return this.parent as TableRow;\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport class TableRow extends StylableContainer {\r\n //#region Schema\r\n\r\n static readonly styleProperty = new ContainerStyleProperty(Versions.v1_5, \"style\");\r\n static readonly horizontalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"horizontalCellContentAlignment\",\r\n HorizontalAlignment\r\n );\r\n static readonly verticalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"verticalCellContentAlignment\",\r\n VerticalAlignment\r\n );\r\n\r\n @property(TableRow.horizontalCellContentAlignmentProperty)\r\n horizontalCellContentAlignment?: HorizontalAlignment;\r\n\r\n @property(TableRow.verticalCellContentAlignmentProperty)\r\n verticalCellContentAlignment?: VerticalAlignment;\r\n\r\n //#endregion\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return new PaddingDefinition(Spacing.None, Spacing.None, Spacing.None, Spacing.None);\r\n }\r\n\r\n protected applyBackground() {\r\n if (this.renderedElement) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(\r\n this.style,\r\n this.hostConfig.containerStyles.getStyleByName(this.defaultStyle)\r\n );\r\n\r\n if (styleDefinition.backgroundColor) {\r\n const bgColor = stringToCssColor(styleDefinition.backgroundColor);\r\n\r\n if (bgColor) {\r\n this.renderedElement.style.backgroundColor = bgColor;\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected getCollectionPropertyName(): string {\r\n return \"cells\";\r\n }\r\n\r\n protected createItemInstance(typeName: string): TableCell | undefined {\r\n return !typeName || typeName === \"TableCell\" ? new TableCell() : undefined;\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const isFirstRow = this.getIsFirstRow();\r\n const cellSpacing = this.hostConfig.table.cellSpacing;\r\n\r\n const rowElement = document.createElement(\"div\");\r\n rowElement.setAttribute(\"role\", \"row\");\r\n rowElement.style.display = \"flex\";\r\n rowElement.style.flexDirection = \"row\";\r\n\r\n for (let i = 0; i < Math.min(this.getItemCount(), this.parentTable.getColumnCount()); i++) {\r\n const cell = this.getItemAt(i);\r\n\r\n // Cheating a bit in order to keep cellType read-only\r\n cell[\"_columnIndex\"] = i;\r\n cell[\"_cellType\"] =\r\n this.parentTable.firstRowAsHeaders && isFirstRow ? \"header\" : \"data\";\r\n\r\n const renderedCell = cell.render();\r\n\r\n if (renderedCell) {\r\n const column = this.parentTable.getColumnAt(i);\r\n\r\n if (column.computedWidth.unit === SizeUnit.Pixel) {\r\n renderedCell.style.flex = \"0 0 \" + column.computedWidth.physicalSize + \"px\";\r\n } else {\r\n renderedCell.style.flex = \"1 1 \" + column.computedWidth.physicalSize + \"%\";\r\n }\r\n\r\n if (i > 0 && !this.parentTable.showGridLines && cellSpacing > 0) {\r\n renderedCell.style.marginLeft = cellSpacing + \"px\";\r\n }\r\n\r\n rowElement.appendChild(renderedCell);\r\n }\r\n }\r\n\r\n return rowElement.children.length > 0 ? rowElement : undefined;\r\n }\r\n\r\n protected shouldSerialize(_context: SerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n addCell(cell: TableCell) {\r\n this.internalAddItem(cell);\r\n }\r\n\r\n removeCellAt(columnIndex: number): boolean {\r\n if (columnIndex >= 0 && columnIndex < this.getItemCount()) {\r\n return this.removeItem(this.getItemAt(columnIndex));\r\n }\r\n\r\n return false;\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return cardElement instanceof TableCell ? this.internalIndexOf(cardElement) : -1;\r\n }\r\n\r\n ensureHasEnoughCells(cellCount: number) {\r\n while (this.getItemCount() < cellCount) {\r\n this.addCell(new TableCell());\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"TableRow\";\r\n }\r\n\r\n getIsFirstRow(): boolean {\r\n return this.parentTable.getItemAt(0) === this;\r\n }\r\n\r\n get parentTable(): Table {\r\n return this.parent as Table;\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport class Table extends StylableContainer {\r\n //#region Schema\r\n\r\n private static readonly _columnsProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_5,\r\n \"columns\",\r\n TableColumnDefinition\r\n );\r\n\r\n static readonly firstRowAsHeadersProperty = new BoolProperty(\r\n Versions.v1_5,\r\n \"firstRowAsHeaders\",\r\n true\r\n );\r\n static readonly showGridLinesProperty = new BoolProperty(Versions.v1_5, \"showGridLines\", true);\r\n static readonly gridStyleProperty = new ContainerStyleProperty(Versions.v1_5, \"gridStyle\");\r\n static readonly horizontalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"horizontalCellContentAlignment\",\r\n HorizontalAlignment\r\n );\r\n static readonly verticalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"verticalCellContentAlignment\",\r\n VerticalAlignment\r\n );\r\n\r\n @property(Table._columnsProperty)\r\n private _columns: TableColumnDefinition[] = [];\r\n\r\n @property(Table.firstRowAsHeadersProperty)\r\n firstRowAsHeaders: boolean = true;\r\n\r\n @property(Table.showGridLinesProperty)\r\n showGridLines: boolean = true;\r\n\r\n @property(Table.gridStyleProperty)\r\n get gridStyle(): string | undefined {\r\n const style = this.getValue(Table.gridStyleProperty);\r\n\r\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\r\n return style;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n set gridStyle(value: string | undefined) {\r\n this.setValue(Table.gridStyleProperty, value);\r\n }\r\n\r\n @property(Table.horizontalCellContentAlignmentProperty)\r\n horizontalCellContentAlignment?: HorizontalAlignment;\r\n\r\n @property(Table.verticalCellContentAlignmentProperty)\r\n verticalCellContentAlignment?: VerticalAlignment;\r\n\r\n //#endregion\r\n\r\n private ensureRowsHaveEnoughCells() {\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).ensureHasEnoughCells(this.getColumnCount());\r\n }\r\n }\r\n\r\n private removeCellsFromColumn(columnIndex: number) {\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).removeCellAt(columnIndex);\r\n }\r\n }\r\n\r\n protected getCollectionPropertyName(): string {\r\n return \"rows\";\r\n }\r\n\r\n protected createItemInstance(typeName: string): TableRow | undefined {\r\n return !typeName || typeName === \"TableRow\" ? new TableRow() : undefined;\r\n }\r\n\r\n protected internalParse(source: PropertyBag, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this.ensureRowsHaveEnoughCells();\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n if (this.getItemCount() > 0) {\r\n let totalWeights: number = 0;\r\n\r\n for (const column of this._columns) {\r\n if (column.width.unit === SizeUnit.Weight) {\r\n totalWeights += column.width.physicalSize;\r\n }\r\n }\r\n\r\n for (const column of this._columns) {\r\n if (column.width.unit === SizeUnit.Pixel) {\r\n column.computedWidth = new SizeAndUnit(\r\n column.width.physicalSize,\r\n SizeUnit.Pixel\r\n );\r\n } else {\r\n column.computedWidth = new SizeAndUnit(\r\n (100 / totalWeights) * column.width.physicalSize,\r\n SizeUnit.Weight\r\n );\r\n }\r\n }\r\n\r\n const tableElement = document.createElement(\"div\");\r\n tableElement.setAttribute(\"role\", \"table\");\r\n tableElement.style.display = \"flex\";\r\n tableElement.style.flexDirection = \"column\";\r\n\r\n if (this.showGridLines) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(\r\n this.gridStyle\r\n );\r\n\r\n if (styleDefinition.borderColor) {\r\n const borderColor = stringToCssColor(styleDefinition.borderColor);\r\n\r\n if (borderColor) {\r\n tableElement.style.borderTop = \"1px solid \" + borderColor;\r\n tableElement.style.borderLeft = \"1px solid \" + borderColor;\r\n }\r\n }\r\n }\r\n\r\n const cellSpacing = this.hostConfig.table.cellSpacing;\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n const renderedRow = this.getItemAt(i).render();\r\n\r\n if (renderedRow) {\r\n if (i > 0 && !this.showGridLines && cellSpacing > 0) {\r\n const separatorRow = document.createElement(\"div\");\r\n separatorRow.setAttribute(\"aria-hidden\", \"true\");\r\n separatorRow.style.height = cellSpacing + \"px\";\r\n\r\n tableElement.appendChild(separatorRow);\r\n }\r\n\r\n tableElement.appendChild(renderedRow);\r\n }\r\n }\r\n\r\n return tableElement;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n addColumn(column: TableColumnDefinition) {\r\n this._columns.push(column);\r\n\r\n this.ensureRowsHaveEnoughCells();\r\n }\r\n\r\n removeColumn(column: TableColumnDefinition) {\r\n const index = this._columns.indexOf(column);\r\n\r\n if (index >= 0) {\r\n this.removeCellsFromColumn(index);\r\n\r\n this._columns.splice(index, 1);\r\n }\r\n }\r\n\r\n getColumnCount(): number {\r\n return this._columns.length;\r\n }\r\n\r\n getColumnAt(index: number): TableColumnDefinition {\r\n return this._columns[index];\r\n }\r\n\r\n addRow(row: TableRow) {\r\n this.internalAddItem(row);\r\n\r\n row.ensureHasEnoughCells(this.getColumnCount());\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return cardElement instanceof TableRow ? this.internalIndexOf(cardElement) : -1;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Table\";\r\n }\r\n}\r\n\r\nGlobalRegistry.defaultElements.register(\"Table\", Table, Versions.v1_5);\r\n", "// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { ActivityResponse, IActivityRequest } from \"./activity-request\";\r\n\r\nexport abstract class ChannelAdapter {\r\n abstract sendRequestAsync(request: IActivityRequest): Promise;\r\n}\r\n", "// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {\r\n Authentication,\r\n AuthCardButton,\r\n ExecuteAction,\r\n TokenExchangeResource\r\n} from \"./card-elements\";\r\n\r\nexport enum ActivityRequestTrigger {\r\n Automatic = \"automatic\",\r\n Manual = \"manual\"\r\n}\r\n\r\nexport interface IActivityRequest {\r\n readonly action: ExecuteAction;\r\n readonly trigger: ActivityRequestTrigger;\r\n readonly attemptNumber: number;\r\n readonly consecutiveRefreshes: number;\r\n\r\n authCode?: string;\r\n authToken?: string;\r\n\r\n retryAsync(): void;\r\n}\r\n\r\nexport class ActivityRequestError {\r\n constructor(readonly code?: string, readonly message?: string) {}\r\n}\r\n\r\nexport abstract class ActivityResponse {\r\n constructor(readonly request: IActivityRequest) {}\r\n}\r\n\r\nexport class SuccessResponse extends ActivityResponse {\r\n constructor(readonly request: IActivityRequest, readonly rawContent?: string) {\r\n super(request);\r\n }\r\n}\r\n\r\nexport class ErrorResponse extends ActivityResponse {\r\n constructor(readonly request: IActivityRequest, readonly error: ActivityRequestError) {\r\n super(request);\r\n }\r\n}\r\n\r\nexport class LoginRequestResponse extends ActivityResponse {\r\n private _auth: Authentication;\r\n readonly signinButton?: AuthCardButton;\r\n\r\n constructor(readonly request: IActivityRequest, auth: Authentication) {\r\n super(request);\r\n this._auth = auth;\r\n\r\n for (const button of this._auth.buttons) {\r\n if (button.type === \"signin\" && button.value !== undefined) {\r\n try {\r\n new URL(button.value);\r\n\r\n this.signinButton = button;\r\n\r\n break;\r\n } catch (e) {\r\n // Ignore parsing error\r\n }\r\n }\r\n }\r\n }\r\n\r\n get tokenExchangeResource(): TokenExchangeResource | undefined {\r\n return this._auth.tokenExchangeResource;\r\n }\r\n}\r\n", "// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport * as Utils from \"./utils\";\r\nimport { GlobalSettings } from \"./shared\";\r\nimport { ChannelAdapter } from \"./channel-adapter\";\r\nimport {\r\n ActivityResponse,\r\n IActivityRequest,\r\n ActivityRequestTrigger,\r\n SuccessResponse,\r\n ErrorResponse,\r\n LoginRequestResponse\r\n} from \"./activity-request\";\r\nimport { Strings } from \"./strings\";\r\nimport {\r\n SubmitAction,\r\n ExecuteAction,\r\n SerializationContext,\r\n AdaptiveCard,\r\n Action,\r\n Input,\r\n TokenExchangeResource,\r\n AuthCardButton\r\n} from \"./card-elements\";\r\nimport { Versions } from \"./serialization\";\r\nimport { HostConfig } from \"./host-config\";\r\n\r\nfunction logEvent(level: Enums.LogLevel, message?: any, ...optionalParams: any[]) {\r\n if (GlobalSettings.applets.logEnabled) {\r\n if (GlobalSettings.applets.onLogEvent) {\r\n GlobalSettings.applets.onLogEvent(level, message, optionalParams);\r\n } else {\r\n /* eslint-disable no-console */\r\n switch (level) {\r\n case Enums.LogLevel.Warning:\r\n console.warn(message, optionalParams);\r\n break;\r\n case Enums.LogLevel.Error:\r\n console.error(message, optionalParams);\r\n break;\r\n default:\r\n console.log(message, optionalParams);\r\n break;\r\n }\r\n /* eslint-enable no-console */\r\n }\r\n }\r\n}\r\n\r\nclass ActivityRequest implements IActivityRequest {\r\n constructor(\r\n readonly action: ExecuteAction,\r\n readonly trigger: ActivityRequestTrigger,\r\n readonly consecutiveRefreshes: number\r\n ) {}\r\n\r\n authCode?: string;\r\n authToken?: string;\r\n attemptNumber: number = 0;\r\n\r\n onSend: (sender: ActivityRequest) => void;\r\n\r\n // eslint-disable-next-line @typescript-eslint/require-await\r\n async retryAsync(): Promise {\r\n if (this.onSend) {\r\n this.onSend(this);\r\n }\r\n }\r\n}\r\n\r\nexport class AdaptiveApplet {\r\n private static readonly _submitMagicCodeActionId = \"submitMagicCode\";\r\n private static readonly _cancelMagicCodeAuthActionId = \"cancelMagicCodeAuth\";\r\n\r\n private _card?: AdaptiveCard;\r\n private _cardPayload: any;\r\n private _allowAutomaticCardUpdate: boolean = false;\r\n private _refreshButtonHostElement: HTMLElement;\r\n private _cardHostElement: HTMLElement;\r\n private _progressOverlay?: HTMLElement;\r\n\r\n private displayCard(card: AdaptiveCard) {\r\n if (card.renderedElement) {\r\n Utils.clearElementChildren(this._cardHostElement);\r\n\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n\r\n this._cardHostElement.appendChild(card.renderedElement);\r\n } else {\r\n throw new Error(\"displayCard: undefined card.\");\r\n }\r\n }\r\n\r\n private showManualRefreshButton(refreshAction: ExecuteAction) {\r\n const displayBuiltInManualRefreshButton = this.onShowManualRefreshButton\r\n ? this.onShowManualRefreshButton(this)\r\n : true;\r\n\r\n if (displayBuiltInManualRefreshButton) {\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n\r\n let renderedRefreshButton: HTMLElement | undefined = undefined;\r\n\r\n if (this.onRenderManualRefreshButton) {\r\n renderedRefreshButton = this.onRenderManualRefreshButton(this);\r\n } else {\r\n let message = Strings.runtime.refreshThisCard();\r\n\r\n if (GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic) {\r\n let autoRefreshPausedMessage = Strings.runtime.automaticRefreshPaused();\r\n\r\n if (autoRefreshPausedMessage[autoRefreshPausedMessage.length - 1] !== \" \") {\r\n autoRefreshPausedMessage += \" \";\r\n }\r\n\r\n message = Strings.runtime.clckToRestartAutomaticRefresh();\r\n }\r\n\r\n const cardPayload = {\r\n type: \"AdaptiveCard\",\r\n version: \"1.2\",\r\n body: [\r\n {\r\n type: \"RichTextBlock\",\r\n horizontalAlignment: \"right\",\r\n inlines: [\r\n {\r\n type: \"TextRun\",\r\n text: message,\r\n selectAction: {\r\n type: \"Action.Submit\",\r\n id: \"refreshCard\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n\r\n const card = new AdaptiveCard();\r\n card.parse(cardPayload, new SerializationContext(Versions.v1_2));\r\n card.onExecuteAction = (action: Action) => {\r\n if (action.id === \"refreshCard\") {\r\n Utils.clearElementChildren(this._refreshButtonHostElement);\r\n\r\n this.internalExecuteAction(\r\n refreshAction,\r\n ActivityRequestTrigger.Automatic,\r\n 0\r\n );\r\n }\r\n };\r\n\r\n renderedRefreshButton = card.render();\r\n }\r\n\r\n if (renderedRefreshButton) {\r\n Utils.clearElementChildren(this._refreshButtonHostElement);\r\n\r\n this._refreshButtonHostElement.appendChild(renderedRefreshButton);\r\n\r\n this._refreshButtonHostElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n }\r\n\r\n private createActivityRequest(\r\n action: ExecuteAction,\r\n trigger: ActivityRequestTrigger,\r\n consecutiveRefreshes: number\r\n ): ActivityRequest | undefined {\r\n if (this.card) {\r\n const request = new ActivityRequest(action, trigger, consecutiveRefreshes);\r\n request.onSend = (sender: ActivityRequest) => {\r\n sender.attemptNumber++;\r\n\r\n void this.internalSendActivityRequestAsync(request);\r\n };\r\n\r\n const cancel = this.onPrepareActivityRequest\r\n ? !this.onPrepareActivityRequest(this, request, action)\r\n : false;\r\n\r\n return cancel ? undefined : request;\r\n } else {\r\n throw new Error(\"createActivityRequest: no card has been set.\");\r\n }\r\n }\r\n\r\n private createMagicCodeInputCard(attemptNumber: number): AdaptiveCard {\r\n const payload = {\r\n type: \"AdaptiveCard\",\r\n version: \"1.0\",\r\n body: [\r\n {\r\n type: \"TextBlock\",\r\n color: \"attention\",\r\n text: attemptNumber === 1 ? undefined : \"That didn't work... let's try again.\",\r\n wrap: true,\r\n horizontalAlignment: \"center\"\r\n },\r\n {\r\n type: \"TextBlock\",\r\n text: 'Please login in the popup. You will obtain a magic code. Paste that code below and select \"Submit\"',\r\n wrap: true,\r\n horizontalAlignment: \"center\"\r\n },\r\n {\r\n type: \"Input.Text\",\r\n id: \"magicCode\",\r\n placeholder: \"Enter magic code\"\r\n },\r\n {\r\n type: \"ActionSet\",\r\n horizontalAlignment: \"center\",\r\n actions: [\r\n {\r\n type: \"Action.Submit\",\r\n id: AdaptiveApplet._submitMagicCodeActionId,\r\n title: \"Submit\"\r\n },\r\n {\r\n type: \"Action.Submit\",\r\n id: AdaptiveApplet._cancelMagicCodeAuthActionId,\r\n title: \"Cancel\"\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n\r\n const card = new AdaptiveCard();\r\n card.parse(payload);\r\n\r\n return card;\r\n }\r\n\r\n private cancelAutomaticRefresh() {\r\n if (this._allowAutomaticCardUpdate) {\r\n logEvent(\r\n Enums.LogLevel.Warning,\r\n \"Automatic card refresh has been cancelled as a result of the user interacting with the card.\"\r\n );\r\n }\r\n\r\n this._allowAutomaticCardUpdate = false;\r\n }\r\n\r\n private createSerializationContext(): SerializationContext {\r\n return this.onCreateSerializationContext\r\n ? this.onCreateSerializationContext(this)\r\n : new SerializationContext();\r\n }\r\n\r\n private internalSetCard(payload: any, consecutiveRefreshes: number) {\r\n if (typeof payload === \"object\" && payload[\"type\"] === \"AdaptiveCard\") {\r\n this._cardPayload = payload;\r\n }\r\n\r\n if (this._cardPayload) {\r\n try {\r\n const card = new AdaptiveCard();\r\n\r\n if (this.hostConfig) {\r\n card.hostConfig = this.hostConfig;\r\n }\r\n\r\n const serializationContext = this.createSerializationContext();\r\n\r\n card.parse(this._cardPayload, serializationContext);\r\n\r\n const doChangeCard = this.onCardChanging\r\n ? this.onCardChanging(this, this._cardPayload)\r\n : true;\r\n\r\n if (doChangeCard) {\r\n this._card = card;\r\n\r\n if (\r\n this._card.authentication &&\r\n this._card.authentication.tokenExchangeResource &&\r\n this.onPrefetchSSOToken\r\n ) {\r\n this.onPrefetchSSOToken(\r\n this,\r\n this._card.authentication.tokenExchangeResource\r\n );\r\n }\r\n\r\n this._card.onExecuteAction = (action: Action) => {\r\n // If the user takes an action, cancel any pending automatic refresh\r\n this.cancelAutomaticRefresh();\r\n\r\n this.internalExecuteAction(action, ActivityRequestTrigger.Manual, 0);\r\n };\r\n this._card.onInputValueChanged = (_input: Input) => {\r\n // If the user modifies an input, cancel any pending automatic refresh\r\n this.cancelAutomaticRefresh();\r\n };\r\n\r\n this._card.render();\r\n\r\n if (this._card.renderedElement) {\r\n this.displayCard(this._card);\r\n\r\n if (this.onCardChanged) {\r\n this.onCardChanged(this);\r\n }\r\n\r\n if (this._card.refresh) {\r\n if (\r\n GlobalSettings.applets.refresh.mode ===\r\n Enums.RefreshMode.Automatic &&\r\n consecutiveRefreshes <\r\n GlobalSettings.applets.refresh\r\n .maximumConsecutiveAutomaticRefreshes\r\n ) {\r\n if (\r\n GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes <=\r\n 0\r\n ) {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Triggering automatic card refresh number \" +\r\n (consecutiveRefreshes + 1)\r\n );\r\n\r\n this.internalExecuteAction(\r\n this._card.refresh.action,\r\n ActivityRequestTrigger.Automatic,\r\n consecutiveRefreshes + 1\r\n );\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Scheduling automatic card refresh number \" +\r\n (consecutiveRefreshes + 1) +\r\n \" in \" +\r\n GlobalSettings.applets.refresh\r\n .timeBetweenAutomaticRefreshes +\r\n \"ms\"\r\n );\r\n\r\n const action = this._card.refresh.action;\r\n\r\n this._allowAutomaticCardUpdate = true;\r\n\r\n window.setTimeout(() => {\r\n if (this._allowAutomaticCardUpdate) {\r\n this.internalExecuteAction(\r\n action,\r\n ActivityRequestTrigger.Automatic,\r\n consecutiveRefreshes + 1\r\n );\r\n }\r\n }, GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes);\r\n }\r\n } else if (\r\n GlobalSettings.applets.refresh.mode !== Enums.RefreshMode.Disabled\r\n ) {\r\n if (consecutiveRefreshes > 0) {\r\n logEvent(\r\n Enums.LogLevel.Warning,\r\n \"Stopping automatic refreshes after \" +\r\n consecutiveRefreshes +\r\n \" consecutive refreshes.\"\r\n );\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Warning,\r\n \"The card has a refresh section, but automatic refreshes are disabled.\"\r\n );\r\n }\r\n\r\n if (\r\n GlobalSettings.applets.refresh\r\n .allowManualRefreshesAfterAutomaticRefreshes ||\r\n GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Manual\r\n ) {\r\n logEvent(Enums.LogLevel.Info, \"Showing manual refresh button.\");\r\n\r\n this.showManualRefreshButton(this._card.refresh.action);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (error) {\r\n // Ignore all errors\r\n logEvent(Enums.LogLevel.Error, \"setCard: \" + error);\r\n }\r\n }\r\n }\r\n\r\n private internalExecuteAction(\r\n action: Action,\r\n trigger: ActivityRequestTrigger,\r\n consecutiveRefreshes: number\r\n ) {\r\n if (action instanceof ExecuteAction) {\r\n if (this.channelAdapter) {\r\n const request = this.createActivityRequest(action, trigger, consecutiveRefreshes);\r\n\r\n if (request) {\r\n void request.retryAsync();\r\n }\r\n } else {\r\n throw new Error(\"internalExecuteAction: No channel adapter set.\");\r\n }\r\n }\r\n\r\n if (this.onAction) {\r\n this.onAction(this, action);\r\n }\r\n }\r\n\r\n private createProgressOverlay(request: ActivityRequest): HTMLElement | undefined {\r\n if (!this._progressOverlay) {\r\n if (this.onCreateProgressOverlay) {\r\n this._progressOverlay = this.onCreateProgressOverlay(this, request);\r\n } else {\r\n this._progressOverlay = document.createElement(\"div\");\r\n this._progressOverlay.className = \"aaf-progress-overlay\";\r\n\r\n const spinner = document.createElement(\"div\");\r\n spinner.className = \"aaf-spinner\";\r\n spinner.style.width = \"28px\";\r\n spinner.style.height = \"28px\";\r\n\r\n this._progressOverlay.appendChild(spinner);\r\n }\r\n }\r\n\r\n return this._progressOverlay;\r\n }\r\n\r\n private removeProgressOverlay(request: IActivityRequest) {\r\n if (this.onRemoveProgressOverlay) {\r\n this.onRemoveProgressOverlay(this, request);\r\n }\r\n\r\n if (this._progressOverlay !== undefined) {\r\n this.renderedElement.removeChild(this._progressOverlay);\r\n\r\n this._progressOverlay = undefined;\r\n }\r\n }\r\n\r\n private activityRequestSucceeded(\r\n response: SuccessResponse,\r\n parsedContent: string | AdaptiveCard | undefined\r\n ) {\r\n if (this.onActivityRequestSucceeded) {\r\n this.onActivityRequestSucceeded(this, response, parsedContent);\r\n }\r\n }\r\n\r\n private activityRequestFailed(response: ErrorResponse): number {\r\n return this.onActivityRequestFailed\r\n ? this.onActivityRequestFailed(this, response)\r\n : GlobalSettings.applets.defaultTimeBetweenRetryAttempts;\r\n }\r\n\r\n private showAuthCodeInputDialog(request: ActivityRequest) {\r\n const showBuiltInAuthCodeInputCard = this.onShowAuthCodeInputDialog\r\n ? this.onShowAuthCodeInputDialog(this, request)\r\n : true;\r\n\r\n if (showBuiltInAuthCodeInputCard) {\r\n const authCodeInputCard = this.createMagicCodeInputCard(request.attemptNumber);\r\n authCodeInputCard.render();\r\n authCodeInputCard.onExecuteAction = (submitMagicCodeAction: Action) => {\r\n if (this.card && submitMagicCodeAction instanceof SubmitAction) {\r\n switch (submitMagicCodeAction.id) {\r\n case AdaptiveApplet._submitMagicCodeActionId:\r\n let authCode: string | undefined = undefined;\r\n\r\n if (\r\n submitMagicCodeAction.data &&\r\n typeof (submitMagicCodeAction.data)[\"magicCode\"] === \"string\"\r\n ) {\r\n authCode = (submitMagicCodeAction.data)[\"magicCode\"];\r\n }\r\n\r\n if (authCode) {\r\n this.displayCard(this.card);\r\n\r\n request.authCode = authCode;\r\n void request.retryAsync();\r\n } else {\r\n alert(\"Please enter the magic code you received.\");\r\n }\r\n\r\n break;\r\n case AdaptiveApplet._cancelMagicCodeAuthActionId:\r\n logEvent(Enums.LogLevel.Warning, \"Authentication cancelled by user.\");\r\n\r\n this.displayCard(this.card);\r\n\r\n break;\r\n default:\r\n logEvent(\r\n Enums.LogLevel.Error,\r\n \"Unexpected action taken from magic code input card (id = \" +\r\n submitMagicCodeAction.id +\r\n \")\"\r\n );\r\n\r\n alert(Strings.magicCodeInputCard.somethingWentWrong());\r\n\r\n break;\r\n }\r\n }\r\n };\r\n\r\n this.displayCard(authCodeInputCard);\r\n }\r\n }\r\n\r\n private async internalSendActivityRequestAsync(request: ActivityRequest) {\r\n if (!this.channelAdapter) {\r\n throw new Error(\"internalSendActivityRequestAsync: channelAdapter is not set.\");\r\n }\r\n\r\n const overlay = this.createProgressOverlay(request);\r\n\r\n if (overlay !== undefined) {\r\n this.renderedElement.appendChild(overlay);\r\n }\r\n\r\n let done = false;\r\n\r\n while (!done) {\r\n let response: ActivityResponse | undefined = undefined;\r\n\r\n if (request.attemptNumber === 1) {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Sending activity request to channel (attempt \" + request.attemptNumber + \")\"\r\n );\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Re-sending activity request to channel (attempt \" + request.attemptNumber + \")\"\r\n );\r\n }\r\n\r\n try {\r\n response = await this.channelAdapter.sendRequestAsync(request);\r\n } catch (error) {\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + error);\r\n\r\n this.removeProgressOverlay(request);\r\n\r\n done = true;\r\n }\r\n\r\n if (response) {\r\n if (response instanceof SuccessResponse) {\r\n this.removeProgressOverlay(request);\r\n\r\n if (response.rawContent === undefined) {\r\n throw new Error(\r\n \"internalSendActivityRequestAsync: Action.Execute result is undefined\"\r\n );\r\n }\r\n\r\n let parsedContent = response.rawContent;\r\n\r\n try {\r\n parsedContent = JSON.parse(response.rawContent);\r\n } catch {\r\n // Leave parseContent as is\r\n }\r\n\r\n if (typeof parsedContent === \"string\") {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"The activity request returned a string after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\"\r\n );\r\n\r\n this.activityRequestSucceeded(response, parsedContent);\r\n } else if (\r\n typeof parsedContent === \"object\" &&\r\n parsedContent[\"type\"] === \"AdaptiveCard\"\r\n ) {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"The activity request returned an Adaptive Card after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\"\r\n );\r\n\r\n this.internalSetCard(parsedContent, request.consecutiveRefreshes);\r\n this.activityRequestSucceeded(response, this.card);\r\n } else {\r\n throw new Error(\r\n \"internalSendActivityRequestAsync: Action.Execute result is of unsupported type (\" +\r\n typeof response.rawContent +\r\n \")\"\r\n );\r\n }\r\n\r\n done = true;\r\n } else if (response instanceof ErrorResponse) {\r\n const retryIn: number = this.activityRequestFailed(response);\r\n\r\n if (\r\n retryIn >= 0 &&\r\n request.attemptNumber < GlobalSettings.applets.maximumRetryAttempts\r\n ) {\r\n logEvent(\r\n Enums.LogLevel.Warning,\r\n `Activity request failed: ${response.error.message}. Retrying in ${retryIn}ms`\r\n );\r\n\r\n request.attemptNumber++;\r\n\r\n await new Promise((resolve, _reject) => {\r\n window.setTimeout(() => {\r\n resolve();\r\n }, retryIn);\r\n });\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Error,\r\n `Activity request failed: ${response.error.message}. Giving up after ${request.attemptNumber} attempt(s)`\r\n );\r\n\r\n this.removeProgressOverlay(request);\r\n\r\n done = true;\r\n }\r\n } else if (response instanceof LoginRequestResponse) {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"The activity request returned a LoginRequestResponse after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\"\r\n );\r\n\r\n if (request.attemptNumber <= GlobalSettings.applets.maximumRetryAttempts) {\r\n let attemptOAuth = true;\r\n\r\n if (response.tokenExchangeResource && this.onSSOTokenNeeded) {\r\n // Attempt to use SSO. The host will return true if it can handle SSO, in which case\r\n // we bypass OAuth\r\n attemptOAuth = !this.onSSOTokenNeeded(\r\n this,\r\n request,\r\n response.tokenExchangeResource\r\n );\r\n }\r\n\r\n if (attemptOAuth) {\r\n // Attempt to use OAuth\r\n this.removeProgressOverlay(request);\r\n\r\n if (response.signinButton === undefined) {\r\n throw new Error(\r\n \"internalSendActivityRequestAsync: the login request doesn't contain a valid signin URL.\"\r\n );\r\n }\r\n\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Login required at \" + response.signinButton.value\r\n );\r\n\r\n if (this.onShowSigninPrompt) {\r\n // Bypass the built-in auth prompt if the host app handles it\r\n this.onShowSigninPrompt(this, request, response.signinButton);\r\n } else {\r\n this.showAuthCodeInputDialog(request);\r\n\r\n const left =\r\n window.screenX +\r\n (window.outerWidth - GlobalSettings.applets.authPromptWidth) /\r\n 2;\r\n const top =\r\n window.screenY +\r\n (window.outerHeight - GlobalSettings.applets.authPromptHeight) /\r\n 2;\r\n\r\n window.open(\r\n response.signinButton.value,\r\n response.signinButton.title\r\n ? response.signinButton.title\r\n : \"Sign in\",\r\n `width=${GlobalSettings.applets.authPromptWidth},height=${GlobalSettings.applets.authPromptHeight},left=${left},top=${top}`\r\n );\r\n }\r\n }\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Error,\r\n \"Authentication failed. Giving up after \" +\r\n request.attemptNumber +\r\n \" attempt(s)\"\r\n );\r\n\r\n alert(Strings.magicCodeInputCard.authenticationFailed());\r\n }\r\n\r\n // Exit the loop. After a LoginRequestResponse, the host app is responsible for retrying the request\r\n break;\r\n } else {\r\n throw new Error(\"Unhandled response type: \" + JSON.stringify(response));\r\n }\r\n }\r\n }\r\n }\r\n\r\n readonly renderedElement: HTMLElement;\r\n\r\n hostConfig?: HostConfig;\r\n channelAdapter?: ChannelAdapter;\r\n\r\n onCardChanging?: (sender: AdaptiveApplet, card: any) => boolean;\r\n onCardChanged?: (sender: AdaptiveApplet) => void;\r\n onPrefetchSSOToken?: (\r\n sender: AdaptiveApplet,\r\n tokenExchangeResource: TokenExchangeResource\r\n ) => void;\r\n onSSOTokenNeeded?: (\r\n sender: AdaptiveApplet,\r\n request: IActivityRequest,\r\n tokenExchangeResource: TokenExchangeResource\r\n ) => boolean;\r\n onPrepareActivityRequest?: (\r\n sender: AdaptiveApplet,\r\n request: IActivityRequest,\r\n action: ExecuteAction\r\n ) => boolean;\r\n onActivityRequestSucceeded?: (\r\n sender: AdaptiveApplet,\r\n response: SuccessResponse,\r\n parsedContent: string | AdaptiveCard | undefined\r\n ) => void;\r\n onActivityRequestFailed?: (sender: AdaptiveApplet, response: ErrorResponse) => number;\r\n onCreateSerializationContext?: (sender: AdaptiveApplet) => SerializationContext;\r\n onCreateProgressOverlay?: (\r\n sender: AdaptiveApplet,\r\n request: IActivityRequest\r\n ) => HTMLElement | undefined;\r\n onRemoveProgressOverlay?: (sender: AdaptiveApplet, request: IActivityRequest) => void;\r\n onRenderManualRefreshButton?: (sender: AdaptiveApplet) => HTMLElement | undefined;\r\n onAction?: (sender: AdaptiveApplet, action: Action) => void;\r\n onShowManualRefreshButton?: (sender: AdaptiveApplet) => boolean;\r\n onShowAuthCodeInputDialog?: (sender: AdaptiveApplet, request: IActivityRequest) => boolean;\r\n onShowSigninPrompt?: (\r\n sender: AdaptiveApplet,\r\n request: IActivityRequest,\r\n signinButton: AuthCardButton\r\n ) => void;\r\n\r\n constructor() {\r\n this.renderedElement = document.createElement(\"div\");\r\n this.renderedElement.className = \"aaf-cardHost\";\r\n this.renderedElement.style.position = \"relative\";\r\n this.renderedElement.style.display = \"flex\";\r\n this.renderedElement.style.flexDirection = \"column\";\r\n\r\n this._cardHostElement = document.createElement(\"div\");\r\n\r\n this._refreshButtonHostElement = document.createElement(\"div\");\r\n this._refreshButtonHostElement.className = \"aaf-refreshButtonHost\";\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n\r\n this.renderedElement.appendChild(this._cardHostElement);\r\n this.renderedElement.appendChild(this._refreshButtonHostElement);\r\n }\r\n\r\n refreshCard() {\r\n if (this._card && this._card.refresh) {\r\n this.internalExecuteAction(this._card.refresh.action, ActivityRequestTrigger.Manual, 0);\r\n }\r\n }\r\n\r\n setCard(payload: any) {\r\n this.internalSetCard(payload, 0);\r\n }\r\n\r\n get card(): AdaptiveCard | undefined {\r\n return this._card;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport * from \"./strings\";\r\nexport * from \"./enums\";\r\nexport * from \"./shared\";\r\nexport * from \"./utils\";\r\nexport * from \"./serialization\";\r\nexport * from \"./host-capabilities\";\r\nexport * from \"./host-config\";\r\nexport * from \"./registry\";\r\nexport * from \"./card-object\";\r\nexport * from \"./card-elements\";\r\nexport * from \"./table\";\r\nexport * from \"./channel-adapter\";\r\nexport * from \"./activity-request\";\r\nexport * from \"./adaptive-applet\";\r\n\r\nexport { IAdaptiveCard, ICardElement } from \"./schema\";\r\n"], - "mappings": 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S,OACf,4CACI,QAAQ,gBACR,aAAa;AAGrB,oCAAM,UAAA,QAAQ,mBAAmB,qBAAoB,CAAE;;;iCAKxD;AACH,kCAAM,IAAI,MAAM,8BAA8B,KAAK,UAAU,QAAQ,CAAC;;;;;;;;;;;;;;uBAjL3E,CAAC;AAAI,2BAAA,CAAA,GAAA,CAAA;;;;;;;;;;;;;;;;AAmPhB,QAAAA,gBAAA,UAAA,cAAA,WAAA;AACI,cAAI,KAAK,SAAS,KAAK,MAAM,SAAS;AAClC,iBAAK,sBAAsB,KAAK,MAAM,QAAQ,QAAQ,mBAAA,uBAAuB,QAAQ,CAAC;;QAE9F;AAEA,QAAAA,gBAAA,UAAA,UAAA,SAAQ,SAAY;AAChB,eAAK,gBAAgB,SAAS,CAAC;QACnC;AAEA,eAAA,eAAIA,gBAAA,WAAA,QAAI;eAAR,WAAA;AACI,mBAAO,KAAK;UAChB;;;;AA5sBwB,QAAAA,gBAAA,2BAA2B;AAC3B,QAAAA,gBAAA,+BAA+B;AA4sB3D,eAAAA;QA9sBA;;AAAa,YAAA,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrEb,iBAAA,mBAAA,OAAA;AACA,iBAAA,iBAAA,OAAA;AACA,iBAAA,kBAAA,OAAA;AACA,iBAAA,iBAAA,OAAA;AACA,iBAAA,yBAAA,OAAA;AACA,iBAAA,6BAAA,OAAA;AACA,iBAAA,uBAAA,OAAA;AACA,iBAAA,oBAAA,OAAA;AACA,iBAAA,uBAAA,OAAA;AACA,iBAAA,yBAAA,OAAA;AACA,iBAAA,iBAAA,OAAA;AACA,iBAAA,2BAAA,OAAA;AACA,iBAAA,4BAAA,OAAA;AACA,iBAAA,2BAAA,OAAA;;;", - "names": ["Strings", "ContainerStyle", "ActionStyle", "ActionMode", "Size", "ImageSize", "SizeUnit", "TextSize", "TextWeight", "FontType", "Spacing", "TextColor", "HorizontalAlignment", "VerticalAlignment", "ActionAlignment", "ImageStyle", "ShowCardActionMode", "Orientation", "FillMode", "ActionIconPlacement", "InputTextStyle", "ValidationPhase", "ValidationEvent", "ContainerFitStatus", "TypeErrorType", "RefreshMode", "LogLevel", "GlobalSettings", "StringWithSubstitutions", "SpacingDefinition", "PaddingDefinition", "SizeAndUnit", "UUID", "_a", "Version", "Versions", "BaseSerializationContext", "SimpleSerializationContext", "PropertyDefinition", "StringProperty", "BoolProperty", "NumProperty", "PixelSizeProperty", "StringArrayProperty", "ValueSetProperty", "EnumProperty", "SerializableObjectProperty", "SerializableObjectCollectionProperty", "CustomProperty", "SerializableObjectSchema", "SerializableObject", "HostCapabilities", "ColorDefinition", "TextColorDefinition", "AdaptiveCardConfig", "ImageSetConfig", "MediaConfig", "TableConfig", "BaseTextDefinition", "TextStyleDefinition", "TextStyleSet", "TextBlockConfig", "RequiredInputLabelTextDefinition", "InputLabelConfig", "InputConfig", "FactTextDefinition", "FactTitleDefinition", "FactSetConfig", "ShowCardActionConfig", "ActionsConfig", "ColorSetDefinition", "ContainerStyleDefinition", "BuiltInContainerStyleDefinition", "ContainerStyleSet", "FontTypeDefinition", "FontTypeSet", "HostConfig", "ElementSingletonBehavior", "CardObjectRegistry", "GlobalRegistry", "ValidationResults", "CardObject", "AbstractTextFormatter", "DateFormatter", "TimeFormatter", "Constants", "MenuItem", "Collection", "PopupControl", "PopupMenu", "CardElement", "ActionProperty", "BaseTextBlock", "TextBlock", "_b", "_a", "anchor", "TextRun", "RichTextBlock", "Fact", "FactSet", "ImageDimensionProperty", "Image", "CardElementContainer", "ImageSet", "ContentSource", "CaptionSource", "MediaSource", "MediaPlayer", "HTML5MediaPlayer", "CustomMediaPlayer", "IFrameMediaMediaPlayer", "VimeoPlayer", "DailymotionPlayer", "YouTubePlayer", "Media", "Input", "TextInput", "ToggleInput", "Choice", "ChoiceSetInput", "NumberInput", "DateInput", "TimeProperty", "TimeInput", "Action", "SubmitActionBase", "SubmitAction", "ExecuteAction", "OpenUrlAction", "ToggleVisibilityAction", "StringWithSubstitutionProperty", "HttpHeader", "HttpAction", "ShowCardAction", "OverflowAction", "i", "ActionCollection", "_i", "action", "ActionSet", "ContainerStyleProperty", "StylableCardElementContainer", "ContainerBase", "BackgroundImage", "Container", "Column", "ColumnSet", "ContainerWithActions", "RefreshActionProperty", "RefreshDefinition", "AuthCardButton", "TokenExchangeResource", "Authentication", "AdaptiveCard", "InlineAdaptiveCard", "SerializationContext", "TableColumnDefinition", "StylableContainer", "TableCell", "TableRow", "Table", "ChannelAdapter", "ActivityRequestTrigger", "ActivityRequestError", "ActivityResponse", "SuccessResponse", "ErrorResponse", "LoginRequestResponse", "ActivityRequest", "AdaptiveApplet"] -} diff --git a/docs/.vitepress/cache/deps/apex-QXTPZBD5.js b/docs/.vitepress/cache/deps/apex-QXTPZBD5.js deleted file mode 100644 index eb7fbde..0000000 --- a/docs/.vitepress/cache/deps/apex-QXTPZBD5.js +++ /dev/null @@ -1,328 +0,0 @@ -import "./chunk-6PJEDKO5.js"; - -// node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js -var conf = { - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, - comments: { - lineComment: "//", - blockComment: ["/*", "*/"] - }, - brackets: [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - autoClosingPairs: [ - { open: "{", close: "}" }, - { open: "[", close: "]" }, - { open: "(", close: ")" }, - { open: '"', close: '"' }, - { open: "'", close: "'" } - ], - surroundingPairs: [ - { open: "{", close: "}" }, - { open: "[", close: "]" }, - { open: "(", close: ")" }, - { open: '"', close: '"' }, - { open: "'", close: "'" }, - { open: "<", close: ">" } - ], - folding: { - markers: { - start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))") - } - } -}; -var keywords = [ - "abstract", - "activate", - "and", - "any", - "array", - "as", - "asc", - "assert", - "autonomous", - "begin", - "bigdecimal", - "blob", - "boolean", - "break", - "bulk", - "by", - "case", - "cast", - "catch", - "char", - "class", - "collect", - "commit", - "const", - "continue", - "convertcurrency", - "decimal", - "default", - "delete", - "desc", - "do", - "double", - "else", - "end", - "enum", - "exception", - "exit", - "export", - "extends", - "false", - "final", - "finally", - "float", - "for", - "from", - "future", - "get", - "global", - "goto", - "group", - "having", - "hint", - "if", - "implements", - "import", - "in", - "inner", - "insert", - "instanceof", - "int", - "interface", - "into", - "join", - "last_90_days", - "last_month", - "last_n_days", - "last_week", - "like", - "limit", - "list", - "long", - "loop", - "map", - "merge", - "native", - "new", - "next_90_days", - "next_month", - "next_n_days", - "next_week", - "not", - "null", - "nulls", - "number", - "object", - "of", - "on", - "or", - "outer", - "override", - "package", - "parallel", - "pragma", - "private", - "protected", - "public", - "retrieve", - "return", - "returning", - "rollback", - "savepoint", - "search", - "select", - "set", - "short", - "sort", - "stat", - "static", - "strictfp", - "super", - "switch", - "synchronized", - "system", - "testmethod", - "then", - "this", - "this_month", - "this_week", - "throw", - "throws", - "today", - "tolabel", - "tomorrow", - "transaction", - "transient", - "trigger", - "true", - "try", - "type", - "undelete", - "update", - "upsert", - "using", - "virtual", - "void", - "volatile", - "webservice", - "when", - "where", - "while", - "yesterday" -]; -var uppercaseFirstLetter = (lowercase) => lowercase.charAt(0).toUpperCase() + lowercase.substr(1); -var keywordsWithCaseVariations = []; -keywords.forEach((lowercase) => { - keywordsWithCaseVariations.push(lowercase); - keywordsWithCaseVariations.push(lowercase.toUpperCase()); - keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase)); -}); -var language = { - defaultToken: "", - tokenPostfix: ".apex", - keywords: keywordsWithCaseVariations, - operators: [ - "=", - ">", - "<", - "!", - "~", - "?", - ":", - "==", - "<=", - ">=", - "!=", - "&&", - "||", - "++", - "--", - "+", - "-", - "*", - "/", - "&", - "|", - "^", - "%", - "<<", - ">>", - ">>>", - "+=", - "-=", - "*=", - "/=", - "&=", - "|=", - "^=", - "%=", - "<<=", - ">>=", - ">>>=" - ], - symbols: /[=>](?!@symbols)/, "@brackets"], - [ - /@symbols/, - { - cases: { - "@operators": "delimiter", - "@default": "" - } - } - ], - [/@\s*[a-zA-Z_\$][\w\$]*/, "annotation"], - [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, "number.float"], - [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, "number.float"], - [/(@digits)[fFdD]/, "number.float"], - [/(@digits)[lL]?/, "number"], - [/[;,.]/, "delimiter"], - [/"([^"\\]|\\.)*$/, "string.invalid"], - [/'([^'\\]|\\.)*$/, "string.invalid"], - [/"/, "string", '@string."'], - [/'/, "string", "@string.'"], - [/'[^\\']'/, "string"], - [/(')(@escapes)(')/, ["string", "string.escape", "string"]], - [/'/, "string.invalid"] - ], - whitespace: [ - [/[ \t\r\n]+/, ""], - [/\/\*\*(?!\/)/, "comment.doc", "@apexdoc"], - [/\/\*/, "comment", "@comment"], - [/\/\/.*$/, "comment"] - ], - comment: [ - [/[^\/*]+/, "comment"], - [/\*\//, "comment", "@pop"], - [/[\/*]/, "comment"] - ], - apexdoc: [ - [/[^\/*]+/, "comment.doc"], - [/\*\//, "comment.doc", "@pop"], - [/[\/*]/, "comment.doc"] - ], - string: [ - [/[^\\"']+/, "string"], - [/@escapes/, "string.escape"], - [/\\./, "string.escape.invalid"], - [ - /["']/, - { - cases: { - "$#==$S2": { token: "string", next: "@pop" }, - "@default": "string" - } - } - ] - ] - } -}; -export { - conf, - language -}; -/*! Bundled license information: - -monaco-editor/esm/vs/basic-languages/apex/apex.js: - (*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*) -*/ -//# sourceMappingURL=apex-QXTPZBD5.js.map diff --git a/docs/.vitepress/cache/deps/apex-QXTPZBD5.js.map b/docs/.vitepress/cache/deps/apex-QXTPZBD5.js.map deleted file mode 100644 index 8f5dfe5..0000000 --- a/docs/.vitepress/cache/deps/apex-QXTPZBD5.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js"], - "sourcesContent": ["/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\n\n// src/basic-languages/apex/apex.ts\nvar conf = {\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\n comments: {\n lineComment: \"//\",\n blockComment: [\"/*\", \"*/\"]\n },\n brackets: [\n [\"{\", \"}\"],\n [\"[\", \"]\"],\n [\"(\", \")\"]\n ],\n autoClosingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" }\n ],\n surroundingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n { open: \"<\", close: \">\" }\n ],\n folding: {\n markers: {\n start: new RegExp(\"^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:))\")\n }\n }\n};\nvar keywords = [\n \"abstract\",\n \"activate\",\n \"and\",\n \"any\",\n \"array\",\n \"as\",\n \"asc\",\n \"assert\",\n \"autonomous\",\n \"begin\",\n \"bigdecimal\",\n \"blob\",\n \"boolean\",\n \"break\",\n \"bulk\",\n \"by\",\n \"case\",\n \"cast\",\n \"catch\",\n \"char\",\n \"class\",\n \"collect\",\n \"commit\",\n \"const\",\n \"continue\",\n \"convertcurrency\",\n \"decimal\",\n \"default\",\n \"delete\",\n \"desc\",\n \"do\",\n \"double\",\n \"else\",\n \"end\",\n \"enum\",\n \"exception\",\n \"exit\",\n \"export\",\n \"extends\",\n \"false\",\n \"final\",\n \"finally\",\n \"float\",\n \"for\",\n \"from\",\n \"future\",\n \"get\",\n \"global\",\n \"goto\",\n \"group\",\n \"having\",\n \"hint\",\n \"if\",\n \"implements\",\n \"import\",\n \"in\",\n \"inner\",\n \"insert\",\n \"instanceof\",\n \"int\",\n \"interface\",\n \"into\",\n \"join\",\n \"last_90_days\",\n \"last_month\",\n \"last_n_days\",\n \"last_week\",\n \"like\",\n \"limit\",\n \"list\",\n \"long\",\n \"loop\",\n \"map\",\n \"merge\",\n \"native\",\n \"new\",\n \"next_90_days\",\n \"next_month\",\n \"next_n_days\",\n \"next_week\",\n \"not\",\n \"null\",\n \"nulls\",\n \"number\",\n \"object\",\n \"of\",\n \"on\",\n \"or\",\n \"outer\",\n \"override\",\n \"package\",\n \"parallel\",\n \"pragma\",\n \"private\",\n \"protected\",\n \"public\",\n \"retrieve\",\n \"return\",\n \"returning\",\n \"rollback\",\n \"savepoint\",\n \"search\",\n \"select\",\n \"set\",\n \"short\",\n \"sort\",\n \"stat\",\n \"static\",\n \"strictfp\",\n \"super\",\n \"switch\",\n \"synchronized\",\n \"system\",\n \"testmethod\",\n \"then\",\n \"this\",\n \"this_month\",\n \"this_week\",\n \"throw\",\n \"throws\",\n \"today\",\n \"tolabel\",\n \"tomorrow\",\n \"transaction\",\n \"transient\",\n \"trigger\",\n \"true\",\n \"try\",\n \"type\",\n \"undelete\",\n \"update\",\n \"upsert\",\n \"using\",\n \"virtual\",\n \"void\",\n \"volatile\",\n \"webservice\",\n \"when\",\n \"where\",\n \"while\",\n \"yesterday\"\n];\nvar uppercaseFirstLetter = (lowercase) => lowercase.charAt(0).toUpperCase() + lowercase.substr(1);\nvar keywordsWithCaseVariations = [];\nkeywords.forEach((lowercase) => {\n keywordsWithCaseVariations.push(lowercase);\n keywordsWithCaseVariations.push(lowercase.toUpperCase());\n keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));\n});\nvar language = {\n defaultToken: \"\",\n tokenPostfix: \".apex\",\n keywords: keywordsWithCaseVariations,\n operators: [\n \"=\",\n \">\",\n \"<\",\n \"!\",\n \"~\",\n \"?\",\n \":\",\n \"==\",\n \"<=\",\n \">=\",\n \"!=\",\n \"&&\",\n \"||\",\n \"++\",\n \"--\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"&\",\n \"|\",\n \"^\",\n \"%\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+=\",\n \"-=\",\n \"*=\",\n \"/=\",\n \"&=\",\n \"|=\",\n \"^=\",\n \"%=\",\n \"<<=\",\n \">>=\",\n \">>>=\"\n ],\n symbols: /[=>](?!@symbols)/, \"@brackets\"],\n [\n /@symbols/,\n {\n cases: {\n \"@operators\": \"delimiter\",\n \"@default\": \"\"\n }\n }\n ],\n [/@\\s*[a-zA-Z_\\$][\\w\\$]*/, \"annotation\"],\n [/(@digits)[eE]([\\-+]?(@digits))?[fFdD]?/, \"number.float\"],\n [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?[fFdD]?/, \"number.float\"],\n [/(@digits)[fFdD]/, \"number.float\"],\n [/(@digits)[lL]?/, \"number\"],\n [/[;,.]/, \"delimiter\"],\n [/\"([^\"\\\\]|\\\\.)*$/, \"string.invalid\"],\n [/'([^'\\\\]|\\\\.)*$/, \"string.invalid\"],\n [/\"/, \"string\", '@string.\"'],\n [/'/, \"string\", \"@string.'\"],\n [/'[^\\\\']'/, \"string\"],\n [/(')(@escapes)(')/, [\"string\", \"string.escape\", \"string\"]],\n [/'/, \"string.invalid\"]\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, \"\"],\n [/\\/\\*\\*(?!\\/)/, \"comment.doc\", \"@apexdoc\"],\n [/\\/\\*/, \"comment\", \"@comment\"],\n [/\\/\\/.*$/, \"comment\"]\n ],\n comment: [\n [/[^\\/*]+/, \"comment\"],\n [/\\*\\//, \"comment\", \"@pop\"],\n [/[\\/*]/, \"comment\"]\n ],\n apexdoc: [\n [/[^\\/*]+/, \"comment.doc\"],\n [/\\*\\//, \"comment.doc\", \"@pop\"],\n [/[\\/*]/, \"comment.doc\"]\n ],\n string: [\n [/[^\\\\\"']+/, \"string\"],\n [/@escapes/, \"string.escape\"],\n [/\\\\./, \"string.escape.invalid\"],\n [\n /[\"']/,\n {\n cases: {\n \"$#==$S2\": { token: \"string\", next: \"@pop\" },\n \"@default\": \"string\"\n }\n }\n ]\n ]\n }\n};\nexport {\n conf,\n language\n};\n"], - "mappings": ";;;AAQA,IAAI,OAAO;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AAAA,IACR,aAAa;AAAA,IACb,cAAc,CAAC,MAAM,IAAI;AAAA,EAC3B;AAAA,EACA,UAAU;AAAA,IACR,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,EACX;AAAA,EACA,kBAAkB;AAAA,IAChB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,EAC1B;AAAA,EACA,kBAAkB;AAAA,IAChB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,EAC1B;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,OAAO,IAAI,OAAO,oDAAoD;AAAA,MACtE,KAAK,IAAI,OAAO,sDAAsD;AAAA,IACxE;AAAA,EACF;AACF;AACA,IAAI,WAAW;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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,SAAS;AAAA,MACrB,CAAC,QAAQ,WAAW,MAAM;AAAA,MAC1B,CAAC,SAAS,SAAS;AAAA,IACrB;AAAA,IACA,SAAS;AAAA,MACP,CAAC,WAAW,aAAa;AAAA,MACzB,CAAC,QAAQ,eAAe,MAAM;AAAA,MAC9B,CAAC,SAAS,aAAa;AAAA,IACzB;AAAA,IACA,QAAQ;AAAA,MACN,CAAC,YAAY,QAAQ;AAAA,MACrB,CAAC,YAAY,eAAe;AAAA,MAC5B,CAAC,OAAO,uBAAuB;AAAA,MAC/B;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,WAAW,EAAE,OAAO,UAAU,MAAM,OAAO;AAAA,YAC3C,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;", - "names": [] -} diff --git a/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js b/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js deleted file mode 100644 index 302ff84..0000000 --- a/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js +++ /dev/null @@ -1,83 +0,0 @@ -import "./chunk-6PJEDKO5.js"; - -// node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js -var conf = { - comments: { - lineComment: "#" - } -}; -var language = { - defaultToken: "keyword", - ignoreCase: true, - tokenPostfix: ".azcli", - str: /[^#\s]/, - tokenizer: { - root: [ - { include: "@comment" }, - [ - /\s-+@str*\s*/, - { - cases: { - "@eos": { token: "key.identifier", next: "@popall" }, - "@default": { token: "key.identifier", next: "@type" } - } - } - ], - [ - /^-+@str*\s*/, - { - cases: { - "@eos": { token: "key.identifier", next: "@popall" }, - "@default": { token: "key.identifier", next: "@type" } - } - } - ] - ], - type: [ - { include: "@comment" }, - [ - /-+@str*\s*/, - { - cases: { - "@eos": { token: "key.identifier", next: "@popall" }, - "@default": "key.identifier" - } - } - ], - [ - /@str+\s*/, - { - cases: { - "@eos": { token: "string", next: "@popall" }, - "@default": "string" - } - } - ] - ], - comment: [ - [ - /#.*$/, - { - cases: { - "@eos": { token: "comment", next: "@popall" } - } - } - ] - ] - } -}; -export { - conf, - language -}; -/*! Bundled license information: - -monaco-editor/esm/vs/basic-languages/azcli/azcli.js: - (*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*) -*/ -//# sourceMappingURL=azcli-AKNZCCZ4.js.map diff --git a/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js.map b/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js.map deleted file mode 100644 index c9a449f..0000000 --- a/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js"], - "sourcesContent": ["/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\n\n// src/basic-languages/azcli/azcli.ts\nvar conf = {\n comments: {\n lineComment: \"#\"\n }\n};\nvar language = {\n defaultToken: \"keyword\",\n ignoreCase: true,\n tokenPostfix: \".azcli\",\n str: /[^#\\s]/,\n tokenizer: {\n root: [\n { include: \"@comment\" },\n [\n /\\s-+@str*\\s*/,\n {\n cases: {\n \"@eos\": { token: \"key.identifier\", next: \"@popall\" },\n \"@default\": { token: \"key.identifier\", next: \"@type\" }\n }\n }\n ],\n [\n /^-+@str*\\s*/,\n {\n cases: {\n \"@eos\": { token: \"key.identifier\", next: \"@popall\" },\n \"@default\": { token: \"key.identifier\", next: \"@type\" }\n }\n }\n ]\n ],\n type: [\n { include: \"@comment\" },\n [\n /-+@str*\\s*/,\n {\n cases: {\n \"@eos\": { token: \"key.identifier\", next: \"@popall\" },\n \"@default\": \"key.identifier\"\n }\n }\n ],\n [\n /@str+\\s*/,\n {\n cases: {\n \"@eos\": { token: \"string\", next: \"@popall\" },\n \"@default\": \"string\"\n }\n }\n ]\n ],\n comment: [\n [\n /#.*$/,\n {\n cases: {\n \"@eos\": { token: \"comment\", next: \"@popall\" }\n }\n }\n ]\n ]\n }\n};\nexport {\n conf,\n language\n};\n"], - "mappings": ";;;AAQA,IAAI,OAAO;AAAA,EACT,UAAU;AAAA,IACR,aAAa;AAAA,EACf;AACF;AACA,IAAI,WAAW;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,KAAK;AAAA,EACL,WAAW;AAAA,IACT,MAAM;AAAA,MACJ,EAAE,SAAS,WAAW;AAAA,MACtB;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,kBAAkB,MAAM,UAAU;AAAA,YACnD,YAAY,EAAE,OAAO,kBAAkB,MAAM,QAAQ;AAAA,UACvD;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,kBAAkB,MAAM,UAAU;AAAA,YACnD,YAAY,EAAE,OAAO,kBAAkB,MAAM,QAAQ;AAAA,UACvD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,EAAE,SAAS,WAAW;AAAA,MACtB;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,kBAAkB,MAAM,UAAU;AAAA,YACnD,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,UAAU,MAAM,UAAU;AAAA,YAC3C,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,WAAW,MAAM,UAAU;AAAA,UAC9C;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;", - "names": [] -} diff --git a/docs/.vitepress/cache/deps/bat-KITOMZVG.js b/docs/.vitepress/cache/deps/bat-KITOMZVG.js deleted file mode 100644 index 06e09e4..0000000 --- a/docs/.vitepress/cache/deps/bat-KITOMZVG.js +++ /dev/null @@ -1,104 +0,0 @@ -import "./chunk-6PJEDKO5.js"; - -// node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.js -var conf = { - comments: { - lineComment: "REM" - }, - brackets: [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - autoClosingPairs: [ - { open: "{", close: "}" }, - { open: "[", close: "]" }, - { open: "(", close: ")" }, - { open: '"', close: '"' } - ], - surroundingPairs: [ - { open: "[", close: "]" }, - { open: "(", close: ")" }, - { open: '"', close: '"' } - ], - folding: { - markers: { - start: new RegExp("^\\s*(::\\s*|REM\\s+)#region"), - end: new RegExp("^\\s*(::\\s*|REM\\s+)#endregion") - } - } -}; -var language = { - defaultToken: "", - ignoreCase: true, - tokenPostfix: ".bat", - brackets: [ - { token: "delimiter.bracket", open: "{", close: "}" }, - { token: "delimiter.parenthesis", open: "(", close: ")" }, - { token: "delimiter.square", open: "[", close: "]" } - ], - keywords: /call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/, - symbols: /[=> `\\b${text}\\b`; -var identifierStart = "[_a-zA-Z]"; -var identifierContinue = "[_a-zA-Z0-9]"; -var identifier = bounded(`${identifierStart}${identifierContinue}*`); -var keywords = [ - "targetScope", - "resource", - "module", - "param", - "var", - "output", - "for", - "in", - "if", - "existing" -]; -var namedLiterals = ["true", "false", "null"]; -var nonCommentWs = `[ \\t\\r\\n]`; -var numericLiteral = `[0-9]+`; -var conf = { - comments: { - lineComment: "//", - blockComment: ["/*", "*/"] - }, - brackets: [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - surroundingPairs: [ - { open: "{", close: "}" }, - { open: "[", close: "]" }, - { open: "(", close: ")" }, - { open: "'", close: "'" }, - { open: "'''", close: "'''" } - ], - autoClosingPairs: [ - { open: "{", close: "}" }, - { open: "[", close: "]" }, - { open: "(", close: ")" }, - { open: "'", close: "'", notIn: ["string", "comment"] }, - { open: "'''", close: "'''", notIn: ["string", "comment"] } - ], - autoCloseBefore: ":.,=}])' \n ", - indentationRules: { - increaseIndentPattern: new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"), - decreaseIndentPattern: new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$") - } -}; -var language = { - defaultToken: "", - tokenPostfix: ".bicep", - brackets: [ - { open: "{", close: "}", token: "delimiter.curly" }, - { open: "[", close: "]", token: "delimiter.square" }, - { open: "(", close: ")", token: "delimiter.parenthesis" } - ], - symbols: /[=> `\\\\b${text}\\\\b`;\nvar identifierStart = \"[_a-zA-Z]\";\nvar identifierContinue = \"[_a-zA-Z0-9]\";\nvar identifier = bounded(`${identifierStart}${identifierContinue}*`);\nvar keywords = [\n \"targetScope\",\n \"resource\",\n \"module\",\n \"param\",\n \"var\",\n \"output\",\n \"for\",\n \"in\",\n \"if\",\n \"existing\"\n];\nvar namedLiterals = [\"true\", \"false\", \"null\"];\nvar nonCommentWs = `[ \\\\t\\\\r\\\\n]`;\nvar numericLiteral = `[0-9]+`;\nvar conf = {\n comments: {\n lineComment: \"//\",\n blockComment: [\"/*\", \"*/\"]\n },\n brackets: [\n [\"{\", \"}\"],\n [\"[\", \"]\"],\n [\"(\", \")\"]\n ],\n surroundingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: \"'\", close: \"'\" },\n { open: \"'''\", close: \"'''\" }\n ],\n autoClosingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: \"'\", close: \"'\", notIn: [\"string\", \"comment\"] },\n { open: \"'''\", close: \"'''\", notIn: [\"string\", \"comment\"] }\n ],\n autoCloseBefore: \":.,=}])' \\n\t\",\n indentationRules: {\n increaseIndentPattern: new RegExp(\"^((?!\\\\/\\\\/).)*(\\\\{[^}\\\"'`]*|\\\\([^)\\\"'`]*|\\\\[[^\\\\]\\\"'`]*)$\"),\n decreaseIndentPattern: new RegExp(\"^((?!.*?\\\\/\\\\*).*\\\\*/)?\\\\s*[\\\\}\\\\]].*$\")\n }\n};\nvar language = {\n defaultToken: \"\",\n tokenPostfix: \".bicep\",\n brackets: [\n { open: \"{\", close: \"}\", token: \"delimiter.curly\" },\n { open: \"[\", close: \"]\", token: \"delimiter.square\" },\n { open: \"(\", close: \")\", token: \"delimiter.parenthesis\" }\n ],\n symbols: /[=>"] - ], - autoClosingPairs: [ - { open: "{", close: "}" }, - { open: "[", close: "]" }, - { open: "(", close: ")" }, - { open: "<", close: ">" }, - { open: "'", close: "'" }, - { open: '"', close: '"' }, - { open: "(*", close: "*)" } - ], - surroundingPairs: [ - { open: "{", close: "}" }, - { open: "[", close: "]" }, - { open: "(", close: ")" }, - { open: "<", close: ">" }, - { open: "'", close: "'" }, - { open: '"', close: '"' }, - { open: "(*", close: "*)" } - ] -}; -var language = { - defaultToken: "", - tokenPostfix: ".cameligo", - ignoreCase: true, - brackets: [ - { open: "{", close: "}", token: "delimiter.curly" }, - { open: "[", close: "]", token: "delimiter.square" }, - { open: "(", close: ")", token: "delimiter.parenthesis" }, - { open: "<", close: ">", token: "delimiter.angle" } - ], - keywords: [ - "abs", - "assert", - "block", - "Bytes", - "case", - "Crypto", - "Current", - "else", - "failwith", - "false", - "for", - "fun", - "if", - "in", - "let", - "let%entry", - "let%init", - "List", - "list", - "Map", - "map", - "match", - "match%nat", - "mod", - "not", - "operation", - "Operation", - "of", - "record", - "Set", - "set", - "sender", - "skip", - "source", - "String", - "then", - "to", - "true", - "type", - "with" - ], - typeKeywords: ["int", "unit", "string", "tz", "nat", "bool"], - operators: [ - "=", - ">", - "<", - "<=", - ">=", - "<>", - ":", - ":=", - "and", - "mod", - "or", - "+", - "-", - "*", - "/", - "@", - "&", - "^", - "%", - "->", - "<-", - "&&", - "||" - ], - symbols: /[=><:@\^&|+\-*\/\^%]+/, - tokenizer: { - root: [ - [ - /[a-zA-Z_][\w]*/, - { - cases: { - "@keywords": { token: "keyword.$0" }, - "@default": "identifier" - } - } - ], - { include: "@whitespace" }, - [/[{}()\[\]]/, "@brackets"], - [/[<>](?!@symbols)/, "@brackets"], - [ - /@symbols/, - { - cases: { - "@operators": "delimiter", - "@default": "" - } - } - ], - [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"], - [/\$[0-9a-fA-F]{1,16}/, "number.hex"], - [/\d+/, "number"], - [/[;,.]/, "delimiter"], - [/'([^'\\]|\\.)*$/, "string.invalid"], - [/'/, "string", "@string"], - [/'[^\\']'/, "string"], - [/'/, "string.invalid"], - [/\#\d+/, "string"] - ], - comment: [ - [/[^\(\*]+/, "comment"], - [/\*\)/, "comment", "@pop"], - [/\(\*/, "comment"] - ], - string: [ - [/[^\\']+/, "string"], - [/\\./, "string.escape.invalid"], - [/'/, { token: "string.quote", bracket: "@close", next: "@pop" }] - ], - whitespace: [ - [/[ \t\r\n]+/, "white"], - [/\(\*/, "comment", "@comment"], - [/\/\/.*$/, "comment"] - ] - } -}; -export { - conf, - language -}; -/*! Bundled license information: - -monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js: - (*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*) -*/ -//# sourceMappingURL=cameligo-47AYWHA2.js.map diff --git a/docs/.vitepress/cache/deps/cameligo-47AYWHA2.js.map b/docs/.vitepress/cache/deps/cameligo-47AYWHA2.js.map deleted file mode 100644 index dcbe86d..0000000 --- a/docs/.vitepress/cache/deps/cameligo-47AYWHA2.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js"], - "sourcesContent": ["/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\n\n// src/basic-languages/cameligo/cameligo.ts\nvar conf = {\n comments: {\n lineComment: \"//\",\n blockComment: [\"(*\", \"*)\"]\n },\n brackets: [\n [\"{\", \"}\"],\n [\"[\", \"]\"],\n [\"(\", \")\"],\n [\"<\", \">\"]\n ],\n autoClosingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: \"<\", close: \">\" },\n { open: \"'\", close: \"'\" },\n { open: '\"', close: '\"' },\n { open: \"(*\", close: \"*)\" }\n ],\n surroundingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: \"<\", close: \">\" },\n { open: \"'\", close: \"'\" },\n { open: '\"', close: '\"' },\n { open: \"(*\", close: \"*)\" }\n ]\n};\nvar language = {\n defaultToken: \"\",\n tokenPostfix: \".cameligo\",\n ignoreCase: true,\n brackets: [\n { open: \"{\", close: \"}\", token: \"delimiter.curly\" },\n { open: \"[\", close: \"]\", token: \"delimiter.square\" },\n { open: \"(\", close: \")\", token: \"delimiter.parenthesis\" },\n { open: \"<\", close: \">\", token: \"delimiter.angle\" }\n ],\n keywords: [\n \"abs\",\n \"assert\",\n \"block\",\n \"Bytes\",\n \"case\",\n \"Crypto\",\n \"Current\",\n \"else\",\n \"failwith\",\n \"false\",\n \"for\",\n \"fun\",\n \"if\",\n \"in\",\n \"let\",\n \"let%entry\",\n \"let%init\",\n \"List\",\n \"list\",\n \"Map\",\n \"map\",\n \"match\",\n \"match%nat\",\n \"mod\",\n \"not\",\n \"operation\",\n \"Operation\",\n \"of\",\n \"record\",\n \"Set\",\n \"set\",\n \"sender\",\n \"skip\",\n \"source\",\n \"String\",\n \"then\",\n \"to\",\n \"true\",\n \"type\",\n \"with\"\n ],\n typeKeywords: [\"int\", \"unit\", \"string\", \"tz\", \"nat\", \"bool\"],\n operators: [\n \"=\",\n \">\",\n \"<\",\n \"<=\",\n \">=\",\n \"<>\",\n \":\",\n \":=\",\n \"and\",\n \"mod\",\n \"or\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"@\",\n \"&\",\n \"^\",\n \"%\",\n \"->\",\n \"<-\",\n \"&&\",\n \"||\"\n ],\n symbols: /[=><:@\\^&|+\\-*\\/\\^%]+/,\n tokenizer: {\n root: [\n [\n /[a-zA-Z_][\\w]*/,\n {\n cases: {\n \"@keywords\": { token: \"keyword.$0\" },\n \"@default\": \"identifier\"\n }\n }\n ],\n { include: \"@whitespace\" },\n [/[{}()\\[\\]]/, \"@brackets\"],\n [/[<>](?!@symbols)/, \"@brackets\"],\n [\n /@symbols/,\n {\n cases: {\n \"@operators\": \"delimiter\",\n \"@default\": \"\"\n }\n }\n ],\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?/, \"number.float\"],\n [/\\$[0-9a-fA-F]{1,16}/, \"number.hex\"],\n [/\\d+/, \"number\"],\n [/[;,.]/, \"delimiter\"],\n [/'([^'\\\\]|\\\\.)*$/, \"string.invalid\"],\n [/'/, \"string\", \"@string\"],\n [/'[^\\\\']'/, \"string\"],\n [/'/, \"string.invalid\"],\n [/\\#\\d+/, \"string\"]\n ],\n comment: [\n [/[^\\(\\*]+/, \"comment\"],\n [/\\*\\)/, \"comment\", \"@pop\"],\n [/\\(\\*/, \"comment\"]\n ],\n string: [\n [/[^\\\\']+/, \"string\"],\n [/\\\\./, \"string.escape.invalid\"],\n [/'/, { token: \"string.quote\", bracket: \"@close\", next: \"@pop\" }]\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, \"white\"],\n [/\\(\\*/, \"comment\", \"@comment\"],\n [/\\/\\/.*$/, \"comment\"]\n ]\n }\n};\nexport {\n conf,\n language\n};\n"], - "mappings": ";;;AAQA,IAAI,OAAO;AAAA,EACT,UAAU;AAAA,IACR,aAAa;AAAA,IACb,cAAc,CAAC,MAAM,IAAI;AAAA,EAC3B;AAAA,EACA,UAAU;AAAA,IACR,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,EACX;AAAA,EACA,kBAAkB;AAAA,IAChB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,MAAM,OAAO,KAAK;AAAA,EAC5B;AAAA,EACA,kBAAkB;AAAA,IAChB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,MAAM,OAAO,KAAK;AAAA,EAC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AAAA,YACL,aAAa,EAAE,OAAO,aAAa;AAAA,YACnC,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,MACA,EAAE,SAAS,cAAc;AAAA,MACzB,CAAC,cAAc,WAAW;AAAA,MAC1B,CAAC,oBAAoB,WAAW;AAAA,MAChC;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,cAAc;AAAA,YACd,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,MACA,CAAC,4BAA4B,cAAc;AAAA,MAC3C,CAAC,uBAAuB,YAAY;AAAA,MACpC,CAAC,OAAO,QAAQ;AAAA,MAChB,CAAC,SAAS,WAAW;AAAA,MACrB,CAAC,mBAAmB,gBAAgB;AAAA,MACpC,CAAC,KAAK,UAAU,SAAS;AAAA,MACzB,CAAC,YAAY,QAAQ;AAAA,MACrB,CAAC,KAAK,gBAAgB;AAAA,MACtB,CAAC,SAAS,QAAQ;AAAA,IACpB;AAAA,IACA,SAAS;AAAA,MACP,CAAC,YAAY,SAAS;AAAA,MACtB,CAAC,QAAQ,WAAW,MAAM;AAAA,MAC1B,CAAC,QAAQ,SAAS;AAAA,IACpB;AAAA,IACA,QAAQ;AAAA,MACN,CAAC,WAAW,QAAQ;AAAA,MACpB,CAAC,OAAO,uBAAuB;AAAA,MAC/B,CAAC,KAAK,EAAE,OAAO,gBAAgB,SAAS,UAAU,MAAM,OAAO,CAAC;AAAA,IAClE;AAAA,IACA,YAAY;AAAA,MACV,CAAC,cAAc,OAAO;AAAA,MACtB,CAAC,QAAQ,WAAW,UAAU;AAAA,MAC9B,CAAC,WAAW,SAAS;AAAA,IACvB;AAAA,EACF;AACF;", - "names": [] -} diff --git a/docs/.vitepress/cache/deps/chunk-3C4OEVM2.js b/docs/.vitepress/cache/deps/chunk-3C4OEVM2.js deleted file mode 100644 index 12eea52..0000000 --- a/docs/.vitepress/cache/deps/chunk-3C4OEVM2.js +++ /dev/null @@ -1,10903 +0,0 @@ -// node_modules/@vue/shared/dist/shared.esm-bundler.js -function makeMap(str, expectsLowerCase) { - const map2 = /* @__PURE__ */ Object.create(null); - const list = str.split(","); - for (let i = 0; i < list.length; i++) { - map2[list[i]] = true; - } - return expectsLowerCase ? (val) => !!map2[val.toLowerCase()] : (val) => !!map2[val]; -} -var EMPTY_OBJ = true ? Object.freeze({}) : {}; -var EMPTY_ARR = true ? Object.freeze([]) : []; -var NOOP = () => { -}; -var NO = () => false; -var onRE = /^on[^a-z]/; -var isOn = (key) => onRE.test(key); -var isModelListener = (key) => key.startsWith("onUpdate:"); -var extend = Object.assign; -var remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var hasOwn = (val, key) => hasOwnProperty.call(val, key); -var isArray = Array.isArray; -var isMap = (val) => toTypeString(val) === "[object Map]"; -var isSet = (val) => toTypeString(val) === "[object Set]"; -var isDate = (val) => toTypeString(val) === "[object Date]"; -var isRegExp = (val) => toTypeString(val) === "[object RegExp]"; -var isFunction = (val) => typeof val === "function"; -var isString = (val) => typeof val === "string"; -var isSymbol = (val) => typeof val === "symbol"; -var isObject = (val) => val !== null && typeof val === "object"; -var isPromise = (val) => { - return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); -}; -var objectToString = Object.prototype.toString; -var toTypeString = (value) => objectToString.call(value); -var toRawType = (value) => { - return toTypeString(value).slice(8, -1); -}; -var isPlainObject = (val) => toTypeString(val) === "[object Object]"; -var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -var isReservedProp = makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -var isBuiltInDirective = makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -var cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -var camelizeRE = /-(\w)/g; -var camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); -}); -var hyphenateRE = /\B([A-Z])/g; -var hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() -); -var capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -var toHandlerKey = cacheStringFunction((str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; -}); -var hasChanged = (value, oldValue) => !Object.is(value, oldValue); -var invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } -}; -var def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); -}; -var looseToNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -var toNumber = (val) => { - const n = isString(val) ? Number(val) : NaN; - return isNaN(n) ? val : n; -}; -var _globalThis; -var getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; -var GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console"; -var isGloballyAllowed = makeMap(GLOBALS_ALLOWED); -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString(value) || isObject(value)) { - return value; - } -} -var listDelimiterRE = /;(?![^(]*\))/g; -var propertyDelimiterRE = /:([^]+)/; -var styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString(value)) { - res = value; - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} -var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; -var isHTMLTag = makeMap(HTML_TAGS); -var isSVGTag = makeMap(SVG_TAGS); -var isVoidTag = makeMap(VOID_TAGS); -var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -var isSpecialBooleanAttr = makeMap(specialBooleanAttrs); -var isBooleanAttr = makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` -); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -var isKnownHtmlAttr = makeMap( - `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` -); -var isKnownSvgAttr = makeMap( - `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` -); -function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex((item) => looseEqual(item, val)); -} -var toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); -}; -var replacer = (_key, val) => { - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => { - entries[`${key} =>`] = val2; - return entries; - }, {}) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; - -// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js -function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); -} -var activeEffectScope; -var EffectScope = class { - constructor(detached = false) { - this.detached = detached; - this._active = true; - this.effects = []; - this.cleanups = []; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else if (true) { - warn(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - this._active = false; - } - } -}; -function effectScope(detached) { - return new EffectScope(detached); -} -function recordEffectScope(effect2, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect2); - } -} -function getCurrentScope() { - return activeEffectScope; -} -function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } else if (true) { - warn( - `onScopeDispose() is called when there is no active effect scope to be associated with.` - ); - } -} -var createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; -}; -var wasTracked = (dep) => (dep.w & trackOpBit) > 0; -var newTracked = (dep) => (dep.n & trackOpBit) > 0; -var initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; - } - } -}; -var finalizeDepMarkers = (effect2) => { - const { deps } = effect2; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect2); - } else { - deps[ptr++] = dep; - } - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } -}; -var targetMap = /* @__PURE__ */ new WeakMap(); -var effectTrackDepth = 0; -var trackOpBit = 1; -var maxMarkerBits = 30; -var activeEffect; -var ITERATE_KEY = Symbol(true ? "iterate" : ""); -var MAP_KEY_ITERATE_KEY = Symbol(true ? "Map key iterate" : ""); -var ReactiveEffect = class { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = void 0; - recordEffectScope(this, scope); - } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } else { - cleanupEffect(this); - } - return this.fn(); - } finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = void 0; - if (this.deferStop) { - this.stop(); - } - } - } - stop() { - if (activeEffect === this) { - this.deferStop = true; - } else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } - } -}; -function cleanupEffect(effect2) { - const { deps } = effect2; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect2); - } - deps.length = 0; - } -} -function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; -} -function stop(runner) { - runner.effect.stop(); -} -var shouldTrack = true; -var trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = createDep()); - } - const eventInfo = true ? { effect: activeEffect, target, type, key } : void 0; - trackEffects(dep, eventInfo); - } -} -function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack2 = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; - shouldTrack2 = !wasTracked(dep); - } - } else { - shouldTrack2 = !dep.has(activeEffect); - } - if (shouldTrack2) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack( - extend( - { - effect: activeEffect - }, - debuggerEventExtraInfo - ) - ); - } - } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - return; - } - let deps = []; - if (type === "clear") { - deps = [...depsMap.values()]; - } else if (key === "length" && isArray(target)) { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { - deps.push(dep); - } - }); - } else { - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - switch (type) { - case "add": - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isIntegerKey(key)) { - deps.push(depsMap.get("length")); - } - break; - case "delete": - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = true ? { target, type, key, newValue, oldValue, oldTarget } : void 0; - if (deps.length === 1) { - if (deps[0]) { - if (true) { - triggerEffects(deps[0], eventInfo); - } else { - triggerEffects(deps[0]); - } - } - } else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } - if (true) { - triggerEffects(createDep(effects), eventInfo); - } else { - triggerEffects(createDep(effects)); - } - } -} -function triggerEffects(dep, debuggerEventExtraInfo) { - const effects = isArray(dep) ? dep : [...dep]; - for (const effect2 of effects) { - if (effect2.computed) { - triggerEffect(effect2, debuggerEventExtraInfo); - } - } - for (const effect2 of effects) { - if (!effect2.computed) { - triggerEffect(effect2, debuggerEventExtraInfo); - } - } -} -function triggerEffect(effect2, debuggerEventExtraInfo) { - if (effect2 !== activeEffect || effect2.allowRecurse) { - if (effect2.onTrigger) { - effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo)); - } - if (effect2.scheduler) { - effect2.scheduler(); - } else { - effect2.run(); - } - } -} -function getDepFromReactive(object, key) { - var _a; - return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); -} -var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`); -var builtInSymbols = new Set( - Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) -); -var arrayInstrumentations = createArrayInstrumentations(); -function createArrayInstrumentations() { - const instrumentations = {}; - ["includes", "indexOf", "lastIndexOf"].forEach((key) => { - instrumentations[key] = function(...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get", i + ""); - } - const res = arr[key](...args); - if (res === -1 || res === false) { - return arr[key](...args.map(toRaw)); - } else { - return res; - } - }; - }); - ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { - instrumentations[key] = function(...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -function hasOwnProperty2(key) { - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -var BaseReactiveHandler = class { - constructor(_isReadonly = false, _shallow = false) { - this._isReadonly = _isReadonly; - this._shallow = _shallow; - } - get(target, key, receiver) { - const isReadonly2 = this._isReadonly, shallow = this._shallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return shallow; - } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly2) { - if (targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - if (key === "hasOwnProperty") { - return hasOwnProperty2; - } - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -}; -var MutableReactiveHandler = class extends BaseReactiveHandler { - constructor(shallow = false) { - super(false, shallow); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!this._shallow) { - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -}; -var ReadonlyReactiveHandler = class extends BaseReactiveHandler { - constructor(shallow = false) { - super(true, shallow); - } - set(target, key) { - if (true) { - warn( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - if (true) { - warn( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } -}; -var mutableHandlers = new MutableReactiveHandler(); -var readonlyHandlers = new ReadonlyReactiveHandler(); -var shallowReactiveHandlers = new MutableReactiveHandler( - true -); -var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true); -var toShallow = (value) => value; -var getProto = (v) => Reflect.getPrototypeOf(v); -function get(target, key, isReadonly2 = false, isShallow3 = false) { - target = target["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has: has2 } = getProto(rawTarget); - const wrap = isShallow3 ? toShallow : isReadonly2 ? toReadonly : toReactive; - if (has2.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has2.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } -} -function has(key, isReadonly2 = false) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); -} -function size(target, isReadonly2 = false) { - target = target["__v_raw"]; - !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); -} -function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; -} -function set(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has: has2, get: get2 } = getProto(target); - let hadKey = has2.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); - } else if (true) { - checkIdentityKeys(target, has2, key); - } - const oldValue = get2.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - return this; -} -function deleteEntry(key) { - const target = toRaw(this); - const { has: has2, get: get2 } = getProto(target); - let hadKey = has2.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); - } else if (true) { - checkIdentityKeys(target, has2, key); - } - const oldValue = get2 ? get2.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; -} -function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0; - const result = target.clear(); - if (hadItems) { - trigger(target, "clear", void 0, void 0, oldTarget); - } - return result; -} -function createForEach(isReadonly2, isShallow3) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = isShallow3 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; -} -function createIterableMethod(method, isReadonly2, isShallow3) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow3 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -function createReadonlyMethod(type) { - return function(...args) { - if (true) { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn( - `${capitalize(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -function createInstrumentations() { - const mutableInstrumentations2 = { - get(key) { - return get(this, key); - }, - get size() { - return size(this); - }, - has, - add, - set, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations2 = { - get(key) { - return get(this, key, false, true); - }, - get size() { - return size(this); - }, - has, - add, - set, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations2 = { - get(key) { - return get(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has.call(this, key, true); - }, - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear"), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations2 = { - get(key) { - return get(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has.call(this, key, true); - }, - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear"), - forEach: createForEach(true, true) - }; - const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; - iteratorMethods.forEach((method) => { - mutableInstrumentations2[method] = createIterableMethod( - method, - false, - false - ); - readonlyInstrumentations2[method] = createIterableMethod( - method, - true, - false - ); - shallowInstrumentations2[method] = createIterableMethod( - method, - false, - true - ); - shallowReadonlyInstrumentations2[method] = createIterableMethod( - method, - true, - true - ); - }); - return [ - mutableInstrumentations2, - readonlyInstrumentations2, - shallowInstrumentations2, - shallowReadonlyInstrumentations2 - ]; -} -var [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations -] = createInstrumentations(); -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -var mutableCollectionHandlers = { - get: createInstrumentationGetter(false, false) -}; -var shallowCollectionHandlers = { - get: createInstrumentationGetter(false, true) -}; -var readonlyCollectionHandlers = { - get: createInstrumentationGetter(true, false) -}; -var shallowReadonlyCollectionHandlers = { - get: createInstrumentationGetter(true, true) -}; -function checkIdentityKeys(target, has2, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has2.call(target, rawKey)) { - const type = toRawType(target); - console.warn( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } -} -var reactiveMap = /* @__PURE__ */ new WeakMap(); -var shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -var readonlyMap = /* @__PURE__ */ new WeakMap(); -var shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2; - default: - return 0; - } -} -function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); -} -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - if (true) { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); -} -function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); -} -function isShallow(value) { - return !!(value && value["__v_isShallow"]); -} -function isProxy(value) { - return isReactive(value) || isReadonly(value); -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -function markRaw(value) { - def(value, "__v_skip", true); - return value; -} -var toReactive = (value) => isObject(value) ? reactive(value) : value; -var toReadonly = (value) => isObject(value) ? readonly(value) : value; -function trackRefValue(ref2) { - if (shouldTrack && activeEffect) { - ref2 = toRaw(ref2); - if (true) { - trackEffects(ref2.dep || (ref2.dep = createDep()), { - target: ref2, - type: "get", - key: "value" - }); - } else { - trackEffects(ref2.dep || (ref2.dep = createDep())); - } - } -} -function triggerRefValue(ref2, newVal) { - ref2 = toRaw(ref2); - const dep = ref2.dep; - if (dep) { - if (true) { - triggerEffects(dep, { - target: ref2, - type: "set", - key: "value", - newValue: newVal - }); - } else { - triggerEffects(dep); - } - } -} -function isRef(r) { - return !!(r && r.__v_isRef === true); -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -var RefImpl = class { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = void 0; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); - newVal = useDirectValue ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = useDirectValue ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } - } -}; -function triggerRef(ref2) { - triggerRefValue(ref2, true ? ref2.value : void 0); -} -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -function toValue(source) { - return isFunction(source) ? source() : unref(source); -} -var shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -var CustomRefImpl = class { - constructor(factory) { - this.dep = void 0; - this.__v_isRef = true; - const { get: get2, set: set2 } = factory( - () => trackRefValue(this), - () => triggerRefValue(this) - ); - this._get = get2; - this._set = set2; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } -}; -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; -} -var ObjectRefImpl = class { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } -}; -var GetterRefImpl = class { - constructor(_getter) { - this._getter = _getter; - this.__v_isRef = true; - this.__v_isReadonly = true; - } - get value() { - return this._getter(); - } -}; -function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (isFunction(source)) { - return new GetterRefImpl(source); - } else if (isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } -} -function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); -} -var ComputedRefImpl = class { - constructor(getter, _setter, isReadonly2, isSSR) { - this._setter = _setter; - this.dep = void 0; - this.__v_isRef = true; - this["__v_isReadonly"] = false; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly"] = isReadonly2; - } - get value() { - const self2 = toRaw(this); - trackRefValue(self2); - if (self2._dirty || !self2._cacheable) { - self2._dirty = false; - self2._value = self2.effect.run(); - } - return self2._value; - } - set value(newValue) { - this._setter(newValue); - } -}; -function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = true ? () => { - console.warn("Write operation failed: computed value is readonly"); - } : NOOP; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; -} -var tick = Promise.resolve(); - -// node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js -var stack = []; -function pushWarningContext(vnode) { - stack.push(vnode); -} -function popWarningContext() { - stack.pop(); -} -function warn2(msg, ...args) { - if (false) - return; - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - msg + args.join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; -} -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } -} -function assertNumber(val, type) { - if (false) - return; - if (val === void 0) { - return; - } else if (typeof val !== "number") { - warn2(`${type} is not a valid number - got ${JSON.stringify(val)}.`); - } else if (isNaN(val)) { - warn2(`${type} is NaN - the duration expression might be incorrect.`); - } -} -var ErrorTypeStrings = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core" -}; -function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } - return res; -} -function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = true ? ErrorTypeStrings[type] : type; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling( - appErrorHandler, - null, - 10, - [err, exposedInstance, errorInfo] - ); - return; - } - } - logError(err, type, contextVNode, throwInDev); -} -function logError(err, type, contextVNode, throwInDev = true) { - if (true) { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn2(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } else { - console.error(err); - } -} -var isFlushing = false; -var isFlushPending = false; -var queue = []; -var flushIndex = 0; -var pendingPostFlushCbs = []; -var activePostFlushCbs = null; -var postFlushIndex = 0; -var resolvedPromise = Promise.resolve(); -var currentFlushPromise = null; -var RECURSION_LIMIT = 100; -function nextTick(fn) { - const p2 = currentFlushPromise || resolvedPromise; - return fn ? p2.then(this ? fn.bind(this) : fn) : p2; -} -function findInsertionIndex(id) { - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = start + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.pre) { - start = middle + 1; - } else { - end = middle; - } - } - return start; -} -function queueJob(job) { - if (!queue.length || !queue.includes( - job, - isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex - )) { - if (job.id == null) { - queue.push(job); - } else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } -} -function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } -} -function queuePostFlushCb(cb) { - if (!isArray(cb)) { - if (!activePostFlushCbs || !activePostFlushCbs.includes( - cb, - cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex - )) { - pendingPostFlushCbs.push(cb); - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); -} -function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) { - if (true) { - seen = seen || /* @__PURE__ */ new Map(); - } - for (; i < queue.length; i++) { - const cb = queue[i]; - if (cb && cb.pre) { - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - queue.splice(i, 1); - i--; - cb(); - } - } -} -function flushPostFlushCbs(seen) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - if (true) { - seen = seen || /* @__PURE__ */ new Map(); - } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { - continue; - } - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; - } -} -var getId = (job) => job.id == null ? Infinity : job.id; -var comparator = (a, b) => { - const diff = getId(a) - getId(b); - if (diff === 0) { - if (a.pre && !b.pre) - return -1; - if (b.pre && !a.pre) - return 1; - } - return diff; -}; -function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - if (true) { - seen = seen || /* @__PURE__ */ new Map(); - } - queue.sort(comparator); - const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (check(job)) { - continue; - } - callWithErrorHandling(job, null, 14); - } - } - } finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(seen); - } - } -} -function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn2( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.` - ); - return true; - } else { - seen.set(fn, count + 1); - } - } -} -var isHmrUpdating = false; -var hmrDirtyComponents = /* @__PURE__ */ new Set(); -if (true) { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; -} -var map = /* @__PURE__ */ new Map(); -function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); -} -function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); -} -function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: /* @__PURE__ */ new Set() - }); - return true; -} -function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; -} -function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; - } - record.initialDef.render = newRender; - [...record.instances].forEach((instance) => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); -} -function reload(id, newComp) { - const record = map.get(id); - if (!record) - return; - newComp = normalizeClassComponent(newComp); - updateComponentDef(record.initialDef, newComp); - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - hmrDirtyComponents.add(oldComp); - } - instance.appContext.propsCache.delete(instance.type); - instance.appContext.emitsCache.delete(instance.type); - instance.appContext.optionsCache.delete(instance.type); - if (instance.ceReload) { - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } else if (instance.parent) { - queueJob(instance.parent.update); - } else if (instance.appContext.reload) { - instance.appContext.reload(); - } else if (typeof window !== "undefined") { - window.location.reload(); - } else { - console.warn( - "[HMR] Root or manually mounted instance modified. Full reload required." - ); - } - } - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete( - normalizeClassComponent(instance.type) - ); - } - }); -} -function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== "__file" && !(key in newComp)) { - delete oldComp[key]; - } - } -} -function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } catch (e) { - console.error(e); - console.warn( - `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` - ); - } - }; -} -var devtools; -var buffer = []; -var devtoolsNotInstalled = false; -function emit$1(event, ...args) { - if (devtools) { - devtools.emit(event, ...args); - } else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } -} -function setDevtoolsHook(hook, target) { - var _a, _b; - devtools = hook; - if (devtools) { - devtools.enabled = true; - buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - setTimeout(() => { - if (!devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3e3); - } else { - devtoolsNotInstalled = true; - buffer = []; - } -} -function devtoolsInitApp(app, version2) { - emit$1("app:init", app, version2, { - Fragment, - Text, - Comment, - Static - }); -} -function devtoolsUnmountApp(app) { - emit$1("app:unmount", app); -} -var devtoolsComponentAdded = createDevtoolsComponentHook( - "component:added" - /* COMPONENT_ADDED */ -); -var devtoolsComponentUpdated = createDevtoolsComponentHook( - "component:updated" - /* COMPONENT_UPDATED */ -); -var _devtoolsComponentRemoved = createDevtoolsComponentHook( - "component:removed" - /* COMPONENT_REMOVED */ -); -var devtoolsComponentRemoved = (component) => { - if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered - !devtools.cleanupBuffer(component)) { - _devtoolsComponentRemoved(component); - } -}; -function createDevtoolsComponentHook(hook) { - return (component) => { - emit$1( - hook, - component.appContext.app, - component.uid, - component.parent ? component.parent.uid : void 0, - component - ); - }; -} -var devtoolsPerfStart = createDevtoolsPerformanceHook( - "perf:start" - /* PERFORMANCE_START */ -); -var devtoolsPerfEnd = createDevtoolsPerformanceHook( - "perf:end" - /* PERFORMANCE_END */ -); -function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit$1(hook, component.appContext.app, component.uid, component, type, time); - }; -} -function devtoolsComponentEmit(component, event, params) { - emit$1( - "component:emit", - component.appContext.app, - component, - event, - params - ); -} -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - if (true) { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn2( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` - ); - } - } else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn2( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener2 = event.startsWith("update:"); - const modelArg = isModelListener2 && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map((a) => isString(a) ? a.trim() : a); - } - if (number) { - args = rawArgs.map(looseToNumber); - } - } - if (true) { - devtoolsComponentEmit(instance, event, args); - } - if (true) { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn2( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".` - ); - } - } - let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize(event))]; - if (!handler && isModelListener2) { - handler = props[handlerName = toHandlerKey(hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } -} -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (__VUE_OPTIONS_API__ && !isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, null); - } - return null; - } - if (isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend(normalized, raw); - } - if (isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; -} -function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); -} -var currentRenderingInstance = null; -var currentScopeId = null; -function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; -} -function pushScopeId(id) { - currentScopeId = id; -} -function popScopeId() { - currentScopeId = null; -} -var withScopeId = (_id) => withCtx; -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) - return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - if (true) { - devtoolsComponentUpdated(ctx); - } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; -} -var accessedAttrs = false; -function markAttrsAccessed() { - accessedAttrs = true; -} -function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - props, - propsOptions: [propsOptions], - slots, - attrs, - emit: emit2, - render: render2, - renderCache, - data, - setupState, - ctx, - inheritAttrs - } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - if (true) { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn2( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render2.call( - thisProxy, - proxyToUse, - renderCache, - props, - setupState, - data, - ctx - ) - ); - fallthroughAttrs = attrs; - } else { - const render22 = Component; - if (attrs === props) { - markAttrsAccessed(); - } - result = normalizeVNode( - render22.length > 1 ? render22( - props, - true ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit: emit2 - } : { attrs, slots, emit: emit2 } - ) : render22( - props, - null - /* we know it doesn't need it */ - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - let setRoot = void 0; - if (result.patchFlag > 0 && result.patchFlag & 2048) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs); - } else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn2( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` - ); - } - if (eventAttrs.length) { - warn2( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn2( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (!isElementRoot(root)) { - warn2( - `Component inside renders non-element root node that cannot be animated.` - ); - } - root.transition = vnode.transition; - } - if (setRoot) { - setRoot(root); - } else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; -} -var getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, void 0]; - } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; -}; -function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - } - } - } else { - return; - } - } - return singleRoot; -} -var getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; -}; -var filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } - } - return res; -}; -var isElementRoot = (vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; -}; -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if ((prevChildren || nextChildren) && isHmrUpdating) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; -} -function updateHOCHostEl({ vnode, parent }, el) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } -} -var COMPONENTS = "components"; -var DIRECTIVES = "directives"; -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); -function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } -} -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - /* do not include inferred name to avoid breaking existing code */ - ); - if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || // global registration - resolve(instance.appContext[type], name) - ); - if (!res && maybeSelfReference) { - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS ? ` -If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; - warn2(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } else if (true) { - warn2( - `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` - ); - } -} -function resolve(registry, name) { - return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); -} -var isSuspense = (type) => type.__isSuspense; -var SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - isSVG, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - isSVG, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren -}; -var Suspense = SuspenseImpl; -function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } -} -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { - p: patch, - o: { createElement } - } = rendererInternals; - const hiddenContainer = createElement("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - isSVG, - slotScopeIds, - optimized, - rendererInternals - ); - patch( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - isSVG, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - isSVG, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else { - suspense.pendingId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement("div"); - if (isInFallback) { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - isSVG, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } -} -var hasWarned = false; -function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (!hasWarned) { - hasWarned = true; - console[console.info ? "info" : "log"]( - ` is an experimental feature and its API will likely change.` - ); - } - const { - p: patch, - m: move, - um: unmount, - n: next, - o: { parentNode, remove: remove2 } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; - if (true) { - assertNumber(timeout, `Suspense timeout`); - } - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - if (true) { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } - } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container2, anchor2, 0); - queuePostFlushCb(effects); - } - }; - } - let { anchor: anchor2 } = suspense; - if (activeBranch) { - anchor2 = next(activeBranch); - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor2, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - patch( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - isSVG2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - if (true) { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), - suspense, - isSVG, - optimized - ); - if (placeholder) { - remove2(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - if (true) { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node.parentNode, - document.createElement("div"), - null, - isSVG, - slotScopeIds, - optimized, - rendererInternals, - true - /* hydrating */ - ); - const result = hydrateNode( - node, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; -} -function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); -} -function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } - } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { - warn2(` slots expect a single root node.`); - } - s = singleChild; - } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter((c) => c !== s); - } - return s; -} -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } -} -function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = vnode.el = branch.el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } -} -function isVNodeSuspensible(vnode) { - var _a; - return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; -} -function watchEffect(effect2, options) { - return doWatch(effect2, null, options); -} -function watchPostEffect(effect2, options) { - return doWatch( - effect2, - null, - true ? extend({}, options, { flush: "post" }) : { flush: "post" } - ); -} -function watchSyncEffect(effect2, options) { - return doWatch( - effect2, - null, - true ? extend({}, options, { flush: "sync" }) : { flush: "sync" } - ); -} -var INITIAL_WATCHER_VALUE = {}; -function watch(source, cb, options) { - if (!isFunction(cb)) { - warn2( - `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` - ); - } - return doWatch(source, cb, options); -} -function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { - var _a; - if (!cb) { - if (immediate !== void 0) { - warn2( - `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (deep !== void 0) { - warn2( - `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - } - const warnInvalidSource = (s) => { - warn2( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); - }; - const instance = getCurrentScope() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => source; - deep = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return traverse(s); - } else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2); - } else { - warnInvalidSource(s); - } - }); - } else if (isFunction(source)) { - if (cb) { - getter = () => callWithErrorHandling(source, instance, 2); - } else { - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling( - source, - instance, - 3, - [onCleanup] - ); - }; - } - } else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect2.onStop = () => { - callWithErrorHandling(fn, instance, 4); - cleanup = effect2.onStop = void 0; - }; - }; - let ssrCleanup; - if (isInSSRComponentSetup) { - onCleanup = NOOP; - if (!cb) { - getter(); - } else if (immediate) { - callWithAsyncErrorHandling(cb, instance, 3, [ - getter(), - isMultiSource ? [] : void 0, - onCleanup - ]); - } - if (flush === "sync") { - const ctx = useSSRContext(); - ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); - } else { - return NOOP; - } - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect2.active) { - return; - } - if (cb) { - const newValue = effect2.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } else { - effect2.run(); - } - }; - job.allowRecurse = !!cb; - let scheduler; - if (flush === "sync") { - scheduler = job; - } else if (flush === "post") { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } else { - job.pre = true; - if (instance) - job.id = instance.uid; - scheduler = () => queueJob(job); - } - const effect2 = new ReactiveEffect(getter, scheduler); - if (true) { - effect2.onTrack = onTrack; - effect2.onTrigger = onTrigger; - } - if (cb) { - if (immediate) { - job(); - } else { - oldValue = effect2.run(); - } - } else if (flush === "post") { - queuePostRenderEffect( - effect2.run.bind(effect2), - instance && instance.suspense - ); - } else { - effect2.run(); - } - const unwatch = () => { - effect2.stop(); - if (instance && instance.scope) { - remove(instance.scope.effects, effect2); - } - }; - if (ssrCleanup) - ssrCleanup.push(unwatch); - return unwatch; -} -function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } else { - unsetCurrentInstance(); - } - return res; -} -function createPathGetter(ctx, path) { - const segments = path.split("."); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; -} -function traverse(value, seen) { - if (!isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (isRef(value)) { - traverse(value.value, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } - return value; -} -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn2("Do not use built-in directive ids as custom directive id: " + name); - } -} -function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - warn2(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getExposeProxy(internalInstance) || internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (dir) { - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} -var leaveCbKey = Symbol("_leaveCb"); -var enterCbKey = Symbol("_enterCb"); -function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: /* @__PURE__ */ new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; -} -var TransitionHookValidator = [Function, Array]; -var BaseTransitionPropsValidators = { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator -}; -var BaseTransitionImpl = { - name: `BaseTransition`, - props: BaseTransitionPropsValidators, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - warn2( - " can only be used on a single element or component. Use for lists." - ); - break; - } - child = c; - hasFound = true; - if (false) - break; - } - } - } - const rawProps = toRaw(props); - const { mode } = rawProps; - if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { - warn2(`invalid mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks( - innerChild, - rawProps, - state, - instance - ); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === void 0) { - prevTransitionKey = key; - } else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks( - oldInnerChild, - rawProps, - state, - instance - ); - setTransitionHooks(oldInnerChild, leavingHooks); - if (mode === "out-in") { - state.isLeaving = true; - leavingHooks.afterLeave = () => { - state.isLeaving = false; - if (instance.update.active !== false) { - instance.update(); - } - }; - return emptyPlaceholder(child); - } else if (mode === "in-out" && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType( - state, - oldInnerChild - ); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - el[leaveCbKey] = () => { - earlyRemove(); - el[leaveCbKey] = void 0; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } -}; -var BaseTransition = BaseTransitionImpl; -function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = /* @__PURE__ */ Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; -} -function resolveTransitionHooks(vnode, props, state, instance) { - const { - appear, - mode, - persisted = false, - onBeforeEnter, - onEnter, - onAfterEnter, - onEnterCancelled, - onBeforeLeave, - onLeave, - onAfterLeave, - onLeaveCancelled, - onBeforeAppear, - onAppear, - onAfterAppear, - onAppearCancelled - } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook3 = (hook, args) => { - hook && callWithAsyncErrorHandling( - hook, - instance, - 9, - args - ); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook3(hook, args); - if (isArray(hook)) { - if (hook.every((hook2) => hook2.length <= 1)) - done(); - } else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } else { - return; - } - } - if (el[leaveCbKey]) { - el[leaveCbKey]( - true - /* cancelled */ - ); - } - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { - leavingVNode.el[leaveCbKey](); - } - callHook3(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } else { - return; - } - } - let called = false; - const done = el[enterCbKey] = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook3(cancelHook, [el]); - } else { - callHook3(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el[enterCbKey] = void 0; - }; - if (hook) { - callAsyncHook(hook, [el, done]); - } else { - done(); - } - }, - leave(el, remove2) { - const key2 = String(vnode.key); - if (el[enterCbKey]) { - el[enterCbKey]( - true - /* cancelled */ - ); - } - if (state.isUnmounting) { - return remove2(); - } - callHook3(onBeforeLeave, [el]); - let called = false; - const done = el[leaveCbKey] = (cancelled) => { - if (called) - return; - called = true; - remove2(); - if (cancelled) { - callHook3(onLeaveCancelled, [el]); - } else { - callHook3(onAfterLeave, [el]); - } - el[leaveCbKey] = void 0; - if (leavingVNodesCache[key2] === vnode) { - delete leavingVNodesCache[key2]; - } - }; - leavingVNodesCache[key2] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } else { - done(); - } - }, - clone(vnode2) { - return resolveTransitionHooks(vnode2, props, state, instance); - } - }; - return hooks; -} -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; - } -} -function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) ? ( - // #7121 ensure get the child component subtree in case - // it's been replaced during HMR - vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 - ) : vnode; -} -function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } else if (vnode.shapeFlag & 128) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } else { - vnode.transition = hooks; - } -} -function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); - if (child.type === Fragment) { - if (child.patchFlag & 128) - keyedFragmentCount++; - ret = ret.concat( - getTransitionRawChildren(child.children, keepComment, key) - ); - } else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } - } - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2; - } - } - return ret; -} -function defineComponent(options, extraOptions) { - return isFunction(options) ? ( - // #8326: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - (() => extend({ name: options.name }, extraOptions, { setup: options }))() - ) : options; -} -var isAsyncWrapper = (i) => !!i.type.__asyncLoader; -function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; - pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve2, reject) => { - const userRetry = () => resolve2(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn2( - `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` - ); - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - })); - }; - return defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - /* do not throw in dev if user provided error component */ - ); - }; - if (suspensible && instance.suspense || isInSSRComponentSetup) { - return load().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error.value = err; - } - }, timeout); - } - load().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - queueJob(instance.parent.update); - } - }).catch((err) => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); -} -function createInnerComp(comp, parent) { - const { ref: ref2, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref2; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; -} -var isKeepAlive = (vnode) => vnode.type.__isKeepAlive; -var KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const sharedContext = instance.ctx; - if (!sharedContext.renderer) { - return () => { - const children = slots.default && slots.default(); - return children && children.length === 1 ? children[0] : children; - }; - } - const cache = /* @__PURE__ */ new Map(); - const keys = /* @__PURE__ */ new Set(); - let current = null; - if (true) { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { - renderer: { - p: patch, - m: move, - um: _unmount, - o: { createElement } - } - } = sharedContext; - const storageContainer = createElement("div"); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance2 = vnode.component; - move(vnode, container, anchor, 0, parentSuspense); - patch( - instance2.vnode, - vnode, - container, - anchor, - instance2, - parentSuspense, - isSVG, - vnode.slotScopeIds, - optimized - ); - queuePostRenderEffect(() => { - instance2.isDeactivated = false; - if (instance2.a) { - invokeArrayFns(instance2.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - }, parentSuspense); - if (true) { - devtoolsComponentAdded(instance2); - } - }; - sharedContext.deactivate = (vnode) => { - const instance2 = vnode.component; - move(vnode, storageContainer, null, 1, parentSuspense); - queuePostRenderEffect(() => { - if (instance2.da) { - invokeArrayFns(instance2.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - instance2.isDeactivated = true; - }, parentSuspense); - if (true) { - devtoolsComponentAdded(instance2); - } - }; - function unmount(vnode) { - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || !isSameVNodeType(cached, current)) { - unmount(cached); - } else if (current) { - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - watch( - () => [props.include, props.exclude], - ([include, exclude]) => { - include && pruneCache((name) => matches(include, name)); - exclude && pruneCache((name) => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: "post", deep: true } - ); - let pendingCacheKey = null; - const cacheSubtree = () => { - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach((cached) => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type && cached.key === vnode.key) { - resetShapeFlag(vnode); - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - if (true) { - warn2(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - const name = getComponentName( - isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp - ); - const { include, exclude, max } = props; - if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128) { - rawVNode.ssContent = vnode; - } - } - pendingCacheKey = key; - if (cachedVNode) { - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - setTransitionHooks(vnode, vnode.transition); - } - vnode.shapeFlag |= 512; - keys.delete(key); - keys.add(key); - } else { - keys.add(key); - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - vnode.shapeFlag |= 256; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; - } -}; -var KeepAlive = KeepAliveImpl; -function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p2) => matches(p2, name)); - } else if (isString(pattern)) { - return pattern.split(",").includes(name); - } else if (isRegExp(pattern)) { - return pattern.test(name); - } - return false; -} -function onActivated(hook, target) { - registerKeepAliveHook(hook, "a", target); -} -function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da", target); -} -function registerKeepAliveHook(hook, type, target = currentInstance) { - const wrappedHook = hook.__wdc || (hook.__wdc = () => { - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } - } -} -function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - const injected = injectHook( - type, - hook, - keepAliveRoot, - true - /* prepend */ - ); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); -} -function resetShapeFlag(vnode) { - vnode.shapeFlag &= ~256; - vnode.shapeFlag &= ~512; -} -function getInnerChild(vnode) { - return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; -} -function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - pauseTracking(); - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } else { - hooks.push(wrappedHook); - } - return wrappedHook; - } else if (true) { - const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, "")); - warn2( - `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` - ); - } -} -var createHook = (lifecycle) => (hook, target = currentInstance) => ( - // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) - (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) -); -var onBeforeMount = createHook("bm"); -var onMounted = createHook("m"); -var onBeforeUpdate = createHook("bu"); -var onUpdated = createHook("u"); -var onBeforeUnmount = createHook("bum"); -var onUnmounted = createHook("um"); -var onServerPrefetch = createHook("sp"); -var onRenderTriggered = createHook( - "rtg" -); -var onRenderTracked = createHook( - "rtc" -); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} -function renderList(source, renderItem, cache, index) { - let ret; - const cached = cache && cache[index]; - if (isArray(source) || isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); - } - } else if (typeof source === "number") { - if (!Number.isInteger(source)) { - warn2(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); - } - } else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item, i) => renderItem(item, i, void 0, cached && cached[i]) - ); - } else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } - } else { - ret = []; - } - if (cache) { - cache[index] = ret; - } - return ret; -} -function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) - res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; -} -function renderSlot(slots, name, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { - if (name !== "default") - props.name = name; - return createVNode("slot", props, fallback && fallback()); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn2( - `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` - ); - slot = () => []; - } - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock( - Fragment, - { - key: props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key || `_${name}` - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; -} -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; -} -function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - if (!isObject(obj)) { - warn2(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; - } - return ret; -} -var getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); -}; -var publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - extend(/* @__PURE__ */ Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => true ? shallowReadonly(i.props) : i.props, - $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs, - $slots: (i) => true ? shallowReadonly(i.slots) : i.slots, - $refs: (i) => true ? shallowReadonly(i.refs) : i.refs, - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $emit: (i) => i.emit, - $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type, - $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)), - $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP - }) -); -var isReservedPrefix = (key) => key === "_" || key === "$"; -var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); -var PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - if (key === "__isVue") { - return true; - } - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; - if (n !== void 0) { - switch (n) { - case 1: - return setupState[key]; - case 2: - return data[key]; - case 4: - return ctx[key]; - case 3: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1; - return setupState[key]; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2; - return data[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) - ) { - accessCache[key] = 3; - return props[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) { - accessCache[key] = 0; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - track(instance, "get", key); - markAttrsAccessed(); - } else if (key === "$slots") { - track(instance, "get", key); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf("__v") !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn2( - `Property ${JSON.stringify( - key - )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` - ); - } else if (instance === currentRenderingInstance) { - warn2( - `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` - ); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value; - return true; - } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { - warn2(`Cannot mutate \n", "import { withInstall } from '@element-plus/utils'\n\nimport Affix from './src/affix.vue'\n\nexport const ElAffix = withInstall(Affix)\nexport default ElAffix\n\nexport * from './src/affix'\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Icon from './icon.vue'\n\nexport const iconProps = buildProps({\n /**\n * @description SVG icon size, size x size\n */\n size: {\n type: definePropType([Number, String]),\n },\n /**\n * @description SVG tag's fill attribute\n */\n color: {\n type: String,\n },\n} as const)\nexport type IconProps = ExtractPropTypes\nexport type IconInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Icon from './src/icon.vue'\n\nexport const ElIcon = withInstall(Icon)\nexport default ElIcon\n\nexport * from './src/icon'\n", "import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n} as const)\nexport type AlertProps = ExtractPropTypes\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Alert from './src/alert.vue'\n\nexport const ElAlert = withInstall(Alert)\nexport default ElAlert\n\nexport * from './src/alert'\nexport type { AlertInstance } from './src/instance'\n", "import type { InjectionKey } from 'vue'\nimport type { FormContext, FormItemContext } from './types'\n\nexport const formContextKey: InjectionKey =\n Symbol('formContextKey')\nexport const formItemContextKey: InjectionKey =\n Symbol('formItemContextKey')\n", "import { computed, inject, ref, unref } from 'vue'\nimport { useGlobalSize, useProp } from '@element-plus/hooks'\nimport { formContextKey, formItemContextKey } from '../constants'\n\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { MaybeRef } from '@vueuse/core'\n\nexport const useFormSize = (\n fallback?: MaybeRef,\n ignore: Partial> = {}\n) => {\n const emptyRef = ref(undefined)\n\n const size = ignore.prop ? emptyRef : useProp('size')\n const globalConfig = ignore.global ? emptyRef : useGlobalSize()\n const form = ignore.form\n ? { size: undefined }\n : inject(formContextKey, undefined)\n const formItem = ignore.formItem\n ? { size: undefined }\n : inject(formItemContextKey, undefined)\n\n return computed(\n (): ComponentSize =>\n size.value ||\n unref(fallback) ||\n formItem?.size ||\n form?.size ||\n globalConfig.value ||\n ''\n )\n}\n\nexport const useFormDisabled = (fallback?: MaybeRef) => {\n const disabled = useProp('disabled')\n const form = inject(formContextKey, undefined)\n return computed(\n () => disabled.value || unref(fallback) || form?.disabled || false\n )\n}\n\n// These exports are used for preventing breaking changes\nexport const useSize = useFormSize\nexport const useDisabled = useFormDisabled\n", "import {\n computed,\n inject,\n onMounted,\n onUnmounted,\n ref,\n toRef,\n watch,\n} from 'vue'\nimport { useId } from '@element-plus/hooks'\nimport { formContextKey, formItemContextKey } from '../constants'\n\nimport type { ComputedRef, Ref, WatchStopHandle } from 'vue'\nimport type { FormItemContext } from '../types'\n\nexport const useFormItem = () => {\n const form = inject(formContextKey, undefined)\n const formItem = inject(formItemContextKey, undefined)\n return {\n form,\n formItem,\n }\n}\n\nexport type IUseFormItemInputCommonProps = {\n id?: string\n label?: string | number | boolean | Record\n}\n\nexport const useFormItemInputId = (\n props: Partial,\n {\n formItemContext,\n disableIdGeneration,\n disableIdManagement,\n }: {\n formItemContext?: FormItemContext\n disableIdGeneration?: ComputedRef | Ref\n disableIdManagement?: ComputedRef | Ref\n }\n) => {\n if (!disableIdGeneration) {\n disableIdGeneration = ref(false)\n }\n if (!disableIdManagement) {\n disableIdManagement = ref(false)\n }\n\n const inputId = ref()\n let idUnwatch: WatchStopHandle | undefined = undefined\n\n const isLabeledByFormItem = computed(() => {\n return !!(\n !props.label &&\n formItemContext &&\n formItemContext.inputIds &&\n formItemContext.inputIds?.length <= 1\n )\n })\n\n // Generate id for ElFormItem label if not provided as prop\n onMounted(() => {\n idUnwatch = watch(\n [toRef(props, 'id'), disableIdGeneration] as any,\n ([id, disableIdGeneration]: [string, boolean]) => {\n const newId = id ?? (!disableIdGeneration ? useId().value : undefined)\n if (newId !== inputId.value) {\n if (formItemContext?.removeInputId) {\n inputId.value && formItemContext.removeInputId(inputId.value)\n if (!disableIdManagement?.value && !disableIdGeneration && newId) {\n formItemContext.addInputId(newId)\n }\n }\n inputId.value = newId\n }\n },\n { immediate: true }\n )\n })\n\n onUnmounted(() => {\n idUnwatch && idUnwatch()\n if (formItemContext?.removeInputId) {\n inputId.value && formItemContext.removeInputId(inputId.value)\n }\n })\n\n return {\n isLabeledByFormItem,\n inputId,\n }\n}\n", "import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nconst formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: [Object, Boolean],\n },\n} as const)\nexport type FormProps = ExtractPropTypes\nexport type FormMetaProps = ExtractPropTypes\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n", "import { computed, ref } from 'vue'\nimport { debugWarn, ensureArray } from '@element-plus/utils'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormItemContext } from './types'\nimport type { FormItemProp } from './form-item'\n\nconst SCOPE = 'ElForm'\n\nexport function useFormLabelWidth() {\n const potentialLabelWidthArr = ref([])\n\n const autoLabelWidth = computed(() => {\n if (!potentialLabelWidthArr.value.length) return '0'\n const max = Math.max(...potentialLabelWidthArr.value)\n return max ? `${max}px` : ''\n })\n\n function getLabelWidthIndex(width: number) {\n const index = potentialLabelWidthArr.value.indexOf(width)\n if (index === -1 && autoLabelWidth.value === '0') {\n debugWarn(SCOPE, `unexpected width ${width}`)\n }\n return index\n }\n\n function registerLabelWidth(val: number, oldVal: number) {\n if (val && oldVal) {\n const index = getLabelWidthIndex(oldVal)\n potentialLabelWidthArr.value.splice(index, 1, val)\n } else if (val) {\n potentialLabelWidthArr.value.push(val)\n }\n }\n\n function deregisterLabelWidth(val: number) {\n const index = getLabelWidthIndex(val)\n if (index > -1) {\n potentialLabelWidthArr.value.splice(index, 1)\n }\n }\n\n return {\n autoLabelWidth,\n registerLabelWidth,\n deregisterLabelWidth,\n }\n}\n\nexport const filterFields = (\n fields: FormItemContext[],\n props: Arrayable\n) => {\n const normalized = ensureArray(props)\n return normalized.length > 0\n ? fields.filter((field) => field.prop && normalized.includes(field.prop))\n : fields\n}\n", "\n\n\n", "/* eslint no-console:0 */\n\nimport {\n ValidateError,\n ValidateOption,\n RuleValuePackage,\n InternalRuleItem,\n SyncErrorType,\n RuleType,\n Value,\n Values,\n} from './interface';\n\nconst formatRegExp = /%[sdj%]/g;\n\ndeclare var ASYNC_VALIDATOR_NO_WARNING;\n\nexport let warning: (type: string, errors: SyncErrorType[]) => void = () => {};\n\n// don't print warning message when in production env or node runtime\nif (\n typeof process !== 'undefined' &&\n process.env &&\n process.env.NODE_ENV !== 'production' &&\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n) {\n warning = (type, errors) => {\n if (\n typeof console !== 'undefined' &&\n console.warn &&\n typeof ASYNC_VALIDATOR_NO_WARNING === 'undefined'\n ) {\n if (errors.every(e => typeof e === 'string')) {\n console.warn(type, errors);\n }\n }\n };\n}\n\nexport function convertFieldsError(\n errors: ValidateError[],\n): Record {\n if (!errors || !errors.length) return null;\n const fields = {};\n errors.forEach(error => {\n const field = error.field;\n fields[field] = fields[field] || [];\n fields[field].push(error);\n });\n return fields;\n}\n\nexport function format(\n template: ((...args: any[]) => string) | string,\n ...args: any[]\n): string {\n let i = 0;\n const len = args.length;\n if (typeof template === 'function') {\n return template.apply(null, args);\n }\n if (typeof template === 'string') {\n let str = template.replace(formatRegExp, x => {\n if (x === '%%') {\n return '%';\n }\n if (i >= len) {\n return x;\n }\n switch (x) {\n case '%s':\n return String(args[i++]);\n case '%d':\n return (Number(args[i++]) as unknown) as string;\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n break;\n default:\n return x;\n }\n });\n return str;\n }\n return template;\n}\n\nfunction isNativeStringType(type: string) {\n return (\n type === 'string' ||\n type === 'url' ||\n type === 'hex' ||\n type === 'email' ||\n type === 'date' ||\n type === 'pattern'\n );\n}\n\nexport function isEmptyValue(value: Value, type?: string) {\n if (value === undefined || value === null) {\n return true;\n }\n if (type === 'array' && Array.isArray(value) && !value.length) {\n return true;\n }\n if (isNativeStringType(type) && typeof value === 'string' && !value) {\n return true;\n }\n return false;\n}\n\nexport function isEmptyObject(obj: object) {\n return Object.keys(obj).length === 0;\n}\n\nfunction asyncParallelArray(\n arr: RuleValuePackage[],\n func: ValidateFunc,\n callback: (errors: ValidateError[]) => void,\n) {\n const results: ValidateError[] = [];\n let total = 0;\n const arrLength = arr.length;\n\n function count(errors: ValidateError[]) {\n results.push(...(errors || []));\n total++;\n if (total === arrLength) {\n callback(results);\n }\n }\n\n arr.forEach(a => {\n func(a, count);\n });\n}\n\nfunction asyncSerialArray(\n arr: RuleValuePackage[],\n func: ValidateFunc,\n callback: (errors: ValidateError[]) => void,\n) {\n let index = 0;\n const arrLength = arr.length;\n\n function next(errors: ValidateError[]) {\n if (errors && errors.length) {\n callback(errors);\n return;\n }\n const original = index;\n index = index + 1;\n if (original < arrLength) {\n func(arr[original], next);\n } else {\n callback([]);\n }\n }\n\n next([]);\n}\n\nfunction flattenObjArr(objArr: Record) {\n const ret: RuleValuePackage[] = [];\n Object.keys(objArr).forEach(k => {\n ret.push(...(objArr[k] || []));\n });\n return ret;\n}\n\nexport class AsyncValidationError extends Error {\n errors: ValidateError[];\n fields: Record;\n\n constructor(\n errors: ValidateError[],\n fields: Record,\n ) {\n super('Async Validation Error');\n this.errors = errors;\n this.fields = fields;\n }\n}\n\ntype ValidateFunc = (\n data: RuleValuePackage,\n doIt: (errors: ValidateError[]) => void,\n) => void;\n\nexport function asyncMap(\n objArr: Record,\n option: ValidateOption,\n func: ValidateFunc,\n callback: (errors: ValidateError[]) => void,\n source: Values,\n): Promise {\n if (option.first) {\n const pending = new Promise((resolve, reject) => {\n const next = (errors: ValidateError[]) => {\n callback(errors);\n return errors.length\n ? reject(new AsyncValidationError(errors, convertFieldsError(errors)))\n : resolve(source);\n };\n const flattenArr = flattenObjArr(objArr);\n asyncSerialArray(flattenArr, func, next);\n });\n pending.catch(e => e);\n return pending;\n }\n const firstFields =\n option.firstFields === true\n ? Object.keys(objArr)\n : option.firstFields || [];\n\n const objArrKeys = Object.keys(objArr);\n const objArrLength = objArrKeys.length;\n let total = 0;\n const results: ValidateError[] = [];\n const pending = new Promise((resolve, reject) => {\n const next = (errors: ValidateError[]) => {\n results.push.apply(results, errors);\n total++;\n if (total === objArrLength) {\n callback(results);\n return results.length\n ? reject(\n new AsyncValidationError(results, convertFieldsError(results)),\n )\n : resolve(source);\n }\n };\n if (!objArrKeys.length) {\n callback(results);\n resolve(source);\n }\n objArrKeys.forEach(key => {\n const arr = objArr[key];\n if (firstFields.indexOf(key) !== -1) {\n asyncSerialArray(arr, func, next);\n } else {\n asyncParallelArray(arr, func, next);\n }\n });\n });\n pending.catch(e => e);\n return pending;\n}\n\nfunction isErrorObj(\n obj: ValidateError | string | (() => string),\n): obj is ValidateError {\n return !!(obj && (obj as ValidateError).message !== undefined);\n}\n\nfunction getValue(value: Values, path: string[]) {\n let v = value;\n for (let i = 0; i < path.length; i++) {\n if (v == undefined) {\n return v;\n }\n v = v[path[i]];\n }\n return v;\n}\n\nexport function complementError(rule: InternalRuleItem, source: Values) {\n return (oe: ValidateError | (() => string) | string): ValidateError => {\n let fieldValue;\n if (rule.fullFields) {\n fieldValue = getValue(source, rule.fullFields);\n } else {\n fieldValue = source[(oe as any).field || rule.fullField];\n }\n if (isErrorObj(oe)) {\n oe.field = oe.field || rule.fullField;\n oe.fieldValue = fieldValue;\n return oe;\n }\n return {\n message: typeof oe === 'function' ? oe() : oe,\n fieldValue,\n field: ((oe as unknown) as ValidateError).field || rule.fullField,\n };\n };\n}\n\nexport function deepMerge(target: T, source: Partial): T {\n if (source) {\n for (const s in source) {\n if (source.hasOwnProperty(s)) {\n const value = source[s];\n if (typeof value === 'object' && typeof target[s] === 'object') {\n target[s] = {\n ...target[s],\n ...value,\n };\n } else {\n target[s] = value;\n }\n }\n }\n }\n return target;\n}\n", "import { ExecuteRule } from '../interface';\nimport { format, isEmptyValue } from '../util';\n\nconst required: ExecuteRule = (rule, value, source, errors, options, type) => {\n if (\n rule.required &&\n (!source.hasOwnProperty(rule.field) ||\n isEmptyValue(value, type || rule.type))\n ) {\n errors.push(format(options.messages.required, rule.fullField));\n }\n};\n\nexport default required;\n", "import { ExecuteRule } from '../interface';\nimport { format } from '../util';\n\n/**\n * Rule for validating whitespace.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nconst whitespace: ExecuteRule = (rule, value, source, errors, options) => {\n if (/^\\s+$/.test(value) || value === '') {\n errors.push(format(options.messages.whitespace, rule.fullField));\n }\n};\n\nexport default whitespace;\n", "// https://github.com/kevva/url-regex/blob/master/index.js\nlet urlReg: RegExp;\n\nexport default () => {\n if (urlReg) {\n return urlReg;\n }\n\n const word = '[a-fA-F\\\\d:]';\n const b = options =>\n options && options.includeBoundaries\n ? `(?:(?<=\\\\s|^)(?=${word})|(?<=${word})(?=\\\\s|$))`\n : '';\n\n const v4 =\n '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n\n const v6seg = '[a-fA-F\\\\d]{1,4}';\n const v6 = `\n(?:\n(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${v6seg}:){5}(?::${v4}|(?::${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${v6seg}:){4}(?:(?::${v6seg}){0,1}:${v4}|(?::${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${v6seg}:){3}(?:(?::${v6seg}){0,2}:${v4}|(?::${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${v6seg}:){2}(?:(?::${v6seg}){0,3}:${v4}|(?::${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${v6seg}:){1}(?:(?::${v6seg}){0,4}:${v4}|(?::${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`\n .replace(/\\s*\\/\\/.*$/gm, '')\n .replace(/\\n/g, '')\n .trim();\n\n // Pre-compile only the exact regexes because adding a global flag make regexes stateful\n const v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`);\n const v4exact = new RegExp(`^${v4}$`);\n const v6exact = new RegExp(`^${v6}$`);\n\n const ip = options =>\n options && options.exact\n ? v46Exact\n : new RegExp(\n `(?:${b(options)}${v4}${b(options)})|(?:${b(options)}${v6}${b(\n options,\n )})`,\n 'g',\n );\n\n ip.v4 = (options?) =>\n options && options.exact\n ? v4exact\n : new RegExp(`${b(options)}${v4}${b(options)}`, 'g');\n ip.v6 = (options?) =>\n options && options.exact\n ? v6exact\n : new RegExp(`${b(options)}${v6}${b(options)}`, 'g');\n\n const protocol = `(?:(?:[a-z]+:)?//)`;\n const auth = '(?:\\\\S+(?::\\\\S*)?@)?';\n const ipv4 = ip.v4().source;\n const ipv6 = ip.v6().source;\n const host = '(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)';\n const domain =\n '(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*';\n const tld = `(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))`;\n const port = '(?::\\\\d{2,5})?';\n const path = '(?:[/?#][^\\\\s\"]*)?';\n const regex = `(?:${protocol}|www\\\\.)${auth}(?:localhost|${ipv4}|${ipv6}|${host}${domain}${tld})${port}${path}`;\n urlReg = new RegExp(`(?:^${regex}$)`, 'i');\n return urlReg;\n};\n", "import { ExecuteRule, Value } from '../interface';\nimport { format } from '../util';\nimport required from './required';\nimport getUrlRegex from './url';\n/* eslint max-len:0 */\n\nconst pattern = {\n // http://emailregex.com/\n email: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+\\.)+[a-zA-Z\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}))$/,\n // url: new RegExp(\n // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\\\S+(?::\\\\S*)?@)?(?:(?:(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[0-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(?:(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,})))|localhost)(?::\\\\d{2,5})?(?:(/|\\\\?|#)[^\\\\s]*)?$',\n // 'i',\n // ),\n hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,\n};\n\nconst types = {\n integer(value: Value) {\n return types.number(value) && parseInt(value, 10) === value;\n },\n float(value: Value) {\n return types.number(value) && !types.integer(value);\n },\n array(value: Value) {\n return Array.isArray(value);\n },\n regexp(value: Value) {\n if (value instanceof RegExp) {\n return true;\n }\n try {\n return !!new RegExp(value);\n } catch (e) {\n return false;\n }\n },\n date(value: Value) {\n return (\n typeof value.getTime === 'function' &&\n typeof value.getMonth === 'function' &&\n typeof value.getYear === 'function' &&\n !isNaN(value.getTime())\n );\n },\n number(value: Value) {\n if (isNaN(value)) {\n return false;\n }\n return typeof value === 'number';\n },\n object(value: Value) {\n return typeof value === 'object' && !types.array(value);\n },\n method(value: Value) {\n return typeof value === 'function';\n },\n email(value: Value) {\n return (\n typeof value === 'string' &&\n value.length <= 320 &&\n !!value.match(pattern.email)\n );\n },\n url(value: Value) {\n return (\n typeof value === 'string' &&\n value.length <= 2048 &&\n !!value.match(getUrlRegex())\n );\n },\n hex(value: Value) {\n return typeof value === 'string' && !!value.match(pattern.hex);\n },\n};\n\nconst type: ExecuteRule = (rule, value, source, errors, options) => {\n if (rule.required && value === undefined) {\n required(rule, value, source, errors, options);\n return;\n }\n const custom = [\n 'integer',\n 'float',\n 'array',\n 'regexp',\n 'object',\n 'method',\n 'email',\n 'number',\n 'date',\n 'url',\n 'hex',\n ];\n const ruleType = rule.type;\n if (custom.indexOf(ruleType) > -1) {\n if (!types[ruleType](value)) {\n errors.push(\n format(options.messages.types[ruleType], rule.fullField, rule.type),\n );\n }\n // straight typeof check\n } else if (ruleType && typeof value !== rule.type) {\n errors.push(\n format(options.messages.types[ruleType], rule.fullField, rule.type),\n );\n }\n};\n\nexport default type;\n", "import { ExecuteRule } from '../interface';\nimport { format } from '../util';\n\nconst range: ExecuteRule = (rule, value, source, errors, options) => {\n const len = typeof rule.len === 'number';\n const min = typeof rule.min === 'number';\n const max = typeof rule.max === 'number';\n // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)\n const spRegexp = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n let val = value;\n let key = null;\n const num = typeof value === 'number';\n const str = typeof value === 'string';\n const arr = Array.isArray(value);\n if (num) {\n key = 'number';\n } else if (str) {\n key = 'string';\n } else if (arr) {\n key = 'array';\n }\n // if the value is not of a supported type for range validation\n // the validation rule rule should use the\n // type property to also test for a particular type\n if (!key) {\n return false;\n }\n if (arr) {\n val = value.length;\n }\n if (str) {\n // 处理码点大于U+010000的文字length属性不准确的bug,如\"𠮷𠮷𠮷\".lenght !== 3\n val = value.replace(spRegexp, '_').length;\n }\n if (len) {\n if (val !== rule.len) {\n errors.push(format(options.messages[key].len, rule.fullField, rule.len));\n }\n } else if (min && !max && val < rule.min) {\n errors.push(format(options.messages[key].min, rule.fullField, rule.min));\n } else if (max && !min && val > rule.max) {\n errors.push(format(options.messages[key].max, rule.fullField, rule.max));\n } else if (min && max && (val < rule.min || val > rule.max)) {\n errors.push(\n format(options.messages[key].range, rule.fullField, rule.min, rule.max),\n );\n }\n};\n\nexport default range;\n", "import { ExecuteRule } from '../interface';\nimport { format } from '../util';\n\nconst ENUM = 'enum' as const;\n\nconst enumerable: ExecuteRule = (rule, value, source, errors, options) => {\n rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];\n if (rule[ENUM].indexOf(value) === -1) {\n errors.push(\n format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')),\n );\n }\n};\n\nexport default enumerable;\n", "import { ExecuteRule } from '../interface';\nimport { format } from '../util';\n\nconst pattern: ExecuteRule = (rule, value, source, errors, options) => {\n if (rule.pattern) {\n if (rule.pattern instanceof RegExp) {\n // if a RegExp instance is passed, reset `lastIndex` in case its `global`\n // flag is accidentally set to `true`, which in a validation scenario\n // is not necessary and the result might be misleading\n rule.pattern.lastIndex = 0;\n if (!rule.pattern.test(value)) {\n errors.push(\n format(\n options.messages.pattern.mismatch,\n rule.fullField,\n value,\n rule.pattern,\n ),\n );\n }\n } else if (typeof rule.pattern === 'string') {\n const _pattern = new RegExp(rule.pattern);\n if (!_pattern.test(value)) {\n errors.push(\n format(\n options.messages.pattern.mismatch,\n rule.fullField,\n value,\n rule.pattern,\n ),\n );\n }\n }\n }\n};\n\nexport default pattern;\n", "import required from './required';\nimport whitespace from './whitespace';\nimport type from './type';\nimport range from './range';\nimport enumRule from './enum';\nimport pattern from './pattern';\n\nexport default {\n required,\n whitespace,\n type,\n range,\n enum: enumRule,\n pattern,\n};\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst string: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, 'string');\n if (!isEmptyValue(value, 'string')) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n rules.pattern(rule, value, source, errors, options);\n if (rule.whitespace === true) {\n rules.whitespace(rule, value, source, errors, options);\n }\n }\n }\n callback(errors);\n};\n\nexport default string;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst method: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default method;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst number: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (value === '') {\n value = undefined;\n }\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default number;\n", "import { isEmptyValue } from '../util';\nimport rules from '../rule';\nimport { ExecuteValidator } from '../interface';\n\nconst boolean: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default boolean;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst regexp: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default regexp;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst integer: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default integer;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst floatFn: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default floatFn;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule/index';\n\nconst array: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if ((value === undefined || value === null) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, 'array');\n if (value !== undefined && value !== null) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default array;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst object: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default object;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst ENUM = 'enum' as const;\n\nconst enumerable: ExecuteValidator = (\n rule,\n value,\n callback,\n source,\n options,\n) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules[ENUM](rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default enumerable;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst pattern: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value, 'string')) {\n rules.pattern(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default pattern;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst date: ExecuteValidator = (rule, value, callback, source, options) => {\n // console.log('integer rule called %j', rule);\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n // console.log('validate on %s value', value);\n if (validate) {\n if (isEmptyValue(value, 'date') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value, 'date')) {\n let dateObject;\n\n if (value instanceof Date) {\n dateObject = value;\n } else {\n dateObject = new Date(value);\n }\n\n rules.type(rule, dateObject, source, errors, options);\n if (dateObject) {\n rules.range(rule, dateObject.getTime(), source, errors, options);\n }\n }\n }\n callback(errors);\n};\n\nexport default date;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\n\nconst required: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const type = Array.isArray(value) ? 'array' : typeof value;\n rules.required(rule, value, source, errors, options, type);\n callback(errors);\n};\n\nexport default required;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst type: ExecuteValidator = (rule, value, callback, source, options) => {\n const ruleType = rule.type;\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value, ruleType) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, ruleType);\n if (!isEmptyValue(value, ruleType)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default type;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst any: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n }\n callback(errors);\n};\n\nexport default any;\n", "import string from './string';\nimport method from './method';\nimport number from './number';\nimport boolean from './boolean';\nimport regexp from './regexp';\nimport integer from './integer';\nimport float from './float';\nimport array from './array';\nimport object from './object';\nimport enumValidator from './enum';\nimport pattern from './pattern';\nimport date from './date';\nimport required from './required';\nimport type from './type';\nimport any from './any';\n\nexport default {\n string,\n method,\n number,\n boolean,\n regexp,\n integer,\n float,\n array,\n object,\n enum: enumValidator,\n pattern,\n date,\n url: type,\n hex: type,\n email: type,\n required,\n any,\n};\n", "import { InternalValidateMessages } from './interface';\n\nexport function newMessages(): InternalValidateMessages {\n return {\n default: 'Validation error on field %s',\n required: '%s is required',\n enum: '%s must be one of %s',\n whitespace: '%s cannot be empty',\n date: {\n format: '%s date %s is invalid for format %s',\n parse: '%s date could not be parsed, %s is invalid ',\n invalid: '%s date %s is invalid',\n },\n types: {\n string: '%s is not a %s',\n method: '%s is not a %s (function)',\n array: '%s is not an %s',\n object: '%s is not an %s',\n number: '%s is not a %s',\n date: '%s is not a %s',\n boolean: '%s is not a %s',\n integer: '%s is not an %s',\n float: '%s is not a %s',\n regexp: '%s is not a valid %s',\n email: '%s is not a valid %s',\n url: '%s is not a valid %s',\n hex: '%s is not a valid %s',\n },\n string: {\n len: '%s must be exactly %s characters',\n min: '%s must be at least %s characters',\n max: '%s cannot be longer than %s characters',\n range: '%s must be between %s and %s characters',\n },\n number: {\n len: '%s must equal %s',\n min: '%s cannot be less than %s',\n max: '%s cannot be greater than %s',\n range: '%s must be between %s and %s',\n },\n array: {\n len: '%s must be exactly %s in length',\n min: '%s cannot be less than %s in length',\n max: '%s cannot be greater than %s in length',\n range: '%s must be between %s and %s in length',\n },\n pattern: {\n mismatch: '%s value %s does not match pattern %s',\n },\n clone() {\n const cloned = JSON.parse(JSON.stringify(this));\n cloned.clone = this.clone;\n return cloned;\n },\n };\n}\n\nexport const messages = newMessages();\n", "import {\n format,\n complementError,\n asyncMap,\n warning,\n deepMerge,\n convertFieldsError,\n} from './util';\nimport validators from './validator/index';\nimport { messages as defaultMessages, newMessages } from './messages';\nimport {\n InternalRuleItem,\n InternalValidateMessages,\n Rule,\n RuleItem,\n Rules,\n ValidateCallback,\n ValidateMessages,\n ValidateOption,\n Values,\n RuleValuePackage,\n ValidateError,\n ValidateFieldsError,\n SyncErrorType,\n ValidateResult,\n} from './interface';\n\nexport * from './interface';\n\n/**\n * Encapsulates a validation schema.\n *\n * @param descriptor An object declaring validation rules\n * for this schema.\n */\nclass Schema {\n // ========================= Static =========================\n static register = function register(type: string, validator) {\n if (typeof validator !== 'function') {\n throw new Error(\n 'Cannot register a validator by type, validator is not a function',\n );\n }\n validators[type] = validator;\n };\n\n static warning = warning;\n\n static messages = defaultMessages;\n\n static validators = validators;\n\n // ======================== Instance ========================\n rules: Record = null;\n _messages: InternalValidateMessages = defaultMessages;\n\n constructor(descriptor: Rules) {\n this.define(descriptor);\n }\n\n define(rules: Rules) {\n if (!rules) {\n throw new Error('Cannot configure a schema with no rules');\n }\n if (typeof rules !== 'object' || Array.isArray(rules)) {\n throw new Error('Rules must be an object');\n }\n this.rules = {};\n\n Object.keys(rules).forEach(name => {\n const item: Rule = rules[name];\n this.rules[name] = Array.isArray(item) ? item : [item];\n });\n }\n\n messages(messages?: ValidateMessages) {\n if (messages) {\n this._messages = deepMerge(newMessages(), messages);\n }\n return this._messages;\n }\n\n validate(\n source: Values,\n option?: ValidateOption,\n callback?: ValidateCallback,\n ): Promise;\n validate(source: Values, callback: ValidateCallback): Promise;\n validate(source: Values): Promise;\n\n validate(source_: Values, o: any = {}, oc: any = () => {}): Promise {\n let source: Values = source_;\n let options: ValidateOption = o;\n let callback: ValidateCallback = oc;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (!this.rules || Object.keys(this.rules).length === 0) {\n if (callback) {\n callback(null, source);\n }\n return Promise.resolve(source);\n }\n\n function complete(results: (ValidateError | ValidateError[])[]) {\n let errors: ValidateError[] = [];\n let fields: ValidateFieldsError = {};\n\n function add(e: ValidateError | ValidateError[]) {\n if (Array.isArray(e)) {\n errors = errors.concat(...e);\n } else {\n errors.push(e);\n }\n }\n\n for (let i = 0; i < results.length; i++) {\n add(results[i]);\n }\n if (!errors.length) {\n callback(null, source);\n } else {\n fields = convertFieldsError(errors);\n (callback as (\n errors: ValidateError[],\n fields: ValidateFieldsError,\n ) => void)(errors, fields);\n }\n }\n\n if (options.messages) {\n let messages = this.messages();\n if (messages === defaultMessages) {\n messages = newMessages();\n }\n deepMerge(messages, options.messages);\n options.messages = messages;\n } else {\n options.messages = this.messages();\n }\n\n const series: Record = {};\n const keys = options.keys || Object.keys(this.rules);\n keys.forEach(z => {\n const arr = this.rules[z];\n let value = source[z];\n arr.forEach(r => {\n let rule: InternalRuleItem = r;\n if (typeof rule.transform === 'function') {\n if (source === source_) {\n source = { ...source };\n }\n value = source[z] = rule.transform(value);\n }\n if (typeof rule === 'function') {\n rule = {\n validator: rule,\n };\n } else {\n rule = { ...rule };\n }\n\n // Fill validator. Skip if nothing need to validate\n rule.validator = this.getValidationMethod(rule);\n if (!rule.validator) {\n return;\n }\n\n rule.field = z;\n rule.fullField = rule.fullField || z;\n rule.type = this.getType(rule);\n series[z] = series[z] || [];\n series[z].push({\n rule,\n value,\n source,\n field: z,\n });\n });\n });\n const errorFields = {};\n return asyncMap(\n series,\n options,\n (data, doIt) => {\n const rule = data.rule;\n let deep =\n (rule.type === 'object' || rule.type === 'array') &&\n (typeof rule.fields === 'object' ||\n typeof rule.defaultField === 'object');\n deep = deep && (rule.required || (!rule.required && data.value));\n rule.field = data.field;\n\n function addFullField(key: string, schema: RuleItem) {\n return {\n ...schema,\n fullField: `${rule.fullField}.${key}`,\n fullFields: rule.fullFields ? [...rule.fullFields, key] : [key],\n };\n }\n\n function cb(e: SyncErrorType | SyncErrorType[] = []) {\n let errorList = Array.isArray(e) ? e : [e];\n if (!options.suppressWarning && errorList.length) {\n Schema.warning('async-validator:', errorList);\n }\n if (errorList.length && rule.message !== undefined) {\n errorList = [].concat(rule.message);\n }\n\n // Fill error info\n let filledErrors = errorList.map(complementError(rule, source));\n\n if (options.first && filledErrors.length) {\n errorFields[rule.field] = 1;\n return doIt(filledErrors);\n }\n if (!deep) {\n doIt(filledErrors);\n } else {\n // if rule is required but the target object\n // does not exist fail at the rule level and don't\n // go deeper\n if (rule.required && !data.value) {\n if (rule.message !== undefined) {\n filledErrors = []\n .concat(rule.message)\n .map(complementError(rule, source));\n } else if (options.error) {\n filledErrors = [\n options.error(\n rule,\n format(options.messages.required, rule.field),\n ),\n ];\n }\n return doIt(filledErrors);\n }\n\n let fieldsSchema: Record = {};\n if (rule.defaultField) {\n Object.keys(data.value).map(key => {\n fieldsSchema[key] = rule.defaultField;\n });\n }\n fieldsSchema = {\n ...fieldsSchema,\n ...data.rule.fields,\n };\n\n const paredFieldsSchema: Record = {};\n\n Object.keys(fieldsSchema).forEach(field => {\n const fieldSchema = fieldsSchema[field];\n const fieldSchemaList = Array.isArray(fieldSchema)\n ? fieldSchema\n : [fieldSchema];\n paredFieldsSchema[field] = fieldSchemaList.map(\n addFullField.bind(null, field),\n );\n });\n const schema = new Schema(paredFieldsSchema);\n schema.messages(options.messages);\n if (data.rule.options) {\n data.rule.options.messages = options.messages;\n data.rule.options.error = options.error;\n }\n schema.validate(data.value, data.rule.options || options, errs => {\n const finalErrors = [];\n if (filledErrors && filledErrors.length) {\n finalErrors.push(...filledErrors);\n }\n if (errs && errs.length) {\n finalErrors.push(...errs);\n }\n doIt(finalErrors.length ? finalErrors : null);\n });\n }\n }\n\n let res: ValidateResult;\n if (rule.asyncValidator) {\n res = rule.asyncValidator(rule, data.value, cb, data.source, options);\n } else if (rule.validator) {\n try {\n res = rule.validator(rule, data.value, cb, data.source, options);\n } catch (error) {\n console.error?.(error);\n // rethrow to report error\n if (!options.suppressValidatorError) {\n setTimeout(() => {\n throw error;\n }, 0);\n }\n cb(error.message);\n }\n if (res === true) {\n cb();\n } else if (res === false) {\n cb(\n typeof rule.message === 'function'\n ? rule.message(rule.fullField || rule.field)\n : rule.message || `${rule.fullField || rule.field} fails`,\n );\n } else if (res instanceof Array) {\n cb(res);\n } else if (res instanceof Error) {\n cb(res.message);\n }\n }\n if (res && (res as Promise).then) {\n (res as Promise).then(\n () => cb(),\n e => cb(e),\n );\n }\n },\n results => {\n complete(results);\n },\n source,\n );\n }\n\n getType(rule: InternalRuleItem) {\n if (rule.type === undefined && rule.pattern instanceof RegExp) {\n rule.type = 'pattern';\n }\n if (\n typeof rule.validator !== 'function' &&\n rule.type &&\n !validators.hasOwnProperty(rule.type)\n ) {\n throw new Error(format('Unknown rule type %s', rule.type));\n }\n return rule.type || 'string';\n }\n\n getValidationMethod(rule: InternalRuleItem) {\n if (typeof rule.validator === 'function') {\n return rule.validator;\n }\n const keys = Object.keys(rule);\n const messageIndex = keys.indexOf('message');\n if (messageIndex !== -1) {\n keys.splice(messageIndex, 1);\n }\n if (keys.length === 1 && keys[0] === 'required') {\n return validators.required;\n }\n return validators[this.getType(rule)] || undefined;\n }\n}\n\nexport default Schema;\n", "import { componentSizes } from '@element-plus/constants'\nimport { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormItemRule } from './types'\n\nexport const formItemValidateStates = [\n '',\n 'error',\n 'validating',\n 'success',\n] as const\nexport type FormItemValidateState = typeof formItemValidateStates[number]\n\nexport type FormItemProp = Arrayable\n\nexport const formItemProps = buildProps({\n /**\n * @description Label text.\n */\n label: String,\n /**\n * @description Width of label, e.g. `'50px'`. `'auto'` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description A key of `model`. It could be an array of property paths (e.g `['a', 'b', '0']`). In the use of `validate` and `resetFields` method, the attribute is required.\n */\n prop: {\n type: definePropType([String, Array]),\n },\n /**\n * @description Whether the field is required or not, will be determined by validation rules if omitted.\n */\n required: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator).\n */\n rules: {\n type: definePropType>([Object, Array]),\n },\n /**\n * @description Field error message, set its value and the field will validate error and show this message immediately.\n */\n error: String,\n /**\n * @description Validation state of formItem.\n */\n validateStatus: {\n type: String,\n values: formItemValidateStates,\n },\n /**\n * @description Same as for in native label.\n */\n for: String,\n /**\n * @description Inline style validate message.\n */\n inlineMessage: {\n type: [String, Boolean],\n default: '',\n },\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Control the size of components in this form-item.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n} as const)\nexport type FormItemProps = ExtractPropTypes\n", "import {\n Fragment,\n computed,\n defineComponent,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n ref,\n watch,\n} from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { formContextKey, formItemContextKey } from './constants'\n\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElLabelWrap'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: {\n isAutoWidth: Boolean,\n updateAll: Boolean,\n },\n\n setup(props, { slots }) {\n const formContext = inject(formContextKey, undefined)\n const formItemContext = inject(formItemContextKey)\n if (!formItemContext)\n throwError(\n COMPONENT_NAME,\n 'usage: '\n )\n\n const ns = useNamespace('form')\n\n const el = ref()\n const computedWidth = ref(0)\n\n const getLabelWidth = () => {\n if (el.value?.firstElementChild) {\n const width = window.getComputedStyle(el.value.firstElementChild).width\n return Math.ceil(Number.parseFloat(width))\n } else {\n return 0\n }\n }\n\n const updateLabelWidth = (action: 'update' | 'remove' = 'update') => {\n nextTick(() => {\n if (slots.default && props.isAutoWidth) {\n if (action === 'update') {\n computedWidth.value = getLabelWidth()\n } else if (action === 'remove') {\n formContext?.deregisterLabelWidth(computedWidth.value)\n }\n }\n })\n }\n const updateLabelWidthFn = () => updateLabelWidth('update')\n\n onMounted(() => {\n updateLabelWidthFn()\n })\n onBeforeUnmount(() => {\n updateLabelWidth('remove')\n })\n onUpdated(() => updateLabelWidthFn())\n\n watch(computedWidth, (val, oldVal) => {\n if (props.updateAll) {\n formContext?.registerLabelWidth(val, oldVal)\n }\n })\n\n useResizeObserver(\n computed(\n () => (el.value?.firstElementChild ?? null) as HTMLElement | null\n ),\n updateLabelWidthFn\n )\n\n return () => {\n if (!slots) return null\n\n const { isAutoWidth } = props\n if (isAutoWidth) {\n const autoLabelWidth = formContext?.autoLabelWidth\n const hasLabel = formItemContext?.hasLabel\n const style: CSSProperties = {}\n if (hasLabel && autoLabelWidth && autoLabelWidth !== 'auto') {\n const marginWidth = Math.max(\n 0,\n Number.parseInt(autoLabelWidth, 10) - computedWidth.value\n )\n const marginPosition =\n formContext.labelPosition === 'left' ? 'marginRight' : 'marginLeft'\n if (marginWidth) {\n style[marginPosition] = `${marginWidth}px`\n }\n }\n return (\n
\n {slots.default?.()}\n
\n )\n } else {\n return {slots.default?.()}\n }\n }\n },\n})\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Form from './src/form.vue'\nimport FormItem from './src/form-item.vue'\n\nexport const ElForm = withInstall(Form, {\n FormItem,\n})\nexport default ElForm\nexport const ElFormItem = withNoopInstall(FormItem)\n\nexport * from './src/form'\nexport * from './src/form-item'\nexport * from './src/types'\nexport * from './src/constants'\nexport * from './src/hooks'\n\nexport type FormInstance = InstanceType\nexport type FormItemInstance = InstanceType\n", "import { isFirefox, isNumber } from '@element-plus/utils'\n\nlet hiddenTextarea: HTMLTextAreaElement | undefined = undefined\n\nconst HIDDEN_STYLE = `\n height:0 !important;\n visibility:hidden !important;\n ${isFirefox() ? '' : 'overflow:hidden !important;'}\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n`\n\nconst CONTEXT_STYLE = [\n 'letter-spacing',\n 'line-height',\n 'padding-top',\n 'padding-bottom',\n 'font-family',\n 'font-weight',\n 'font-size',\n 'text-rendering',\n 'text-transform',\n 'width',\n 'text-indent',\n 'padding-left',\n 'padding-right',\n 'border-width',\n 'box-sizing',\n]\n\ntype NodeStyle = {\n contextStyle: string\n boxSizing: string\n paddingSize: number\n borderSize: number\n}\n\ntype TextAreaHeight = {\n height: string\n minHeight?: string\n}\n\nfunction calculateNodeStyling(targetElement: Element): NodeStyle {\n const style = window.getComputedStyle(targetElement)\n\n const boxSizing = style.getPropertyValue('box-sizing')\n\n const paddingSize =\n Number.parseFloat(style.getPropertyValue('padding-bottom')) +\n Number.parseFloat(style.getPropertyValue('padding-top'))\n\n const borderSize =\n Number.parseFloat(style.getPropertyValue('border-bottom-width')) +\n Number.parseFloat(style.getPropertyValue('border-top-width'))\n\n const contextStyle = CONTEXT_STYLE.map(\n (name) => `${name}:${style.getPropertyValue(name)}`\n ).join(';')\n\n return { contextStyle, paddingSize, borderSize, boxSizing }\n}\n\nexport function calcTextareaHeight(\n targetElement: HTMLTextAreaElement,\n minRows = 1,\n maxRows?: number\n): TextAreaHeight {\n if (!hiddenTextarea) {\n hiddenTextarea = document.createElement('textarea')\n document.body.appendChild(hiddenTextarea)\n }\n\n const { paddingSize, borderSize, boxSizing, contextStyle } =\n calculateNodeStyling(targetElement)\n\n hiddenTextarea.setAttribute('style', `${contextStyle};${HIDDEN_STYLE}`)\n hiddenTextarea.value = targetElement.value || targetElement.placeholder || ''\n\n let height = hiddenTextarea.scrollHeight\n const result = {} as TextAreaHeight\n\n if (boxSizing === 'border-box') {\n height = height + borderSize\n } else if (boxSizing === 'content-box') {\n height = height - paddingSize\n }\n\n hiddenTextarea.value = ''\n const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize\n\n if (isNumber(minRows)) {\n let minHeight = singleRowHeight * minRows\n if (boxSizing === 'border-box') {\n minHeight = minHeight + paddingSize + borderSize\n }\n height = Math.max(minHeight, height)\n result.minHeight = `${minHeight}px`\n }\n if (isNumber(maxRows)) {\n let maxHeight = singleRowHeight * maxRows\n if (boxSizing === 'border-box') {\n maxHeight = maxHeight + paddingSize + borderSize\n }\n height = Math.min(maxHeight, height)\n }\n result.height = `${height}px`\n hiddenTextarea.parentNode?.removeChild(hiddenTextarea)\n hiddenTextarea = undefined\n\n return result\n}\n", "import { isString } from '@vue/shared'\nimport {\n buildProps,\n definePropType,\n iconPropType,\n mutable,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type Input from './input.vue'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport type InputAutoSize = { minRows?: number; maxRows?: number } | boolean\n\nexport const inputProps = buildProps({\n /**\n * @description native input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description input box size\n */\n size: useSizeProp,\n /**\n * @description whether to disable\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType([\n String,\n Number,\n Object,\n ]),\n default: '',\n },\n /**\n * @description type of input\n */\n type: {\n type: String,\n default: 'text',\n },\n /**\n * @description control the resizability\n */\n resize: {\n type: String,\n values: ['none', 'both', 'horizontal', 'vertical'],\n },\n /**\n * @description whether textarea has an adaptive height\n */\n autosize: {\n type: definePropType([Boolean, Object]),\n default: false,\n },\n /**\n * @description native input autocomplete\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description format content\n */\n formatter: {\n type: Function,\n },\n /**\n * @description parse content\n */\n parser: {\n type: Function,\n },\n /**\n * @description placeholder\n */\n placeholder: {\n type: String,\n },\n /**\n * @description native input form\n */\n form: {\n type: String,\n },\n /**\n * @description native input readonly\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * @description native input readonly\n */\n clearable: {\n type: Boolean,\n default: false,\n },\n /**\n * @description toggleable password input\n */\n showPassword: {\n type: Boolean,\n default: false,\n },\n /**\n * @description word count\n */\n showWordLimit: {\n type: Boolean,\n default: false,\n },\n /**\n * @description suffix icon\n */\n suffixIcon: {\n type: iconPropType,\n },\n /**\n * @description prefix icon\n */\n prefixIcon: {\n type: iconPropType,\n },\n /**\n * @description container role, internal properties provided for use by the picker component\n */\n containerRole: {\n type: String,\n default: undefined,\n },\n /**\n * @description native input aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description input tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description input or textarea element style\n */\n inputStyle: {\n type: definePropType([Object, Array, String]),\n default: () => mutable({} as const),\n },\n /**\n * @description native input autofocus\n */\n autofocus: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type InputProps = ExtractPropTypes\n\nexport const inputEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n input: (value: string) => isString(value),\n change: (value: string) => isString(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n // NOTE: when autofill by browser, the keydown event is instanceof Event, not KeyboardEvent\n // relative bug report https://github.com/element-plus/element-plus/issues/6665\n keydown: (evt: KeyboardEvent | Event) => evt instanceof Event,\n compositionstart: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionupdate: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionend: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n}\nexport type InputEmits = typeof inputEmits\n\nexport type InputInstance = InstanceType\n", "\n\n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Input from './src/input.vue'\n\nexport const ElInput = withInstall(Input)\nexport default ElInput\n\nexport * from './src/input'\nexport type { InputInstance } from './src/instance'\n", "import type { CSSProperties } from 'vue'\nimport type { ThumbProps } from './thumb'\n\nexport const GAP = 4 // top 2 + bottom 2 of bar instance\n\nexport const BAR_MAP = {\n vertical: {\n offset: 'offsetHeight',\n scroll: 'scrollTop',\n scrollSize: 'scrollHeight',\n size: 'height',\n key: 'vertical',\n axis: 'Y',\n client: 'clientY',\n direction: 'top',\n },\n horizontal: {\n offset: 'offsetWidth',\n scroll: 'scrollLeft',\n scrollSize: 'scrollWidth',\n size: 'width',\n key: 'horizontal',\n axis: 'X',\n client: 'clientX',\n direction: 'left',\n },\n} as const\n\nexport const renderThumbStyle = ({\n move,\n size,\n bar,\n}: Pick & {\n bar: typeof BAR_MAP[keyof typeof BAR_MAP]\n}): CSSProperties => ({\n [bar.size]: size,\n transform: `translate${bar.axis}(${move}%)`,\n})\n", "import type { InjectionKey } from 'vue'\n\nexport interface ScrollbarContext {\n scrollbarElement: HTMLDivElement\n wrapElement: HTMLDivElement\n}\n\nexport const scrollbarContextKey: InjectionKey = Symbol(\n 'scrollbarContextKey'\n)\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Thumb from './thumb.vue'\n\nexport const thumbProps = buildProps({\n vertical: Boolean,\n size: String,\n move: Number,\n ratio: {\n type: Number,\n required: true,\n },\n always: Boolean,\n} as const)\nexport type ThumbProps = ExtractPropTypes\n\nexport type ThumbInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Bar from './bar.vue'\n\nexport const barProps = buildProps({\n always: {\n type: Boolean,\n default: true,\n },\n width: String,\n height: String,\n ratioX: {\n type: Number,\n default: 1,\n },\n ratioY: {\n type: Number,\n default: 1,\n },\n} as const)\nexport type BarProps = ExtractPropTypes\n\nexport type BarInstance = InstanceType\n", "\n\n", "import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type Scrollbar from './scrollbar.vue'\n\nexport const scrollbarProps = buildProps({\n /**\n * @description height of scrollbar\n */\n height: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description max height of scrollbar\n */\n maxHeight: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether to use the native scrollbar\n */\n native: {\n type: Boolean,\n default: false,\n },\n /**\n * @description style of wrap\n */\n wrapStyle: {\n type: definePropType([String, Object, Array]),\n default: '',\n },\n /**\n * @description class of wrap\n */\n wrapClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description class of view\n */\n viewClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description style of view\n */\n viewStyle: {\n type: [String, Array, Object],\n default: '',\n },\n /**\n * @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance\n */\n noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能\n /**\n * @description element tag of the view\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description always show\n */\n always: Boolean,\n /**\n * @description minimum size of scrollbar\n */\n minSize: {\n type: Number,\n default: 20,\n },\n /**\n * @description id of view\n */\n id: String,\n /**\n * @description role of view\n */\n role: String,\n /**\n * @description aria-label of view\n */\n ariaLabel: String,\n /**\n * @description aria-orientation of view\n */\n ariaOrientation: {\n type: String,\n values: ['horizontal', 'vertical'],\n },\n} as const)\nexport type ScrollbarProps = ExtractPropTypes\n\nexport const scrollbarEmits = {\n scroll: ({\n scrollTop,\n scrollLeft,\n }: {\n scrollTop: number\n scrollLeft: number\n }) => [scrollTop, scrollLeft].every(isNumber),\n}\nexport type ScrollbarEmits = typeof scrollbarEmits\n\nexport type ScrollbarInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Scrollbar from './src/scrollbar.vue'\n\nexport const ElScrollbar = withInstall(Scrollbar)\nexport default ElScrollbar\n\nexport * from './src/util'\nexport * from './src/scrollbar'\nexport * from './src/thumb'\nexport * from './src/constants'\n", "import type { CSSProperties, ComputedRef, InjectionKey, Ref } from 'vue'\nimport type { Instance } from '@popperjs/core'\n\nexport type Measurable = {\n getBoundingClientRect: () => DOMRect\n}\n\n/**\n * triggerRef indicates the element that triggers popper\n * contentRef indicates the element of popper content\n * referenceRef indicates the element that popper content relative with\n */\nexport type ElPopperInjectionContext = {\n triggerRef: Ref\n contentRef: Ref\n popperInstanceRef: Ref\n referenceRef: Ref\n role: ComputedRef\n}\n\nexport type ElPopperContentInjectionContext = {\n arrowRef: Ref\n arrowOffset: Ref\n arrowStyle: ComputedRef\n}\n\nexport const POPPER_INJECTION_KEY: InjectionKey =\n Symbol('popper')\n\nexport const POPPER_CONTENT_INJECTION_KEY: InjectionKey =\n Symbol('popperContent')\n", "import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Popper from './popper.vue'\n\nconst effects = ['light', 'dark'] as const\nconst triggers = ['click', 'contextmenu', 'hover', 'focus'] as const\n\nexport const Effect = {\n LIGHT: 'light',\n DARK: 'dark',\n} as const\n\nexport const roleTypes = [\n 'dialog',\n 'grid',\n 'group',\n 'listbox',\n 'menu',\n 'navigation',\n 'tooltip',\n 'tree',\n] as const\n\nexport type PopperEffect = typeof effects[number]\nexport type PopperTrigger = typeof triggers[number]\n\nexport const popperProps = buildProps({\n role: {\n type: String,\n values: roleTypes,\n default: 'tooltip',\n },\n} as const)\n\nexport type PopperProps = ExtractPropTypes\n\nexport type PopperInstance = InstanceType\n\n/** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */\nexport const usePopperProps = popperProps\n\n/** @deprecated use `PopperProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperProps = PopperProps\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Arrow from './arrow.vue'\n\nexport const popperArrowProps = buildProps({\n arrowOffset: {\n type: Number,\n default: 5,\n },\n} as const)\nexport type PopperArrowProps = ExtractPropTypes\n\nexport type PopperArrowInstance = InstanceType\n\n/** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */\nexport const usePopperArrowProps = popperArrowProps\n\n/** @deprecated use `PopperArrowProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperArrowProps = PopperArrowProps\n\n/** @deprecated use `PopperArrowInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowInstance = PopperArrowInstance\n", "\n\n\n", "import {\n Comment,\n Fragment,\n Text,\n cloneVNode,\n defineComponent,\n inject,\n withDirectives,\n} from 'vue'\nimport { NOOP, isObject } from '@vue/shared'\nimport {\n FORWARD_REF_INJECTION_KEY,\n useForwardRefDirective,\n useNamespace,\n} from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\n\nimport type { Ref, VNode } from 'vue'\n\nconst NAME = 'ElOnlyChild'\n\nexport const OnlyChild = defineComponent({\n name: NAME,\n setup(_, { slots, attrs }) {\n const forwardRefInjection = inject(FORWARD_REF_INJECTION_KEY)\n const forwardRefDirective = useForwardRefDirective(\n forwardRefInjection?.setForwardRef ?? NOOP\n )\n return () => {\n const defaultSlot = slots.default?.(attrs)\n if (!defaultSlot) return null\n\n if (defaultSlot.length > 1) {\n debugWarn(NAME, 'requires exact only one valid child.')\n return null\n }\n\n const firstLegitNode = findFirstLegitChild(defaultSlot)\n if (!firstLegitNode) {\n debugWarn(NAME, 'no valid child node found')\n return null\n }\n\n return withDirectives(cloneVNode(firstLegitNode!, attrs), [\n [forwardRefDirective],\n ])\n }\n },\n})\n\nfunction findFirstLegitChild(node: VNode[] | undefined): VNode | null {\n if (!node) return null\n const children = node as VNode[]\n for (const child of children) {\n /**\n * when user uses h(Fragment, [text]) to render plain string,\n * this switch case just cannot handle, when the value is primitives\n * we should just return the wrapped string\n */\n if (isObject(child)) {\n switch (child.type) {\n case Comment:\n continue\n case Text:\n case 'svg':\n return wrapTextContent(child)\n case Fragment:\n return findFirstLegitChild(child.children as VNode[])\n default:\n return child\n }\n }\n return wrapTextContent(child)\n }\n return null\n}\n\nfunction wrapTextContent(s: string | VNode) {\n const ns = useNamespace('only-child')\n return {s}\n}\n\nexport type OnlyChildExpose = {\n forwardRef: Ref\n}\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { Measurable } from './constants'\nimport type Trigger from './trigger.vue'\n\nexport const popperTriggerProps = buildProps({\n virtualRef: {\n type: definePropType(Object),\n },\n virtualTriggering: Boolean,\n onMouseenter: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onMouseleave: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onClick: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onKeydown: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onFocus: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onBlur: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onContextmenu: {\n type: definePropType<(e: Event) => void>(Function),\n },\n id: String,\n open: Boolean,\n} as const)\n\nexport type PopperTriggerProps = typeof popperTriggerProps\n\nexport type PopperTriggerInstance = InstanceType\n\n/** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */\nexport const usePopperTriggerProps = popperTriggerProps\n\n/** @deprecated use `PopperTriggerInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowTrigger = PopperTriggerInstance\n", "\n\n\n", "import type { InjectionKey, Ref } from 'vue'\n\nexport const FOCUS_AFTER_TRAPPED = 'focus-trap.focus-after-trapped'\nexport const FOCUS_AFTER_RELEASED = 'focus-trap.focus-after-released'\nexport const FOCUSOUT_PREVENTED = 'focus-trap.focusout-prevented'\nexport const FOCUS_AFTER_TRAPPED_OPTS: EventInit = {\n cancelable: true,\n bubbles: false,\n}\nexport const FOCUSOUT_PREVENTED_OPTS: EventInit = {\n cancelable: true,\n bubbles: false,\n}\n\nexport const ON_TRAP_FOCUS_EVT = 'focusAfterTrapped'\nexport const ON_RELEASE_FOCUS_EVT = 'focusAfterReleased'\n\nexport type FocusTrapInjectionContext = {\n focusTrapRef: Ref\n onKeydown: (e: KeyboardEvent) => void\n}\n\nexport const FOCUS_TRAP_INJECTION_KEY: InjectionKey =\n Symbol('elFocusTrap')\n", "import { onBeforeUnmount, onMounted, ref } from 'vue'\nimport { FOCUSOUT_PREVENTED, FOCUSOUT_PREVENTED_OPTS } from './tokens'\n\nconst focusReason = ref<'pointer' | 'keyboard'>()\nconst lastUserFocusTimestamp = ref(0)\nconst lastAutomatedFocusTimestamp = ref(0)\nlet focusReasonUserCount = 0\n\nexport type FocusLayer = {\n paused: boolean\n pause: () => void\n resume: () => void\n}\n\nexport type FocusStack = FocusLayer[]\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n const nodes: HTMLElement[] = []\n const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (\n node: Element & {\n disabled: boolean\n hidden: boolean\n type: string\n tabIndex: number\n }\n ) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden'\n if (node.disabled || node.hidden || isHiddenInput)\n return NodeFilter.FILTER_SKIP\n return node.tabIndex >= 0 || node === document.activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n },\n })\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement)\n\n return nodes\n}\n\nexport const getVisibleElement = (\n elements: HTMLElement[],\n container: HTMLElement\n) => {\n for (const element of elements) {\n if (!isHidden(element, container)) return element\n }\n}\n\nexport const isHidden = (element: HTMLElement, container: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return false\n if (getComputedStyle(element).visibility === 'hidden') return true\n\n while (element) {\n if (container && element === container) return false\n if (getComputedStyle(element).display === 'none') return true\n element = element.parentElement as HTMLElement\n }\n\n return false\n}\n\nexport const getEdges = (container: HTMLElement) => {\n const focusable = obtainAllFocusableElements(container)\n const first = getVisibleElement(focusable, container)\n const last = getVisibleElement(focusable.reverse(), container)\n return [first, last]\n}\n\nconst isSelectable = (\n element: any\n): element is HTMLInputElement & { select: () => void } => {\n return element instanceof HTMLInputElement && 'select' in element\n}\n\nexport const tryFocus = (\n element?: HTMLElement | { focus: () => void } | null,\n shouldSelect?: boolean\n) => {\n if (element && element.focus) {\n const prevFocusedElement = document.activeElement\n element.focus({ preventScroll: true })\n lastAutomatedFocusTimestamp.value = window.performance.now()\n if (\n element !== prevFocusedElement &&\n isSelectable(element) &&\n shouldSelect\n ) {\n element.select()\n }\n }\n}\n\nfunction removeFromStack(list: T[], item: T) {\n const copy = [...list]\n\n const idx = list.indexOf(item)\n\n if (idx !== -1) {\n copy.splice(idx, 1)\n }\n return copy\n}\n\nconst createFocusableStack = () => {\n let stack = [] as FocusStack\n\n const push = (layer: FocusLayer) => {\n const currentLayer = stack[0]\n\n if (currentLayer && layer !== currentLayer) {\n currentLayer.pause()\n }\n\n stack = removeFromStack(stack, layer)\n stack.unshift(layer)\n }\n\n const remove = (layer: FocusLayer) => {\n stack = removeFromStack(stack, layer)\n stack[0]?.resume?.()\n }\n\n return {\n push,\n remove,\n }\n}\n\nexport const focusFirstDescendant = (\n elements: HTMLElement[],\n shouldSelect = false\n) => {\n const prevFocusedElement = document.activeElement\n for (const element of elements) {\n tryFocus(element, shouldSelect)\n if (document.activeElement !== prevFocusedElement) return\n }\n}\n\nexport const focusableStack = createFocusableStack()\n\nexport const isFocusCausedByUserEvent = (): boolean => {\n return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value\n}\n\nconst notifyFocusReasonPointer = () => {\n focusReason.value = 'pointer'\n lastUserFocusTimestamp.value = window.performance.now()\n}\n\nconst notifyFocusReasonKeydown = () => {\n focusReason.value = 'keyboard'\n lastUserFocusTimestamp.value = window.performance.now()\n}\n\nexport const useFocusReason = (): {\n focusReason: typeof focusReason\n lastUserFocusTimestamp: typeof lastUserFocusTimestamp\n lastAutomatedFocusTimestamp: typeof lastAutomatedFocusTimestamp\n} => {\n onMounted(() => {\n if (focusReasonUserCount === 0) {\n document.addEventListener('mousedown', notifyFocusReasonPointer)\n document.addEventListener('touchstart', notifyFocusReasonPointer)\n document.addEventListener('keydown', notifyFocusReasonKeydown)\n }\n focusReasonUserCount++\n })\n\n onBeforeUnmount(() => {\n focusReasonUserCount--\n if (focusReasonUserCount <= 0) {\n document.removeEventListener('mousedown', notifyFocusReasonPointer)\n document.removeEventListener('touchstart', notifyFocusReasonPointer)\n document.removeEventListener('keydown', notifyFocusReasonKeydown)\n }\n })\n\n return {\n focusReason,\n lastUserFocusTimestamp,\n lastAutomatedFocusTimestamp,\n }\n}\n\nexport const createFocusOutPreventedEvent = (\n detail: CustomEventInit['detail']\n) => {\n return new CustomEvent(FOCUSOUT_PREVENTED, {\n ...FOCUSOUT_PREVENTED_OPTS,\n detail,\n })\n}\n", "\n\n", "import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n referenceEl: Measurable\n popperContentEl: HTMLElement\n arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType(Array),\n default: undefined,\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the Tooltip\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: POSITIONING_STRATEGIES,\n default: 'absolute',\n },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n ...popperCoreConfigProps,\n id: String,\n style: {\n type: definePropType([String, Array, Object]),\n },\n className: {\n type: definePropType([String, Array, Object]),\n },\n effect: {\n type: String,\n default: 'dark',\n },\n visible: Boolean,\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: Boolean,\n focusOnShow: {\n type: Boolean,\n default: false,\n },\n trapping: {\n type: Boolean,\n default: false,\n },\n popperClass: {\n type: definePropType([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType(Object),\n },\n triggerTargetEl: {\n type: definePropType(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n ariaLabel: {\n type: String,\n default: undefined,\n },\n virtualTriggering: Boolean,\n zIndex: Number,\n} as const)\nexport type PopperContentProps = ExtractPropTypes\n\nexport const popperContentEmits = {\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n focus: () => true,\n blur: () => true,\n close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowContent = PopperContentInstance\n", "import { unrefElement } from '@vueuse/core'\nimport { isClient } from '@element-plus/utils'\n\nimport type { ComponentPublicInstance } from 'vue'\nimport type { MaybeRef } from '@vueuse/core'\nimport type { Modifier } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type { PopperCoreConfigProps } from './content'\n\nexport const buildPopperOptions = (\n props: PopperCoreConfigProps,\n modifiers: Modifier[] = []\n) => {\n const { placement, strategy, popperOptions } = props\n const options = {\n placement,\n strategy,\n ...popperOptions,\n modifiers: [...genModifiers(props), ...modifiers],\n }\n\n deriveExtraModifiers(options, popperOptions?.modifiers)\n return options\n}\n\nexport const unwrapMeasurableEl = (\n $el: MaybeRef\n) => {\n if (!isClient) return\n return unrefElement($el as HTMLElement)\n}\n\nfunction genModifiers(options: PopperCoreConfigProps) {\n const { offset, gpuAcceleration, fallbackPlacements } = options\n return [\n {\n name: 'offset',\n options: {\n offset: [0, offset ?? 12],\n },\n },\n {\n name: 'preventOverflow',\n options: {\n padding: {\n top: 2,\n bottom: 2,\n left: 5,\n right: 5,\n },\n },\n },\n {\n name: 'flip',\n options: {\n padding: 5,\n fallbackPlacements,\n },\n },\n {\n name: 'computeStyles',\n options: {\n gpuAcceleration,\n },\n },\n ]\n}\n\nfunction deriveExtraModifiers(\n options: any,\n modifiers: PopperCoreConfigProps['popperOptions']['modifiers']\n) {\n if (modifiers) {\n options.modifiers = [...options.modifiers, ...(modifiers ?? [])]\n }\n}\n", "import { computed, inject, onMounted, ref, unref, watch } from 'vue'\nimport { isUndefined } from 'lodash-unified'\nimport { usePopper } from '@element-plus/hooks'\nimport { POPPER_INJECTION_KEY } from '../constants'\nimport { buildPopperOptions, unwrapMeasurableEl } from '../utils'\n\nimport type { Modifier } from '@popperjs/core'\nimport type { PartialOptions } from '@element-plus/hooks'\nimport type { PopperContentProps } from '../content'\n\nconst DEFAULT_ARROW_OFFSET = 0\n\nexport const usePopperContent = (props: PopperContentProps) => {\n const { popperInstanceRef, contentRef, triggerRef, role } = inject(\n POPPER_INJECTION_KEY,\n undefined\n )!\n\n const arrowRef = ref()\n const arrowOffset = ref()\n\n const eventListenerModifier = computed(() => {\n return {\n name: 'eventListeners',\n enabled: !!props.visible,\n } as Modifier<'eventListeners', any>\n })\n\n const arrowModifier = computed(() => {\n const arrowEl = unref(arrowRef)\n const offset = unref(arrowOffset) ?? DEFAULT_ARROW_OFFSET\n // Seems like the `phase` and `fn` is required by Modifier type\n // But on its documentation they didn't specify that.\n // Refer to https://popper.js.org/docs/v2/modifiers/arrow/\n return {\n name: 'arrow',\n enabled: !isUndefined(arrowEl),\n options: {\n element: arrowEl,\n padding: offset,\n },\n } as any\n })\n\n const options = computed(() => {\n return {\n onFirstUpdate: () => {\n update()\n },\n ...buildPopperOptions(props, [\n unref(arrowModifier),\n unref(eventListenerModifier),\n ]),\n }\n })\n\n const computedReference = computed(\n () => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef)\n )\n\n const { attributes, state, styles, update, forceUpdate, instanceRef } =\n usePopper(computedReference, contentRef, options)\n\n watch(instanceRef, (instance) => (popperInstanceRef.value = instance))\n\n onMounted(() => {\n watch(\n () => unref(computedReference)?.getBoundingClientRect(),\n () => {\n update()\n }\n )\n })\n\n return {\n attributes,\n arrowRef,\n contentRef,\n instanceRef,\n state,\n styles,\n role,\n\n forceUpdate,\n update,\n }\n}\n\nexport type UsePopperContentReturn = ReturnType\n", "import { computed, ref, unref } from 'vue'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\n\nimport { isNumber } from '@element-plus/utils'\nimport type { CSSProperties, StyleValue } from 'vue'\nimport type { UsePopperReturn } from '@element-plus/hooks'\nimport type { UsePopperContentReturn } from './use-content'\nimport type { PopperContentProps } from '../content'\n\nexport const usePopperContentDOM = (\n props: PopperContentProps,\n {\n attributes,\n styles,\n role,\n }: Pick &\n Pick\n) => {\n const { nextZIndex } = useZIndex()\n const ns = useNamespace('popper')\n\n const contentAttrs = computed(() => unref(attributes).popper)\n const contentZIndex = ref(\n isNumber(props.zIndex) ? props.zIndex : nextZIndex()\n )\n const contentClass = computed(() => [\n ns.b(),\n ns.is('pure', props.pure),\n ns.is(props.effect),\n props.popperClass,\n ])\n const contentStyle = computed(() => {\n return [\n { zIndex: unref(contentZIndex) } as CSSProperties,\n unref(styles).popper as CSSProperties,\n props.popperStyle || {},\n ]\n })\n const ariaModal = computed(() =>\n role.value === 'dialog' ? 'false' : undefined\n )\n const arrowStyle = computed(\n () => (unref(styles).arrow || {}) as CSSProperties\n )\n\n const updateZIndex = () => {\n contentZIndex.value = isNumber(props.zIndex) ? props.zIndex : nextZIndex()\n }\n\n return {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n contentZIndex,\n\n updateZIndex,\n }\n}\n\nexport type UsePopperContentDOMReturn = ReturnType\n", "import { ref } from 'vue'\n\nimport type { SetupContext } from 'vue'\nimport type { PopperContentEmits, PopperContentProps } from '../content'\n\nexport const usePopperContentFocusTrap = (\n props: PopperContentProps,\n emit: SetupContext['emit']\n) => {\n const trapped = ref(false)\n const focusStartRef = ref<'container' | 'first' | HTMLElement>()\n\n const onFocusAfterTrapped = () => {\n emit('focus')\n }\n\n const onFocusAfterReleased = (event: CustomEvent) => {\n if (event.detail?.focusReason !== 'pointer') {\n focusStartRef.value = 'first'\n emit('blur')\n }\n }\n\n const onFocusInTrap = (event: FocusEvent) => {\n if (props.visible && !trapped.value) {\n if (event.target) {\n focusStartRef.value = event.target as typeof focusStartRef.value\n }\n trapped.value = true\n }\n }\n\n const onFocusoutPrevented = (event: CustomEvent) => {\n if (!props.trapping) {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n trapped.value = false\n }\n }\n\n const onReleaseRequested = () => {\n trapped.value = false\n emit('close')\n }\n\n return {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n }\n}\n\nexport type UsePopperContentFocusTrapReturn = ReturnType<\n typeof usePopperContentFocusTrap\n>\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Popper from './src/popper.vue'\n\nimport ElPopperArrow from './src/arrow.vue'\nimport ElPopperTrigger from './src/trigger.vue'\nimport ElPopperContent from './src/content.vue'\n\nexport { ElPopperArrow, ElPopperTrigger, ElPopperContent }\n\nexport const ElPopper = withInstall(Popper)\nexport default ElPopper\n\nexport * from './src/popper'\nexport * from './src/trigger'\nexport * from './src/content'\nexport * from './src/arrow'\nexport * from './src/constants'\n\nexport type { Placement, Options } from '@popperjs/core'\n", "import type { Arrayable } from '@element-plus/utils'\nimport type { InjectionKey, Ref } from 'vue'\nimport type { TooltipTriggerType } from './trigger'\n\nexport type ElTooltipInjectionContext = {\n controlled: Ref\n id: Ref\n open: Ref\n trigger: Ref>\n onOpen: (e?: Event) => void\n onClose: (e?: Event) => void\n onToggle: (e: Event) => void\n onShow: () => void\n onHide: () => void\n onBeforeShow: () => void\n onBeforeHide: () => void\n updatePopper: () => void\n}\n\nexport const TOOLTIP_INJECTION_KEY: InjectionKey =\n Symbol('elTooltip')\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperContentProps } from '@element-plus/components/popper'\nimport { useDelayedToggleProps } from '@element-plus/hooks'\n\nimport type TooltipContent from './content.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const useTooltipContentProps = buildProps({\n ...useDelayedToggleProps,\n ...popperContentProps,\n /**\n * @description which element the tooltip CONTENT appends to\n */\n appendTo: {\n type: definePropType([String, Object]),\n },\n /**\n * @description display content, can be overridden by `slot#content`\n */\n content: {\n type: String,\n default: '',\n },\n /**\n * @description whether `content` is treated as HTML string\n */\n rawContent: {\n type: Boolean,\n default: false,\n },\n /**\n * @description when tooltip inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: Boolean,\n /**\n * @description same as `aria-label`\n */\n ariaLabel: String,\n // because model toggle prop is generated dynamically\n // so the typing cannot be evaluated by typescript as type:\n // [name]: { type: Boolean, default: null }\n // so we need to declare that again for type checking.\n /**\n * @description visibility of Tooltip\n */\n visible: {\n type: definePropType(Boolean),\n default: null,\n },\n /**\n * @description animation name\n */\n transition: String,\n /**\n * @description whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets\n */\n teleported: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n} as const)\n\nexport type ElTooltipContentProps = ExtractPropTypes<\n typeof useTooltipContentProps\n>\n\nexport type TooltipContentInstance = InstanceType\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperTriggerProps } from '@element-plus/components/popper'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type TooltipTriggerType = 'hover' | 'focus' | 'click' | 'contextmenu'\n\nexport const useTooltipTriggerProps = buildProps({\n ...popperTriggerProps,\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n /**\n * @description How should the tooltip be triggered (to show)\n */\n trigger: {\n type: definePropType>([String, Array]),\n default: 'hover',\n },\n /**\n * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard\n */\n triggerKeys: {\n type: definePropType(Array),\n default: () => [EVENT_CODE.enter, EVENT_CODE.space],\n },\n} as const)\n\nexport type ElTooltipTriggerProps = ExtractPropTypes<\n typeof useTooltipTriggerProps\n>\n", "import { buildProps } from '@element-plus/utils'\nimport { createModelToggleComposable } from '@element-plus/hooks'\nimport { popperArrowProps, popperProps } from '@element-plus/components/popper'\nimport { useTooltipContentProps } from './content'\nimport { useTooltipTriggerProps } from './trigger'\nimport type Tooltip from './tooltip.vue'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const {\n useModelToggleProps: useTooltipModelToggleProps,\n useModelToggleEmits: useTooltipModelToggleEmits,\n useModelToggle: useTooltipModelToggle,\n} = createModelToggleComposable('visible' as const)\n\nexport const useTooltipProps = buildProps({\n ...popperProps,\n ...useTooltipModelToggleProps,\n ...useTooltipContentProps,\n ...useTooltipTriggerProps,\n ...popperArrowProps,\n /**\n * @description whether the tooltip content has an arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n})\n\nexport const tooltipEmits = [\n ...useTooltipModelToggleEmits,\n 'before-show',\n 'before-hide',\n 'show',\n 'hide',\n 'open',\n 'close',\n]\n\nexport type ElTooltipProps = ExtractPropTypes\n\nexport type TooltipInstance = InstanceType\n", "import { unref } from 'vue'\nimport { isArray } from '@element-plus/utils'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { Ref } from 'vue'\nimport type { TooltipTriggerType } from './trigger'\n\nexport const isTriggerType = (\n trigger: Arrayable,\n type: TooltipTriggerType\n) => {\n if (isArray(trigger)) {\n return trigger.includes(type)\n }\n return trigger === type\n}\n\nexport const whenTrigger = (\n trigger: Ref>,\n type: TooltipTriggerType,\n handler: (e: Event) => void\n) => {\n return (e: Event) => {\n isTriggerType(unref(trigger), type) && handler(e)\n }\n}\n", "\n\n", "\n\n\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Tooltip from './src/tooltip.vue'\n\nexport const ElTooltip = withInstall(Tooltip)\nexport * from './src/tooltip'\nexport * from './src/trigger'\nexport * from './src/content'\nexport * from './src/constants'\nexport default ElTooltip\n", "import { NOOP } from '@vue/shared'\nimport {\n buildProps,\n definePropType,\n isObject,\n isString,\n} from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Autocomplete from './autocomplete.vue'\nimport type { Placement } from '@element-plus/components/popper'\nimport type { Awaitable } from '@element-plus/utils'\n\nexport type AutocompleteData = Record[]\nexport type AutocompleteFetchSuggestionsCallback = (\n data: AutocompleteData\n) => void\nexport type AutocompleteFetchSuggestions =\n | ((\n queryString: string,\n cb: AutocompleteFetchSuggestionsCallback\n ) => Awaitable | void)\n | AutocompleteData\n\nexport const autocompleteProps = buildProps({\n /**\n * @description key name of the input suggestion object for display\n */\n valueKey: {\n type: String,\n default: 'value',\n },\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description debounce delay when typing, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description placement of the popup menu\n */\n placement: {\n type: definePropType(String),\n values: [\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n ],\n default: 'bottom-start',\n },\n /**\n * @description a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete\n */\n fetchSuggestions: {\n type: definePropType([Function, Array]),\n default: NOOP,\n },\n /**\n * @description custom class name for autocomplete's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether show suggestions when input focus\n */\n triggerOnFocus: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to emit a `select` event on enter when there is no autocomplete match\n */\n selectWhenUnmatched: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether to hide the loading icon in remote search\n */\n hideLoading: {\n type: Boolean,\n default: false,\n },\n /**\n * @description label text\n */\n label: {\n type: String,\n },\n teleported: useTooltipContentProps.teleported,\n /**\n * @description whether to highlight first item in remote search suggestions by default\n */\n highlightFirstItem: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether the width of the dropdown is the same as the input\n */\n fitInputWidth: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether to show clear button\n */\n clearable: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether to disable\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * @description same as `name` in native input\n */\n name: String,\n} as const)\nexport type AutocompleteProps = ExtractPropTypes\n\nexport const autocompleteEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n [INPUT_EVENT]: (value: string) => isString(value),\n [CHANGE_EVENT]: (value: string) => isString(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n select: (item: Record) => isObject(item),\n}\nexport type AutocompleteEmits = typeof autocompleteEmits\n\nexport type AutocompleteInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Autocomplete from './src/autocomplete.vue'\n\nexport const ElAutocomplete = withInstall(Autocomplete)\n\nexport default ElAutocomplete\n\nexport * from './src/autocomplete'\n", "import {\n buildProps,\n definePropType,\n iconPropType,\n isNumber,\n} from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ObjectFitProperty } from 'csstype'\n\nexport const avatarProps = buildProps({\n /**\n * @description avatar size.\n */\n size: {\n type: [Number, String],\n values: componentSizes,\n default: '',\n validator: (val: unknown): val is number => isNumber(val),\n },\n /**\n * @description avatar shape.\n */\n shape: {\n type: String,\n values: ['circle', 'square'],\n default: 'circle',\n },\n /**\n * @description representation type to icon, more info on icon component.\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description the source of the image for an image avatar.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description native attribute `alt` of image avatar.\n */\n alt: String,\n /**\n * @description native attribute srcset of image avatar.\n */\n srcSet: String,\n /**\n * @description set how the image fit its container for an image avatar.\n */\n fit: {\n type: definePropType(String),\n default: 'cover',\n },\n} as const)\nexport type AvatarProps = ExtractPropTypes\n\nexport const avatarEmits = {\n error: (evt: Event) => evt instanceof Event,\n}\nexport type AvatarEmits = typeof avatarEmits\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Avatar from './src/avatar.vue'\n\nexport const ElAvatar = withInstall(Avatar)\nexport default ElAvatar\n\nexport * from './src/avatar'\nexport type { AvatarInstance } from './src/instance'\n", "import type { ExtractPropTypes } from 'vue'\n\nexport const backtopProps = {\n /**\n * @description the button will not show until the scroll height reaches this value.\n */\n visibilityHeight: {\n type: Number,\n default: 200,\n },\n /**\n * @description the target to trigger scroll.\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description right distance.\n */\n right: {\n type: Number,\n default: 40,\n },\n /**\n * @description bottom distance.\n */\n bottom: {\n type: Number,\n default: 40,\n },\n} as const\nexport type BacktopProps = ExtractPropTypes\n\nexport const backtopEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type BacktopEmits = typeof backtopEmits\n", "import { onMounted, ref, shallowRef } from 'vue'\nimport { useEventListener, useThrottleFn } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport type { SetupContext } from 'vue'\nimport type { BacktopEmits, BacktopProps } from './backtop'\n\nexport const useBackTop = (\n props: BacktopProps,\n emit: SetupContext['emit'],\n componentName: string\n) => {\n const el = shallowRef()\n const container = shallowRef()\n const visible = ref(false)\n\n const handleScroll = () => {\n if (el.value) visible.value = el.value.scrollTop >= props.visibilityHeight\n }\n\n const handleClick = (event: MouseEvent) => {\n el.value?.scrollTo({ top: 0, behavior: 'smooth' })\n emit('click', event)\n }\n\n const handleScrollThrottled = useThrottleFn(handleScroll, 300, true)\n\n useEventListener(container, 'scroll', handleScrollThrottled)\n onMounted(() => {\n container.value = document\n el.value = document.documentElement\n\n if (props.target) {\n el.value = document.querySelector(props.target) ?? undefined\n if (!el.value) {\n throwError(componentName, `target does not exist: ${props.target}`)\n }\n container.value = el.value\n }\n // Give visible an initial value, fix #13066\n handleScroll()\n })\n\n return {\n visible,\n handleClick,\n }\n}\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Backtop from './src/backtop.vue'\n\nexport const ElBacktop = withInstall(Backtop)\nexport default ElBacktop\n\nexport * from './src/backtop'\nexport type { BacktopInstance } from './src/instance'\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const badgeProps = buildProps({\n /**\n * @description display value.\n */\n value: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description maximum value, shows `{max}+` when exceeded. Only works if value is a number.\n */\n max: {\n type: Number,\n default: 99,\n },\n /**\n * @description if a little dot is displayed.\n */\n isDot: Boolean,\n /**\n * @description hidden badge.\n */\n hidden: Boolean,\n /**\n * @description badge type.\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger'],\n default: 'danger',\n },\n} as const)\nexport type BadgeProps = ExtractPropTypes\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Badge from './src/badge.vue'\n\nexport const ElBadge = withInstall(Badge)\nexport default ElBadge\n\nexport * from './src/badge'\nexport type { BadgeInstance } from './src/instance'\n", "import type { InjectionKey } from 'vue'\nimport type { BreadcrumbProps } from './breadcrumb'\n\nexport const breadcrumbKey: InjectionKey =\n Symbol('breadcrumbKey')\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const breadcrumbProps = buildProps({\n /**\n * @description separator character\n */\n separator: {\n type: String,\n default: '/',\n },\n /**\n * @description icon component of icon separator\n */\n separatorIcon: {\n type: iconPropType,\n },\n} as const)\nexport type BreadcrumbProps = ExtractPropTypes\n", "\n\n\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nexport const breadcrumbItemProps = buildProps({\n /**\n * @description target route of the link, same as `to` of `vue-router`\n */\n to: {\n type: definePropType([String, Object]),\n default: '',\n },\n /**\n * @description if `true`, the navigation will not leave a history record\n */\n replace: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Breadcrumb from './src/breadcrumb.vue'\nimport BreadcrumbItem from './src/breadcrumb-item.vue'\n\nexport const ElBreadcrumb = withInstall(Breadcrumb, {\n BreadcrumbItem,\n})\nexport const ElBreadcrumbItem = withNoopInstall(BreadcrumbItem)\nexport default ElBreadcrumb\n\nexport * from './src/breadcrumb'\nexport * from './src/breadcrumb-item'\nexport * from './src/constants'\nexport type {\n BreadcrumbInstance,\n BreadcrumbItemInstance,\n} from './src/instances'\n", "import type { InjectionKey } from 'vue'\n\nimport type { ButtonProps } from './button'\n\nexport interface ButtonGroupContext {\n size?: ButtonProps['size']\n type?: ButtonProps['type']\n}\n\nexport const buttonGroupContextKey: InjectionKey = Symbol(\n 'buttonGroupContextKey'\n)\n", "import { Text, computed, inject, ref, useSlots } from 'vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './button'\n\nexport const useButton = (\n props: ButtonProps,\n emit: SetupContext['emit']\n) => {\n useDeprecated(\n {\n from: 'type.text',\n replacement: 'link',\n version: '3.0.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/button.html#button-attributes',\n },\n computed(() => props.type === 'text')\n )\n\n const buttonGroupContext = inject(buttonGroupContextKey, undefined)\n const globalConfig = useGlobalConfig('button')\n const { form } = useFormItem()\n const _size = useFormSize(computed(() => buttonGroupContext?.size))\n const _disabled = useFormDisabled()\n const _ref = ref()\n const slots = useSlots()\n\n const _type = computed(() => props.type || buttonGroupContext?.type || '')\n const autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n )\n\n const _props = computed(() => {\n if (props.tag === 'button') {\n return {\n ariaDisabled: _disabled.value || props.loading,\n disabled: _disabled.value || props.loading,\n autofocus: props.autofocus,\n type: props.nativeType,\n }\n }\n return {}\n })\n\n // add space between two characters in Chinese\n const shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children as string\n return /^\\p{Unified_Ideograph}{2}$/u.test(text.trim())\n }\n }\n return false\n })\n\n const handleClick = (evt: MouseEvent) => {\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n }\n\n return {\n _disabled,\n _size,\n _type,\n _ref,\n _props,\n shouldAddSpace,\n handleClick,\n }\n}\n", "import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: definePropType([String, Object]),\n default: 'button',\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n autoInsertSpace?: boolean\n}\n", "/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nexport function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}\n/**\n * Force a number between 0 and 1\n * @hidden\n */\nexport function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * \n * @hidden\n */\nexport function isOnePointZero(n) {\n return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\nexport function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\nexport function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\nexport function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\nexport function pad2(c) {\n return c.length === 1 ? '0' + c : String(c);\n}\n", "import { bound01, pad2 } from './util.js';\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n/**\n * Handle bounds / percentage checking to conform to CSS color spec\n * \n * *Assumes:* r, g, b in [0, 255] or [0, 1]\n * *Returns:* { r, g, b } in [0, 255]\n */\nexport function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255,\n };\n}\n/**\n * Converts an RGB color value to HSL.\n * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n * *Returns:* { h, s, l } in [0,1]\n */\nexport function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (max + min) / 2;\n if (max === min) {\n s = 0;\n h = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, l: l };\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * (6 * t);\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n/**\n * Converts an HSL color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n if (s === 0) {\n // achromatic\n g = l;\n b = l;\n r = l;\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color value to HSV\n *\n * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n * *Returns:* { h, s, v } in [0,1]\n */\nexport function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var v = max;\n var d = max - min;\n var s = max === 0 ? 0 : d / max;\n if (max === min) {\n h = 0; // achromatic\n }\n else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n/**\n * Converts an HSV color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n var mod = i % 6;\n var r = [v, q, p, p, t, v][mod];\n var g = [t, v, v, q, p, p][mod];\n var b = [p, p, t, v, v, q][mod];\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color to hex\n *\n * Assumes r, g, and b are contained in the set [0, 255]\n * Returns a 3 or 6 character hex\n */\nexport function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color plus alpha transparency to hex\n *\n * Assumes r, g, b are contained in the set [0, 255] and\n * a in [0, 1]. Returns a 4 or 8 character rgba hex\n */\n// eslint-disable-next-line max-params\nexport function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n pad2(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color to an ARGB Hex8 string\n * Rarely used, but required for \"toFilter()\"\n */\nexport function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}\n/** Converts a decimal to a hex value */\nexport function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n/** Converts a hex value to a decimal */\nexport function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\n/** Parse a base-16 hex value into a base-10 integer */\nexport function parseIntFromHex(val) {\n return parseInt(val, 16);\n}\nexport function numberInputToObject(color) {\n return {\n r: color >> 16,\n g: (color & 0xff00) >> 8,\n b: color & 0xff,\n };\n}\n", "// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n/**\n * @hidden\n */\nexport var names = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n goldenrod: '#daa520',\n gold: '#ffd700',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavenderblush: '#fff0f5',\n lavender: '#e6e6fa',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32',\n};\n", "/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\nimport { convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToRgb, } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { boundAlpha, convertToPercentage } from './util.js';\n/**\n * Given a string or object, convert that input to RGB\n *\n * Possible string inputs:\n * ```\n * \"red\"\n * \"#f00\" or \"f00\"\n * \"#ff0000\" or \"ff0000\"\n * \"#ff000000\" or \"ff000000\"\n * \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n * \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n * \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n * \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n * \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n * \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n * \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n * ```\n */\nexport function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}\n// \nvar CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n// \nvar CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\nvar CSS_UNIT = \"(?:\".concat(CSS_NUMBER, \")|(?:\").concat(CSS_INTEGER, \")\");\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening paren\nvar PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n/**\n * Permissive string parsing. Take in a number of formats, and output an object\n * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n */\nexport function stringInputToObject(color) {\n color = color.trim().toLowerCase();\n if (color.length === 0) {\n return false;\n }\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color === 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match = matchers.rgb.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n match = matchers.rgba.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n match = matchers.hsl.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n match = matchers.hsla.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n match = matchers.hsv.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n match = matchers.hsva.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n match = matchers.hex8.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex6.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n match = matchers.hex4.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n a: convertHexToDecimal(match[4] + match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex3.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n return false;\n}\n/**\n * Check to see if it looks like a CSS unit\n * (see `matchers` above for definition).\n */\nexport function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}\n", "import { numberInputToObject, rgbaToHex, rgbToHex, rgbToHsl, rgbToHsv } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { inputToRGB } from './format-input';\nimport { bound01, boundAlpha, clamp01 } from './util.js';\nvar TinyColor = /** @class */ (function () {\n function TinyColor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n var _a;\n // If input is already a tinycolor, return itself\n if (color instanceof TinyColor) {\n // eslint-disable-next-line no-constructor-return\n return color;\n }\n if (typeof color === 'number') {\n color = numberInputToObject(color);\n }\n this.originalInput = color;\n var rgb = inputToRGB(color);\n this.originalInput = color;\n this.r = rgb.r;\n this.g = rgb.g;\n this.b = rgb.b;\n this.a = rgb.a;\n this.roundA = Math.round(100 * this.a) / 100;\n this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;\n this.gradientType = opts.gradientType;\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this.r < 1) {\n this.r = Math.round(this.r);\n }\n if (this.g < 1) {\n this.g = Math.round(this.g);\n }\n if (this.b < 1) {\n this.b = Math.round(this.b);\n }\n this.isValid = rgb.ok;\n }\n TinyColor.prototype.isDark = function () {\n return this.getBrightness() < 128;\n };\n TinyColor.prototype.isLight = function () {\n return !this.isDark();\n };\n /**\n * Returns the perceived brightness of the color, from 0-255.\n */\n TinyColor.prototype.getBrightness = function () {\n // http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n };\n /**\n * Returns the perceived luminance of a color, from 0-1.\n */\n TinyColor.prototype.getLuminance = function () {\n // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var R;\n var G;\n var B;\n var RsRGB = rgb.r / 255;\n var GsRGB = rgb.g / 255;\n var BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) {\n R = RsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n }\n if (GsRGB <= 0.03928) {\n G = GsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n }\n if (BsRGB <= 0.03928) {\n B = BsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n }\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n };\n /**\n * Returns the alpha value of a color, from 0-1.\n */\n TinyColor.prototype.getAlpha = function () {\n return this.a;\n };\n /**\n * Sets the alpha value on the current color.\n *\n * @param alpha - The new alpha value. The accepted range is 0-1.\n */\n TinyColor.prototype.setAlpha = function (alpha) {\n this.a = boundAlpha(alpha);\n this.roundA = Math.round(100 * this.a) / 100;\n return this;\n };\n /**\n * Returns whether the color is monochrome.\n */\n TinyColor.prototype.isMonochrome = function () {\n var s = this.toHsl().s;\n return s === 0;\n };\n /**\n * Returns the object as a HSVA object.\n */\n TinyColor.prototype.toHsv = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };\n };\n /**\n * Returns the hsva values interpolated into a string with the following format:\n * \"hsva(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHsvString = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n var h = Math.round(hsv.h * 360);\n var s = Math.round(hsv.s * 100);\n var v = Math.round(hsv.v * 100);\n return this.a === 1 ? \"hsv(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%)\") : \"hsva(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a HSLA object.\n */\n TinyColor.prototype.toHsl = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };\n };\n /**\n * Returns the hsla values interpolated into a string with the following format:\n * \"hsla(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHslString = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n var h = Math.round(hsl.h * 360);\n var s = Math.round(hsl.s * 100);\n var l = Math.round(hsl.l * 100);\n return this.a === 1 ? \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\") : \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the hex value of the color.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHex = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return rgbToHex(this.r, this.g, this.b, allow3Char);\n };\n /**\n * Returns the hex value of the color -with a # prefixed.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHexString = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return '#' + this.toHex(allow3Char);\n };\n /**\n * Returns the hex 8 value of the color.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8 = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n };\n /**\n * Returns the hex 8 value of the color -with a # prefixed.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8String = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return '#' + this.toHex8(allow4Char);\n };\n /**\n * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.\n * @param allowShortChar will shorten hex value to 3 or 4 char if possible\n */\n TinyColor.prototype.toHexShortString = function (allowShortChar) {\n if (allowShortChar === void 0) { allowShortChar = false; }\n return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toRgb = function () {\n return {\n r: Math.round(this.r),\n g: Math.round(this.g),\n b: Math.round(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA values interpolated into a string with the following format:\n * \"RGBA(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toRgbString = function () {\n var r = Math.round(this.r);\n var g = Math.round(this.g);\n var b = Math.round(this.b);\n return this.a === 1 ? \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\") : \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toPercentageRgb = function () {\n var fmt = function (x) { return \"\".concat(Math.round(bound01(x, 255) * 100), \"%\"); };\n return {\n r: fmt(this.r),\n g: fmt(this.g),\n b: fmt(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA relative values interpolated into a string\n */\n TinyColor.prototype.toPercentageRgbString = function () {\n var rnd = function (x) { return Math.round(bound01(x, 255) * 100); };\n return this.a === 1\n ? \"rgb(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%)\")\n : \"rgba(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%, \").concat(this.roundA, \")\");\n };\n /**\n * The 'real' name of the color -if there is one.\n */\n TinyColor.prototype.toName = function () {\n if (this.a === 0) {\n return 'transparent';\n }\n if (this.a < 1) {\n return false;\n }\n var hex = '#' + rgbToHex(this.r, this.g, this.b, false);\n for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n if (hex === value) {\n return key;\n }\n }\n return false;\n };\n TinyColor.prototype.toString = function (format) {\n var formatSet = Boolean(format);\n format = format !== null && format !== void 0 ? format : this.format;\n var formattedString = false;\n var hasAlpha = this.a < 1 && this.a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this.a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex4') {\n formattedString = this.toHex8String(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n return formattedString || this.toHexString();\n };\n TinyColor.prototype.toNumber = function () {\n return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n };\n TinyColor.prototype.clone = function () {\n return new TinyColor(this.toString());\n };\n /**\n * Lighten the color a given amount. Providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.lighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Brighten the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.brighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var rgb = this.toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return new TinyColor(rgb);\n };\n /**\n * Darken the color a given amount, from 0 to 100.\n * Providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.darken = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.tint = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('white', amount);\n };\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.shade = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('black', amount);\n };\n /**\n * Desaturate the color a given amount, from 0 to 100.\n * Providing 100 will is the same as calling greyscale\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.desaturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Saturate the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.saturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Completely desaturates a color into greyscale.\n * Same as calling `desaturate(100)`\n */\n TinyColor.prototype.greyscale = function () {\n return this.desaturate(100);\n };\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n TinyColor.prototype.spin = function (amount) {\n var hsl = this.toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return new TinyColor(hsl);\n };\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n TinyColor.prototype.mix = function (color, amount) {\n if (amount === void 0) { amount = 50; }\n var rgb1 = this.toRgb();\n var rgb2 = new TinyColor(color).toRgb();\n var p = amount / 100;\n var rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a,\n };\n return new TinyColor(rgba);\n };\n TinyColor.prototype.analogous = function (results, slices) {\n if (results === void 0) { results = 6; }\n if (slices === void 0) { slices = 30; }\n var hsl = this.toHsl();\n var part = 360 / slices;\n var ret = [this];\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(new TinyColor(hsl));\n }\n return ret;\n };\n /**\n * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n */\n TinyColor.prototype.complement = function () {\n var hsl = this.toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return new TinyColor(hsl);\n };\n TinyColor.prototype.monochromatic = function (results) {\n if (results === void 0) { results = 6; }\n var hsv = this.toHsv();\n var h = hsv.h;\n var s = hsv.s;\n var v = hsv.v;\n var res = [];\n var modification = 1 / results;\n while (results--) {\n res.push(new TinyColor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n return res;\n };\n TinyColor.prototype.splitcomplement = function () {\n var hsl = this.toHsl();\n var h = hsl.h;\n return [\n this,\n new TinyColor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n new TinyColor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),\n ];\n };\n /**\n * Compute how the color would appear on a background\n */\n TinyColor.prototype.onBackground = function (background) {\n var fg = this.toRgb();\n var bg = new TinyColor(background).toRgb();\n var alpha = fg.a + bg.a * (1 - fg.a);\n return new TinyColor({\n r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,\n g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,\n b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,\n a: alpha,\n });\n };\n /**\n * Alias for `polyad(3)`\n */\n TinyColor.prototype.triad = function () {\n return this.polyad(3);\n };\n /**\n * Alias for `polyad(4)`\n */\n TinyColor.prototype.tetrad = function () {\n return this.polyad(4);\n };\n /**\n * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n */\n TinyColor.prototype.polyad = function (n) {\n var hsl = this.toHsl();\n var h = hsl.h;\n var result = [this];\n var increment = 360 / n;\n for (var i = 1; i < n; i++) {\n result.push(new TinyColor({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));\n }\n return result;\n };\n /**\n * compare color vs current color\n */\n TinyColor.prototype.equals = function (color) {\n return this.toRgbString() === new TinyColor(color).toRgbString();\n };\n return TinyColor;\n}());\nexport { TinyColor };\n// kept for backwards compatability with v1\nexport function tinycolor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n return new TinyColor(color, opts);\n}\n", "import { computed } from 'vue'\nimport { TinyColor } from '@ctrl/tinycolor'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport type { ButtonProps } from './button'\n\nexport function darken(color: TinyColor, amount = 20) {\n return color.mix('#141414', amount).toString()\n}\n\nexport function useButtonCustomStyle(props: ButtonProps) {\n const _disabled = useFormDisabled()\n const ns = useNamespace('button')\n\n // calculate hover & active color by custom color\n // only work when custom color\n return computed(() => {\n let styles: Record = {}\n\n const buttonColor = props.color\n\n if (buttonColor) {\n const color = new TinyColor(buttonColor)\n const activeBgColor = props.dark\n ? color.tint(20).toString()\n : darken(color, 20)\n\n if (props.plain) {\n styles = ns.cssVarBlock({\n 'bg-color': props.dark\n ? darken(color, 90)\n : color.tint(90).toString(),\n 'text-color': buttonColor,\n 'border-color': props.dark\n ? darken(color, 50)\n : color.tint(50).toString(),\n 'hover-text-color': `var(${ns.cssVarName('color-white')})`,\n 'hover-bg-color': buttonColor,\n 'hover-border-color': buttonColor,\n 'active-bg-color': activeBgColor,\n 'active-text-color': `var(${ns.cssVarName('color-white')})`,\n 'active-border-color': activeBgColor,\n })\n\n if (_disabled.value) {\n styles[ns.cssVarBlockName('disabled-bg-color')] = props.dark\n ? darken(color, 90)\n : color.tint(90).toString()\n styles[ns.cssVarBlockName('disabled-text-color')] = props.dark\n ? darken(color, 50)\n : color.tint(50).toString()\n styles[ns.cssVarBlockName('disabled-border-color')] = props.dark\n ? darken(color, 80)\n : color.tint(80).toString()\n }\n } else {\n const hoverBgColor = props.dark\n ? darken(color, 30)\n : color.tint(30).toString()\n const textColor = color.isDark()\n ? `var(${ns.cssVarName('color-white')})`\n : `var(${ns.cssVarName('color-black')})`\n styles = ns.cssVarBlock({\n 'bg-color': buttonColor,\n 'text-color': textColor,\n 'border-color': buttonColor,\n 'hover-bg-color': hoverBgColor,\n 'hover-text-color': textColor,\n 'hover-border-color': hoverBgColor,\n 'active-bg-color': activeBgColor,\n 'active-border-color': activeBgColor,\n })\n\n if (_disabled.value) {\n const disabledButtonColor = props.dark\n ? darken(color, 50)\n : color.tint(50).toString()\n styles[ns.cssVarBlockName('disabled-bg-color')] = disabledButtonColor\n styles[ns.cssVarBlockName('disabled-text-color')] = props.dark\n ? 'rgba(255, 255, 255, 0.5)'\n : `var(${ns.cssVarName('color-white')})`\n styles[ns.cssVarBlockName('disabled-border-color')] =\n disabledButtonColor\n }\n }\n }\n\n return styles\n })\n}\n", "\n\n\n", "import { buttonProps } from './button'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const buttonGroupProps = {\n /**\n * @description control the size of buttons in this button-group\n */\n size: buttonProps.size,\n /**\n * @description control the type of buttons in this button-group\n */\n type: buttonProps.type,\n} as const\nexport type ButtonGroupProps = ExtractPropTypes\n", "\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Button from './src/button.vue'\nimport ButtonGroup from './src/button-group.vue'\n\nexport const ElButton = withInstall(Button, {\n ButtonGroup,\n})\nexport const ElButtonGroup = withNoopInstall(ButtonGroup)\nexport default ElButton\n\nexport * from './src/button'\nexport * from './src/constants'\nexport type { ButtonInstance, ButtonGroupInstance } from './src/instance'\n", "export const timeUnits = ['hours', 'minutes', 'seconds'] as const\n\nexport const DEFAULT_FORMATS_TIME = 'HH:mm:ss'\nexport const DEFAULT_FORMATS_DATE = 'YYYY-MM-DD'\nexport const DEFAULT_FORMATS_DATEPICKER = {\n date: DEFAULT_FORMATS_DATE,\n dates: DEFAULT_FORMATS_DATE,\n week: 'gggg[w]ww',\n year: 'YYYY',\n month: 'YYYY-MM',\n datetime: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,\n monthrange: 'YYYY-MM',\n daterange: DEFAULT_FORMATS_DATE,\n datetimerange: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,\n}\n\nexport type TimeUnit = typeof timeUnits[number]\n", "import dayjs from 'dayjs'\nimport { isArray, isDate, isEmpty } from '@element-plus/utils'\n\nimport type { Dayjs } from 'dayjs'\nexport type TimeList = [number | undefined, number, undefined | number]\n\nexport const buildTimeList = (value: number, bound: number): TimeList => {\n return [\n value > 0 ? value - 1 : undefined,\n value,\n value < bound ? value + 1 : undefined,\n ]\n}\n\nexport const rangeArr = (n: number) =>\n Array.from(Array.from({ length: n }).keys())\n\nexport const extractDateFormat = (format: string) => {\n return format\n .replace(/\\W?m{1,2}|\\W?ZZ/g, '')\n .replace(/\\W?h{1,2}|\\W?s{1,3}|\\W?a/gi, '')\n .trim()\n}\n\nexport const extractTimeFormat = (format: string) => {\n return format\n .replace(/\\W?D{1,2}|\\W?Do|\\W?d{1,4}|\\W?M{1,4}|\\W?Y{2,4}/g, '')\n .trim()\n}\n\nexport const dateEquals = function (a: Date | unknown, b: Date | unknown) {\n const aIsDate = isDate(a)\n const bIsDate = isDate(b)\n if (aIsDate && bIsDate) {\n return a.getTime() === b.getTime()\n }\n if (!aIsDate && !bIsDate) {\n return a === b\n }\n return false\n}\n\nexport const valueEquals = function (\n a: Array | unknown,\n b: Array | unknown\n) {\n const aIsArray = isArray(a)\n const bIsArray = isArray(b)\n if (aIsArray && bIsArray) {\n if (a.length !== b.length) {\n return false\n }\n return a.every((item, index) => dateEquals(item, b[index]))\n }\n if (!aIsArray && !bIsArray) {\n return dateEquals(a, b)\n }\n return false\n}\n\nexport const parseDate = function (\n date: string | number | Date,\n format: string | undefined,\n lang: string\n) {\n const day =\n isEmpty(format) || format === 'x'\n ? dayjs(date).locale(lang)\n : dayjs(date, format).locale(lang)\n return day.isValid() ? day : undefined\n}\n\nexport const formatter = function (\n date: string | number | Date | Dayjs,\n format: string | undefined,\n lang: string\n) {\n if (isEmpty(format)) return date\n if (format === 'x') return +date\n return dayjs(date).locale(lang).format(format)\n}\n\nexport const makeList = (total: number, method?: () => number[]) => {\n const arr: boolean[] = []\n const disabledArr = method?.()\n for (let i = 0; i < total; i++) {\n arr.push(disabledArr?.includes(i) ?? false)\n }\n return arr\n}\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport type GetDisabledHours = (role: string, comparingDate?: Dayjs) => number[]\nexport type GetDisabledMinutes = (\n hour: number,\n role: string,\n comparingDate?: Dayjs\n) => number[]\nexport type GetDisabledSeconds = (\n hour: number,\n minute: number,\n role: string,\n comparingDate?: Dayjs\n) => number[]\n\nexport const disabledTimeListsProps = buildProps({\n /**\n * @description To specify the array of hours that cannot be selected\n */\n disabledHours: {\n type: definePropType(Function),\n },\n /**\n * @description To specify the array of minutes that cannot be selected\n */\n disabledMinutes: {\n type: definePropType(Function),\n },\n /**\n * @description To specify the array of seconds that cannot be selected\n */\n disabledSeconds: {\n type: definePropType(Function),\n },\n} as const)\n\nexport type DisabledTimeListsProps = ExtractPropTypes<\n typeof disabledTimeListsProps\n>\n\nexport const timePanelSharedProps = buildProps({\n visible: Boolean,\n actualVisible: {\n type: Boolean,\n default: undefined,\n },\n format: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type TimePanelSharedProps = ExtractPropTypes\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { CircleClose } from '@element-plus/icons-vue'\nimport { disabledTimeListsProps } from '../props/shared'\n\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type { Options } from '@popperjs/core'\nimport type { Dayjs } from 'dayjs'\n\nexport type SingleOrRange = T | [T, T]\nexport type DateModelType = number | string | Date\nexport type ModelValueType = SingleOrRange\nexport type DayOrDays = SingleOrRange\nexport type DateOrDates = SingleOrRange\nexport type UserInput = SingleOrRange\nexport type GetDisabledHours = (role: string, comparingDate?: Dayjs) => number[]\nexport type GetDisabledMinutes = (\n hour: number,\n role: string,\n comparingDate?: Dayjs\n) => number[]\nexport type GetDisabledSeconds = (\n hour: number,\n minute: number,\n role: string,\n comparingDate?: Dayjs\n) => number[]\n\nexport const timePickerDefaultProps = buildProps({\n /**\n * @description same as `id` in native input\n */\n id: {\n type: definePropType>([Array, String]),\n },\n /**\n * @description same as `name` in native input\n */\n name: {\n type: definePropType>([Array, String]),\n default: '',\n },\n /**\n * @description custom class name for TimePicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description format of the displayed value in the input box\n */\n format: String,\n /**\n * @description optional, format of binding value. If not specified, the binding value will be a Date object\n */\n valueFormat: String,\n /**\n * @description optional, format of the date displayed value in TimePicker's dropdown\n */\n dateFormat: String,\n /**\n * @description optional, format of the time displayed value in TimePicker's dropdown\n */\n timeFormat: String,\n /**\n * @description type of the picker\n */\n type: {\n type: String,\n default: '',\n },\n /**\n * @description whether to show clear button\n */\n clearable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Custom clear icon component\n */\n clearIcon: {\n type: definePropType([String, Object]),\n default: CircleClose,\n },\n /**\n * @description whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Custom prefix icon component\n */\n prefixIcon: {\n type: definePropType([String, Object]),\n default: '',\n },\n /**\n * @description size of Input\n */\n size: useSizeProp,\n /**\n * @description whether TimePicker is read only\n */\n readonly: Boolean,\n /**\n * @description whether TimePicker is disabled\n */\n disabled: Boolean,\n /**\n * @description placeholder in non-range mode\n */\n placeholder: {\n type: String,\n default: '',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType>(Object),\n default: () => ({}),\n },\n /**\n * @description binding value, if it is an array, the length should be 2\n */\n modelValue: {\n type: definePropType([Date, Array, String, Number]),\n default: '',\n },\n /**\n * @description range separator\n */\n rangeSeparator: {\n type: String,\n default: '-',\n },\n /**\n * @description placeholder for the start date in range mode\n */\n startPlaceholder: String,\n /**\n * @description placeholder for the end date in range mode\n */\n endPlaceholder: String,\n /**\n * @description optional, default date of the calendar\n */\n defaultValue: {\n type: definePropType>([Date, Array]),\n },\n /**\n * @description optional, the time value to use when selecting date range\n */\n defaultTime: {\n type: definePropType>([Date, Array]),\n },\n /**\n * @description whether to pick a time range\n */\n isRange: Boolean,\n ...disabledTimeListsProps,\n /**\n * @description a function determining if a date is disabled with that date as its parameter. Should return a Boolean\n */\n disabledDate: {\n type: Function,\n },\n /**\n * @description set custom className\n */\n cellClassName: {\n type: Function,\n },\n /**\n * @description an object array to set shortcut options\n */\n shortcuts: {\n type: Array,\n default: () => [],\n },\n /**\n * @description whether to pick time using arrow buttons\n */\n arrowControl: Boolean,\n /**\n * @description same as `aria-label` in native input\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description input tabindex\n */\n tabindex: {\n type: definePropType([String, Number]),\n default: 0,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description unlink two date-panels in range-picker\n */\n unlinkPanels: Boolean,\n} as const)\n\nexport type TimePickerDefaultProps = ExtractPropTypes<\n typeof timePickerDefaultProps\n>\n\nexport interface PickerOptions {\n isValidValue: (date: DayOrDays) => boolean\n handleKeydownInput: (event: KeyboardEvent) => void\n parseUserInput: (value: UserInput) => DayOrDays\n formatToString: (value: DayOrDays) => UserInput\n getRangeAvailableTime: (date: DayOrDays) => DayOrDays\n getDefaultValue: () => DayOrDays\n panelReady: boolean\n handleClear: () => void\n handleFocusPicker?: () => void\n}\n", "\n\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { timePanelSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const panelTimePickerProps = buildProps({\n ...timePanelSharedProps,\n datetimeRole: String,\n parsedValue: {\n type: definePropType(Object),\n },\n} as const)\n\nexport type PanelTimePickerProps = ExtractPropTypes\n", "import type { Dayjs } from 'dayjs'\n\nimport type {\n GetDisabledHoursState,\n GetDisabledMinutesState,\n GetDisabledSecondsState,\n} from '../types'\n\ntype UseTimePanelProps = {\n getAvailableHours: GetDisabledHoursState\n getAvailableMinutes: GetDisabledMinutesState\n getAvailableSeconds: GetDisabledSecondsState\n}\n\nexport const useTimePanel = ({\n getAvailableHours,\n getAvailableMinutes,\n getAvailableSeconds,\n}: UseTimePanelProps) => {\n const getAvailableTime = (\n date: Dayjs,\n role: string,\n first: boolean,\n compareDate?: Dayjs\n ) => {\n const availableTimeGetters = {\n hour: getAvailableHours,\n minute: getAvailableMinutes,\n second: getAvailableSeconds,\n } as const\n let result = date\n ;(['hour', 'minute', 'second'] as const).forEach((type) => {\n if (availableTimeGetters[type]) {\n let availableTimeSlots: number[]\n const method = availableTimeGetters[type]\n switch (type) {\n case 'minute': {\n availableTimeSlots = (method as typeof getAvailableMinutes)(\n result.hour(),\n role,\n compareDate\n )\n break\n }\n case 'second': {\n availableTimeSlots = (method as typeof getAvailableSeconds)(\n result.hour(),\n result.minute(),\n role,\n compareDate\n )\n break\n }\n default: {\n availableTimeSlots = (method as typeof getAvailableHours)(\n role,\n compareDate\n )\n break\n }\n }\n\n if (\n availableTimeSlots?.length &&\n !availableTimeSlots.includes(result[type]())\n ) {\n const pos = first ? 0 : availableTimeSlots.length - 1\n result = result[type](availableTimeSlots[pos]) as unknown as Dayjs\n }\n }\n })\n return result\n }\n\n const timePickerOptions: Record void> = {}\n\n const onSetOption = ([key, val]: [string, (...args: any[]) => void]) => {\n timePickerOptions[key] = val\n }\n\n return {\n timePickerOptions,\n\n getAvailableTime,\n onSetOption,\n }\n}\n", "import { ref, watch } from 'vue'\nimport { makeList } from '../utils'\n\nimport type { Dayjs } from 'dayjs'\nimport type {\n GetDisabledHoursState,\n GetDisabledMinutesState,\n GetDisabledSecondsState,\n} from '../types'\nimport type {\n GetDisabledHours,\n GetDisabledMinutes,\n GetDisabledSeconds,\n} from '../props/shared'\n\nconst makeAvailableArr = (disabledList: boolean[]): number[] => {\n const trueOrNumber = (isDisabled: boolean, index: number) =>\n isDisabled || index\n\n const getNumber = (predicate: number | true): predicate is number =>\n predicate !== true\n\n return disabledList.map(trueOrNumber).filter(getNumber)\n}\n\nexport const getTimeLists = (\n disabledHours?: GetDisabledHours,\n disabledMinutes?: GetDisabledMinutes,\n disabledSeconds?: GetDisabledSeconds\n) => {\n const getHoursList = (role: string, compare?: Dayjs) => {\n return makeList(24, disabledHours && (() => disabledHours?.(role, compare)))\n }\n\n const getMinutesList = (hour: number, role: string, compare?: Dayjs) => {\n return makeList(\n 60,\n disabledMinutes && (() => disabledMinutes?.(hour, role, compare))\n )\n }\n\n const getSecondsList = (\n hour: number,\n minute: number,\n role: string,\n compare?: Dayjs\n ) => {\n return makeList(\n 60,\n disabledSeconds && (() => disabledSeconds?.(hour, minute, role, compare))\n )\n }\n\n return {\n getHoursList,\n getMinutesList,\n getSecondsList,\n }\n}\n\nexport const buildAvailableTimeSlotGetter = (\n disabledHours: GetDisabledHours,\n disabledMinutes: GetDisabledMinutes,\n disabledSeconds: GetDisabledSeconds\n) => {\n const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(\n disabledHours,\n disabledMinutes,\n disabledSeconds\n )\n\n const getAvailableHours: GetDisabledHoursState = (role, compare?) => {\n return makeAvailableArr(getHoursList(role, compare))\n }\n\n const getAvailableMinutes: GetDisabledMinutesState = (\n hour,\n role,\n compare?\n ) => {\n return makeAvailableArr(getMinutesList(hour, role, compare))\n }\n\n const getAvailableSeconds: GetDisabledSecondsState = (\n hour,\n minute,\n role,\n compare?\n ) => {\n return makeAvailableArr(getSecondsList(hour, minute, role, compare))\n }\n\n return {\n getAvailableHours,\n getAvailableMinutes,\n getAvailableSeconds,\n }\n}\n\nexport const useOldValue = (props: {\n parsedValue?: string | Dayjs | Dayjs[]\n visible: boolean\n}) => {\n const oldValue = ref(props.parsedValue)\n\n watch(\n () => props.visible,\n (val) => {\n if (!val) {\n oldValue.value = props.parsedValue\n }\n }\n )\n\n return oldValue\n}\n", "import { isClient, isElement } from '@element-plus/utils'\n\nimport type {\n ComponentPublicInstance,\n DirectiveBinding,\n ObjectDirective,\n} from 'vue'\n\ntype DocumentHandler = (mouseup: T, mousedown: T) => void\ntype FlushList = Map<\n HTMLElement,\n {\n documentHandler: DocumentHandler\n bindingFn: (...args: unknown[]) => unknown\n }[]\n>\n\nconst nodeList: FlushList = new Map()\n\nlet startClick: MouseEvent\n\nif (isClient) {\n document.addEventListener('mousedown', (e: MouseEvent) => (startClick = e))\n document.addEventListener('mouseup', (e: MouseEvent) => {\n for (const handlers of nodeList.values()) {\n for (const { documentHandler } of handlers) {\n documentHandler(e as MouseEvent, startClick)\n }\n }\n })\n}\n\nfunction createDocumentHandler(\n el: HTMLElement,\n binding: DirectiveBinding\n): DocumentHandler {\n let excludes: HTMLElement[] = []\n if (Array.isArray(binding.arg)) {\n excludes = binding.arg\n } else if (isElement(binding.arg)) {\n // due to current implementation on binding type is wrong the type casting is necessary here\n excludes.push(binding.arg as unknown as HTMLElement)\n }\n return function (mouseup, mousedown) {\n const popperRef = (\n binding.instance as ComponentPublicInstance<{\n popperRef: HTMLElement\n }>\n ).popperRef\n const mouseUpTarget = mouseup.target as Node\n const mouseDownTarget = mousedown?.target as Node\n const isBound = !binding || !binding.instance\n const isTargetExists = !mouseUpTarget || !mouseDownTarget\n const isContainedByEl =\n el.contains(mouseUpTarget) || el.contains(mouseDownTarget)\n const isSelf = el === mouseUpTarget\n\n const isTargetExcluded =\n (excludes.length &&\n excludes.some((item) => item?.contains(mouseUpTarget))) ||\n (excludes.length && excludes.includes(mouseDownTarget as HTMLElement))\n const isContainedByPopper =\n popperRef &&\n (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget))\n if (\n isBound ||\n isTargetExists ||\n isContainedByEl ||\n isSelf ||\n isTargetExcluded ||\n isContainedByPopper\n ) {\n return\n }\n binding.value(mouseup, mousedown)\n }\n}\n\nconst ClickOutside: ObjectDirective = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n // there could be multiple handlers on the element\n if (!nodeList.has(el)) {\n nodeList.set(el, [])\n }\n\n nodeList.get(el)!.push({\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value,\n })\n },\n updated(el: HTMLElement, binding: DirectiveBinding) {\n if (!nodeList.has(el)) {\n nodeList.set(el, [])\n }\n\n const handlers = nodeList.get(el)!\n const oldHandlerIndex = handlers.findIndex(\n (item) => item.bindingFn === binding.oldValue\n )\n const newHandler = {\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value,\n }\n\n if (oldHandlerIndex >= 0) {\n // replace the old handler to the new handler\n handlers.splice(oldHandlerIndex, 1, newHandler)\n } else {\n handlers.push(newHandler)\n }\n },\n unmounted(el: HTMLElement) {\n // remove all listeners when a component unmounted\n nodeList.delete(el)\n },\n}\n\nexport default ClickOutside\n", "import { isFunction } from '@element-plus/utils'\n\nimport type { ObjectDirective } from 'vue'\n\nexport const REPEAT_INTERVAL = 100\nexport const REPEAT_DELAY = 600\n\nexport interface RepeatClickOptions {\n interval?: number\n delay?: number\n handler: (...args: unknown[]) => unknown\n}\n\nexport const vRepeatClick: ObjectDirective<\n HTMLElement,\n RepeatClickOptions | RepeatClickOptions['handler']\n> = {\n beforeMount(el, binding) {\n const value = binding.value\n const { interval = REPEAT_INTERVAL, delay = REPEAT_DELAY } = isFunction(\n value\n )\n ? {}\n : value\n\n let intervalId: ReturnType | undefined\n let delayId: ReturnType | undefined\n\n const handler = () => (isFunction(value) ? value() : value.handler())\n\n const clear = () => {\n if (delayId) {\n clearTimeout(delayId)\n delayId = undefined\n }\n if (intervalId) {\n clearInterval(intervalId)\n intervalId = undefined\n }\n }\n\n el.addEventListener('mousedown', (evt: MouseEvent) => {\n if (evt.button !== 0) return\n clear()\n handler()\n\n document.addEventListener('mouseup', () => clear(), {\n once: true,\n })\n\n delayId = setTimeout(() => {\n intervalId = setInterval(() => {\n handler()\n }, interval)\n }, delay)\n })\n },\n}\n", "import { nextTick } from 'vue'\nimport { obtainAllFocusableElements } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport type { ObjectDirective } from 'vue'\n\nexport const FOCUSABLE_CHILDREN = '_trap-focus-children'\nexport const TRAP_FOCUS_HANDLER = '_trap-focus-handler'\n\nexport interface TrapFocusElement extends HTMLElement {\n [FOCUSABLE_CHILDREN]: HTMLElement[]\n [TRAP_FOCUS_HANDLER]: (e: KeyboardEvent) => void\n}\n\nconst FOCUS_STACK: TrapFocusElement[] = []\n\nconst FOCUS_HANDLER = (e: KeyboardEvent) => {\n // Getting the top layer.\n if (FOCUS_STACK.length === 0) return\n const focusableElement =\n FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN]\n if (focusableElement.length > 0 && e.code === EVENT_CODE.tab) {\n if (focusableElement.length === 1) {\n e.preventDefault()\n if (document.activeElement !== focusableElement[0]) {\n focusableElement[0].focus()\n }\n return\n }\n const goingBackward = e.shiftKey\n const isFirst = e.target === focusableElement[0]\n const isLast = e.target === focusableElement[focusableElement.length - 1]\n if (isFirst && goingBackward) {\n e.preventDefault()\n focusableElement[focusableElement.length - 1].focus()\n }\n if (isLast && !goingBackward) {\n e.preventDefault()\n focusableElement[0].focus()\n }\n\n // the is critical since jsdom did not implement user actions, you can only mock it\n // DELETE ME: when testing env switches to puppeteer\n if (process.env.NODE_ENV === 'test') {\n const index = focusableElement.indexOf(e.target as HTMLElement)\n if (index !== -1) {\n focusableElement[goingBackward ? index - 1 : index + 1]?.focus()\n }\n }\n }\n}\n\nconst TrapFocus: ObjectDirective = {\n beforeMount(el: TrapFocusElement) {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el)\n FOCUS_STACK.push(el)\n if (FOCUS_STACK.length <= 1) {\n document.addEventListener('keydown', FOCUS_HANDLER)\n }\n },\n updated(el: TrapFocusElement) {\n nextTick(() => {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el)\n })\n },\n unmounted() {\n FOCUS_STACK.shift()\n if (FOCUS_STACK.length === 0) {\n document.removeEventListener('keydown', FOCUS_HANDLER)\n }\n },\n}\n\nexport default TrapFocus\n", "/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @providesModule UserAgent_DEPRECATED\n */\n\n/**\n * Provides entirely client-side User Agent and OS detection. You should prefer\n * the non-deprecated UserAgent module when possible, which exposes our\n * authoritative server-side PHP-based detection to the client.\n *\n * Usage is straightforward:\n *\n * if (UserAgent_DEPRECATED.ie()) {\n * // IE\n * }\n *\n * You can also do version checks:\n *\n * if (UserAgent_DEPRECATED.ie() >= 7) {\n * // IE7 or better\n * }\n *\n * The browser functions will return NaN if the browser does not match, so\n * you can also do version compares the other way:\n *\n * if (UserAgent_DEPRECATED.ie() < 7) {\n * // IE6 or worse\n * }\n *\n * Note that the version is a float and may include a minor version number,\n * so you should always use range operators to perform comparisons, not\n * strict equality.\n *\n * **Note:** You should **strongly** prefer capability detection to browser\n * version detection where it's reasonable:\n *\n * http://www.quirksmode.org/js/support.html\n *\n * Further, we have a large number of mature wrapper functions and classes\n * which abstract away many browser irregularities. Check the documentation,\n * grep for things, or ask on javascript@lists.facebook.com before writing yet\n * another copy of \"event || window.event\".\n *\n */\n\nvar _populated = false;\n\n// Browsers\nvar _ie, _firefox, _opera, _webkit, _chrome;\n\n// Actual IE browser for compatibility mode\nvar _ie_real_version;\n\n// Platforms\nvar _osx, _windows, _linux, _android;\n\n// Architectures\nvar _win64;\n\n// Devices\nvar _iphone, _ipad, _native;\n\nvar _mobile;\n\nfunction _populate() {\n if (_populated) {\n return;\n }\n\n _populated = true;\n\n // To work around buggy JS libraries that can't handle multi-digit\n // version numbers, Opera 10's user agent string claims it's Opera\n // 9, then later includes a Version/X.Y field:\n //\n // Opera/9.80 (foo) Presto/2.2.15 Version/10.10\n var uas = navigator.userAgent;\n var agent =\n /(?:MSIE.(\\d+\\.\\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\\d+\\.\\d+))|(?:Opera(?:.+Version.|.)(\\d+\\.\\d+))|(?:AppleWebKit.(\\d+(?:\\.\\d+)?))|(?:Trident\\/\\d+\\.\\d+.*rv:(\\d+\\.\\d+))/.exec(\n uas\n );\n var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);\n\n _iphone = /\\b(iPhone|iP[ao]d)/.exec(uas);\n _ipad = /\\b(iP[ao]d)/.exec(uas);\n _android = /Android/i.exec(uas);\n _native = /FBAN\\/\\w+;/i.exec(uas);\n _mobile = /Mobile/i.exec(uas);\n\n // Note that the IE team blog would have you believe you should be checking\n // for 'Win64; x64'. But MSDN then reveals that you can actually be coming\n // from either x64 or ia64; so ultimately, you should just check for Win64\n // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit\n // Windows will send 'WOW64' instead.\n _win64 = !!/Win64/.exec(uas);\n\n if (agent) {\n _ie = agent[1]\n ? parseFloat(agent[1])\n : agent[5]\n ? parseFloat(agent[5])\n : NaN;\n // IE compatibility mode\n if (_ie && document && document.documentMode) {\n _ie = document.documentMode;\n }\n // grab the \"true\" ie version from the trident token if available\n var trident = /(?:Trident\\/(\\d+.\\d+))/.exec(uas);\n _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;\n\n _firefox = agent[2] ? parseFloat(agent[2]) : NaN;\n _opera = agent[3] ? parseFloat(agent[3]) : NaN;\n _webkit = agent[4] ? parseFloat(agent[4]) : NaN;\n if (_webkit) {\n // We do not add the regexp to the above test, because it will always\n // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in\n // the userAgent string.\n agent = /(?:Chrome\\/(\\d+\\.\\d+))/.exec(uas);\n _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;\n } else {\n _chrome = NaN;\n }\n } else {\n _ie = _firefox = _opera = _chrome = _webkit = NaN;\n }\n\n if (os) {\n if (os[1]) {\n // Detect OS X version. If no version number matches, set _osx to true.\n // Version examples: 10, 10_6_1, 10.7\n // Parses version number as a float, taking only first two sets of\n // digits. If only one set of digits is found, returns just the major\n // version number.\n var ver = /(?:Mac OS X (\\d+(?:[._]\\d+)?))/.exec(uas);\n\n _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;\n } else {\n _osx = false;\n }\n _windows = !!os[2];\n _linux = !!os[3];\n } else {\n _osx = _windows = _linux = false;\n }\n}\n\nvar UserAgent_DEPRECATED = {\n /**\n * Check if the UA is Internet Explorer.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n ie: function () {\n return _populate() || _ie;\n },\n\n /**\n * Check if we're in Internet Explorer compatibility mode.\n *\n * @return bool true if in compatibility mode, false if\n * not compatibility mode or not ie\n */\n ieCompatibilityMode: function () {\n return _populate() || _ie_real_version > _ie;\n },\n\n /**\n * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we\n * only need this because Skype can't handle 64-bit IE yet. We need to remove\n * this when we don't need it -- tracked by #601957.\n */\n ie64: function () {\n return UserAgent_DEPRECATED.ie() && _win64;\n },\n\n /**\n * Check if the UA is Firefox.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n firefox: function () {\n return _populate() || _firefox;\n },\n\n /**\n * Check if the UA is Opera.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n opera: function () {\n return _populate() || _opera;\n },\n\n /**\n * Check if the UA is WebKit.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n webkit: function () {\n return _populate() || _webkit;\n },\n\n /**\n * For Push\n * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit\n */\n safari: function () {\n return UserAgent_DEPRECATED.webkit();\n },\n\n /**\n * Check if the UA is a Chrome browser.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n chrome: function () {\n return _populate() || _chrome;\n },\n\n /**\n * Check if the user is running Windows.\n *\n * @return bool `true' if the user's OS is Windows.\n */\n windows: function () {\n return _populate() || _windows;\n },\n\n /**\n * Check if the user is running Mac OS X.\n *\n * @return float|bool Returns a float if a version number is detected,\n * otherwise true/false.\n */\n osx: function () {\n return _populate() || _osx;\n },\n\n /**\n * Check if the user is running Linux.\n *\n * @return bool `true' if the user's OS is some flavor of Linux.\n */\n linux: function () {\n return _populate() || _linux;\n },\n\n /**\n * Check if the user is running on an iPhone or iPod platform.\n *\n * @return bool `true' if the user is running some flavor of the\n * iPhone OS.\n */\n iphone: function () {\n return _populate() || _iphone;\n },\n\n mobile: function () {\n return _populate() || _iphone || _ipad || _android || _mobile;\n },\n\n nativeApp: function () {\n // webviews inside of the native apps\n return _populate() || _native;\n },\n\n android: function () {\n return _populate() || _android;\n },\n\n ipad: function () {\n return _populate() || _ipad;\n },\n};\n\nexport default UserAgent_DEPRECATED;\n", "/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ExecutionEnvironment\n */\n\n/*jslint evil: true */\n\nvar canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners:\n canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM, // For now, this is true - might change in the future.\n};\n\nexport default ExecutionEnvironment;\n", "/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\nimport ExecutionEnvironment from './ExecutionEnvironment';\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature =\n document.implementation &&\n document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (\n !ExecutionEnvironment.canUseDOM ||\n (capture && !('addEventListener' in document))\n ) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nexport default isEventSupported;\n", "/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule normalizeWheel\n * @typechecks\n */\n\nimport UserAgent_DEPRECATED from './UserAgent_DEPRECATED';\n\nimport isEventSupported from './isEventSupported';\n\n// Reasonable defaults\nvar PIXEL_STEP = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\n\n/**\n * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n * 'wheel' -- Chrome(31+), FF(17+), IE(9+)\n * 'mousewheel' -- Chrome, IE(6+), Opera, Safari\n * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!\n * 'DOMMouseScroll' -- FF(0.9.7+) since 2003\n *\n * So what to do? The is the best:\n *\n * normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas. This code will return an object with properties:\n *\n * spinX -- normalized spin speed (use for zoom) - x plane\n * spinY -- \" - y plane\n * pixelX -- normalized distance (to pixels) - x plane\n * pixelY -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages). Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds. Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n * - spin is trying to normalize how far the wheel was spun (or trackpad\n * dragged). This is super useful for zoom support where you want to\n * throw away the chunky scroll steps on the PC and make those equal to\n * the slow and smooth tiny steps on the Mac. Key data: This code tries to\n * resolve a single slow step on a wheel to 1.\n *\n * - pixel is normalizing the desired scroll delta in pixel units. You'll\n * get the crazy differences between browsers, but at least it'll be in\n * pixels!\n *\n * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This\n * should translate to positive value zooming IN, negative zooming OUT.\n * This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n * with a mouse. It results in side-scrolling in the browser by default.\n *\n * - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and\n * probably is by browsers in conjunction with fancy 3D controllers .. but\n * you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)\n * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)\n * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)\n * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)\n * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)\n *\n * On the trackpad:\n *\n * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)\n * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain\n * backward compatibility with older events. Those other values help us\n * better normalize spin speed. Example of what the browsers provide:\n *\n * | event.wheelDelta | event.detail\n * ------------------+------------------+--------------\n * Safari v5/OS X | -120 | 0\n * Safari v5/Win7 | -120 | 0\n * Chrome v17/OS X | -120 | 0\n * Chrome v17/Win7 | -120 | 0\n * IE9/Win7 | -120 | undefined\n * Firefox v4/OS X | undefined | 1\n * Firefox v4/Win7 | undefined | 3\n *\n */\nfunction normalizeWheel(/*object*/ event) /*object*/ {\n var sX = 0,\n sY = 0, // spinX, spinY\n pX = 0,\n pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) {\n sY = event.detail;\n }\n if ('wheelDelta' in event) {\n sY = -event.wheelDelta / 120;\n }\n if ('wheelDeltaY' in event) {\n sY = -event.wheelDeltaY / 120;\n }\n if ('wheelDeltaX' in event) {\n sX = -event.wheelDeltaX / 120;\n }\n\n // side scrolling on FF with DOMMouseScroll\n if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) {\n pY = event.deltaY;\n }\n if ('deltaX' in event) {\n pX = event.deltaX;\n }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return { spinX: sX, spinY: sY, pixelX: pX, pixelY: pY };\n}\n\n/**\n * The best combination if you prefer spinX + spinY normalization. It favors\n * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with\n * 'wheel' event, making spin speed determination impossible.\n */\nnormalizeWheel.getEventType = function () /*string*/ {\n return UserAgent_DEPRECATED.firefox()\n ? 'DOMMouseScroll'\n : isEventSupported('wheel')\n ? 'wheel'\n : 'mousewheel';\n};\n\nexport default normalizeWheel;\n", "import normalizeWheel from 'normalize-wheel-es'\n\nimport type { DirectiveBinding, ObjectDirective } from 'vue'\nimport type { NormalizedWheelEvent } from 'normalize-wheel-es'\n\nconst mousewheel = function (\n element: HTMLElement,\n callback: (e: WheelEvent, normalized: NormalizedWheelEvent) => void\n) {\n if (element && element.addEventListener) {\n const fn = function (this: HTMLElement, event: WheelEvent) {\n const normalized = normalizeWheel(event)\n callback && Reflect.apply(callback, this, [event, normalized])\n }\n element.addEventListener('wheel', fn, { passive: true })\n }\n}\n\nconst Mousewheel: ObjectDirective = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n mousewheel(el, binding.value)\n },\n}\n\nexport default Mousewheel\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { disabledTimeListsProps } from '../props/shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const basicTimeSpinnerProps = buildProps({\n role: {\n type: String,\n required: true,\n },\n spinnerDate: {\n type: definePropType(Object),\n required: true,\n },\n showSeconds: {\n type: Boolean,\n default: true,\n },\n arrowControl: Boolean,\n amPmMode: {\n // 'a': am/pm; 'A': AM/PM\n type: definePropType<'a' | 'A' | ''>(String),\n default: '',\n },\n ...disabledTimeListsProps,\n} as const)\n\nexport type BasicTimeSpinnerProps = ExtractPropTypes<\n typeof basicTimeSpinnerProps\n>\n", "\n\n", "\n\n\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { timePanelSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const panelTimeRangeProps = buildProps({\n ...timePanelSharedProps,\n parsedValue: {\n type: definePropType<[Dayjs, Dayjs]>(Array),\n },\n} as const)\n\nexport type PanelTimeRangeProps = ExtractPropTypes\n", "\n\n\n", "import { defineComponent, provide, ref } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport { DEFAULT_FORMATS_TIME } from './constants'\nimport Picker from './common/picker.vue'\nimport TimePickPanel from './time-picker-com/panel-time-pick.vue'\nimport TimeRangePanel from './time-picker-com/panel-time-range.vue'\nimport { timePickerDefaultProps } from './common/props'\ndayjs.extend(customParseFormat)\n\nexport default defineComponent({\n name: 'ElTimePicker',\n install: null,\n props: {\n ...timePickerDefaultProps,\n /**\n * @description whether to pick a time range\n */\n isRange: {\n type: Boolean,\n default: false,\n },\n },\n emits: ['update:modelValue'],\n setup(props, ctx) {\n const commonPicker = ref>()\n const [type, Panel] = props.isRange\n ? ['timerange', TimeRangePanel]\n : ['time', TimePickPanel]\n\n const modelUpdater = (value: any) => ctx.emit('update:modelValue', value)\n provide('ElPopperOptions', props.popperOptions)\n ctx.expose({\n /**\n * @description focus the Input component\n */\n focus: (e: FocusEvent | undefined) => {\n commonPicker.value?.handleFocusInput(e)\n },\n /**\n * @description blur the Input component\n */\n blur: (e: FocusEvent | undefined) => {\n commonPicker.value?.handleBlurInput(e)\n },\n /**\n * @description open the TimePicker popper\n */\n handleOpen: () => {\n commonPicker.value?.handleOpen()\n },\n /**\n * @description close the TimePicker popper\n */\n handleClose: () => {\n commonPicker.value?.handleClose()\n },\n })\n\n return () => {\n const format = props.format ?? DEFAULT_FORMATS_TIME\n\n return (\n \n {{\n default: (props: any) => ,\n }}\n \n )\n }\n },\n})\n", "import TimePicker from './src/time-picker'\nimport CommonPicker from './src/common/picker.vue'\nimport TimePickPanel from './src/time-picker-com/panel-time-pick.vue'\n\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport * from './src/utils'\nexport * from './src/constants'\nexport * from './src/common/props'\n\nconst _TimePicker = TimePicker as SFCWithInstall\n\n_TimePicker.install = (app: App) => {\n app.component(_TimePicker.name, _TimePicker)\n}\n\nexport { CommonPicker, TimePickPanel }\nexport default _TimePicker\nexport const ElTimePicker = _TimePicker\n", "import { buildProps, definePropType, isObject } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport type CalendarDateCellType = 'next' | 'prev' | 'current'\nexport type CalendarDateCell = {\n text: number\n type: CalendarDateCellType\n}\n\nexport const getPrevMonthLastDays = (date: Dayjs, count: number) => {\n const lastDay = date.subtract(1, 'month').endOf('month').date()\n return rangeArr(count).map((_, index) => lastDay - (count - index - 1))\n}\n\nexport const getMonthDays = (date: Dayjs) => {\n const days = date.daysInMonth()\n return rangeArr(days).map((_, index) => index + 1)\n}\n\nexport const toNestedArr = (days: CalendarDateCell[]) =>\n rangeArr(days.length / 7).map((index) => {\n const start = index * 7\n return days.slice(start, start + 7)\n })\n\nexport const dateTableProps = buildProps({\n selectedDay: {\n type: definePropType(Object),\n },\n range: {\n type: definePropType<[Dayjs, Dayjs]>(Array),\n },\n date: {\n type: definePropType(Object),\n required: true,\n },\n hideHeader: {\n type: Boolean,\n },\n} as const)\nexport type DateTableProps = ExtractPropTypes\n\nexport const dateTableEmits = {\n pick: (value: Dayjs) => isObject(value),\n}\nexport type DateTableEmits = typeof dateTableEmits\n", "import { computed } from 'vue'\nimport dayjs from 'dayjs'\nimport localeData from 'dayjs/plugin/localeData.js'\nimport { useLocale } from '@element-plus/hooks'\nimport { rangeArr } from '@element-plus/components/time-picker'\nimport { WEEK_DAYS } from '@element-plus/constants'\nimport { getMonthDays, getPrevMonthLastDays, toNestedArr } from './date-table'\n\nimport type { SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type {\n CalendarDateCell,\n CalendarDateCellType,\n DateTableEmits,\n DateTableProps,\n} from './date-table'\n\nexport const useDateTable = (\n props: DateTableProps,\n emit: SetupContext['emit']\n) => {\n dayjs.extend(localeData)\n // https://day.js.org/docs/en/i18n/locale-data\n const firstDayOfWeek: number = dayjs.localeData().firstDayOfWeek()\n\n const { t, lang } = useLocale()\n const now = dayjs().locale(lang.value)\n\n const isInRange = computed(() => !!props.range && !!props.range.length)\n\n const rows = computed(() => {\n let days: CalendarDateCell[] = []\n if (isInRange.value) {\n const [start, end] = props.range!\n const currentMonthRange: CalendarDateCell[] = rangeArr(\n end.date() - start.date() + 1\n ).map((index) => ({\n text: start.date() + index,\n type: 'current',\n }))\n\n let remaining = currentMonthRange.length % 7\n remaining = remaining === 0 ? 0 : 7 - remaining\n const nextMonthRange: CalendarDateCell[] = rangeArr(remaining).map(\n (_, index) => ({\n text: index + 1,\n type: 'next',\n })\n )\n days = currentMonthRange.concat(nextMonthRange)\n } else {\n const firstDay = props.date.startOf('month').day()\n const prevMonthDays: CalendarDateCell[] = getPrevMonthLastDays(\n props.date,\n (firstDay - firstDayOfWeek + 7) % 7\n ).map((day) => ({\n text: day,\n type: 'prev',\n }))\n const currentMonthDays: CalendarDateCell[] = getMonthDays(props.date).map(\n (day) => ({\n text: day,\n type: 'current',\n })\n )\n days = [...prevMonthDays, ...currentMonthDays]\n const remaining = 7 - (days.length % 7 || 7)\n const nextMonthDays: CalendarDateCell[] = rangeArr(remaining).map(\n (_, index) => ({\n text: index + 1,\n type: 'next',\n })\n )\n days = days.concat(nextMonthDays)\n }\n return toNestedArr(days)\n })\n\n const weekDays = computed(() => {\n const start = firstDayOfWeek\n if (start === 0) {\n return WEEK_DAYS.map((_) => t(`el.datepicker.weeks.${_}`))\n } else {\n return WEEK_DAYS.slice(start)\n .concat(WEEK_DAYS.slice(0, start))\n .map((_) => t(`el.datepicker.weeks.${_}`))\n }\n })\n\n const getFormattedDate = (day: number, type: CalendarDateCellType): Dayjs => {\n switch (type) {\n case 'prev':\n return props.date.startOf('month').subtract(1, 'month').date(day)\n case 'next':\n return props.date.startOf('month').add(1, 'month').date(day)\n case 'current':\n return props.date.date(day)\n }\n }\n\n const handlePickDay = ({ text, type }: CalendarDateCell) => {\n const date = getFormattedDate(text, type)\n emit('pick', date)\n }\n\n const getSlotData = ({ text, type }: CalendarDateCell) => {\n const day = getFormattedDate(text, type)\n return {\n isSelected: day.isSame(props.selectedDay),\n type: `${type}-month`,\n day: day.format('YYYY-MM-DD'),\n date: day.toDate(),\n }\n }\n\n return {\n now,\n isInRange,\n rows,\n weekDays,\n getFormattedDate,\n handlePickDay,\n getSlotData,\n }\n}\n", "\n\n\n", "import { computed, ref, useSlots } from 'vue'\nimport dayjs from 'dayjs'\nimport { useDeprecated, useLocale } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { CalendarDateType, CalendarEmits, CalendarProps } from './calendar'\n\nconst adjacentMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the first month and the first day of the last month is in the same week\n const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, 'week')\n const lastMonthStartDay = isSameWeek\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nconst threeConsecutiveMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const secondMonthFirstDay = start.add(1, 'month').startOf('month')\n\n // Whether the last day of the first month and the second month is in the same week\n const secondMonthStartDay = firstMonthLastDay.isSame(\n secondMonthFirstDay,\n 'week'\n )\n ? secondMonthFirstDay.add(1, 'week')\n : secondMonthFirstDay\n\n const secondMonthLastDay = secondMonthStartDay.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the second month and the last day of the last month is in the same week\n const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, 'week')\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [secondMonthStartDay.startOf('week'), secondMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nexport const useCalendar = (\n props: CalendarProps,\n emit: SetupContext['emit'],\n componentName: string\n) => {\n const slots = useSlots()\n const { lang } = useLocale()\n\n const selectedDay = ref()\n const now = dayjs().locale(lang.value)\n\n const realSelectedDay = computed({\n get() {\n if (!props.modelValue) return selectedDay.value\n return date.value\n },\n set(val) {\n if (!val) return\n selectedDay.value = val\n const result = val.toDate()\n\n emit(INPUT_EVENT, result)\n emit(UPDATE_MODEL_EVENT, result)\n },\n })\n\n // if range is valid, we get a two-digit array\n const validatedRange = computed(() => {\n if (!props.range) return []\n const rangeArrDayjs = props.range.map((_) => dayjs(_).locale(lang.value))\n const [startDayjs, endDayjs] = rangeArrDayjs\n if (startDayjs.isAfter(endDayjs)) {\n debugWarn(componentName, 'end time should be greater than start time')\n return []\n }\n if (startDayjs.isSame(endDayjs, 'month')) {\n // same month\n return calculateValidatedDateRange(startDayjs, endDayjs)\n } else {\n // two months\n if (startDayjs.add(1, 'month').month() !== endDayjs.month()) {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n return calculateValidatedDateRange(startDayjs, endDayjs)\n }\n })\n\n const date: ComputedRef = computed(() => {\n if (!props.modelValue) {\n return (\n realSelectedDay.value ||\n (validatedRange.value.length ? validatedRange.value[0][0] : now)\n )\n } else {\n return dayjs(props.modelValue).locale(lang.value)\n }\n })\n const prevMonthDayjs = computed(() => date.value.subtract(1, 'month').date(1))\n const nextMonthDayjs = computed(() => date.value.add(1, 'month').date(1))\n const prevYearDayjs = computed(() => date.value.subtract(1, 'year').date(1))\n const nextYearDayjs = computed(() => date.value.add(1, 'year').date(1))\n\n // https://github.com/element-plus/element-plus/issues/3155\n // Calculate the validate date range according to the start and end dates\n const calculateValidatedDateRange = (\n startDayjs: Dayjs,\n endDayjs: Dayjs\n ): [Dayjs, Dayjs][] => {\n const firstDay = startDayjs.startOf('week')\n const lastDay = endDayjs.endOf('week')\n const firstMonth = firstDay.get('month')\n const lastMonth = lastDay.get('month')\n\n // Current mouth\n if (firstMonth === lastMonth) {\n return [[firstDay, lastDay]]\n }\n // Two adjacent months\n else if ((firstMonth + 1) % 12 === lastMonth) {\n return adjacentMonth(firstDay, lastDay)\n }\n // Three consecutive months (compatible: 2021-01-30 to 2021-02-28)\n else if (\n firstMonth + 2 === lastMonth ||\n (firstMonth + 1) % 11 === lastMonth\n ) {\n return threeConsecutiveMonth(firstDay, lastDay)\n }\n // Other cases\n else {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n }\n\n const pickDay = (day: Dayjs) => {\n realSelectedDay.value = day\n }\n\n const selectDate = (type: CalendarDateType) => {\n const dateMap: Record = {\n 'prev-month': prevMonthDayjs.value,\n 'next-month': nextMonthDayjs.value,\n 'prev-year': prevYearDayjs.value,\n 'next-year': nextYearDayjs.value,\n today: now,\n }\n\n const day = dateMap[type]\n\n if (!day.isSame(date.value, 'day')) {\n pickDay(day)\n }\n }\n\n useDeprecated(\n {\n from: '\"dateCell\"',\n replacement: '\"date-cell\"',\n scope: 'ElCalendar',\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/calendar.html#slots',\n type: 'Slot',\n },\n computed(() => !!slots.dateCell)\n )\n\n return {\n calculateValidatedDateRange,\n date,\n realSelectedDay,\n pickDay,\n selectDate,\n validatedRange,\n }\n}\n", "import {\n buildProps,\n definePropType,\n isArray,\n isDate,\n} from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type CalendarDateType =\n | 'prev-month'\n | 'next-month'\n | 'prev-year'\n | 'next-year'\n | 'today'\n\nconst isValidRange = (range: unknown): range is [Date, Date] =>\n isArray(range) && range.length === 2 && range.every((item) => isDate(item))\n\nexport const calendarProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: Date,\n },\n /**\n * @description time range, including start time and end time.\n * Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months.\n */\n range: {\n type: definePropType<[Date, Date]>(Array),\n validator: isValidRange,\n },\n} as const)\nexport type CalendarProps = ExtractPropTypes\n\nexport const calendarEmits = {\n [UPDATE_MODEL_EVENT]: (value: Date) => isDate(value),\n [INPUT_EVENT]: (value: Date) => isDate(value),\n}\nexport type CalendarEmits = typeof calendarEmits\n", "\n \n \n
\n \n \n \n \n \n \n
\n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Calendar from './src/calendar.vue'\n\nexport const ElCalendar = withInstall(Calendar)\nexport default ElCalendar\n\nexport * from './src/calendar'\nexport type {\n CalendarDateTableInstance,\n DateTableInstance,\n CalendarInstance,\n} from './src/instance'\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport const cardProps = buildProps({\n /**\n * @description title of the card. Also accepts a DOM passed by `slot#header`\n */\n header: {\n type: String,\n default: '',\n },\n footer: {\n type: String,\n default: '',\n },\n /**\n * @description CSS style of card body\n */\n bodyStyle: {\n type: definePropType([String, Object, Array]),\n default: '',\n },\n /**\n * @description custom class name of card body\n */\n bodyClass: String,\n /**\n * @description when to show card shadows\n */\n shadow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'always',\n },\n} as const)\nexport type CardProps = ExtractPropTypes\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Card from './src/card.vue'\n\nexport const ElCard = withInstall(Card)\nexport default ElCard\n\nexport * from './src/card'\nexport type { CardInstance } from './src/instance'\n", "import { buildProps, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n initialIndex: {\n type: Number,\n default: 0,\n },\n height: {\n type: String,\n default: '',\n },\n trigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n autoplay: {\n type: Boolean,\n default: true,\n },\n interval: {\n type: Number,\n default: 3000,\n },\n indicatorPosition: {\n type: String,\n values: ['', 'none', 'outside'],\n default: '',\n },\n arrow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'hover',\n },\n type: {\n type: String,\n values: ['', 'card'],\n default: '',\n },\n loop: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n pauseOnHover: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport const carouselEmits = {\n change: (current: number, prev: number) => [current, prev].every(isNumber),\n}\n\nexport type CarouselProps = ExtractPropTypes\nexport type CarouselEmits = typeof carouselEmits\n", "import type { InjectionKey, Ref } from 'vue'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport type CarouselItemStates = {\n hover: boolean\n translate: number\n scale: number\n active: boolean\n ready: boolean\n inStage: boolean\n animating: boolean\n}\n\nexport type CarouselItemContext = {\n props: CarouselItemProps\n states: CarouselItemStates\n uid: number\n translateItem: (index: number, activeIndex: number, oldIndex?: number) => void\n}\n\nexport type CarouselContext = {\n root: Ref\n items: Ref\n isCardType: Ref\n isVertical: Ref\n loop: boolean\n addItem: (item: CarouselItemContext) => void\n removeItem: (uid: number) => void\n setActiveItem: (index: number) => void\n setContainerHeight: (height: number) => void\n}\n\nexport const carouselContextKey: InjectionKey =\n Symbol('carouselContextKey')\n", "import {\n computed,\n getCurrentInstance,\n isVNode,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n unref,\n useSlots,\n watch,\n} from 'vue'\nimport { throttle } from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport { debugWarn, flattedChildren, isString } from '@element-plus/utils'\nimport { useOrderedChildren } from '@element-plus/hooks'\nimport { carouselContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { CarouselItemContext } from './constants'\nimport type { CarouselEmits, CarouselProps } from './carousel'\n\nconst THROTTLE_TIME = 300\n\nexport const useCarousel = (\n props: CarouselProps,\n emit: SetupContext['emit'],\n componentName: string\n) => {\n const {\n children: items,\n addChild: addItem,\n removeChild: removeItem,\n } = useOrderedChildren(\n getCurrentInstance()!,\n 'ElCarouselItem'\n )\n\n const slots = useSlots()\n\n // refs\n const activeIndex = ref(-1)\n const timer = ref | null>(null)\n const hover = ref(false)\n const root = ref()\n const containerHeight = ref(0)\n const isItemsTwoLength = ref(true)\n\n // computed\n const arrowDisplay = computed(\n () => props.arrow !== 'never' && !unref(isVertical)\n )\n\n const hasLabel = computed(() => {\n return items.value.some((item) => item.props.label.toString().length > 0)\n })\n\n const isCardType = computed(() => props.type === 'card')\n const isVertical = computed(() => props.direction === 'vertical')\n\n const containerStyle = computed(() => {\n if (props.height !== 'auto') {\n return {\n height: props.height,\n }\n }\n return {\n height: `${containerHeight.value}px`,\n overflow: 'hidden',\n }\n })\n\n // methods\n const throttledArrowClick = throttle(\n (index: number) => {\n setActiveItem(index)\n },\n THROTTLE_TIME,\n { trailing: true }\n )\n\n const throttledIndicatorHover = throttle((index: number) => {\n handleIndicatorHover(index)\n }, THROTTLE_TIME)\n\n const isTwoLengthShow = (index: number) => {\n if (!isItemsTwoLength.value) return true\n return activeIndex.value <= 1 ? index <= 1 : index > 1\n }\n\n function pauseTimer() {\n if (timer.value) {\n clearInterval(timer.value)\n timer.value = null\n }\n }\n\n function startTimer() {\n if (props.interval <= 0 || !props.autoplay || timer.value) return\n timer.value = setInterval(() => playSlides(), props.interval)\n }\n\n const playSlides = () => {\n if (activeIndex.value < items.value.length - 1) {\n activeIndex.value = activeIndex.value + 1\n } else if (props.loop) {\n activeIndex.value = 0\n }\n }\n\n function setActiveItem(index: number | string) {\n if (isString(index)) {\n const filteredItems = items.value.filter(\n (item) => item.props.name === index\n )\n if (filteredItems.length > 0) {\n index = items.value.indexOf(filteredItems[0])\n }\n }\n index = Number(index)\n if (Number.isNaN(index) || index !== Math.floor(index)) {\n debugWarn(componentName, 'index must be integer.')\n return\n }\n const itemCount = items.value.length\n const oldIndex = activeIndex.value\n if (index < 0) {\n activeIndex.value = props.loop ? itemCount - 1 : 0\n } else if (index >= itemCount) {\n activeIndex.value = props.loop ? 0 : itemCount - 1\n } else {\n activeIndex.value = index\n }\n if (oldIndex === activeIndex.value) {\n resetItemPosition(oldIndex)\n }\n resetTimer()\n }\n\n function resetItemPosition(oldIndex?: number) {\n items.value.forEach((item, index) => {\n item.translateItem(index, activeIndex.value, oldIndex)\n })\n }\n\n function itemInStage(item: CarouselItemContext, index: number) {\n const _items = unref(items)\n const itemCount = _items.length\n if (itemCount === 0 || !item.states.inStage) return false\n const nextItemIndex = index + 1\n const prevItemIndex = index - 1\n const lastItemIndex = itemCount - 1\n const isLastItemActive = _items[lastItemIndex].states.active\n const isFirstItemActive = _items[0].states.active\n const isNextItemActive = _items[nextItemIndex]?.states?.active\n const isPrevItemActive = _items[prevItemIndex]?.states?.active\n\n if ((index === lastItemIndex && isFirstItemActive) || isNextItemActive) {\n return 'left'\n } else if ((index === 0 && isLastItemActive) || isPrevItemActive) {\n return 'right'\n }\n return false\n }\n\n function handleMouseEnter() {\n hover.value = true\n if (props.pauseOnHover) {\n pauseTimer()\n }\n }\n\n function handleMouseLeave() {\n hover.value = false\n startTimer()\n }\n\n function handleButtonEnter(arrow: 'left' | 'right') {\n if (unref(isVertical)) return\n items.value.forEach((item, index) => {\n if (arrow === itemInStage(item, index)) {\n item.states.hover = true\n }\n })\n }\n\n function handleButtonLeave() {\n if (unref(isVertical)) return\n items.value.forEach((item) => {\n item.states.hover = false\n })\n }\n\n function handleIndicatorClick(index: number) {\n activeIndex.value = index\n }\n\n function handleIndicatorHover(index: number) {\n if (props.trigger === 'hover' && index !== activeIndex.value) {\n activeIndex.value = index\n }\n }\n\n function prev() {\n setActiveItem(activeIndex.value - 1)\n }\n\n function next() {\n setActiveItem(activeIndex.value + 1)\n }\n\n function resetTimer() {\n pauseTimer()\n if (!props.pauseOnHover) startTimer()\n }\n\n function setContainerHeight(height: number) {\n if (props.height !== 'auto') return\n containerHeight.value = height\n }\n\n function PlaceholderItem() {\n // fix: https://github.com/element-plus/element-plus/issues/12139\n const defaultSlots = slots.default?.()\n if (!defaultSlots) return null\n\n const flatSlots = flattedChildren(defaultSlots)\n\n const carouselItemsName = 'ElCarouselItem'\n\n const normalizeSlots = flatSlots.filter((slot) => {\n return isVNode(slot) && (slot.type as any).name === carouselItemsName\n })\n\n if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {\n isItemsTwoLength.value = true\n return normalizeSlots\n }\n isItemsTwoLength.value = false\n return null\n }\n\n // watch\n watch(\n () => activeIndex.value,\n (current, prev) => {\n resetItemPosition(prev)\n if (isItemsTwoLength.value) {\n current = current % 2\n prev = prev % 2\n }\n if (prev > -1) {\n emit('change', current, prev)\n }\n }\n )\n watch(\n () => props.autoplay,\n (autoplay) => {\n autoplay ? startTimer() : pauseTimer()\n }\n )\n watch(\n () => props.loop,\n () => {\n setActiveItem(activeIndex.value)\n }\n )\n\n watch(\n () => props.interval,\n () => {\n resetTimer()\n }\n )\n\n const resizeObserver = shallowRef>()\n // lifecycle\n onMounted(() => {\n watch(\n () => items.value,\n () => {\n if (items.value.length > 0) setActiveItem(props.initialIndex)\n },\n {\n immediate: true,\n }\n )\n\n resizeObserver.value = useResizeObserver(root.value, () => {\n resetItemPosition()\n })\n startTimer()\n })\n\n onBeforeUnmount(() => {\n pauseTimer()\n if (root.value && resizeObserver.value) resizeObserver.value.stop()\n })\n\n // provide\n provide(carouselContextKey, {\n root,\n isCardType,\n isVertical,\n items,\n loop: props.loop,\n addItem,\n removeItem,\n setActiveItem,\n setContainerHeight,\n })\n\n return {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n items,\n isVertical,\n containerStyle,\n isItemsTwoLength,\n handleButtonEnter,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n PlaceholderItem,\n isTwoLengthShow,\n throttledArrowClick,\n throttledIndicatorHover,\n }\n}\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselItemProps = buildProps({\n name: { type: String, default: '' },\n label: {\n type: [String, Number],\n default: '',\n },\n} as const)\n\nexport type CarouselItemProps = ExtractPropTypes\n", "import {\n getCurrentInstance,\n inject,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n unref,\n} from 'vue'\nimport { debugWarn, isUndefined } from '@element-plus/utils'\nimport { carouselContextKey } from './constants'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport const useCarouselItem = (\n props: CarouselItemProps,\n componentName: string\n) => {\n const carouselContext = inject(carouselContextKey)!\n // instance\n const instance = getCurrentInstance()!\n if (!carouselContext) {\n debugWarn(\n componentName,\n 'usage: '\n )\n }\n\n if (!instance) {\n debugWarn(\n componentName,\n 'compositional hook can only be invoked inside setups'\n )\n }\n\n const CARD_SCALE = 0.83\n\n const carouselItemRef = ref()\n const hover = ref(false)\n const translate = ref(0)\n const scale = ref(1)\n const active = ref(false)\n const ready = ref(false)\n const inStage = ref(false)\n const animating = ref(false)\n\n // computed\n const { isCardType, isVertical } = carouselContext\n\n // methods\n\n function processIndex(index: number, activeIndex: number, length: number) {\n const lastItemIndex = length - 1\n const prevItemIndex = activeIndex - 1\n const nextItemIndex = activeIndex + 1\n const halfItemIndex = length / 2\n\n if (activeIndex === 0 && index === lastItemIndex) {\n return -1\n } else if (activeIndex === lastItemIndex && index === 0) {\n return length\n } else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {\n return length + 1\n } else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {\n return -2\n }\n return index\n }\n\n function calcCardTranslate(index: number, activeIndex: number) {\n const parentWidth = unref(isVertical)\n ? carouselContext.root.value?.offsetHeight || 0\n : carouselContext.root.value?.offsetWidth || 0\n\n if (inStage.value) {\n return (parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1)) / 4\n } else if (index < activeIndex) {\n return (-(1 + CARD_SCALE) * parentWidth) / 4\n } else {\n return ((3 + CARD_SCALE) * parentWidth) / 4\n }\n }\n\n function calcTranslate(\n index: number,\n activeIndex: number,\n isVertical: boolean\n ) {\n const rootEl = carouselContext.root.value\n if (!rootEl) return 0\n\n const distance =\n (isVertical ? rootEl.offsetHeight : rootEl.offsetWidth) || 0\n return distance * (index - activeIndex)\n }\n\n const translateItem = (\n index: number,\n activeIndex: number,\n oldIndex?: number\n ) => {\n const _isCardType = unref(isCardType)\n const carouselItemLength = carouselContext.items.value.length ?? Number.NaN\n\n const isActive = index === activeIndex\n if (!_isCardType && !isUndefined(oldIndex)) {\n animating.value = isActive || index === oldIndex\n }\n\n if (!isActive && carouselItemLength > 2 && carouselContext.loop) {\n index = processIndex(index, activeIndex, carouselItemLength)\n }\n\n const _isVertical = unref(isVertical)\n active.value = isActive\n\n if (_isCardType) {\n inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1\n translate.value = calcCardTranslate(index, activeIndex)\n scale.value = unref(active) ? 1 : CARD_SCALE\n } else {\n translate.value = calcTranslate(index, activeIndex, _isVertical)\n }\n\n ready.value = true\n\n if (isActive && carouselItemRef.value) {\n carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight)\n }\n }\n\n function handleItemClick() {\n if (carouselContext && unref(isCardType)) {\n const index = carouselContext.items.value.findIndex(\n ({ uid }) => uid === instance.uid\n )\n carouselContext.setActiveItem(index)\n }\n }\n\n // lifecycle\n onMounted(() => {\n carouselContext.addItem({\n props,\n states: reactive({\n hover,\n translate,\n scale,\n active,\n ready,\n inStage,\n animating,\n }),\n uid: instance.uid,\n translateItem,\n })\n })\n\n onUnmounted(() => {\n carouselContext.removeItem(instance.uid)\n })\n\n return {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n }\n}\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Carousel from './src/carousel.vue'\nimport CarouselItem from './src/carousel-item.vue'\n\nexport const ElCarousel = withInstall(Carousel, {\n CarouselItem,\n})\n\nexport default ElCarousel\n\nexport const ElCarouselItem = withNoopInstall(CarouselItem)\n\nexport * from './src/carousel'\nexport * from './src/carousel-item'\nexport * from './src/constants'\n\nexport type { CarouselInstance, CarouselItemInstance } from './src/instance'\n", "import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { isBoolean, isNumber, isString } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Checkbox from './checkbox.vue'\n\nexport type CheckboxValueType = string | number | boolean\n\nexport const checkboxProps = {\n /**\n * @description binding value\n */\n modelValue: {\n type: [Number, String, Boolean],\n default: undefined,\n },\n /**\n * @description value of the Checkbox when used inside a `checkbox-group`\n */\n label: {\n type: [String, Boolean, Number, Object],\n default: undefined,\n },\n /**\n * @description Set indeterminate state, only responsible for style control\n */\n indeterminate: Boolean,\n /**\n * @description whether the Checkbox is disabled\n */\n disabled: Boolean,\n /**\n * @description if the Checkbox is checked\n */\n checked: Boolean,\n /**\n * @description native 'name' attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's checked\n */\n trueLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's not checked\n */\n falseLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description same as [aria-controls](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls), takes effect when `indeterminate` is `true`\n */\n controls: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to add a border around Checkbox\n */\n border: Boolean,\n /**\n * @description size of the Checkbox\n */\n size: useSizeProp,\n /**\n * @description input tabindex\n */\n tabindex: [String, Number],\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n}\n\nexport const checkboxEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n change: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type CheckboxProps = ExtractPropTypes\nexport type CheckboxEmits = typeof checkboxEmits\nexport type CheckboxInstance = InstanceType\n", "import type { InjectionKey, ToRefs, WritableComputedRef } from 'vue'\nimport type { CheckboxGroupProps } from './checkbox-group'\n\ntype CheckboxGroupContext = {\n modelValue?: WritableComputedRef\n changeEvent?: (...args: any) => any\n} & ToRefs<\n Pick<\n CheckboxGroupProps,\n 'size' | 'min' | 'max' | 'disabled' | 'validateEvent' | 'fill' | 'textColor'\n >\n>\n\nexport const checkboxGroupContextKey: InjectionKey =\n Symbol('checkboxGroupContextKey')\n", "import { computed, inject } from 'vue'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { isUndefined } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { CheckboxModel, CheckboxStatus } from '../composables'\n\nexport const useCheckboxDisabled = ({\n model,\n isChecked,\n}: Pick & Pick) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n\n const isLimitDisabled = computed(() => {\n const max = checkboxGroup?.max?.value\n const min = checkboxGroup?.min?.value\n return (\n (!isUndefined(max) && model.value.length >= max && !isChecked.value) ||\n (!isUndefined(min) && model.value.length <= min && isChecked.value)\n )\n })\n\n const isDisabled = useFormDisabled(\n computed(() => checkboxGroup?.disabled.value || isLimitDisabled.value)\n )\n\n return {\n isDisabled,\n isLimitDisabled,\n }\n}\n\nexport type CheckboxDisabled = ReturnType\n", "import { computed, getCurrentInstance, inject, nextTick, watch } from 'vue'\nimport { useFormItem } from '@element-plus/components/form'\nimport { debugWarn } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { useFormItemInputId } from '@element-plus/components/form'\nimport type { CheckboxProps } from '../checkbox'\nimport type {\n CheckboxDisabled,\n CheckboxModel,\n CheckboxStatus,\n} from '../composables'\n\nexport const useCheckboxEvent = (\n props: CheckboxProps,\n {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n }: Pick &\n Pick &\n Pick &\n Pick, 'isLabeledByFormItem'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const { formItem } = useFormItem()\n const { emit } = getCurrentInstance()!\n\n function getLabeledValue(value: string | number | boolean) {\n return value === props.trueLabel || value === true\n ? props.trueLabel ?? true\n : props.falseLabel ?? false\n }\n\n function emitChangeEvent(\n checked: string | number | boolean,\n e: InputEvent | MouseEvent\n ) {\n emit('change', getLabeledValue(checked), e)\n }\n\n function handleChange(e: Event) {\n if (isLimitExceeded.value) return\n\n const target = e.target as HTMLInputElement\n emit('change', getLabeledValue(target.checked), e)\n }\n\n async function onClickRoot(e: MouseEvent) {\n if (isLimitExceeded.value) return\n\n if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {\n // fix: https://github.com/element-plus/element-plus/issues/9981\n const eventTargets: EventTarget[] = e.composedPath()\n const hasLabel = eventTargets.some(\n (item) => (item as HTMLElement).tagName === 'LABEL'\n )\n if (!hasLabel) {\n model.value = getLabeledValue(\n [false, props.falseLabel].includes(model.value)\n )\n await nextTick()\n emitChangeEvent(model.value, e)\n }\n }\n }\n\n const validateEvent = computed(\n () => checkboxGroup?.validateEvent || props.validateEvent\n )\n\n watch(\n () => props.modelValue,\n () => {\n if (validateEvent.value) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n )\n\n return {\n handleChange,\n onClickRoot,\n }\n}\n", "import { computed, getCurrentInstance, inject, ref } from 'vue'\nimport { isArray, isUndefined } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { CheckboxProps } from '../checkbox'\n\nexport const useCheckboxModel = (props: CheckboxProps) => {\n const selfModel = ref(false)\n const { emit } = getCurrentInstance()!\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isGroup = computed(() => isUndefined(checkboxGroup) === false)\n const isLimitExceeded = ref(false)\n const model = computed({\n get() {\n return isGroup.value\n ? checkboxGroup?.modelValue?.value\n : props.modelValue ?? selfModel.value\n },\n\n set(val: unknown) {\n if (isGroup.value && isArray(val)) {\n isLimitExceeded.value =\n checkboxGroup?.max?.value !== undefined &&\n val.length > checkboxGroup?.max.value\n isLimitExceeded.value === false && checkboxGroup?.changeEvent?.(val)\n } else {\n emit(UPDATE_MODEL_EVENT, val)\n selfModel.value = val\n }\n },\n })\n\n return {\n model,\n isGroup,\n isLimitExceeded,\n }\n}\n\nexport type CheckboxModel = ReturnType\n", "import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual, isNil } from 'lodash-unified'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isArray, isBoolean, isObject } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from '../composables'\n\nexport const useCheckboxStatus = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots'],\n { model }: Pick\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isFocused = ref(false)\n const isChecked = computed(() => {\n const value = model.value\n if (isBoolean(value)) {\n return value\n } else if (isArray(value)) {\n if (isObject(props.label)) {\n return value.map(toRaw).some((o) => isEqual(o, props.label))\n } else {\n return value.map(toRaw).includes(props.label)\n }\n } else if (value !== null && value !== undefined) {\n return value === props.trueLabel\n } else {\n return !!value\n }\n })\n\n const checkboxButtonSize = useFormSize(\n computed(() => checkboxGroup?.size?.value),\n {\n prop: true,\n }\n )\n const checkboxSize = useFormSize(computed(() => checkboxGroup?.size?.value))\n\n const hasOwnLabel = computed(() => {\n return !!slots.default || !isNil(props.label)\n })\n\n return {\n checkboxButtonSize,\n isChecked,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n }\n}\n\nexport type CheckboxStatus = ReturnType\n", "import { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { isArray } from '@element-plus/utils'\nimport { useCheckboxDisabled } from './use-checkbox-disabled'\nimport { useCheckboxEvent } from './use-checkbox-event'\nimport { useCheckboxModel } from './use-checkbox-model'\nimport { useCheckboxStatus } from './use-checkbox-status'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from './use-checkbox-model'\n\nconst setStoreValue = (\n props: CheckboxProps,\n { model }: Pick\n) => {\n function addToStore() {\n if (isArray(model.value) && !model.value.includes(props.label)) {\n model.value.push(props.label)\n } else {\n model.value = props.trueLabel || true\n }\n }\n props.checked && addToStore()\n}\n\nexport const useCheckbox = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots']\n) => {\n const { formItem: elFormItem } = useFormItem()\n const { model, isGroup, isLimitExceeded } = useCheckboxModel(props)\n const {\n isFocused,\n isChecked,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n } = useCheckboxStatus(props, slots, { model })\n const { isDisabled } = useCheckboxDisabled({ model, isChecked })\n const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: elFormItem,\n disableIdGeneration: hasOwnLabel,\n disableIdManagement: isGroup,\n })\n const { handleChange, onClickRoot } = useCheckboxEvent(props, {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n })\n\n setStoreValue(props, { model })\n\n return {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n model,\n handleChange,\n onClickRoot,\n }\n}\n", "\n\n\n", "\n\n\n", "import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, isArray } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type checkboxGroup from './checkbox-group.vue'\nimport type { CheckboxValueType } from './checkbox'\n\nexport type CheckboxGroupValueType = Exclude[]\n\nexport const checkboxGroupProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType(Array),\n default: () => [],\n },\n /**\n * @description whether the nesting checkboxes are disabled\n */\n disabled: Boolean,\n /**\n * @description minimum number of checkbox checked\n */\n min: Number,\n /**\n * @description maximum number of checkbox checked\n */\n max: Number,\n /**\n * @description size of checkbox\n */\n size: useSizeProp,\n /**\n * @description label for screen reader\n */\n label: String,\n /**\n * @description border and background color when button is active\n */\n fill: String,\n /**\n * @description font color when button is active\n */\n textColor: String,\n /**\n * @description element tag of the checkbox group\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport const checkboxGroupEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxGroupValueType) => isArray(val),\n change: (val: CheckboxValueType[]) => isArray(val),\n}\n\nexport type CheckboxGroupProps = ExtractPropTypes\nexport type CheckboxGroupEmits = typeof checkboxGroupEmits\nexport type CheckboxGroupInstance = InstanceType\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Checkbox from './src/checkbox.vue'\nimport CheckboxButton from './src/checkbox-button.vue'\nimport CheckboxGroup from './src/checkbox-group.vue'\n\nexport const ElCheckbox = withInstall(Checkbox, {\n CheckboxButton,\n CheckboxGroup,\n})\nexport default ElCheckbox\n\nexport const ElCheckboxButton = withNoopInstall(CheckboxButton)\nexport const ElCheckboxGroup = withNoopInstall(CheckboxGroup)\n\nexport * from './src/checkbox-group'\nexport * from './src/checkbox'\nexport * from './src/constants'\n", "import { buildProps, isBoolean, isNumber, isString } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type { ExtractPropTypes } from 'vue'\nimport type Radio from './radio.vue'\n\nexport const radioPropsBase = buildProps({\n /**\n * @description size of the Radio\n */\n size: useSizeProp,\n /**\n * @description whether Radio is disabled\n */\n disabled: Boolean,\n /**\n * @description the value of Radio\n */\n label: {\n type: [String, Number, Boolean],\n default: '',\n },\n})\n\nexport const radioProps = buildProps({\n ...radioPropsBase,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: '',\n },\n /**\n * @description whether to add a border around Radio\n */\n border: Boolean,\n} as const)\n\nexport const radioEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | number | boolean) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: string | number | boolean) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type RadioProps = ExtractPropTypes\nexport type RadioEmits = typeof radioEmits\nexport type RadioInstance = InstanceType\n", "import type { InjectionKey } from 'vue'\nimport type { RadioGroupProps } from './radio-group'\n\nexport interface RadioGroupContext extends RadioGroupProps {\n changeEvent: (val: RadioGroupProps['modelValue']) => void\n}\n\nexport const radioGroupKey: InjectionKey =\n Symbol('radioGroupKey')\n", "import { computed, inject, ref } from 'vue'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useFormDisabled, useFormSize } from '@element-plus/components/form'\nimport { radioGroupKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { RadioEmits, RadioProps } from './radio'\n\nexport const useRadio = (\n props: { label: RadioProps['label']; modelValue?: RadioProps['modelValue'] },\n emit?: SetupContext['emit']\n) => {\n const radioRef = ref()\n const radioGroup = inject(radioGroupKey, undefined)\n const isGroup = computed(() => !!radioGroup)\n const modelValue = computed({\n get() {\n return isGroup.value ? radioGroup!.modelValue : props.modelValue!\n },\n set(val) {\n if (isGroup.value) {\n radioGroup!.changeEvent(val)\n } else {\n emit && emit(UPDATE_MODEL_EVENT, val)\n }\n radioRef.value!.checked = props.modelValue === props.label\n },\n })\n\n const size = useFormSize(computed(() => radioGroup?.size))\n const disabled = useFormDisabled(computed(() => radioGroup?.disabled))\n const focus = ref(false)\n const tabIndex = computed(() => {\n return disabled.value || (isGroup.value && modelValue.value !== props.label)\n ? -1\n : 0\n })\n\n return {\n radioRef,\n isGroup,\n radioGroup,\n focus,\n size,\n disabled,\n tabIndex,\n modelValue,\n }\n}\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\nimport type RadioButton from './radio-button.vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n /**\n * @description native 'name' attribute\n */\n name: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes\nexport type RadioButtonInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { radioEmits } from './radio'\nimport type { ExtractPropTypes } from '@vue/runtime-core'\nimport type RadioGroup from './radio-group.vue'\n\nexport const radioGroupProps = buildProps({\n /**\n * @description native `id` attribute\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description the size of radio buttons or bordered radios\n */\n size: useSizeProp,\n /**\n * @description whether the nesting radios are disabled\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: '',\n },\n /**\n * @description border and background color when button is active\n */\n fill: {\n type: String,\n default: '',\n },\n /**\n * @description same as `aria-label` in RadioGroup\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description font color when button is active\n */\n textColor: {\n type: String,\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type RadioGroupProps = ExtractPropTypes\n\nexport const radioGroupEmits = radioEmits\nexport type RadioGroupEmits = typeof radioGroupEmits\nexport type RadioGroupInstance = InstanceType\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Radio from './src/radio.vue'\nimport RadioButton from './src/radio-button.vue'\nimport RadioGroup from './src/radio-group.vue'\n\nexport const ElRadio = withInstall(Radio, {\n RadioButton,\n RadioGroup,\n})\nexport default ElRadio\nexport const ElRadioGroup = withNoopInstall(RadioGroup)\nexport const ElRadioButton = withNoopInstall(RadioButton)\n\nexport * from './src/radio'\nexport * from './src/radio-group'\nexport * from './src/radio-button'\nexport * from './src/constants'\n", "// @ts-nocheck\nimport { defineComponent, h } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nexport default defineComponent({\n name: 'NodeContent',\n setup() {\n const ns = useNamespace('cascader-node')\n return {\n ns,\n }\n },\n render() {\n const { ns } = this\n const { node, panel } = this.$parent\n const { data, label } = node\n const { renderLabelFn } = panel\n return h(\n 'span',\n { class: ns.e('label') },\n renderLabelFn ? renderLabelFn({ node, data }) : label\n )\n },\n})\n", "// @ts-nocheck\nimport type { InjectionKey, VNode } from 'vue'\nimport type { Nullable } from '@element-plus/utils'\nimport type {\n default as CascaderNode,\n CascaderOption,\n CascaderProps,\n ExpandTrigger,\n} from './node'\n\nexport type { CascaderNode, CascaderOption, CascaderProps, ExpandTrigger }\n\nexport type CascaderNodeValue = string | number\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required\nexport type isDisabled = (data: CascaderOption, node: CascaderNode) => boolean\nexport type isLeaf = (data: CascaderOption, node: CascaderNode) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: CascaderNode, resolve: Resolve) => void\nexport type RenderLabel = ({\n node: CascaderNode,\n data: CascaderOption,\n}) => VNode | VNode[]\n\nexport interface Tag {\n node?: CascaderNode\n key: number\n text: string\n hitState?: boolean\n closable: boolean\n isCollapseTag: boolean\n}\n\nexport interface ElCascaderPanelContext {\n config: CascaderConfig\n expandingNode: Nullable\n checkedNodes: CascaderNode[]\n isHoverMenu: boolean\n initialLoaded: boolean\n renderLabelFn: RenderLabel\n lazyLoad: (\n node?: CascaderNode,\n cb?: (dataList: CascaderOption[]) => void\n ) => void\n expandNode: (node: CascaderNode, silent?: boolean) => void\n handleCheckChange: (\n node: CascaderNode,\n checked: boolean,\n emitClose?: boolean\n ) => void\n}\n\nexport const CASCADER_PANEL_INJECTION_KEY: InjectionKey =\n Symbol()\n", "\n\n\n", "\n\n\n", "// @ts-nocheck\nimport { isFunction } from '@vue/shared'\nimport { capitalize, isEmpty, isUndefined } from '@element-plus/utils'\nimport type { VNode } from 'vue'\n\nexport type CascaderNodeValue = string | number\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required\nexport type ExpandTrigger = 'click' | 'hover'\nexport type isDisabled = (data: CascaderOption, node: Node) => boolean\nexport type isLeaf = (data: CascaderOption, node: Node) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: Node, resolve: Resolve) => void\nexport type RenderLabel = ({\n node: Node,\n data: CascaderOption,\n}) => VNode | VNode[]\nexport interface CascaderOption extends Record {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport interface CascaderProps {\n expandTrigger?: ExpandTrigger\n multiple?: boolean\n checkStrictly?: boolean\n emitPath?: boolean\n lazy?: boolean\n lazyLoad?: LazyLoad\n value?: string\n label?: string\n children?: string\n disabled?: string | isDisabled\n leaf?: string | isLeaf\n hoverThreshold?: number\n}\n\nexport type Nullable = null | T\n\ntype ChildrenData = CascaderOption[] | undefined\n\nlet uid = 0\n\nconst calculatePathNodes = (node: Node) => {\n const nodes = [node]\n let { parent } = node\n\n while (parent) {\n nodes.unshift(parent)\n parent = parent.parent\n }\n\n return nodes\n}\n\nclass Node {\n readonly uid: number = uid++\n readonly level: number\n readonly value: CascaderNodeValue\n readonly label: string\n readonly pathNodes: Node[]\n readonly pathValues: CascaderNodePathValue\n readonly pathLabels: string[]\n\n childrenData: ChildrenData\n children: Node[]\n text: string\n loaded: boolean\n /**\n * Is it checked\n *\n * @default false\n */\n checked = false\n /**\n * Used to indicate the intermediate state of unchecked and fully checked child nodes\n *\n * @default false\n */\n indeterminate = false\n /**\n * Loading Status\n *\n * @default false\n */\n loading = false\n\n constructor(\n readonly data: Nullable,\n readonly config: CascaderConfig,\n readonly parent?: Node,\n readonly root = false\n ) {\n const { value: valueKey, label: labelKey, children: childrenKey } = config\n\n const childrenData = data[childrenKey] as ChildrenData\n const pathNodes = calculatePathNodes(this)\n\n this.level = root ? 0 : parent ? parent.level + 1 : 1\n this.value = data[valueKey] as CascaderNodeValue\n this.label = data[labelKey] as string\n this.pathNodes = pathNodes\n this.pathValues = pathNodes.map((node) => node.value)\n this.pathLabels = pathNodes.map((node) => node.label)\n this.childrenData = childrenData\n this.children = (childrenData || []).map(\n (child) => new Node(child, config, this)\n )\n this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData)\n }\n\n get isDisabled(): boolean {\n const { data, parent, config } = this\n const { disabled, checkStrictly } = config\n const isDisabled = isFunction(disabled)\n ? disabled(data, this)\n : !!data[disabled]\n return isDisabled || (!checkStrictly && parent?.isDisabled)\n }\n\n get isLeaf(): boolean {\n const { data, config, childrenData, loaded } = this\n const { lazy, leaf } = config\n const isLeaf = isFunction(leaf) ? leaf(data, this) : data[leaf]\n\n return isUndefined(isLeaf)\n ? lazy && !loaded\n ? false\n : !(Array.isArray(childrenData) && childrenData.length)\n : !!isLeaf\n }\n\n get valueByOption() {\n return this.config.emitPath ? this.pathValues : this.value\n }\n\n appendChild(childData: CascaderOption) {\n const { childrenData, children } = this\n const node = new Node(childData, this.config, this)\n\n if (Array.isArray(childrenData)) {\n childrenData.push(childData)\n } else {\n this.childrenData = [childData]\n }\n\n children.push(node)\n\n return node\n }\n\n calcText(allLevels: boolean, separator: string) {\n const text = allLevels ? this.pathLabels.join(separator) : this.label\n this.text = text\n return text\n }\n\n broadcast(event: string, ...args: unknown[]) {\n const handlerName = `onParent${capitalize(event)}`\n this.children.forEach((child) => {\n if (child) {\n // bottom up\n child.broadcast(event, ...args)\n child[handlerName] && child[handlerName](...args)\n }\n })\n }\n\n emit(event: string, ...args: unknown[]) {\n const { parent } = this\n const handlerName = `onChild${capitalize(event)}`\n if (parent) {\n parent[handlerName] && parent[handlerName](...args)\n parent.emit(event, ...args)\n }\n }\n\n onParentCheck(checked: boolean) {\n if (!this.isDisabled) {\n this.setCheckState(checked)\n }\n }\n\n onChildCheck() {\n const { children } = this\n const validChildren = children.filter((child) => !child.isDisabled)\n const checked = validChildren.length\n ? validChildren.every((child) => child.checked)\n : false\n\n this.setCheckState(checked)\n }\n\n setCheckState(checked: boolean) {\n const totalNum = this.children.length\n const checkedNum = this.children.reduce((c, p) => {\n const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0\n return c + num\n }, 0)\n\n this.checked =\n this.loaded &&\n this.children\n .filter((child) => !child.isDisabled)\n .every((child) => child.loaded && child.checked) &&\n checked\n this.indeterminate =\n this.loaded && checkedNum !== totalNum && checkedNum > 0\n }\n\n doCheck(checked: boolean) {\n if (this.checked === checked) return\n\n const { checkStrictly, multiple } = this.config\n\n if (checkStrictly || !multiple) {\n this.checked = checked\n } else {\n // bottom up to unify the calculation of the indeterminate state\n this.broadcast('check', checked)\n this.setCheckState(checked)\n this.emit('check')\n }\n }\n}\n\nexport default Node\n", "import { isEqual } from 'lodash-unified'\nimport Node from './node'\n\nimport type { Nullable } from '@element-plus/utils'\nimport type {\n CascaderConfig,\n CascaderNodePathValue,\n CascaderNodeValue,\n CascaderOption,\n} from './node'\n\nconst flatNodes = (nodes: Node[], leafOnly: boolean) => {\n return nodes.reduce((res, node) => {\n if (node.isLeaf) {\n res.push(node)\n } else {\n !leafOnly && res.push(node)\n res = res.concat(flatNodes(node.children, leafOnly))\n }\n return res\n }, [] as Node[])\n}\n\nexport default class Store {\n readonly nodes: Node[]\n readonly allNodes: Node[]\n readonly leafNodes: Node[]\n\n constructor(data: CascaderOption[], readonly config: CascaderConfig) {\n const nodes = (data || []).map(\n (nodeData) => new Node(nodeData, this.config)\n )\n this.nodes = nodes\n this.allNodes = flatNodes(nodes, false)\n this.leafNodes = flatNodes(nodes, true)\n }\n\n getNodes() {\n return this.nodes\n }\n\n getFlattedNodes(leafOnly: boolean) {\n return leafOnly ? this.leafNodes : this.allNodes\n }\n\n appendNode(nodeData: CascaderOption, parentNode?: Node) {\n const node = parentNode\n ? parentNode.appendChild(nodeData)\n : new Node(nodeData, this.config)\n\n if (!parentNode) this.nodes.push(node)\n\n this.allNodes.push(node)\n node.isLeaf && this.leafNodes.push(node)\n }\n\n appendNodes(nodeDataList: CascaderOption[], parentNode: Node) {\n nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode))\n }\n\n // when checkStrictly, leaf node first\n getNodeByValue(\n value: CascaderNodeValue | CascaderNodePathValue,\n leafOnly = false\n ): Nullable {\n if (!value && value !== 0) return null\n\n const node = this.getFlattedNodes(leafOnly).find(\n (node) => isEqual(node.value, value) || isEqual(node.pathValues, value)\n )\n\n return node || null\n }\n\n getSameNode(node: Node): Nullable {\n if (!node) return null\n\n const node_ = this.getFlattedNodes(false).find(\n ({ value, level }) => isEqual(node.value, value) && node.level === level\n )\n\n return node_ || null\n }\n}\n", "import { computed } from 'vue'\nimport { NOOP } from '@vue/shared'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport type {\n CascaderConfig,\n CascaderOption,\n CascaderProps,\n CascaderValue,\n} from './node'\n\nexport const CommonProps = buildProps({\n /**\n * @description specify which key of node object is used as the node's value\n */\n modelValue: {\n type: definePropType([Number, String, Array]),\n },\n /**\n * @description data of the options, the key of `value` and `label` can be customize by `CascaderProps`.\n */\n options: {\n type: definePropType(Array),\n default: () => [] as CascaderOption[],\n },\n /**\n * @description configuration options, see the following `CascaderProps` table.\n */\n props: {\n type: definePropType(Object),\n default: () => ({} as CascaderProps),\n },\n} as const)\n\nexport const DefaultProps: CascaderConfig = {\n /**\n * @description trigger mode of expanding options\n */\n expandTrigger: 'click',\n /**\n * @description whether multiple selection is enabled\n */\n multiple: false,\n /**\n * @description whether checked state of a node not affects its parent and child nodes\n */\n checkStrictly: false, // whether all nodes can be selected\n /**\n * @description when checked nodes change, whether to emit an array of node's path, if false, only emit the value of node.\n */\n emitPath: true, // wether to emit an array of all levels value in which node is located\n /**\n * @description whether to dynamic load child nodes, use with `lazyload` attribute\n */\n lazy: false,\n /**\n * @description method for loading child nodes data, only works when `lazy` is true\n */\n lazyLoad: NOOP,\n /**\n * @description specify which key of node object is used as the node's value\n */\n value: 'value',\n /**\n * @description specify which key of node object is used as the node's label\n */\n label: 'label',\n /**\n * @description specify which key of node object is used as the node's children\n */\n children: 'children',\n /**\n * @description specify which key of node object is used as the node's leaf\n */\n leaf: 'leaf',\n /**\n * @description specify which key of node object is used as the node's disabled\n */\n disabled: 'disabled',\n /**\n * @description hover threshold of expanding options\n */\n hoverThreshold: 500,\n}\n\nexport const useCascaderConfig = (props: { props: CascaderProps }) => {\n return computed(() => ({\n ...DefaultProps,\n ...props.props,\n }))\n}\n", "import { isLeaf } from '@element-plus/utils'\nimport type { default as CascaderNode } from './node'\n\nexport const getMenuIndex = (el: HTMLElement) => {\n if (!el) return 0\n const pieces = el.id.split('-')\n return Number(pieces[pieces.length - 2])\n}\n\nexport const checkNode = (el: HTMLElement) => {\n if (!el) return\n\n const input = el.querySelector('input')\n if (input) {\n input.click()\n } else if (isLeaf(el)) {\n el.click()\n }\n}\n\nexport const sortByOriginalOrder = (\n oldNodes: CascaderNode[],\n newNodes: CascaderNode[]\n) => {\n const newNodesCopy = newNodes.slice(0)\n const newIds = newNodesCopy.map((node) => node.uid)\n const res = oldNodes.reduce((acc, item) => {\n const index = newIds.indexOf(item.uid)\n if (index > -1) {\n acc.push(item)\n newNodesCopy.splice(index, 1)\n newIds.splice(index, 1)\n }\n return acc\n }, [] as CascaderNode[])\n\n res.push(...newNodesCopy)\n\n return res\n}\n", "\n\n\n", "import CascaderPanel from './src/index.vue'\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nCascaderPanel.install = (app: App): void => {\n app.component(CascaderPanel.name, CascaderPanel)\n}\n\nconst _CascaderPanel = CascaderPanel as SFCWithInstall\n\nexport default _CascaderPanel\nexport const ElCascaderPanel = _CascaderPanel\nexport * from './src/types'\nexport * from './src/config'\nexport * from './src/instance'\n", "import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type Tag from './tag.vue'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const tagProps = buildProps({\n /**\n * @description type of Tag\n */\n type: {\n type: String,\n values: ['success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n /**\n * @description whether Tag can be removed\n */\n closable: Boolean,\n /**\n * @description whether to disable animations\n */\n disableTransitions: Boolean,\n /**\n * @description whether Tag has a highlighted border\n */\n hit: Boolean,\n /**\n * @description background color of the Tag\n */\n color: {\n type: String,\n default: '',\n },\n /**\n * @description size of Tag\n */\n size: {\n type: String,\n values: componentSizes,\n default: '',\n },\n /**\n * @description theme of Tag\n */\n effect: {\n type: String,\n values: ['dark', 'light', 'plain'],\n default: 'light',\n },\n /**\n * @description whether Tag is rounded\n */\n round: Boolean,\n} as const)\nexport type TagProps = ExtractPropTypes\n\nexport const tagEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type TagEmits = typeof tagEmits\n\nexport type TagInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Tag from './src/tag.vue'\n\nexport const ElTag = withInstall(Tag)\nexport default ElTag\n\nexport * from './src/tag'\n", "import { CommonProps } from '@element-plus/components/cascader-panel'\nimport { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { tagProps } from '@element-plus/components/tag'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type {\n CascaderNode,\n CascaderValue,\n} from '@element-plus/components/cascader-panel'\n\nexport const cascaderProps = buildProps({\n ...CommonProps,\n /**\n * @description size of input\n */\n size: useSizeProp,\n /**\n * @description placeholder of input\n */\n placeholder: String,\n /**\n * @description whether Cascader is disabled\n */\n disabled: Boolean,\n /**\n * @description whether selected value can be cleared\n */\n clearable: Boolean,\n /**\n * @description whether the options can be searched\n */\n filterable: Boolean,\n /**\n * @description customize search logic, the first parameter is `node`, the second is `keyword`, and need return a boolean value indicating whether it hits.\n */\n filterMethod: {\n type: definePropType<(node: CascaderNode, keyword: string) => boolean>(\n Function\n ),\n default: (node: CascaderNode, keyword: string) =>\n node.text.includes(keyword),\n },\n /**\n * @description option label separator\n */\n separator: {\n type: String,\n default: ' / ',\n },\n /**\n * @description whether to display all levels of the selected value in the input\n */\n showAllLevels: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to collapse tags in multiple selection mode\n */\n collapseTags: Boolean,\n /**\n * @description The max tags number to be shown. To use this, collapse-tags must be true\n */\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n /**\n * @description native input id\n */\n collapseTagsTooltip: {\n type: Boolean,\n default: false,\n },\n /**\n * @description debounce delay when typing filter keyword, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted\n */\n beforeFilter: {\n type: definePropType<(value: string) => boolean | Promise>(Function),\n default: () => true,\n },\n /**\n * @description custom class name for Cascader's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether cascader popup is teleported\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description tag type\n */\n // eslint-disable-next-line vue/require-prop-types\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n})\n\nexport const cascaderEmits = {\n [UPDATE_MODEL_EVENT]: (val: CascaderValue) => !!val || val === null,\n [CHANGE_EVENT]: (val: CascaderValue) => !!val || val === null,\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n visibleChange: (val: boolean) => isBoolean(val),\n expandChange: (val: CascaderValue) => !!val,\n removeTag: (val: CascaderNode['valueByOption']) => !!val,\n}\n\n// Type name is taken(cascader-panel/src/node), needs discussion\n// export type CascaderProps = ExtractPropTypes\n\nexport type CascaderEmits = typeof cascaderEmits\n", "\n\n\n", "import Cascader from './src/cascader.vue'\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nCascader.install = (app: App): void => {\n app.component(Cascader.name, Cascader)\n}\n\nconst _Cascader = Cascader as SFCWithInstall\n\nexport default _Cascader\nexport const ElCascader = _Cascader\n\nexport * from './src/cascader'\nexport * from './src/instances'\n", "import { buildProps, isBoolean } from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\n\nimport type CheckTag from './check-tag.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const checkTagProps = buildProps({\n /**\n * @description is checked\n */\n checked: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type CheckTagProps = ExtractPropTypes\n\nexport const checkTagEmits = {\n 'update:checked': (value: boolean) => isBoolean(value),\n [CHANGE_EVENT]: (value: boolean) => isBoolean(value),\n}\nexport type CheckTagEmits = typeof checkTagEmits\n\nexport type CheckTagInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport CheckTag from './src/check-tag.vue'\n\nexport const ElCheckTag = withInstall(CheckTag)\nexport default ElCheckTag\n\nexport * from './src/check-tag'\n", "import type { ComputedRef, InjectionKey } from 'vue'\n\ninterface RowContext {\n gutter: ComputedRef\n}\n\nexport const rowContextKey: InjectionKey = Symbol('rowContextKey')\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Row from './row.vue'\n\nexport const RowJustify = [\n 'start',\n 'center',\n 'end',\n 'space-around',\n 'space-between',\n 'space-evenly',\n] as const\n\nexport const RowAlign = ['top', 'middle', 'bottom'] as const\n\nexport const rowProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description grid spacing\n */\n gutter: {\n type: Number,\n default: 0,\n },\n /**\n * @description horizontal alignment of flex layout\n */\n justify: {\n type: String,\n values: RowJustify,\n default: 'start',\n },\n /**\n * @description vertical alignment of flex layout\n */\n align: {\n type: String,\n values: RowAlign,\n },\n} as const)\n\nexport type RowProps = ExtractPropTypes\nexport type RowInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Row from './src/row.vue'\n\nexport const ElRow = withInstall(Row)\nexport default ElRow\n\nexport * from './src/row'\nexport * from './src/constants'\n", "import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Col from './col.vue'\n\nexport type ColSizeObject = {\n span?: number\n offset?: number\n pull?: number\n push?: number\n}\nexport type ColSize = number | ColSizeObject\n\nexport const colProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description number of column the grid spans\n */\n span: {\n type: Number,\n default: 24,\n },\n /**\n * @description number of spacing on the left side of the grid\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the left\n */\n pull: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the right\n */\n push: {\n type: Number,\n default: 0,\n },\n /**\n * @description `<768px` Responsive columns or column props object\n */\n xs: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥768px` Responsive columns or column props object\n */\n sm: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥992px` Responsive columns or column props object\n */\n md: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1200px` Responsive columns or column props object\n */\n lg: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1920px` Responsive columns or column props object\n */\n xl: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n} as const)\nexport type ColProps = ExtractPropTypes\nexport type ColInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Col from './src/col.vue'\n\nexport const ElCol = withInstall(Col)\nexport default ElCol\n\nexport * from './src/col'\n", "import {\n buildProps,\n definePropType,\n isNumber,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\n\nexport type CollapseActiveName = string | number\nexport type CollapseModelValue = Arrayable\n\nexport const emitChangeFn = (value: CollapseModelValue) =>\n typeof isNumber(value) || isString(value) || Array.isArray(value)\n\nexport const collapseProps = buildProps({\n accordion: Boolean,\n modelValue: {\n type: definePropType([Array, String, Number]),\n default: () => mutable([] as const),\n },\n} as const)\nexport type CollapseProps = ExtractPropTypes\n\nexport const collapseEmits = {\n [UPDATE_MODEL_EVENT]: emitChangeFn,\n [CHANGE_EVENT]: emitChangeFn,\n}\nexport type CollapseEmits = typeof collapseEmits\n", "import type { InjectionKey, Ref } from 'vue'\nimport type { CollapseActiveName } from './collapse'\n\nexport interface CollapseContext {\n activeNames: Ref\n handleItemClick: (name: CollapseActiveName) => void\n}\n\nexport const collapseContextKey: InjectionKey =\n Symbol('collapseContextKey')\n", "import { computed, provide, ref, watch } from 'vue'\nimport { ensureArray } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { collapseContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type {\n CollapseActiveName,\n CollapseEmits,\n CollapseProps,\n} from './collapse'\n\nexport const useCollapse = (\n props: CollapseProps,\n emit: SetupContext['emit']\n) => {\n const activeNames = ref(ensureArray(props.modelValue))\n\n const setActiveNames = (_activeNames: CollapseActiveName[]) => {\n activeNames.value = _activeNames\n const value = props.accordion ? activeNames.value[0] : activeNames.value\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n }\n\n const handleItemClick = (name: CollapseActiveName) => {\n if (props.accordion) {\n setActiveNames([activeNames.value[0] === name ? '' : name])\n } else {\n const _activeNames = [...activeNames.value]\n const index = _activeNames.indexOf(name)\n\n if (index > -1) {\n _activeNames.splice(index, 1)\n } else {\n _activeNames.push(name)\n }\n setActiveNames(_activeNames)\n }\n }\n\n watch(\n () => props.modelValue,\n () => (activeNames.value = ensureArray(props.modelValue)),\n { deep: true }\n )\n\n provide(collapseContextKey, {\n activeNames,\n handleItemClick,\n })\n return {\n activeNames,\n setActiveNames,\n }\n}\n\nexport const useCollapseDOM = () => {\n const ns = useNamespace('collapse')\n\n const rootKls = computed(() => ns.b())\n return {\n rootKls,\n }\n}\n", "\n\n\n", "\n\n", "import CollapseTransition from './src/collapse-transition.vue'\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nCollapseTransition.install = (app: App): void => {\n app.component(CollapseTransition.name, CollapseTransition)\n}\n\nconst _CollapseTransition = CollapseTransition as SFCWithInstall<\n typeof CollapseTransition\n>\n\nexport default _CollapseTransition\nexport const ElCollapseTransition = _CollapseTransition\n", "import { buildProps, definePropType, generateId } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { CollapseActiveName } from './collapse'\n\nexport const collapseItemProps = buildProps({\n title: {\n type: String,\n default: '',\n },\n name: {\n type: definePropType([String, Number]),\n default: () => generateId(),\n },\n disabled: Boolean,\n} as const)\nexport type CollapseItemProps = ExtractPropTypes\n", "import { computed, inject, ref, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { generateId } from '@element-plus/utils'\nimport { collapseContextKey } from './constants'\n\nimport type { CollapseItemProps } from './collapse-item'\n\nexport const useCollapseItem = (props: CollapseItemProps) => {\n const collapse = inject(collapseContextKey)\n\n const focusing = ref(false)\n const isClick = ref(false)\n const id = ref(generateId())\n\n const isActive = computed(() =>\n collapse?.activeNames.value.includes(props.name)\n )\n\n const handleFocus = () => {\n setTimeout(() => {\n if (!isClick.value) {\n focusing.value = true\n } else {\n isClick.value = false\n }\n }, 50)\n }\n\n const handleHeaderClick = () => {\n if (props.disabled) return\n collapse?.handleItemClick(props.name)\n focusing.value = false\n isClick.value = true\n }\n\n const handleEnterClick = () => {\n collapse?.handleItemClick(props.name)\n }\n\n return {\n focusing,\n id,\n isActive,\n handleFocus,\n handleHeaderClick,\n handleEnterClick,\n }\n}\n\nexport const useCollapseItemDOM = (\n props: CollapseItemProps,\n { focusing, isActive, id }: Partial>\n) => {\n const ns = useNamespace('collapse')\n\n const rootKls = computed(() => [\n ns.b('item'),\n ns.is('active', unref(isActive)),\n ns.is('disabled', props.disabled),\n ])\n const headKls = computed(() => [\n ns.be('item', 'header'),\n ns.is('active', unref(isActive)),\n { focusing: unref(focusing) && !props.disabled },\n ])\n const arrowKls = computed(() => [\n ns.be('item', 'arrow'),\n ns.is('active', unref(isActive)),\n ])\n const itemWrapperKls = computed(() => ns.be('item', 'wrap'))\n const itemContentKls = computed(() => ns.be('item', 'content'))\n const scopedContentId = computed(() => ns.b(`content-${unref(id)}`))\n const scopedHeadId = computed(() => ns.b(`head-${unref(id)}`))\n\n return {\n arrowKls,\n headKls,\n rootKls,\n itemWrapperKls,\n itemContentKls,\n scopedContentId,\n scopedHeadId,\n }\n}\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Collapse from './src/collapse.vue'\nimport CollapseItem from './src/collapse-item.vue'\n\nexport const ElCollapse = withInstall(Collapse, {\n CollapseItem,\n})\nexport default ElCollapse\nexport const ElCollapseItem = withNoopInstall(CollapseItem)\n\nexport * from './src/collapse'\nexport * from './src/collapse-item'\nexport * from './src/constants'\nexport type { CollapseInstance, CollapseItemInstance } from './src/instance'\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Color from '../utils/color'\n\nexport const alphaSliderProps = buildProps({\n color: {\n type: definePropType(Object),\n required: true,\n },\n vertical: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport type AlphaSliderProps = ExtractPropTypes\n", "import { isClient } from '@element-plus/utils'\n\nlet isDragging = false\n\nexport interface DraggableOptions {\n drag?: (event: MouseEvent | TouchEvent) => void\n start?: (event: MouseEvent | TouchEvent) => void\n end?: (event: MouseEvent | TouchEvent) => void\n}\n\nexport function draggable(element: HTMLElement, options: DraggableOptions) {\n if (!isClient) return\n\n const moveFn = function (event: MouseEvent | TouchEvent) {\n options.drag?.(event)\n }\n\n const upFn = function (event: MouseEvent | TouchEvent) {\n document.removeEventListener('mousemove', moveFn)\n document.removeEventListener('mouseup', upFn)\n document.removeEventListener('touchmove', moveFn)\n document.removeEventListener('touchend', upFn)\n document.onselectstart = null\n document.ondragstart = null\n\n isDragging = false\n\n options.end?.(event)\n }\n\n const downFn = function (event: MouseEvent | TouchEvent) {\n if (isDragging) return\n event.preventDefault()\n document.onselectstart = () => false\n document.ondragstart = () => false\n document.addEventListener('mousemove', moveFn)\n document.addEventListener('mouseup', upFn)\n document.addEventListener('touchmove', moveFn)\n document.addEventListener('touchend', upFn)\n\n isDragging = true\n\n options.start?.(event)\n }\n\n element.addEventListener('mousedown', downFn)\n element.addEventListener('touchstart', downFn)\n}\n", "import {\n computed,\n getCurrentInstance,\n onMounted,\n ref,\n shallowRef,\n watch,\n} from 'vue'\nimport { addUnit, getClientXY } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { draggable } from '../utils/draggable'\n\nimport type { AlphaSliderProps } from '../props/alpha-slider'\n\nexport const useAlphaSlider = (props: AlphaSliderProps) => {\n const instance = getCurrentInstance()!\n\n const thumb = shallowRef()\n const bar = shallowRef()\n\n function handleClick(event: MouseEvent | TouchEvent) {\n const target = event.target\n\n if (target !== thumb.value) {\n handleDrag(event)\n }\n }\n\n function handleDrag(event: MouseEvent | TouchEvent) {\n if (!bar.value || !thumb.value) return\n\n const el = instance.vnode.el as HTMLElement\n const rect = el.getBoundingClientRect()\n const { clientX, clientY } = getClientXY(event)\n\n if (!props.vertical) {\n let left = clientX - rect.left\n left = Math.max(thumb.value.offsetWidth / 2, left)\n left = Math.min(left, rect.width - thumb.value.offsetWidth / 2)\n\n props.color.set(\n 'alpha',\n Math.round(\n ((left - thumb.value.offsetWidth / 2) /\n (rect.width - thumb.value.offsetWidth)) *\n 100\n )\n )\n } else {\n let top = clientY - rect.top\n top = Math.max(thumb.value.offsetHeight / 2, top)\n top = Math.min(top, rect.height - thumb.value.offsetHeight / 2)\n\n props.color.set(\n 'alpha',\n Math.round(\n ((top - thumb.value.offsetHeight / 2) /\n (rect.height - thumb.value.offsetHeight)) *\n 100\n )\n )\n }\n }\n\n return {\n thumb,\n bar,\n handleDrag,\n handleClick,\n }\n}\n\nexport const useAlphaSliderDOM = (\n props: AlphaSliderProps,\n {\n bar,\n thumb,\n handleDrag,\n }: Pick, 'bar' | 'thumb' | 'handleDrag'>\n) => {\n const instance = getCurrentInstance()!\n\n const ns = useNamespace('color-alpha-slider')\n // refs\n\n const thumbLeft = ref(0)\n const thumbTop = ref(0)\n const background = ref()\n\n function getThumbLeft() {\n if (!thumb.value) return 0\n\n if (props.vertical) return 0\n const el = instance.vnode.el\n const alpha = props.color.get('alpha')\n\n if (!el) return 0\n return Math.round(\n (alpha * (el.offsetWidth - thumb.value.offsetWidth / 2)) / 100\n )\n }\n\n function getThumbTop() {\n if (!thumb.value) return 0\n\n const el = instance.vnode.el\n if (!props.vertical) return 0\n const alpha = props.color.get('alpha')\n\n if (!el) return 0\n return Math.round(\n (alpha * (el.offsetHeight - thumb.value.offsetHeight / 2)) / 100\n )\n }\n\n function getBackground() {\n if (props.color && props.color.value) {\n const { r, g, b } = props.color.toRgb()\n return `linear-gradient(to right, rgba(${r}, ${g}, ${b}, 0) 0%, rgba(${r}, ${g}, ${b}, 1) 100%)`\n }\n return ''\n }\n\n function update() {\n thumbLeft.value = getThumbLeft()\n thumbTop.value = getThumbTop()\n background.value = getBackground()\n }\n\n onMounted(() => {\n if (!bar.value || !thumb.value) return\n\n const dragConfig = {\n drag: (event: MouseEvent | TouchEvent) => {\n handleDrag(event)\n },\n end: (event: MouseEvent | TouchEvent) => {\n handleDrag(event)\n },\n }\n\n draggable(bar.value, dragConfig)\n draggable(thumb.value, dragConfig)\n update()\n })\n\n watch(\n () => props.color.get('alpha'),\n () => update()\n )\n watch(\n () => props.color.value,\n () => update()\n )\n\n const rootKls = computed(() => [ns.b(), ns.is('vertical', props.vertical)])\n const barKls = computed(() => ns.e('bar'))\n const thumbKls = computed(() => ns.e('thumb'))\n const barStyle = computed(() => ({ background: background.value }))\n const thumbStyle = computed(() => ({\n left: addUnit(thumbLeft.value),\n top: addUnit(thumbTop.value),\n }))\n\n return { rootKls, barKls, barStyle, thumbKls, thumbStyle, update }\n}\n", "\n\n\n", "\n\n\n", "import { isNil } from 'lodash-unified'\nimport { buildProps, definePropType, isString } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, ExtractPropTypes, InjectionKey } from 'vue'\nimport type ColorPicker from './color-picker.vue'\n\nexport const colorPickerProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description ColorPicker id\n */\n id: String,\n /**\n * @description whether to display the alpha slider\n */\n showAlpha: Boolean,\n /**\n * @description color format of v-model\n */\n colorFormat: String,\n /**\n * @description whether to disable the ColorPicker\n */\n disabled: Boolean,\n /**\n * @description size of ColorPicker\n */\n size: useSizeProp,\n /**\n * @description custom class name for ColorPicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description ColorPicker aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description ColorPicker tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description predefined color options\n */\n predefine: {\n type: definePropType(Array),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport const colorPickerEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | null) => isString(val) || isNil(val),\n [CHANGE_EVENT]: (val: string | null) => isString(val) || isNil(val),\n activeChange: (val: string | null) => isString(val) || isNil(val),\n focus: (event: FocusEvent) => event instanceof FocusEvent,\n blur: (event: FocusEvent) => event instanceof FocusEvent,\n}\n\nexport type ColorPickerProps = ExtractPropTypes\nexport type ColorPickerEmits = typeof colorPickerEmits\nexport type ColorPickerInstance = InstanceType\n\nexport interface ColorPickerContext {\n currentColor: ComputedRef\n}\n\nexport const colorPickerContextKey: InjectionKey = Symbol(\n 'colorPickerContextKey'\n)\n", "import { hasOwn } from '@element-plus/utils'\n\nconst hsv2hsl = function (hue: number, sat: number, val: number) {\n return [\n hue,\n (sat * val) / ((hue = (2 - sat) * val) < 1 ? hue : 2 - hue) || 0,\n hue / 2,\n ]\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// \nconst isOnePointZero = function (n: unknown) {\n return typeof n === 'string' && n.includes('.') && Number.parseFloat(n) === 1\n}\n\nconst isPercentage = function (n: unknown) {\n return typeof n === 'string' && n.includes('%')\n}\n\n// Take input from [0, n] and return it as [0, 1]\nconst bound01 = function (value: number | string, max: number | string) {\n if (isOnePointZero(value)) value = '100%'\n\n const processPercent = isPercentage(value)\n value = Math.min(max as number, Math.max(0, Number.parseFloat(`${value}`)))\n\n // Automatically convert percentage into number\n if (processPercent) {\n value = Number.parseInt(`${value * (max as number)}`, 10) / 100\n }\n\n // Handle floating point rounding errors\n if (Math.abs(value - (max as number)) < 0.000001) {\n return 1\n }\n\n // Convert into [0, 1] range if it isn't already\n return (value % (max as number)) / Number.parseFloat(max as string)\n}\n\nconst INT_HEX_MAP: Record = {\n 10: 'A',\n 11: 'B',\n 12: 'C',\n 13: 'D',\n 14: 'E',\n 15: 'F',\n}\n\nconst hexOne = (value: number) => {\n value = Math.min(Math.round(value), 255)\n const high = Math.floor(value / 16)\n const low = value % 16\n return `${INT_HEX_MAP[high] || high}${INT_HEX_MAP[low] || low}`\n}\n\nconst toHex = function ({ r, g, b }: { r: number; g: number; b: number }) {\n if (Number.isNaN(+r) || Number.isNaN(+g) || Number.isNaN(+b)) return ''\n return `#${hexOne(r)}${hexOne(g)}${hexOne(b)}`\n}\n\nconst HEX_INT_MAP: Record = {\n A: 10,\n B: 11,\n C: 12,\n D: 13,\n E: 14,\n F: 15,\n}\n\nconst parseHexChannel = function (hex: string) {\n if (hex.length === 2) {\n return (\n (HEX_INT_MAP[hex[0].toUpperCase()] || +hex[0]) * 16 +\n (HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1])\n )\n }\n\n return HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1]\n}\n\nconst hsl2hsv = function (hue: number, sat: number, light: number) {\n sat = sat / 100\n light = light / 100\n let smin = sat\n const lmin = Math.max(light, 0.01)\n // let sv\n // let v\n\n light *= 2\n sat *= light <= 1 ? light : 2 - light\n smin *= lmin <= 1 ? lmin : 2 - lmin\n const v = (light + sat) / 2\n const sv =\n light === 0 ? (2 * smin) / (lmin + smin) : (2 * sat) / (light + sat)\n\n return {\n h: hue,\n s: sv * 100,\n v: v * 100,\n }\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nconst rgb2hsv = (r: number, g: number, b: number) => {\n r = bound01(r, 255)\n g = bound01(g, 255)\n b = bound01(b, 255)\n\n const max = Math.max(r, g, b)\n const min = Math.min(r, g, b)\n let h: number\n const v = max\n\n const d = max - min\n const s = max === 0 ? 0 : d / max\n\n if (max === min) {\n h = 0 // achromatic\n } else {\n switch (max) {\n case r: {\n h = (g - b) / d + (g < b ? 6 : 0)\n break\n }\n case g: {\n h = (b - r) / d + 2\n break\n }\n case b: {\n h = (r - g) / d + 4\n break\n }\n }\n h! /= 6\n }\n\n return { h: h! * 360, s: s * 100, v: v * 100 }\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nconst hsv2rgb = function (h: number, s: number, v: number) {\n h = bound01(h, 360) * 6\n s = bound01(s, 100)\n v = bound01(v, 100)\n\n const i = Math.floor(h)\n const f = h - i\n const p = v * (1 - s)\n const q = v * (1 - f * s)\n const t = v * (1 - (1 - f) * s)\n const mod = i % 6\n const r = [v, q, p, p, t, v][mod]\n const g = [t, v, v, q, p, p][mod]\n const b = [p, p, t, v, v, q][mod]\n\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255),\n }\n}\n\ninterface ColorOptions {\n enableAlpha: boolean\n format: string\n value?: string\n}\n\nexport default class Color {\n private _hue = 0\n private _saturation = 100\n private _value = 100\n _alpha = 100\n public enableAlpha = false\n public format = 'hex'\n public value = ''\n public selected?: boolean\n\n constructor(options: Partial = {}) {\n for (const option in options) {\n if (hasOwn(options, option)) {\n this[option] = options[option]\n }\n }\n if (options.value) {\n this.fromString(options.value)\n } else {\n this.doOnChange()\n }\n }\n\n set(prop: { [key: string]: any } | any, value?: number) {\n if (arguments.length === 1 && typeof prop === 'object') {\n for (const p in prop) {\n if (hasOwn(prop, p)) {\n this.set(p, prop[p])\n }\n }\n\n return\n }\n\n ;(this as any)[`_${prop}`] = value\n this.doOnChange()\n }\n\n get(prop: string) {\n if (prop === 'alpha') {\n return Math.floor(this[`_${prop}`])\n }\n return (this as any)[`_${prop}`]\n }\n\n toRgb() {\n return hsv2rgb(this._hue, this._saturation, this._value)\n }\n\n fromString(value: string) {\n if (!value) {\n this._hue = 0\n this._saturation = 100\n this._value = 100\n\n this.doOnChange()\n return\n }\n\n const fromHSV = (h: number, s: number, v: number) => {\n this._hue = Math.max(0, Math.min(360, h))\n this._saturation = Math.max(0, Math.min(100, s))\n this._value = Math.max(0, Math.min(100, v))\n\n this.doOnChange()\n }\n\n if (value.includes('hsl')) {\n const parts = value\n .replace(/hsla|hsl|\\(|\\)/gm, '')\n .split(/\\s|,/g)\n .filter((val) => val !== '')\n .map((val, index) =>\n index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10)\n )\n\n if (parts.length === 4) {\n // @ts-expect-error\n this._alpha = Number.parseFloat(parts[3]) * 100\n } else if (parts.length === 3) {\n this._alpha = 100\n }\n if (parts.length >= 3) {\n const { h, s, v } = hsl2hsv(parts[0], parts[1], parts[2])\n fromHSV(h, s, v)\n }\n } else if (value.includes('hsv')) {\n const parts = value\n .replace(/hsva|hsv|\\(|\\)/gm, '')\n .split(/\\s|,/g)\n .filter((val) => val !== '')\n .map((val, index) =>\n index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10)\n )\n\n if (parts.length === 4) {\n // @ts-expect-error\n this._alpha = Number.parseFloat(parts[3]) * 100\n } else if (parts.length === 3) {\n this._alpha = 100\n }\n if (parts.length >= 3) {\n fromHSV(parts[0], parts[1], parts[2])\n }\n } else if (value.includes('rgb')) {\n const parts = value\n .replace(/rgba|rgb|\\(|\\)/gm, '')\n .split(/\\s|,/g)\n .filter((val) => val !== '')\n .map((val, index) =>\n index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10)\n )\n\n if (parts.length === 4) {\n // @ts-expect-error\n this._alpha = Number.parseFloat(parts[3]) * 100\n } else if (parts.length === 3) {\n this._alpha = 100\n }\n if (parts.length >= 3) {\n const { h, s, v } = rgb2hsv(parts[0], parts[1], parts[2])\n fromHSV(h, s, v)\n }\n } else if (value.includes('#')) {\n const hex = value.replace('#', '').trim()\n if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(hex))\n return\n let r: number, g: number, b: number\n\n if (hex.length === 3) {\n r = parseHexChannel(hex[0] + hex[0])\n g = parseHexChannel(hex[1] + hex[1])\n b = parseHexChannel(hex[2] + hex[2])\n } else if (hex.length === 6 || hex.length === 8) {\n r = parseHexChannel(hex.slice(0, 2))\n g = parseHexChannel(hex.slice(2, 4))\n b = parseHexChannel(hex.slice(4, 6))\n }\n\n if (hex.length === 8) {\n this._alpha = (parseHexChannel(hex.slice(6)) / 255) * 100\n } else if (hex.length === 3 || hex.length === 6) {\n this._alpha = 100\n }\n\n const { h, s, v } = rgb2hsv(r!, g!, b!)\n fromHSV(h, s, v)\n }\n }\n\n compare(color: this) {\n return (\n Math.abs(color._hue - this._hue) < 2 &&\n Math.abs(color._saturation - this._saturation) < 1 &&\n Math.abs(color._value - this._value) < 1 &&\n Math.abs(color._alpha - this._alpha) < 1\n )\n }\n\n doOnChange() {\n const { _hue, _saturation, _value, _alpha, format } = this\n\n if (this.enableAlpha) {\n switch (format) {\n case 'hsl': {\n const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100)\n this.value = `hsla(${_hue}, ${Math.round(\n hsl[1] * 100\n )}%, ${Math.round(hsl[2] * 100)}%, ${this.get('alpha') / 100})`\n break\n }\n case 'hsv': {\n this.value = `hsva(${_hue}, ${Math.round(_saturation)}%, ${Math.round(\n _value\n )}%, ${this.get('alpha') / 100})`\n break\n }\n case 'hex': {\n this.value = `${toHex(hsv2rgb(_hue, _saturation, _value))}${hexOne(\n (_alpha * 255) / 100\n )}`\n break\n }\n default: {\n const { r, g, b } = hsv2rgb(_hue, _saturation, _value)\n this.value = `rgba(${r}, ${g}, ${b}, ${this.get('alpha') / 100})`\n }\n }\n } else {\n switch (format) {\n case 'hsl': {\n const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100)\n this.value = `hsl(${_hue}, ${Math.round(hsl[1] * 100)}%, ${Math.round(\n hsl[2] * 100\n )}%)`\n break\n }\n case 'hsv': {\n this.value = `hsv(${_hue}, ${Math.round(_saturation)}%, ${Math.round(\n _value\n )}%)`\n break\n }\n case 'rgb': {\n const { r, g, b } = hsv2rgb(_hue, _saturation, _value)\n this.value = `rgb(${r}, ${g}, ${b})`\n break\n }\n default: {\n this.value = toHex(hsv2rgb(_hue, _saturation, _value))\n }\n }\n }\n }\n}\n", "\n\n\n", "\n\n\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport ColorPicker from './src/color-picker.vue'\n\nexport const ElColorPicker = withInstall(ColorPicker)\nexport default ElColorPicker\n\nexport * from './src/color-picker'\n", "\n\n", "\n\n", "\n\n", "\n\n", "\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Container from './src/container.vue'\nimport Aside from './src/aside.vue'\nimport Footer from './src/footer.vue'\nimport Header from './src/header.vue'\nimport Main from './src/main.vue'\n\nexport const ElContainer = withInstall(Container, {\n Aside,\n Footer,\n Header,\n Main,\n})\n\nexport default ElContainer\nexport const ElAside = withNoopInstall(Aside)\nexport const ElFooter = withNoopInstall(Footer)\nexport const ElHeader = withNoopInstall(Header)\nexport const ElMain = withNoopInstall(Main)\n\nexport type ContainerInstance = InstanceType\nexport type AsideInstance = InstanceType\nexport type FooterInstance = InstanceType\nexport type HeaderInstance = InstanceType\nexport type MainInstance = InstanceType\n", "import type { InjectionKey, SetupContext } from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\n\ninterface DatePickerContext {\n slots: SetupContext['slots']\n pickerNs: UseNamespaceReturn\n}\n\nexport const ROOT_PICKER_INJECTION_KEY: InjectionKey =\n Symbol()\n", "import { timePickerDefaultProps } from '@element-plus/components/time-picker'\nimport { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { IDatePickerType } from '../date-picker.type'\n\nexport const datePickerProps = buildProps({\n ...timePickerDefaultProps,\n /**\n * @description type of the picker\n */\n type: {\n type: definePropType(String),\n default: 'date',\n },\n} as const)\n\nexport type DatePickerProps = ExtractPropTypes\n", "import { buildProps, definePropType, isArray } from '@element-plus/utils'\nimport { datePickTypes } from '@element-plus/constants'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DatePickType } from '@element-plus/constants'\n\nconst selectionModes = ['date', 'dates', 'year', 'month', 'week', 'range']\n\nexport type RangeState = {\n endDate: null | Dayjs\n selecting: boolean\n}\n\nexport const datePickerSharedProps = buildProps({\n disabledDate: {\n type: definePropType<(date: Date) => boolean>(Function),\n },\n date: {\n type: definePropType(Object),\n required: true,\n },\n minDate: {\n type: definePropType(Object),\n },\n maxDate: {\n type: definePropType(Object),\n },\n parsedValue: {\n type: definePropType([Object, Array]),\n },\n rangeState: {\n type: definePropType(Object),\n default: () => ({\n endDate: null,\n selecting: false,\n }),\n },\n} as const)\n\nexport const panelSharedProps = buildProps({\n type: {\n type: definePropType(String),\n required: true,\n values: datePickTypes,\n },\n dateFormat: String,\n timeFormat: String,\n} as const)\n\nexport const panelRangeSharedProps = buildProps({\n unlinkPanels: Boolean,\n parsedValue: {\n type: definePropType(Array),\n },\n} as const)\n\nexport const selectionModeWithDefault = (\n mode: typeof selectionModes[number]\n) => {\n return {\n type: String,\n values: selectionModes,\n default: mode,\n }\n}\n\nexport const rangePickerSharedEmits = {\n pick: (range: [Dayjs, Dayjs]) => isArray(range),\n}\n\nexport type RangePickerSharedEmits = typeof rangePickerSharedEmits\nexport type PanelRangeSharedProps = ExtractPropTypes<\n typeof panelRangeSharedProps\n>\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { panelSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const panelDatePickProps = buildProps({\n ...panelSharedProps,\n parsedValue: {\n type: definePropType([Object, Array]),\n },\n visible: {\n type: Boolean,\n },\n format: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type PanelDatePickProps = ExtractPropTypes\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { datePickerSharedProps, selectionModeWithDefault } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const basicDateTableProps = buildProps({\n ...datePickerSharedProps,\n cellClassName: {\n type: definePropType<(date: Date) => string>(Function),\n },\n showWeekNumber: Boolean,\n selectionMode: selectionModeWithDefault('date'),\n} as const)\n\nexport const basicDateTableEmits = ['changerange', 'pick', 'select']\n\nexport type BasicDateTableProps = ExtractPropTypes\nexport type BasicDateTableEmits = typeof basicDateTableEmits\n\nexport type RangePickerEmits = { minDate: Dayjs; maxDate: null }\nexport type DatePickerEmits = Dayjs\nexport type DatesPickerEmits = Dayjs[]\nexport type WeekPickerEmits = {\n year: number\n week: number\n value: string\n date: Dayjs\n}\n\nexport type DateTableEmits =\n | RangePickerEmits\n | DatePickerEmits\n | DatesPickerEmits\n | WeekPickerEmits\n", "import dayjs from 'dayjs'\nimport { isArray } from '@element-plus/utils'\n\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from './date-picker.type'\n\ntype DayRange = [Dayjs | undefined, Dayjs | undefined]\n\nexport const isValidRange = (range: DayRange): boolean => {\n if (!isArray(range)) return false\n\n const [left, right] = range\n\n return (\n dayjs.isDayjs(left) && dayjs.isDayjs(right) && left.isSameOrBefore(right)\n )\n}\n\ntype GetDefaultValueParams = {\n lang: string\n unit: 'month' | 'year'\n unlinkPanels: boolean\n}\n\nexport type DefaultValue = [Date, Date] | Date | undefined\n\nexport const getDefaultValue = (\n defaultValue: DefaultValue,\n { lang, unit, unlinkPanels }: GetDefaultValueParams\n) => {\n let start: Dayjs\n\n if (isArray(defaultValue)) {\n let [left, right] = defaultValue.map((d) => dayjs(d).locale(lang))\n if (!unlinkPanels) {\n right = left.add(1, unit)\n }\n return [left, right]\n } else if (defaultValue) {\n start = dayjs(defaultValue)\n } else {\n start = dayjs()\n }\n start = start.locale(lang)\n return [start, start.add(1, unit)]\n}\n\ntype Dimension = {\n row: number\n column: number\n}\n\ntype BuildPickerTableMetadata = {\n startDate?: Dayjs | null\n unit: 'month' | 'day'\n columnIndexOffset: number\n now: Dayjs\n nextEndDate: Dayjs | null\n relativeDateGetter: (index: number) => Dayjs\n setCellMetadata?: (\n cell: DateCell,\n dimension: { rowIndex: number; columnIndex: number }\n ) => void\n setRowMetadata?: (row: DateCell[]) => void\n}\n\nexport const buildPickerTable = (\n dimension: Dimension,\n rows: DateCell[][],\n {\n columnIndexOffset,\n startDate,\n nextEndDate,\n now,\n unit,\n relativeDateGetter,\n setCellMetadata,\n setRowMetadata,\n }: BuildPickerTableMetadata\n) => {\n for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {\n const row = rows[rowIndex]\n for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {\n let cell = row[columnIndex + columnIndexOffset]\n if (!cell) {\n cell = {\n row: rowIndex,\n column: columnIndex,\n type: 'normal',\n inRange: false,\n start: false,\n end: false,\n }\n }\n const index = rowIndex * dimension.column + columnIndex\n const nextStartDate = relativeDateGetter(index)\n cell.dayjs = nextStartDate\n cell.date = nextStartDate.toDate()\n cell.timestamp = nextStartDate.valueOf()\n cell.type = 'normal'\n\n cell.inRange =\n !!(\n startDate &&\n nextStartDate.isSameOrAfter(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrBefore(nextEndDate, unit)\n ) ||\n !!(\n startDate &&\n nextStartDate.isSameOrBefore(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrAfter(nextEndDate, unit)\n )\n\n if (startDate?.isSameOrAfter(nextEndDate)) {\n cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n cell.end = startDate && nextStartDate.isSame(startDate, unit)\n } else {\n cell.start = !!startDate && nextStartDate.isSame(startDate, unit)\n cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n }\n\n const isToday = nextStartDate.isSame(now, unit)\n\n if (isToday) {\n cell.type = 'today'\n }\n setCellMetadata?.(cell, { rowIndex, columnIndex })\n row[columnIndex + columnIndexOffset] = cell\n }\n setRowMetadata?.(row)\n }\n}\n", "import { computed, nextTick, ref, unref, watch } from 'vue'\nimport dayjs from 'dayjs'\nimport { flatten } from 'lodash-unified'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { castArray } from '@element-plus/utils'\nimport { buildPickerTable } from '../utils'\n\nimport type { SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from '../date-picker.type'\nimport type {\n BasicDateTableEmits,\n BasicDateTableProps,\n} from '../props/basic-date-table'\n\nconst isNormalDay = (type = '') => {\n return ['normal', 'today'].includes(type)\n}\n\nexport const useBasicDateTable = (\n props: BasicDateTableProps,\n emit: SetupContext['emit']\n) => {\n const { lang } = useLocale()\n const tbodyRef = ref()\n const currentCellRef = ref()\n // data\n const lastRow = ref()\n const lastColumn = ref()\n const tableRows = ref([[], [], [], [], [], []])\n\n let focusWithClick = false\n\n // todo better way to get Day.js locale object\n const firstDayOfWeek = (props.date as any).$locale().weekStart || 7\n const WEEKS_CONSTANT = props.date\n .locale('en')\n .localeData()\n .weekdaysShort()\n .map((_) => _.toLowerCase())\n\n const offsetDay = computed(() => {\n // Sunday 7(0), cal the left and right offset days, 3217654, such as Monday is -1, the is to adjust the position of the first two rows of dates\n return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek\n })\n\n const startDate = computed(() => {\n const startDayOfMonth = props.date.startOf('month')\n return startDayOfMonth.subtract(startDayOfMonth.day() || 7, 'day')\n })\n\n const WEEKS = computed(() => {\n return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(\n firstDayOfWeek,\n firstDayOfWeek + 7\n )\n })\n\n const hasCurrent = computed(() => {\n return flatten(unref(rows)).some((row) => {\n return row.isCurrent\n })\n })\n\n const days = computed(() => {\n const startOfMonth = props.date.startOf('month')\n const startOfMonthDay = startOfMonth.day() || 7 // day of first day\n const dateCountOfMonth = startOfMonth.daysInMonth()\n\n const dateCountOfLastMonth = startOfMonth.subtract(1, 'month').daysInMonth()\n\n return {\n startOfMonthDay,\n dateCountOfMonth,\n dateCountOfLastMonth,\n }\n })\n\n const selectedDate = computed(() => {\n return props.selectionMode === 'dates'\n ? (castArray(props.parsedValue) as Dayjs[])\n : ([] as Dayjs[])\n })\n\n // Return value indicates should the counter be incremented\n type CellCoordinate = { columnIndex: number; rowIndex: number }\n type CellMeta = CellCoordinate & {\n count: number\n }\n const setDateText = (\n cell: DateCell,\n { count, rowIndex, columnIndex }: CellMeta\n ): boolean => {\n const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } =\n unref(days)\n const offset = unref(offsetDay)\n if (rowIndex >= 0 && rowIndex <= 1) {\n const numberOfDaysFromPreviousMonth =\n startOfMonthDay + offset < 0\n ? 7 + startOfMonthDay + offset\n : startOfMonthDay + offset\n\n if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) {\n cell.text = count\n return true\n } else {\n cell.text =\n dateCountOfLastMonth -\n (numberOfDaysFromPreviousMonth - (columnIndex % 7)) +\n 1 +\n rowIndex * 7\n cell.type = 'prev-month'\n }\n } else {\n if (count <= dateCountOfMonth) {\n cell.text = count\n } else {\n cell.text = count - dateCountOfMonth\n cell.type = 'next-month'\n }\n return true\n }\n return false\n }\n\n const setCellMetadata = (\n cell: DateCell,\n { columnIndex, rowIndex }: CellCoordinate,\n count: number\n ) => {\n const { disabledDate, cellClassName } = props\n const _selectedDate = unref(selectedDate)\n const shouldIncrement = setDateText(cell, { count, rowIndex, columnIndex })\n\n const cellDate = cell.dayjs!.toDate()\n cell.selected = _selectedDate.find(\n (d) => d.valueOf() === cell.dayjs!.valueOf()\n )\n cell.isSelected = !!cell.selected\n cell.isCurrent = isCurrent(cell)\n cell.disabled = disabledDate?.(cellDate)\n cell.customClass = cellClassName?.(cellDate)\n return shouldIncrement\n }\n\n const setRowMetadata = (row: DateCell[]) => {\n if (props.selectionMode === 'week') {\n const [start, end] = props.showWeekNumber ? [1, 7] : [0, 6]\n const isActive = isWeekActive(row[start + 1])\n row[start].inRange = isActive\n row[start].start = isActive\n row[end].inRange = isActive\n row[end].end = isActive\n }\n }\n\n const rows = computed(() => {\n const { minDate, maxDate, rangeState, showWeekNumber } = props\n\n const offset = unref(offsetDay)\n const rows_ = unref(tableRows)\n const dateUnit = 'day'\n let count = 1\n\n if (showWeekNumber) {\n for (let rowIndex = 0; rowIndex < 6; rowIndex++) {\n if (!rows_[rowIndex][0]) {\n rows_[rowIndex][0] = {\n type: 'week',\n text: unref(startDate)\n .add(rowIndex * 7 + 1, dateUnit)\n .week(),\n }\n }\n }\n }\n\n buildPickerTable({ row: 6, column: 7 }, rows_, {\n startDate: minDate,\n columnIndexOffset: showWeekNumber ? 1 : 0,\n nextEndDate:\n rangeState.endDate ||\n maxDate ||\n (rangeState.selecting && minDate) ||\n null,\n now: dayjs().locale(unref(lang)).startOf(dateUnit),\n unit: dateUnit,\n relativeDateGetter: (idx: number) =>\n unref(startDate).add(idx - offset, dateUnit),\n setCellMetadata: (...args) => {\n if (setCellMetadata(...args, count)) {\n count += 1\n }\n },\n\n setRowMetadata,\n })\n\n return rows_\n })\n\n watch(\n () => props.date,\n async () => {\n if (unref(tbodyRef)?.contains(document.activeElement)) {\n await nextTick()\n await focus()\n // currentCellRef.value?.focus()\n }\n }\n )\n\n const focus = async () => unref(currentCellRef)?.focus()\n\n const isCurrent = (cell: DateCell): boolean => {\n return (\n props.selectionMode === 'date' &&\n isNormalDay(cell.type) &&\n cellMatchesDate(cell, props.parsedValue as Dayjs)\n )\n }\n\n const cellMatchesDate = (cell: DateCell, date: Dayjs) => {\n if (!date) return false\n return dayjs(date)\n .locale(unref(lang))\n .isSame(props.date.date(Number(cell.text)), 'day')\n }\n\n const getDateOfCell = (row: number, column: number) => {\n const offsetFromStart =\n row * 7 + (column - (props.showWeekNumber ? 1 : 0)) - unref(offsetDay)\n return unref(startDate).add(offsetFromStart, 'day')\n }\n\n const handleMouseMove = (event: MouseEvent) => {\n if (!props.rangeState.selecting) return\n\n let target = event.target as HTMLElement\n if (target.tagName === 'SPAN') {\n target = target.parentNode?.parentNode as HTMLElement\n }\n if (target.tagName === 'DIV') {\n target = target.parentNode as HTMLElement\n }\n if (target.tagName !== 'TD') return\n\n const row = (target.parentNode as HTMLTableRowElement).rowIndex - 1\n const column = (target as HTMLTableCellElement).cellIndex\n\n // can not select disabled date\n if (unref(rows)[row][column].disabled) return\n\n // only update rangeState when mouse moves to a new cell\n // this avoids frequent Date object creation and improves performance\n if (row !== unref(lastRow) || column !== unref(lastColumn)) {\n lastRow.value = row\n lastColumn.value = column\n emit('changerange', {\n selecting: true,\n endDate: getDateOfCell(row, column),\n })\n }\n }\n\n const isSelectedCell = (cell: DateCell) => {\n return (\n (!unref(hasCurrent) && cell?.text === 1 && cell.type === 'normal') ||\n cell.isCurrent\n )\n }\n\n const handleFocus = (event: FocusEvent) => {\n if (focusWithClick || unref(hasCurrent) || props.selectionMode !== 'date')\n return\n handlePickDate(event, true)\n }\n\n const handleMouseDown = (event: MouseEvent) => {\n const target = (event.target as HTMLElement).closest('td')\n if (!target) return\n focusWithClick = true\n }\n\n const handleMouseUp = (event: MouseEvent) => {\n const target = (event.target as HTMLElement).closest('td')\n if (!target) return\n focusWithClick = false\n }\n\n const handleRangePick = (newDate: Dayjs) => {\n if (!props.rangeState.selecting || !props.minDate) {\n emit('pick', { minDate: newDate, maxDate: null })\n emit('select', true)\n } else {\n if (newDate >= props.minDate) {\n emit('pick', { minDate: props.minDate, maxDate: newDate })\n } else {\n emit('pick', { minDate: newDate, maxDate: props.minDate })\n }\n emit('select', false)\n }\n }\n\n const handleWeekPick = (newDate: Dayjs) => {\n const weekNumber = newDate.week()\n const value = `${newDate.year()}w${weekNumber}`\n emit('pick', {\n year: newDate.year(),\n week: weekNumber,\n value,\n date: newDate.startOf('week'),\n })\n }\n\n const handleDatesPick = (newDate: Dayjs, selected: boolean) => {\n const newValue = selected\n ? castArray(props.parsedValue).filter(\n (d) => d?.valueOf() !== newDate.valueOf()\n )\n : castArray(props.parsedValue).concat([newDate])\n emit('pick', newValue)\n }\n\n const handlePickDate = (\n event: FocusEvent | MouseEvent,\n isKeyboardMovement = false\n ) => {\n const target = (event.target as HTMLElement).closest('td')\n\n if (!target) return\n\n const row = (target.parentNode as HTMLTableRowElement).rowIndex - 1\n const column = (target as HTMLTableCellElement).cellIndex\n const cell = unref(rows)[row][column]\n\n if (cell.disabled || cell.type === 'week') return\n\n const newDate = getDateOfCell(row, column)\n\n switch (props.selectionMode) {\n case 'range': {\n handleRangePick(newDate)\n break\n }\n case 'date': {\n emit('pick', newDate, isKeyboardMovement)\n break\n }\n case 'week': {\n handleWeekPick(newDate)\n break\n }\n case 'dates': {\n handleDatesPick(newDate, !!cell.selected)\n break\n }\n default: {\n break\n }\n }\n }\n\n const isWeekActive = (cell: DateCell) => {\n if (props.selectionMode !== 'week') return false\n let newDate = props.date.startOf('day')\n\n if (cell.type === 'prev-month') {\n newDate = newDate.subtract(1, 'month')\n }\n\n if (cell.type === 'next-month') {\n newDate = newDate.add(1, 'month')\n }\n\n newDate = newDate.date(Number.parseInt(cell.text as any, 10))\n\n if (props.parsedValue && !Array.isArray(props.parsedValue)) {\n const dayOffset = ((props.parsedValue.day() - firstDayOfWeek + 7) % 7) - 1\n const weekDate = props.parsedValue.subtract(dayOffset, 'day')\n return weekDate.isSame(newDate, 'day')\n }\n return false\n }\n\n return {\n WEEKS,\n rows,\n tbodyRef,\n currentCellRef,\n\n // cellMatchesDate,\n // getDateOfCell,\n focus,\n isCurrent,\n isWeekActive,\n isSelectedCell,\n\n handlePickDate,\n handleMouseUp,\n handleMouseDown,\n handleMouseMove,\n handleFocus,\n }\n}\n\nexport const useBasicDateTableDOM = (\n props: BasicDateTableProps,\n {\n isCurrent,\n isWeekActive,\n }: Pick, 'isCurrent' | 'isWeekActive'>\n) => {\n const ns = useNamespace('date-table')\n const { t } = useLocale()\n\n const tableKls = computed(() => [\n ns.b(),\n { 'is-week-mode': props.selectionMode === 'week' },\n ])\n\n const tableLabel = computed(() => t('el.datepicker.dateTablePrompt'))\n const weekLabel = computed(() => t('el.datepicker.week'))\n\n const getCellClasses = (cell: DateCell) => {\n const classes: string[] = []\n if (isNormalDay(cell.type) && !cell.disabled) {\n classes.push('available')\n if (cell.type === 'today') {\n classes.push('today')\n }\n } else {\n classes.push(cell.type!)\n }\n\n if (isCurrent(cell)) {\n classes.push('current')\n }\n\n if (\n cell.inRange &&\n (isNormalDay(cell.type) || props.selectionMode === 'week')\n ) {\n classes.push('in-range')\n\n if (cell.start) {\n classes.push('start-date')\n }\n\n if (cell.end) {\n classes.push('end-date')\n }\n }\n\n if (cell.disabled) {\n classes.push('disabled')\n }\n\n if (cell.selected) {\n classes.push('selected')\n }\n\n if (cell.customClass) {\n classes.push(cell.customClass)\n }\n\n return classes.join(' ')\n }\n\n const getRowKls = (cell: DateCell) => [\n ns.e('row'),\n { current: isWeekActive(cell) },\n ]\n\n return {\n tableKls,\n tableLabel,\n weekLabel,\n\n getCellClasses,\n getRowKls,\n t,\n }\n}\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { DateCell } from '../date-picker.type'\n\nexport const basicCellProps = buildProps({\n cell: {\n type: definePropType(Object),\n },\n} as const)\n\nexport type BasicCellProps = ExtractPropTypes\n", "import { defineComponent, inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ROOT_PICKER_INJECTION_KEY } from '../constants'\nimport { basicCellProps } from '../props/basic-cell'\n\nexport default defineComponent({\n name: 'ElDatePickerCell',\n props: basicCellProps,\n setup(props) {\n const ns = useNamespace('date-table-cell')\n const { slots } = inject(ROOT_PICKER_INJECTION_KEY)!\n return () => {\n const { cell } = props\n if (slots.default) {\n const list = slots.default(cell).filter((item) => {\n return (\n item.patchFlag !== -2 &&\n item.type.toString() !== 'Symbol(Comment)' &&\n item.type.toString() !== 'Symbol(v-cmt)'\n )\n })\n if (list.length) {\n return list\n }\n }\n\n return (\n
\n {cell?.text}\n
\n )\n }\n },\n})\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { datePickerSharedProps, selectionModeWithDefault } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const basicMonthTableProps = buildProps({\n ...datePickerSharedProps,\n selectionMode: selectionModeWithDefault('month'),\n})\n\nexport type BasicMonthTableProps = ExtractPropTypes\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { datePickerSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\n\nconst { date, disabledDate, parsedValue } = datePickerSharedProps\n\nexport const basicYearTableProps = buildProps({\n date,\n disabledDate,\n parsedValue,\n})\n\nexport type BasicYearTableProps = ExtractPropTypes\n", "\n\n\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { panelRangeSharedProps, panelSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const panelDateRangeProps = buildProps({\n ...panelSharedProps,\n ...panelRangeSharedProps,\n} as const)\n\nexport type PanelDateRangeProps = ExtractPropTypes\n", "import { getCurrentInstance, useAttrs, useSlots } from 'vue'\nimport dayjs from 'dayjs'\nimport { isFunction } from '@element-plus/utils'\n\nimport type { SetupContext } from 'vue'\nimport type { useLocale } from '@element-plus/hooks'\nimport type { RangePickerSharedEmits } from '../props/shared'\n\n// FIXME: extract this to `date-picker.ts`\nexport type Shortcut = {\n text: string\n value: [Date, Date] | (() => [Date, Date])\n onClick?: (ctx: Omit, 'expose'>) => void\n}\n\nexport const useShortcut = (lang: ReturnType['lang']) => {\n const { emit } = getCurrentInstance()!\n const attrs = useAttrs()\n const slots = useSlots()\n\n const handleShortcutClick = (shortcut: Shortcut) => {\n const shortcutValues = isFunction(shortcut.value)\n ? shortcut.value()\n : shortcut.value\n\n if (shortcutValues) {\n emit('pick', [\n dayjs(shortcutValues[0]).locale(lang.value),\n dayjs(shortcutValues[1]).locale(lang.value),\n ])\n return\n }\n if (shortcut.onClick) {\n shortcut.onClick({\n attrs,\n slots,\n emit,\n })\n }\n }\n\n return handleShortcutClick\n}\n", "import { getCurrentInstance, inject, ref, unref, watch } from 'vue'\nimport { isArray } from '@element-plus/utils'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { getDefaultValue, isValidRange } from '../utils'\nimport { ROOT_PICKER_INJECTION_KEY } from '../constants'\nimport { useShortcut } from './use-shortcut'\n\nimport type { Ref } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { PanelRangeSharedProps, RangeState } from '../props/shared'\nimport type { DefaultValue } from '../utils'\n\ntype UseRangePickerProps = {\n onParsedValueChanged: (\n minDate: Dayjs | undefined,\n maxDate: Dayjs | undefined\n ) => void\n defaultValue: Ref\n leftDate: Ref\n rightDate: Ref\n unit: 'month' | 'year'\n}\n\nexport const useRangePicker = (\n props: PanelRangeSharedProps,\n {\n defaultValue,\n leftDate,\n rightDate,\n unit,\n\n onParsedValueChanged,\n }: UseRangePickerProps\n) => {\n const { emit } = getCurrentInstance()!\n\n const { pickerNs } = inject(ROOT_PICKER_INJECTION_KEY)!\n const drpNs = useNamespace('date-range-picker')\n const { t, lang } = useLocale()\n const handleShortcutClick = useShortcut(lang)\n const minDate = ref()\n const maxDate = ref()\n const rangeState = ref({\n endDate: null,\n selecting: false,\n })\n\n const handleChangeRange = (val: RangeState) => {\n rangeState.value = val\n }\n\n const handleRangeConfirm = (visible = false) => {\n const _minDate = unref(minDate)\n const _maxDate = unref(maxDate)\n\n if (isValidRange([_minDate, _maxDate])) {\n emit('pick', [_minDate, _maxDate], visible)\n }\n }\n\n const onSelect = (selecting: boolean) => {\n rangeState.value.selecting = selecting\n if (!selecting) {\n rangeState.value.endDate = null\n }\n }\n\n const restoreDefault = () => {\n const [start, end] = getDefaultValue(unref(defaultValue), {\n lang: unref(lang),\n unit,\n unlinkPanels: props.unlinkPanels,\n })\n minDate.value = undefined\n maxDate.value = undefined\n leftDate.value = start\n rightDate.value = end\n }\n\n watch(\n defaultValue,\n (val) => {\n if (val) {\n restoreDefault()\n }\n },\n { immediate: true }\n )\n\n watch(\n () => props.parsedValue,\n (parsedValue) => {\n if (isArray(parsedValue) && parsedValue.length === 2) {\n const [start, end] = parsedValue\n minDate.value = start\n leftDate.value = start\n maxDate.value = end\n onParsedValueChanged(unref(minDate), unref(maxDate))\n } else {\n restoreDefault()\n }\n },\n { immediate: true }\n )\n\n return {\n minDate,\n maxDate,\n rangeState,\n lang,\n ppNs: pickerNs,\n drpNs,\n\n handleChangeRange,\n handleRangeConfirm,\n handleShortcutClick,\n onSelect,\n t,\n }\n}\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { panelRangeSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const panelMonthRangeProps = buildProps({\n ...panelRangeSharedProps,\n} as const)\n\nexport const panelMonthRangeEmits = [\n 'pick',\n 'set-picker-option',\n 'calendar-change',\n]\n\nexport type PanelMonthRangeProps = ExtractPropTypes\n", "import { computed } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport type { Ref, ToRef } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const useMonthRangeHeader = ({\n unlinkPanels,\n leftDate,\n rightDate,\n}: {\n unlinkPanels: ToRef\n leftDate: Ref\n rightDate: Ref\n}) => {\n const { t } = useLocale()\n const leftPrevYear = () => {\n leftDate.value = leftDate.value.subtract(1, 'year')\n if (!unlinkPanels.value) {\n rightDate.value = rightDate.value.subtract(1, 'year')\n }\n }\n\n const rightNextYear = () => {\n if (!unlinkPanels.value) {\n leftDate.value = leftDate.value.add(1, 'year')\n }\n rightDate.value = rightDate.value.add(1, 'year')\n }\n\n const leftNextYear = () => {\n leftDate.value = leftDate.value.add(1, 'year')\n }\n\n const rightPrevYear = () => {\n rightDate.value = rightDate.value.subtract(1, 'year')\n }\n const leftLabel = computed(() => {\n return `${leftDate.value.year()} ${t('el.datepicker.year')}`\n })\n\n const rightLabel = computed(() => {\n return `${rightDate.value.year()} ${t('el.datepicker.year')}`\n })\n\n const leftYear = computed(() => {\n return leftDate.value.year()\n })\n\n const rightYear = computed(() => {\n return rightDate.value.year() === leftDate.value.year()\n ? leftDate.value.year() + 1\n : rightDate.value.year()\n })\n\n return {\n leftPrevYear,\n rightNextYear,\n leftNextYear,\n rightPrevYear,\n leftLabel,\n rightLabel,\n leftYear,\n rightYear,\n }\n}\n", "\n\n\n", "import DatePickPanel from './date-picker-com/panel-date-pick.vue'\nimport DateRangePickPanel from './date-picker-com/panel-date-range.vue'\nimport MonthRangePickPanel from './date-picker-com/panel-month-range.vue'\nimport type { IDatePickerType } from './date-picker.type'\n\nexport const getPanel = function (type: IDatePickerType) {\n switch (type) {\n case 'daterange':\n case 'datetimerange': {\n return DateRangePickPanel\n }\n case 'monthrange': {\n return MonthRangePickPanel\n }\n default: {\n return DatePickPanel\n }\n }\n}\n", "import { defineComponent, provide, reactive, ref, toRef } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport advancedFormat from 'dayjs/plugin/advancedFormat.js'\nimport localeData from 'dayjs/plugin/localeData.js'\nimport weekOfYear from 'dayjs/plugin/weekOfYear.js'\nimport weekYear from 'dayjs/plugin/weekYear.js'\nimport dayOfYear from 'dayjs/plugin/dayOfYear.js'\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js'\nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'\nimport { useNamespace } from '@element-plus/hooks'\nimport {\n CommonPicker,\n DEFAULT_FORMATS_DATE,\n DEFAULT_FORMATS_DATEPICKER,\n} from '@element-plus/components/time-picker'\nimport { ROOT_PICKER_INJECTION_KEY } from './constants'\n\nimport { datePickerProps } from './props/date-picker'\nimport { getPanel } from './panel-utils'\nimport type { DatePickerExpose } from './instance'\n\ndayjs.extend(localeData)\ndayjs.extend(advancedFormat)\ndayjs.extend(customParseFormat)\ndayjs.extend(weekOfYear)\ndayjs.extend(weekYear)\ndayjs.extend(dayOfYear)\ndayjs.extend(isSameOrAfter)\ndayjs.extend(isSameOrBefore)\n\nexport default defineComponent({\n name: 'ElDatePicker',\n install: null,\n props: datePickerProps,\n emits: ['update:modelValue'],\n setup(props, { expose, emit, slots }) {\n const ns = useNamespace('picker-panel')\n\n provide('ElPopperOptions', reactive(toRef(props, 'popperOptions')))\n provide(ROOT_PICKER_INJECTION_KEY, {\n slots,\n pickerNs: ns,\n })\n\n const commonPicker = ref>()\n const refProps: DatePickerExpose = {\n focus: (focusStartInput = true) => {\n commonPicker.value?.focus(focusStartInput)\n },\n handleOpen: () => {\n commonPicker.value?.handleOpen()\n },\n handleClose: () => {\n commonPicker.value?.handleClose()\n },\n }\n\n expose(refProps)\n\n const onModelValueUpdated = (val: any) => {\n emit('update:modelValue', val)\n }\n\n return () => {\n // since props always have all defined keys on it, {format, ...props} will always overwrite format\n // pick props.format or provide default value here before spreading\n const format =\n props.format ??\n (DEFAULT_FORMATS_DATEPICKER[props.type] || DEFAULT_FORMATS_DATE)\n\n const Component = getPanel(props.type)\n\n return (\n \n {{\n default: (scopedProps: /**FIXME: remove any type */ any) => (\n \n ),\n 'range-separator': slots['range-separator'],\n }}\n \n )\n }\n },\n})\n", "import DatePicker from './src/date-picker'\n\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nconst _DatePicker = DatePicker as SFCWithInstall\n\n_DatePicker.install = (app: App) => {\n app.component(_DatePicker.name, _DatePicker)\n}\n\nexport default _DatePicker\nexport const ElDatePicker = _DatePicker\nexport * from './src/constants'\nexport * from './src/props/date-picker'\nexport type { DatePickerInstance } from './src/instance'\n", "import type { InjectionKey } from 'vue'\nimport type { IDescriptionsInject } from './descriptions.type'\n\nexport const descriptionsKey: InjectionKey =\n Symbol('elDescriptions')\n", "import { defineComponent, h, inject, withDirectives } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { addUnit, getNormalizedProps } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { descriptionsKey } from './token'\nimport type { DirectiveArguments, PropType, VNode } from 'vue'\n\nimport type {\n IDescriptionsInject,\n IDescriptionsItemInject,\n} from './descriptions.type'\nimport type { DescriptionItemVNode } from './description-item'\n\nexport default defineComponent({\n name: 'ElDescriptionsCell',\n props: {\n cell: {\n type: Object as PropType,\n },\n tag: {\n type: String,\n default: 'td',\n },\n type: {\n type: String,\n },\n },\n setup() {\n const descriptions = inject(descriptionsKey, {} as IDescriptionsInject)\n\n return {\n descriptions,\n }\n },\n render() {\n const item = getNormalizedProps(\n this.cell as VNode\n ) as IDescriptionsItemInject\n\n const directives = (this.cell?.dirs || []).map((dire) => {\n const { dir, arg, modifiers, value } = dire\n return [dir, value, arg, modifiers]\n }) as DirectiveArguments\n\n const { border, direction } = this.descriptions\n const isVertical = direction === 'vertical'\n const label = this.cell?.children?.label?.() || item.label\n const content = this.cell?.children?.default?.()\n const span = item.span\n const align = item.align ? `is-${item.align}` : ''\n const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : '' || align\n const className = item.className\n const labelClassName = item.labelClassName\n const style = {\n width: addUnit(item.width),\n minWidth: addUnit(item.minWidth),\n }\n const ns = useNamespace('descriptions')\n\n switch (this.type) {\n case 'label':\n return withDirectives(\n h(\n this.tag,\n {\n style,\n class: [\n ns.e('cell'),\n ns.e('label'),\n ns.is('bordered-label', border),\n ns.is('vertical-label', isVertical),\n labelAlign,\n labelClassName,\n ],\n colSpan: isVertical ? span : 1,\n },\n label\n ),\n directives\n )\n case 'content':\n return withDirectives(\n h(\n this.tag,\n {\n style,\n class: [\n ns.e('cell'),\n ns.e('content'),\n ns.is('bordered-content', border),\n ns.is('vertical-content', isVertical),\n align,\n className,\n ],\n colSpan: isVertical ? span : span * 2 - 1,\n },\n content\n ),\n directives\n )\n default:\n return withDirectives(\n h(\n 'td',\n {\n style,\n class: [ns.e('cell'), align],\n colSpan: span,\n },\n [\n !isNil(label)\n ? h(\n 'span',\n {\n class: [ns.e('label'), labelClassName],\n },\n label\n )\n : undefined,\n h(\n 'span',\n {\n class: [ns.e('content'), className],\n },\n content\n ),\n ]\n ),\n directives\n )\n }\n },\n})\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { DescriptionItemVNode } from './description-item'\n\nexport const descriptionsRowProps = buildProps({\n row: {\n type: definePropType(Array),\n default: () => [],\n },\n} as const)\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\n\nimport type Description from './description.vue'\n\nexport const descriptionProps = buildProps({\n /**\n * @description with or without border\n */\n border: {\n type: Boolean,\n default: false,\n },\n /**\n * @description numbers of `Descriptions Item` in one line\n */\n column: {\n type: Number,\n default: 3,\n },\n /**\n * @description direction of list\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description size of list\n */\n size: useSizeProp,\n /**\n * @description title text, display on the top left\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description extra text, display on the top right\n */\n extra: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type DescriptionInstance = InstanceType\n", "\n\n\n", "import { defineComponent } from 'vue'\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, Slot, VNode } from 'vue'\n\nconst descriptionItemProps = buildProps({\n /**\n * @description label text\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description colspan of column\n */\n span: {\n type: Number,\n default: 1,\n },\n /**\n * @description column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content)\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column minimum width, columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion (If no`border`, width contains label and content)\n */\n minWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column content alignment (If no `border`, effective for both label and content)\n */\n align: {\n type: String,\n default: 'left',\n },\n /**\n * @description column label alignment, if omitted, the value of the above `align` attribute will be applied (If no `border`, please use `align` attribute)\n */\n labelAlign: {\n type: String,\n default: '',\n },\n /**\n * @description column content custom class name\n */\n className: {\n type: String,\n default: '',\n },\n /**\n * @description column label custom class name\n */\n labelClassName: {\n type: String,\n default: '',\n },\n})\nconst DescriptionItem = defineComponent({\n name: 'ElDescriptionsItem',\n props: descriptionItemProps,\n})\n\nexport default DescriptionItem\n\ntype DescriptionItemProps = ExtractPropTypes\nexport type DescriptionItemVNode = VNode & {\n children: { [name: string]: Slot } | null\n props: Partial | null\n}\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Descriptions from './src/description.vue'\nimport DescriptionsItem from './src/description-item'\n\nexport const ElDescriptions = withInstall(Descriptions, {\n DescriptionsItem,\n})\n\nexport const ElDescriptionsItem = withNoopInstall(DescriptionsItem)\n\nexport default ElDescriptions\n\nexport * from './src/description'\n", "import { createVNode, defineComponent, h, renderSlot } from 'vue'\nimport { PatchFlags, buildProps, definePropType } from '@element-plus/utils'\nimport { useNamespace, useSameTarget } from '@element-plus/hooks'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\n\nexport const overlayProps = buildProps({\n mask: {\n type: Boolean,\n default: true,\n },\n customMaskEvent: {\n type: Boolean,\n default: false,\n },\n overlayClass: {\n type: definePropType>([\n String,\n Array,\n Object,\n ]),\n },\n zIndex: {\n type: definePropType([String, Number]),\n },\n} as const)\nexport type OverlayProps = ExtractPropTypes\n\nexport const overlayEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type OverlayEmits = typeof overlayEmits\n\nconst BLOCK = 'overlay'\n\nexport default defineComponent({\n name: 'ElOverlay',\n\n props: overlayProps,\n emits: overlayEmits,\n\n setup(props, { slots, emit }) {\n // No reactivity on this prop because when its rendering with a global\n // component, this will be a constant flag.\n const ns = useNamespace(BLOCK)\n\n const onMaskClick = (e: MouseEvent) => {\n emit('click', e)\n }\n\n const { onClick, onMousedown, onMouseup } = useSameTarget(\n props.customMaskEvent ? undefined : onMaskClick\n )\n\n // init here\n return () => {\n // when the vnode meets the same structure but with different change trigger\n // it will not automatically update, thus we simply use h function to manage updating\n return props.mask\n ? createVNode(\n 'div',\n {\n class: [ns.b(), props.overlayClass],\n style: {\n zIndex: props.zIndex,\n },\n onClick,\n onMousedown,\n onMouseup,\n },\n [renderSlot(slots, 'default')],\n PatchFlags.STYLE | PatchFlags.CLASS | PatchFlags.PROPS,\n ['onClick', 'onMouseup', 'onMousedown']\n )\n : h(\n 'div',\n {\n class: props.overlayClass,\n style: {\n zIndex: props.zIndex,\n position: 'fixed',\n top: '0px',\n right: '0px',\n bottom: '0px',\n left: '0px',\n } as CSSProperties,\n },\n [renderSlot(slots, 'default')]\n )\n }\n },\n})\n", "import Overlay from './src/overlay'\n\nexport const ElOverlay = Overlay\nexport default ElOverlay\n\nexport * from './src/overlay'\n", "import type { CSSProperties, ComputedRef, InjectionKey, Ref } from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\n\nexport type DialogContext = {\n dialogRef: Ref\n headerRef: Ref\n bodyId: Ref\n ns: UseNamespaceReturn\n rendered: Ref\n style: ComputedRef\n}\n\nexport const dialogInjectionKey: InjectionKey =\n Symbol('dialogInjectionKey')\n", "import { buildProps, iconPropType } from '@element-plus/utils'\n\nexport const dialogContentProps = buildProps({\n /**\n * @description whether to align the header and footer in center\n */\n center: Boolean,\n /**\n * @description whether to align the dialog both horizontally and vertically\n */\n alignCenter: Boolean,\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @deprecated will be removed in version 2.4.0, please use class\n */\n customClass: {\n type: String,\n default: '',\n },\n /**\n * @description enable dragging feature for Dialog\n */\n draggable: Boolean,\n /**\n * @description whether the Dialog takes up full screen\n */\n fullscreen: Boolean,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title of Dialog. Can also be passed with a named slot (see the following table)\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description header's aria-level attribute\n */\n ariaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport const dialogContentEmits = {\n close: () => true,\n}\n", "\n\n\n", "import { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { dialogContentProps } from './dialog-content'\n\nimport type { ExtractPropTypes } from 'vue'\n\ntype DoneFn = (cancel?: boolean) => void\nexport type DialogBeforeCloseFn = (done: DoneFn) => void\n\nexport const dialogProps = buildProps({\n ...dialogContentProps,\n /**\n * @description whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true`\n */\n appendToBody: Boolean,\n /**\n * @description which element the Dialog appends to\n */\n appendTo: {\n type: definePropType(String),\n default: 'body',\n },\n /**\n * @description callback before Dialog closes, and it will prevent Dialog from closing, use done to close the dialog\n */\n beforeClose: {\n type: definePropType(Function),\n },\n /**\n * @description destroy elements in Dialog when closed\n */\n destroyOnClose: Boolean,\n /**\n * @description whether the Dialog can be closed by clicking the mask\n */\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the Dialog can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether scroll of body is disabled while Dialog is displayed\n */\n lockScroll: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether a mask is displayed\n */\n modal: {\n type: Boolean,\n default: true,\n },\n /**\n * @description the Time(milliseconds) before open\n */\n openDelay: {\n type: Number,\n default: 0,\n },\n /**\n * @description the Time(milliseconds) before close\n */\n closeDelay: {\n type: Number,\n default: 0,\n },\n /**\n * @description value for `margin-top` of Dialog CSS, default is 15vh\n */\n top: {\n type: String,\n },\n /**\n * @description visibility of Dialog\n */\n modelValue: Boolean,\n /**\n * @description custom class names for mask\n */\n modalClass: String,\n /**\n * @description width of Dialog, default is 50%\n */\n width: {\n type: [String, Number],\n },\n /**\n * @description same as z-index in native CSS, z-order of dialog\n */\n zIndex: {\n type: Number,\n },\n trapFocus: {\n type: Boolean,\n default: false,\n },\n /**\n * @description header's aria-level attribute\n */\n headerAriaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport type DialogProps = ExtractPropTypes\n\nexport const dialogEmits = {\n open: () => true,\n opened: () => true,\n close: () => true,\n closed: () => true,\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n openAutoFocus: () => true,\n closeAutoFocus: () => true,\n}\nexport type DialogEmits = typeof dialogEmits\n", "import {\n computed,\n getCurrentInstance,\n nextTick,\n onMounted,\n ref,\n watch,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\n\nimport { isUndefined } from 'lodash-unified'\nimport {\n defaultNamespace,\n useId,\n useLockscreen,\n useZIndex,\n} from '@element-plus/hooks'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { addUnit, isClient } from '@element-plus/utils'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\n\nimport type { CSSProperties, Ref, SetupContext } from 'vue'\nimport type { DialogEmits, DialogProps } from './dialog'\n\nexport const useDialog = (\n props: DialogProps,\n targetRef: Ref\n) => {\n const instance = getCurrentInstance()!\n const emit = instance.emit as SetupContext['emit']\n const { nextZIndex } = useZIndex()\n\n let lastPosition = ''\n const titleId = useId()\n const bodyId = useId()\n const visible = ref(false)\n const closed = ref(false)\n const rendered = ref(false) // when desctroyOnClose is true, we initialize it as false vise versa\n const zIndex = ref(props.zIndex ?? nextZIndex())\n\n let openTimer: (() => void) | undefined = undefined\n let closeTimer: (() => void) | undefined = undefined\n\n const namespace = useGlobalConfig('namespace', defaultNamespace)\n\n const style = computed(() => {\n const style: CSSProperties = {}\n const varPrefix = `--${namespace.value}-dialog` as const\n if (!props.fullscreen) {\n if (props.top) {\n style[`${varPrefix}-margin-top`] = props.top\n }\n if (props.width) {\n style[`${varPrefix}-width`] = addUnit(props.width)\n }\n }\n return style\n })\n\n const overlayDialogStyle = computed(() => {\n if (props.alignCenter) {\n return { display: 'flex' }\n }\n return {}\n })\n\n function afterEnter() {\n emit('opened')\n }\n\n function afterLeave() {\n emit('closed')\n emit(UPDATE_MODEL_EVENT, false)\n if (props.destroyOnClose) {\n rendered.value = false\n }\n }\n\n function beforeLeave() {\n emit('close')\n }\n\n function open() {\n closeTimer?.()\n openTimer?.()\n\n if (props.openDelay && props.openDelay > 0) {\n ;({ stop: openTimer } = useTimeoutFn(() => doOpen(), props.openDelay))\n } else {\n doOpen()\n }\n }\n\n function close() {\n openTimer?.()\n closeTimer?.()\n\n if (props.closeDelay && props.closeDelay > 0) {\n ;({ stop: closeTimer } = useTimeoutFn(() => doClose(), props.closeDelay))\n } else {\n doClose()\n }\n }\n\n function handleClose() {\n function hide(shouldCancel?: boolean) {\n if (shouldCancel) return\n closed.value = true\n visible.value = false\n }\n\n if (props.beforeClose) {\n props.beforeClose(hide)\n } else {\n close()\n }\n }\n\n function onModalClick() {\n if (props.closeOnClickModal) {\n handleClose()\n }\n }\n\n function doOpen() {\n if (!isClient) return\n visible.value = true\n }\n\n function doClose() {\n visible.value = false\n }\n\n function onOpenAutoFocus() {\n emit('openAutoFocus')\n }\n\n function onCloseAutoFocus() {\n emit('closeAutoFocus')\n }\n\n function onFocusoutPrevented(event: CustomEvent) {\n if (event.detail?.focusReason === 'pointer') {\n event.preventDefault()\n }\n }\n\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n function onCloseRequested() {\n if (props.closeOnPressEscape) {\n handleClose()\n }\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n if (val) {\n closed.value = false\n open()\n rendered.value = true // enables lazy rendering\n zIndex.value = isUndefined(props.zIndex) ? nextZIndex() : zIndex.value++\n // this.$el.addEventListener('scroll', this.updatePopper)\n nextTick(() => {\n emit('open')\n if (targetRef.value) {\n targetRef.value.scrollTop = 0\n }\n })\n } else {\n // this.$el.removeEventListener('scroll', this.updatePopper\n if (visible.value) {\n close()\n }\n }\n }\n )\n\n watch(\n () => props.fullscreen,\n (val) => {\n if (!targetRef.value) return\n if (val) {\n lastPosition = targetRef.value.style.transform\n targetRef.value.style.transform = ''\n } else {\n targetRef.value.style.transform = lastPosition\n }\n }\n )\n\n onMounted(() => {\n if (props.modelValue) {\n visible.value = true\n rendered.value = true // enables lazy rendering\n open()\n }\n })\n\n return {\n afterEnter,\n afterLeave,\n beforeLeave,\n handleClose,\n onModalClick,\n close,\n doClose,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onCloseRequested,\n onFocusoutPrevented,\n titleId,\n bodyId,\n closed,\n style,\n overlayDialogStyle,\n rendered,\n visible,\n zIndex,\n }\n}\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Dialog from './src/dialog.vue'\n\nexport const ElDialog = withInstall(Dialog)\nexport default ElDialog\n\nexport * from './src/use-dialog'\nexport * from './src/dialog'\nexport * from './src/constants'\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Divider from './divider.vue'\n\nexport type BorderStyle = CSSStyleDeclaration['borderStyle']\n\nexport const dividerProps = buildProps({\n /**\n * @description Set divider's direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description Set the style of divider\n */\n contentPosition: {\n type: String,\n values: ['left', 'center', 'right'],\n default: 'center',\n },\n /**\n * @description the position of the customized content on the divider line\n */\n borderStyle: {\n type: definePropType(String),\n default: 'solid',\n },\n} as const)\nexport type DividerProps = ExtractPropTypes\n\nexport type DividerInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Divider from './src/divider.vue'\n\nexport const ElDivider = withInstall(Divider)\nexport default ElDivider\n\nexport * from './src/divider'\n", "import { buildProps } from '@element-plus/utils'\nimport { dialogEmits, dialogProps } from '@element-plus/components/dialog'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const drawerProps = buildProps({\n ...dialogProps,\n direction: {\n type: String,\n default: 'rtl',\n values: ['ltr', 'rtl', 'ttb', 'btt'],\n },\n size: {\n type: [String, Number],\n default: '30%',\n },\n withHeader: {\n type: Boolean,\n default: true,\n },\n modalFade: {\n type: Boolean,\n default: true,\n },\n headerAriaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport type DrawerProps = ExtractPropTypes\n\nexport const drawerEmits = dialogEmits\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Drawer from './src/drawer.vue'\n\nexport const ElDrawer = withInstall(Drawer)\nexport default ElDrawer\n\nexport * from './src/drawer'\n", "\n\n\n", "\n\n\n", "import { inject, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue'\nimport Collection from './collection.vue'\nimport CollectionItem from './collection-item.vue'\n\nimport type { InjectionKey } from 'vue'\nimport type { SetupContext } from '@vue/runtime-core'\nimport type {\n ElCollectionInjectionContext,\n ElCollectionItemInjectionContext,\n} from './tokens'\n\nexport const COLLECTION_ITEM_SIGN = `data-el-collection-item`\n\n// Make sure the first letter of name is capitalized\nexport const createCollectionWithScope = (name: string) => {\n const COLLECTION_NAME = `El${name}Collection`\n const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`\n const COLLECTION_INJECTION_KEY: InjectionKey =\n Symbol(COLLECTION_NAME)\n const COLLECTION_ITEM_INJECTION_KEY: InjectionKey =\n Symbol(COLLECTION_ITEM_NAME)\n\n const ElCollection = {\n ...Collection,\n name: COLLECTION_NAME,\n setup() {\n const collectionRef = ref(null)\n const itemMap: ElCollectionInjectionContext['itemMap'] = new Map()\n const getItems = () => {\n const collectionEl = unref(collectionRef)\n\n if (!collectionEl) return []\n const orderedNodes = Array.from(\n collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`)\n )\n\n const items = [...itemMap.values()]\n\n return items.sort(\n (a, b) => orderedNodes.indexOf(a.ref!) - orderedNodes.indexOf(b.ref!)\n )\n }\n\n provide(COLLECTION_INJECTION_KEY, {\n itemMap,\n getItems,\n collectionRef,\n })\n },\n }\n\n const ElCollectionItem = {\n ...CollectionItem,\n name: COLLECTION_ITEM_NAME,\n setup(_: unknown, { attrs }: SetupContext) {\n const collectionItemRef = ref(null)\n const collectionInjection = inject(COLLECTION_INJECTION_KEY, undefined)!\n\n provide(COLLECTION_ITEM_INJECTION_KEY, {\n collectionItemRef,\n })\n\n onMounted(() => {\n const collectionItemEl = unref(collectionItemRef)\n if (collectionItemEl) {\n collectionInjection.itemMap.set(collectionItemEl, {\n ref: collectionItemEl,\n ...attrs,\n })\n }\n })\n\n onBeforeUnmount(() => {\n const collectionItemEl = unref(collectionItemRef)!\n collectionInjection.itemMap.delete(collectionItemEl)\n })\n },\n }\n\n return {\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n ElCollection,\n ElCollectionItem,\n }\n}\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { createCollectionWithScope } from '@element-plus/components/collection'\nimport type { ExtractPropTypes, HTMLAttributes, StyleValue } from 'vue'\n\nexport const rovingFocusGroupProps = buildProps({\n style: { type: definePropType([String, Array, Object]) },\n currentTabId: {\n type: definePropType(String),\n },\n defaultCurrentTabId: String,\n loop: Boolean,\n dir: {\n type: String, // left for direction support\n values: ['ltr', 'rtl'],\n default: 'ltr',\n },\n orientation: {\n // left for orientation support\n type: definePropType(String),\n },\n\n onBlur: Function,\n onFocus: Function,\n onMousedown: Function,\n})\n\nexport type ElRovingFocusGroupProps = ExtractPropTypes<\n typeof rovingFocusGroupProps\n>\n\nconst {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n} = createCollectionWithScope('RovingFocusGroup')\n\nexport {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,\n}\n", "import type { InjectionKey, Ref, StyleValue } from 'vue'\nimport type { ElRovingFocusGroupProps } from './roving-focus-group'\n\ntype EventHandler = (e: T) => void\n\nexport type RovingGroupInjectionContext = {\n currentTabbedId: Ref\n dir: Ref\n loop: Ref\n orientation: Ref\n tabIndex: Ref\n rovingFocusGroupRef: Ref\n rovingFocusGroupRootStyle: Ref\n onBlur: EventHandler\n onFocus: EventHandler\n onMousedown: EventHandler\n onItemFocus: (id: string) => void\n onItemShiftTab: () => void\n}\n\nexport type RovingFocusGroupItemInjectionContext = {\n rovingFocusGroupItemRef: Ref\n tabIndex: Ref\n handleMousedown: EventHandler\n handleFocus: EventHandler\n handleKeydown: EventHandler\n}\n\nexport const ROVING_FOCUS_GROUP_INJECTION_KEY: InjectionKey =\n Symbol('elRovingFocusGroup')\n\nexport const ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY: InjectionKey =\n Symbol('elRovingFocusGroupItem')\n", "import { EVENT_CODE } from '@element-plus/constants'\nimport type { HTMLAttributes } from 'vue'\n\ntype Orientation = HTMLAttributes['aria-orientation']\ntype Direction = 'ltr' | 'rtl'\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next'\n\nconst MAP_KEY_TO_FOCUS_INTENT: Record = {\n ArrowLeft: 'prev',\n ArrowUp: 'prev',\n ArrowRight: 'next',\n ArrowDown: 'next',\n PageUp: 'first',\n Home: 'first',\n PageDown: 'last',\n End: 'last',\n}\n\nconst getDirectionAwareKey = (key: string, dir?: Direction) => {\n if (dir !== 'rtl') return key\n\n switch (key) {\n case EVENT_CODE.right:\n return EVENT_CODE.left\n case EVENT_CODE.left:\n return EVENT_CODE.right\n default:\n return key\n }\n}\n\nexport const getFocusIntent = (\n event: KeyboardEvent,\n orientation?: Orientation,\n dir?: Direction\n) => {\n const key = getDirectionAwareKey(event.key, dir)\n if (\n orientation === 'vertical' &&\n [EVENT_CODE.left, EVENT_CODE.right].includes(key)\n )\n return undefined\n if (\n orientation === 'horizontal' &&\n [EVENT_CODE.up, EVENT_CODE.down].includes(key)\n )\n return undefined\n return MAP_KEY_TO_FOCUS_INTENT[key]\n}\n\nexport const reorderArray = (array: T[], atIdx: number) => {\n return array.map((_, idx) => array[(idx + atIdx) % array.length])\n}\n\nexport const focusFirst = (elements: HTMLElement[]) => {\n const { activeElement: prevActive } = document\n\n for (const element of elements) {\n if (element === prevActive) return\n element.focus()\n if (prevActive !== document.activeElement) return\n }\n}\n", "\n\n\n", "\n\n\n", "\n\n\n", "// @ts-nocheck\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { createCollectionWithScope } from '@element-plus/components/collection'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\n\nimport type { Options } from '@popperjs/core'\nimport type { ButtonProps, ButtonType } from '@element-plus/components/button'\nimport type { Placement } from '@element-plus/components/popper'\nimport type { ComponentInternalInstance, ComputedRef } from 'vue'\nimport type { Nullable } from '@element-plus/utils'\n\nexport interface IElDropdownInstance {\n instance?: ComponentInternalInstance\n dropdownSize?: ComputedRef\n handleClick?: () => void\n commandHandler?: (...arg) => void\n show?: () => void\n hide?: () => void\n trigger?: ComputedRef\n hideOnClick?: ComputedRef\n triggerElm?: ComputedRef>\n}\n\nexport const dropdownProps = buildProps({\n trigger: useTooltipTriggerProps.trigger,\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n type: {\n type: definePropType(String),\n },\n placement: {\n type: definePropType(String),\n default: 'bottom',\n },\n popperOptions: {\n type: definePropType>(Object),\n default: () => ({}),\n },\n id: String,\n size: {\n type: String,\n default: '',\n },\n splitButton: Boolean,\n hideOnClick: {\n type: Boolean,\n default: true,\n },\n loop: {\n type: Boolean,\n default: true,\n },\n showTimeout: {\n type: Number,\n default: 150,\n },\n hideTimeout: {\n type: Number,\n default: 150,\n },\n tabindex: {\n type: definePropType([Number, String]),\n default: 0,\n },\n maxHeight: {\n type: definePropType([Number, String]),\n default: '',\n },\n popperClass: {\n type: String,\n default: '',\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n role: {\n type: String,\n default: 'menu',\n },\n buttonProps: {\n type: definePropType(Object),\n },\n teleported: useTooltipContentProps.teleported,\n} as const)\n\nexport const dropdownItemProps = buildProps({\n command: {\n type: [Object, String, Number],\n default: () => ({}),\n },\n disabled: Boolean,\n divided: Boolean,\n textValue: String,\n icon: {\n type: iconPropType,\n },\n} as const)\n\nexport const dropdownMenuProps = buildProps({\n onKeydown: { type: definePropType<(e: KeyboardEvent) => void>(Function) },\n})\n\nexport const FIRST_KEYS = [\n EVENT_CODE.down,\n EVENT_CODE.pageDown,\n EVENT_CODE.home,\n]\n\nexport const LAST_KEYS = [EVENT_CODE.up, EVENT_CODE.pageUp, EVENT_CODE.end]\n\nexport const FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS]\n\nconst {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n} = createCollectionWithScope('Dropdown')\n\nexport {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY as DROPDOWN_COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY as DROPDOWN_COLLECTION_ITEM_INJECTION_KEY,\n}\n", "import type { ComputedRef, InjectionKey, Ref } from 'vue'\n\nexport type ElDropdownInjectionContext = {\n contentRef: Ref\n role: ComputedRef\n triggerId: ComputedRef\n isUsingKeyboard: Ref\n onItemLeave: (e: PointerEvent) => void\n onItemEnter: (e: PointerEvent) => void\n}\n\nexport const DROPDOWN_INJECTION_KEY: InjectionKey =\n Symbol('elDropdown')\n", "\n\n", "\n\n\n", "// @ts-nocheck\nimport { computed, inject, ref } from 'vue'\nimport { addClass, generateId } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport type { Nullable } from '@element-plus/utils'\nimport type { IElDropdownInstance } from './dropdown'\n\nexport const useDropdown = () => {\n const elDropdown = inject('elDropdown', {})\n const _elDropdownSize = computed(() => elDropdown?.dropdownSize)\n\n return {\n elDropdown,\n _elDropdownSize,\n }\n}\n\nexport const initDropdownDomEvent = (\n dropdownChildren,\n triggerElm,\n _instance\n) => {\n const ns = useNamespace('dropdown')\n const menuItems = ref>(null)\n const menuItemsArray = ref>(null)\n const dropdownElm = ref>(null)\n const listId = ref(`dropdown-menu-${generateId()}`)\n dropdownElm.value = dropdownChildren?.subTree.el\n\n function removeTabindex() {\n triggerElm.setAttribute('tabindex', '-1')\n menuItemsArray.value?.forEach((item) => {\n item.setAttribute('tabindex', '-1')\n })\n }\n\n function resetTabindex(ele) {\n removeTabindex()\n ele?.setAttribute('tabindex', '0')\n }\n\n function handleTriggerKeyDown(ev: KeyboardEvent) {\n const code = ev.code\n if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {\n removeTabindex()\n resetTabindex(menuItems.value[0])\n menuItems.value[0].focus()\n ev.preventDefault()\n ev.stopPropagation()\n } else if (code === EVENT_CODE.enter) {\n _instance.handleClick()\n } else if ([EVENT_CODE.tab, EVENT_CODE.esc].includes(code)) {\n _instance.hide()\n }\n }\n\n function handleItemKeyDown(ev) {\n const code = ev.code\n const target = ev.target\n const currentIndex = menuItemsArray.value.indexOf(target)\n const max = menuItemsArray.value.length - 1\n let nextIndex\n if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {\n if (code === EVENT_CODE.up) {\n nextIndex = currentIndex !== 0 ? currentIndex - 1 : 0\n } else {\n nextIndex = currentIndex < max ? currentIndex + 1 : max\n }\n removeTabindex()\n resetTabindex(menuItems.value[nextIndex])\n menuItems.value[nextIndex].focus()\n ev.preventDefault()\n ev.stopPropagation()\n } else if (code === EVENT_CODE.enter) {\n triggerElmFocus()\n target.click()\n if (_instance.props.hideOnClick) {\n _instance.hide()\n }\n } else if ([EVENT_CODE.tab, EVENT_CODE.esc].includes(code)) {\n _instance.hide()\n triggerElmFocus()\n }\n }\n\n function initAria() {\n dropdownElm.value.setAttribute('id', listId.value)\n triggerElm.setAttribute('aria-haspopup', 'list')\n triggerElm.setAttribute('aria-controls', listId.value)\n if (!_instance.props.splitButton) {\n triggerElm.setAttribute('role', 'button')\n triggerElm.setAttribute('tabindex', _instance.props.tabindex)\n addClass(triggerElm, ns.b('selfdefine'))\n }\n }\n\n function initEvent() {\n triggerElm?.addEventListener('keydown', handleTriggerKeyDown)\n dropdownElm.value?.addEventListener('keydown', handleItemKeyDown, true)\n }\n\n function initDomOperation() {\n menuItems.value = dropdownElm.value.querySelectorAll(\n \"[tabindex='-1']\"\n ) as unknown as HTMLButtonElement[]\n menuItemsArray.value = Array.from(menuItems.value)\n\n initEvent()\n initAria()\n }\n\n function triggerElmFocus() {\n triggerElm.focus()\n }\n\n initDomOperation()\n}\n", "\n\n", "\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Dropdown from './src/dropdown.vue'\nimport DropdownItem from './src/dropdown-item.vue'\nimport DropdownMenu from './src/dropdown-menu.vue'\n\nexport const ElDropdown = withInstall(Dropdown, {\n DropdownItem,\n DropdownMenu,\n})\nexport default ElDropdown\nexport const ElDropdownItem = withNoopInstall(DropdownItem)\nexport const ElDropdownMenu = withNoopInstall(DropdownMenu)\nexport * from './src/dropdown'\nexport * from './src/instance'\nexport * from './src/tokens'\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Empty from './src/empty.vue'\n\nexport const ElEmpty = withInstall(Empty)\nexport default ElEmpty\n\nexport * from './src/empty'\nexport type { EmptyInstance } from './src/instance'\n", "import {\n buildProps,\n definePropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\n\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type ImageViewer from './image-viewer.vue'\n\nexport type ImageViewerAction =\n | 'zoomIn'\n | 'zoomOut'\n | 'clockwise'\n | 'anticlockwise'\n\nexport const imageViewerProps = buildProps({\n /**\n * @description preview link list.\n */\n urlList: {\n type: definePropType(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description preview backdrop z-index.\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description the initial preview image index, less than or equal to the length of `url-list`.\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether preview is infinite.\n */\n infinite: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether user can emit close event when clicking backdrop.\n */\n hideOnClickModal: Boolean,\n /**\n * @description whether to append image itself to body. A nested parent element attribute transform should have this attribute set to `true`.\n */\n teleported: Boolean,\n /**\n * @description whether the image-viewer can be closed by pressing ESC.\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description the zoom rate of the image viewer zoom event.\n */\n zoomRate: {\n type: Number,\n default: 1.2,\n },\n /**\n * @description the min scale of the image viewer zoom event.\n */\n minScale: {\n type: Number,\n default: 0.2,\n },\n /**\n * @description the max scale of the image viewer zoom event.\n */\n maxScale: {\n type: Number,\n default: 7,\n },\n} as const)\nexport type ImageViewerProps = ExtractPropTypes\n\nexport const imageViewerEmits = {\n close: () => true,\n switch: (index: number) => isNumber(index),\n rotate: (deg: number) => isNumber(deg),\n}\nexport type ImageViewerEmits = typeof imageViewerEmits\n\nexport interface ImageViewerMode {\n name: string\n icon: Component\n}\n\nexport type ImageViewerInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport ImageViewer from './src/image-viewer.vue'\n\nexport const ElImageViewer = withInstall(ImageViewer)\nexport default ElImageViewer\n\nexport * from './src/image-viewer'\n", "import {\n buildProps,\n definePropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const imageProps = buildProps({\n /**\n * @description when enabling preview, use this flag to control whether clicking on backdrop can exit preview mode.\n */\n hideOnClickModal: Boolean,\n /**\n * @description image source, same as native.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit).\n */\n fit: {\n type: String,\n values: ['', 'contain', 'cover', 'fill', 'none', 'scale-down'],\n default: '',\n },\n /**\n * @description Indicates how the browser should load the image, same as [native](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading)\n */\n loading: {\n type: String,\n values: ['eager', 'lazy'],\n },\n /**\n * @description whether to use lazy load.\n */\n lazy: Boolean,\n /**\n * @description the container to add scroll listener when using lazy load.\n */\n scrollContainer: {\n type: definePropType([String, Object]),\n },\n /**\n * @description allow big image preview.\n */\n previewSrcList: {\n type: definePropType(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether to append image-viewer to body. A nested parent element attribute transform should have this attribute set to `true`.\n */\n previewTeleported: Boolean,\n /**\n * @description set image preview z-index.\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description initial preview image index, less than the length of `url-list`.\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether the viewer preview is infinite.\n */\n infinite: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the image-viewer can be closed by pressing ESC.\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description the zoom rate of the image viewer zoom event\n */\n zoomRate: {\n type: Number,\n default: 1.2,\n },\n /**\n * @description the min scale of the image viewer zoom event.\n */\n minScale: {\n type: Number,\n default: 0.2,\n },\n /**\n * @description the max scale of the image viewer zoom event.\n */\n maxScale: {\n type: Number,\n default: 7,\n },\n} as const)\nexport type ImageProps = ExtractPropTypes\n\nexport const imageEmits = {\n load: (evt: Event) => evt instanceof Event,\n error: (evt: Event) => evt instanceof Event,\n switch: (val: number) => isNumber(val),\n close: () => true,\n show: () => true,\n}\nexport type ImageEmits = typeof imageEmits\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Image from './src/image.vue'\n\nexport const ElImage = withInstall(Image)\nexport default ElImage\n\nexport * from './src/image'\n", "import { isNil } from 'lodash-unified'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type InputNumber from './input-number.vue'\n\nexport const inputNumberProps = buildProps({\n /**\n * @description same as `id` in native input\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description incremental step\n */\n step: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether input value can only be multiple of step\n */\n stepStrictly: Boolean,\n /**\n * @description the maximum allowed value\n */\n max: {\n type: Number,\n default: Number.POSITIVE_INFINITY,\n },\n /**\n * @description the minimum allowed value\n */\n min: {\n type: Number,\n default: Number.NEGATIVE_INFINITY,\n },\n /**\n * @description binding value\n */\n modelValue: Number,\n /**\n * @description same as `readonly` in native input\n */\n readonly: Boolean,\n /**\n * @description whether the component is disabled\n */\n disabled: Boolean,\n /**\n * @description size of the component\n */\n size: useSizeProp,\n /**\n * @description whether to enable the control buttons\n */\n controls: {\n type: Boolean,\n default: true,\n },\n /**\n * @description position of the control buttons\n */\n controlsPosition: {\n type: String,\n default: '',\n values: ['', 'right'],\n },\n /**\n * @description value should be set when input box is cleared\n */\n valueOnClear: {\n type: [String, Number, null],\n validator: (val: 'min' | 'max' | number | null) =>\n val === null || isNumber(val) || ['min', 'max'].includes(val),\n default: null,\n },\n /**\n * @description same as `name` in native input\n */\n name: String,\n /**\n * @description same as `label` in native input\n */\n label: String,\n /**\n * @description same as `placeholder` in native input\n */\n placeholder: String,\n /**\n * @description precision of input value\n */\n precision: {\n type: Number,\n validator: (val: number) =>\n val >= 0 && val === Number.parseInt(`${val}`, 10),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type InputNumberProps = ExtractPropTypes\n\nexport const inputNumberEmits = {\n [CHANGE_EVENT]: (cur: number | undefined, prev: number | undefined) =>\n prev !== cur,\n blur: (e: FocusEvent) => e instanceof FocusEvent,\n focus: (e: FocusEvent) => e instanceof FocusEvent,\n [INPUT_EVENT]: (val: number | null | undefined) =>\n isNumber(val) || isNil(val),\n [UPDATE_MODEL_EVENT]: (val: number | undefined) =>\n isNumber(val) || isNil(val),\n}\nexport type InputNumberEmits = typeof inputNumberEmits\n\nexport type InputNumberInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\nimport InputNumber from './src/input-number.vue'\n\nexport const ElInputNumber = withInstall(InputNumber)\n\nexport default ElInputNumber\nexport * from './src/input-number'\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Link from './link.vue'\n\nexport const linkProps = buildProps({\n /**\n * @description type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger', 'default'],\n default: 'default',\n },\n /**\n * @description whether the component has underline\n */\n underline: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the component is disabled\n */\n disabled: { type: Boolean, default: false },\n /**\n * @description same as native hyperlink's `href`\n */\n href: { type: String, default: '' },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n} as const)\nexport type LinkProps = ExtractPropTypes\n\nexport const linkEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type LinkEmits = typeof linkEmits\n\nexport type LinkInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Link from './src/link.vue'\n\nexport const ElLink = withInstall(Link)\nexport default ElLink\n\nexport * from './src/link'\n", "// @ts-nocheck\nimport { triggerEvent } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport type MenuItem from './menu-item'\n\nclass SubMenu {\n public subMenuItems: NodeList\n public subIndex = 0\n constructor(public parent: MenuItem, public domNode: ParentNode) {\n this.subIndex = 0\n this.init()\n }\n\n init(): void {\n this.subMenuItems = this.domNode.querySelectorAll('li')\n this.addListeners()\n }\n\n gotoSubIndex(idx: number): void {\n if (idx === this.subMenuItems.length) {\n idx = 0\n } else if (idx < 0) {\n idx = this.subMenuItems.length - 1\n }\n ;(this.subMenuItems[idx] as HTMLElement).focus()\n this.subIndex = idx\n }\n\n addListeners(): void {\n const parentNode = this.parent.domNode\n Array.prototype.forEach.call(this.subMenuItems, (el: Element) => {\n el.addEventListener('keydown', (event: KeyboardEvent) => {\n let prevDef = false\n switch (event.code) {\n case EVENT_CODE.down: {\n this.gotoSubIndex(this.subIndex + 1)\n prevDef = true\n break\n }\n case EVENT_CODE.up: {\n this.gotoSubIndex(this.subIndex - 1)\n prevDef = true\n break\n }\n case EVENT_CODE.tab: {\n triggerEvent(parentNode as HTMLElement, 'mouseleave')\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.space: {\n prevDef = true\n ;(event.currentTarget as HTMLElement).click()\n break\n }\n }\n if (prevDef) {\n event.preventDefault()\n event.stopPropagation()\n }\n return false\n })\n })\n }\n}\n\nexport default SubMenu\n", "// @ts-nocheck\nimport { triggerEvent } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport SubMenu from './submenu'\n\nclass MenuItem {\n public submenu: SubMenu = null\n constructor(public domNode: HTMLElement, namespace: string) {\n this.submenu = null\n this.init(namespace)\n }\n\n init(namespace: string): void {\n this.domNode.setAttribute('tabindex', '0')\n const menuChild = this.domNode.querySelector(`.${namespace}-menu`)\n if (menuChild) {\n this.submenu = new SubMenu(this, menuChild)\n }\n this.addListeners()\n }\n\n addListeners(): void {\n this.domNode.addEventListener('keydown', (event: KeyboardEvent) => {\n let prevDef = false\n switch (event.code) {\n case EVENT_CODE.down: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseenter')\n this.submenu && this.submenu.gotoSubIndex(0)\n prevDef = true\n break\n }\n case EVENT_CODE.up: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseenter')\n this.submenu &&\n this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1)\n prevDef = true\n break\n }\n case EVENT_CODE.tab: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseleave')\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.space: {\n prevDef = true\n ;(event.currentTarget as HTMLElement).click()\n break\n }\n }\n if (prevDef) {\n event.preventDefault()\n }\n })\n }\n}\n\nexport default MenuItem\n", "import MenuItem from './menu-item'\n\nimport type { RendererNode } from 'vue'\n\nclass Menu {\n constructor(public domNode: RendererNode, namespace: string) {\n this.init(namespace)\n }\n init(namespace: string): void {\n const menuChildren = this.domNode.childNodes\n Array.from(menuChildren).forEach((child) => {\n if (child.nodeType === 1) {\n new MenuItem(child as HTMLElement, namespace)\n }\n })\n }\n}\n\nexport default Menu\n", "\n\n", "import { computed } from 'vue'\n\nimport type { ComponentInternalInstance, Ref } from 'vue'\n\nexport default function useMenu(\n instance: ComponentInternalInstance,\n currentIndex: Ref\n) {\n const indexPath = computed(() => {\n let parent = instance.parent!\n const path = [currentIndex.value]\n while (parent.type.name !== 'ElMenu') {\n if (parent.props.index) {\n path.unshift(parent.props.index as string)\n }\n parent = parent.parent!\n }\n return path\n })\n\n const parentMenu = computed(() => {\n let parent = instance.parent\n while (parent && !['ElMenu', 'ElSubMenu'].includes(parent.type.name!)) {\n parent = parent.parent\n }\n return parent!\n })\n\n return {\n parentMenu,\n indexPath,\n }\n}\n", "import { computed } from 'vue'\nimport { TinyColor } from '@ctrl/tinycolor'\n\nimport type { MenuProps } from './menu'\n\nexport default function useMenuColor(props: MenuProps) {\n const menuBarColor = computed(() => {\n const color = props.backgroundColor\n if (!color) {\n return ''\n } else {\n return new TinyColor(color).shade(20).toString()\n }\n })\n return menuBarColor\n}\n", "import { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport useMenuColor from './use-menu-color'\n\nimport type { MenuProps } from './menu'\n\nexport const useMenuCssVar = (props: MenuProps, level: number) => {\n const ns = useNamespace('menu')\n return computed(() => {\n return ns.cssVarBlock({\n 'text-color': props.textColor || '',\n 'hover-text-color': props.textColor || '',\n 'bg-color': props.backgroundColor || '',\n 'hover-bg-color': useMenuColor(props).value || '',\n 'active-color': props.activeTextColor || '',\n level: `${level}`,\n })\n })\n}\n", "import {\n Fragment,\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n vShow,\n watch,\n withDirectives,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n buildProps,\n iconPropType,\n isString,\n throwError,\n} from '@element-plus/utils'\nimport { useDeprecated, useNamespace } from '@element-plus/hooks'\nimport { ArrowDown, ArrowRight } from '@element-plus/icons-vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport useMenu from './use-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { Placement } from '@element-plus/components/popper'\nimport type { ExtractPropTypes, VNodeArrayChildren } from 'vue'\nimport type { MenuProvider, SubMenuProvider } from './types'\n\nexport const subMenuProps = buildProps({\n index: {\n type: String,\n required: true,\n },\n showTimeout: {\n type: Number,\n default: 300,\n },\n hideTimeout: {\n type: Number,\n default: 300,\n },\n popperClass: String,\n disabled: Boolean,\n popperAppendToBody: {\n type: Boolean,\n default: undefined,\n },\n teleported: {\n type: Boolean,\n default: undefined,\n },\n popperOffset: {\n type: Number,\n default: 6,\n },\n expandCloseIcon: {\n type: iconPropType,\n },\n expandOpenIcon: {\n type: iconPropType,\n },\n collapseCloseIcon: {\n type: iconPropType,\n },\n collapseOpenIcon: {\n type: iconPropType,\n },\n} as const)\nexport type SubMenuProps = ExtractPropTypes\n\nconst COMPONENT_NAME = 'ElSubMenu'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: subMenuProps,\n\n setup(props, { slots, expose }) {\n useDeprecated(\n {\n from: 'popper-append-to-body',\n replacement: 'teleported',\n scope: COMPONENT_NAME,\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/menu.html#submenu-attributes',\n },\n computed(() => props.popperAppendToBody !== undefined)\n )\n\n const instance = getCurrentInstance()!\n const { indexPath, parentMenu } = useMenu(\n instance,\n computed(() => props.index)\n )\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n\n // inject\n const rootMenu = inject('rootMenu')\n if (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\n const subMenu = inject(`subMenu:${parentMenu.value!.uid}`)\n if (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\n const items = ref({})\n const subMenus = ref({})\n\n let timeout: (() => void) | undefined\n const mouseInChild = ref(false)\n const verticalTitleRef = ref()\n const vPopper = ref | null>(null)\n\n // computed\n const currentPlacement = computed(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? 'bottom-start'\n : 'right-start'\n )\n const subMenuTitleIcon = computed(() => {\n return (mode.value === 'horizontal' && isFirstLevel.value) ||\n (mode.value === 'vertical' && !rootMenu.props.collapse)\n ? props.expandCloseIcon && props.expandOpenIcon\n ? opened.value\n ? props.expandOpenIcon\n : props.expandCloseIcon\n : ArrowDown\n : props.collapseCloseIcon && props.collapseOpenIcon\n ? opened.value\n ? props.collapseOpenIcon\n : props.collapseCloseIcon\n : ArrowRight\n })\n const isFirstLevel = computed(() => {\n return subMenu.level === 0\n })\n const appendToBody = computed(() => {\n const value = props.teleported ?? props.popperAppendToBody\n return value === undefined ? isFirstLevel.value : value\n })\n const menuTransitionName = computed(() =>\n rootMenu.props.collapse\n ? `${nsMenu.namespace.value}-zoom-in-left`\n : `${nsMenu.namespace.value}-zoom-in-top`\n )\n const fallbackPlacements = computed(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'left-start',\n ]\n : [\n 'right-start',\n 'right',\n 'right-end',\n 'left-start',\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n ]\n )\n const opened = computed(() => rootMenu.openedMenus.includes(props.index))\n const active = computed(() => {\n let isActive = false\n\n Object.values(items.value).forEach((item) => {\n if (item.active) {\n isActive = true\n }\n })\n\n Object.values(subMenus.value).forEach((subItem) => {\n if (subItem.active) {\n isActive = true\n }\n })\n\n return isActive\n })\n\n const mode = computed(() => rootMenu.props.mode)\n const item = reactive({\n index: props.index,\n indexPath,\n active,\n })\n\n const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1)\n\n // methods\n const doDestroy = () =>\n vPopper.value?.popperRef?.popperInstanceRef?.destroy()\n\n const handleCollapseToggle = (value: boolean) => {\n if (!value) {\n doDestroy()\n }\n }\n\n const handleClick = () => {\n if (\n (rootMenu.props.menuTrigger === 'hover' &&\n rootMenu.props.mode === 'horizontal') ||\n (rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n )\n return\n\n rootMenu.handleSubMenuClick({\n index: props.index,\n indexPath: indexPath.value,\n active: active.value,\n })\n }\n\n const handleMouseenter = (\n event: MouseEvent | FocusEvent,\n showTimeout = props.showTimeout\n ) => {\n if (event.type === 'focus') {\n return\n }\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n ) {\n return\n }\n subMenu.mouseInChild.value = true\n\n timeout?.()\n ;({ stop: timeout } = useTimeoutFn(() => {\n rootMenu.openMenu(props.index, indexPath.value)\n }, showTimeout))\n\n if (appendToBody.value) {\n parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent('mouseenter'))\n }\n }\n\n const handleMouseleave = (deepDispatch = false) => {\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical')\n ) {\n return\n }\n timeout?.()\n subMenu.mouseInChild.value = false\n ;({ stop: timeout } = useTimeoutFn(\n () =>\n !mouseInChild.value &&\n rootMenu.closeMenu(props.index, indexPath.value),\n props.hideTimeout\n ))\n\n if (appendToBody.value && deepDispatch) {\n if (instance.parent?.type.name === 'ElSubMenu') {\n subMenu.handleMouseleave?.(true)\n }\n }\n }\n\n watch(\n () => rootMenu.props.collapse,\n (value) => handleCollapseToggle(Boolean(value))\n )\n\n // provide\n {\n const addSubMenu: SubMenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n const removeSubMenu: SubMenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n provide(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n handleMouseleave,\n mouseInChild,\n level: subMenu.level + 1,\n })\n }\n\n // expose\n expose({\n opened,\n })\n\n // lifecycle\n onMounted(() => {\n rootMenu.addSubMenu(item)\n subMenu.addSubMenu(item)\n })\n\n onBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeSubMenu(item)\n })\n\n return () => {\n const titleTag: VNodeArrayChildren = [\n slots.title?.(),\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-arrow'),\n style: {\n transform: opened.value\n ? (props.expandCloseIcon && props.expandOpenIcon) ||\n (props.collapseCloseIcon &&\n props.collapseOpenIcon &&\n rootMenu.props.collapse)\n ? 'none'\n : 'rotateZ(180deg)'\n : 'none',\n },\n },\n {\n default: () =>\n isString(subMenuTitleIcon.value)\n ? h(instance.appContext.components[subMenuTitleIcon.value])\n : h(subMenuTitleIcon.value),\n }\n ),\n ]\n\n // this render function is only used for bypass `Vue`'s compiler caused patching issue.\n // temporarily mark ElPopper as any due to type inconsistency.\n const child = rootMenu.isMenuPopup\n ? h(\n // TODO: correct popper's type.\n ElTooltip as any,\n {\n ref: vPopper,\n visible: opened.value,\n effect: 'light',\n pure: true,\n offset: props.popperOffset,\n showArrow: false,\n persistent: true,\n popperClass: props.popperClass,\n placement: currentPlacement.value,\n teleported: appendToBody.value,\n fallbackPlacements: fallbackPlacements.value,\n transition: menuTransitionName.value,\n gpuAcceleration: false,\n },\n {\n content: () =>\n h(\n 'div',\n {\n class: [\n nsMenu.m(mode.value),\n nsMenu.m('popup-container'),\n props.popperClass,\n ],\n onMouseenter: (evt: MouseEvent) =>\n handleMouseenter(evt, 100),\n onMouseleave: () => handleMouseleave(true),\n onFocus: (evt: FocusEvent) => handleMouseenter(evt, 100),\n },\n [\n h(\n 'ul',\n {\n class: [\n nsMenu.b(),\n nsMenu.m('popup'),\n nsMenu.m(`popup-${currentPlacement.value}`),\n ],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n ]\n ),\n default: () =>\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n onClick: handleClick,\n },\n titleTag\n ),\n }\n )\n : h(Fragment, {}, [\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n ref: verticalTitleRef,\n onClick: handleClick,\n },\n titleTag\n ),\n h(\n ElCollapseTransition,\n {},\n {\n default: () =>\n withDirectives(\n h(\n 'ul',\n {\n role: 'menu',\n class: [nsMenu.b(), nsMenu.m('inline')],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n [[vShow, opened.value]]\n ),\n }\n ),\n ])\n\n return h(\n 'li',\n {\n class: [\n nsSubMenu.b(),\n nsSubMenu.is('active', active.value),\n nsSubMenu.is('opened', opened.value),\n nsSubMenu.is('disabled', props.disabled),\n ],\n role: 'menuitem',\n ariaHaspopup: true,\n ariaExpanded: opened.value,\n onMouseenter: handleMouseenter,\n onMouseleave: () => handleMouseleave(true),\n onFocus: handleMouseenter,\n },\n [child]\n )\n }\n },\n})\n", "import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n} from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n isObject,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type { ExtractPropTypes, VNode, VNodeArrayChildren } from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n defaultActive: {\n type: String,\n default: '',\n },\n defaultOpeneds: {\n type: definePropType(Array),\n default: () => mutable([] as const),\n },\n uniqueOpened: Boolean,\n router: Boolean,\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n collapse: Boolean,\n backgroundColor: String,\n textColor: String,\n activeTextColor: String,\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n ellipsis: {\n type: Boolean,\n default: true,\n },\n popperEffect: {\n type: String,\n values: ['dark', 'light'],\n default: 'dark',\n },\n} as const)\nexport type MenuProps = ExtractPropTypes\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n Array.isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (routerResult === undefined || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref(props.defaultActive)\n const items = ref({})\n const subMenus = ref({})\n\n // computed\n const isMenuPopup = computed(() => {\n return (\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n })\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n if (isOpened) {\n closeMenu(index, indexPath)\n } else {\n openMenu(index, indexPath)\n }\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n if (item) {\n activeIndex.value = item.index\n } else {\n activeIndex.value = val\n }\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n const items = Array.from(menu.value?.childNodes ?? []).filter(\n (item) =>\n // remove comment type node #12634\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n const moreItemWidth = 64\n const paddingLeft = Number.parseInt(\n getComputedStyle(menu.value!).paddingLeft,\n 10\n )\n const paddingRight = Number.parseInt(\n getComputedStyle(menu.value!).paddingRight,\n 10\n )\n const menuWidth = menu.value!.clientWidth - paddingLeft - paddingRight\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += item.offsetWidth || 0\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timmer: ReturnType | null\n return () => {\n timmer && clearTimeout(timmer)\n timmer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n provide(\n 'rootMenu',\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n })\n )\n provide(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild: ref(false),\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n handleResize,\n })\n }\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = flattedChildren(slot) as VNodeArrayChildren\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n { default: () => h(More) }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n const vMenu = h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {\n return h(ElMenuCollapseTransition, () => vMenu)\n }\n\n return vMenu\n }\n },\n})\n", "import { buildProps, definePropType, isString } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\nimport type { MenuItemRegistered } from './types'\n\nexport const menuItemProps = buildProps({\n index: {\n type: definePropType([String, null]),\n default: null,\n },\n route: {\n type: definePropType([String, Object]),\n },\n disabled: Boolean,\n} as const)\nexport type MenuItemProps = ExtractPropTypes\n\nexport const menuItemEmits = {\n click: (item: MenuItemRegistered) =>\n isString(item.index) && Array.isArray(item.indexPath),\n}\nexport type MenuItemEmits = typeof menuItemEmits\n", "\n\n\n", "import type { ExtractPropTypes } from 'vue'\n\nexport const menuItemGroupProps = {\n title: String,\n} as const\nexport type MenuItemGroupProps = ExtractPropTypes\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Menu from './src/menu'\nimport MenuItem from './src/menu-item.vue'\nimport MenuItemGroup from './src/menu-item-group.vue'\nimport SubMenu from './src/sub-menu'\n\nexport const ElMenu = withInstall(Menu, {\n MenuItem,\n MenuItemGroup,\n SubMenu,\n})\nexport default ElMenu\nexport const ElMenuItem = withNoopInstall(MenuItem)\nexport const ElMenuItemGroup = withNoopInstall(MenuItemGroup)\nexport const ElSubMenu = withNoopInstall(SubMenu)\n\nexport * from './src/menu'\nexport * from './src/menu-item'\nexport * from './src/menu-item-group'\nexport * from './src/sub-menu'\nexport * from './src/types'\nexport * from './src/instance'\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport { Back } from '@element-plus/icons-vue'\nimport type { ExtractPropTypes } from 'vue'\nimport type PageHeader from './page-header.vue'\n\nexport const pageHeaderProps = buildProps({\n /**\n * @description icon component of page header\n */\n icon: {\n type: iconPropType,\n default: () => Back,\n },\n /**\n * @description main title of page header\n */\n title: String,\n /**\n * @description content of page header\n */\n content: {\n type: String,\n default: '',\n },\n} as const)\nexport type PageHeaderProps = ExtractPropTypes\n\nexport const pageHeaderEmits = {\n back: () => true,\n}\nexport type PageHeaderEmits = typeof pageHeaderEmits\n\nexport type PageHeaderInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport PageHeader from './src/page-header.vue'\n\nexport const ElPageHeader = withInstall(PageHeader)\nexport default ElPageHeader\n\nexport * from './src/page-header'\n", "import type { ComputedRef, InjectionKey, WritableComputedRef } from 'vue'\n\nexport interface ElPaginationContext {\n currentPage?: WritableComputedRef\n pageCount?: ComputedRef\n disabled?: ComputedRef\n changeEvent?: (val: number) => void\n handleSizeChange?: (val: number) => void\n}\n\nexport const elPaginationKey: InjectionKey =\n Symbol('elPaginationKey')\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Prev from './prev.vue'\n\nexport const paginationPrevProps = buildProps({\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1,\n },\n prevText: {\n type: String,\n },\n prevIcon: {\n type: iconPropType,\n },\n} as const)\n\nexport const paginationPrevEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type PaginationPrevProps = ExtractPropTypes\n\nexport type PrevInstance = InstanceType\n", "\n\n\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Next from './next.vue'\n\nexport const paginationNextProps = buildProps({\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1,\n },\n pageCount: {\n type: Number,\n default: 50,\n },\n nextText: {\n type: String,\n },\n nextIcon: {\n type: iconPropType,\n },\n} as const)\n\nexport type PaginationNextProps = ExtractPropTypes\n\nexport type NextInstance = InstanceType\n", "\n\n\n", "import type { InjectionKey, Ref } from 'vue'\n\ninterface SelectGroupContext {\n disabled: boolean\n}\n\nexport interface QueryChangeCtx {\n query: string\n}\n\nexport interface SelectContext {\n props: {\n multiple?: boolean\n multipleLimit?: number\n valueKey?: string\n modelValue?: string | number | unknown | unknown[]\n popperClass?: string\n remote?: boolean\n fitInputWidth?: boolean\n }\n queryChange: Ref\n groupQueryChange: Ref\n selectWrapper: HTMLElement\n cachedOptions: Map\n hoverIndex: number\n optionsCount: number\n filteredOptionsCount: number\n options: Map\n optionsArray: any[]\n selected: any | any[]\n setSelected(): void\n onOptionCreate(vm: SelectOptionProxy): void\n onOptionDestroy(key: number | string | Record): void\n handleOptionSelect(vm: unknown): void\n}\n\n// For individual build sharing injection key, we had to make `Symbol` to string\nexport const selectGroupKey: InjectionKey =\n Symbol('ElSelectGroup')\n\nexport const selectKey: InjectionKey = Symbol('ElSelect')\n\nexport interface SelectOptionProxy {\n value: string | number | Record\n label: string | number\n created: boolean\n disabled: boolean\n currentLabel: string\n itemSelected: boolean\n isDisabled: boolean\n select: SelectContext\n hoverItem: () => void\n visible: boolean\n hover: boolean\n selectOptionClick: () => void\n}\n", "// @ts-nocheck\nimport { computed, getCurrentInstance, inject, toRaw, unref, watch } from 'vue'\nimport { get } from 'lodash-unified'\nimport { isObject as _isObject, escapeStringRegexp } from '@element-plus/utils'\nimport { selectGroupKey, selectKey } from './token'\n\nimport type { Ref } from 'vue'\nimport type { QueryChangeCtx } from './token'\n\nexport function useOption(props, states) {\n // inject\n const select = inject(selectKey)\n const selectGroup = inject(selectGroupKey, { disabled: false })\n\n // computed\n const isObject = computed(() => _isObject(props.value))\n\n const itemSelected = computed(() => {\n if (!select.props.multiple) {\n return isEqual(props.value, select.props.modelValue)\n } else {\n return contains(select.props.modelValue as unknown[], props.value)\n }\n })\n\n const limitReached = computed(() => {\n if (select.props.multiple) {\n const modelValue = (select.props.modelValue || []) as unknown[]\n return (\n !itemSelected.value &&\n modelValue.length >= select.props.multipleLimit &&\n select.props.multipleLimit > 0\n )\n } else {\n return false\n }\n })\n\n const currentLabel = computed(() => {\n return props.label || (isObject.value ? '' : props.value)\n })\n\n const currentValue = computed(() => {\n return props.value || props.label || ''\n })\n\n const isDisabled = computed(() => {\n return props.disabled || states.groupDisabled || limitReached.value\n })\n\n const instance = getCurrentInstance()\n\n const contains = (arr = [], target) => {\n if (!isObject.value) {\n return arr && arr.includes(target)\n } else {\n const valueKey = select.props.valueKey\n return (\n arr &&\n arr.some((item) => {\n return toRaw(get(item, valueKey)) === get(target, valueKey)\n })\n )\n }\n }\n\n const isEqual = (a: unknown, b: unknown) => {\n if (!isObject.value) {\n return a === b\n } else {\n const { valueKey } = select.props\n return get(a, valueKey) === get(b, valueKey)\n }\n }\n\n const hoverItem = () => {\n if (!props.disabled && !selectGroup.disabled) {\n select.hoverIndex = select.optionsArray.indexOf(instance.proxy)\n }\n }\n\n watch(\n () => currentLabel.value,\n () => {\n if (!props.created && !select.props.remote) select.setSelected()\n }\n )\n\n watch(\n () => props.value,\n (val, oldVal) => {\n const { remote, valueKey } = select.props\n\n if (!Object.is(val, oldVal)) {\n select.onOptionDestroy(oldVal, instance.proxy)\n select.onOptionCreate(instance.proxy)\n }\n\n if (!props.created && !remote) {\n if (\n valueKey &&\n _isObject(val) &&\n _isObject(oldVal) &&\n val[valueKey] === oldVal[valueKey]\n ) {\n return\n }\n select.setSelected()\n }\n }\n )\n\n watch(\n () => selectGroup.disabled,\n () => {\n states.groupDisabled = selectGroup.disabled\n },\n { immediate: true }\n )\n\n const { queryChange } = toRaw(select)\n watch(\n queryChange,\n (changes: Ref) => {\n const { query } = unref(changes)\n\n const regexp = new RegExp(escapeStringRegexp(query), 'i')\n states.visible = regexp.test(currentLabel.value) || props.created\n if (!states.visible) {\n select.filteredOptionsCount--\n }\n },\n { immediate: true }\n )\n\n return {\n select,\n currentLabel,\n currentValue,\n itemSelected,\n isDisabled,\n hoverItem,\n }\n}\n", "\n\n\n", "\n\n\n", "// @ts-nocheck\nimport {\n computed,\n nextTick,\n reactive,\n ref,\n shallowRef,\n toRaw,\n triggerRef,\n unref,\n watch,\n} from 'vue'\nimport { isObject, toRawType } from '@vue/shared'\nimport {\n findLastIndex,\n get,\n isEqual,\n debounce as lodashDebounce,\n} from 'lodash-unified'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport {\n ValidateComponentsMap,\n debugWarn,\n getComponentSize,\n isClient,\n isFunction,\n isKorean,\n isNumber,\n isString,\n isUndefined,\n scrollIntoView,\n} from '@element-plus/utils'\nimport { useDeprecated, useLocale, useNamespace } from '@element-plus/hooks'\nimport { useFormItem, useFormSize } from '@element-plus/components/form'\n\nimport type { ComponentPublicInstance } from 'vue'\nimport type ElTooltip from '@element-plus/components/tooltip'\nimport type { QueryChangeCtx, SelectOptionProxy } from './token'\n\nexport function useSelectStates(props) {\n const { t } = useLocale()\n return reactive({\n options: new Map(),\n cachedOptions: new Map(),\n disabledOptions: new Map(),\n createdLabel: null,\n createdSelected: false,\n selected: props.multiple ? [] : ({} as any),\n inputLength: 20,\n inputWidth: 0,\n optionsCount: 0,\n filteredOptionsCount: 0,\n visible: false,\n selectedLabel: '',\n hoverIndex: -1,\n query: '',\n previousQuery: null,\n inputHovering: false,\n cachedPlaceHolder: '',\n currentPlaceholder: t('el.select.placeholder') as string | (() => string),\n menuVisibleOnFocus: false,\n isOnComposition: false,\n prefixWidth: 11,\n mouseEnter: false,\n focused: false,\n })\n}\n\ntype States = ReturnType\n\nexport const useSelect = (props, states: States, ctx) => {\n const { t } = useLocale()\n const ns = useNamespace('select')\n\n useDeprecated(\n {\n from: 'suffixTransition',\n replacement: 'override style scheme',\n version: '2.3.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/select.html#select-attributes',\n },\n computed(() => props.suffixTransition === false)\n )\n\n // template refs\n const reference = ref void\n blur: () => void\n input: HTMLInputElement\n }> | null>(null)\n const input = ref(null)\n const iOSInput = ref(null)\n const tooltipRef = ref | null>(null)\n const tagTooltipRef = ref | null>(null)\n const tags = ref(null)\n const selectWrapper = ref(null)\n const scrollbar = ref<{\n handleScroll: () => void\n } | null>(null)\n const hoverOption = ref()\n const queryChange = shallowRef({ query: '' })\n const groupQueryChange = shallowRef('')\n const optionList = ref([])\n let originClientHeight = 0\n\n const { form, formItem } = useFormItem()\n\n const readonly = computed(\n () => !props.filterable || props.multiple || !states.visible\n )\n\n const selectDisabled = computed(() => props.disabled || form?.disabled)\n\n const showClose = computed(() => {\n const hasValue = props.multiple\n ? Array.isArray(props.modelValue) && props.modelValue.length > 0\n : props.modelValue !== undefined &&\n props.modelValue !== null &&\n props.modelValue !== ''\n\n const criteria =\n props.clearable &&\n !selectDisabled.value &&\n states.inputHovering &&\n hasValue\n return criteria\n })\n const iconComponent = computed(() =>\n props.remote && props.filterable && !props.remoteShowSuffix\n ? ''\n : props.suffixIcon\n )\n const iconReverse = computed(() =>\n ns.is(\n 'reverse',\n iconComponent.value && states.visible && props.suffixTransition\n )\n )\n\n // Consistent with the processing of Form in the input component\n const showStatusIconAndState = computed(\n () =>\n form?.statusIcon &&\n formItem?.validateState &&\n ValidateComponentsMap[formItem?.validateState]\n )\n\n const debounce = computed(() => (props.remote ? 300 : 0))\n\n const emptyText = computed(() => {\n if (props.loading) {\n return props.loadingText || t('el.select.loading')\n } else {\n if (props.remote && states.query === '' && states.options.size === 0)\n return false\n if (\n props.filterable &&\n states.query &&\n states.options.size > 0 &&\n states.filteredOptionsCount === 0\n ) {\n return props.noMatchText || t('el.select.noMatch')\n }\n if (states.options.size === 0) {\n return props.noDataText || t('el.select.noData')\n }\n }\n return null\n })\n\n const optionsArray = computed(() => {\n const list = Array.from(states.options.values())\n const newList = []\n optionList.value.forEach((item) => {\n const index = list.findIndex((i) => i.currentLabel === item)\n if (index > -1) {\n newList.push(list[index])\n }\n })\n return newList.length >= list.length ? newList : list\n })\n\n const cachedOptionsArray = computed(() =>\n Array.from(states.cachedOptions.values())\n )\n\n const showNewOption = computed(() => {\n const hasExistingOption = optionsArray.value\n .filter((option) => {\n return !option.created\n })\n .some((option) => {\n return option.currentLabel === states.query\n })\n return (\n props.filterable &&\n props.allowCreate &&\n states.query !== '' &&\n !hasExistingOption\n )\n })\n\n const selectSize = useFormSize()\n\n const collapseTagSize = computed(() =>\n ['small'].includes(selectSize.value) ? 'small' : 'default'\n )\n\n const dropMenuVisible = computed({\n get() {\n return states.visible && emptyText.value !== false\n },\n set(val: boolean) {\n states.visible = val\n },\n })\n\n // watch\n watch(\n [() => selectDisabled.value, () => selectSize.value, () => form?.size],\n () => {\n nextTick(() => {\n resetInputHeight()\n })\n }\n )\n\n watch(\n () => props.placeholder,\n (val) => {\n states.cachedPlaceHolder = states.currentPlaceholder = val\n\n const hasValue =\n props.multiple &&\n Array.isArray(props.modelValue) &&\n props.modelValue.length > 0\n\n if (hasValue) {\n states.currentPlaceholder = ''\n }\n }\n )\n\n watch(\n () => props.modelValue,\n (val, oldVal) => {\n if (props.multiple) {\n resetInputHeight()\n if ((val && val.length > 0) || (input.value && states.query !== '')) {\n states.currentPlaceholder = ''\n } else {\n states.currentPlaceholder = states.cachedPlaceHolder\n }\n if (props.filterable && !props.reserveKeyword) {\n states.query = ''\n handleQueryChange(states.query)\n }\n }\n setSelected()\n if (props.filterable && !props.multiple) {\n states.inputLength = 20\n }\n if (!isEqual(val, oldVal) && props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n },\n {\n flush: 'post',\n deep: true,\n }\n )\n\n watch(\n () => states.visible,\n (val) => {\n if (!val) {\n if (props.filterable) {\n if (isFunction(props.filterMethod)) {\n props.filterMethod('')\n }\n if (isFunction(props.remoteMethod)) {\n props.remoteMethod('')\n }\n }\n states.query = ''\n states.previousQuery = null\n states.selectedLabel = ''\n states.inputLength = 20\n states.menuVisibleOnFocus = false\n resetHoverIndex()\n nextTick(() => {\n if (\n input.value &&\n input.value.value === '' &&\n states.selected.length === 0\n ) {\n states.currentPlaceholder = states.cachedPlaceHolder\n }\n })\n\n if (!props.multiple) {\n if (states.selected) {\n if (\n props.filterable &&\n props.allowCreate &&\n states.createdSelected &&\n states.createdLabel\n ) {\n states.selectedLabel = states.createdLabel\n } else {\n states.selectedLabel = states.selected.currentLabel\n }\n if (props.filterable) states.query = states.selectedLabel\n }\n\n if (props.filterable) {\n states.currentPlaceholder = states.cachedPlaceHolder\n }\n }\n } else {\n tooltipRef.value?.updatePopper?.()\n\n if (props.filterable) {\n states.filteredOptionsCount = states.optionsCount\n states.query = props.remote ? '' : states.selectedLabel\n iOSInput.value?.focus?.()\n if (props.multiple) {\n input.value?.focus()\n } else {\n if (states.selectedLabel) {\n states.currentPlaceholder = `${states.selectedLabel}`\n states.selectedLabel = ''\n }\n }\n handleQueryChange(states.query)\n if (!props.multiple && !props.remote) {\n queryChange.value.query = ''\n\n triggerRef(queryChange)\n triggerRef(groupQueryChange)\n }\n }\n }\n ctx.emit('visible-change', val)\n }\n )\n\n watch(\n // fix `Array.prototype.push/splice/..` cannot trigger non-deep watcher\n // https://github.com/vuejs/vue-next/issues/2116\n () => states.options.entries(),\n () => {\n if (!isClient) return\n tooltipRef.value?.updatePopper?.()\n if (props.multiple) {\n resetInputHeight()\n }\n const inputs = selectWrapper.value?.querySelectorAll('input') || []\n if (\n (!props.filterable &&\n !props.defaultFirstOption &&\n !isUndefined(props.modelValue)) ||\n !Array.from(inputs).includes(document.activeElement as HTMLInputElement)\n ) {\n setSelected()\n }\n if (\n props.defaultFirstOption &&\n (props.filterable || props.remote) &&\n states.filteredOptionsCount\n ) {\n checkDefaultFirstOption()\n }\n },\n {\n flush: 'post',\n }\n )\n\n watch(\n () => states.hoverIndex,\n (val) => {\n if (isNumber(val) && val > -1) {\n hoverOption.value = optionsArray.value[val] || {}\n } else {\n hoverOption.value = {}\n }\n optionsArray.value.forEach((option) => {\n option.hover = hoverOption.value === option\n })\n }\n )\n\n // methods\n const resetInputHeight = () => {\n nextTick(() => {\n if (!reference.value) return\n const input = reference.value.$el.querySelector(\n 'input'\n ) as HTMLInputElement\n originClientHeight =\n originClientHeight ||\n (input.clientHeight > 0 ? input.clientHeight + 2 : 0)\n const _tags = tags.value\n const cssVarOfSelectSize = getComputedStyle(input).getPropertyValue(\n ns.cssVarName('input-height')\n )\n const gotSize =\n Number.parseFloat(cssVarOfSelectSize) ||\n getComponentSize(selectSize.value || form?.size)\n\n const sizeInMap =\n selectSize.value ||\n gotSize === originClientHeight ||\n originClientHeight <= 0\n ? gotSize\n : originClientHeight\n\n const isElHidden = input.offsetParent === null\n\n // it's an inner input so reduce it by 2px.\n !isElHidden &&\n (input.style.height = `${\n (states.selected.length === 0\n ? sizeInMap\n : Math.max(\n _tags\n ? _tags.clientHeight +\n (_tags.clientHeight > sizeInMap ? 6 : 0)\n : 0,\n sizeInMap\n )) - 2\n }px`)\n\n if (states.visible && emptyText.value !== false) {\n tooltipRef.value?.updatePopper?.()\n }\n })\n }\n\n const handleQueryChange = async (val) => {\n if (states.previousQuery === val || states.isOnComposition) return\n if (\n states.previousQuery === null &&\n (isFunction(props.filterMethod) || isFunction(props.remoteMethod))\n ) {\n states.previousQuery = val\n return\n }\n states.previousQuery = val\n nextTick(() => {\n if (states.visible) tooltipRef.value?.updatePopper?.()\n })\n states.hoverIndex = -1\n if (props.multiple && props.filterable) {\n nextTick(() => {\n // fix: https://github.com/element-plus/element-plus/issues/13872\n if (!selectDisabled.value) {\n const length = input.value!.value.length * 15 + 20\n states.inputLength = props.collapseTags\n ? Math.min(50, length)\n : length\n managePlaceholder()\n }\n resetInputHeight()\n })\n }\n if (props.remote && isFunction(props.remoteMethod)) {\n states.hoverIndex = -1\n props.remoteMethod(val)\n } else if (isFunction(props.filterMethod)) {\n props.filterMethod(val)\n triggerRef(groupQueryChange)\n } else {\n states.filteredOptionsCount = states.optionsCount\n queryChange.value.query = val\n\n triggerRef(queryChange)\n triggerRef(groupQueryChange)\n }\n if (\n props.defaultFirstOption &&\n (props.filterable || props.remote) &&\n states.filteredOptionsCount\n ) {\n await nextTick()\n checkDefaultFirstOption()\n }\n }\n\n const managePlaceholder = () => {\n if (states.currentPlaceholder !== '') {\n states.currentPlaceholder = input.value!.value\n ? ''\n : states.cachedPlaceHolder\n }\n }\n\n /**\n * find and highlight first option as default selected\n * @remark\n * - if the first option in dropdown list is user-created,\n * it would be at the end of the optionsArray\n * so find it and set hover.\n * (NOTE: there must be only one user-created option in dropdown list with query)\n * - if there's no user-created option in list, just find the first one as usual\n * (NOTE: exclude options that are disabled or in disabled-group)\n */\n const checkDefaultFirstOption = () => {\n const optionsInDropdown = optionsArray.value.filter(\n (n) => n.visible && !n.disabled && !n.states.groupDisabled\n )\n const userCreatedOption = optionsInDropdown.find((n) => n.created)\n const firstOriginOption = optionsInDropdown[0]\n states.hoverIndex = getValueIndex(\n optionsArray.value,\n userCreatedOption || firstOriginOption\n )\n }\n\n const setSelected = () => {\n if (!props.multiple) {\n const option = getOption(props.modelValue)\n if (option.props?.created) {\n states.createdLabel = option.props.value\n states.createdSelected = true\n } else {\n states.createdSelected = false\n }\n states.selectedLabel = option.currentLabel\n states.selected = option\n if (props.filterable) states.query = states.selectedLabel\n return\n } else {\n states.selectedLabel = ''\n }\n const result: any[] = []\n if (Array.isArray(props.modelValue)) {\n props.modelValue.forEach((value) => {\n result.push(getOption(value))\n })\n }\n states.selected = result\n nextTick(() => {\n resetInputHeight()\n })\n }\n\n const getOption = (value) => {\n let option\n const isObjectValue = toRawType(value).toLowerCase() === 'object'\n const isNull = toRawType(value).toLowerCase() === 'null'\n const isUndefined = toRawType(value).toLowerCase() === 'undefined'\n\n for (let i = states.cachedOptions.size - 1; i >= 0; i--) {\n const cachedOption = cachedOptionsArray.value[i]\n const isEqualValue = isObjectValue\n ? get(cachedOption.value, props.valueKey) === get(value, props.valueKey)\n : cachedOption.value === value\n if (isEqualValue) {\n option = {\n value,\n currentLabel: cachedOption.currentLabel,\n isDisabled: cachedOption.isDisabled,\n }\n break\n }\n }\n if (option) return option\n const label = isObjectValue\n ? value.label\n : !isNull && !isUndefined\n ? value\n : ''\n const newOption = {\n value,\n currentLabel: label,\n }\n if (props.multiple) {\n ;(newOption as any).hitState = false\n }\n return newOption\n }\n\n const resetHoverIndex = () => {\n setTimeout(() => {\n const valueKey = props.valueKey\n if (!props.multiple) {\n states.hoverIndex = optionsArray.value.findIndex((item) => {\n return getValueKey(item) === getValueKey(states.selected)\n })\n } else {\n if (states.selected.length > 0) {\n states.hoverIndex = Math.min.apply(\n null,\n states.selected.map((selected) => {\n return optionsArray.value.findIndex((item) => {\n return get(item, valueKey) === get(selected, valueKey)\n })\n })\n )\n } else {\n states.hoverIndex = -1\n }\n }\n }, 300)\n }\n\n const handleResize = () => {\n resetInputWidth()\n tooltipRef.value?.updatePopper?.()\n props.multiple && resetInputHeight()\n }\n\n const resetInputWidth = () => {\n states.inputWidth = reference.value?.$el.offsetWidth\n }\n\n const onInputChange = () => {\n if (props.filterable && states.query !== states.selectedLabel) {\n states.query = states.selectedLabel\n handleQueryChange(states.query)\n }\n }\n\n const debouncedOnInputChange = lodashDebounce(() => {\n onInputChange()\n }, debounce.value)\n\n const debouncedQueryChange = lodashDebounce((e) => {\n handleQueryChange(e.target.value)\n }, debounce.value)\n\n const emitChange = (val) => {\n if (!isEqual(props.modelValue, val)) {\n ctx.emit(CHANGE_EVENT, val)\n }\n }\n\n const getLastNotDisabledIndex = (value) =>\n findLastIndex(value, (it) => !states.disabledOptions.has(it))\n\n const deletePrevTag = (e) => {\n if (e.code === EVENT_CODE.delete) return\n if (e.target.value.length <= 0 && !toggleLastOptionHitState()) {\n const value = props.modelValue.slice()\n const lastNotDisabledIndex = getLastNotDisabledIndex(value)\n if (lastNotDisabledIndex < 0) return\n value.splice(lastNotDisabledIndex, 1)\n ctx.emit(UPDATE_MODEL_EVENT, value)\n emitChange(value)\n }\n\n if (e.target.value.length === 1 && props.modelValue.length === 0) {\n states.currentPlaceholder = states.cachedPlaceHolder\n }\n }\n\n const deleteTag = (event, tag) => {\n const index = states.selected.indexOf(tag)\n if (index > -1 && !selectDisabled.value) {\n const value = props.modelValue.slice()\n value.splice(index, 1)\n ctx.emit(UPDATE_MODEL_EVENT, value)\n emitChange(value)\n ctx.emit('remove-tag', tag.value)\n }\n event.stopPropagation()\n focus()\n }\n\n const deleteSelected = (event) => {\n event.stopPropagation()\n const value: string | any[] = props.multiple ? [] : ''\n if (!isString(value)) {\n for (const item of states.selected) {\n if (item.isDisabled) value.push(item.value)\n }\n }\n ctx.emit(UPDATE_MODEL_EVENT, value)\n emitChange(value)\n states.hoverIndex = -1\n states.visible = false\n ctx.emit('clear')\n focus()\n }\n\n const handleOptionSelect = (option) => {\n if (props.multiple) {\n const value = (props.modelValue || []).slice()\n const optionIndex = getValueIndex(value, option.value)\n if (optionIndex > -1) {\n value.splice(optionIndex, 1)\n } else if (\n props.multipleLimit <= 0 ||\n value.length < props.multipleLimit\n ) {\n value.push(option.value)\n }\n ctx.emit(UPDATE_MODEL_EVENT, value)\n emitChange(value)\n if (option.created) {\n states.query = ''\n handleQueryChange('')\n states.inputLength = 20\n }\n if (props.filterable) input.value?.focus()\n } else {\n ctx.emit(UPDATE_MODEL_EVENT, option.value)\n emitChange(option.value)\n states.visible = false\n }\n\n setSoftFocus()\n if (states.visible) return\n nextTick(() => {\n scrollToOption(option)\n })\n }\n\n const getValueIndex = (arr: any[] = [], value) => {\n if (!isObject(value)) return arr.indexOf(value)\n\n const valueKey = props.valueKey\n let index = -1\n arr.some((item, i) => {\n if (toRaw(get(item, valueKey)) === get(value, valueKey)) {\n index = i\n return true\n }\n return false\n })\n return index\n }\n\n const setSoftFocus = () => {\n const _input = input.value || reference.value\n if (_input) {\n _input?.focus()\n }\n }\n\n const scrollToOption = (option) => {\n const targetOption = Array.isArray(option) ? option[0] : option\n let target = null\n\n if (targetOption?.value) {\n const options = optionsArray.value.filter(\n (item) => item.value === targetOption.value\n )\n if (options.length > 0) {\n target = options[0].$el\n }\n }\n\n if (tooltipRef.value && target) {\n const menu = tooltipRef.value?.popperRef?.contentRef?.querySelector?.(\n `.${ns.be('dropdown', 'wrap')}`\n )\n if (menu) {\n scrollIntoView(menu as HTMLElement, target)\n }\n }\n scrollbar.value?.handleScroll()\n }\n\n const onOptionCreate = (vm: SelectOptionProxy) => {\n states.optionsCount++\n states.filteredOptionsCount++\n states.options.set(vm.value, vm)\n states.cachedOptions.set(vm.value, vm)\n vm.disabled && states.disabledOptions.set(vm.value, vm)\n }\n\n const onOptionDestroy = (key, vm: SelectOptionProxy) => {\n if (states.options.get(key) === vm) {\n states.optionsCount--\n states.filteredOptionsCount--\n states.options.delete(key)\n }\n }\n\n const resetInputState = (e: KeyboardEvent) => {\n if (e.code !== EVENT_CODE.backspace) toggleLastOptionHitState(false)\n states.inputLength = input.value!.value.length * 15 + 20\n resetInputHeight()\n }\n\n const toggleLastOptionHitState = (hit?: boolean) => {\n if (!Array.isArray(states.selected)) return\n const lastNotDisabledIndex = getLastNotDisabledIndex(\n states.selected.map((it) => it.value)\n )\n const option = states.selected[lastNotDisabledIndex]\n if (!option) return\n\n if (hit === true || hit === false) {\n option.hitState = hit\n return hit\n }\n\n option.hitState = !option.hitState\n return option.hitState\n }\n\n const handleComposition = (event) => {\n const text = event.target.value\n if (event.type === 'compositionend') {\n states.isOnComposition = false\n nextTick(() => handleQueryChange(text))\n } else {\n const lastCharacter = text[text.length - 1] || ''\n states.isOnComposition = !isKorean(lastCharacter)\n }\n }\n\n const handleMenuEnter = () => {\n nextTick(() => scrollToOption(states.selected))\n }\n\n const handleFocus = (event: FocusEvent) => {\n if (!states.focused) {\n if (props.automaticDropdown || props.filterable) {\n if (props.filterable && !states.visible) {\n states.menuVisibleOnFocus = true\n }\n states.visible = true\n }\n states.focused = true\n ctx.emit('focus', event)\n }\n }\n\n const focus = () => {\n if (states.visible) {\n ;(input.value || reference.value)?.focus()\n } else {\n reference.value?.focus()\n }\n }\n\n const blur = () => {\n states.visible = false\n reference.value?.blur()\n iOSInput.value?.blur?.()\n }\n\n const handleBlur = (event: FocusEvent) => {\n // validate current focus event is inside el-tooltip-content or el-select\n // if so, ignore the blur event.\n if (\n tooltipRef.value?.isFocusInsideContent(event) ||\n tagTooltipRef.value?.isFocusInsideContent(event) ||\n selectWrapper.value?.contains(event.relatedTarget)\n ) {\n return\n }\n\n states.visible && handleClose()\n states.focused = false\n ctx.emit('blur', event)\n }\n\n const handleClearClick = (event: Event) => {\n deleteSelected(event)\n }\n\n const handleClose = () => {\n states.visible = false\n }\n\n const handleKeydownEscape = (event: KeyboardEvent) => {\n if (states.visible) {\n event.preventDefault()\n event.stopPropagation()\n states.visible = false\n }\n }\n\n const toggleMenu = (e?: PointerEvent) => {\n if (e && !states.mouseEnter) {\n return\n }\n if (!selectDisabled.value) {\n if (states.menuVisibleOnFocus) {\n states.menuVisibleOnFocus = false\n } else {\n if (!tooltipRef.value || !tooltipRef.value.isFocusInsideContent()) {\n states.visible = !states.visible\n }\n }\n focus()\n }\n }\n\n const selectOption = () => {\n if (!states.visible) {\n toggleMenu()\n } else {\n if (optionsArray.value[states.hoverIndex]) {\n handleOptionSelect(optionsArray.value[states.hoverIndex])\n }\n }\n }\n\n const getValueKey = (item) => {\n return isObject(item.value) ? get(item.value, props.valueKey) : item.value\n }\n\n const optionsAllDisabled = computed(() =>\n optionsArray.value\n .filter((option) => option.visible)\n .every((option) => option.disabled)\n )\n\n const showTagList = computed(() =>\n props.multiple ? states.selected.slice(0, props.maxCollapseTags) : []\n )\n\n const collapseTagList = computed(() =>\n props.multiple ? states.selected.slice(props.maxCollapseTags) : []\n )\n\n const navigateOptions = (direction) => {\n if (!states.visible) {\n states.visible = true\n return\n }\n if (states.options.size === 0 || states.filteredOptionsCount === 0) return\n if (states.isOnComposition) return\n\n if (!optionsAllDisabled.value) {\n if (direction === 'next') {\n states.hoverIndex++\n if (states.hoverIndex === states.options.size) {\n states.hoverIndex = 0\n }\n } else if (direction === 'prev') {\n states.hoverIndex--\n if (states.hoverIndex < 0) {\n states.hoverIndex = states.options.size - 1\n }\n }\n const option = optionsArray.value[states.hoverIndex]\n if (\n option.disabled === true ||\n option.states.groupDisabled === true ||\n !option.visible\n ) {\n navigateOptions(direction)\n }\n nextTick(() => scrollToOption(hoverOption.value))\n }\n }\n\n const handleMouseEnter = () => {\n states.mouseEnter = true\n }\n\n const handleMouseLeave = () => {\n states.mouseEnter = false\n }\n const handleDeleteTooltipTag = (event, tag) => {\n deleteTag(event, tag)\n tagTooltipRef.value?.updatePopper?.()\n }\n\n // computed style\n // if in form and use statusIcon, the width of the icon needs to be subtracted, fix #13526\n const selectTagsStyle = computed(() => ({\n maxWidth: `${\n unref(states.inputWidth) - 32 - (showStatusIconAndState.value ? 22 : 0)\n }px`,\n width: '100%',\n }))\n return {\n optionList,\n optionsArray,\n hoverOption,\n selectSize,\n handleResize,\n debouncedOnInputChange,\n debouncedQueryChange,\n deletePrevTag,\n deleteTag,\n deleteSelected,\n handleOptionSelect,\n scrollToOption,\n readonly,\n resetInputHeight,\n showClose,\n iconComponent,\n iconReverse,\n showNewOption,\n collapseTagSize,\n setSelected,\n managePlaceholder,\n selectDisabled,\n emptyText,\n toggleLastOptionHitState,\n resetInputState,\n handleComposition,\n onOptionCreate,\n onOptionDestroy,\n handleMenuEnter,\n handleFocus,\n focus,\n blur,\n handleBlur,\n handleClearClick,\n handleClose,\n handleKeydownEscape,\n toggleMenu,\n selectOption,\n getValueKey,\n navigateOptions,\n handleDeleteTooltipTag,\n dropMenuVisible,\n queryChange,\n groupQueryChange,\n showTagList,\n collapseTagList,\n\n // computed style\n selectTagsStyle,\n\n // DOM ref\n reference,\n input,\n iOSInput,\n tooltipRef,\n tagTooltipRef,\n tags,\n selectWrapper,\n scrollbar,\n\n // Mouser Event\n handleMouseEnter,\n handleMouseLeave,\n }\n}\n", "import { defineComponent } from 'vue'\nimport { isFunction, isString } from '@element-plus/utils'\nimport type { Component, VNode, VNodeNormalizedChildren } from 'vue'\n\nexport default defineComponent({\n name: 'ElOptions',\n emits: ['update-options'],\n setup(_, { slots, emit }) {\n let cachedOptions: any[] = []\n\n function isSameOptions(a: any[], b: any[]) {\n if (a.length !== b.length) return false\n for (const [index] of a.entries()) {\n if (a[index] != b[index]) {\n return false\n }\n }\n return true\n }\n\n return () => {\n const children = slots.default?.()!\n const filteredOptions: any[] = []\n\n function filterOptions(children?: VNodeNormalizedChildren) {\n if (!Array.isArray(children)) return\n ;(children as VNode[]).forEach((item) => {\n const name = ((item?.type || {}) as Component)?.name\n\n if (name === 'ElOptionGroup') {\n filterOptions(\n !isString(item.children) &&\n !Array.isArray(item.children) &&\n isFunction(item.children?.default)\n ? item.children?.default()\n : item.children\n )\n } else if (name === 'ElOption') {\n filteredOptions.push(item.props?.label)\n } else if (Array.isArray(item.children)) {\n filterOptions(item.children)\n }\n })\n }\n\n if (children.length) {\n filterOptions(children![0]?.children)\n }\n\n if (!isSameOptions(filteredOptions, cachedOptions)) {\n cachedOptions = filteredOptions\n emit('update-options', filteredOptions)\n }\n\n return children\n }\n },\n})\n", "\n \n \n\n\n\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Select from './src/select.vue'\nimport Option from './src/option.vue'\nimport OptionGroup from './src/option-group.vue'\n\nexport const ElSelect = withInstall(Select, {\n Option,\n OptionGroup,\n})\nexport default ElSelect\nexport const ElOption = withNoopInstall(Option)\nexport const ElOptionGroup = withNoopInstall(OptionGroup)\n\nexport * from './src/token'\n", "import { inject } from 'vue'\nimport { elPaginationKey } from './constants'\n\nexport const usePagination = () => inject(elPaginationKey, {})\n", "import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type Sizes from './sizes.vue'\n\nexport const paginationSizesProps = buildProps({\n pageSize: {\n type: Number,\n required: true,\n },\n pageSizes: {\n type: definePropType(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n popperClass: {\n type: String,\n },\n disabled: Boolean,\n teleported: Boolean,\n size: {\n type: String,\n values: componentSizes,\n },\n} as const)\n\nexport type PaginationSizesProps = ExtractPropTypes\n\nexport type SizesInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type Jumper from './jumper.vue'\n\nexport const paginationJumperProps = buildProps({\n size: {\n type: String,\n values: componentSizes,\n },\n} as const)\n\nexport type PaginationJumperProps = ExtractPropTypes<\n typeof paginationJumperProps\n>\n\nexport type PaginationJumperInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type Total from './total.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const paginationTotalProps = buildProps({\n total: {\n type: Number,\n default: 1000,\n },\n} as const)\n\nexport type PaginationTotalProps = ExtractPropTypes\n\nexport type TotalInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Pager from './pager.vue'\n\nexport const paginationPagerProps = buildProps({\n currentPage: {\n type: Number,\n default: 1,\n },\n pageCount: {\n type: Number,\n required: true,\n },\n pagerCount: {\n type: Number,\n default: 7,\n },\n disabled: Boolean,\n} as const)\n\nexport type PaginationPagerProps = ExtractPropTypes\n\nexport type PagerInstance = InstanceType\n", "\n\n", "import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n provide,\n ref,\n watch,\n} from 'vue'\nimport { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'\nimport {\n buildProps,\n debugWarn,\n definePropType,\n iconPropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { elPaginationKey } from './constants'\n\nimport Prev from './components/prev.vue'\nimport Next from './components/next.vue'\nimport Sizes from './components/sizes.vue'\nimport Jumper from './components/jumper.vue'\nimport Total from './components/total.vue'\nimport Pager from './components/pager.vue'\n\nimport type { ExtractPropTypes, VNode } from 'vue'\n\n/**\n * It it user's responsibility to guarantee that the value of props.total... is number\n * (same as pageSize, defaultPageSize, currentPage, defaultCurrentPage, pageCount)\n * Otherwise we can reasonable infer that the corresponding field is absent\n */\nconst isAbsent = (v: unknown): v is undefined => typeof v !== 'number'\n\ntype LayoutKey =\n | 'prev'\n | 'pager'\n | 'next'\n | 'jumper'\n | '->'\n | 'total'\n | 'sizes'\n | 'slot'\n\nexport const paginationProps = buildProps({\n /**\n * @description options of item count per page\n */\n pageSize: Number,\n /**\n * @description default initial value of page size, not setting is the same as setting 10\n */\n defaultPageSize: Number,\n /**\n * @description total item count\n */\n total: Number,\n /**\n * @description total page count. Set either `total` or `page-count` and pages will be displayed; if you need `page-sizes`, `total` is required\n */\n pageCount: Number,\n /**\n * @description number of pagers. Pagination collapses when the total page count exceeds this value\n */\n pagerCount: {\n type: Number,\n validator: (value: unknown) => {\n return (\n isNumber(value) &&\n Math.trunc(value) === value &&\n value > 4 &&\n value < 22 &&\n value % 2 === 1\n )\n },\n default: 7,\n },\n /**\n * @description current page number\n */\n currentPage: Number,\n /**\n * @description default initial value of current-page, not setting is the same as setting 1\n */\n defaultCurrentPage: Number,\n /**\n * @description layout of Pagination, elements separated with a comma\n */\n layout: {\n type: String,\n default: (\n ['prev', 'pager', 'next', 'jumper', '->', 'total'] as LayoutKey[]\n ).join(', '),\n },\n /**\n * @description item count of each page\n */\n pageSizes: {\n type: definePropType(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n /**\n * @description custom class name for the page size Select's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description text for the prev button\n */\n prevText: {\n type: String,\n default: '',\n },\n /**\n * @description icon for the prev button, higher priority of `prev-text`\n */\n prevIcon: {\n type: iconPropType,\n default: () => ArrowLeft,\n },\n /**\n * @description text for the next button\n */\n nextText: {\n type: String,\n default: '',\n },\n /**\n * @description icon for the next button, higher priority of `next-text`\n */\n nextIcon: {\n type: iconPropType,\n default: () => ArrowRight,\n },\n /**\n * @description whether Pagination size is teleported to body\n */\n teleported: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to use small pagination\n */\n small: Boolean,\n /**\n * @description whether the buttons have a background color\n */\n background: Boolean,\n /**\n * @description whether Pagination is disabled\n */\n disabled: Boolean,\n /**\n * @description whether to hide when there's only one page\n */\n hideOnSinglePage: Boolean,\n} as const)\nexport type PaginationProps = ExtractPropTypes\n\nexport const paginationEmits = {\n 'update:current-page': (val: number) => isNumber(val),\n 'update:page-size': (val: number) => isNumber(val),\n 'size-change': (val: number) => isNumber(val),\n 'current-change': (val: number) => isNumber(val),\n 'prev-click': (val: number) => isNumber(val),\n 'next-click': (val: number) => isNumber(val),\n}\nexport type PaginationEmits = typeof paginationEmits\n\nconst componentName = 'ElPagination'\nexport default defineComponent({\n name: componentName,\n\n props: paginationProps,\n emits: paginationEmits,\n\n setup(props, { emit, slots }) {\n const { t } = useLocale()\n const ns = useNamespace('pagination')\n const vnodeProps = getCurrentInstance()!.vnode.props || {}\n // we can find @xxx=\"xxx\" props on `vnodeProps` to check if user bind corresponding events\n const hasCurrentPageListener =\n 'onUpdate:currentPage' in vnodeProps ||\n 'onUpdate:current-page' in vnodeProps ||\n 'onCurrentChange' in vnodeProps\n const hasPageSizeListener =\n 'onUpdate:pageSize' in vnodeProps ||\n 'onUpdate:page-size' in vnodeProps ||\n 'onSizeChange' in vnodeProps\n const assertValidUsage = computed(() => {\n // Users have to set either one, otherwise count of pages cannot be determined\n if (isAbsent(props.total) && isAbsent(props.pageCount)) return false\n // without corresponding listener is forbidden now\n // Users have to use two way binding of `currentPage`\n // If users just want to provide a default value, `defaultCurrentPage` is here for you\n if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false\n // When you want to change sizes, things get more complex, detailed below\n // Basically the most important value we need is page count\n // either directly from props.pageCount\n // or calculated from props.total\n // we will take props.pageCount precedence over props.total\n if (props.layout.includes('sizes')) {\n if (!isAbsent(props.pageCount)) {\n // if props.pageCount is assign by user, then user have to watch pageSize change\n // and recalculate pageCount\n if (!hasPageSizeListener) return false\n } else if (!isAbsent(props.total)) {\n // Otherwise, we will see if user have props.pageSize defined\n // If so, meaning user want to have pageSize controlled himself/herself from component\n // Thus page size listener is required\n // users are account for page size change\n if (!isAbsent(props.pageSize)) {\n if (!hasPageSizeListener) {\n return false\n }\n } else {\n // (else block just for explaination)\n // else page size is controlled by el-pagination internally\n }\n }\n }\n return true\n })\n\n const innerPageSize = ref(\n isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize\n )\n const innerCurrentPage = ref(\n isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage\n )\n\n const pageSizeBridge = computed({\n get() {\n return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize\n },\n set(v: number) {\n if (isAbsent(props.pageSize)) {\n innerPageSize.value = v\n }\n if (hasPageSizeListener) {\n emit('update:page-size', v)\n emit('size-change', v)\n }\n },\n })\n\n const pageCountBridge = computed(() => {\n let pageCount = 0\n if (!isAbsent(props.pageCount)) {\n pageCount = props.pageCount\n } else if (!isAbsent(props.total)) {\n pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value))\n }\n return pageCount\n })\n\n const currentPageBridge = computed({\n get() {\n return isAbsent(props.currentPage)\n ? innerCurrentPage.value\n : props.currentPage\n },\n set(v) {\n let newCurrentPage = v\n if (v < 1) {\n newCurrentPage = 1\n } else if (v > pageCountBridge.value) {\n newCurrentPage = pageCountBridge.value\n }\n if (isAbsent(props.currentPage)) {\n innerCurrentPage.value = newCurrentPage\n }\n if (hasCurrentPageListener) {\n emit('update:current-page', newCurrentPage)\n emit('current-change', newCurrentPage)\n }\n },\n })\n\n watch(pageCountBridge, (val) => {\n if (currentPageBridge.value > val) currentPageBridge.value = val\n })\n\n function handleCurrentChange(val: number) {\n currentPageBridge.value = val\n }\n\n function handleSizeChange(val: number) {\n pageSizeBridge.value = val\n const newPageCount = pageCountBridge.value\n if (currentPageBridge.value > newPageCount) {\n currentPageBridge.value = newPageCount\n }\n }\n\n function prev() {\n if (props.disabled) return\n currentPageBridge.value -= 1\n emit('prev-click', currentPageBridge.value)\n }\n\n function next() {\n if (props.disabled) return\n currentPageBridge.value += 1\n emit('next-click', currentPageBridge.value)\n }\n\n function addClass(element: any, cls: string) {\n if (element) {\n if (!element.props) {\n element.props = {}\n }\n element.props.class = [element.props.class, cls].join(' ')\n }\n }\n\n provide(elPaginationKey, {\n pageCount: pageCountBridge,\n disabled: computed(() => props.disabled),\n currentPage: currentPageBridge,\n changeEvent: handleCurrentChange,\n handleSizeChange,\n })\n\n return () => {\n if (!assertValidUsage.value) {\n debugWarn(componentName, t('el.pagination.deprecationWarning'))\n return null\n }\n if (!props.layout) return null\n if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null\n const rootChildren: Array = []\n const rightWrapperChildren: Array = []\n const rightWrapperRoot = h(\n 'div',\n { class: ns.e('rightwrapper') },\n rightWrapperChildren\n )\n const TEMPLATE_MAP: Record<\n Exclude'>,\n VNode | VNode[] | null\n > = {\n prev: h(Prev, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n prevText: props.prevText,\n prevIcon: props.prevIcon,\n onClick: prev,\n }),\n jumper: h(Jumper, {\n size: props.small ? 'small' : 'default',\n }),\n pager: h(Pager, {\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n pagerCount: props.pagerCount,\n onChange: handleCurrentChange,\n disabled: props.disabled,\n }),\n next: h(Next, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n nextText: props.nextText,\n nextIcon: props.nextIcon,\n onClick: next,\n }),\n sizes: h(Sizes, {\n pageSize: pageSizeBridge.value,\n pageSizes: props.pageSizes,\n popperClass: props.popperClass,\n disabled: props.disabled,\n teleported: props.teleported,\n size: props.small ? 'small' : 'default',\n }),\n slot: slots?.default?.() ?? null,\n total: h(Total, { total: isAbsent(props.total) ? 0 : props.total }),\n }\n\n const components = props.layout\n .split(',')\n .map((item: string) => item.trim()) as LayoutKey[]\n\n let haveRightWrapper = false\n\n components.forEach((c) => {\n if (c === '->') {\n haveRightWrapper = true\n return\n }\n if (!haveRightWrapper) {\n rootChildren.push(TEMPLATE_MAP[c])\n } else {\n rightWrapperChildren.push(TEMPLATE_MAP[c])\n }\n })\n\n addClass(rootChildren[0], ns.is('first'))\n addClass(rootChildren[rootChildren.length - 1], ns.is('last'))\n\n if (haveRightWrapper && rightWrapperChildren.length > 0) {\n addClass(rightWrapperChildren[0], ns.is('first'))\n addClass(\n rightWrapperChildren[rightWrapperChildren.length - 1],\n ns.is('last')\n )\n rootChildren.push(rightWrapperRoot)\n }\n return h(\n 'div',\n {\n class: [\n ns.b(),\n ns.is('background', props.background),\n {\n [ns.m('small')]: props.small,\n },\n ],\n },\n rootChildren\n )\n }\n },\n})\n", "import { withInstall } from '@element-plus/utils'\n\nimport Pagination from './src/pagination'\n\nexport const ElPagination = withInstall(Pagination)\nexport default ElPagination\n\nexport * from './src/pagination'\nexport * from './src/constants'\n", "import { buttonTypes } from '@element-plus/components/button'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { buildProps, iconPropType } from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport type { ExtractPropTypes } from 'vue'\nimport type Popconfirm from './popconfirm.vue'\n\nexport const popconfirmProps = buildProps({\n /**\n * @description Title\n */\n title: String,\n /**\n * @description Confirm button text\n */\n confirmButtonText: String,\n /**\n * @description Cancel button text\n */\n cancelButtonText: String,\n /**\n * @description Confirm button type\n */\n confirmButtonType: {\n type: String,\n values: buttonTypes,\n default: 'primary',\n },\n /**\n * @description Cancel button type\n */\n cancelButtonType: {\n type: String,\n values: buttonTypes,\n default: 'text',\n },\n /**\n * @description Icon Component\n */\n icon: {\n type: iconPropType,\n default: () => QuestionFilled,\n },\n /**\n * @description Icon color\n */\n iconColor: {\n type: String,\n default: '#f90',\n },\n /**\n * @description is hide Icon\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n /**\n * @description delay of disappear, in millisecond\n */\n hideAfter: {\n type: Number,\n default: 200,\n },\n /**\n * @description whether popconfirm is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: useTooltipContentProps.persistent,\n /**\n * @description popconfirm width, min width 150px\n */\n width: {\n type: [String, Number],\n default: 150,\n },\n} as const)\n\nexport const popconfirmEmits = {\n /**\n * @description triggers when click confirm button\n */\n confirm: (e: MouseEvent) => e instanceof MouseEvent,\n /**\n * @description triggers when click cancel button\n */\n cancel: (e: MouseEvent) => e instanceof MouseEvent,\n}\n\nexport type PopconfirmEmits = typeof popconfirmEmits\n\nexport type PopconfirmProps = ExtractPropTypes\n\nexport type PopconfirmInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Popconfirm from './src/popconfirm.vue'\n\nexport const ElPopconfirm = withInstall(Popconfirm)\nexport default ElPopconfirm\n\nexport * from './src/popconfirm'\n", "import { buildProps, isBoolean } from '@element-plus/utils'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\nimport { dropdownProps } from '@element-plus/components/dropdown'\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type Popover from './popover.vue'\n\nexport const popoverProps = buildProps({\n trigger: useTooltipTriggerProps.trigger,\n placement: dropdownProps.placement,\n disabled: useTooltipTriggerProps.disabled,\n visible: useTooltipContentProps.visible,\n transition: useTooltipContentProps.transition,\n popperOptions: dropdownProps.popperOptions,\n tabindex: dropdownProps.tabindex,\n content: useTooltipContentProps.content,\n popperStyle: useTooltipContentProps.popperStyle,\n popperClass: useTooltipContentProps.popperClass,\n enterable: {\n ...useTooltipContentProps.enterable,\n default: true,\n },\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n teleported: useTooltipContentProps.teleported,\n title: String,\n\n width: {\n type: [String, Number],\n default: 150,\n },\n offset: {\n type: Number,\n default: undefined,\n },\n showAfter: {\n type: Number,\n default: 0,\n },\n hideAfter: {\n type: Number,\n default: 200,\n },\n autoClose: {\n type: Number,\n default: 0,\n },\n showArrow: {\n type: Boolean,\n default: true,\n },\n persistent: {\n type: Boolean,\n default: true,\n },\n 'onUpdate:visible': {\n type: Function as PropType<(visible: boolean) => void>,\n },\n} as const)\nexport type PopoverProps = ExtractPropTypes\n\nexport const popoverEmits = {\n 'update:visible': (value: boolean) => isBoolean(value),\n 'before-enter': () => true,\n 'before-leave': () => true,\n 'after-enter': () => true,\n 'after-leave': () => true,\n}\nexport type PopoverEmits = typeof popoverEmits\n\nexport type PopoverInstance = InstanceType\n", "\n\n", "import type { DirectiveBinding, ObjectDirective } from 'vue'\nimport type { PopoverInstance } from './popover'\n\nconst attachEvents = (el: HTMLElement, binding: DirectiveBinding) => {\n const popperComponent: PopoverInstance = binding.arg || binding.value\n const popover = popperComponent?.popperRef\n if (popover) {\n popover.triggerRef = el\n }\n}\n\nexport default {\n mounted(el, binding) {\n attachEvents(el, binding)\n },\n updated(el, binding) {\n attachEvents(el, binding)\n },\n} as ObjectDirective\n\nexport const VPopover = 'popover'\n", "import { withInstall, withInstallDirective } from '@element-plus/utils'\n\nimport Popover from './src/popover.vue'\nimport PopoverDirective, { VPopover } from './src/directive'\n\nexport const ElPopoverDirective = withInstallDirective(\n PopoverDirective,\n VPopover\n)\n\nexport const ElPopover = withInstall(Popover, {\n directive: ElPopoverDirective,\n})\nexport default ElPopover\n\nexport * from './src/popover'\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, SVGAttributes } from 'vue'\nimport type Progress from './progress.vue'\n\nexport type ProgressColor = { color: string; percentage: number }\nexport type ProgressFn = (percentage: number) => string\n\nexport const progressProps = buildProps({\n /**\n * @description type of progress bar\n */\n type: {\n type: String,\n default: 'line',\n values: ['line', 'circle', 'dashboard'],\n },\n /**\n * @description percentage, required\n */\n percentage: {\n type: Number,\n default: 0,\n validator: (val: number): boolean => val >= 0 && val <= 100,\n },\n /**\n * @description the current status of progress bar\n */\n status: {\n type: String,\n default: '',\n values: ['', 'success', 'exception', 'warning'],\n },\n /**\n * @description set indeterminate progress\n */\n indeterminate: {\n type: Boolean,\n default: false,\n },\n /**\n * @description control the animation duration of indeterminate progress or striped flow progress\n */\n duration: {\n type: Number,\n default: 3,\n },\n /**\n * @description the width of progress bar\n */\n strokeWidth: {\n type: Number,\n default: 6,\n },\n /**\n * @description butt/circle/dashboard type shape at the end path\n */\n strokeLinecap: {\n type: definePropType>(String),\n default: 'round',\n },\n /**\n * @description whether to place the percentage inside progress bar, only works when `type` is 'line'\n */\n textInside: {\n type: Boolean,\n default: false,\n },\n /**\n * @description the canvas width of circle progress bar\n */\n width: {\n type: Number,\n default: 126,\n },\n /**\n * @description whether to show percentage\n */\n showText: {\n type: Boolean,\n default: true,\n },\n /**\n * @description background color of progress bar. Overrides `status` prop\n */\n color: {\n type: definePropType([\n String,\n Array,\n Function,\n ]),\n default: '',\n },\n /**\n * @description stripe over the progress bar's color\n */\n striped: Boolean,\n /**\n * @description get the stripes to flow\n */\n stripedFlow: Boolean,\n /**\n * @description custom text format\n */\n format: {\n type: definePropType(Function),\n default: (percentage: number): string => `${percentage}%`,\n },\n} as const)\n\nexport type ProgressProps = ExtractPropTypes\nexport type ProgressInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Progress from './src/progress.vue'\n\nexport const ElProgress = withInstall(Progress)\nexport default ElProgress\n\nexport * from './src/progress'\n", "import { Star, StarFilled } from '@element-plus/icons-vue'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n iconPropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Rate from './rate.vue'\n\nexport const rateProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: Number,\n default: 0,\n },\n /**\n * @description native `id` attribute\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description threshold value between low and medium level. The value itself will be included in low level\n */\n lowThreshold: {\n type: Number,\n default: 2,\n },\n /**\n * @description threshold value between medium and high level. The value itself will be included in high level\n */\n highThreshold: {\n type: Number,\n default: 4,\n },\n /**\n * @description max rating score\n */\n max: {\n type: Number,\n default: 5,\n },\n /**\n * @description colors for icons. If array, it should have 3 elements, each of which corresponds with a score level, else if object, the key should be threshold value between two levels, and the value should be corresponding color\n */\n colors: {\n type: definePropType>([Array, Object]),\n default: () => mutable(['', '', ''] as const),\n },\n /**\n * @description color of unselected icons\n */\n voidColor: {\n type: String,\n default: '',\n },\n /**\n * @description color of unselected read-only icons\n */\n disabledVoidColor: {\n type: String,\n default: '',\n },\n /**\n * @description icon components. If array, it should have 3 elements, each of which corresponds with a score level, else if object, the key should be threshold value between two levels, and the value should be corresponding icon component\n */\n icons: {\n type: definePropType<\n Array | Record\n >([Array, Object]),\n default: () =>\n [StarFilled, StarFilled, StarFilled] as [Component, Component, Component],\n },\n /**\n * @description component of unselected icons\n */\n voidIcon: {\n type: iconPropType,\n default: () => Star as Component,\n },\n /**\n * @description component of unselected read-only icons\n */\n disabledVoidIcon: {\n type: iconPropType,\n default: () => StarFilled as Component,\n },\n /**\n * @description whether Rate is read-only\n */\n disabled: Boolean,\n /**\n * @description whether picking half start is allowed\n */\n allowHalf: Boolean,\n /**\n * @description whether to display texts\n */\n showText: Boolean,\n /**\n * @description whether to display current score. show-score and show-text cannot be true at the same time\n */\n showScore: Boolean,\n /**\n * @description color of texts\n */\n textColor: {\n type: String,\n default: '',\n },\n /**\n * @description text array\n */\n texts: {\n type: definePropType(Array),\n default: () =>\n mutable([\n 'Extremely bad',\n 'Disappointed',\n 'Fair',\n 'Satisfied',\n 'Surprise',\n ] as const),\n },\n /**\n * @description score template\n */\n scoreTemplate: {\n type: String,\n default: '{value}',\n },\n /**\n * @description size of Rate\n */\n size: useSizeProp,\n /**\n * @description same as `aria-label` in Rate\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether value can be reset to `0`\n */\n clearable: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport type RateProps = ExtractPropTypes\n\nexport const rateEmits = {\n [CHANGE_EVENT]: (value: number) => isNumber(value),\n [UPDATE_MODEL_EVENT]: (value: number) => isNumber(value),\n}\nexport type RateEmits = typeof rateEmits\n\nexport type RateInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Rate from './src/rate.vue'\n\nexport const ElRate = withInstall(Rate)\nexport default ElRate\n\nexport * from './src/rate'\n", "import { buildProps } from '@element-plus/utils'\nimport {\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n typeof IconMap[keyof typeof IconMap],\n Component\n> = {\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n /**\n * @description title of result\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description sub title of result\n */\n subTitle: {\n type: String,\n default: '',\n },\n /**\n * @description icon type of result\n */\n icon: {\n type: String,\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes\n\nexport type ResultInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\nimport Result from './src/result.vue'\n\nexport const ElResult = withInstall(Result)\n\nexport default ElResult\n\nexport * from './src/result'\n", "var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var cache = null;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {\n return cache.lastResult;\n }\n var lastResult = resultFn.apply(this, newArgs);\n cache = {\n lastResult: lastResult,\n lastArgs: newArgs,\n lastThis: this,\n };\n return lastResult;\n }\n memoized.clear = function clear() {\n cache = null;\n };\n return memoized;\n}\n\nexport { memoizeOne as default };\n", "import { computed, getCurrentInstance } from 'vue'\nimport { memoize } from 'lodash-unified'\nimport memoOne from 'memoize-one'\n\nimport type { VirtualizedProps } from '../props'\n\nexport const useCache = () => {\n const vm = getCurrentInstance()!\n\n const props = vm.proxy!.$props as VirtualizedProps\n\n return computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _getItemStyleCache = (_: any, __: any, ___: any) => ({})\n return props.perfMode\n ? memoize(_getItemStyleCache)\n : memoOne(_getItemStyleCache)\n })\n}\n", "export const DEFAULT_DYNAMIC_LIST_ITEM_SIZE = 50\n\nexport const ITEM_RENDER_EVT = 'itemRendered'\nexport const SCROLL_EVT = 'scroll'\n\nexport const FORWARD = 'forward'\nexport const BACKWARD = 'backward'\n\nexport const AUTO_ALIGNMENT = 'auto'\nexport const SMART_ALIGNMENT = 'smart'\nexport const START_ALIGNMENT = 'start'\nexport const CENTERED_ALIGNMENT = 'center'\nexport const END_ALIGNMENT = 'end'\n\nexport const HORIZONTAL = 'horizontal'\nexport const VERTICAL = 'vertical'\n\nexport const LTR = 'ltr'\nexport const RTL = 'rtl'\n\nexport const RTL_OFFSET_NAG = 'negative'\nexport const RTL_OFFSET_POS_ASC = 'positive-ascending'\nexport const RTL_OFFSET_POS_DESC = 'positive-descending'\n\nexport const PageKey = {\n [HORIZONTAL]: 'pageX',\n [VERTICAL]: 'pageY',\n}\n\nexport const ScrollbarSizeKey = {\n [HORIZONTAL]: 'height',\n [VERTICAL]: 'width',\n}\n\nexport const ScrollbarDirKey = {\n [HORIZONTAL]: 'left',\n [VERTICAL]: 'top',\n}\n\nexport const SCROLLBAR_MIN_SIZE = 20\n", "// @ts-nocheck\nimport { cAF, isFirefox, rAF } from '@element-plus/utils'\nimport { HORIZONTAL, VERTICAL } from '../defaults'\n\nimport type { ComputedRef } from 'vue'\nimport type { LayoutDirection } from '../types'\n\nconst LayoutKeys = {\n [HORIZONTAL]: 'deltaX',\n [VERTICAL]: 'deltaY',\n}\n\ninterface ListWheelState {\n atStartEdge: ComputedRef // exclusive to reachEnd\n atEndEdge: ComputedRef\n layout: ComputedRef\n}\n\ntype ListWheelHandler = (offset: number) => void\n\nconst useWheel = (\n { atEndEdge, atStartEdge, layout }: ListWheelState,\n onWheelDelta: ListWheelHandler\n) => {\n let frameHandle: number\n let offset = 0\n\n // let scrollLock = false\n // let lockHandle = null\n\n // const lockScroll = () => {\n // clearTimeout(lockHandle)\n // scrollLock = true\n // lockHandle = setTimeout(() => scrollLock = false, 50)\n // }\n\n const hasReachedEdge = (offset: number) => {\n const edgeReached =\n (offset < 0 && atStartEdge.value) || (offset > 0 && atEndEdge.value)\n\n return edgeReached\n }\n\n const onWheel = (e: WheelEvent) => {\n cAF(frameHandle)\n\n const newOffset = e[LayoutKeys[layout.value]]\n\n if (hasReachedEdge(offset) && hasReachedEdge(offset + newOffset)) return\n\n offset += newOffset\n\n if (!isFirefox()) {\n e.preventDefault()\n }\n\n frameHandle = rAF(() => {\n onWheelDelta(offset)\n offset = 0\n })\n }\n\n return {\n hasReachedEdge,\n onWheel,\n }\n}\n\nexport default useWheel\n", "import {\n buildProp,\n buildProps,\n definePropType,\n mutable,\n} from '@element-plus/utils'\nimport { VERTICAL } from './defaults'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { GridItemKeyGetter, ItemSize } from './types'\n\nconst itemSize = buildProp({\n type: definePropType([Number, Function]),\n required: true,\n} as const)\n\nconst estimatedItemSize = buildProp({\n type: Number,\n} as const)\n\nconst cache = buildProp({\n type: Number,\n default: 2,\n} as const)\n\nconst direction = buildProp({\n type: String,\n values: ['ltr', 'rtl'],\n default: 'ltr',\n} as const)\n\nconst initScrollOffset = buildProp({\n type: Number,\n default: 0,\n} as const)\n\nconst total = buildProp({\n type: Number,\n required: true,\n} as const)\n\nconst layout = buildProp({\n type: String,\n values: ['horizontal', 'vertical'],\n default: VERTICAL,\n} as const)\n\nexport const virtualizedProps = buildProps({\n className: {\n type: String,\n default: '',\n },\n\n containerElement: {\n type: definePropType([String, Object]),\n default: 'div',\n },\n\n data: {\n type: definePropType(Array),\n default: () => mutable([] as const),\n },\n\n /**\n * @description controls the horizontal direction.\n */\n direction,\n\n height: {\n type: [String, Number],\n required: true,\n },\n\n innerElement: {\n type: [String, Object],\n default: 'div',\n },\n\n style: {\n type: definePropType([Object, String, Array]),\n },\n\n useIsScrolling: {\n type: Boolean,\n default: false,\n },\n\n width: {\n type: [Number, String],\n required: false,\n },\n\n perfMode: {\n type: Boolean,\n default: true,\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport const virtualizedListProps = buildProps({\n /**\n * @description describes how many items should be pre rendered to the head\n * and the tail of the window\n */\n cache,\n\n estimatedItemSize,\n\n /**\n * @description controls the list's orientation\n */\n layout,\n\n initScrollOffset,\n\n /**\n * @description describes the total number of the list.\n */\n total,\n\n itemSize,\n ...virtualizedProps,\n} as const)\n\nconst scrollbarSize = {\n type: Number,\n default: 6,\n} as const\n\nconst startGap = { type: Number, default: 0 } as const\nconst endGap = { type: Number, default: 2 } as const\n\nexport const virtualizedGridProps = buildProps({\n columnCache: cache,\n columnWidth: itemSize,\n estimatedColumnWidth: estimatedItemSize,\n estimatedRowHeight: estimatedItemSize,\n initScrollLeft: initScrollOffset,\n initScrollTop: initScrollOffset,\n itemKey: {\n type: definePropType(Function),\n default: ({\n columnIndex,\n rowIndex,\n }: {\n columnIndex: number\n rowIndex: number\n }) => `${rowIndex}:${columnIndex}`,\n },\n rowCache: cache,\n rowHeight: itemSize,\n totalColumn: total,\n totalRow: total,\n hScrollbarSize: scrollbarSize,\n vScrollbarSize: scrollbarSize,\n scrollbarStartGap: startGap,\n scrollbarEndGap: endGap,\n role: String,\n ...virtualizedProps,\n} as const)\n\nexport const virtualizedScrollbarProps = buildProps({\n alwaysOn: Boolean,\n class: String,\n layout,\n total,\n ratio: {\n type: Number,\n required: true,\n },\n clientSize: {\n type: Number,\n required: true,\n },\n scrollFrom: {\n type: Number,\n required: true,\n },\n scrollbarSize,\n startGap,\n endGap,\n\n visible: Boolean,\n} as const)\n\nexport type VirtualizedProps = ExtractPropTypes\nexport type VirtualizedListProps = ExtractPropTypes\nexport type VirtualizedGridProps = ExtractPropTypes\n\nexport type VirtualizedScrollbarProps = ExtractPropTypes<\n typeof virtualizedScrollbarProps\n>\n", "// @ts-nocheck\nimport {\n BACKWARD,\n FORWARD,\n HORIZONTAL,\n LTR,\n PageKey,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n} from './defaults'\n\nimport type { CSSProperties } from 'vue'\nimport type { Direction, LayoutDirection, RTLOffsetType } from './types'\n\nexport const getScrollDir = (prev: number, cur: number) =>\n prev < cur ? FORWARD : BACKWARD\n\nexport const isHorizontal = (dir: string) =>\n dir === LTR || dir === RTL || dir === HORIZONTAL\n\nexport const isRTL = (dir: Direction) => dir === RTL\n\nlet cachedRTLResult: RTLOffsetType | null = null\n\nexport function getRTLOffsetType(recalculate = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n\n outerDiv.appendChild(innerDiv)\n\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = RTL_OFFSET_POS_DESC\n } else {\n outerDiv.scrollLeft = 1\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = RTL_OFFSET_NAG\n } else {\n cachedRTLResult = RTL_OFFSET_POS_ASC\n }\n }\n\n document.body.removeChild(outerDiv)\n\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n\nexport const getRelativePos = (\n e: TouchEvent | MouseEvent,\n layout: LayoutDirection\n) => {\n return 'touches' in e ? e.touches[0][PageKey[layout]] : e[PageKey[layout]]\n}\n\ntype RenderThumbStyleParams = {\n bar: {\n size: 'height' | 'width'\n axis: 'X' | 'Y'\n }\n size: string\n move: number\n}\n\nexport function renderThumbStyle(\n { move, size, bar }: RenderThumbStyleParams,\n layout: string\n) {\n const style: CSSProperties = {}\n const translate = `translate${bar.axis}(${move}px)`\n\n style[bar.size] = size\n style.transform = translate\n style.msTransform = translate\n // polyfill\n ;(style as any).webkitTransform = translate\n\n if (layout === 'horizontal') {\n style.height = '100%'\n } else {\n style.width = '100%'\n }\n\n return style\n}\n", "// @ts-nocheck\nimport {\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n reactive,\n ref,\n unref,\n watch,\n withModifiers,\n} from 'vue'\nimport { BAR_MAP } from '@element-plus/components/scrollbar'\nimport { cAF, rAF } from '@element-plus/utils'\n\nimport { useNamespace } from '@element-plus/hooks'\nimport { HORIZONTAL, SCROLLBAR_MIN_SIZE, ScrollbarDirKey } from '../defaults'\nimport { virtualizedScrollbarProps } from '../props'\nimport { renderThumbStyle } from '../utils'\n\nimport type { CSSProperties } from 'vue'\n\nconst ScrollBar = defineComponent({\n name: 'ElVirtualScrollBar',\n props: virtualizedScrollbarProps,\n emits: ['scroll', 'start-move', 'stop-move'],\n setup(props, { emit }) {\n const GAP = computed(() => props.startGap + props.endGap) // top 2 + bottom 2 | left 2 + right 2\n\n const nsVirtualScrollbar = useNamespace('virtual-scrollbar')\n const nsScrollbar = useNamespace('scrollbar')\n // DOM refs\n const trackRef = ref()\n const thumbRef = ref()\n\n // local variables\n let frameHandle: null | number = null\n let onselectstartStore: null | typeof document.onselectstart = null\n\n // data\n const state = reactive({\n isDragging: false,\n traveled: 0,\n })\n\n const bar = computed(() => BAR_MAP[props.layout])\n\n const trackSize = computed(() => props.clientSize! - unref(GAP))\n\n const trackStyle = computed(() => ({\n position: 'absolute',\n width: `${\n HORIZONTAL === props.layout ? trackSize.value : props.scrollbarSize\n }px`,\n height: `${\n HORIZONTAL === props.layout ? props.scrollbarSize : trackSize.value\n }px`,\n [ScrollbarDirKey[props.layout]]: '2px',\n right: '2px',\n bottom: '2px',\n borderRadius: '4px',\n }))\n\n const thumbSize = computed(() => {\n const ratio = props.ratio!\n const clientSize = props.clientSize!\n if (ratio >= 100) {\n return Number.POSITIVE_INFINITY\n }\n\n if (ratio >= 50) {\n return (ratio * clientSize) / 100\n }\n\n const SCROLLBAR_MAX_SIZE = clientSize / 3\n return Math.floor(\n Math.min(\n Math.max(ratio * clientSize, SCROLLBAR_MIN_SIZE),\n SCROLLBAR_MAX_SIZE\n )\n )\n })\n\n // const sizeRange = computed(() => props.size - thumbSize.value)\n\n const thumbStyle = computed(() => {\n if (!Number.isFinite(thumbSize.value)) {\n return {\n display: 'none',\n }\n }\n\n const thumb = `${thumbSize.value}px`\n\n const style: CSSProperties = renderThumbStyle(\n {\n bar: bar.value,\n size: thumb,\n move: state.traveled,\n },\n props.layout\n )\n\n return style\n })\n\n const totalSteps = computed(() =>\n Math.floor(props.clientSize! - thumbSize.value - unref(GAP))\n )\n\n const attachEvents = () => {\n window.addEventListener('mousemove', onMouseMove)\n window.addEventListener('mouseup', onMouseUp)\n\n const thumbEl = unref(thumbRef)\n\n if (!thumbEl) return\n\n onselectstartStore = document.onselectstart\n document.onselectstart = () => false\n\n thumbEl.addEventListener('touchmove', onMouseMove)\n thumbEl.addEventListener('touchend', onMouseUp)\n }\n\n const detachEvents = () => {\n window.removeEventListener('mousemove', onMouseMove)\n window.removeEventListener('mouseup', onMouseUp)\n\n document.onselectstart = onselectstartStore\n onselectstartStore = null\n\n const thumbEl = unref(thumbRef)\n if (!thumbEl) return\n\n thumbEl.removeEventListener('touchmove', onMouseMove)\n thumbEl.removeEventListener('touchend', onMouseUp)\n }\n\n const onThumbMouseDown = (e: Event) => {\n e.stopImmediatePropagation()\n if (\n (e as KeyboardEvent).ctrlKey ||\n [1, 2].includes((e as MouseEvent).button)\n ) {\n return\n }\n\n state.isDragging = true\n state[bar.value.axis] =\n e.currentTarget![bar.value.offset] -\n (e[bar.value.client] -\n (e.currentTarget as HTMLElement).getBoundingClientRect()[\n bar.value.direction\n ])\n\n emit('start-move')\n attachEvents()\n }\n\n const onMouseUp = () => {\n state.isDragging = false\n state[bar.value.axis] = 0\n emit('stop-move')\n detachEvents()\n }\n\n const onMouseMove = (e: Event) => {\n const { isDragging } = state\n if (!isDragging) return\n if (!thumbRef.value || !trackRef.value) return\n\n const prevPage = state[bar.value.axis]\n if (!prevPage) return\n\n cAF(frameHandle!)\n // using the current track's offset top/left - the current pointer's clientY/clientX\n // to get the relative position of the pointer to the track.\n const offset =\n (trackRef.value.getBoundingClientRect()[bar.value.direction] -\n e[bar.value.client]) *\n -1\n\n // find where the thumb was clicked on.\n const thumbClickPosition = thumbRef.value[bar.value.offset] - prevPage\n /**\n * +--------------+ +--------------+\n * | - <--------- thumb.offsetTop | |\n * | |+| <--+ | |\n * | - | | |\n * | Content | | | |\n * | | | | |\n * | | | | |\n * | | | | -\n * | | +--> | |+|\n * | | | -\n * +--------------+ +--------------+\n */\n\n // using the current position - prev position to\n\n const distance = offset - thumbClickPosition\n // get how many steps in total.\n // gap of 2 on top, 2 on bottom, in total 4.\n // using totalSteps ÷ totalSize getting each step's size * distance to get the new\n // scroll offset to scrollTo\n frameHandle = rAF(() => {\n state.traveled = Math.max(\n props.startGap,\n Math.min(\n distance,\n totalSteps.value // 2 is the top value\n )\n )\n emit('scroll', distance, totalSteps.value)\n })\n }\n\n const clickTrackHandler = (e: MouseEvent) => {\n const offset = Math.abs(\n (e.target as HTMLElement).getBoundingClientRect()[bar.value.direction] -\n e[bar.value.client]\n )\n const thumbHalf = thumbRef.value![bar.value.offset] / 2\n const distance = offset - thumbHalf\n\n state.traveled = Math.max(0, Math.min(distance, totalSteps.value))\n emit('scroll', distance, totalSteps.value)\n }\n\n watch(\n () => props.scrollFrom,\n (v) => {\n if (state.isDragging) return\n /**\n * this is simply mapping the current scrollbar offset\n *\n * formula 1:\n * v = scrollOffset / (estimatedTotalSize - clientSize)\n * traveled = v * (clientSize - thumbSize - GAP) --> v * totalSteps\n *\n * formula 2:\n * traveled = (v * clientSize) / (clientSize / totalSteps) --> (v * clientSize) * (totalSteps / clientSize) --> v * totalSteps\n */\n state.traveled = Math.ceil(v! * totalSteps.value)\n }\n )\n\n onBeforeUnmount(() => {\n detachEvents()\n })\n\n return () => {\n return h(\n 'div',\n {\n role: 'presentation',\n ref: trackRef,\n class: [\n nsVirtualScrollbar.b(),\n props.class,\n (props.alwaysOn || state.isDragging) && 'always-on',\n ],\n style: trackStyle.value,\n onMousedown: withModifiers(clickTrackHandler, ['stop', 'prevent']),\n onTouchstartPrevent: onThumbMouseDown,\n },\n h(\n 'div',\n {\n ref: thumbRef,\n class: nsScrollbar.e('thumb'),\n style: thumbStyle.value,\n onMousedown: onThumbMouseDown,\n },\n []\n )\n )\n }\n },\n})\n\nexport default ScrollBar\n", "// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n onUpdated,\n ref,\n resolveDynamicComponent,\n unref,\n} from 'vue'\nimport { hasOwn, isClient, isNumber, isString } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useCache } from '../hooks/use-cache'\nimport useWheel from '../hooks/use-wheel'\nimport Scrollbar from '../components/scrollbar'\nimport { getRTLOffsetType, getScrollDir, isHorizontal } from '../utils'\nimport { virtualizedListProps } from '../props'\nimport {\n AUTO_ALIGNMENT,\n BACKWARD,\n FORWARD,\n HORIZONTAL,\n ITEM_RENDER_EVT,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n SCROLL_EVT,\n} from '../defaults'\n\nimport type { CSSProperties, Slot, VNode, VNodeChild } from 'vue'\nimport type { Alignment, ListConstructorProps } from '../types'\nimport type { VirtualizedListProps } from '../props'\n\nconst createList = ({\n name,\n getOffset,\n getItemSize,\n getItemOffset,\n getEstimatedTotalSize,\n getStartIndexForOffset,\n getStopIndexForStartIndex,\n initCache,\n clearCache,\n validateProps,\n}: ListConstructorProps) => {\n return defineComponent({\n name: name ?? 'ElVirtualList',\n props: virtualizedListProps,\n emits: [ITEM_RENDER_EVT, SCROLL_EVT],\n setup(props, { emit, expose }) {\n validateProps(props)\n const instance = getCurrentInstance()!\n\n const ns = useNamespace('vl')\n\n const dynamicSizeCache = ref(initCache(props, instance))\n\n const getItemStyleCache = useCache()\n // refs\n // here windowRef and innerRef can be type of HTMLElement\n // or user defined component type, depends on the type passed\n // by user\n const windowRef = ref()\n const innerRef = ref()\n const scrollbarRef = ref()\n const states = ref({\n isScrolling: false,\n scrollDir: 'forward',\n scrollOffset: isNumber(props.initScrollOffset)\n ? props.initScrollOffset\n : 0,\n updateRequested: false,\n isScrollbarDragging: false,\n scrollbarAlwaysOn: props.scrollbarAlwaysOn,\n })\n\n // computed\n const itemsToRender = computed(() => {\n const { total, cache } = props\n const { isScrolling, scrollDir, scrollOffset } = unref(states)\n\n if (total === 0) {\n return [0, 0, 0, 0]\n }\n\n const startIndex = getStartIndexForOffset(\n props,\n scrollOffset,\n unref(dynamicSizeCache)\n )\n const stopIndex = getStopIndexForStartIndex(\n props,\n startIndex,\n scrollOffset,\n unref(dynamicSizeCache)\n )\n\n const cacheBackward =\n !isScrolling || scrollDir === BACKWARD ? Math.max(1, cache) : 1\n const cacheForward =\n !isScrolling || scrollDir === FORWARD ? Math.max(1, cache) : 1\n\n return [\n Math.max(0, startIndex - cacheBackward),\n Math.max(0, Math.min(total! - 1, stopIndex + cacheForward)),\n startIndex,\n stopIndex,\n ]\n })\n\n const estimatedTotalSize = computed(() =>\n getEstimatedTotalSize(props, unref(dynamicSizeCache))\n )\n\n const _isHorizontal = computed(() => isHorizontal(props.layout))\n\n const windowStyle = computed(() => [\n {\n position: 'relative',\n [`overflow-${_isHorizontal.value ? 'x' : 'y'}`]: 'scroll',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n },\n {\n direction: props.direction,\n height: isNumber(props.height) ? `${props.height}px` : props.height,\n width: isNumber(props.width) ? `${props.width}px` : props.width,\n },\n props.style,\n ])\n\n const innerStyle = computed(() => {\n const size = unref(estimatedTotalSize)\n const horizontal = unref(_isHorizontal)\n return {\n height: horizontal ? '100%' : `${size}px`,\n pointerEvents: unref(states).isScrolling ? 'none' : undefined,\n width: horizontal ? `${size}px` : '100%',\n }\n })\n\n const clientSize = computed(() =>\n _isHorizontal.value ? props.width : props.height\n )\n\n // methods\n const { onWheel } = useWheel(\n {\n atStartEdge: computed(() => states.value.scrollOffset <= 0),\n atEndEdge: computed(\n () => states.value.scrollOffset >= estimatedTotalSize.value\n ),\n layout: computed(() => props.layout),\n },\n (offset) => {\n ;(\n scrollbarRef.value as any as {\n onMouseUp: () => void\n }\n ).onMouseUp?.()\n scrollTo(\n Math.min(\n states.value.scrollOffset + offset,\n estimatedTotalSize.value - (clientSize.value as number)\n )\n )\n }\n )\n\n const emitEvents = () => {\n const { total } = props\n\n if (total! > 0) {\n const [cacheStart, cacheEnd, visibleStart, visibleEnd] =\n unref(itemsToRender)\n emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd)\n }\n\n const { scrollDir, scrollOffset, updateRequested } = unref(states)\n emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested)\n }\n\n const scrollVertically = (e: Event) => {\n const { clientHeight, scrollHeight, scrollTop } =\n e.currentTarget as HTMLElement\n const _states = unref(states)\n if (_states.scrollOffset === scrollTop) {\n return\n }\n\n const scrollOffset = Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n )\n\n states.value = {\n ..._states,\n isScrolling: true,\n scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),\n scrollOffset,\n updateRequested: false,\n }\n\n nextTick(resetIsScrolling)\n }\n\n const scrollHorizontally = (e: Event) => {\n const { clientWidth, scrollLeft, scrollWidth } =\n e.currentTarget as HTMLElement\n const _states = unref(states)\n\n if (_states.scrollOffset === scrollLeft) {\n return\n }\n\n const { direction } = props\n\n let scrollOffset = scrollLeft\n\n if (direction === RTL) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG: {\n scrollOffset = -scrollLeft\n break\n }\n case RTL_OFFSET_POS_DESC: {\n scrollOffset = scrollWidth - clientWidth - scrollLeft\n break\n }\n }\n }\n\n scrollOffset = Math.max(\n 0,\n Math.min(scrollOffset, scrollWidth - clientWidth)\n )\n\n states.value = {\n ..._states,\n isScrolling: true,\n scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),\n scrollOffset,\n updateRequested: false,\n }\n\n nextTick(resetIsScrolling)\n }\n\n const onScroll = (e: Event) => {\n unref(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e)\n emitEvents()\n }\n\n const onScrollbarScroll = (distanceToGo: number, totalSteps: number) => {\n const offset =\n ((estimatedTotalSize.value - (clientSize.value as number)) /\n totalSteps) *\n distanceToGo\n scrollTo(\n Math.min(\n estimatedTotalSize.value - (clientSize.value as number),\n offset\n )\n )\n }\n\n const scrollTo = (offset: number) => {\n offset = Math.max(offset, 0)\n\n if (offset === unref(states).scrollOffset) {\n return\n }\n\n states.value = {\n ...unref(states),\n scrollOffset: offset,\n scrollDir: getScrollDir(unref(states).scrollOffset, offset),\n updateRequested: true,\n }\n\n nextTick(resetIsScrolling)\n }\n\n const scrollToItem = (\n idx: number,\n alignment: Alignment = AUTO_ALIGNMENT\n ) => {\n const { scrollOffset } = unref(states)\n\n idx = Math.max(0, Math.min(idx, props.total! - 1))\n scrollTo(\n getOffset(\n props,\n idx,\n alignment,\n scrollOffset,\n unref(dynamicSizeCache)\n )\n )\n }\n\n const getItemStyle = (idx: number) => {\n const { direction, itemSize, layout } = props\n\n const itemStyleCache = getItemStyleCache.value(\n clearCache && itemSize,\n clearCache && layout,\n clearCache && direction\n )\n\n let style: CSSProperties\n if (hasOwn(itemStyleCache, String(idx))) {\n style = itemStyleCache[idx]\n } else {\n const offset = getItemOffset(props, idx, unref(dynamicSizeCache))\n const size = getItemSize(props, idx, unref(dynamicSizeCache))\n const horizontal = unref(_isHorizontal)\n\n const isRtl = direction === RTL\n const offsetHorizontal = horizontal ? offset : 0\n itemStyleCache[idx] = style = {\n position: 'absolute',\n left: isRtl ? undefined : `${offsetHorizontal}px`,\n right: isRtl ? `${offsetHorizontal}px` : undefined,\n top: !horizontal ? `${offset}px` : 0,\n height: !horizontal ? `${size}px` : '100%',\n width: horizontal ? `${size}px` : '100%',\n }\n }\n\n return style\n }\n\n // TODO:\n // perf optimization here, reset isScrolling with debounce.\n\n const resetIsScrolling = () => {\n // timer = null\n\n states.value.isScrolling = false\n nextTick(() => {\n getItemStyleCache.value(-1, null, null)\n })\n }\n\n const resetScrollTop = () => {\n const window = windowRef.value\n if (window) {\n window.scrollTop = 0\n }\n }\n\n // life cycles\n onMounted(() => {\n if (!isClient) return\n const { initScrollOffset } = props\n const windowElement = unref(windowRef)\n if (isNumber(initScrollOffset) && windowElement) {\n if (unref(_isHorizontal)) {\n windowElement.scrollLeft = initScrollOffset\n } else {\n windowElement.scrollTop = initScrollOffset\n }\n }\n\n emitEvents()\n })\n\n onUpdated(() => {\n const { direction, layout } = props\n const { scrollOffset, updateRequested } = unref(states)\n const windowElement = unref(windowRef)\n\n if (updateRequested && windowElement) {\n if (layout === HORIZONTAL) {\n if (direction === RTL) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG: {\n windowElement.scrollLeft = -scrollOffset\n break\n }\n case RTL_OFFSET_POS_ASC: {\n windowElement.scrollLeft = scrollOffset\n break\n }\n default: {\n const { clientWidth, scrollWidth } = windowElement\n windowElement.scrollLeft =\n scrollWidth - clientWidth - scrollOffset\n break\n }\n }\n } else {\n windowElement.scrollLeft = scrollOffset\n }\n } else {\n windowElement.scrollTop = scrollOffset\n }\n }\n })\n\n const api = {\n ns,\n clientSize,\n estimatedTotalSize,\n windowStyle,\n windowRef,\n innerRef,\n innerStyle,\n itemsToRender,\n scrollbarRef,\n states,\n getItemStyle,\n onScroll,\n onScrollbarScroll,\n onWheel,\n scrollTo,\n scrollToItem,\n resetScrollTop,\n }\n\n expose({\n windowRef,\n innerRef,\n getItemStyleCache,\n scrollTo,\n scrollToItem,\n resetScrollTop,\n states,\n })\n\n return api\n },\n\n render(ctx: any) {\n const {\n $slots,\n className,\n clientSize,\n containerElement,\n data,\n getItemStyle,\n innerElement,\n itemsToRender,\n innerStyle,\n layout,\n total,\n onScroll,\n onScrollbarScroll,\n onWheel,\n states,\n useIsScrolling,\n windowStyle,\n ns,\n } = ctx\n\n const [start, end] = itemsToRender\n\n const Container = resolveDynamicComponent(containerElement)\n const Inner = resolveDynamicComponent(innerElement)\n\n const children = [] as VNodeChild[]\n\n if (total > 0) {\n for (let i = start; i <= end; i++) {\n children.push(\n ($slots.default as Slot)?.({\n data,\n key: i,\n index: i,\n isScrolling: useIsScrolling ? states.isScrolling : undefined,\n style: getItemStyle(i),\n })\n )\n }\n }\n\n const InnerNode = [\n h(\n Inner as VNode,\n {\n style: innerStyle,\n ref: 'innerRef',\n },\n !isString(Inner)\n ? {\n default: () => children,\n }\n : children\n ),\n ]\n\n const scrollbar = h(Scrollbar, {\n ref: 'scrollbarRef',\n clientSize,\n layout,\n onScroll: onScrollbarScroll,\n ratio: (clientSize * 100) / this.estimatedTotalSize,\n scrollFrom:\n states.scrollOffset / (this.estimatedTotalSize - clientSize),\n total,\n })\n\n const listContainer = h(\n Container as VNode,\n {\n class: [ns.e('window'), className],\n style: windowStyle,\n onScroll,\n onWheel,\n ref: 'windowRef',\n key: 0,\n },\n !isString(Container) ? { default: () => [InnerNode] } : [InnerNode]\n )\n\n return h(\n 'div',\n {\n key: 0,\n class: [ns.e('wrapper'), states.scrollbarAlwaysOn ? 'always-on' : ''],\n },\n [listContainer, scrollbar]\n )\n },\n })\n}\n\nexport default createList\n", "import { isString, throwError } from '@element-plus/utils'\nimport buildList from '../builders/build-list'\nimport { isHorizontal } from '../utils'\nimport {\n AUTO_ALIGNMENT,\n CENTERED_ALIGNMENT,\n END_ALIGNMENT,\n SMART_ALIGNMENT,\n START_ALIGNMENT,\n} from '../defaults'\n\nimport type { VirtualizedListProps } from '../props'\n\ntype Props = VirtualizedListProps\n\nconst FixedSizeList = buildList({\n name: 'ElFixedSizeList',\n getItemOffset: ({ itemSize }, index) => index * (itemSize as number),\n\n getItemSize: ({ itemSize }) => itemSize as number,\n\n getEstimatedTotalSize: ({ total, itemSize }) => (itemSize as number) * total,\n\n getOffset: (\n { height, total, itemSize, layout, width },\n index,\n alignment,\n scrollOffset\n ) => {\n const size = (isHorizontal(layout) ? width : height) as number\n if (process.env.NODE_ENV !== 'production' && isString(size)) {\n throwError(\n '[ElVirtualList]',\n `\n You should set\n width/height\n to number when your layout is\n horizontal/vertical\n `\n )\n }\n const lastItemOffset = Math.max(0, total * (itemSize as number) - size)\n const maxOffset = Math.min(lastItemOffset, index * (itemSize as number))\n const minOffset = Math.max(0, (index + 1) * (itemSize as number) - size)\n\n if (alignment === SMART_ALIGNMENT) {\n if (\n scrollOffset >= minOffset - size &&\n scrollOffset <= maxOffset + size\n ) {\n alignment = AUTO_ALIGNMENT\n } else {\n alignment = CENTERED_ALIGNMENT\n }\n }\n\n switch (alignment) {\n case START_ALIGNMENT: {\n return maxOffset\n }\n case END_ALIGNMENT: {\n return minOffset\n }\n case CENTERED_ALIGNMENT: {\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2)\n if (middleOffset < Math.ceil(size / 2)) {\n return 0 // near the beginning\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset // near the end\n } else {\n return middleOffset\n }\n }\n case AUTO_ALIGNMENT:\n default: {\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset\n } else if (scrollOffset < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n }\n },\n\n getStartIndexForOffset: ({ total, itemSize }, offset) =>\n Math.max(0, Math.min(total - 1, Math.floor(offset / (itemSize as number)))),\n\n getStopIndexForStartIndex: (\n { height, total, itemSize, layout, width }: Props,\n startIndex: number,\n scrollOffset: number\n ) => {\n const offset = startIndex * (itemSize as number)\n const size = isHorizontal(layout) ? width : height\n const numVisibleItems = Math.ceil(\n ((size as number) + scrollOffset - offset) / (itemSize as number)\n )\n return Math.max(\n 0,\n Math.min(\n total - 1,\n // because startIndex is inclusive, so in order to prevent array outbound indexing\n // we need to - 1 to prevent outbound behavior\n startIndex + numVisibleItems - 1\n )\n )\n },\n\n /**\n * Fixed size list does not need this cache\n * Using any to bypass it, TODO: Using type inference to fix this.\n */\n initCache() {\n return undefined as any\n },\n\n clearCache: true,\n\n validateProps() {\n //\n },\n})\n\nexport default FixedSizeList\n", "import { throwError } from '@element-plus/utils'\n\nimport createList from '../builders/build-list'\n\nimport { isHorizontal } from '../utils'\nimport {\n AUTO_ALIGNMENT,\n CENTERED_ALIGNMENT,\n DEFAULT_DYNAMIC_LIST_ITEM_SIZE,\n END_ALIGNMENT,\n SMART_ALIGNMENT,\n START_ALIGNMENT,\n} from '../defaults'\nimport type { VirtualizedListProps } from '../props'\n\nimport type { ItemSize, ListCache, ListItem } from '../types'\n\ntype Props = VirtualizedListProps\n\nconst SCOPE = 'ElDynamicSizeList'\nconst getItemFromCache = (\n props: Props,\n index: number,\n listCache: ListCache\n): ListItem => {\n const { itemSize } = props\n const { items, lastVisitedIndex } = listCache\n\n if (index > lastVisitedIndex) {\n let offset = 0\n if (lastVisitedIndex >= 0) {\n const item = items[lastVisitedIndex]\n offset = item.offset + item.size\n }\n\n for (let i = lastVisitedIndex + 1; i <= index; i++) {\n const size = (itemSize as ItemSize)(i)\n\n items[i] = {\n offset,\n size,\n }\n\n offset += size\n }\n\n listCache.lastVisitedIndex = index\n }\n\n return items[index]\n}\n\nconst findItem = (props: Props, listCache: ListCache, offset: number) => {\n const { items, lastVisitedIndex } = listCache\n\n const lastVisitedOffset =\n lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0\n\n if (lastVisitedOffset >= offset) {\n return bs(props, listCache, 0, lastVisitedIndex, offset)\n }\n return es(props, listCache, Math.max(0, lastVisitedIndex), offset)\n}\n\n// bs stands for binary search which has approximately time complexity of O(Log n)\n// space complexity of O(1)\n// in this case we use it for search the offset of each item, since\n// the cached items' offset is monotonically increasing\nconst bs = (\n props: Props,\n listCache: ListCache,\n low: number,\n high: number,\n offset: number\n) => {\n while (low <= high) {\n const mid = low + Math.floor((high - low) / 2)\n const currentOffset = getItemFromCache(props, mid, listCache).offset\n\n if (currentOffset === offset) {\n return mid\n } else if (currentOffset < offset) {\n low = mid + 1\n } else if (currentOffset > offset) {\n high = mid - 1\n }\n }\n\n return Math.max(0, low - 1)\n}\n\n// es stands for exponential search which has time complexity of O(Log n) and\n// space complexity of O(1) in the case of finding the boundary element.\n// the exponential indicator in this case is 2.\n// for more detail about exponential search click this link\n// https://www.freecodecamp.org/news/search-algorithms-exponential-search-explained/\n\nconst es = (\n props: Props,\n listCache: ListCache,\n index: number,\n offset: number\n) => {\n const { total } = props\n let exponent = 1\n\n while (\n index < total &&\n getItemFromCache(props, index, listCache).offset < offset\n ) {\n index += exponent\n exponent *= 2\n }\n\n return bs(\n props,\n listCache,\n Math.floor(index / 2),\n Math.min(index, total - 1),\n offset\n )\n}\n\nconst getEstimatedTotalSize = (\n { total }: Props,\n { items, estimatedItemSize, lastVisitedIndex }: ListCache\n) => {\n let totalSizeOfMeasuredItems = 0\n\n if (lastVisitedIndex >= total) {\n lastVisitedIndex = total - 1\n }\n\n if (lastVisitedIndex >= 0) {\n const item = items[lastVisitedIndex]\n totalSizeOfMeasuredItems = item.offset + item.size\n }\n\n const numUnmeasuredItems = total - lastVisitedIndex - 1\n const totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize\n return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems\n}\n\nconst DynamicSizeList = createList({\n name: 'ElDynamicSizeList',\n getItemOffset: (props, index, listCache) =>\n getItemFromCache(props, index, listCache).offset,\n\n getItemSize: (_, index, { items }) => items[index].size,\n\n getEstimatedTotalSize,\n\n getOffset: (props, index, alignment, scrollOffset, listCache) => {\n const { height, layout, width } = props\n\n const size = (isHorizontal(layout) ? width : height) as number\n const item = getItemFromCache(props, index, listCache)\n\n const estimatedTotalSize = getEstimatedTotalSize(props, listCache)\n\n const maxOffset = Math.max(\n 0,\n Math.min(estimatedTotalSize - size, item.offset)\n )\n const minOffset = Math.max(0, item.offset - size + item.size)\n\n if (alignment === SMART_ALIGNMENT) {\n if (\n scrollOffset >= minOffset - size &&\n scrollOffset <= maxOffset + size\n ) {\n alignment = AUTO_ALIGNMENT\n } else {\n alignment = CENTERED_ALIGNMENT\n }\n }\n\n switch (alignment) {\n case START_ALIGNMENT: {\n return maxOffset\n }\n case END_ALIGNMENT: {\n return minOffset\n }\n case CENTERED_ALIGNMENT: {\n return Math.round(minOffset + (maxOffset - minOffset) / 2)\n }\n case AUTO_ALIGNMENT:\n default: {\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset\n } else if (scrollOffset < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n }\n },\n\n getStartIndexForOffset: (props, offset, listCache) =>\n findItem(props, listCache, offset),\n\n getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => {\n const { height, total, layout, width } = props\n\n const size = (isHorizontal(layout) ? width : height) as number\n const item = getItemFromCache(props, startIndex, listCache)\n const maxOffset = scrollOffset + size\n\n let offset = item.offset + item.size\n let stopIndex = startIndex\n\n while (stopIndex < total - 1 && offset < maxOffset) {\n stopIndex++\n offset += getItemFromCache(props, stopIndex, listCache).size\n }\n\n return stopIndex\n },\n\n initCache({ estimatedItemSize = DEFAULT_DYNAMIC_LIST_ITEM_SIZE }, instance) {\n const cache = {\n items: {},\n estimatedItemSize,\n lastVisitedIndex: -1,\n } as ListCache\n\n cache.clearCacheAfterIndex = (index: number, forceUpdate = true) => {\n cache.lastVisitedIndex = Math.min(cache.lastVisitedIndex, index - 1)\n instance.exposed?.getItemStyleCache(-1)\n\n if (forceUpdate) {\n instance.proxy?.$forceUpdate()\n }\n }\n\n return cache\n },\n\n clearCache: false,\n\n validateProps: ({ itemSize }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof itemSize !== 'function') {\n throwError(\n SCOPE,\n `\n itemSize is required as function, but the given value was ${typeof itemSize}\n `\n )\n }\n }\n },\n})\n\nexport default DynamicSizeList\n", "import { cAF, rAF } from '@element-plus/utils'\n\nimport type { ComputedRef } from 'vue'\n\ninterface GridWheelState {\n atXStartEdge: ComputedRef\n atXEndEdge: ComputedRef\n atYStartEdge: ComputedRef\n atYEndEdge: ComputedRef\n}\n\ntype GridWheelHandler = (x: number, y: number) => void\n\nexport const useGridWheel = (\n { atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }: GridWheelState,\n onWheelDelta: GridWheelHandler\n) => {\n let frameHandle: number | null = null\n let xOffset = 0\n let yOffset = 0\n\n const hasReachedEdge = (x: number, y: number) => {\n const xEdgeReached =\n (x <= 0 && atXStartEdge.value) || (x >= 0 && atXEndEdge.value)\n const yEdgeReached =\n (y <= 0 && atYStartEdge.value) || (y >= 0 && atYEndEdge.value)\n return xEdgeReached && yEdgeReached\n }\n\n const onWheel = (e: WheelEvent) => {\n cAF(frameHandle!)\n\n let x = e.deltaX\n let y = e.deltaY\n // Simulate native behavior when using touch pad/track pad for wheeling.\n if (Math.abs(x) > Math.abs(y)) {\n y = 0\n } else {\n x = 0\n }\n\n // Special case for windows machine with shift key + wheel scrolling\n if (e.shiftKey && y !== 0) {\n x = y\n y = 0\n }\n\n if (\n hasReachedEdge(xOffset, yOffset) &&\n hasReachedEdge(xOffset + x, yOffset + y)\n )\n return\n\n xOffset += x\n yOffset += y\n\n e.preventDefault()\n\n frameHandle = rAF(() => {\n onWheelDelta(xOffset, yOffset)\n xOffset = 0\n yOffset = 0\n })\n }\n\n return {\n hasReachedEdge,\n onWheel,\n }\n}\n", "// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n ref,\n resolveDynamicComponent,\n unref,\n} from 'vue'\nimport {\n getScrollBarWidth,\n hasOwn,\n isClient,\n isNumber,\n isString,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport Scrollbar from '../components/scrollbar'\nimport { useGridWheel } from '../hooks/use-grid-wheel'\nimport { useCache } from '../hooks/use-cache'\nimport { virtualizedGridProps } from '../props'\nimport { getRTLOffsetType, getScrollDir, isRTL } from '../utils'\nimport {\n AUTO_ALIGNMENT,\n BACKWARD,\n FORWARD,\n ITEM_RENDER_EVT,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n SCROLL_EVT,\n} from '../defaults'\nimport type {\n CSSProperties,\n Ref,\n StyleValue,\n UnwrapRef,\n VNode,\n VNodeChild,\n} from 'vue'\nimport type {\n Alignment,\n GridConstructorProps,\n GridScrollOptions,\n ScrollbarExpose,\n} from '../types'\nimport type { VirtualizedGridProps } from '../props'\n\nconst createGrid = ({\n name,\n clearCache,\n getColumnPosition,\n getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex,\n getEstimatedTotalHeight,\n getEstimatedTotalWidth,\n getColumnOffset,\n getRowOffset,\n getRowPosition,\n getRowStartIndexForOffset,\n getRowStopIndexForStartIndex,\n\n initCache,\n injectToInstance,\n validateProps,\n}: GridConstructorProps) => {\n return defineComponent({\n name: name ?? 'ElVirtualList',\n props: virtualizedGridProps,\n emits: [ITEM_RENDER_EVT, SCROLL_EVT],\n setup(props, { emit, expose, slots }) {\n const ns = useNamespace('vl')\n\n validateProps(props)\n const instance = getCurrentInstance()!\n const cache = ref(initCache(props, instance))\n injectToInstance?.(instance, cache)\n // refs\n // here windowRef and innerRef can be type of HTMLElement\n // or user defined component type, depends on the type passed\n // by user\n const windowRef = ref()\n const hScrollbar = ref()\n const vScrollbar = ref()\n // innerRef is the actual container element which contains all the elements\n const innerRef = ref(null)\n const states = ref({\n isScrolling: false,\n scrollLeft: isNumber(props.initScrollLeft) ? props.initScrollLeft : 0,\n scrollTop: isNumber(props.initScrollTop) ? props.initScrollTop : 0,\n updateRequested: false,\n xAxisScrollDir: FORWARD,\n yAxisScrollDir: FORWARD,\n })\n\n const getItemStyleCache = useCache()\n\n // computed\n const parsedHeight = computed(() =>\n Number.parseInt(`${props.height}`, 10)\n )\n const parsedWidth = computed(() => Number.parseInt(`${props.width}`, 10))\n const columnsToRender = computed(() => {\n const { totalColumn, totalRow, columnCache } = props\n const { isScrolling, xAxisScrollDir, scrollLeft } = unref(states)\n\n if (totalColumn === 0 || totalRow === 0) {\n return [0, 0, 0, 0]\n }\n\n const startIndex = getColumnStartIndexForOffset(\n props,\n scrollLeft,\n unref(cache)\n )\n const stopIndex = getColumnStopIndexForStartIndex(\n props,\n startIndex,\n scrollLeft,\n unref(cache)\n )\n\n const cacheBackward =\n !isScrolling || xAxisScrollDir === BACKWARD\n ? Math.max(1, columnCache)\n : 1\n const cacheForward =\n !isScrolling || xAxisScrollDir === FORWARD\n ? Math.max(1, columnCache)\n : 1\n\n return [\n Math.max(0, startIndex - cacheBackward),\n Math.max(0, Math.min(totalColumn! - 1, stopIndex + cacheForward)),\n startIndex,\n stopIndex,\n ]\n })\n\n const rowsToRender = computed(() => {\n const { totalColumn, totalRow, rowCache } = props\n const { isScrolling, yAxisScrollDir, scrollTop } = unref(states)\n\n if (totalColumn === 0 || totalRow === 0) {\n return [0, 0, 0, 0]\n }\n\n const startIndex = getRowStartIndexForOffset(\n props,\n scrollTop,\n unref(cache)\n )\n const stopIndex = getRowStopIndexForStartIndex(\n props,\n startIndex,\n scrollTop,\n unref(cache)\n )\n\n const cacheBackward =\n !isScrolling || yAxisScrollDir === BACKWARD\n ? Math.max(1, rowCache)\n : 1\n const cacheForward =\n !isScrolling || yAxisScrollDir === FORWARD ? Math.max(1, rowCache) : 1\n\n return [\n Math.max(0, startIndex - cacheBackward),\n Math.max(0, Math.min(totalRow! - 1, stopIndex + cacheForward)),\n startIndex,\n stopIndex,\n ]\n })\n\n const estimatedTotalHeight = computed(() =>\n getEstimatedTotalHeight(props, unref(cache))\n )\n const estimatedTotalWidth = computed(() =>\n getEstimatedTotalWidth(props, unref(cache))\n )\n\n const windowStyle = computed(() => [\n {\n position: 'relative',\n overflow: 'hidden',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n },\n {\n direction: props.direction,\n height: isNumber(props.height) ? `${props.height}px` : props.height,\n width: isNumber(props.width) ? `${props.width}px` : props.width,\n },\n props.style ?? {},\n ])\n\n const innerStyle = computed(() => {\n const width = `${unref(estimatedTotalWidth)}px`\n const height = `${unref(estimatedTotalHeight)}px`\n\n return {\n height,\n pointerEvents: unref(states).isScrolling ? 'none' : undefined,\n width,\n }\n })\n\n // methods\n const emitEvents = () => {\n const { totalColumn, totalRow } = props\n\n if (totalColumn! > 0 && totalRow! > 0) {\n const [\n columnCacheStart,\n columnCacheEnd,\n columnVisibleStart,\n columnVisibleEnd,\n ] = unref(columnsToRender)\n const [rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd] =\n unref(rowsToRender)\n // emit the render item event with\n // [xAxisInvisibleStart, xAxisInvisibleEnd, xAxisVisibleStart, xAxisVisibleEnd]\n // [yAxisInvisibleStart, yAxisInvisibleEnd, yAxisVisibleStart, yAxisVisibleEnd]\n emit(ITEM_RENDER_EVT, {\n columnCacheStart,\n columnCacheEnd,\n rowCacheStart,\n rowCacheEnd,\n columnVisibleStart,\n columnVisibleEnd,\n rowVisibleStart,\n rowVisibleEnd,\n })\n }\n\n const {\n scrollLeft,\n scrollTop,\n updateRequested,\n xAxisScrollDir,\n yAxisScrollDir,\n } = unref(states)\n emit(SCROLL_EVT, {\n xAxisScrollDir,\n scrollLeft,\n yAxisScrollDir,\n scrollTop,\n updateRequested,\n })\n }\n\n const onScroll = (e: Event) => {\n const {\n clientHeight,\n clientWidth,\n scrollHeight,\n scrollLeft,\n scrollTop,\n scrollWidth,\n } = e.currentTarget as HTMLElement\n\n const _states = unref(states)\n\n if (\n _states.scrollTop === scrollTop &&\n _states.scrollLeft === scrollLeft\n ) {\n return\n }\n\n let _scrollLeft = scrollLeft\n\n if (isRTL(props.direction)) {\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG:\n _scrollLeft = -scrollLeft\n break\n case RTL_OFFSET_POS_DESC:\n _scrollLeft = scrollWidth - clientWidth - scrollLeft\n break\n }\n }\n\n states.value = {\n ..._states,\n isScrolling: true,\n scrollLeft: _scrollLeft,\n scrollTop: Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n ),\n updateRequested: true,\n xAxisScrollDir: getScrollDir(_states.scrollLeft, _scrollLeft),\n yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop),\n }\n\n nextTick(() => resetIsScrolling())\n\n onUpdated()\n emitEvents()\n }\n\n const onVerticalScroll = (distance: number, totalSteps: number) => {\n const height = unref(parsedHeight)\n const offset =\n ((estimatedTotalHeight.value - height) / totalSteps) * distance\n scrollTo({\n scrollTop: Math.min(estimatedTotalHeight.value - height, offset),\n })\n }\n\n const onHorizontalScroll = (distance: number, totalSteps: number) => {\n const width = unref(parsedWidth)\n const offset =\n ((estimatedTotalWidth.value - width) / totalSteps) * distance\n scrollTo({\n scrollLeft: Math.min(estimatedTotalWidth.value - width, offset),\n })\n }\n\n const { onWheel } = useGridWheel(\n {\n atXStartEdge: computed(() => states.value.scrollLeft <= 0),\n atXEndEdge: computed(\n () =>\n states.value.scrollLeft >=\n estimatedTotalWidth.value - unref(parsedWidth)\n ),\n atYStartEdge: computed(() => states.value.scrollTop <= 0),\n atYEndEdge: computed(\n () =>\n states.value.scrollTop >=\n estimatedTotalHeight.value - unref(parsedHeight)\n ),\n },\n (x: number, y: number) => {\n hScrollbar.value?.onMouseUp?.()\n vScrollbar.value?.onMouseUp?.()\n const width = unref(parsedWidth)\n const height = unref(parsedHeight)\n scrollTo({\n scrollLeft: Math.min(\n states.value.scrollLeft + x,\n estimatedTotalWidth.value - width\n ),\n scrollTop: Math.min(\n states.value.scrollTop + y,\n estimatedTotalHeight.value - height\n ),\n })\n }\n )\n\n const scrollTo = ({\n scrollLeft = states.value.scrollLeft,\n scrollTop = states.value.scrollTop,\n }: GridScrollOptions) => {\n scrollLeft = Math.max(scrollLeft, 0)\n scrollTop = Math.max(scrollTop, 0)\n const _states = unref(states)\n if (\n scrollTop === _states.scrollTop &&\n scrollLeft === _states.scrollLeft\n ) {\n return\n }\n\n states.value = {\n ..._states,\n xAxisScrollDir: getScrollDir(_states.scrollLeft, scrollLeft),\n yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop),\n scrollLeft,\n scrollTop,\n updateRequested: true,\n }\n\n nextTick(() => resetIsScrolling())\n\n onUpdated()\n emitEvents()\n }\n\n const scrollToItem = (\n rowIndex = 0,\n columnIdx = 0,\n alignment: Alignment = AUTO_ALIGNMENT\n ) => {\n const _states = unref(states)\n columnIdx = Math.max(0, Math.min(columnIdx, props.totalColumn! - 1))\n rowIndex = Math.max(0, Math.min(rowIndex, props.totalRow! - 1))\n const scrollBarWidth = getScrollBarWidth(ns.namespace.value)\n\n const _cache = unref(cache)\n const estimatedHeight = getEstimatedTotalHeight(props, _cache)\n const estimatedWidth = getEstimatedTotalWidth(props, _cache)\n\n scrollTo({\n scrollLeft: getColumnOffset(\n props,\n columnIdx,\n alignment,\n _states.scrollLeft,\n _cache,\n estimatedWidth > props.width! ? scrollBarWidth : 0\n ),\n scrollTop: getRowOffset(\n props,\n rowIndex,\n alignment,\n _states.scrollTop,\n _cache,\n estimatedHeight > props.height! ? scrollBarWidth : 0\n ),\n })\n }\n\n const getItemStyle = (\n rowIndex: number,\n columnIndex: number\n ): CSSProperties => {\n const { columnWidth, direction, rowHeight } = props\n const itemStyleCache = getItemStyleCache.value(\n clearCache && columnWidth,\n clearCache && rowHeight,\n clearCache && direction\n )\n // since there was no need to introduce an nested array into cache object\n // we use row,column to construct the key for indexing the map.\n const key = `${rowIndex},${columnIndex}`\n\n if (hasOwn(itemStyleCache, key)) {\n return itemStyleCache[key]\n } else {\n const [, left] = getColumnPosition(props, columnIndex, unref(cache))\n const _cache = unref(cache)\n\n const rtl = isRTL(direction)\n const [height, top] = getRowPosition(props, rowIndex, _cache)\n const [width] = getColumnPosition(props, columnIndex, _cache)\n\n itemStyleCache[key] = {\n position: 'absolute',\n left: rtl ? undefined : `${left}px`,\n right: rtl ? `${left}px` : undefined,\n top: `${top}px`,\n height: `${height}px`,\n width: `${width}px`,\n }\n\n return itemStyleCache[key]\n }\n }\n\n // TODO: debounce setting is scrolling.\n\n const resetIsScrolling = () => {\n // timer = null\n\n states.value.isScrolling = false\n nextTick(() => {\n getItemStyleCache.value(-1, null, null)\n })\n }\n\n // life cycles\n onMounted(() => {\n // for SSR\n if (!isClient) return\n const { initScrollLeft, initScrollTop } = props\n const windowElement = unref(windowRef)\n if (windowElement) {\n if (isNumber(initScrollLeft)) {\n windowElement.scrollLeft = initScrollLeft\n }\n if (isNumber(initScrollTop)) {\n windowElement.scrollTop = initScrollTop\n }\n }\n emitEvents()\n })\n\n const onUpdated = () => {\n const { direction } = props\n const { scrollLeft, scrollTop, updateRequested } = unref(states)\n\n const windowElement = unref(windowRef)\n if (updateRequested && windowElement) {\n if (direction === RTL) {\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG: {\n windowElement.scrollLeft = -scrollLeft\n break\n }\n case RTL_OFFSET_POS_ASC: {\n windowElement.scrollLeft = scrollLeft\n break\n }\n default: {\n const { clientWidth, scrollWidth } = windowElement\n windowElement.scrollLeft =\n scrollWidth - clientWidth - scrollLeft\n break\n }\n }\n } else {\n windowElement.scrollLeft = Math.max(0, scrollLeft)\n }\n\n windowElement.scrollTop = Math.max(0, scrollTop)\n }\n }\n\n const { resetAfterColumnIndex, resetAfterRowIndex, resetAfter } =\n instance.proxy as any\n\n expose({\n windowRef,\n innerRef,\n getItemStyleCache,\n scrollTo,\n scrollToItem,\n states,\n resetAfterColumnIndex,\n resetAfterRowIndex,\n resetAfter,\n })\n\n // rendering part\n\n const renderScrollbars = () => {\n const {\n scrollbarAlwaysOn,\n scrollbarStartGap,\n scrollbarEndGap,\n totalColumn,\n totalRow,\n } = props\n\n const width = unref(parsedWidth)\n const height = unref(parsedHeight)\n const estimatedWidth = unref(estimatedTotalWidth)\n const estimatedHeight = unref(estimatedTotalHeight)\n const { scrollLeft, scrollTop } = unref(states)\n const horizontalScrollbar = h(Scrollbar, {\n ref: hScrollbar,\n alwaysOn: scrollbarAlwaysOn,\n startGap: scrollbarStartGap,\n endGap: scrollbarEndGap,\n class: ns.e('horizontal'),\n clientSize: width,\n layout: 'horizontal',\n onScroll: onHorizontalScroll,\n ratio: (width * 100) / estimatedWidth,\n scrollFrom: scrollLeft / (estimatedWidth - width),\n total: totalRow,\n visible: true,\n })\n\n const verticalScrollbar = h(Scrollbar, {\n ref: vScrollbar,\n alwaysOn: scrollbarAlwaysOn,\n startGap: scrollbarStartGap,\n endGap: scrollbarEndGap,\n class: ns.e('vertical'),\n clientSize: height,\n layout: 'vertical',\n onScroll: onVerticalScroll,\n ratio: (height * 100) / estimatedHeight,\n scrollFrom: scrollTop / (estimatedHeight - height),\n\n total: totalColumn,\n visible: true,\n })\n\n return {\n horizontalScrollbar,\n verticalScrollbar,\n }\n }\n\n const renderItems = () => {\n const [columnStart, columnEnd] = unref(columnsToRender)\n const [rowStart, rowEnd] = unref(rowsToRender)\n const { data, totalColumn, totalRow, useIsScrolling, itemKey } = props\n const children: VNodeChild[] = []\n if (totalRow > 0 && totalColumn > 0) {\n for (let row = rowStart; row <= rowEnd; row++) {\n for (let column = columnStart; column <= columnEnd; column++) {\n children.push(\n slots.default?.({\n columnIndex: column,\n data,\n key: itemKey({ columnIndex: column, data, rowIndex: row }),\n isScrolling: useIsScrolling\n ? unref(states).isScrolling\n : undefined,\n style: getItemStyle(row, column),\n rowIndex: row,\n })\n )\n }\n }\n }\n return children\n }\n\n const renderInner = () => {\n const Inner = resolveDynamicComponent(props.innerElement) as VNode\n const children = renderItems()\n return [\n h(\n Inner,\n {\n style: unref(innerStyle),\n ref: innerRef,\n },\n !isString(Inner)\n ? {\n default: () => children,\n }\n : children\n ),\n ]\n }\n\n const renderWindow = () => {\n const Container = resolveDynamicComponent(\n props.containerElement\n ) as VNode\n const { horizontalScrollbar, verticalScrollbar } = renderScrollbars()\n const Inner = renderInner()\n\n return h(\n 'div',\n {\n key: 0,\n class: ns.e('wrapper'),\n role: props.role,\n },\n [\n h(\n Container,\n {\n class: props.className,\n style: unref(windowStyle),\n onScroll,\n onWheel,\n ref: windowRef,\n },\n !isString(Container) ? { default: () => Inner } : Inner\n ),\n horizontalScrollbar,\n verticalScrollbar,\n ]\n )\n }\n\n return renderWindow\n },\n })\n}\n\nexport default createGrid\n\ntype Dir = typeof FORWARD | typeof BACKWARD\n\nexport type GridInstance = InstanceType> &\n UnwrapRef<{\n windowRef: Ref\n innerRef: Ref\n getItemStyleCache: ReturnType\n scrollTo: (scrollOptions: GridScrollOptions) => void\n scrollToItem: (\n rowIndex: number,\n columnIndex: number,\n alignment: Alignment\n ) => void\n states: Ref<{\n isScrolling: boolean\n scrollLeft: number\n scrollTop: number\n updateRequested: boolean\n xAxisScrollDir: Dir\n yAxisScrollDir: Dir\n }>\n }>\n", "import { isNumber, throwError } from '@element-plus/utils'\nimport createGrid from '../builders/build-grid'\n\nimport {\n AUTO_ALIGNMENT,\n CENTERED_ALIGNMENT,\n END_ALIGNMENT,\n SMART_ALIGNMENT,\n START_ALIGNMENT,\n} from '../defaults'\n\nconst SCOPE = 'ElFixedSizeGrid'\n\nconst FixedSizeGrid = createGrid({\n name: 'ElFixedSizeGrid',\n getColumnPosition: ({ columnWidth }, index) => [\n columnWidth as number,\n index * (columnWidth as number),\n ],\n\n getRowPosition: ({ rowHeight }, index) => [\n rowHeight as number,\n index * (rowHeight as number),\n ],\n\n getEstimatedTotalHeight: ({ totalRow, rowHeight }) =>\n (rowHeight as number) * totalRow,\n\n getEstimatedTotalWidth: ({ totalColumn, columnWidth }) =>\n (columnWidth as number) * totalColumn,\n\n getColumnOffset: (\n { totalColumn, columnWidth, width },\n columnIndex,\n alignment,\n scrollLeft,\n _,\n scrollBarWidth\n ) => {\n width = Number(width)\n const lastColumnOffset = Math.max(\n 0,\n totalColumn * (columnWidth as number) - width\n )\n const maxOffset = Math.min(\n lastColumnOffset,\n columnIndex * (columnWidth as number)\n )\n const minOffset = Math.max(\n 0,\n columnIndex * (columnWidth as number) -\n width +\n scrollBarWidth +\n (columnWidth as number)\n )\n\n if (alignment === 'smart') {\n if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {\n alignment = AUTO_ALIGNMENT\n } else {\n alignment = CENTERED_ALIGNMENT\n }\n }\n\n switch (alignment) {\n case START_ALIGNMENT:\n return maxOffset\n case END_ALIGNMENT:\n return minOffset\n case CENTERED_ALIGNMENT: {\n const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2)\n if (middleOffset < Math.ceil(width / 2)) {\n return 0\n } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {\n return lastColumnOffset\n } else {\n return middleOffset\n }\n }\n case AUTO_ALIGNMENT:\n default:\n if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {\n return scrollLeft\n } else if (minOffset > maxOffset) {\n return minOffset\n } else if (scrollLeft < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n },\n\n getRowOffset: (\n { rowHeight, height, totalRow },\n rowIndex,\n align,\n scrollTop,\n _,\n scrollBarWidth\n ): number => {\n height = Number(height)\n const lastRowOffset = Math.max(0, totalRow * (rowHeight as number) - height)\n const maxOffset = Math.min(lastRowOffset, rowIndex * (rowHeight as number))\n const minOffset = Math.max(\n 0,\n rowIndex * (rowHeight as number) -\n height +\n scrollBarWidth +\n (rowHeight as number)\n )\n\n if (align === SMART_ALIGNMENT) {\n if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {\n align = AUTO_ALIGNMENT\n } else {\n align = CENTERED_ALIGNMENT\n }\n }\n\n switch (align) {\n case START_ALIGNMENT:\n return maxOffset\n case END_ALIGNMENT:\n return minOffset\n case CENTERED_ALIGNMENT: {\n const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2)\n if (middleOffset < Math.ceil(height / 2)) {\n return 0\n } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {\n return lastRowOffset\n } else {\n return middleOffset\n }\n }\n case AUTO_ALIGNMENT:\n default:\n if (scrollTop >= minOffset && scrollTop <= maxOffset) {\n return scrollTop\n } else if (minOffset > maxOffset) {\n return minOffset\n } else if (scrollTop < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n },\n\n getColumnStartIndexForOffset: ({ columnWidth, totalColumn }, scrollLeft) =>\n Math.max(\n 0,\n Math.min(\n totalColumn - 1,\n Math.floor(scrollLeft / (columnWidth as number))\n )\n ),\n\n getColumnStopIndexForStartIndex: (\n { columnWidth, totalColumn, width },\n startIndex: number,\n scrollLeft: number\n ): number => {\n const left = startIndex * (columnWidth as number)\n const visibleColumnsCount = Math.ceil(\n ((width as number) + scrollLeft - left) / (columnWidth as number)\n )\n return Math.max(\n 0,\n Math.min(totalColumn - 1, startIndex + visibleColumnsCount - 1)\n )\n },\n\n getRowStartIndexForOffset: (\n { rowHeight, totalRow },\n scrollTop: number\n ): number =>\n Math.max(\n 0,\n Math.min(totalRow - 1, Math.floor(scrollTop / (rowHeight as number)))\n ),\n\n getRowStopIndexForStartIndex: (\n { rowHeight, totalRow, height },\n startIndex: number,\n scrollTop: number\n ): number => {\n const top = startIndex * (rowHeight as number)\n const numVisibleRows = Math.ceil(\n ((height as number) + scrollTop - top) / (rowHeight as number)\n )\n return Math.max(\n 0,\n Math.min(\n totalRow - 1,\n startIndex + numVisibleRows - 1 // -1 is because stop index is inclusive\n )\n )\n },\n /**\n * Fixed size grid does not need this cache\n * Using any to bypass it, TODO: Using type inference to fix this.\n */\n initCache: () => undefined as any,\n\n clearCache: true,\n\n validateProps: ({ columnWidth, rowHeight }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!isNumber(columnWidth)) {\n throwError(\n SCOPE,\n `\n \"columnWidth\" must be passed as number,\n instead ${typeof columnWidth} was given.\n `\n )\n }\n\n if (!isNumber(rowHeight)) {\n throwError(\n SCOPE,\n `\n \"columnWidth\" must be passed as number,\n instead ${typeof rowHeight} was given.\n `\n )\n }\n }\n },\n})\n\nexport default FixedSizeGrid\n", "// @ts-nocheck\nimport { isFunction } from '@vue/shared'\nimport { isNumber, isUndefined, throwError } from '@element-plus/utils'\nimport createGrid from '../builders/build-grid'\n\nimport {\n AUTO_ALIGNMENT,\n CENTERED_ALIGNMENT,\n DEFAULT_DYNAMIC_LIST_ITEM_SIZE,\n END_ALIGNMENT,\n SMART_ALIGNMENT,\n START_ALIGNMENT,\n} from '../defaults'\nimport type { GridInstance } from '../builders/build-grid'\nimport type { VirtualizedGridProps } from '../props'\n\nimport type { Alignment, GridCache, ItemSize, ListItem } from '../types'\n\nconst { max, min, floor } = Math\nconst SCOPE = 'ElDynamicSizeGrid'\n\ntype Props = VirtualizedGridProps\ntype CacheItemType = 'column' | 'row'\ntype Indices = {\n columnIndex?: number\n rowIndex?: number\n}\n\n// generates props access key via type\nconst ACCESS_SIZER_KEY_MAP = {\n column: 'columnWidth',\n row: 'rowHeight',\n}\n\n// generates cache access key via type\nconst ACCESS_LAST_VISITED_KEY_MAP = {\n column: 'lastVisitedColumnIndex',\n row: 'lastVisitedRowIndex',\n}\n\nconst getItemFromCache = (\n props: Props,\n index: number,\n gridCache: GridCache,\n type: CacheItemType\n) => {\n const [cachedItems, sizer, lastVisited] = [\n gridCache[type],\n props[ACCESS_SIZER_KEY_MAP[type]],\n gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]],\n ] as [Record, ItemSize, number]\n\n if (index > lastVisited) {\n let offset = 0\n if (lastVisited >= 0) {\n const item = cachedItems[lastVisited]\n offset = item.offset + item.size\n }\n\n for (let i = lastVisited + 1; i <= index; i++) {\n // console.log(i, sizer(i))\n const size = sizer(i)\n\n cachedItems[i] = {\n offset,\n size,\n }\n\n offset += size\n }\n\n gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]] = index\n }\n\n return cachedItems[index]\n}\n\nconst bs = (\n props: Props,\n gridCache: GridCache,\n low: number,\n high: number,\n offset: number,\n type: CacheItemType\n) => {\n while (low <= high) {\n const mid = low + floor((high - low) / 2)\n const currentOffset = getItemFromCache(props, mid, gridCache, type).offset\n\n if (currentOffset === offset) {\n return mid\n } else if (currentOffset < offset) {\n low = mid + 1\n } else {\n high = mid - 1\n }\n }\n\n return max(0, low - 1)\n}\n\nconst es = (\n props: Props,\n gridCache: GridCache,\n idx: number,\n offset: number,\n type: CacheItemType\n) => {\n const total = type === 'column' ? props.totalColumn : props.totalRow\n let exponent = 1\n\n while (\n idx < total &&\n getItemFromCache(props, idx, gridCache, type).offset < offset\n ) {\n idx += exponent\n exponent *= 2\n }\n\n return bs(props, gridCache, floor(idx / 2), min(idx, total - 1), offset, type)\n}\n\nconst findItem = (\n props: Props,\n gridCache: GridCache,\n offset: number,\n type: CacheItemType\n) => {\n const [cache, lastVisitedIndex] = [\n gridCache[type],\n gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]],\n ] as [Record, number]\n\n const lastVisitedItemOffset =\n lastVisitedIndex > 0 ? cache[lastVisitedIndex].offset : 0\n\n if (lastVisitedItemOffset >= offset) {\n return bs(props, gridCache, 0, lastVisitedIndex, offset, type)\n }\n\n return es(props, gridCache, max(0, lastVisitedIndex), offset, type)\n}\n\nconst getEstimatedTotalHeight = (\n { totalRow }: Props,\n { estimatedRowHeight, lastVisitedRowIndex, row }: GridCache\n) => {\n let sizeOfVisitedRows = 0\n\n if (lastVisitedRowIndex >= totalRow) {\n lastVisitedRowIndex = totalRow - 1\n }\n\n if (lastVisitedRowIndex >= 0) {\n const item = row[lastVisitedRowIndex]\n sizeOfVisitedRows = item.offset + item.size\n }\n\n const unvisitedItems = totalRow - lastVisitedRowIndex - 1\n const sizeOfUnvisitedItems = unvisitedItems * estimatedRowHeight\n\n return sizeOfVisitedRows + sizeOfUnvisitedItems\n}\nconst getEstimatedTotalWidth = (\n { totalColumn }: Props,\n { column, estimatedColumnWidth, lastVisitedColumnIndex }: GridCache\n) => {\n let sizeOfVisitedColumns = 0\n\n if (lastVisitedColumnIndex > totalColumn) {\n lastVisitedColumnIndex = totalColumn - 1\n }\n\n if (lastVisitedColumnIndex >= 0) {\n const item = column[lastVisitedColumnIndex]\n sizeOfVisitedColumns = item.offset + item.size\n }\n\n const unvisitedItems = totalColumn - lastVisitedColumnIndex - 1\n const sizeOfUnvisitedItems = unvisitedItems * estimatedColumnWidth\n\n return sizeOfVisitedColumns + sizeOfUnvisitedItems\n}\n\nconst ACCESS_ESTIMATED_SIZE_KEY_MAP = {\n column: getEstimatedTotalWidth,\n row: getEstimatedTotalHeight,\n}\n\nconst getOffset = (\n props: Props,\n index: number,\n alignment: Alignment,\n scrollOffset: number,\n cache: GridCache,\n type: CacheItemType,\n scrollBarWidth: number\n) => {\n const [size, estimatedSizeAssociates] = [\n type === 'row' ? props.height : props.width,\n ACCESS_ESTIMATED_SIZE_KEY_MAP[type],\n ] as [number, (props: Props, cache: GridCache) => number]\n const item = getItemFromCache(props, index, cache, type)\n\n const estimatedSize = estimatedSizeAssociates(props, cache)\n\n const maxOffset = max(0, min(estimatedSize - size, item.offset))\n const minOffset = max(0, item.offset - size + scrollBarWidth + item.size)\n\n if (alignment === SMART_ALIGNMENT) {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n alignment = AUTO_ALIGNMENT\n } else {\n alignment = CENTERED_ALIGNMENT\n }\n }\n\n switch (alignment) {\n case START_ALIGNMENT: {\n return maxOffset\n }\n case END_ALIGNMENT: {\n return minOffset\n }\n case CENTERED_ALIGNMENT: {\n return Math.round(minOffset + (maxOffset - minOffset) / 2)\n }\n case AUTO_ALIGNMENT:\n default: {\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset\n } else if (minOffset > maxOffset) {\n return minOffset\n } else if (scrollOffset < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n }\n}\n\nconst DynamicSizeGrid = createGrid({\n name: 'ElDynamicSizeGrid',\n getColumnPosition: (props, idx, cache) => {\n const item = getItemFromCache(props, idx, cache, 'column')\n return [item.size, item.offset]\n },\n\n getRowPosition: (props, idx, cache) => {\n const item = getItemFromCache(props, idx, cache, 'row')\n return [item.size, item.offset]\n },\n\n getColumnOffset: (\n props,\n columnIndex,\n alignment,\n scrollLeft,\n cache,\n scrollBarWidth\n ) =>\n getOffset(\n props,\n columnIndex,\n alignment,\n scrollLeft,\n cache,\n 'column',\n scrollBarWidth\n ),\n\n getRowOffset: (\n props,\n rowIndex,\n alignment,\n scrollTop,\n cache,\n scrollBarWidth: number\n ) =>\n getOffset(\n props,\n rowIndex,\n alignment,\n scrollTop,\n cache,\n 'row',\n scrollBarWidth\n ),\n\n getColumnStartIndexForOffset: (props, scrollLeft, cache) =>\n findItem(props, cache, scrollLeft, 'column'),\n\n getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache) => {\n const item = getItemFromCache(props, startIndex, cache, 'column')\n\n const maxOffset = scrollLeft + (props.width as number)\n\n let offset = item.offset + item.size\n let stopIndex = startIndex\n while (stopIndex < props.totalColumn - 1 && offset < maxOffset) {\n stopIndex++\n offset += getItemFromCache(props, startIndex, cache, 'column').size\n }\n return stopIndex\n },\n\n getEstimatedTotalHeight,\n getEstimatedTotalWidth,\n\n getRowStartIndexForOffset: (props, scrollTop, cache) =>\n findItem(props, cache, scrollTop, 'row'),\n\n getRowStopIndexForStartIndex: (props, startIndex, scrollTop, cache) => {\n const { totalRow, height } = props\n const item = getItemFromCache(props, startIndex, cache, 'row')\n const maxOffset = scrollTop + (height as number)\n\n let offset = item.size + item.offset\n let stopIndex = startIndex\n\n while (stopIndex < totalRow - 1 && offset < maxOffset) {\n stopIndex++\n offset += getItemFromCache(props, stopIndex, cache, 'row').size\n }\n\n return stopIndex\n },\n injectToInstance: (instance, cache) => {\n const resetAfter = (\n { columnIndex, rowIndex }: Indices,\n forceUpdate?: boolean\n ) => {\n forceUpdate = isUndefined(forceUpdate) ? true : forceUpdate\n\n if (isNumber(columnIndex)) {\n cache.value.lastVisitedColumnIndex = Math.min(\n cache.value.lastVisitedColumnIndex,\n columnIndex - 1\n )\n }\n\n if (isNumber(rowIndex)) {\n // console.log(rowIndex)\n cache.value.lastVisitedRowIndex = Math.min(\n cache.value.lastVisitedRowIndex,\n rowIndex - 1\n )\n }\n\n instance.exposed?.getItemStyleCache.value(-1, null, null)\n\n if (forceUpdate) instance.proxy?.$forceUpdate()\n }\n\n const resetAfterColumnIndex = (\n columnIndex: number,\n forceUpdate: boolean\n ) => {\n resetAfter(\n {\n columnIndex,\n },\n forceUpdate\n )\n }\n\n const resetAfterRowIndex = (rowIndex: number, forceUpdate: boolean) => {\n resetAfter(\n {\n rowIndex,\n },\n forceUpdate\n )\n }\n\n Object.assign(instance.proxy, {\n resetAfterColumnIndex,\n resetAfterRowIndex,\n resetAfter,\n })\n },\n initCache: ({\n estimatedColumnWidth = DEFAULT_DYNAMIC_LIST_ITEM_SIZE,\n estimatedRowHeight = DEFAULT_DYNAMIC_LIST_ITEM_SIZE,\n }) => {\n const cache = {\n column: {},\n estimatedColumnWidth,\n estimatedRowHeight,\n lastVisitedColumnIndex: -1,\n lastVisitedRowIndex: -1,\n row: {},\n } as GridCache\n\n // TODO: expose methods.\n return cache\n },\n\n clearCache: false,\n\n validateProps: ({ columnWidth, rowHeight }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!isFunction(columnWidth)) {\n throwError(\n SCOPE,\n `\n \"columnWidth\" must be passed as function,\n instead ${typeof columnWidth} was given.\n `\n )\n }\n\n if (!isFunction(rowHeight)) {\n throwError(\n SCOPE,\n `\n \"rowHeight\" must be passed as function,\n instead ${typeof rowHeight} was given.\n `\n )\n }\n }\n },\n})\n\nexport default DynamicSizeGrid\n\nexport type ResetAfterIndex = (idx: number, forceUpdate: boolean) => void\nexport type ResetAfterIndices = (indices: Indices, forceUpdate: boolean) => void\n\nexport type DynamicSizeGridInstance = GridInstance & {\n resetAfterColumnIndex: ResetAfterIndex\n resetAfterRowIndex: ResetAfterIndex\n resetAfter: ResetAfterIndices\n}\n", "\n\n\n", "// @ts-nocheck\nimport type { IOptionProps } from './token'\n\nexport function useOption(props: IOptionProps, { emit }) {\n return {\n hoverItem: () => {\n if (!props.disabled) {\n emit('hover', props.index)\n }\n },\n selectOptionClick: () => {\n if (!props.disabled) {\n emit('select', props.item, props.index)\n }\n },\n }\n}\n", "import { computed } from 'vue'\nimport { get } from 'lodash-unified'\n\nimport type { ISelectProps } from './token'\nimport type { Option } from './select.types'\n\nexport interface Props {\n label?: string\n value?: string\n disabled?: string\n options?: string\n}\n\nexport const defaultProps: Required = {\n label: 'label',\n value: 'value',\n disabled: 'disabled',\n options: 'options',\n}\n\nexport function useProps(props: Pick) {\n const aliasProps = computed(() => ({ ...defaultProps, ...props.props }))\n\n const getLabel = (option: Option) => get(option, aliasProps.value.label)\n const getValue = (option: Option) => get(option, aliasProps.value.value)\n const getDisabled = (option: Option) => get(option, aliasProps.value.disabled)\n const getOptions = (option: Option) => get(option, aliasProps.value.options)\n\n return {\n aliasProps,\n getLabel,\n getValue,\n getDisabled,\n getOptions,\n }\n}\n", "import { placements } from '@popperjs/core'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { CircleClose } from '@element-plus/icons-vue'\nimport { defaultProps } from './useProps'\n\nimport type { Option, OptionType } from './select.types'\nimport type { Props } from './useProps'\nimport type { Options, Placement } from '@element-plus/components/popper'\n\nexport const SelectProps = buildProps({\n allowCreate: Boolean,\n autocomplete: {\n type: definePropType<'none' | 'both' | 'list' | 'inline'>(String),\n default: 'none',\n },\n automaticDropdown: Boolean,\n clearable: Boolean,\n clearIcon: {\n type: iconPropType,\n default: CircleClose,\n },\n effect: {\n type: definePropType<'light' | 'dark' | string>(String),\n default: 'light',\n },\n collapseTags: Boolean,\n collapseTagsTooltip: {\n type: Boolean,\n default: false,\n },\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n defaultFirstOption: Boolean,\n disabled: Boolean,\n estimatedOptionHeight: {\n type: Number,\n default: undefined,\n },\n filterable: Boolean,\n filterMethod: Function,\n height: {\n type: Number,\n default: 170, // 5 items by default\n },\n itemHeight: {\n type: Number,\n default: 34,\n },\n id: String,\n loading: Boolean,\n loadingText: String,\n label: String,\n modelValue: {\n type: definePropType<\n any[] | string | number | boolean | Record | any\n >([Array, String, Number, Boolean, Object]),\n },\n multiple: Boolean,\n multipleLimit: {\n type: Number,\n default: 0,\n },\n name: String,\n noDataText: String,\n noMatchText: String,\n remoteMethod: Function,\n reserveKeyword: {\n type: Boolean,\n default: true,\n },\n options: {\n type: definePropType(Array),\n required: true,\n },\n placeholder: {\n type: String,\n },\n teleported: useTooltipContentProps.teleported,\n persistent: {\n type: Boolean,\n default: true,\n },\n popperClass: {\n type: String,\n default: '',\n },\n popperOptions: {\n type: definePropType>(Object),\n default: () => ({} as Partial),\n },\n remote: Boolean,\n size: useSizeProp,\n props: {\n type: definePropType(Object),\n default: () => defaultProps,\n },\n valueKey: {\n type: String,\n default: 'value',\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\n validateEvent: {\n type: Boolean,\n default: true,\n },\n placement: {\n type: definePropType(String),\n values: placements,\n default: 'bottom-start',\n },\n} as const)\n\nexport const OptionProps = buildProps({\n data: Array,\n disabled: Boolean,\n hovering: Boolean,\n item: {\n type: definePropType