@tempots/beatui 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -34
- package/dist/2019-C0NjrG2i.js +164 -0
- package/dist/2019-JlqBnfO0.cjs +1 -0
- package/dist/2020-lqWvthL_.js +192 -0
- package/dist/2020-r3MHWrkK.cjs +1 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/apl-B2DGVGxc.js +76 -0
- package/dist/apl-M-DNMvvR.cjs +1 -0
- package/dist/ar-BsUm-TCn.cjs +1 -0
- package/dist/ar-DReA9eQ2.cjs +1 -0
- package/dist/ar-NCCPhOpI.js +38 -0
- package/dist/ar-VA2yE-1i.js +82 -0
- package/dist/asciiarmor-2LVJmxlE.js +34 -0
- package/dist/asciiarmor-BMx3XVjX.cjs +1 -0
- package/dist/asn1-OOsVM4yU.cjs +1 -0
- package/dist/asn1-jKiBa2Ya.js +95 -0
- package/dist/asterisk-B1QUaW1C.cjs +1 -0
- package/dist/asterisk-DS281yxp.js +271 -0
- package/dist/auth/index.cjs.js +1 -0
- package/dist/auth/index.es.js +1331 -0
- package/dist/beatui.css +1 -1
- package/dist/brainfuck-BjUlYKdF.cjs +1 -0
- package/dist/brainfuck-C_p9pTT8.js +34 -0
- package/dist/clike-BEMIzMUI.cjs +1 -0
- package/dist/clike-DGTaUp48.js +620 -0
- package/dist/clojure-Ap_IXD2I.cjs +1 -0
- package/dist/clojure-CCKyeQKf.js +800 -0
- package/dist/cmake-C4D5_VmS.cjs +1 -0
- package/dist/cmake-CuaCgAKt.js +28 -0
- package/dist/cobol-BlTKFDRj.js +72 -0
- package/dist/cobol-Du-cT2hr.cjs +1 -0
- package/dist/coffeescript-BVCvwO8I.js +179 -0
- package/dist/coffeescript-DDFAj2ea.cjs +1 -0
- package/dist/commonlisp-CXBBRCTx.cjs +1 -0
- package/dist/commonlisp-D_kxz07b.js +75 -0
- package/dist/crystal-D309uH6_.js +217 -0
- package/dist/crystal-DAFWRDbh.cjs +1 -0
- package/dist/css-BkF-NPzE.js +1553 -0
- package/dist/css-DzFJyRJ8.cjs +1 -0
- package/dist/cypher-BMq4Fwjl.js +68 -0
- package/dist/cypher-BN0-oCze.cjs +1 -0
- package/dist/d-BHsqGcfm.cjs +1 -0
- package/dist/d-BZcgY6La.js +127 -0
- package/dist/de-BIj_wrpg.cjs +1 -0
- package/dist/de-BUFLEyKr.cjs +1 -0
- package/dist/de-BVK2MkCk.js +38 -0
- package/dist/de-C14QN5V1.js +82 -0
- package/dist/diff-CemTHKfk.cjs +1 -0
- package/dist/diff-Cg9d_RX2.js +18 -0
- package/dist/dockerfile-BBTH3voH.cjs +1 -0
- package/dist/dockerfile-DIy8NleC.js +194 -0
- package/dist/dtd-ChoVQPwv.cjs +1 -0
- package/dist/dtd-CtLokQ-U.js +84 -0
- package/dist/dylan-QYeExnWK.js +234 -0
- package/dist/dylan-apTQIgUA.cjs +1 -0
- package/dist/ebnf-DUPDuY4r.js +78 -0
- package/dist/ebnf-LYmLy17h.cjs +1 -0
- package/dist/ecl-C7WNQq7-.cjs +1 -0
- package/dist/ecl-CiXN-g_D.js +121 -0
- package/dist/eiffel-BJThA8RG.cjs +1 -0
- package/dist/eiffel-yQhjl4T1.js +110 -0
- package/dist/elm-CNT9vbN0.js +108 -0
- package/dist/elm-CcXP9T36.cjs +1 -0
- package/dist/erlang-B6mpcObI.cjs +1 -0
- package/dist/erlang-CFOYdy9e.js +487 -0
- package/dist/es-B5GqMkMg.js +82 -0
- package/dist/es-BQS8PL9j.js +38 -0
- package/dist/es-BxBeTRCv.cjs +1 -0
- package/dist/es-D1oMYUqV.cjs +1 -0
- package/dist/fa-BxlrmcQK.js +82 -0
- package/dist/fa-D5TvDNdj.cjs +1 -0
- package/dist/fa-DxPseW3g.cjs +1 -0
- package/dist/fa-T-tkJSJr.js +38 -0
- package/dist/factor-B-tsx9yW.cjs +1 -0
- package/dist/factor-DDOC7X6P.js +65 -0
- package/dist/fcl-BzAKklXo.cjs +1 -0
- package/dist/fcl-CPC2WYrI.js +103 -0
- package/dist/forth-BmxRyE9S.js +60 -0
- package/dist/forth-CPAzyZ_n.cjs +1 -0
- package/dist/fortran-9bvPyrOW.js +442 -0
- package/dist/fortran-DHiTlGV1.cjs +1 -0
- package/dist/fr-BzFxzocR.js +82 -0
- package/dist/fr-CSRRhyCG.js +38 -0
- package/dist/fr-Cdyopuz3.cjs +1 -0
- package/dist/fr-DPGRV4C4.cjs +1 -0
- package/dist/gas-BiPtGF2E.cjs +1 -0
- package/dist/gas-cpmYfFX2.js +183 -0
- package/dist/gherkin-CJuwpceU.js +34 -0
- package/dist/gherkin-Djo7Y51D.cjs +1 -0
- package/dist/groovy-BMVITiCm.cjs +1 -0
- package/dist/groovy-DZeT_VM-.js +146 -0
- package/dist/haskell-Bvt3Qq1t.js +375 -0
- package/dist/haskell-CngODaW-.cjs +1 -0
- package/dist/haxe-70NVW1pR.js +359 -0
- package/dist/haxe-Dyk-piTh.cjs +1 -0
- package/dist/he-Bxdc4M08.js +38 -0
- package/dist/he-DarDNPn0.cjs +1 -0
- package/dist/he-DjHXtt_S.js +82 -0
- package/dist/he-XNDY7609.cjs +1 -0
- package/dist/hi-CJeFvTBe.js +38 -0
- package/dist/hi-Xlc0IeoY.js +82 -0
- package/dist/hi-eMrnBh0O.cjs +1 -0
- package/dist/hi-tATwsXJ6.cjs +1 -0
- package/dist/http-BkLifcnL.cjs +1 -0
- package/dist/http-D9LttvKF.js +44 -0
- package/dist/idl-B6TRFYjl.js +947 -0
- package/dist/idl-FmHDmsE-.cjs +1 -0
- package/dist/index-22y56f5G.js +270 -0
- package/dist/index-85k3bgcY.cjs +1 -0
- package/dist/index-9HEatb8C.js +612 -0
- package/dist/index-B16dbwxM.cjs +1 -0
- package/dist/index-B1w_-cUQ.js +136 -0
- package/dist/index-B2079wM-.js +921 -0
- package/dist/index-B66rNs5i.cjs +2 -0
- package/dist/index-B79joQIU.js +76 -0
- package/dist/index-BDr9qHd0.js +138 -0
- package/dist/index-BF_OOMtT.js +1307 -0
- package/dist/index-BGcCFDkp.js +74 -0
- package/dist/index-BKr-B2hh.js +1874 -0
- package/dist/index-BUKtbimR.cjs +6 -0
- package/dist/index-BWxeedWQ.js +59 -0
- package/dist/index-BYk56bqR.cjs +13 -0
- package/dist/index-BZHMnjr6.cjs +1 -0
- package/dist/index-BguvTLHu.cjs +1 -0
- package/dist/index-BmUA4_Ip.js +302 -0
- package/dist/index-By8a3eg5.cjs +1 -0
- package/dist/index-C0t8aD9u.js +94 -0
- package/dist/index-C3BW17zm.cjs +1 -0
- package/dist/index-C4UzgyIA.cjs +1 -0
- package/dist/index-CIfx_bs7.cjs +7 -0
- package/dist/index-COyS3EXB.js +289 -0
- package/dist/index-CRfUh74G.cjs +1 -0
- package/dist/index-CY_sj-qf.js +309 -0
- package/dist/index-CeYwt1r1.js +342 -0
- package/dist/index-Cohec4rB.cjs +1 -0
- package/dist/index-CpqyQcup.js +552 -0
- package/dist/index-D-Rzl363.cjs +1 -0
- package/dist/index-D48AYUAg.js +226 -0
- package/dist/index-DD8_efWr.cjs +1 -0
- package/dist/index-DIO06RsV.js +554 -0
- package/dist/index-DLJt9Ebe.cjs +8 -0
- package/dist/index-DSvEBuy-.cjs +3 -0
- package/dist/index-DV7tB1MN.cjs +1 -0
- package/dist/index-DgUJYXoy.cjs +1 -0
- package/dist/index-Dghyrng7.js +960 -0
- package/dist/index-DjNMMz5-.cjs +1 -0
- package/dist/index-DpHYZhFL.js +251 -0
- package/dist/index-DutbjaBQ.js +101 -0
- package/dist/index-DxG_avr8.cjs +1 -0
- package/dist/index-FEy4Hwnx.cjs +1 -0
- package/dist/index-d3p39HQv.js +157 -0
- package/dist/index-dsitEt8M.cjs +1 -0
- package/dist/index-kk6qFeC5.cjs +1 -0
- package/dist/index-tOao3Qu5.js +953 -0
- package/dist/index-xnxTfNd2.js +8283 -0
- package/dist/index.cjs.js +143 -0
- package/dist/index.es.js +4736 -7849
- package/dist/index.esm-8xolKogd.cjs +1 -0
- package/dist/index.esm-CSotgpVw.js +4959 -0
- package/dist/it-BmFag7j0.cjs +1 -0
- package/dist/it-CR0FAQEB.js +82 -0
- package/dist/it-DzUV0SmB.cjs +1 -0
- package/dist/it-Zmp0BhIj.js +38 -0
- package/dist/ja-DWjoA-hQ.js +38 -0
- package/dist/ja-Dj-bAKLf.cjs +1 -0
- package/dist/ja-WICb5O3K.js +83 -0
- package/dist/ja-f2fDsTUD.cjs +1 -0
- package/dist/javascript-C2yteZeJ.js +691 -0
- package/dist/javascript-DngSGg_0.cjs +1 -0
- package/dist/jinja2-DnB6dQmV.js +154 -0
- package/dist/jinja2-wbVbDTNi.cjs +1 -0
- package/dist/json-schema/index.cjs.js +1 -0
- package/dist/json-schema/index.es.js +37 -0
- package/dist/julia-DA67Qw9E.cjs +1 -0
- package/dist/julia-DpvXAuO6.js +241 -0
- package/dist/ko-30evSGGW.js +82 -0
- package/dist/ko-BOlI-33h.js +38 -0
- package/dist/ko-BomUE-yQ.cjs +1 -0
- package/dist/ko-DvDEQ6FS.cjs +1 -0
- package/dist/link-portal-B-RvroWY.js +5 -0
- package/dist/link-portal-_tiDFZqh.cjs +1 -0
- package/dist/livescript-Bg3URadp.cjs +1 -0
- package/dist/livescript-CanGTf8u.js +272 -0
- package/dist/lua-CIsxjGwi.cjs +1 -0
- package/dist/lua-XplVlWi_.js +217 -0
- package/dist/markdown/index.cjs.js +2 -0
- package/dist/markdown/index.es.js +422 -0
- package/dist/markdown.css +39 -0
- package/dist/mathematica-BG089QIc.cjs +1 -0
- package/dist/mathematica-jaRHnSxC.js +35 -0
- package/dist/mbox-BctzC1hL.js +76 -0
- package/dist/mbox-CySolFFZ.cjs +1 -0
- package/dist/milkdown/index.cjs.js +1 -0
- package/dist/milkdown/index.es.js +4 -0
- package/dist/milkdown-input-C-Muq7PQ.cjs +941 -0
- package/dist/milkdown-input-DaN9l6E_.js +62376 -0
- package/dist/milkdown-url-BKbqhNCO.js +4 -0
- package/dist/milkdown-url-BLgXPmZR.cjs +1 -0
- package/dist/milkdown.css +1903 -0
- package/dist/mirc-BfqEffzk.cjs +1 -0
- package/dist/mirc-CFBPAOaF.js +72 -0
- package/dist/mllike-BSnXJBGA.js +272 -0
- package/dist/mllike-QUjwI6zq.cjs +1 -0
- package/dist/modal-Ba2uXVSD.cjs +1 -0
- package/dist/modal-CeVJb-Ko.js +614 -0
- package/dist/modelica-B6Zhcb-M.cjs +1 -0
- package/dist/modelica-vUgVs--1.js +93 -0
- package/dist/monaco/index.cjs.js +2 -0
- package/dist/monaco/index.es.js +269 -0
- package/dist/monaco.css +14 -0
- package/dist/mscgen-BToym4Bs.cjs +1 -0
- package/dist/mscgen-Cpl0NYLN.js +104 -0
- package/dist/mumps-CQoS1kWX.js +25 -0
- package/dist/mumps-wfyQdxSu.cjs +1 -0
- package/dist/nginx-CwqyBUfA.cjs +1 -0
- package/dist/nginx-zDPm3Z74.js +89 -0
- package/dist/nl-DaCzsF01.js +83 -0
- package/dist/nl-Dr-l6zUy.cjs +1 -0
- package/dist/nl-hmXJvCw7.cjs +1 -0
- package/dist/nl-kQNcAdY1.js +38 -0
- package/dist/notice-BgnHRPMk.js +2432 -0
- package/dist/notice-t8qZIDvK.cjs +1 -0
- package/dist/nsis-DPj2fUaP.cjs +1 -0
- package/dist/nsis-fePjrhq7.js +62 -0
- package/dist/ntriples-CsNjv2QF.js +79 -0
- package/dist/ntriples-DgwJmozm.cjs +1 -0
- package/dist/octave-1pkKrgAA.cjs +1 -0
- package/dist/octave-C8PmmSRH.js +143 -0
- package/dist/oz-BXOZCt0U.cjs +1 -0
- package/dist/oz-Ce8aN8oE.js +151 -0
- package/dist/pascal-De0D6mP7.js +77 -0
- package/dist/pascal-DtY2LEkJ.cjs +1 -0
- package/dist/perl-B4bSCe1C.js +915 -0
- package/dist/perl-CVDWbEju.cjs +1 -0
- package/dist/pig-D24Z8EXi.js +54 -0
- package/dist/pig-DMByOrnr.cjs +1 -0
- package/dist/pl-BK0i_yvq.cjs +1 -0
- package/dist/pl-CKyPFvss.js +38 -0
- package/dist/pl-Cg5Kr9eZ.cjs +1 -0
- package/dist/pl-DlMR1sq8.js +83 -0
- package/dist/powershell-BaoYaFvj.cjs +1 -0
- package/dist/powershell-DkYVfTzP.js +249 -0
- package/dist/preprocess-CvkqwVNt.cjs +3 -0
- package/dist/preprocess-D898zxsP.js +2295 -0
- package/dist/properties-DXHJZ3WE.cjs +1 -0
- package/dist/properties-Dn9wna3M.js +26 -0
- package/dist/protobuf-BKhXdfH6.cjs +1 -0
- package/dist/protobuf-BPIjwpzm.js +49 -0
- package/dist/pt-B7uWbJ1j.cjs +1 -0
- package/dist/pt-DBmUhaNI.js +38 -0
- package/dist/pt-lX3h34iM.js +82 -0
- package/dist/pt-oBMmVYcu.cjs +1 -0
- package/dist/pug-CwAQJzGR.js +248 -0
- package/dist/pug-kEfRDOiF.cjs +1 -0
- package/dist/puppet-8mAyuMbW.cjs +1 -0
- package/dist/puppet-nyd4dhjf.js +45 -0
- package/dist/python-BkR3uSy8.js +313 -0
- package/dist/python-D-iU6WXz.cjs +1 -0
- package/dist/q-BPQ45Nxu.cjs +1 -0
- package/dist/q-DXjKs-tC.js +83 -0
- package/dist/r-LKEuhEGI.js +104 -0
- package/dist/r-r2_EZsON.cjs +1 -0
- package/dist/rpm-IznJm2Xc.js +57 -0
- package/dist/rpm-YK81m3qU.cjs +1 -0
- package/dist/ru-2aVFFaQ-.js +87 -0
- package/dist/ru-CrQR5RUx.cjs +1 -0
- package/dist/ru-CsJ_yT-7.js +38 -0
- package/dist/ru-CtxMmoa6.cjs +1 -0
- package/dist/ruby-CcYfvIk6.js +228 -0
- package/dist/ruby-Cn1sFkZF.cjs +1 -0
- package/dist/sas-7E8yHoCW.js +105 -0
- package/dist/sas-DAGcJy94.cjs +1 -0
- package/dist/scheme-B0ZrbojV.cjs +1 -0
- package/dist/scheme-DjibxsNh.js +124 -0
- package/dist/shell-BMYo43V6.cjs +1 -0
- package/dist/shell-C0C2sNA_.js +182 -0
- package/dist/sieve-Bwz7vjP5.js +72 -0
- package/dist/sieve-CIYW-b_H.cjs +1 -0
- package/dist/simple-mode-B0dvCdAA.js +89 -0
- package/dist/simple-mode-BIKNPBes.cjs +1 -0
- package/dist/smalltalk-Bhddl2pB.js +48 -0
- package/dist/smalltalk-CSslY-3i.cjs +1 -0
- package/dist/solr-A1kSnAwJ.cjs +1 -0
- package/dist/solr-BNlsLglM.js +41 -0
- package/dist/sparql-DnHMBLLY.cjs +1 -0
- package/dist/sparql-FarWu_Gb.js +197 -0
- package/dist/spreadsheet-B7_BK8hB.cjs +1 -0
- package/dist/spreadsheet-C-cy4P5N.js +49 -0
- package/dist/sql-9VmIWHrZ.cjs +1 -0
- package/dist/sql-CfG5lQ3l.js +282 -0
- package/dist/stex-B4wyjEnp.cjs +1 -0
- package/dist/stex-Du4h4KAU.js +129 -0
- package/dist/styles-url-B-d6aezR.cjs +1 -0
- package/dist/styles-url-B4WGMvfi.js +4 -0
- package/dist/styles-url-CZUL_YRT.cjs +1 -0
- package/dist/styles-url-DpP5gepF.js +4 -0
- package/dist/stylus-CAdqWld3.js +250 -0
- package/dist/stylus-D6GYOT3Z.cjs +1 -0
- package/dist/swift-DGw6Cgu8.cjs +1 -0
- package/dist/swift-DSxqR9R6.js +230 -0
- package/dist/tcl-ByLXbQFo.cjs +1 -0
- package/dist/tcl-xfoLljhY.js +81 -0
- package/dist/textile-D1AWE-pc.js +295 -0
- package/dist/textile-iryw-lTw.cjs +1 -0
- package/dist/theme-CJVt8QIc.js +34 -0
- package/dist/theme-YS3sFklH.cjs +1 -0
- package/dist/tiddlywiki-5wqsXtSk.js +155 -0
- package/dist/tiddlywiki-D8IJz1k7.cjs +1 -0
- package/dist/tiki-C5p5KSQK.cjs +1 -0
- package/dist/tiki-__Kn3CeS.js +181 -0
- package/dist/timer-CcMCjYrq.cjs +1 -0
- package/dist/timer-CkgWORR9.js +42 -0
- package/dist/toml-3ZsH_4Qa.cjs +1 -0
- package/dist/toml-BHiuTcfn.js +49 -0
- package/dist/tr-Bn5ldVJs.js +38 -0
- package/dist/tr-CgJ8uhZu.cjs +1 -0
- package/dist/tr-DN9zPGaS.cjs +1 -0
- package/dist/tr-DgRS_mcj.js +82 -0
- package/dist/translations-CSUEQrNH.cjs +2 -0
- package/dist/translations-CVR1KQJ3.js +47 -0
- package/dist/translations-CxMNY8i7.js +2006 -0
- package/dist/translations-pfS-x8Ak.cjs +1 -0
- package/dist/troff-D-3QCOYN.cjs +1 -0
- package/dist/troff-D2UO-fKf.js +35 -0
- package/dist/ttcn-Bsa4sfRm.js +123 -0
- package/dist/ttcn-C2MXAqcM.cjs +1 -0
- package/dist/ttcn-cfg-BYqcMRxC.cjs +1 -0
- package/dist/ttcn-cfg-Bac_acMi.js +88 -0
- package/dist/turtle-DSJNatSv.cjs +1 -0
- package/dist/turtle-xwJUxoPV.js +80 -0
- package/dist/types/auth/index.d.ts +1 -0
- package/dist/types/auth-i18n/default.d.ts +25 -25
- package/dist/types/auth-i18n/locales/ar.d.ts +25 -25
- package/dist/types/auth-i18n/locales/de.d.ts +25 -25
- package/dist/types/auth-i18n/locales/en.d.ts +25 -25
- package/dist/types/auth-i18n/locales/es.d.ts +25 -25
- package/dist/types/auth-i18n/locales/fa.d.ts +25 -25
- package/dist/types/auth-i18n/locales/fr.d.ts +25 -25
- package/dist/types/auth-i18n/locales/he.d.ts +25 -25
- package/dist/types/auth-i18n/locales/hi.d.ts +25 -25
- package/dist/types/auth-i18n/locales/it.d.ts +25 -25
- package/dist/types/auth-i18n/locales/ja.d.ts +25 -25
- package/dist/types/auth-i18n/locales/ko.d.ts +25 -25
- package/dist/types/auth-i18n/locales/nl.d.ts +25 -25
- package/dist/types/auth-i18n/locales/pl.d.ts +25 -25
- package/dist/types/auth-i18n/locales/pt.d.ts +25 -25
- package/dist/types/auth-i18n/locales/ru.d.ts +25 -25
- package/dist/types/auth-i18n/locales/tr.d.ts +25 -25
- package/dist/types/auth-i18n/locales/ur.d.ts +25 -25
- package/dist/types/auth-i18n/locales/vi.d.ts +25 -25
- package/dist/types/auth-i18n/locales/zh.d.ts +25 -25
- package/dist/types/auth-i18n/translations.d.ts +26 -26
- package/dist/types/beatui-i18n/default.d.ts +52 -41
- package/dist/types/beatui-i18n/locales/en.d.ts +52 -41
- package/dist/types/beatui-i18n/translations.d.ts +53 -42
- package/dist/types/components/auth/auth-divider.d.ts +2 -2
- package/dist/types/components/auth/index.d.ts +8 -6
- package/dist/types/components/auth/password-strength-indicator.d.ts +4 -4
- package/dist/types/components/auth/reset-password-form.d.ts +2 -2
- package/dist/types/components/auth/signin-form.d.ts +2 -2
- package/dist/types/components/auth/signup-form.d.ts +2 -2
- package/dist/types/components/auth/social-login-button.d.ts +27 -27
- package/dist/types/components/auth/types.d.ts +46 -48
- package/dist/types/components/auth/utils.d.ts +0 -2
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/button/close-button.d.ts +15 -0
- package/dist/types/components/button/index.d.ts +1 -0
- package/dist/types/components/data/tag.d.ts +3 -2
- package/dist/types/components/data/unstyled-drop-zone.d.ts +5 -2
- package/dist/types/components/form/control/control-factory.d.ts +24 -0
- package/dist/types/components/form/control/date-utils.d.ts +6 -0
- package/dist/types/components/form/control/index.d.ts +3 -22
- package/dist/types/components/form/control/list-control.d.ts +23 -14
- package/dist/types/components/form/controller/controller.d.ts +20 -1
- package/dist/types/components/form/controller/index.d.ts +2 -0
- package/dist/types/components/form/controller/union-controller.d.ts +53 -0
- package/dist/types/components/form/controller/utils.d.ts +4 -0
- package/dist/types/components/form/input/appearance-selector.d.ts +2 -1
- package/dist/types/components/form/input/base64-input.d.ts +10 -0
- package/dist/types/components/form/input/base64s-input.d.ts +12 -0
- package/dist/types/components/form/input/bigint-input.d.ts +9 -0
- package/dist/types/components/form/input/color-input.d.ts +8 -1
- package/dist/types/components/form/input/combobox-input.d.ts +16 -0
- package/dist/types/components/form/input/combobox-tags-input.d.ts +16 -0
- package/dist/types/components/form/input/dropdown-base.d.ts +19 -0
- package/dist/types/components/form/input/dropdown-input.d.ts +14 -0
- package/dist/types/components/form/input/duration-input.d.ts +3 -0
- package/dist/types/components/form/input/duration-mask.d.ts +12 -0
- package/dist/types/components/form/input/editable-text.d.ts +2 -1
- package/dist/types/components/form/input/file-input.d.ts +3 -3
- package/dist/types/components/form/input/files-input.d.ts +12 -0
- package/dist/types/components/form/input/index.d.ts +42 -2
- package/dist/types/components/form/input/input-container.d.ts +2 -3
- package/dist/types/components/form/input/input-options.d.ts +0 -13
- package/dist/types/components/form/input/input-wrapper.d.ts +1 -1
- package/dist/types/components/form/input/instant-input.d.ts +3 -0
- package/dist/types/components/form/input/lazy-native-select.d.ts +1 -1
- package/dist/types/components/form/input/list-input.d.ts +14 -0
- package/dist/types/components/form/input/mask-input.d.ts +94 -0
- package/dist/types/components/form/input/native-select.d.ts +4 -23
- package/dist/types/components/form/input/nullable-base64-input.d.ts +8 -0
- package/dist/types/components/form/input/nullable-bigint-input.d.ts +9 -0
- package/dist/types/components/form/input/nullable-duration-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-email-input.d.ts +2 -0
- package/dist/types/components/form/input/nullable-instant-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-mask-input.d.ts +5 -0
- package/dist/types/components/form/input/nullable-number-input.d.ts +9 -0
- package/dist/types/components/form/input/nullable-password-input.d.ts +2 -0
- package/dist/types/components/form/input/nullable-plain-date-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-plain-date-time-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-plain-month-day-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-plain-time-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-plain-year-month-input.d.ts +3 -0
- package/dist/types/components/form/input/nullable-rating-input.d.ts +14 -0
- package/dist/types/components/form/input/nullable-url-input.d.ts +2 -0
- package/dist/types/components/form/input/nullable-utils.d.ts +2 -0
- package/dist/types/components/form/input/nullable-uuid-input.d.ts +2 -0
- package/dist/types/components/form/input/nullable-zoned-date-time-input.d.ts +3 -0
- package/dist/types/components/form/input/option.d.ts +38 -0
- package/dist/types/components/form/input/plain-date-input.d.ts +3 -0
- package/dist/types/components/form/input/plain-date-time-input.d.ts +3 -0
- package/dist/types/components/form/input/plain-month-day-input.d.ts +3 -0
- package/dist/types/components/form/input/plain-time-input.d.ts +3 -0
- package/dist/types/components/form/input/plain-year-month-input.d.ts +3 -0
- package/dist/types/components/form/input/rating-input.d.ts +15 -0
- package/dist/types/components/form/input/segmented-input.d.ts +10 -0
- package/dist/types/components/form/input/select-tags-input.d.ts +20 -0
- package/dist/types/components/form/input/slider-input.d.ts +15 -0
- package/dist/types/components/form/input/tag-utils.d.ts +11 -0
- package/dist/types/components/form/input/url-input.d.ts +2 -0
- package/dist/types/components/form/input/uuid-input.d.ts +2 -0
- package/dist/types/components/form/input/zoned-date-time-input.d.ts +3 -0
- package/dist/types/components/form/schema/custom-validation.d.ts +1 -1
- package/dist/types/components/form/use-form.d.ts +11 -4
- package/dist/types/components/i18n/make-i18nprovider.d.ts +2 -3
- package/dist/types/components/json-schema/ajv-utils.d.ts +121 -0
- package/dist/types/components/json-schema/cache-management.d.ts +148 -0
- package/dist/types/components/json-schema/containers/container-layouts.d.ts +66 -0
- package/dist/types/components/json-schema/controls/any-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/array-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/boolean-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/composition-controls.d.ts +24 -0
- package/dist/types/components/json-schema/controls/composition-shared.d.ts +34 -0
- package/dist/types/components/json-schema/controls/enum-const-controls.d.ts +17 -0
- package/dist/types/components/json-schema/controls/generic-control.d.ts +18 -0
- package/dist/types/components/json-schema/controls/null-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/number-controls.d.ts +17 -0
- package/dist/types/components/json-schema/controls/object-control.d.ts +12 -0
- package/dist/types/components/json-schema/controls/object-helpers.d.ts +31 -0
- package/dist/types/components/json-schema/controls/presence-toggle.d.ts +12 -0
- package/dist/types/components/json-schema/controls/schema-banners.d.ts +14 -0
- package/dist/types/components/json-schema/controls/schema-wrapper.d.ts +7 -0
- package/dist/types/components/json-schema/controls/shared-utils.d.ts +16 -0
- package/dist/types/components/json-schema/controls/string-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls/type-utils.d.ts +27 -0
- package/dist/types/components/json-schema/controls/union-control.d.ts +10 -0
- package/dist/types/components/json-schema/controls.d.ts +11 -0
- package/dist/types/components/json-schema/discriminator/discriminator-utils.d.ts +57 -0
- package/dist/types/components/json-schema/index.d.ts +5 -0
- package/dist/types/components/json-schema/json-schema-form.d.ts +79 -0
- package/dist/types/components/json-schema/oneof-branch-detection.d.ts +35 -0
- package/dist/types/components/json-schema/ref-utils.d.ts +18 -0
- package/dist/types/components/json-schema/schema-context.d.ts +185 -0
- package/dist/types/components/json-schema/validation/async-validation.d.ts +113 -0
- package/dist/types/components/json-schema/validation/conditional-validation.d.ts +75 -0
- package/dist/types/components/json-schema/validation/cross-field-validation.d.ts +71 -0
- package/dist/types/components/json-schema/validation/error-aggregation.d.ts +84 -0
- package/dist/types/components/json-schema/validation/performance-optimization.d.ts +120 -0
- package/dist/types/components/json-schema/validator.d.ts +10 -0
- package/dist/types/components/json-schema/visibility/visibility-evaluation.d.ts +77 -0
- package/dist/types/components/json-schema/visibility/visibility-wrapper.d.ts +56 -0
- package/dist/types/components/json-schema/widgets/enhanced-widgets.d.ts +70 -0
- package/dist/types/components/json-schema/widgets/string-controls.d.ts +8 -0
- package/dist/types/components/json-schema/widgets/string-detection.d.ts +3 -0
- package/dist/types/components/json-schema/widgets/string-type.d.ts +62 -0
- package/dist/types/components/json-schema/widgets/utils.d.ts +45 -0
- package/dist/types/components/json-schema/widgets/widget-composition.d.ts +144 -0
- package/dist/types/components/json-schema/widgets/widget-customization.d.ts +120 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/layout/nine-slice-scroll-view.d.ts +21 -0
- package/dist/types/components/layout/scrollable-panel.d.ts +1 -1
- package/dist/types/components/milkdown/milkdown-input.d.ts +15 -0
- package/dist/types/components/milkdown/milkdown-url.d.ts +2 -0
- package/dist/types/components/misc/index.d.ts +3 -0
- package/dist/types/components/misc/link-portal.d.ts +11 -0
- package/dist/types/components/misc/notice.d.ts +15 -0
- package/dist/types/components/misc/style-portal.d.ts +10 -0
- package/dist/types/components/monaco/monaco-editor-input.d.ts +12 -0
- package/dist/types/components/navigation/flyout.d.ts +2 -2
- package/dist/types/components/navigation/index.d.ts +1 -0
- package/dist/types/components/navigation/menu.d.ts +7 -7
- package/dist/types/components/navigation/toolbar/index.d.ts +1 -0
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +17 -0
- package/dist/types/components/overlay/drawer.d.ts +2 -2
- package/dist/types/components/overlay/modal.d.ts +3 -3
- package/dist/types/components/overlay/tooltip.d.ts +2 -2
- package/dist/types/i18n/translate.d.ts +2 -17
- package/dist/types/index.d.ts +1 -1
- package/dist/types/json-schema/index.d.ts +1 -0
- package/dist/types/markdown/extensions.d.ts +8 -0
- package/dist/types/markdown/index.d.ts +17 -0
- package/dist/types/markdown/styles-url.d.ts +2 -0
- package/dist/types/markdown/styles.d.ts +2 -0
- package/dist/types/milkdown/index.d.ts +1 -0
- package/dist/types/milkdown/styles.d.ts +2 -0
- package/dist/types/monaco/index.d.ts +3 -0
- package/dist/types/monaco/lazy-loader.d.ts +5 -0
- package/dist/types/monaco/styles-url.d.ts +2 -0
- package/dist/types/monaco/styles.d.ts +2 -0
- package/dist/types/monaco/types.d.ts +14 -0
- package/dist/types/styles/base-url.d.ts +2 -0
- package/dist/types/styles/base.d.ts +2 -0
- package/dist/types/temporal/index.d.ts +3 -0
- package/dist/types/temporal/runtime.d.ts +2 -0
- package/dist/types/temporal/types.d.ts +10 -0
- package/dist/types/temporal/with-temporal.d.ts +3 -0
- package/dist/types/tokens/colors.d.ts +13 -2
- package/dist/types/utils/focus-trap.d.ts +4 -4
- package/dist/types/utils/format-file-size.d.ts +6 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/ur-Bg9eX81v.js +38 -0
- package/dist/ur-BzgBZpdY.cjs +1 -0
- package/dist/ur-DvqAg9gW.cjs +1 -0
- package/dist/ur-fgmvVBHY.js +82 -0
- package/dist/vb-c2kQGd6-.js +74 -0
- package/dist/vb-qzHzzvyB.cjs +1 -0
- package/dist/vbscript-1f_Dhg5H.js +324 -0
- package/dist/vbscript-CWm8v9tE.cjs +1 -0
- package/dist/velocity-D3_yAIp3.cjs +1 -0
- package/dist/velocity-DJd0pTTC.js +96 -0
- package/dist/verilog-BOhLNmQo.cjs +1 -0
- package/dist/verilog-CiS1jyi5.js +262 -0
- package/dist/vhdl-CMFbi8Im.cjs +1 -0
- package/dist/vhdl-T9HkrbI2.js +106 -0
- package/dist/vi-D5R3YcU0.cjs +1 -0
- package/dist/vi-DZzB43iu.js +82 -0
- package/dist/vi-DhdsHHf_.js +38 -0
- package/dist/vi-DijXfJCL.cjs +1 -0
- package/dist/webidl-CWb_flNk.cjs +1 -0
- package/dist/webidl-CjfDENEo.js +155 -0
- package/dist/xquery-BUQdORAS.js +422 -0
- package/dist/xquery-Cjw5fRnG.cjs +1 -0
- package/dist/yacas-C0absKBh.js +73 -0
- package/dist/yacas-urx_N5C8.cjs +1 -0
- package/dist/z80-CsG3CM6M.cjs +1 -0
- package/dist/z80-Pki2zAjW.js +61 -0
- package/dist/zh-BIykcEu9.js +38 -0
- package/dist/zh-BMcC2kwD.cjs +1 -0
- package/dist/zh-Bcz-uyJp.js +82 -0
- package/dist/zh-CCGXcj5r.cjs +1 -0
- package/package.json +56 -7
- package/dist/ar-C7sFBvd3.js +0 -49
- package/dist/ar-D9ef1rPL.js +0 -38
- package/dist/de-DvSVUCKi.js +0 -38
- package/dist/de-g1A7pWNb.js +0 -49
- package/dist/es-VVHXE2N_.js +0 -49
- package/dist/es-kZH0y7yE.js +0 -38
- package/dist/fa-CJNIz_z3.js +0 -49
- package/dist/fa-CZ1jHeSI.js +0 -38
- package/dist/fr-Bi9Ce2bU.js +0 -38
- package/dist/fr-CV72Obmu.js +0 -49
- package/dist/he-B7FDQHq5.js +0 -49
- package/dist/he-iAAKM-JS.js +0 -38
- package/dist/hi-BCajgsBt.js +0 -49
- package/dist/hi-BMfFIHn-.js +0 -38
- package/dist/index.umd.js +0 -100
- package/dist/it-BeJHf7Ur.js +0 -49
- package/dist/it-RYZ8E-C6.js +0 -38
- package/dist/ja-4x5hNiAy.js +0 -38
- package/dist/ja-D5YyTu5k.js +0 -50
- package/dist/ko-BFy6uytC.js +0 -38
- package/dist/ko-DNqvHWiZ.js +0 -49
- package/dist/nl-BRZt7kSA.js +0 -38
- package/dist/nl-Cdbu51NB.js +0 -50
- package/dist/pl-Bru8UPLn.js +0 -50
- package/dist/pl-DKbc4KpN.js +0 -38
- package/dist/pt-Bful1nYu.js +0 -38
- package/dist/pt-LCfmUFgc.js +0 -49
- package/dist/ru-9lG4xtda.js +0 -38
- package/dist/ru-D7gTuXxP.js +0 -50
- package/dist/tr-D3uQnNr4.js +0 -38
- package/dist/tr-DlFekEUg.js +0 -49
- package/dist/types/components/form/control/combobox-control.d.ts +0 -11
- package/dist/types/components/form/control/control-input-wrapper.d.ts +0 -7
- package/dist/types/components/form/control/control-options.d.ts +0 -20
- package/dist/types/components/form/control/date-control.d.ts +0 -3
- package/dist/types/components/form/control/date-time-control.d.ts +0 -3
- package/dist/types/components/form/control/email-control.d.ts +0 -3
- package/dist/types/components/form/control/file-control.d.ts +0 -11
- package/dist/types/components/form/control/lazy-native-select-control.d.ts +0 -16
- package/dist/types/components/form/control/native-select-control.d.ts +0 -9
- package/dist/types/components/form/control/nullable-date-control.d.ts +0 -3
- package/dist/types/components/form/control/nullable-date-time-control.d.ts +0 -3
- package/dist/types/components/form/control/nullable-string-date-control.d.ts +0 -3
- package/dist/types/components/form/control/nullable-string-date-time-control.d.ts +0 -3
- package/dist/types/components/form/control/nullable-text-area-control.d.ts +0 -7
- package/dist/types/components/form/control/nullable-text-control.d.ts +0 -3
- package/dist/types/components/form/control/number-control.d.ts +0 -9
- package/dist/types/components/form/control/password-control.d.ts +0 -3
- package/dist/types/components/form/control/segmented-control.d.ts +0 -10
- package/dist/types/components/form/control/string-date-control.d.ts +0 -3
- package/dist/types/components/form/control/tags-control.d.ts +0 -3
- package/dist/types/components/form/control/text-area-control.d.ts +0 -7
- package/dist/types/components/form/control/text-control.d.ts +0 -8
- package/dist/types/components/form/input/combobox.d.ts +0 -39
- package/dist/ur-BThJLsvD.js +0 -38
- package/dist/ur-mIO25A6L.js +0 -49
- package/dist/vi-Cd6F8iSa.js +0 -38
- package/dist/vi-Dw_DDZWP.js +0 -49
- package/dist/zh-Boy-i2zO.js +0 -38
- package/dist/zh-Dojj6P4C.js +0 -49
|
@@ -0,0 +1,2006 @@
|
|
|
1
|
+
var He = Object.defineProperty;
|
|
2
|
+
var De = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var Ue = (e, s, t) => s in e ? He(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var h = (e, s, t) => Ue(e, typeof s != "symbol" ? s + "" : s, t), _e = (e, s, t) => s.has(e) || De("Cannot " + t);
|
|
7
|
+
var o = (e, s, t) => (_e(e, s, "read from private field"), t ? t.call(e) : s.get(e)), v = (e, s, t) => s.has(e) ? De("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), z = (e, s, t, n) => (_e(e, s, "write to private field"), n ? n.call(e, t) : s.set(e, t), t);
|
|
8
|
+
import { makeProviderMark as Me, localStorageProp as Ee, computedOf as T, Use as he, html as m, attr as u, When as M, Fragment as P, aria as E, coalesce as Se, style as fe, prop as $, on as S, OnDispose as Pe, Value as x, WithElement as Ge, Empty as k, dataAttr as ke, input as Ae, emitValue as B, emitValueAsNumber as ze } from "@tempots/dom";
|
|
9
|
+
import { WhenInViewport as We, Resource as Ke, ElementRect as Je } from "@tempots/ui";
|
|
10
|
+
function Te(e, {
|
|
11
|
+
units: s = ["B", "KB", "MB", "GB", "TB"],
|
|
12
|
+
decimalPlaces: t = 0,
|
|
13
|
+
locale: n
|
|
14
|
+
} = {}) {
|
|
15
|
+
if (e === 0 || e === 0n)
|
|
16
|
+
return new Intl.NumberFormat(n, {
|
|
17
|
+
style: "unit",
|
|
18
|
+
unit: "byte",
|
|
19
|
+
unitDisplay: "short",
|
|
20
|
+
maximumFractionDigits: 0
|
|
21
|
+
}).format(0).replace("byte", s[0]);
|
|
22
|
+
let r, a;
|
|
23
|
+
if (typeof e == "bigint") {
|
|
24
|
+
let c = e < 0n ? -e : e;
|
|
25
|
+
for (r = 0; c >= 1024n && r < s.length - 1; )
|
|
26
|
+
c = c / 1024n, r++;
|
|
27
|
+
a = Number(e) / Math.pow(1024, r);
|
|
28
|
+
} else
|
|
29
|
+
r = Math.floor(Math.log(Math.abs(e)) / Math.log(1024)), r = Math.min(r, s.length - 1), a = e / Math.pow(1024, r);
|
|
30
|
+
return new Intl.NumberFormat(n, {
|
|
31
|
+
style: "unit",
|
|
32
|
+
unit: "byte",
|
|
33
|
+
unitDisplay: "short",
|
|
34
|
+
minimumFractionDigits: r === 0 ? 0 : t,
|
|
35
|
+
maximumFractionDigits: r === 0 ? 0 : t
|
|
36
|
+
}).format(a).replace("byte", s[r]);
|
|
37
|
+
}
|
|
38
|
+
const Ce = /* @__PURE__ */ new Map();
|
|
39
|
+
function xe(e) {
|
|
40
|
+
const s = Ce.get(e) ?? 0;
|
|
41
|
+
return Ce.set(e, s + 1), `${e}-${s}`;
|
|
42
|
+
}
|
|
43
|
+
const _ = {
|
|
44
|
+
/**
|
|
45
|
+
* Creates a loading state.
|
|
46
|
+
* @param previousValue - The previous value.
|
|
47
|
+
* @returns A loading state.
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
notAsked: { type: "NotAsked" },
|
|
51
|
+
/**
|
|
52
|
+
* Creates a loading state.
|
|
53
|
+
* @param previousValue - The previous value.
|
|
54
|
+
* @returns A loading state.
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
loading(e = void 0) {
|
|
58
|
+
return { type: "Loading", previousValue: e };
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Creates a successful state.
|
|
62
|
+
* @param value - The value.
|
|
63
|
+
* @returns A successful state.
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
success(e) {
|
|
67
|
+
return { type: "AsyncSuccess", value: e };
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* Creates a failure state.
|
|
71
|
+
* @param error - The error.
|
|
72
|
+
* @returns A failure state.
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
failure(e) {
|
|
76
|
+
return { type: "AsyncFailure", error: e };
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Checks if the result is a success.
|
|
80
|
+
* @param r - The result.
|
|
81
|
+
* @returns `true` if the result is a success; otherwise, `false`.
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
isSuccess(e) {
|
|
85
|
+
return e.type === "AsyncSuccess";
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* Checks if the result is a failure.
|
|
89
|
+
* @param r - The result.
|
|
90
|
+
* @returns `true` if the result is a failure; otherwise, `false`.
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
isFailure(e) {
|
|
94
|
+
return e.type === "AsyncFailure";
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* Checks if the result is a not-asked.
|
|
98
|
+
* @param r - The result.
|
|
99
|
+
* @returns `true` if the result is not-asked; otherwise, `false`.
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
isNotAsked(e) {
|
|
103
|
+
return e.type === "NotAsked";
|
|
104
|
+
},
|
|
105
|
+
/**
|
|
106
|
+
* Checks if the result is a loading.
|
|
107
|
+
* @param r - The result.
|
|
108
|
+
* @returns `true` if the result is loading; otherwise, `false`.
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
isLoading(e) {
|
|
112
|
+
return e.type === "Loading";
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* Gets the value if the result is a success; otherwise, returns the alternative value.
|
|
116
|
+
* @param r - The result.
|
|
117
|
+
* @param alt - The alternative value.
|
|
118
|
+
* @returns The value if the result is a success; otherwise, the alternative value.
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
getOrElse(e, s) {
|
|
122
|
+
return _.isSuccess(e) ? e.value : s;
|
|
123
|
+
},
|
|
124
|
+
/**
|
|
125
|
+
* Gets the value if the result is a success; otherwise, returns the value from the alternative function.
|
|
126
|
+
* @param r - The result.
|
|
127
|
+
* @param altf - The alternative function.
|
|
128
|
+
* @returns The value if the result is a success; otherwise, the value from the alternative
|
|
129
|
+
* @public
|
|
130
|
+
* function.
|
|
131
|
+
*/
|
|
132
|
+
getOrElseLazy(e, s) {
|
|
133
|
+
return _.isSuccess(e) ? e.value : s();
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* Gets the value if the result is a success; otherwise, returns `null`.
|
|
137
|
+
* @param r - The result.
|
|
138
|
+
* @returns The value if the result is a success; otherwise, `null`.
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
getOrNull(e) {
|
|
142
|
+
return _.isSuccess(e) ? e.value : null;
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* Gets the value if the result is a success; otherwise, returns `undefined`.
|
|
146
|
+
* @param r - The result.
|
|
147
|
+
* @returns The value if the result is a success; otherwise, `undefined`.
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
getOrUndefined(e) {
|
|
151
|
+
return _.isSuccess(e) ? e.value : void 0;
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* Gets the value of a `AsyncResult` if it is a `Success`, otherwise it throws the error contained in the `Failure`.
|
|
155
|
+
* @param r - The `AsyncResult` to get the value from.
|
|
156
|
+
* @returns The value of the `AsyncResult` if it is a `Success`.
|
|
157
|
+
*/
|
|
158
|
+
getUnsafe: (e) => {
|
|
159
|
+
if (_.isSuccess(e))
|
|
160
|
+
return e.value;
|
|
161
|
+
throw _.isFailure(e) ? e.error : new Error("Cannot get value from a not-asked or loading result");
|
|
162
|
+
},
|
|
163
|
+
/**
|
|
164
|
+
* Based on the state of the result, it picks the appropriate function to call and returns the result.
|
|
165
|
+
* @param success - The function to call if the result is a success.
|
|
166
|
+
* @param failure - The function to call if the result is a failure.
|
|
167
|
+
* @param loading - The function to call if the result is loading.
|
|
168
|
+
* @param notAsked - The function to call if the result is not-asked.
|
|
169
|
+
* @returns The result of calling the appropriate function based on the state of the result.
|
|
170
|
+
* @public
|
|
171
|
+
*/
|
|
172
|
+
match: (e, {
|
|
173
|
+
success: s,
|
|
174
|
+
failure: t,
|
|
175
|
+
loading: n,
|
|
176
|
+
notAsked: r = n
|
|
177
|
+
}) => _.isSuccess(e) ? s(e.value) : _.isFailure(e) ? t(e.error) : _.isNotAsked(e) ? r() : n(e.previousValue),
|
|
178
|
+
/**
|
|
179
|
+
* When the result is a success, it applies the function to the value.
|
|
180
|
+
*
|
|
181
|
+
* @param r - The result.
|
|
182
|
+
* @param apply - The function to apply.
|
|
183
|
+
* @returns The result that was passed in.
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
whenSuccess: (e, s) => (_.isSuccess(e) && s(e.value), e),
|
|
187
|
+
/**
|
|
188
|
+
* When the result is a failure, it applies the function to the error.
|
|
189
|
+
*
|
|
190
|
+
* @param r - The result.
|
|
191
|
+
* @param apply - The function to apply.
|
|
192
|
+
* @returns The result that was passed in.
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
195
|
+
whenFailure: (e, s) => (_.isFailure(e) && s(e.error), e),
|
|
196
|
+
/**
|
|
197
|
+
* Compares two results for equality.
|
|
198
|
+
* @param r1 - The first result.
|
|
199
|
+
* @param r2 - The second result.
|
|
200
|
+
* @param options - The options to use for comparison. By default, uses strict equality.
|
|
201
|
+
* @returns `true` if the results are equal, `false` otherwise.
|
|
202
|
+
*/
|
|
203
|
+
equals: (e, s, t = {
|
|
204
|
+
valueEquals: (n, r) => n === r,
|
|
205
|
+
errorEquals: (n, r) => n === r
|
|
206
|
+
}) => e.type === "AsyncSuccess" && s.type === "AsyncSuccess" ? t.valueEquals(e.value, s.value) : e.type === "AsyncFailure" && s.type === "AsyncFailure" ? t.errorEquals(e.error, s.error) : e.type === "Loading" && s.type === "Loading" ? t.valueEquals(e.previousValue, s.previousValue) : e.type === "NotAsked" && s.type === "NotAsked",
|
|
207
|
+
/**
|
|
208
|
+
* Combines multiple results into a single result.
|
|
209
|
+
* @param results - The results to combine.
|
|
210
|
+
* @returns A single result that is a success if all the input results are successes, otherwise a failure.
|
|
211
|
+
*/
|
|
212
|
+
all: (e) => {
|
|
213
|
+
const s = [];
|
|
214
|
+
for (const t of e)
|
|
215
|
+
if (_.isSuccess(t))
|
|
216
|
+
s.push(t.value);
|
|
217
|
+
else
|
|
218
|
+
return t;
|
|
219
|
+
return _.success(s);
|
|
220
|
+
},
|
|
221
|
+
/**
|
|
222
|
+
* Converts a Promise to an AsyncResult.
|
|
223
|
+
* @param p - The Promise to convert.
|
|
224
|
+
* @returns A Promise that resolves to an AsyncResult.
|
|
225
|
+
*/
|
|
226
|
+
ofPromise: async (e) => {
|
|
227
|
+
try {
|
|
228
|
+
const s = await e;
|
|
229
|
+
return _.success(s);
|
|
230
|
+
} catch (s) {
|
|
231
|
+
return _.failure(s instanceof Error ? s : new Error(String(s)));
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}, W = (e, s) => e === s || e !== e && s !== s, C = {
|
|
235
|
+
/**
|
|
236
|
+
* Creates a valid `Validation`.
|
|
237
|
+
* @returns A `Validation` that is `Valid`.
|
|
238
|
+
*/
|
|
239
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
240
|
+
valid: { type: "valid" },
|
|
241
|
+
/**
|
|
242
|
+
* Creates an invalid `Validation`.
|
|
243
|
+
* @param error - The error associated with the invalid value.
|
|
244
|
+
* @returns A `Validation` that is `Invalid`.
|
|
245
|
+
*/
|
|
246
|
+
invalid(e) {
|
|
247
|
+
return { type: "invalid", error: e };
|
|
248
|
+
},
|
|
249
|
+
/**
|
|
250
|
+
* Checks if a `Validation` is `Valid`.
|
|
251
|
+
* @param r - The `Validation` to check.
|
|
252
|
+
* @returns `true` if the `Validation` is `Valid`, otherwise `false`.
|
|
253
|
+
*/
|
|
254
|
+
isValid(e) {
|
|
255
|
+
return e.type === "valid";
|
|
256
|
+
},
|
|
257
|
+
/**
|
|
258
|
+
* Checks if a `Validation` is `Invalid`.
|
|
259
|
+
* @param r - The `Validation` to check.
|
|
260
|
+
* @returns `true` if the `Validation` is `Invalid`, otherwise `false`.
|
|
261
|
+
*/
|
|
262
|
+
isInvalid(e) {
|
|
263
|
+
return e.type === "invalid";
|
|
264
|
+
},
|
|
265
|
+
/**
|
|
266
|
+
* Maps the value of a `Validation` to a new value.
|
|
267
|
+
* @param r - The `Validation` to map.
|
|
268
|
+
* @param valid - The mapping function for a valid value.
|
|
269
|
+
* @param invalid - The mapping function for an invalid value.
|
|
270
|
+
* @returns The mapped value.
|
|
271
|
+
*/
|
|
272
|
+
match: (e, s, t) => C.isValid(e) ? s() : t(e.error),
|
|
273
|
+
/**
|
|
274
|
+
* Maps the value of a `Validation` to a new `Validation`.
|
|
275
|
+
* @param validation - The `Validation` to map.
|
|
276
|
+
* @param value - The value to map.
|
|
277
|
+
* @returns A new `Validation` with the mapped value.
|
|
278
|
+
*/
|
|
279
|
+
toResult: (e, s) => C.match(
|
|
280
|
+
e,
|
|
281
|
+
() => y.success(s),
|
|
282
|
+
(t) => y.failure(t)
|
|
283
|
+
),
|
|
284
|
+
/**
|
|
285
|
+
* Execute a function when the `Validation` is valid.
|
|
286
|
+
*
|
|
287
|
+
* @param r - The `Validation` to check.
|
|
288
|
+
* @param apply - The function to execute when the `Validation` is valid.
|
|
289
|
+
* @returns The `Validation` object.
|
|
290
|
+
*/
|
|
291
|
+
whenValid: (e, s) => (C.isValid(e) && s(), e),
|
|
292
|
+
/**
|
|
293
|
+
* Execute a function when the `Validation` is invalid.
|
|
294
|
+
*
|
|
295
|
+
* @param r - The `Validation` to check.
|
|
296
|
+
* @param apply - The function to execute when the `Validation` is invalid.
|
|
297
|
+
* @returns The `Validation` object.
|
|
298
|
+
*/
|
|
299
|
+
whenInvalid: (e, s) => (C.isInvalid(e) && s(e.error), e)
|
|
300
|
+
}, y = {
|
|
301
|
+
/**
|
|
302
|
+
* Creates a successful `Result`.
|
|
303
|
+
* @param value - The value to wrap in a `Success` type.
|
|
304
|
+
* @returns A `Result` that is a `Success`.
|
|
305
|
+
* @public
|
|
306
|
+
*/
|
|
307
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
308
|
+
success(e) {
|
|
309
|
+
return { type: "Success", value: e };
|
|
310
|
+
},
|
|
311
|
+
/**
|
|
312
|
+
* Creates a failure `Result`.
|
|
313
|
+
* @param error - The error to wrap in a `Failure` type.
|
|
314
|
+
* @returns A `Result` that is a `Failure`.
|
|
315
|
+
* @public
|
|
316
|
+
*/
|
|
317
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
318
|
+
failure(e) {
|
|
319
|
+
return { type: "Failure", error: e };
|
|
320
|
+
},
|
|
321
|
+
/**
|
|
322
|
+
* Maps the value of a `Result` to a new value.
|
|
323
|
+
* @param r - The `Result` to map.
|
|
324
|
+
* @param f - The mapping function.
|
|
325
|
+
* @returns A new `Result` with the mapped value.
|
|
326
|
+
* @public
|
|
327
|
+
*/
|
|
328
|
+
map: (e, s) => e.type === "Success" ? y.success(s(e.value)) : e,
|
|
329
|
+
/**
|
|
330
|
+
* Maps the value of a `Result` to a new `Result`.
|
|
331
|
+
* @param r - The `Result` to map.
|
|
332
|
+
* @param f - The mapping function.
|
|
333
|
+
* @returns A new `Result` with the mapped value.
|
|
334
|
+
* @public
|
|
335
|
+
*/
|
|
336
|
+
flatMap: (e, s) => e.type === "Success" ? s(e.value) : e,
|
|
337
|
+
/**
|
|
338
|
+
* Converts a `Result` to an `AsyncResult`.
|
|
339
|
+
* @param r - The `Result` to convert.
|
|
340
|
+
* @returns An `AsyncResult` that is equivalent to the input `Result`.
|
|
341
|
+
* @public
|
|
342
|
+
*/
|
|
343
|
+
toAsync(e) {
|
|
344
|
+
return y.match(
|
|
345
|
+
e,
|
|
346
|
+
(s) => _.success(s),
|
|
347
|
+
(s) => _.failure(s)
|
|
348
|
+
);
|
|
349
|
+
},
|
|
350
|
+
/**
|
|
351
|
+
* Converts a `Result` to a `Validation`.
|
|
352
|
+
* @param r - The `Result` to convert.
|
|
353
|
+
* @returns A `Validation` that is equivalent to the input `Result`.
|
|
354
|
+
* @public
|
|
355
|
+
*/
|
|
356
|
+
toValidation(e) {
|
|
357
|
+
return y.match(
|
|
358
|
+
e,
|
|
359
|
+
() => C.valid,
|
|
360
|
+
(s) => C.invalid(s)
|
|
361
|
+
);
|
|
362
|
+
},
|
|
363
|
+
/**
|
|
364
|
+
* Checks if a `Result` is a success.
|
|
365
|
+
* @param r - The `Result` to check.
|
|
366
|
+
* @returns `true` if the `Result` is a `Success`, `false` otherwise.
|
|
367
|
+
* @public
|
|
368
|
+
*/
|
|
369
|
+
isSuccess(e) {
|
|
370
|
+
return e.type === "Success";
|
|
371
|
+
},
|
|
372
|
+
/**
|
|
373
|
+
* Checks if a `Result` is a failure.
|
|
374
|
+
* @param r - The `Result` to check.
|
|
375
|
+
* @returns `true` if the `Result` is a `Failure`, `false` otherwise.
|
|
376
|
+
* @public
|
|
377
|
+
*/
|
|
378
|
+
isFailure(e) {
|
|
379
|
+
return e.type === "Failure";
|
|
380
|
+
},
|
|
381
|
+
/**
|
|
382
|
+
* Gets the value of a `Result` if it is a `Success`, otherwise returns the provided default value.
|
|
383
|
+
* @param r - The `Result` to get the value from.
|
|
384
|
+
* @param alt - The default value to return if the `Result` is a `Failure`.
|
|
385
|
+
* @returns The value of the `Result` if it is a `Success`, otherwise the default value.
|
|
386
|
+
* @public
|
|
387
|
+
*/
|
|
388
|
+
getOrElse(e, s) {
|
|
389
|
+
return y.isSuccess(e) ? e.value : s;
|
|
390
|
+
},
|
|
391
|
+
/**
|
|
392
|
+
* Gets the value of a `Result` if it is a `Success`, otherwise returns the result of the provided function.
|
|
393
|
+
* @param r - The `Result` to get the value from.
|
|
394
|
+
* @param altf - The function to call if the `Result` is a `Failure`.
|
|
395
|
+
* @returns The value of the `Result` if it is a `Success`, otherwise the result of the function.
|
|
396
|
+
* @public
|
|
397
|
+
*/
|
|
398
|
+
getOrElseLazy(e, s) {
|
|
399
|
+
return y.isSuccess(e) ? e.value : s();
|
|
400
|
+
},
|
|
401
|
+
/**
|
|
402
|
+
* Gets the value of a `Result` if it is a `Success`, otherwise returns `null`.
|
|
403
|
+
* @param r - The `Result` to get the value from.
|
|
404
|
+
* @returns The value of the `Result` if it is a `Success`, otherwise `null`.
|
|
405
|
+
* @public
|
|
406
|
+
*/
|
|
407
|
+
getOrNull(e) {
|
|
408
|
+
return y.isSuccess(e) ? e.value : null;
|
|
409
|
+
},
|
|
410
|
+
/**
|
|
411
|
+
* Gets the value of a `Result` if it is a `Success`, otherwise returns `undefined`.
|
|
412
|
+
* @param r - The `Result` to get the value from.
|
|
413
|
+
* @returns The value of the `Result` if it is a `Success`, otherwise `undefined`.
|
|
414
|
+
* @public
|
|
415
|
+
*/
|
|
416
|
+
getOrUndefined(e) {
|
|
417
|
+
return y.isSuccess(e) ? e.value : void 0;
|
|
418
|
+
},
|
|
419
|
+
/**
|
|
420
|
+
* Gets the value of a `Result` if it is a `Success`, otherwise it throws the error contained in the `Failure`.
|
|
421
|
+
* @param r - The `Result` to get the value from.
|
|
422
|
+
* @returns The value of the `Result` if it is a `Success`.
|
|
423
|
+
*/
|
|
424
|
+
getUnsafe: (e) => {
|
|
425
|
+
if (y.isSuccess(e))
|
|
426
|
+
return e.value;
|
|
427
|
+
throw e.error;
|
|
428
|
+
},
|
|
429
|
+
/**
|
|
430
|
+
* Based on the state of the result, it picks the appropriate function to call and returns the result.
|
|
431
|
+
* @param success - The function to call if the result is a success.
|
|
432
|
+
* @param failure - The function to call if the result is a failure.
|
|
433
|
+
* @returns The result of calling the appropriate function based on the state of the result.
|
|
434
|
+
* @public
|
|
435
|
+
*/
|
|
436
|
+
match: (e, s, t) => y.isSuccess(e) ? s(e.value) : t(e.error),
|
|
437
|
+
/**
|
|
438
|
+
* Calls the provided function if the result is a success.
|
|
439
|
+
* @param apply - The function to call if the result is a success.
|
|
440
|
+
* @returns A function that takes a `Result` and calls the provided function if the result is a success.
|
|
441
|
+
* @public
|
|
442
|
+
*/
|
|
443
|
+
whenSuccess: (e, s) => (y.isSuccess(e) && s(e.value), e),
|
|
444
|
+
whenFailure: (e, s) => (y.isFailure(e) && s(e.error), e),
|
|
445
|
+
/**
|
|
446
|
+
* Combines two results into a single result.
|
|
447
|
+
* @param r1 - The first result.
|
|
448
|
+
* @param r2 - The second result.
|
|
449
|
+
* @param combineV - The function to combine two values.
|
|
450
|
+
* @param combineE - The function to combine two errors.
|
|
451
|
+
* @returns The combined result.
|
|
452
|
+
* @public
|
|
453
|
+
*/
|
|
454
|
+
combine: (e, s, t, n) => y.match(
|
|
455
|
+
e,
|
|
456
|
+
(r) => y.match(
|
|
457
|
+
s,
|
|
458
|
+
(a) => y.success(t(r, a)),
|
|
459
|
+
(a) => y.failure(a)
|
|
460
|
+
),
|
|
461
|
+
(r) => y.match(
|
|
462
|
+
s,
|
|
463
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
464
|
+
(a) => y.failure(r),
|
|
465
|
+
(a) => y.failure(n(r, a))
|
|
466
|
+
)
|
|
467
|
+
),
|
|
468
|
+
/**
|
|
469
|
+
* Compares two results for equality.
|
|
470
|
+
* @param r1 - The first result.
|
|
471
|
+
* @param r2 - The second result.
|
|
472
|
+
* @param options - The options to use for comparison. By default, uses strict equality.
|
|
473
|
+
* @returns `true` if the results are equal, `false` otherwise.
|
|
474
|
+
*/
|
|
475
|
+
equals: (e, s, t = {
|
|
476
|
+
valueEquals: (n, r) => n === r,
|
|
477
|
+
errorEquals: (n, r) => n === r
|
|
478
|
+
}) => e.type === "Success" && s.type === "Success" ? t.valueEquals(e.value, s.value) : e.type === "Failure" && s.type === "Failure" ? t.errorEquals(e.error, s.error) : !1,
|
|
479
|
+
/**
|
|
480
|
+
* Combines multiple results into a single result.
|
|
481
|
+
* @param results - The results to combine.
|
|
482
|
+
* @returns A single result that is a success if all the input results are successes, otherwise a failure.
|
|
483
|
+
*/
|
|
484
|
+
all: (e) => {
|
|
485
|
+
const s = [];
|
|
486
|
+
for (const t of e)
|
|
487
|
+
if (y.isSuccess(t))
|
|
488
|
+
s.push(t.value);
|
|
489
|
+
else
|
|
490
|
+
return t;
|
|
491
|
+
return y.success(s);
|
|
492
|
+
}
|
|
493
|
+
}, Le = {
|
|
494
|
+
loadingExtended: "Loading, please wait",
|
|
495
|
+
loadingShort: "Loading...",
|
|
496
|
+
locale: "Locale",
|
|
497
|
+
iconDescription: "Icon",
|
|
498
|
+
loadingIcon: "Loading icon",
|
|
499
|
+
failedToLoadIcon: "Failed to load icon",
|
|
500
|
+
editLabel: "Edit",
|
|
501
|
+
selectOne: "Select one",
|
|
502
|
+
selectMany: "Select many",
|
|
503
|
+
noResults: "No results",
|
|
504
|
+
passwordPlaceholderText: "Secret Password",
|
|
505
|
+
togglePasswordVisibility: "Toggle password visibility",
|
|
506
|
+
toggleMenu: "Toggle menu",
|
|
507
|
+
toggleAside: "Toggle aside",
|
|
508
|
+
mainNavigation: "Main navigation",
|
|
509
|
+
sidebar: "Sidebar",
|
|
510
|
+
closeDrawer: "Close drawer",
|
|
511
|
+
closeModal: "Close modal",
|
|
512
|
+
confirm: "Confirm",
|
|
513
|
+
cancel: "Cancel",
|
|
514
|
+
addLabel: "Add",
|
|
515
|
+
removeItem: "Remove item",
|
|
516
|
+
// languages
|
|
517
|
+
currentLocale: "English",
|
|
518
|
+
ar: "Arabic",
|
|
519
|
+
de: "German",
|
|
520
|
+
en: "English",
|
|
521
|
+
es: "Spanish",
|
|
522
|
+
fr: "French",
|
|
523
|
+
hi: "Hindi",
|
|
524
|
+
it: "Italian",
|
|
525
|
+
ja: "Japanese",
|
|
526
|
+
ko: "Korean",
|
|
527
|
+
nl: "Dutch",
|
|
528
|
+
pl: "Polish",
|
|
529
|
+
pt: "Portuguese",
|
|
530
|
+
ru: "Russian",
|
|
531
|
+
tr: "Turkish",
|
|
532
|
+
vi: "Vietnamese",
|
|
533
|
+
zh: "Chinese",
|
|
534
|
+
he: "Hebrew",
|
|
535
|
+
fa: "Persian",
|
|
536
|
+
ur: "Urdu",
|
|
537
|
+
// input
|
|
538
|
+
emailPlaceholderText: "Enter your email",
|
|
539
|
+
incrementValue: "Increment value",
|
|
540
|
+
decrementValue: "Decrement value",
|
|
541
|
+
// drop zone
|
|
542
|
+
dropZoneInstructions: (e) => e ? "Click to choose or drag files here, or press Enter or Space to open file selector" : "Drag files here",
|
|
543
|
+
// size
|
|
544
|
+
fileSizeUnits: ["Bytes", "KB", "MB", "GB", "TB"],
|
|
545
|
+
// file input
|
|
546
|
+
removeFile: "Remove file",
|
|
547
|
+
clearAllFiles: "Clear all files",
|
|
548
|
+
// inputs reset
|
|
549
|
+
clearValue: "Reset",
|
|
550
|
+
unknownType: "Unknown type",
|
|
551
|
+
filesInputInstructions: (e, s, t) => {
|
|
552
|
+
let n = e == null || e > 1 ? "Click to choose or drag files here" : "Click to choose or drag a file here";
|
|
553
|
+
if (e || s) {
|
|
554
|
+
const r = [];
|
|
555
|
+
if (e != null && e > 1 && r.push(`up to ${e} files`), s && t) {
|
|
556
|
+
const a = Te(s, {
|
|
557
|
+
units: t
|
|
558
|
+
});
|
|
559
|
+
r.push(`max ${a} each`);
|
|
560
|
+
}
|
|
561
|
+
r.length > 0 && (n += ` (${r.join(", ")})`);
|
|
562
|
+
} else if (s && t) {
|
|
563
|
+
const r = Te(s, {
|
|
564
|
+
units: t
|
|
565
|
+
});
|
|
566
|
+
n += ` (max ${r})`;
|
|
567
|
+
}
|
|
568
|
+
return n;
|
|
569
|
+
}
|
|
570
|
+
}, Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
571
|
+
__proto__: null,
|
|
572
|
+
default: Le
|
|
573
|
+
}, Symbol.toStringTag, { value: "Module" })), Ze = Le, Qe = "en", Xe = (e, s, t) => {
|
|
574
|
+
const n = e[s];
|
|
575
|
+
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((r, a) => {
|
|
576
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
577
|
+
a.bind(
|
|
578
|
+
null,
|
|
579
|
+
new Error(
|
|
580
|
+
"Unknown variable dynamic import: " + s + (s.split("/").length !== t ? ". Note that variables only represent file names one level deep." : "")
|
|
581
|
+
)
|
|
582
|
+
)
|
|
583
|
+
);
|
|
584
|
+
});
|
|
585
|
+
}, et = /* @__PURE__ */ new Set([
|
|
586
|
+
"ar",
|
|
587
|
+
// Arabic
|
|
588
|
+
"he",
|
|
589
|
+
// Hebrew
|
|
590
|
+
"fa",
|
|
591
|
+
// Persian/Farsi
|
|
592
|
+
"ur",
|
|
593
|
+
// Urdu
|
|
594
|
+
"ps",
|
|
595
|
+
// Pashto
|
|
596
|
+
"sd",
|
|
597
|
+
// Sindhi
|
|
598
|
+
"ku",
|
|
599
|
+
// Kurdish
|
|
600
|
+
"dv",
|
|
601
|
+
// Divehi/Maldivian
|
|
602
|
+
"yi",
|
|
603
|
+
// Yiddish
|
|
604
|
+
"ji",
|
|
605
|
+
// Yiddish (alternative code)
|
|
606
|
+
"iw",
|
|
607
|
+
// Hebrew (deprecated, but still used)
|
|
608
|
+
"in"
|
|
609
|
+
// Indonesian (deprecated, but sometimes confused)
|
|
610
|
+
]);
|
|
611
|
+
function Oe(e) {
|
|
612
|
+
if (!e) return "ltr";
|
|
613
|
+
const s = e.split(/[-_]/)[0].toLowerCase();
|
|
614
|
+
return et.has(s) ? "rtl" : "ltr";
|
|
615
|
+
}
|
|
616
|
+
function tt(e, s) {
|
|
617
|
+
return e === "auto" ? Oe(s) : e;
|
|
618
|
+
}
|
|
619
|
+
function Ot(e) {
|
|
620
|
+
return `b-${e}`;
|
|
621
|
+
}
|
|
622
|
+
function Vt(e) {
|
|
623
|
+
return Oe(e) === "rtl";
|
|
624
|
+
}
|
|
625
|
+
function Bt(e) {
|
|
626
|
+
return e === "ltr" ? "rtl" : "ltr";
|
|
627
|
+
}
|
|
628
|
+
const st = {
|
|
629
|
+
ltr: {
|
|
630
|
+
"inline-start": "left",
|
|
631
|
+
"inline-end": "right",
|
|
632
|
+
"block-start": "top",
|
|
633
|
+
"block-end": "bottom"
|
|
634
|
+
},
|
|
635
|
+
rtl: {
|
|
636
|
+
"inline-start": "right",
|
|
637
|
+
"inline-end": "left",
|
|
638
|
+
"block-start": "top",
|
|
639
|
+
"block-end": "bottom"
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
function jt(e, s) {
|
|
643
|
+
return st[s][e];
|
|
644
|
+
}
|
|
645
|
+
const nt = {
|
|
646
|
+
mark: Me("Locale"),
|
|
647
|
+
create: (e) => {
|
|
648
|
+
const s = Ee({
|
|
649
|
+
defaultValue: navigator.language ?? "en-US",
|
|
650
|
+
key: "beatui-locale"
|
|
651
|
+
}), t = Ee({
|
|
652
|
+
defaultValue: "auto",
|
|
653
|
+
key: "beatui-direction-preference"
|
|
654
|
+
}), n = T(
|
|
655
|
+
s,
|
|
656
|
+
t
|
|
657
|
+
)(
|
|
658
|
+
(a, l) => tt(l, a)
|
|
659
|
+
);
|
|
660
|
+
return {
|
|
661
|
+
value: {
|
|
662
|
+
locale: s,
|
|
663
|
+
setLocale: (a) => s.set(a),
|
|
664
|
+
direction: n,
|
|
665
|
+
directionPreference: t,
|
|
666
|
+
setDirectionPreference: (a) => t.set(a)
|
|
667
|
+
},
|
|
668
|
+
dispose: () => {
|
|
669
|
+
s.dispose(), t.dispose(), n.dispose();
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
}, rt = "bui-icons", me = /* @__PURE__ */ new Map(), Ve = (() => {
|
|
674
|
+
try {
|
|
675
|
+
return typeof indexedDB < "u" && indexedDB !== null;
|
|
676
|
+
} catch {
|
|
677
|
+
return !1;
|
|
678
|
+
}
|
|
679
|
+
})();
|
|
680
|
+
function at() {
|
|
681
|
+
return Ve ? new Promise((e, s) => {
|
|
682
|
+
const t = indexedDB.open(rt, 1);
|
|
683
|
+
t.onupgradeneeded = function(n) {
|
|
684
|
+
const r = n.target.result;
|
|
685
|
+
r.objectStoreNames.contains("icons") || r.createObjectStore("icons");
|
|
686
|
+
}, t.onsuccess = function() {
|
|
687
|
+
e(t.result);
|
|
688
|
+
}, t.onerror = function() {
|
|
689
|
+
s(t.error);
|
|
690
|
+
};
|
|
691
|
+
}) : Promise.reject(new Error("IndexedDB not available"));
|
|
692
|
+
}
|
|
693
|
+
const be = Ve ? at() : null;
|
|
694
|
+
function it(e, s) {
|
|
695
|
+
return new Promise(async (t, n) => {
|
|
696
|
+
try {
|
|
697
|
+
if (be) {
|
|
698
|
+
const a = (await be).transaction("icons", "readwrite");
|
|
699
|
+
a.objectStore("icons").put(s, e), a.oncomplete = t, a.onerror = n;
|
|
700
|
+
} else
|
|
701
|
+
me.set(e, s), t(void 0);
|
|
702
|
+
} catch {
|
|
703
|
+
me.set(e, s), t(void 0);
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
function ot(e) {
|
|
708
|
+
return new Promise(async (s, t) => {
|
|
709
|
+
try {
|
|
710
|
+
if (be) {
|
|
711
|
+
const l = (await be).transaction("icons", "readonly").objectStore("icons").get(e);
|
|
712
|
+
l.onsuccess = function() {
|
|
713
|
+
s(l.result);
|
|
714
|
+
}, l.onerror = t;
|
|
715
|
+
} else
|
|
716
|
+
s(me.get(e) || null);
|
|
717
|
+
} catch {
|
|
718
|
+
s(me.get(e) || null);
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
async function lt(e) {
|
|
723
|
+
const s = `https://api.iconify.design/${e}.svg`;
|
|
724
|
+
return fetch(s).then((t) => {
|
|
725
|
+
if (t.status === 200)
|
|
726
|
+
return t.text();
|
|
727
|
+
throw new Error(`Failed to load icon: ${e}`);
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
async function ct(e) {
|
|
731
|
+
const s = e.replace(":", "/"), t = await ot(s);
|
|
732
|
+
if (t)
|
|
733
|
+
return t;
|
|
734
|
+
const n = await lt(s);
|
|
735
|
+
return await it(s, n), n;
|
|
736
|
+
}
|
|
737
|
+
function ut(e, s) {
|
|
738
|
+
const t = ["bc-icon", `bc-icon--${e}`];
|
|
739
|
+
return s && t.push(`bu-fg-${s}`), t.join(" ");
|
|
740
|
+
}
|
|
741
|
+
function ae({ icon: e, size: s = "md", color: t, title: n, accessibility: r = "auto" }, ...a) {
|
|
742
|
+
const l = T(
|
|
743
|
+
r,
|
|
744
|
+
n
|
|
745
|
+
)((i, c) => i === "decorative" ? !1 : i === "informative" ? !0 : c != null && c !== "");
|
|
746
|
+
return he(
|
|
747
|
+
pe,
|
|
748
|
+
(i) => m.span(
|
|
749
|
+
u.class("bu-content-box"),
|
|
750
|
+
u.class(
|
|
751
|
+
T(
|
|
752
|
+
s,
|
|
753
|
+
t
|
|
754
|
+
)((c, p) => ut(c ?? "md", p))
|
|
755
|
+
),
|
|
756
|
+
// Add accessibility attributes based on icon type
|
|
757
|
+
M(
|
|
758
|
+
l,
|
|
759
|
+
() => P(
|
|
760
|
+
u.role("img"),
|
|
761
|
+
E.label(Se(n, i.$.iconDescription))
|
|
762
|
+
),
|
|
763
|
+
() => E.hidden(!0)
|
|
764
|
+
),
|
|
765
|
+
We(
|
|
766
|
+
{ once: !0 },
|
|
767
|
+
() => Ke({
|
|
768
|
+
request: e,
|
|
769
|
+
load: ({ request: c }) => ct(c),
|
|
770
|
+
mapError: String
|
|
771
|
+
})({
|
|
772
|
+
success: (c) => m.span(
|
|
773
|
+
fe.width("100%"),
|
|
774
|
+
fe.height("100%"),
|
|
775
|
+
u.innerHTML(c)
|
|
776
|
+
),
|
|
777
|
+
loading: () => m.span(
|
|
778
|
+
u.class("animate-spin"),
|
|
779
|
+
// Loading state accessibility
|
|
780
|
+
M(
|
|
781
|
+
l,
|
|
782
|
+
() => P(u.role("img"), E.label(i.$.loadingIcon)),
|
|
783
|
+
() => E.hidden(!0)
|
|
784
|
+
),
|
|
785
|
+
"↻"
|
|
786
|
+
),
|
|
787
|
+
failure: (c) => m.span(
|
|
788
|
+
u.title(c),
|
|
789
|
+
u.class("text-red-500"),
|
|
790
|
+
// Error state accessibility
|
|
791
|
+
M(
|
|
792
|
+
l,
|
|
793
|
+
() => P(u.role("img"), E.label(i.$.failedToLoadIcon)),
|
|
794
|
+
() => E.hidden(!0)
|
|
795
|
+
),
|
|
796
|
+
"🚫"
|
|
797
|
+
)
|
|
798
|
+
})
|
|
799
|
+
),
|
|
800
|
+
...a
|
|
801
|
+
)
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
function dt(e, s, t, n, r, a) {
|
|
805
|
+
const l = [
|
|
806
|
+
"bc-button",
|
|
807
|
+
`bu-text-${s}`,
|
|
808
|
+
`bc-control--padding-${s}`,
|
|
809
|
+
`bu-rounded-${n}`
|
|
810
|
+
];
|
|
811
|
+
switch (a && l.push("bc-button--loading"), e) {
|
|
812
|
+
case "filled":
|
|
813
|
+
l.push(`bu-bg-${t}`), r || l.push(`hover:bu-bg-${t}`);
|
|
814
|
+
break;
|
|
815
|
+
case "light":
|
|
816
|
+
l.push(`bu-bg-light-${t}`), r || l.push(`hover:bu-bg-light-${t}`);
|
|
817
|
+
break;
|
|
818
|
+
case "outline":
|
|
819
|
+
l.push(`bu-border--${t}`), r || l.push(`hover:bu-bg-light-${t}`);
|
|
820
|
+
break;
|
|
821
|
+
case "default":
|
|
822
|
+
l.push("bu-bg-light-neutral"), l.push(`bu-text-${t}`), r || l.push("hover:bu-bg-light-base");
|
|
823
|
+
break;
|
|
824
|
+
case "text":
|
|
825
|
+
l.push("bu-bg-inherit"), l.push(`bu-text-${t}`), r || l.push("hover:bu-underline");
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
828
|
+
return l.join(" ");
|
|
829
|
+
}
|
|
830
|
+
function ht({
|
|
831
|
+
type: e = "button",
|
|
832
|
+
disabled: s,
|
|
833
|
+
loading: t,
|
|
834
|
+
variant: n = "filled",
|
|
835
|
+
size: r = "md",
|
|
836
|
+
color: a = "base",
|
|
837
|
+
roundedness: l = "sm",
|
|
838
|
+
onClick: i = () => {
|
|
839
|
+
}
|
|
840
|
+
}, ...c) {
|
|
841
|
+
const p = $(null);
|
|
842
|
+
return he(
|
|
843
|
+
pe,
|
|
844
|
+
(f) => m.button(
|
|
845
|
+
u.type(e),
|
|
846
|
+
u.disabled(
|
|
847
|
+
T(
|
|
848
|
+
s,
|
|
849
|
+
t
|
|
850
|
+
)((d, g) => d || g)
|
|
851
|
+
),
|
|
852
|
+
// Add ARIA attributes for accessibility
|
|
853
|
+
E.busy(t ?? !1),
|
|
854
|
+
M(t ?? !1, () => E.label(f.$.loadingExtended)),
|
|
855
|
+
u.class(
|
|
856
|
+
T(
|
|
857
|
+
n,
|
|
858
|
+
r,
|
|
859
|
+
a,
|
|
860
|
+
l,
|
|
861
|
+
s,
|
|
862
|
+
t
|
|
863
|
+
)(
|
|
864
|
+
(d, g, w, A, b, I) => dt(
|
|
865
|
+
d ?? "filled",
|
|
866
|
+
g ?? "md",
|
|
867
|
+
w ?? "base",
|
|
868
|
+
A ?? "sm",
|
|
869
|
+
b,
|
|
870
|
+
I
|
|
871
|
+
)
|
|
872
|
+
)
|
|
873
|
+
),
|
|
874
|
+
M(
|
|
875
|
+
t ?? !1,
|
|
876
|
+
() => P(
|
|
877
|
+
fe.width(
|
|
878
|
+
p.map((d) => d == null ? "" : `${d.width}px`)
|
|
879
|
+
),
|
|
880
|
+
fe.height(
|
|
881
|
+
p.map((d) => d == null ? "" : `${d.height}px`)
|
|
882
|
+
),
|
|
883
|
+
ae({ icon: "line-md:loading-twotone-loop", size: r ?? "md" }),
|
|
884
|
+
// Hidden live region for screen reader announcements
|
|
885
|
+
m.span(
|
|
886
|
+
u.class("sr-only"),
|
|
887
|
+
E.live("polite"),
|
|
888
|
+
f.$.loadingExtended
|
|
889
|
+
)
|
|
890
|
+
),
|
|
891
|
+
() => P(S.click(i), ...c)
|
|
892
|
+
),
|
|
893
|
+
M(
|
|
894
|
+
t != null,
|
|
895
|
+
() => Je(
|
|
896
|
+
(d) => Pe(
|
|
897
|
+
d.on((g) => {
|
|
898
|
+
x.get(t ?? !1) || p.set(g);
|
|
899
|
+
})
|
|
900
|
+
)
|
|
901
|
+
)
|
|
902
|
+
)
|
|
903
|
+
)
|
|
904
|
+
);
|
|
905
|
+
}
|
|
906
|
+
function Nt({
|
|
907
|
+
size: e = "sm",
|
|
908
|
+
icon: s = "line-md:close",
|
|
909
|
+
disabled: t,
|
|
910
|
+
roundedness: n = "full",
|
|
911
|
+
color: r = "base",
|
|
912
|
+
onClick: a,
|
|
913
|
+
label: l
|
|
914
|
+
}, ...i) {
|
|
915
|
+
return he(pe, (c) => {
|
|
916
|
+
const p = Se(l, c.$.closeModal);
|
|
917
|
+
return ht(
|
|
918
|
+
{
|
|
919
|
+
variant: "text",
|
|
920
|
+
size: e,
|
|
921
|
+
roundedness: n,
|
|
922
|
+
disabled: t,
|
|
923
|
+
color: r,
|
|
924
|
+
onClick: a
|
|
925
|
+
},
|
|
926
|
+
u.title(p),
|
|
927
|
+
E.label(p),
|
|
928
|
+
...i,
|
|
929
|
+
ae({ icon: s, size: e ?? "sm" })
|
|
930
|
+
);
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
function pt(e, s, t) {
|
|
934
|
+
const n = [
|
|
935
|
+
e ? "bc-base-input-container" : "bc-input-container"
|
|
936
|
+
];
|
|
937
|
+
return s ? n.push(
|
|
938
|
+
e ? "bc-base-input-container--disabled" : "bc-input-container--disabled"
|
|
939
|
+
) : n.push(
|
|
940
|
+
e ? "bc-base-input-container--default" : "bc-input-container--default"
|
|
941
|
+
), t && n.push("bc-input-container--error"), n.join(" ");
|
|
942
|
+
}
|
|
943
|
+
const ye = ({
|
|
944
|
+
baseContainer: e,
|
|
945
|
+
disabled: s,
|
|
946
|
+
input: t,
|
|
947
|
+
before: n,
|
|
948
|
+
after: r,
|
|
949
|
+
hasError: a,
|
|
950
|
+
focusableSelector: l = "input, select, textarea",
|
|
951
|
+
growInput: i = !0
|
|
952
|
+
}, ...c) => {
|
|
953
|
+
const p = x.map(s ?? !1, (f) => f);
|
|
954
|
+
return m.div(
|
|
955
|
+
Ge((f) => {
|
|
956
|
+
const d = () => {
|
|
957
|
+
const g = f.querySelector(l);
|
|
958
|
+
g == null || g.focus();
|
|
959
|
+
};
|
|
960
|
+
return f.addEventListener("click", d), Pe(() => f.removeEventListener("click", d));
|
|
961
|
+
}),
|
|
962
|
+
u.class(
|
|
963
|
+
T(
|
|
964
|
+
e,
|
|
965
|
+
p,
|
|
966
|
+
a ?? !1
|
|
967
|
+
)(
|
|
968
|
+
(f, d, g) => pt(
|
|
969
|
+
f ?? !1,
|
|
970
|
+
d ?? !1,
|
|
971
|
+
g ?? !1
|
|
972
|
+
)
|
|
973
|
+
)
|
|
974
|
+
),
|
|
975
|
+
n != null ? m.span(u.class("bc-input-container__before"), n) : null,
|
|
976
|
+
m.div(
|
|
977
|
+
u.class("bc-input-container__input"),
|
|
978
|
+
u.class(
|
|
979
|
+
x.map(
|
|
980
|
+
i,
|
|
981
|
+
(f) => f ? "bc-input-container__input--grow" : ""
|
|
982
|
+
)
|
|
983
|
+
),
|
|
984
|
+
t
|
|
985
|
+
),
|
|
986
|
+
r != null ? m.span(u.class("bc-input-container__after"), r) : null,
|
|
987
|
+
...c
|
|
988
|
+
);
|
|
989
|
+
};
|
|
990
|
+
function we(e) {
|
|
991
|
+
return `bc-label bc-label--${e}`;
|
|
992
|
+
}
|
|
993
|
+
const Ft = (...e) => m.span(u.class(we("emphasis")), ...e), ft = (...e) => m.span(u.class(we("default")), ...e), mt = (...e) => m.span(u.class(we("muted")), ...e), qt = (...e) => m.span(u.class(we("error")), ...e), Rt = (e) => {
|
|
994
|
+
const { value: s, onBlur: t, onChange: n, placeholder: r, disabled: a, id: l } = e, i = l ?? xe("checkbox"), c = `${i}-label`, p = () => {
|
|
995
|
+
if (x.get(a ?? !1)) return;
|
|
996
|
+
const d = x.get(s);
|
|
997
|
+
n == null || n(!d);
|
|
998
|
+
}, f = (d) => {
|
|
999
|
+
x.get(a ?? !1) || (d.key === " " || d.key === "Enter") && (d.preventDefault(), p());
|
|
1000
|
+
};
|
|
1001
|
+
return ye(
|
|
1002
|
+
{
|
|
1003
|
+
baseContainer: !0,
|
|
1004
|
+
growInput: !1,
|
|
1005
|
+
...e,
|
|
1006
|
+
input: m.span(
|
|
1007
|
+
u.class("bc-checkbox-input"),
|
|
1008
|
+
m.span(
|
|
1009
|
+
u.class("bc-checkbox-input__checkbox"),
|
|
1010
|
+
u.class(
|
|
1011
|
+
x.map(
|
|
1012
|
+
s,
|
|
1013
|
+
(d) => d ? "bc-checkbox-input__checkbox--checked" : ""
|
|
1014
|
+
)
|
|
1015
|
+
),
|
|
1016
|
+
u.class(
|
|
1017
|
+
x.map(
|
|
1018
|
+
a ?? !1,
|
|
1019
|
+
(d) => d ? "bc-checkbox-input__checkbox--disabled" : ""
|
|
1020
|
+
)
|
|
1021
|
+
),
|
|
1022
|
+
u.id(i),
|
|
1023
|
+
u.role("checkbox"),
|
|
1024
|
+
u.tabindex(
|
|
1025
|
+
x.map(
|
|
1026
|
+
a ?? !1,
|
|
1027
|
+
(d) => d ? -1 : 0
|
|
1028
|
+
)
|
|
1029
|
+
),
|
|
1030
|
+
E.checked(s),
|
|
1031
|
+
E.disabled(a),
|
|
1032
|
+
r != null ? E.labelledby(c) : k,
|
|
1033
|
+
S.keydown(f),
|
|
1034
|
+
t != null ? S.blur(t) : k
|
|
1035
|
+
),
|
|
1036
|
+
r != null ? m.label(
|
|
1037
|
+
u.class("bc-checkbox-input__label"),
|
|
1038
|
+
u.id(c),
|
|
1039
|
+
u.for(i),
|
|
1040
|
+
mt(r)
|
|
1041
|
+
) : k
|
|
1042
|
+
)
|
|
1043
|
+
},
|
|
1044
|
+
S.click(p)
|
|
1045
|
+
);
|
|
1046
|
+
}, Ie = ({
|
|
1047
|
+
autocomplete: e,
|
|
1048
|
+
autofocus: s,
|
|
1049
|
+
class: t,
|
|
1050
|
+
disabled: n,
|
|
1051
|
+
name: r,
|
|
1052
|
+
placeholder: a,
|
|
1053
|
+
id: l,
|
|
1054
|
+
required: i,
|
|
1055
|
+
hasError: c
|
|
1056
|
+
}) => P(
|
|
1057
|
+
u.autocomplete(e),
|
|
1058
|
+
u.autofocus(s),
|
|
1059
|
+
u.class(t),
|
|
1060
|
+
u.disabled(n),
|
|
1061
|
+
u.name(r ?? l),
|
|
1062
|
+
u.placeholder(a),
|
|
1063
|
+
u.id(l),
|
|
1064
|
+
E.required(i),
|
|
1065
|
+
c != null ? E.invalid(
|
|
1066
|
+
c ?? !1
|
|
1067
|
+
) : null
|
|
1068
|
+
), bt = m.span(
|
|
1069
|
+
u.class("bc-input-wrapper__required"),
|
|
1070
|
+
" *"
|
|
1071
|
+
);
|
|
1072
|
+
function vt(e) {
|
|
1073
|
+
const s = ["bc-input-wrapper"];
|
|
1074
|
+
return e && s.push("bc-input-wrapper--horizontal"), s.join(" ");
|
|
1075
|
+
}
|
|
1076
|
+
function gt(e, s) {
|
|
1077
|
+
const t = ["bc-input-wrapper__label-text"];
|
|
1078
|
+
return e ? t.push("bc-input-wrapper__label-text--error") : s ? t.push("bc-input-wrapper__label-text--disabled") : t.push("bc-input-wrapper__label-text--default"), t.join(" ");
|
|
1079
|
+
}
|
|
1080
|
+
const Be = ({
|
|
1081
|
+
required: e,
|
|
1082
|
+
label: s,
|
|
1083
|
+
context: t,
|
|
1084
|
+
description: n,
|
|
1085
|
+
content: r,
|
|
1086
|
+
error: a,
|
|
1087
|
+
labelFor: l,
|
|
1088
|
+
hasError: i,
|
|
1089
|
+
disabled: c,
|
|
1090
|
+
horizontal: p
|
|
1091
|
+
}, ...f) => {
|
|
1092
|
+
const d = i ?? a != null, g = c ?? !1, w = p ?? !1, A = xe("input-wrapper"), b = n ? `${A}-description` : void 0, I = a != null ? `${A}-error` : void 0;
|
|
1093
|
+
return m.div(
|
|
1094
|
+
u.class(
|
|
1095
|
+
x.map(w, (D) => vt(D))
|
|
1096
|
+
),
|
|
1097
|
+
s != null || t != null ? m.div(
|
|
1098
|
+
u.class("bc-input-wrapper__header"),
|
|
1099
|
+
m.div(
|
|
1100
|
+
u.class("bc-input-wrapper__label-section"),
|
|
1101
|
+
m.label(
|
|
1102
|
+
u.class("bc-input-wrapper__label"),
|
|
1103
|
+
l != null ? u.for(l) : k,
|
|
1104
|
+
m.span(
|
|
1105
|
+
u.class(
|
|
1106
|
+
T(
|
|
1107
|
+
d,
|
|
1108
|
+
g
|
|
1109
|
+
)(
|
|
1110
|
+
(D, j) => gt(
|
|
1111
|
+
D ?? !1,
|
|
1112
|
+
j ?? !1
|
|
1113
|
+
)
|
|
1114
|
+
)
|
|
1115
|
+
),
|
|
1116
|
+
s
|
|
1117
|
+
),
|
|
1118
|
+
s != null && e ? bt : k
|
|
1119
|
+
),
|
|
1120
|
+
// Show description under label when horizontal
|
|
1121
|
+
M(
|
|
1122
|
+
T(
|
|
1123
|
+
w,
|
|
1124
|
+
n
|
|
1125
|
+
)((D, j) => D && j != null),
|
|
1126
|
+
() => m.div(
|
|
1127
|
+
u.class(
|
|
1128
|
+
"bc-input-wrapper__description bc-input-wrapper__description--under-label"
|
|
1129
|
+
),
|
|
1130
|
+
u.id(b),
|
|
1131
|
+
n
|
|
1132
|
+
)
|
|
1133
|
+
)
|
|
1134
|
+
),
|
|
1135
|
+
t != null ? ft(t) : k
|
|
1136
|
+
) : k,
|
|
1137
|
+
m.div(
|
|
1138
|
+
u.class("bc-input-wrapper__content"),
|
|
1139
|
+
// Add data attributes to help inputs inherit accessibility information
|
|
1140
|
+
[b, I].filter(Boolean).length > 0 ? ke.describedby(
|
|
1141
|
+
[b, I].filter(Boolean).join(" ")
|
|
1142
|
+
) : k,
|
|
1143
|
+
e ? ke.required("true") : k,
|
|
1144
|
+
M(d, () => ke.invalid("true")),
|
|
1145
|
+
r
|
|
1146
|
+
),
|
|
1147
|
+
// Show description at bottom only when not horizontal
|
|
1148
|
+
M(
|
|
1149
|
+
T(
|
|
1150
|
+
w,
|
|
1151
|
+
n
|
|
1152
|
+
)((D, j) => !D && j != null),
|
|
1153
|
+
() => m.div(
|
|
1154
|
+
u.class("bc-input-wrapper__description"),
|
|
1155
|
+
u.id(b),
|
|
1156
|
+
n
|
|
1157
|
+
)
|
|
1158
|
+
),
|
|
1159
|
+
a != null ? M(
|
|
1160
|
+
d,
|
|
1161
|
+
() => m.div(
|
|
1162
|
+
u.class("bc-input-wrapper__error"),
|
|
1163
|
+
u.id(I),
|
|
1164
|
+
E.live("polite"),
|
|
1165
|
+
// Announce errors to screen readers
|
|
1166
|
+
u.role("alert"),
|
|
1167
|
+
// Mark as alert for immediate attention
|
|
1168
|
+
a
|
|
1169
|
+
)
|
|
1170
|
+
) : null,
|
|
1171
|
+
...f
|
|
1172
|
+
);
|
|
1173
|
+
};
|
|
1174
|
+
function Ht(...e) {
|
|
1175
|
+
return m.div(u.class("bc-group"), ...e);
|
|
1176
|
+
}
|
|
1177
|
+
function Ut(...e) {
|
|
1178
|
+
return m.div(u.class("bc-stack"), ...e);
|
|
1179
|
+
}
|
|
1180
|
+
const Gt = (e) => {
|
|
1181
|
+
const s = {
|
|
1182
|
+
name: "email",
|
|
1183
|
+
autocomplete: "email",
|
|
1184
|
+
...e
|
|
1185
|
+
}, {
|
|
1186
|
+
value: t,
|
|
1187
|
+
before: n,
|
|
1188
|
+
onBlur: r,
|
|
1189
|
+
onChange: a,
|
|
1190
|
+
onInput: l,
|
|
1191
|
+
placeholder: i
|
|
1192
|
+
} = s, c = n ?? ae({
|
|
1193
|
+
icon: "line-md:email",
|
|
1194
|
+
size: "sm",
|
|
1195
|
+
color: "neutral"
|
|
1196
|
+
});
|
|
1197
|
+
return he(
|
|
1198
|
+
pe,
|
|
1199
|
+
(p) => ye({
|
|
1200
|
+
...e,
|
|
1201
|
+
before: c,
|
|
1202
|
+
input: Ae.email(
|
|
1203
|
+
Ie(s),
|
|
1204
|
+
u.placeholder(Se(i, p.$.emailPlaceholderText)),
|
|
1205
|
+
u.value(t),
|
|
1206
|
+
u.class("bc-input"),
|
|
1207
|
+
r != null ? S.blur(B(r)) : k,
|
|
1208
|
+
a != null ? S.change(B(a)) : k,
|
|
1209
|
+
l != null ? S.input(B(l)) : k
|
|
1210
|
+
)
|
|
1211
|
+
})
|
|
1212
|
+
);
|
|
1213
|
+
}, zt = (e) => {
|
|
1214
|
+
const { value: s, onBlur: t, onChange: n, onInput: r } = e;
|
|
1215
|
+
return ye({
|
|
1216
|
+
...e,
|
|
1217
|
+
input: Ae.text(
|
|
1218
|
+
Ie(e),
|
|
1219
|
+
u.value(s),
|
|
1220
|
+
u.class("bc-input"),
|
|
1221
|
+
t != null ? S.blur(B(t)) : k,
|
|
1222
|
+
n != null ? S.change(B(n)) : k,
|
|
1223
|
+
r != null ? S.input(B(r)) : k
|
|
1224
|
+
)
|
|
1225
|
+
});
|
|
1226
|
+
}, Wt = (e) => {
|
|
1227
|
+
const {
|
|
1228
|
+
value: s,
|
|
1229
|
+
onBlur: t,
|
|
1230
|
+
onChange: n,
|
|
1231
|
+
onInput: r,
|
|
1232
|
+
before: a,
|
|
1233
|
+
after: l,
|
|
1234
|
+
hasError: i,
|
|
1235
|
+
disabled: c,
|
|
1236
|
+
autocomplete: p,
|
|
1237
|
+
placeholder: f,
|
|
1238
|
+
...d
|
|
1239
|
+
} = e, g = {
|
|
1240
|
+
name: "password",
|
|
1241
|
+
disabled: c,
|
|
1242
|
+
...d
|
|
1243
|
+
}, w = $(!0), A = T(
|
|
1244
|
+
w,
|
|
1245
|
+
p
|
|
1246
|
+
)((b, I) => b ? I ?? "current-password" : "off");
|
|
1247
|
+
return he(pe, (b) => {
|
|
1248
|
+
const I = T(
|
|
1249
|
+
b.$.passwordPlaceholderText,
|
|
1250
|
+
w,
|
|
1251
|
+
f
|
|
1252
|
+
)((j, qe, Re) => qe ? "•••••••••••••••" : Re ?? j), D = m.button(
|
|
1253
|
+
u.class("bc-input-container__password-toggle bu-text-light-gray"),
|
|
1254
|
+
E.label(b.$.togglePasswordVisibility),
|
|
1255
|
+
S.click(() => w.update((j) => !j)),
|
|
1256
|
+
M(
|
|
1257
|
+
w,
|
|
1258
|
+
() => ae({ icon: "line-md:watch" }),
|
|
1259
|
+
() => ae({ icon: "line-md:watch-off" })
|
|
1260
|
+
)
|
|
1261
|
+
);
|
|
1262
|
+
return ye({
|
|
1263
|
+
before: a,
|
|
1264
|
+
disabled: c,
|
|
1265
|
+
hasError: i,
|
|
1266
|
+
input: m.input(
|
|
1267
|
+
Ie({
|
|
1268
|
+
...g,
|
|
1269
|
+
autocomplete: A,
|
|
1270
|
+
placeholder: I
|
|
1271
|
+
}),
|
|
1272
|
+
M(
|
|
1273
|
+
w,
|
|
1274
|
+
() => P(u.type("password")),
|
|
1275
|
+
() => P(u.type("text"))
|
|
1276
|
+
),
|
|
1277
|
+
u.class("bc-input"),
|
|
1278
|
+
u.value(s),
|
|
1279
|
+
t != null ? S.blur(B(t)) : k,
|
|
1280
|
+
n != null ? S.change(B(n)) : k,
|
|
1281
|
+
r != null ? S.input(B(r)) : k
|
|
1282
|
+
),
|
|
1283
|
+
after: l != null ? P(D, l) : D
|
|
1284
|
+
});
|
|
1285
|
+
});
|
|
1286
|
+
}, yt = (
|
|
1287
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1288
|
+
(e, s) => () => {
|
|
1289
|
+
e.markTouched(), s == null || s();
|
|
1290
|
+
}
|
|
1291
|
+
), wt = (e, s) => (t) => {
|
|
1292
|
+
e.change(t), s == null || s(t);
|
|
1293
|
+
};
|
|
1294
|
+
function je(e, s) {
|
|
1295
|
+
const { controller: t, onBlur: n, onChange: r, ...a } = s;
|
|
1296
|
+
return e({
|
|
1297
|
+
id: t.name,
|
|
1298
|
+
disabled: t.disabled,
|
|
1299
|
+
value: t.value,
|
|
1300
|
+
hasError: t.errorVisible,
|
|
1301
|
+
...a,
|
|
1302
|
+
onChange: wt(t, r),
|
|
1303
|
+
onBlur: yt(t, n)
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
function Kt(e, s, ...t) {
|
|
1307
|
+
return Be(
|
|
1308
|
+
{
|
|
1309
|
+
...s,
|
|
1310
|
+
content: je(
|
|
1311
|
+
e,
|
|
1312
|
+
s
|
|
1313
|
+
)
|
|
1314
|
+
},
|
|
1315
|
+
...t
|
|
1316
|
+
);
|
|
1317
|
+
}
|
|
1318
|
+
function kt(e, s) {
|
|
1319
|
+
const { toInput: t, fromInput: n, controller: r, ...a } = s, l = r.transform(t, n);
|
|
1320
|
+
return je(e, {
|
|
1321
|
+
...a,
|
|
1322
|
+
controller: l
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1325
|
+
function Jt(e, s, ...t) {
|
|
1326
|
+
return Be(
|
|
1327
|
+
{
|
|
1328
|
+
...s,
|
|
1329
|
+
content: kt(e, s)
|
|
1330
|
+
},
|
|
1331
|
+
...t
|
|
1332
|
+
);
|
|
1333
|
+
}
|
|
1334
|
+
function Yt(e) {
|
|
1335
|
+
return e.split(".").map((t) => {
|
|
1336
|
+
const n = t.match(/^\[(\d+)\]$/);
|
|
1337
|
+
return n ? Number(n[1]) : t;
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
function St(e) {
|
|
1341
|
+
return typeof e == "number" ? `[${e}]` : `.${e}`;
|
|
1342
|
+
}
|
|
1343
|
+
function It(e) {
|
|
1344
|
+
if (e.length === 0) return "";
|
|
1345
|
+
const [s, ...t] = e;
|
|
1346
|
+
return [
|
|
1347
|
+
typeof s == "number" ? `[${s}]` : s,
|
|
1348
|
+
...t.map(St)
|
|
1349
|
+
].join("");
|
|
1350
|
+
}
|
|
1351
|
+
function ve(e) {
|
|
1352
|
+
return function(t) {
|
|
1353
|
+
var r;
|
|
1354
|
+
if (t.type === "valid") return t;
|
|
1355
|
+
let n = t.error;
|
|
1356
|
+
for (const a of e)
|
|
1357
|
+
if (n = (r = n == null ? void 0 : n.dependencies) == null ? void 0 : r[a], n == null) return C.valid;
|
|
1358
|
+
return C.invalid(n);
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1361
|
+
var L, ie, N, K;
|
|
1362
|
+
const ge = class ge {
|
|
1363
|
+
constructor(s, t, n, r, a, l = W) {
|
|
1364
|
+
h(this, "path");
|
|
1365
|
+
h(this, "change");
|
|
1366
|
+
h(this, "value");
|
|
1367
|
+
h(this, "status");
|
|
1368
|
+
h(this, "error");
|
|
1369
|
+
h(this, "hasError");
|
|
1370
|
+
h(this, "touched");
|
|
1371
|
+
h(this, "errorVisible");
|
|
1372
|
+
h(this, "dirty");
|
|
1373
|
+
h(this, "dependencyErrors");
|
|
1374
|
+
v(this, L, {
|
|
1375
|
+
disabled: $(!1),
|
|
1376
|
+
touched: $(!1)
|
|
1377
|
+
});
|
|
1378
|
+
v(this, ie);
|
|
1379
|
+
v(this, N, $(void 0));
|
|
1380
|
+
h(this, "parent");
|
|
1381
|
+
h(this, "disabled");
|
|
1382
|
+
v(this, K, []);
|
|
1383
|
+
h(this, "disabledOrHasErrors");
|
|
1384
|
+
h(this, "onDispose", (s) => {
|
|
1385
|
+
o(this, K).push(s);
|
|
1386
|
+
});
|
|
1387
|
+
h(this, "dispose", () => {
|
|
1388
|
+
for (const s of o(this, K))
|
|
1389
|
+
try {
|
|
1390
|
+
s();
|
|
1391
|
+
} catch (t) {
|
|
1392
|
+
console.error("Error in dispose callback:", t);
|
|
1393
|
+
}
|
|
1394
|
+
o(this, K).length = 0;
|
|
1395
|
+
});
|
|
1396
|
+
h(this, "setDisabled", (s) => {
|
|
1397
|
+
o(this, L).disabled.set(s);
|
|
1398
|
+
});
|
|
1399
|
+
h(this, "disable", () => this.setDisabled(!0));
|
|
1400
|
+
h(this, "enable", () => this.setDisabled(!1));
|
|
1401
|
+
h(this, "markTouched", () => {
|
|
1402
|
+
o(this, L).touched.set(!0);
|
|
1403
|
+
});
|
|
1404
|
+
h(this, "resetTouched", () => {
|
|
1405
|
+
o(this, L).touched.set(!1);
|
|
1406
|
+
});
|
|
1407
|
+
h(this, "markPristine", () => {
|
|
1408
|
+
o(this, N).set(this.value.value);
|
|
1409
|
+
});
|
|
1410
|
+
h(this, "reset", () => {
|
|
1411
|
+
this.change(o(this, N).value);
|
|
1412
|
+
});
|
|
1413
|
+
h(this, "array", (s = W) => new _t(
|
|
1414
|
+
this.path,
|
|
1415
|
+
this.change,
|
|
1416
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1417
|
+
this.value,
|
|
1418
|
+
this.status,
|
|
1419
|
+
this.parent,
|
|
1420
|
+
s
|
|
1421
|
+
));
|
|
1422
|
+
h(this, "object", (s = W) => new Dt(
|
|
1423
|
+
this.path,
|
|
1424
|
+
this.change,
|
|
1425
|
+
this.value,
|
|
1426
|
+
this.status,
|
|
1427
|
+
this.parent,
|
|
1428
|
+
s
|
|
1429
|
+
));
|
|
1430
|
+
h(this, "transform", (s, t, n = [], r = W) => new ge(
|
|
1431
|
+
[...this.path, ...n],
|
|
1432
|
+
(a) => this.change(t(a)),
|
|
1433
|
+
this.value.map(s, r),
|
|
1434
|
+
this.status.map(ve(n)),
|
|
1435
|
+
this.parent,
|
|
1436
|
+
r
|
|
1437
|
+
));
|
|
1438
|
+
h(this, "asyncTransform", (s, t, n, r = [], a = W) => new ge(
|
|
1439
|
+
[...this.path, ...r],
|
|
1440
|
+
(l) => {
|
|
1441
|
+
t(l).then((i) => this.change(i));
|
|
1442
|
+
},
|
|
1443
|
+
this.value.mapAsync(s, n, void 0, a),
|
|
1444
|
+
this.status.map(ve(r)),
|
|
1445
|
+
this.parent,
|
|
1446
|
+
a
|
|
1447
|
+
));
|
|
1448
|
+
this.path = s, this.change = t, this.value = n, this.status = r, z(this, ie, l), o(this, N).set(n.value), this.error = r.map(
|
|
1449
|
+
(i) => {
|
|
1450
|
+
var c;
|
|
1451
|
+
return (i == null ? void 0 : i.type) === "invalid" ? (c = i.error) == null ? void 0 : c.message : void 0;
|
|
1452
|
+
}
|
|
1453
|
+
), this.hasError = this.error.map((i) => i != null), this.touched = o(this, L).touched, a.validationMode ? this.errorVisible = T(
|
|
1454
|
+
this.hasError,
|
|
1455
|
+
this.touched,
|
|
1456
|
+
a.validationMode
|
|
1457
|
+
)((i, c, p) => p === "continuous" ? !!i : !!i && !!c) : this.errorVisible = T(
|
|
1458
|
+
this.hasError,
|
|
1459
|
+
this.touched
|
|
1460
|
+
)((i, c) => !!i && !!c), this.dirty = T(
|
|
1461
|
+
this.value,
|
|
1462
|
+
o(this, N)
|
|
1463
|
+
)((i, c) => !o(this, ie).call(this, i, c)), this.dependencyErrors = r.map(
|
|
1464
|
+
(i) => {
|
|
1465
|
+
var c;
|
|
1466
|
+
return (i == null ? void 0 : i.type) === "invalid" ? (c = i.error) == null ? void 0 : c.dependencies : void 0;
|
|
1467
|
+
}
|
|
1468
|
+
), this.parent = a, this.disabled = T(
|
|
1469
|
+
o(this, L).disabled,
|
|
1470
|
+
a.disabled
|
|
1471
|
+
)((i, c) => i || c), this.disabledOrHasErrors = T(
|
|
1472
|
+
this.disabled,
|
|
1473
|
+
this.hasError
|
|
1474
|
+
)((i, c) => i || c), this.onDispose(() => {
|
|
1475
|
+
o(this, L).disabled.dispose(), o(this, L).touched.dispose(), this.disabled.dispose(), this.error.dispose(), this.errorVisible.dispose(), this.dirty.dispose(), o(this, N).dispose(), this.dependencyErrors.dispose(), this.disabledOrHasErrors.dispose();
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
get name() {
|
|
1479
|
+
return It(this.path);
|
|
1480
|
+
}
|
|
1481
|
+
};
|
|
1482
|
+
L = new WeakMap(), ie = new WeakMap(), N = new WeakMap(), K = new WeakMap();
|
|
1483
|
+
let G = ge;
|
|
1484
|
+
var O, J, Y, Z, Q, X, ee, oe, le, ce, te;
|
|
1485
|
+
class Dt extends G {
|
|
1486
|
+
constructor(t, n, r, a, l, i) {
|
|
1487
|
+
super(
|
|
1488
|
+
t,
|
|
1489
|
+
n,
|
|
1490
|
+
r.map((p) => p ?? {}, i),
|
|
1491
|
+
a,
|
|
1492
|
+
l,
|
|
1493
|
+
i
|
|
1494
|
+
);
|
|
1495
|
+
v(this, O, /* @__PURE__ */ new Map());
|
|
1496
|
+
v(this, J, /* @__PURE__ */ new Map());
|
|
1497
|
+
v(this, Y, /* @__PURE__ */ new Map());
|
|
1498
|
+
v(this, Z, $(!1));
|
|
1499
|
+
h(this, "touchedDeep", o(this, Z));
|
|
1500
|
+
v(this, Q, /* @__PURE__ */ new Map());
|
|
1501
|
+
v(this, X, /* @__PURE__ */ new Map());
|
|
1502
|
+
v(this, ee, $(!1));
|
|
1503
|
+
h(this, "dirtyDeep", o(this, ee));
|
|
1504
|
+
v(this, oe);
|
|
1505
|
+
v(this, le);
|
|
1506
|
+
v(this, ce, () => {
|
|
1507
|
+
let t = !1;
|
|
1508
|
+
for (const n of o(this, J).values())
|
|
1509
|
+
if (n) {
|
|
1510
|
+
t = !0;
|
|
1511
|
+
break;
|
|
1512
|
+
}
|
|
1513
|
+
o(this, Z).set(this.touched.value || t);
|
|
1514
|
+
});
|
|
1515
|
+
h(this, "field", (t) => {
|
|
1516
|
+
if (o(this, O).has(t))
|
|
1517
|
+
return o(this, O).get(t);
|
|
1518
|
+
const n = async (i) => {
|
|
1519
|
+
this.change({
|
|
1520
|
+
...this.value.value,
|
|
1521
|
+
[t]: i
|
|
1522
|
+
});
|
|
1523
|
+
}, r = new G(
|
|
1524
|
+
[...this.path, t],
|
|
1525
|
+
n,
|
|
1526
|
+
this.value.map((i) => i[t]),
|
|
1527
|
+
this.status.map(ve([t])),
|
|
1528
|
+
{
|
|
1529
|
+
disabled: this.disabled,
|
|
1530
|
+
// propagate validationMode to children if present
|
|
1531
|
+
validationMode: this.parent.validationMode
|
|
1532
|
+
}
|
|
1533
|
+
);
|
|
1534
|
+
o(this, O).set(t, r);
|
|
1535
|
+
const a = r.touched.on((i) => {
|
|
1536
|
+
o(this, J).set(t, i), o(this, ce).call(this);
|
|
1537
|
+
});
|
|
1538
|
+
o(this, Y).set(t, a);
|
|
1539
|
+
const l = r.dirty.on((i) => {
|
|
1540
|
+
o(this, Q).set(t, i), o(this, te).call(this);
|
|
1541
|
+
});
|
|
1542
|
+
return o(this, X).set(t, l), r;
|
|
1543
|
+
});
|
|
1544
|
+
h(this, "markAllTouched", () => {
|
|
1545
|
+
this.markTouched();
|
|
1546
|
+
const t = this.value.value;
|
|
1547
|
+
for (const n of Object.keys(t))
|
|
1548
|
+
this.field(n).markTouched();
|
|
1549
|
+
for (const n of o(this, O).values())
|
|
1550
|
+
n.markTouched();
|
|
1551
|
+
});
|
|
1552
|
+
h(this, "markAllPristine", () => {
|
|
1553
|
+
var n, r, a;
|
|
1554
|
+
this.markPristine();
|
|
1555
|
+
const t = this.value.value;
|
|
1556
|
+
for (const l of Object.keys(t))
|
|
1557
|
+
(r = (n = this.field(l)).markPristine) == null || r.call(n);
|
|
1558
|
+
for (const l of o(this, O).values())
|
|
1559
|
+
(a = l.markPristine) == null || a.call(l);
|
|
1560
|
+
});
|
|
1561
|
+
v(this, te, () => {
|
|
1562
|
+
let t = !1;
|
|
1563
|
+
for (const n of o(this, Q).values())
|
|
1564
|
+
if (n) {
|
|
1565
|
+
t = !0;
|
|
1566
|
+
break;
|
|
1567
|
+
}
|
|
1568
|
+
o(this, ee).set(this.dirty.value || t);
|
|
1569
|
+
});
|
|
1570
|
+
z(this, oe, this.touched.on(() => {
|
|
1571
|
+
o(this, ce).call(this);
|
|
1572
|
+
})), z(this, le, this.dirty.on(() => {
|
|
1573
|
+
o(this, te).call(this);
|
|
1574
|
+
}));
|
|
1575
|
+
const c = this.value.on(() => o(this, te).call(this));
|
|
1576
|
+
this.onDispose(() => {
|
|
1577
|
+
for (const p of o(this, O).values())
|
|
1578
|
+
p.dispose();
|
|
1579
|
+
o(this, O).clear();
|
|
1580
|
+
for (const p of o(this, Y).values()) p();
|
|
1581
|
+
o(this, Y).clear(), o(this, J).clear(), o(this, Z).dispose();
|
|
1582
|
+
for (const p of o(this, X).values()) p();
|
|
1583
|
+
o(this, X).clear(), o(this, Q).clear(), o(this, ee).dispose(), o(this, oe).call(this), o(this, le).call(this), c();
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
O = new WeakMap(), J = new WeakMap(), Y = new WeakMap(), Z = new WeakMap(), Q = new WeakMap(), X = new WeakMap(), ee = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), te = new WeakMap();
|
|
1588
|
+
var V, R, F, se, H, q, ne, ue, de, re, U;
|
|
1589
|
+
class _t extends G {
|
|
1590
|
+
constructor(t, n, r, a, l, i) {
|
|
1591
|
+
const c = r.map((d) => d ?? [], i);
|
|
1592
|
+
super(t, n, c, a, l, i);
|
|
1593
|
+
v(this, V, new Array());
|
|
1594
|
+
h(this, "length");
|
|
1595
|
+
v(this, R, /* @__PURE__ */ new Map());
|
|
1596
|
+
v(this, F, /* @__PURE__ */ new Map());
|
|
1597
|
+
v(this, se, $(!1));
|
|
1598
|
+
h(this, "touchedDeep", o(this, se));
|
|
1599
|
+
v(this, H, /* @__PURE__ */ new Map());
|
|
1600
|
+
v(this, q, /* @__PURE__ */ new Map());
|
|
1601
|
+
v(this, ne, $(!1));
|
|
1602
|
+
h(this, "dirtyDeep", o(this, ne));
|
|
1603
|
+
v(this, ue);
|
|
1604
|
+
v(this, de);
|
|
1605
|
+
v(this, re, () => {
|
|
1606
|
+
let t = !1;
|
|
1607
|
+
for (const n of o(this, R).values())
|
|
1608
|
+
if (n) {
|
|
1609
|
+
t = !0;
|
|
1610
|
+
break;
|
|
1611
|
+
}
|
|
1612
|
+
o(this, se).set(this.touched.value || t);
|
|
1613
|
+
});
|
|
1614
|
+
h(this, "item", (t) => {
|
|
1615
|
+
if (o(this, V)[t])
|
|
1616
|
+
return o(this, V)[t];
|
|
1617
|
+
const n = async (i) => {
|
|
1618
|
+
const c = this.value.value.slice();
|
|
1619
|
+
c[t] = i, this.change(c);
|
|
1620
|
+
}, r = new G(
|
|
1621
|
+
[...this.path, t],
|
|
1622
|
+
n,
|
|
1623
|
+
this.value.map((i) => i[t]),
|
|
1624
|
+
this.status.map(ve([t])),
|
|
1625
|
+
{
|
|
1626
|
+
disabled: this.disabled,
|
|
1627
|
+
validationMode: this.parent.validationMode
|
|
1628
|
+
}
|
|
1629
|
+
);
|
|
1630
|
+
o(this, V)[t] = r;
|
|
1631
|
+
const a = r.touched.on((i) => {
|
|
1632
|
+
o(this, R).set(t, i), o(this, re).call(this);
|
|
1633
|
+
});
|
|
1634
|
+
o(this, F).set(t, a);
|
|
1635
|
+
const l = r.dirty.on((i) => {
|
|
1636
|
+
o(this, H).set(t, i), o(this, U).call(this);
|
|
1637
|
+
});
|
|
1638
|
+
return o(this, q).set(t, l), r;
|
|
1639
|
+
});
|
|
1640
|
+
h(this, "push", (...t) => {
|
|
1641
|
+
this.change([...this.value.value, ...t]);
|
|
1642
|
+
});
|
|
1643
|
+
h(this, "pop", () => {
|
|
1644
|
+
this.splice(this.value.value.length - 1, 1);
|
|
1645
|
+
});
|
|
1646
|
+
h(this, "shift", () => {
|
|
1647
|
+
this.splice(0, 1);
|
|
1648
|
+
});
|
|
1649
|
+
h(this, "unshift", (...t) => {
|
|
1650
|
+
this.change([...t, ...this.value.value]);
|
|
1651
|
+
});
|
|
1652
|
+
h(this, "removeAt", (t) => {
|
|
1653
|
+
this.splice(t, 1);
|
|
1654
|
+
});
|
|
1655
|
+
h(this, "splice", (t, n) => {
|
|
1656
|
+
const r = this.value.value.slice();
|
|
1657
|
+
r.splice(t, n), this.change(r);
|
|
1658
|
+
});
|
|
1659
|
+
h(this, "move", (t, n, r = 1) => {
|
|
1660
|
+
if (r < 1 || t === n) return;
|
|
1661
|
+
const a = this.value.value.slice(), l = a.splice(t, r);
|
|
1662
|
+
a.splice(n, 0, ...l), this.change(a);
|
|
1663
|
+
});
|
|
1664
|
+
h(this, "markAllTouched", () => {
|
|
1665
|
+
this.markTouched();
|
|
1666
|
+
const t = this.value.value.length;
|
|
1667
|
+
for (let n = 0; n < t; n++)
|
|
1668
|
+
this.item(n).markTouched();
|
|
1669
|
+
});
|
|
1670
|
+
h(this, "markAllPristine", () => {
|
|
1671
|
+
var n, r;
|
|
1672
|
+
this.markPristine();
|
|
1673
|
+
const t = this.value.value.length;
|
|
1674
|
+
for (let a = 0; a < t; a++)
|
|
1675
|
+
(r = (n = this.item(a)).markPristine) == null || r.call(n);
|
|
1676
|
+
});
|
|
1677
|
+
v(this, U, () => {
|
|
1678
|
+
let t = !1;
|
|
1679
|
+
for (const n of o(this, H).values())
|
|
1680
|
+
if (n) {
|
|
1681
|
+
t = !0;
|
|
1682
|
+
break;
|
|
1683
|
+
}
|
|
1684
|
+
o(this, ne).set(this.dirty.value || t);
|
|
1685
|
+
});
|
|
1686
|
+
const p = c.on((d) => {
|
|
1687
|
+
const g = o(this, V).length - d.length;
|
|
1688
|
+
g > 0 && (o(this, V).splice(d.length, g).forEach((w, A) => {
|
|
1689
|
+
const b = d.length + A;
|
|
1690
|
+
w.dispose();
|
|
1691
|
+
const I = o(this, F).get(b);
|
|
1692
|
+
I == null || I(), o(this, F).delete(b), o(this, R).delete(b);
|
|
1693
|
+
const D = o(this, q).get(b);
|
|
1694
|
+
D == null || D(), o(this, q).delete(b), o(this, H).delete(b);
|
|
1695
|
+
}), o(this, re).call(this), o(this, U).call(this));
|
|
1696
|
+
});
|
|
1697
|
+
this.length = c.map((d) => d.length), z(this, ue, this.touched.on(() => {
|
|
1698
|
+
o(this, re).call(this);
|
|
1699
|
+
})), z(this, de, this.dirty.on(() => {
|
|
1700
|
+
o(this, U).call(this);
|
|
1701
|
+
}));
|
|
1702
|
+
const f = this.value.on(() => o(this, U).call(this));
|
|
1703
|
+
this.onDispose(() => {
|
|
1704
|
+
for (const d of o(this, V))
|
|
1705
|
+
d.dispose();
|
|
1706
|
+
this.length.dispose(), o(this, V).length = 0, p(), c.dispose();
|
|
1707
|
+
for (const d of o(this, F).values()) d();
|
|
1708
|
+
o(this, F).clear(), o(this, R).clear(), o(this, se).dispose();
|
|
1709
|
+
for (const d of o(this, q).values()) d();
|
|
1710
|
+
o(this, q).clear(), o(this, H).clear(), o(this, ne).dispose(), o(this, ue).call(this), o(this, de).call(this), f();
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
V = new WeakMap(), R = new WeakMap(), F = new WeakMap(), se = new WeakMap(), H = new WeakMap(), q = new WeakMap(), ne = new WeakMap(), ue = new WeakMap(), de = new WeakMap(), re = new WeakMap(), U = new WeakMap();
|
|
1715
|
+
function Et(e) {
|
|
1716
|
+
function s(t) {
|
|
1717
|
+
return typeof t == "number" ? t : t.toString();
|
|
1718
|
+
}
|
|
1719
|
+
return e.map(
|
|
1720
|
+
(t) => typeof t == "object" && t.key != null ? s(t.key) : s(t)
|
|
1721
|
+
);
|
|
1722
|
+
}
|
|
1723
|
+
function Tt(e) {
|
|
1724
|
+
const s = e.filter((r) => r.path == null || r.path.length === 0).map((r) => r.message), t = e.filter((r) => r.path != null && r.path.length > 0).reduce((r, a) => {
|
|
1725
|
+
const l = Et(a.path), i = l.pop();
|
|
1726
|
+
let c = r;
|
|
1727
|
+
for (const p of l)
|
|
1728
|
+
c.dependencies == null && (c.dependencies = {}), c.dependencies[p] == null && (c.dependencies[p] = {}), c = c.dependencies[p];
|
|
1729
|
+
return c.dependencies == null && (c.dependencies = {}), c.dependencies[i] = { message: a.message }, r;
|
|
1730
|
+
}, {}), n = s.join(`
|
|
1731
|
+
`);
|
|
1732
|
+
return {
|
|
1733
|
+
...t,
|
|
1734
|
+
message: n != "" ? n : void 0
|
|
1735
|
+
};
|
|
1736
|
+
}
|
|
1737
|
+
function Ct({
|
|
1738
|
+
initialValue: e,
|
|
1739
|
+
onChange: s,
|
|
1740
|
+
validate: t,
|
|
1741
|
+
equals: n,
|
|
1742
|
+
validationMode: r,
|
|
1743
|
+
validateDebounceMs: a
|
|
1744
|
+
}) {
|
|
1745
|
+
const l = x.deriveProp(e), i = $(C.valid), c = $(!1), p = $(r ?? "touchedOrSubmit"), f = (b) => {
|
|
1746
|
+
i.set(b);
|
|
1747
|
+
};
|
|
1748
|
+
let d;
|
|
1749
|
+
const g = async (b) => {
|
|
1750
|
+
if (t != null) {
|
|
1751
|
+
const I = await t(b);
|
|
1752
|
+
f(I);
|
|
1753
|
+
}
|
|
1754
|
+
}, w = async (b) => {
|
|
1755
|
+
l.set(b), s == null || s(b);
|
|
1756
|
+
const I = p.value;
|
|
1757
|
+
if (t != null) {
|
|
1758
|
+
if (I === "onSubmit")
|
|
1759
|
+
return;
|
|
1760
|
+
const D = a ?? 0;
|
|
1761
|
+
D > 0 ? (d && clearTimeout(d), d = setTimeout(() => {
|
|
1762
|
+
g(b);
|
|
1763
|
+
}, D)) : await g(b);
|
|
1764
|
+
}
|
|
1765
|
+
}, A = new G(
|
|
1766
|
+
[],
|
|
1767
|
+
w,
|
|
1768
|
+
l,
|
|
1769
|
+
i,
|
|
1770
|
+
{
|
|
1771
|
+
disabled: c,
|
|
1772
|
+
validationMode: p
|
|
1773
|
+
},
|
|
1774
|
+
n ?? W
|
|
1775
|
+
);
|
|
1776
|
+
return A.onDispose(() => {
|
|
1777
|
+
c.dispose(), l.dispose(), i.dispose(), p.dispose(), d && clearTimeout(d);
|
|
1778
|
+
}), { controller: A, setStatus: f };
|
|
1779
|
+
}
|
|
1780
|
+
function Ne(e) {
|
|
1781
|
+
return P(u.disabled(e.disabled), u.name(e.name));
|
|
1782
|
+
}
|
|
1783
|
+
function Zt(e, {
|
|
1784
|
+
triggerOn: s = "change"
|
|
1785
|
+
} = {}) {
|
|
1786
|
+
return P(
|
|
1787
|
+
Ne(e),
|
|
1788
|
+
u.value(e.value),
|
|
1789
|
+
(s === "input" ? S.input : S.change)(B(e.change))
|
|
1790
|
+
);
|
|
1791
|
+
}
|
|
1792
|
+
function Qt(e, {
|
|
1793
|
+
triggerOn: s = "change"
|
|
1794
|
+
} = {}) {
|
|
1795
|
+
return P(
|
|
1796
|
+
Ne(e),
|
|
1797
|
+
u.valueAsNumber(e.value),
|
|
1798
|
+
(s === "input" ? S.input : S.change)(
|
|
1799
|
+
ze(e.change)
|
|
1800
|
+
)
|
|
1801
|
+
);
|
|
1802
|
+
}
|
|
1803
|
+
function $e(e) {
|
|
1804
|
+
return e.issues != null ? C.invalid(Tt(e.issues)) : C.valid;
|
|
1805
|
+
}
|
|
1806
|
+
async function Xt({
|
|
1807
|
+
task: e,
|
|
1808
|
+
errorMessage: s,
|
|
1809
|
+
errorPath: t = ["root"],
|
|
1810
|
+
validation: n
|
|
1811
|
+
}) {
|
|
1812
|
+
try {
|
|
1813
|
+
const r = await e();
|
|
1814
|
+
return n != null ? n(r) : C.valid;
|
|
1815
|
+
} catch (r) {
|
|
1816
|
+
const a = s ?? (r instanceof Error ? r.message : "Operation failed");
|
|
1817
|
+
return t.length === 1 && t[0] === "root" ? C.invalid({
|
|
1818
|
+
message: a
|
|
1819
|
+
}) : C.invalid({
|
|
1820
|
+
dependencies: Fe(t, a)
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
function Fe(e, s) {
|
|
1825
|
+
if (e.length === 1)
|
|
1826
|
+
return {
|
|
1827
|
+
[e[0]]: { message: s }
|
|
1828
|
+
};
|
|
1829
|
+
const [t, ...n] = e;
|
|
1830
|
+
return {
|
|
1831
|
+
[t]: {
|
|
1832
|
+
dependencies: Fe(n, s)
|
|
1833
|
+
}
|
|
1834
|
+
};
|
|
1835
|
+
}
|
|
1836
|
+
function es({
|
|
1837
|
+
initialValue: e = {},
|
|
1838
|
+
schema: s,
|
|
1839
|
+
submit: t = async () => C.valid,
|
|
1840
|
+
validationMode: n,
|
|
1841
|
+
validateDebounceMs: r
|
|
1842
|
+
}) {
|
|
1843
|
+
const { controller: a, setStatus: l } = Ct({
|
|
1844
|
+
initialValue: e,
|
|
1845
|
+
validationMode: n ?? "touchedOrSubmit",
|
|
1846
|
+
validateDebounceMs: r,
|
|
1847
|
+
validate: (n ?? "touchedOrSubmit") === "onSubmit" ? void 0 : async (f) => $e(
|
|
1848
|
+
await s["~standard"].validate(f)
|
|
1849
|
+
)
|
|
1850
|
+
}), i = $(!1), c = a.object();
|
|
1851
|
+
return c.onDispose(i.dispose), {
|
|
1852
|
+
controller: c,
|
|
1853
|
+
setStatus: l,
|
|
1854
|
+
onSubmit: async (f) => {
|
|
1855
|
+
if (i.set(!0), f.preventDefault(), c.markAllTouched(), (n ?? "touchedOrSubmit") === "onSubmit") {
|
|
1856
|
+
const g = c.value.value, w = $e(
|
|
1857
|
+
await s["~standard"].validate(g)
|
|
1858
|
+
);
|
|
1859
|
+
if (l(w), w.type === "invalid") {
|
|
1860
|
+
i.set(!1);
|
|
1861
|
+
return;
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
const d = await t(c.value.value);
|
|
1865
|
+
i.set(!1), d.type === "invalid" && l(d);
|
|
1866
|
+
},
|
|
1867
|
+
submitting: i
|
|
1868
|
+
};
|
|
1869
|
+
}
|
|
1870
|
+
function $t(e) {
|
|
1871
|
+
const s = e.split("-"), t = [e];
|
|
1872
|
+
return s.length > 1 && t.push(s[0]), t;
|
|
1873
|
+
}
|
|
1874
|
+
function Mt({
|
|
1875
|
+
locale: e,
|
|
1876
|
+
defaultLocale: s = "en-US",
|
|
1877
|
+
defaultMessages: t,
|
|
1878
|
+
localeLoader: n
|
|
1879
|
+
}) {
|
|
1880
|
+
const r = $(s), a = $(t), l = e.on(async (i) => {
|
|
1881
|
+
if (i === r.value) return;
|
|
1882
|
+
r.set(i);
|
|
1883
|
+
const c = $t(i);
|
|
1884
|
+
for (const p of c)
|
|
1885
|
+
try {
|
|
1886
|
+
const f = await n(p);
|
|
1887
|
+
if (
|
|
1888
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1889
|
+
typeof f.default == "object" && Object.keys(f).length === 1
|
|
1890
|
+
) {
|
|
1891
|
+
console.error(
|
|
1892
|
+
"It appears that you are trying to load a translation module without referencing the default export. Please use `(await import(...)).default` in your loader function."
|
|
1893
|
+
);
|
|
1894
|
+
return;
|
|
1895
|
+
}
|
|
1896
|
+
if (i === r.value) {
|
|
1897
|
+
a.set(f);
|
|
1898
|
+
return;
|
|
1899
|
+
}
|
|
1900
|
+
} catch {
|
|
1901
|
+
continue;
|
|
1902
|
+
}
|
|
1903
|
+
console.warn(`No locale found for "'${e}", using fallback`), i === r.value && a.set(t);
|
|
1904
|
+
});
|
|
1905
|
+
return {
|
|
1906
|
+
/** Clean up all resources and event listeners */
|
|
1907
|
+
dispose: () => {
|
|
1908
|
+
l(), r.dispose(), a.dispose();
|
|
1909
|
+
},
|
|
1910
|
+
/** Translation functions that return reactive signals */
|
|
1911
|
+
t: a
|
|
1912
|
+
};
|
|
1913
|
+
}
|
|
1914
|
+
function Pt({
|
|
1915
|
+
defaultLocale: e,
|
|
1916
|
+
defaultMessages: s,
|
|
1917
|
+
localeLoader: t,
|
|
1918
|
+
providerName: n = "I18nProvider"
|
|
1919
|
+
}) {
|
|
1920
|
+
return {
|
|
1921
|
+
mark: Me(n),
|
|
1922
|
+
create: (r, a) => {
|
|
1923
|
+
const {
|
|
1924
|
+
value: { locale: l }
|
|
1925
|
+
} = a.getProvider(nt.mark), { t: i, dispose: c } = Mt({
|
|
1926
|
+
locale: l,
|
|
1927
|
+
defaultMessages: s,
|
|
1928
|
+
defaultLocale: e,
|
|
1929
|
+
localeLoader: t
|
|
1930
|
+
});
|
|
1931
|
+
return {
|
|
1932
|
+
value: i,
|
|
1933
|
+
dispose: c
|
|
1934
|
+
};
|
|
1935
|
+
}
|
|
1936
|
+
};
|
|
1937
|
+
}
|
|
1938
|
+
const pe = Pt({
|
|
1939
|
+
defaultLocale: Qe,
|
|
1940
|
+
defaultMessages: Ze,
|
|
1941
|
+
localeLoader: async (e) => (await Xe(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-VA2yE-1i.js"), "./locales/de.ts": () => import("./de-C14QN5V1.js"), "./locales/en.ts": () => Promise.resolve().then(() => Ye), "./locales/es.ts": () => import("./es-B5GqMkMg.js"), "./locales/fa.ts": () => import("./fa-BxlrmcQK.js"), "./locales/fr.ts": () => import("./fr-BzFxzocR.js"), "./locales/he.ts": () => import("./he-DjHXtt_S.js"), "./locales/hi.ts": () => import("./hi-Xlc0IeoY.js"), "./locales/it.ts": () => import("./it-CR0FAQEB.js"), "./locales/ja.ts": () => import("./ja-WICb5O3K.js"), "./locales/ko.ts": () => import("./ko-30evSGGW.js"), "./locales/nl.ts": () => import("./nl-DaCzsF01.js"), "./locales/pl.ts": () => import("./pl-DlMR1sq8.js"), "./locales/pt.ts": () => import("./pt-lX3h34iM.js"), "./locales/ru.ts": () => import("./ru-2aVFFaQ-.js"), "./locales/tr.ts": () => import("./tr-DgRS_mcj.js"), "./locales/ur.ts": () => import("./ur-fgmvVBHY.js"), "./locales/vi.ts": () => import("./vi-DZzB43iu.js"), "./locales/zh.ts": () => import("./zh-Bcz-uyJp.js") }), `./locales/${e}.ts`, 3)).default,
|
|
1942
|
+
providerName: "BeatUII18n"
|
|
1943
|
+
});
|
|
1944
|
+
export {
|
|
1945
|
+
Mt as $,
|
|
1946
|
+
St as A,
|
|
1947
|
+
pe as B,
|
|
1948
|
+
Nt as C,
|
|
1949
|
+
It as D,
|
|
1950
|
+
Gt as E,
|
|
1951
|
+
Dt as F,
|
|
1952
|
+
Ht as G,
|
|
1953
|
+
_t as H,
|
|
1954
|
+
ae as I,
|
|
1955
|
+
Et as J,
|
|
1956
|
+
Tt as K,
|
|
1957
|
+
ft as L,
|
|
1958
|
+
Jt as M,
|
|
1959
|
+
Ct as N,
|
|
1960
|
+
W as O,
|
|
1961
|
+
Wt as P,
|
|
1962
|
+
Ne as Q,
|
|
1963
|
+
bt as R,
|
|
1964
|
+
Ut as S,
|
|
1965
|
+
zt as T,
|
|
1966
|
+
Zt as U,
|
|
1967
|
+
Qt as V,
|
|
1968
|
+
$e as W,
|
|
1969
|
+
Ft as X,
|
|
1970
|
+
mt as Y,
|
|
1971
|
+
qt as Z,
|
|
1972
|
+
Xe as _,
|
|
1973
|
+
ht as a,
|
|
1974
|
+
Oe as a0,
|
|
1975
|
+
tt as a1,
|
|
1976
|
+
Ot as a2,
|
|
1977
|
+
Vt as a3,
|
|
1978
|
+
Bt as a4,
|
|
1979
|
+
st as a5,
|
|
1980
|
+
jt as a6,
|
|
1981
|
+
C as b,
|
|
1982
|
+
Rt as c,
|
|
1983
|
+
Kt as d,
|
|
1984
|
+
ye as e,
|
|
1985
|
+
Te as f,
|
|
1986
|
+
Ie as g,
|
|
1987
|
+
yt as h,
|
|
1988
|
+
wt as i,
|
|
1989
|
+
Be as j,
|
|
1990
|
+
Ze as k,
|
|
1991
|
+
nt as l,
|
|
1992
|
+
Pt as m,
|
|
1993
|
+
G as n,
|
|
1994
|
+
ve as o,
|
|
1995
|
+
je as p,
|
|
1996
|
+
dt as q,
|
|
1997
|
+
Qe as r,
|
|
1998
|
+
xe as s,
|
|
1999
|
+
Xt as t,
|
|
2000
|
+
es as u,
|
|
2001
|
+
Ve as v,
|
|
2002
|
+
it as w,
|
|
2003
|
+
ot as x,
|
|
2004
|
+
kt as y,
|
|
2005
|
+
Yt as z
|
|
2006
|
+
};
|