@txgw/payout-components 1.0.0 → 1.0.2
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/dist/{AMIS-D9TLFIT7.js → AMIS-BpATHKnv.js} +1 -1
- package/dist/Action-B0KUcn27.js +1 -0
- package/dist/{Action-D_mwIN-5.js → Action-CzJ_r33l.js} +1 -1
- package/dist/{Alert-UVAjNb7s.js → Alert-DwWdKr12.js} +1 -1
- package/dist/{AnchorNav-BjgLgX6m.js → AnchorNav-DRGjEF5J.js} +1 -1
- package/dist/{App-ncbuqXE2.js → App-DxKgyXV1.js} +1 -1
- package/dist/{Audio-B3lYr3U2.js → Audio-BoaWMJHA.js} +1 -1
- package/dist/{Avatar-XqOgD9ui.js → Avatar-B2lZKPPh.js} +1 -1
- package/dist/{BarCode-Cg3O5s_0.js → BarCode-BnchzdIg.js} +1 -1
- package/dist/{BarCode-B_ISp_TQ.js → BarCode-dEGhm4u6.js} +1 -1
- package/dist/{Breadcrumb-CTA88DWN.js → Breadcrumb-BHzIF2Vg.js} +1 -1
- package/dist/ButtonGroup-BMvNPoKc.js +1 -0
- package/dist/ButtonGroupSelect-BmQIuhWU.js +1 -0
- package/dist/{ButtonGroupSelect-C_qcxdHQ.js → ButtonGroupSelect-CfNu0OBj.js} +1 -1
- package/dist/{ButtonToolbar-CUNT7FK4.js → ButtonToolbar-CYZ0LWsz.js} +1 -1
- package/dist/{CRUD-DRudIc-q.js → CRUD-BDeg8xZI.js} +1 -1
- package/dist/{CRUD2-CYGF0EMp.js → CRUD2-DrE-2JU3.js} +1 -1
- package/dist/{Calendar-BW4diX9T.js → Calendar-DkEUJJQW.js} +1 -1
- package/dist/Card-BVUWwkgm.js +1 -0
- package/dist/{Card-C4m8b89W.js → Card-IZbcizfw.js} +1 -1
- package/dist/{Card2-BXG0mDni.js → Card2-Dyl0FIVL.js} +1 -1
- package/dist/{Cards-ak9W7Ggn.js → Cards-DlMpwNSr.js} +1 -1
- package/dist/{Carousel-CxCXr052.js → Carousel-CXMYZL8H.js} +1 -1
- package/dist/{ChainedSelect-BcWT4XqI.js → ChainedSelect-BQK0j-pA.js} +1 -1
- package/dist/{Chart-BxLGXl9u.js → Chart-uJ8v1OSG.js} +1 -1
- package/dist/{ChartRadios-DstdFZq_.js → ChartRadios-C9Ov2SCd.js} +1 -1
- package/dist/Checkbox-DAq7LXTe.js +1 -0
- package/dist/{Checkbox-C4MOpWIk.js → Checkbox-DbHhD7iK.js} +1 -1
- package/dist/{Checkboxes-DaAz8fEe.js → Checkboxes-wud_gmq3.js} +1 -1
- package/dist/{Code-C7wxKt-Z.js → Code-VjDT2QOS.js} +1 -1
- package/dist/Collapse-CRIu-D5O.js +1 -0
- package/dist/{Collapse-B7DWMzHM.js → Collapse-CknZKNKz.js} +1 -1
- package/dist/{CollapseGroup-C5HPq_8j.js → CollapseGroup-DkMS5MXZ.js} +1 -1
- package/dist/{Color-BpoN5ndM.js → Color-CZV84qNC.js} +1 -1
- package/dist/{ColorPicker-B-eyCI0N.js → ColorPicker-R5D1ZNwb.js} +1 -1
- package/dist/{ColumnToggler-BCOanQf7.js → ColumnToggler-BxHry8EL.js} +1 -1
- package/dist/{ColumnToggler-BNmJdTb9.js → ColumnToggler-D98cb4XS.js} +1 -1
- package/dist/{Combo-DVBtMl-s.js → Combo-BUD7tb8b.js} +1 -1
- package/dist/{ConditionBuilder-bQtsEBIu.js → ConditionBuilder-DFF8QBcW.js} +1 -1
- package/dist/{Container-BCEndXiL.js → Container-f-JHe2WE.js} +1 -1
- package/dist/{Control-DBSbZmLZ.js → Control-dOQnC26j.js} +1 -1
- package/dist/{Custom-CVj3O57n.js → Custom-CqKL8xv_.js} +1 -1
- package/dist/{Date-CuBE2XD8.js → Date-BcRD4sv_.js} +1 -1
- package/dist/{DateRange-Bd9o9Fl_.js → DateRange-BkGu5vJl.js} +1 -1
- package/dist/{Dialog-DzlFCRtq.js → Dialog-CQSNeqgY.js} +1 -1
- package/dist/{DiffEditor-Cccg35Ly.js → DiffEditor-DU9deT5c.js} +1 -1
- package/dist/{Divider-gy0IUviz.js → Divider-CYwXWwc5.js} +1 -1
- package/dist/{Drawer-C37JbURK.js → Drawer-DmUqxMKd.js} +1 -1
- package/dist/{DropDownButton-DO4hK0Kp.js → DropDownButton-C0e2mksC.js} +1 -1
- package/dist/{Each-BfbwJEMb.js → Each-Bnhdfx44.js} +1 -1
- package/dist/FieldSet-BRfWbiPG.js +1 -0
- package/dist/{FieldSet-D3WMli0B.js → FieldSet-f-m_bp4h.js} +1 -1
- package/dist/{Flex-CXooKsRI.js → Flex-C0c49ZMP.js} +1 -1
- package/dist/{Formula-KUisLb0j.js → Formula-C82aVdAD.js} +1 -1
- package/dist/{Grid2D-6cCqZG6j.js → Grid2D-BJPrAz8w.js} +1 -1
- package/dist/{GridNav-Bvueqq-Q.js → GridNav-DCCBgvz1.js} +1 -1
- package/dist/{Group-EswEogaf.js → Group-D_2Fn4zB.js} +1 -1
- package/dist/{HBox-DyS1JJHh.js → HBox-CG3Ad5us.js} +1 -1
- package/dist/HBox-CRrACS8I.js +1 -0
- package/dist/{Hidden-DwrGEKjM.js → Hidden-SaNCTMlZ.js} +1 -1
- package/dist/{IFrame-BT4_03AI.js → IFrame-2LIicqpq.js} +1 -1
- package/dist/{Icon-BNP1oNtQ.js → Icon-3_vNko-P.js} +1 -1
- package/dist/{IconPicker-CIL2Wob5.js → IconPicker-DAMClR_z.js} +1 -1
- package/dist/{IconSelect-D1CPpZAU.js → IconSelect-CHM0oHqd.js} +1 -1
- package/dist/{IconSelectStore-BM_zyU2d.js → IconSelectStore-MNwivoh-.js} +1 -1
- package/dist/Image-Br7JbiAF.js +1 -0
- package/dist/{Image--xtRdgd5.js → Image-hHgZkb5C.js} +1 -1
- package/dist/{Images-zPCUHCyK.js → Images-ZGJfaN-q.js} +1 -1
- package/dist/{InputArray-BnERrQT7.js → InputArray-D3y772RO.js} +1 -1
- package/dist/{InputCity-Bidd_z8i.js → InputCity-CF6mEwuH.js} +1 -1
- package/dist/{InputColor-D0Kf9p1Q.js → InputColor-CYmzXu5I.js} +1 -1
- package/dist/{InputDate-CzCxGUx_.js → InputDate-BldJd84x.js} +1 -1
- package/dist/{InputDateRange-Bp3owFpS.js → InputDateRange-KzSlI2fv.js} +1 -1
- package/dist/{InputExcel-DUdIptAN.js → InputExcel-CJZWvZFT.js} +1 -1
- package/dist/{InputFile-DquJWe_S.js → InputFile-C0FUNeFM.js} +1 -1
- package/dist/InputFile-DFjvYmV3.js +1 -0
- package/dist/{InputFormula-Cu3Oc5xq.js → InputFormula-BKxq41uR.js} +1 -1
- package/dist/{InputGroup-RqgoJFcl.js → InputGroup-wvaymJ-V.js} +1 -1
- package/dist/InputImage-CLuXGhoy.js +1 -0
- package/dist/{InputImage-CdVzSsuR.js → InputImage-DasZBpb-.js} +1 -1
- package/dist/{InputMonthRange-BTR1bISz.js → InputMonthRange-DVRnBZ4I.js} +1 -1
- package/dist/{InputNumber-C0rip8fu.js → InputNumber-BjzsM73z.js} +1 -1
- package/dist/{InputQuarterRange-D1X-Z2tN.js → InputQuarterRange-DQuiFCOb.js} +1 -1
- package/dist/{InputRange-Dq-ePI8S.js → InputRange-C97bKrW6.js} +1 -1
- package/dist/{InputRating-_KtpPZno.js → InputRating-CpFNTZKA.js} +1 -1
- package/dist/{InputRepeat-D3Drjx3I.js → InputRepeat-CN2KxX7g.js} +1 -1
- package/dist/InputRichText-BXjRSQFh.js +1 -0
- package/dist/{InputRichText-CyfWV74o.js → InputRichText-DdyJFH82.js} +1 -1
- package/dist/{InputSignature-CXV7thvH.js → InputSignature-CsxuK757.js} +1 -1
- package/dist/{InputSubForm-CQuaHTe3.js → InputSubForm-Ddweo6dR.js} +1 -1
- package/dist/{InputTable-CJ4Dl3xA.js → InputTable-Bt8U_tyA.js} +1 -1
- package/dist/{InputTag-BAjQnJh1.js → InputTag-kg2v747D.js} +1 -1
- package/dist/{InputText-Ci8XzpKK.js → InputText-bKR0VgA6.js} +1 -1
- package/dist/{InputTree-Coq2YfRD.js → InputTree-DbdS4b2m.js} +1 -1
- package/dist/{InputVerificationCode-CZbzrwa_.js → InputVerificationCode-DcFJRWeR.js} +1 -1
- package/dist/{InputYearRange-CbdR1nuY.js → InputYearRange-ChXlMgCi.js} +1 -1
- package/dist/{JSONSchema-Z9eJulgD.js → JSONSchema-C_VjFVVN.js} +1 -1
- package/dist/{JSONSchemaEditor-qtbO2bWX.js → JSONSchemaEditor-CEgywCvJ.js} +1 -1
- package/dist/{Json-I_TX2D01.js → Json-DqjhkjHF.js} +1 -1
- package/dist/{Link-DoCudSpW.js → Link-9hUnE5FW.js} +1 -1
- package/dist/{List-BItkFb-A.js → List-BBntusL0.js} +1 -1
- package/dist/List-C8nPjG1-.js +1 -0
- package/dist/{ListSelect-f6rDx6N2.js → ListSelect-lX84FGAP.js} +1 -1
- package/dist/{LocationPicker-CZd07tME.js → LocationPicker-DnA8QpYh.js} +1 -1
- package/dist/{Log--rbcIY4g.js → Log-CRxPlj86.js} +1 -1
- package/dist/{Mapping-rpBDdw-o.js → Mapping-X2IRbppi.js} +1 -1
- package/dist/{Markdown-M8qWm8IY.js → Markdown-ByuMaB2P.js} +1 -1
- package/dist/{MatrixCheckboxes-DCnC8NGQ.js → MatrixCheckboxes-BvBU1E-4.js} +1 -1
- package/dist/{MultilineText-CHrvTjY_.js → MultilineText-BmbIytvk.js} +1 -1
- package/dist/{Nav-CDJbX6q3.js → Nav-BxS7kBh9.js} +1 -1
- package/dist/{NestedSelect-Uxvg89Pe.js → NestedSelect-CbWnin5b.js} +1 -1
- package/dist/{Number-tVXWVP4G.js → Number-CGYpvopX.js} +1 -1
- package/dist/{OfficeViewer-Cz447nMa.js → OfficeViewer-DBFFaH5P.js} +1 -1
- package/dist/{Operation-JkWrokFn.js → Operation-j5yIUDkZ.js} +1 -1
- package/dist/{Page-C5qOXz9A.js → Page-CJ2gK3vA.js} +1 -1
- package/dist/{Pagination-DQoNu1Qo.js → Pagination-BDEmomCQ.js} +1 -1
- package/dist/{PaginationWrapper-07h0-dmz.js → PaginationWrapper-Bnsk8oIg.js} +1 -1
- package/dist/{Panel--P2Ov47t.js → Panel-DKpM1Qfc.js} +1 -1
- package/dist/{Password-CF1feQa2.js → Password-CzHAzi8M.js} +1 -1
- package/dist/{Picker-CKV0_5vN.js → Picker-D5WVPGTg.js} +1 -1
- package/dist/{Plain-CnRq3KDS.js → Plain-oyGNzh1N.js} +1 -1
- package/dist/{PopUp-xCiesfUA.js → PopUp-DaheG-Vv.js} +1 -1
- package/dist/{Portlet-Agkkko8B.js → Portlet-dA2P7U6i.js} +1 -1
- package/dist/{Progress-D-JOmIgT.js → Progress-D2LXKzUA.js} +1 -1
- package/dist/{Property-BoNnFGV9.js → Property-CekATdUy.js} +1 -1
- package/dist/{QRCode-BFfhBYxV.js → QRCode-DPoyEXK3.js} +1 -1
- package/dist/{Radio-BRNZ49gi.js → Radio-HhPQKIKk.js} +1 -1
- package/dist/{Radios-0CT3XjKZ.js → Radios-DVzovX2u.js} +1 -1
- package/dist/Remark-CHTOdmdn.js +1 -0
- package/dist/{Remark-XZDS4Z3Y.js → Remark-bXVj7ffU.js} +1 -1
- package/dist/{SearchBox-__1UKInO.js → SearchBox-Jlwq8w3o.js} +1 -1
- package/dist/{Select-D9nj7O4q.js → Select-DCB0i1Ga.js} +1 -1
- package/dist/{Service-fGzhGL0m.js → Service-Bmfl8VSD.js} +1 -1
- package/dist/{Shape-C9r17D5A.js → Shape-5ZBBe1x0.js} +1 -1
- package/dist/{Slider-BryEccA-.js → Slider-pb5I0Xb2.js} +1 -1
- package/dist/{SparkLine-CcOuk0we.js → SparkLine-C4x34-6K.js} +1 -1
- package/dist/{Spinner-qyJRJu1C.js → Spinner-SR1wYU_1.js} +1 -1
- package/dist/{StaticHoc-C0bGgnQS.js → StaticHoc-DVc-5HZA.js} +1 -1
- package/dist/{Status-BPtAA54m.js → Status-7D4DBjk6.js} +1 -1
- package/dist/{Steps-DsmYH15c.js → Steps-Dd_3MM0y.js} +1 -1
- package/dist/{Switch-CMkhfkPn.js → Switch-CZqzJH45.js} +1 -1
- package/dist/{SwitchContainer-BLxuSTyZ.js → SwitchContainer-L7IwrheV.js} +1 -1
- package/dist/Table-CYUuVDxA.js +1 -0
- package/dist/{Table-HvHD2tS0.js → Table-D-9NfAqg.js} +1 -1
- package/dist/{Table2-C4HNs_R1.js → Table2-CIZ93hrj.js} +1 -1
- package/dist/{TableView-zfvmfF6E.js → TableView-CigjcDJc.js} +1 -1
- package/dist/{Tabs-BeQyEedg.js → Tabs-Cljj-nTv.js} +1 -1
- package/dist/{TabsTransfer-BsYcLplM.js → TabsTransfer-BXwrW4NX.js} +1 -1
- package/dist/{TabsTransferPicker-SS6hg5Hc.js → TabsTransferPicker-DB005nER.js} +1 -1
- package/dist/{Tag-IL_v32Aa.js → Tag-CcfwT8FM.js} +1 -1
- package/dist/{Tasks-D6GQavXw.js → Tasks-DeVW2Tdg.js} +1 -1
- package/dist/{Textarea-Ck0rJ3Ff.js → Textarea-zsHcK0rZ.js} +1 -1
- package/dist/{Timeline-BT7aVGPP.js → Timeline-D_3FRzUa.js} +1 -1
- package/dist/{TooltipWrapper-Bx_3339q.js → TooltipWrapper-BElQhX67.js} +1 -1
- package/dist/{Tpl-BiWl-0O_.js → Tpl-OPfW08Kh.js} +1 -1
- package/dist/{Transfer-CldOhDuU.js → Transfer-Cx1Ijzfh.js} +1 -1
- package/dist/Transfer-DboPBh8V.js +1 -0
- package/dist/{TransferPicker-C2cth5_r.js → TransferPicker-xlJfwHxP.js} +1 -1
- package/dist/{TreeSelect-D9-PBXkV.js → TreeSelect-BTKg9Ldf.js} +1 -1
- package/dist/{UUID-R41mBvtB.js → UUID-BkwpeiT9.js} +1 -1
- package/dist/{UserSelect-Cq56ZLkZ.js → UserSelect-CsY5PQp9.js} +1 -1
- package/dist/{VBox-BEdXFwFf.js → VBox-Ca4DBR6-.js} +1 -1
- package/dist/{Video-BIQhs4lA.js → Video-CXzxq3vU.js} +1 -1
- package/dist/{WebComponent-Vzfd9UEy.js → WebComponent-DYxJeu6a.js} +1 -1
- package/dist/{Wizard-BwEpr22M.js → Wizard-fqzq2OCn.js} +1 -1
- package/dist/{Words-C7JrGNdU.js → Words-V70QrARW.js} +1 -1
- package/dist/{Wrapper-DIGr8a29.js → Wrapper-BtFbBBXy.js} +1 -1
- package/dist/{beneficiary-form-_xPce615.js → beneficiary-form-BmmdIRc0.js} +1 -1
- package/dist/{es-Cn6dJrVn.js → es-DY5--nMG.js} +1 -1
- package/dist/esm-BMvKJM5q.js +4 -0
- package/dist/{esm-vG8eylH_.js → esm-BbZME5Ac.js} +1 -1
- package/dist/index.d.ts +216 -0
- package/dist/index.js +1 -1
- package/dist/{objectSpread2-yExSo67O.js → objectSpread2-BCtAXXta.js} +1 -1
- package/dist/{omitBy-CFU0pICA.js → omitBy-NMzUUhXs.js} +1 -1
- package/dist/{xor-ziNg7OgH.js → xor-CSkTraTY.js} +1 -1
- package/package.json +7 -6
- package/dist/Action-B-ZQiXEF.js +0 -1
- package/dist/ButtonGroup-pVY35HQ1.js +0 -1
- package/dist/ButtonGroupSelect-Bt6Jwo5u.js +0 -1
- package/dist/Card-B_1cg_nQ.js +0 -1
- package/dist/Checkbox-nA8maqiS.js +0 -1
- package/dist/Collapse-BW-pXRle.js +0 -1
- package/dist/FieldSet-D8oj-Vb4.js +0 -1
- package/dist/HBox-DGIyZMV6.js +0 -1
- package/dist/Image-BAenzG4k.js +0 -1
- package/dist/InputFile-X4G2zOvt.js +0 -1
- package/dist/InputImage-Cv5FkWaC.js +0 -1
- package/dist/InputRichText-0TZzQzcy.js +0 -1
- package/dist/List-Ccx0hLxM.js +0 -1
- package/dist/Remark-BuTyhR9e.js +0 -1
- package/dist/Table-DsxWjUvF.js +0 -1
- package/dist/Transfer-BwyAe8c8.js +0 -1
- package/dist/esm-CofciBhy.js +0 -4
package/dist/esm-CofciBhy.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./rolldown-runtime-DcYi-9oA.js";import{t as r}from"./react-BW4ssgUo.js";import{a as o,c as i,d as a,i as s,n as u,o as l,r as c,s as d,t as p,u as f}from"./tslib.es6-C2q27PUR.js";import{A as h,D as v,E as m,F as y,I as g,L as b,M as w,N as x,O as E,P as O,R as S,S as A,T as C,_,a as D,b as N,c as k,d as I,f as T,g as P,h as F,i as j,l as R,m as V,n as M,o as L,p as $,r as z,s as B,u as U,v as q,w as W,x as H,y as G}from"./function-C8ta9DKb.js";import{A as K,B as Y,C as J,D as X,F as Z,I as Q,L as ee,M as te,N as ne,O as re,P as oe,R as ie,S as ae,_ as se,a as ue,b as le,d as ce,h as de,i as pe,j as fe,l as he,m as ve,n as me,o as ye,p as ge,r as be,s as we,t as xe,u as Ee,v as Oe,w as Se,x as Ae,z as Ce}from"./isEqual-BxlJ5vH7.js";import{t as _e}from"./react-dom-DmgFzc6z.js";var De=[];Object.freeze(De);var Ne={};Object.freeze(Ne);var ke={};function Ie(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:ke}function Te(){return++ln.mobxGuid}function Pe(e){throw Fe(!1,e),"X"}function Fe(e,t){if(!e)throw new Error("[mobx] "+(t||"An invariant failed, however the error is obfuscated because this is an production build."))}var je=[];function Re(e,t){return"production"!==process.env.NODE_ENV&&(t?Re("'"+e+"', use '"+t+"' instead."):-1===je.indexOf(e)&&(je.push(e),console.error("[mobx] Deprecated: "+e),!0))}function Ve(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Me=function(){};function Le(e){return null!==e&&"object"==typeof e}function $e(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function ze(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Be(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Ue(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Le(e)&&!0===e[n]}}function qe(e){return void 0!==Ie().Map&&e instanceof Ie().Map}function We(e){return e instanceof Set}function He(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}function Ge(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function Ke(e){return null===e?null:"object"==typeof e?""+e:e}function Ye(e,t){for(var n=e.next();!n.done;)t(n.value),n=e.next()}function Je(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function Xe(e,t){Be(e,Je(),t)}function Ze(e){return e[Je()]=et,e}function Qe(){return"function"==typeof Symbol&&Symbol.toStringTag||"@@toStringTag"}function et(){return this}var tt=function(){function e(e){void 0===e&&(e="Atom@"+Te()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=kt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.reportObserved=function(){return vn(this)},e.prototype.reportChanged=function(){fn(),function(e){if(e.lowestObserverState!==kt.STALE){e.lowestObserverState=kt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===kt.UP_TO_DATE&&(r.isTracing!==It.NONE&&mn(r,e),r.onBecomeStale()),r.dependenciesState=kt.STALE}}}(this),hn()},e.prototype.toString=function(){return this.name},e}(),nt=Ue("Atom",tt);function rt(e,t,n){void 0===t&&(t=Me),void 0===n&&(n=Me);var r=new tt(e);return $n("onBecomeObserved",r,t,void 0),Ln(r,n),r}function ot(e,t){return e===t}var it={identity:ot,structural:function(e,t){return Ur(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||ot(e,t)},shallow:function(e,t){return Ur(e,t,1)}},at=function(e,t){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},at(e,t)};function st(e,t){function n(){this.constructor=e}at(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ut=function(){return ut=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ut.apply(this,arguments)};function lt(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function ct(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(lt(arguments[t]));return e}var dt={},pt={};function ft(e){if(!0!==e.__mobxDidRunLazyInitializers){var t=e.__mobxDecorators;if(t)for(var n in ze(e,"__mobxDidRunLazyInitializers",!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function ht(e,t){return function(){var n,r=function(r,o,i,a){if(!0===a)return t(r,o,i,r,n),null;if("production"===process.env.NODE_ENV||vt(arguments)||Pe("This function is a decorator, but it wasn't invoked like a decorator"),!Object.prototype.hasOwnProperty.call(r,"__mobxDecorators")){var s=r.__mobxDecorators;ze(r,"__mobxDecorators",ut({},s))}return r.__mobxDecorators[o]={prop:o,propertyCreator:t,descriptor:i,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?dt:pt;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return ft(this),this[e]},set:function(t){ft(this),this[e]=t}})}(o,e)};return vt(arguments)?(n=De,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function vt(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}function mt(e,t,n){return Gn(e)?e:Array.isArray(e)?Dt.array(e,{name:n}):$e(e)?Dt.object(e,void 0,{name:n}):qe(e)?Dt.map(e,{name:n}):We(e)?Dt.set(e,{name:n}):e}function yt(e){return e}function gt(e){Fe(e);var t=ht(!0,function(t,n,r,o,i){"production"!==process.env.NODE_ENV&&Fe(!r||!r.get,'@observable cannot be used on getter (property "'+n+'"), use @computed instead.'),Pr(t,n,r?r.initializer?r.initializer.call(t):r.value:void 0,e)}),n="undefined"!=typeof process&&process.env&&"production"!==process.env.NODE_ENV?function(){return arguments.length<2?Pe("Incorrect decorator invocation. @observable decorator doesn't expect any arguments"):t.apply(null,arguments)}:t;return n.enhancer=e,n}var bt={deep:!0,name:void 0,defaultDecorator:void 0};function wt(e){/^(deep|name|equals|defaultDecorator)$/.test(e)||Pe("invalid option for (extend)observable: "+e)}function xt(e){if(null==e)return bt;if("string"==typeof e)return{name:e,deep:!0};if("production"!==process.env.NODE_ENV){if("object"!=typeof e)return Pe("expected options object");Object.keys(e).forEach(wt)}return e}function Et(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?yt:mt}Object.freeze(bt),Object.freeze({deep:!1,name:void 0,defaultDecorator:void 0});var Ot=gt(mt),St=gt(function(e,t,n){return null==e||Mr(e)||Or(e)||_r(e)||kr(e)?e:Array.isArray(e)?Dt.array(e,{name:n,deep:!1}):$e(e)?Dt.object(e,void 0,{name:n,deep:!1}):qe(e)?Dt.map(e,{name:n,deep:!1}):We(e)?Dt.set(e,{name:n,deep:!1}):Pe("production"!==process.env.NODE_ENV&&"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets")}),At=gt(yt),Ct=gt(function(e,t,n){if("production"!==process.env.NODE_ENV&&Gn(e))throw"observable.struct should not be used with observable values";return Ur(e,t)?t:e}),_t={box:function(e,t){arguments.length>2&&Nt("box");var n=xt(t);return new tn(e,Et(n),n.name,!0,n.equals)},shallowBox:function(e,t){return arguments.length>2&&Nt("shallowBox"),Re("observable.shallowBox","observable.box(value, { deep: false })"),Dt.box(e,{name:t,deep:!1})},array:function(e,t){arguments.length>2&&Nt("array");var n=xt(t);return new yr(e,Et(n),n.name)},shallowArray:function(e,t){return arguments.length>2&&Nt("shallowArray"),Re("observable.shallowArray","observable.array(values, { deep: false })"),Dt.array(e,{name:t,deep:!1})},map:function(e,t){arguments.length>2&&Nt("map");var n=xt(t);return new Ar(e,Et(n),n.name)},shallowMap:function(e,t){return arguments.length>2&&Nt("shallowMap"),Re("observable.shallowMap","observable.map(values, { deep: false })"),Dt.map(e,{name:t,deep:!1})},set:function(e,t){arguments.length>2&&Nt("set");var n=xt(t);return new Nr(e,Et(n),n.name)},object:function(e,t,n){return"string"==typeof arguments[1]&&Nt("object"),function(e,t,n,r){if("production"!==process.env.NODE_ENV&&(Fe(arguments.length>=2&&arguments.length<=4,"'extendObservable' expected 2-4 arguments"),Fe("object"==typeof e,"'extendObservable' expects an object as first argument"),Fe(!_r(e),"'extendObservable' should not be used on maps, use map.merge instead"),Fe(!Gn(t),"Extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540"),n))for(var o in n)o in t||Pe("Trying to declare a decorator for unspecified property '"+o+"'");var i=(r=xt(r)).defaultDecorator||(!1===r.deep?At:Ot);ft(e),Tr(e,r.name,i.enhancer),fn();try{for(var a=Object.getOwnPropertyNames(t),s=0,u=a.length;s<u;s++){o=a[s];var l=Object.getOwnPropertyDescriptor(t,o);"production"!==process.env.NODE_ENV&&Hn(l.value)&&Pe("Passing a 'computed' as initial property value is no longer supported by extendObservable. Use a getter or decorator instead");var c=n&&o in n?n[o]:l.get?Tt:i;if("production"!==process.env.NODE_ENV&&"function"!=typeof c)return Pe("Not a valid decorator for '"+o+"', got: "+c);var d=c(e,o,l,!0);d&&Object.defineProperty(e,o,d)}}finally{hn()}return e}({},e,t,xt(n))},shallowObject:function(e,t){return"string"==typeof arguments[1]&&Nt("shallowObject"),Re("observable.shallowObject","observable.object(values, {}, { deep: false })"),Dt.object(e,{},{name:t,deep:!1})},ref:At,shallow:St,deep:Ot,struct:Ct},Dt=function(e,t,n){if("string"==typeof arguments[1])return Ot.apply(null,arguments);if(Gn(e))return e;var r=$e(e)?Dt.object(e,t,n):Array.isArray(e)?Dt.array(e,t):qe(e)?Dt.map(e,t):We(e)?Dt.set(e,t):e;if(r!==e)return r;Pe("production"!==process.env.NODE_ENV&&"The provided value could not be converted into an observable. If you want just create an observable reference to the object use 'observable.box(value)'")};function Nt(e){Pe("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(_t).forEach(function(e){return Dt[e]=_t[e]});var kt,It,Tt=ht(!1,function(e,t,n,r,o){"production"!==process.env.NODE_ENV&&Fe(n&&n.get,"Trying to declare a computed value for unspecified getter '"+t+"'");var i=n.get,a=n.set,s=o[0]||{};!function(e,t,n){var r=Tr(e);n.name=r.name+"."+t,n.context=e,r.values[t]=new rn(n),Object.defineProperty(e,t,function(e){return jr[e]||(jr[e]={configurable:ln.computedConfigurable,enumerable:!1,get:function(){return Rr(this).read(this,e)},set:function(t){Rr(this).write(this,e,t)}})}(t))}(e,t,ut({get:i,set:a},s))}),Pt=Tt({equals:it.structural}),Ft=function(e,t,n){if("string"==typeof t)return Tt.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return Tt.apply(null,arguments);"production"!==process.env.NODE_ENV&&(Fe("function"==typeof e,"First argument to `computed` should be an expression."),Fe(arguments.length<3,"Computed takes one or two arguments if used as function"));var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new rn(r)};Ft.struct=Pt,function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(kt||(kt={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(It||(It={}));var jt=function(e){this.cause=e};function Rt(e){return e instanceof jt}function Vt(e){switch(e.dependenciesState){case kt.UP_TO_DATE:return!1;case kt.NOT_TRACKING:case kt.STALE:return!0;case kt.POSSIBLY_STALE:for(var t=qt(!0),n=Bt(),r=e.observing,o=r.length,i=0;i<o;i++){var a=r[i];if(on(a)){if(ln.disableErrorBoundaries)a.get();else try{a.get()}catch(s){return Ut(n),Wt(t),!0}if(e.dependenciesState===kt.STALE)return Ut(n),Wt(t),!0}}return Ht(e),Ut(n),Wt(t),!1}}function Mt(e){var t=e.observers.length>0;ln.computationDepth>0&&t&&Pe("production"!==process.env.NODE_ENV&&"Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: "+e.name),ln.allowStateChanges||!t&&"strict"!==ln.enforceActions||Pe("production"!==process.env.NODE_ENV&&(ln.enforceActions?"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ")+e.name)}function Lt(e,t,n){var r=qt(!0);Ht(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++ln.runId;var o,i=ln.trackingDerivation;if(ln.trackingDerivation=e,!0===ln.disableErrorBoundaries)o=t.call(n);else try{o=t.call(n)}catch(a){o=new jt(a)}return ln.trackingDerivation=i,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=kt.UP_TO_DATE,o=0,i=e.unboundDepsCount,a=0;a<i;a++)0===(s=n[a]).diffValue&&(s.diffValue=1,o!==a&&(n[o]=s),o++),s.dependenciesState>r&&(r=s.dependenciesState);for(n.length=o,e.newObserving=null,i=t.length;i--;)0===(s=t[i]).diffValue&&dn(s,e),s.diffValue=0;for(;o--;){var s;1===(s=n[o]).diffValue&&(s.diffValue=0,cn(s,e))}r!==kt.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),0===e.observing.length&&function(e){"production"!==process.env.NODE_ENV&&(ln.reactionRequiresObservable||e.requiresObservable)&&console.warn("[mobx] Derivation "+e.name+" is created/updated without reading any observable value")}(e),Wt(r),o}function $t(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)dn(t[n],e);e.dependenciesState=kt.NOT_TRACKING}function zt(e){var t=Bt(),n=e();return Ut(t),n}function Bt(){var e=ln.trackingDerivation;return ln.trackingDerivation=null,e}function Ut(e){ln.trackingDerivation=e}function qt(e){var t=ln.allowStateReads;return ln.allowStateReads=e,t}function Wt(e){ln.allowStateReads=e}function Ht(e){if(e.dependenciesState!==kt.UP_TO_DATE){e.dependenciesState=kt.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=kt.UP_TO_DATE}}var Gt=0,Kt=1,Yt=Object.getOwnPropertyDescriptor(function(){},"name"),Jt=Yt&&Yt.configurable;function Xt(e,t){"production"!==process.env.NODE_ENV&&(Fe("function"==typeof t,"`action` can only be invoked on functions"),"string"==typeof e&&e||Pe("actions should have valid names, got: '"+e+"'"));var n=function(){return function(e,t,n,r){var o=function(e,t,n){var r=An()&&!!e,o=0;if(r){o=Date.now();var i=n&&n.length||0,a=new Array(i);if(i>0)for(var s=0;s<i;s++)a[s]=n[s];_n({type:"action",name:e,object:t,arguments:a})}var u=Bt();fn();var l={prevDerivation:u,prevAllowStateChanges:Zt(!0),prevAllowStateReads:qt(!0),notifySpy:r,startTime:o,actionId:Kt++,parentActionId:Gt};return Gt=l.actionId,l}(e,n,r);try{return t.apply(n,r)}catch(i){throw o.error=i,i}finally{!function(e){Gt!==e.actionId&&Pe("invalid action stack. did you forget to finish an action?"),Gt=e.parentActionId,void 0!==e.error&&(ln.suppressReactionErrors=!0),Qt(e.prevAllowStateChanges),Wt(e.prevAllowStateReads),hn(),Ut(e.prevDerivation),e.notifySpy&&Nn({time:Date.now()-e.startTime}),ln.suppressReactionErrors=!1}(o)}}(e,t,this,arguments)};return"production"!==process.env.NODE_ENV&&Jt&&Object.defineProperty(n,"name",{value:e}),n.isMobxAction=!0,n}function Zt(e){var t=ln.allowStateChanges;return ln.allowStateChanges=e,t}function Qt(e){ln.allowStateChanges=e}function en(e){var t,n=ln.computationDepth;ln.computationDepth=0;try{t=e()}finally{ln.computationDepth=n}return t}var tn=function(e){function t(t,n,r,o,i){void 0===r&&(r="ObservableValue@"+Te()),void 0===o&&(o=!0),void 0===i&&(i=it.default);var a=e.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=i,a.hasUnreportedChange=!1,a.value=n(t,void 0,r),o&&An()&&Cn({type:"create",name:a.name,newValue:""+a.value}),a}return st(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){var t=this.value;if((e=this.prepareNewValue(e))!==ln.UNCHANGED){var n=An();n&&_n({type:"update",name:this.name,newValue:e,oldValue:t}),this.setNewValue(e),n&&Nn()}},t.prototype.prepareNewValue=function(e){if(Mt(this),rr(this)){var t=ir(this,{object:this,type:"update",newValue:e});if(!t)return ln.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?ln.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),ar(this)&&ur(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return or(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),sr(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return Ke(this.get())},t}(tt);tn.prototype[Ge()]=tn.prototype.valueOf;var nn=Ue("ObservableValue",tn),rn=function(){function e(e){this.dependenciesState=kt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=kt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Te(),this.value=new jt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=It.NONE,Fe(e.get,"missing option for computed: get"),this.derivation=e.get,this.name=e.name||"ComputedValue@"+Te(),e.set&&(this.setter=Xt(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?it.structural:it.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState===kt.UP_TO_DATE){e.lowestObserverState=kt.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===kt.UP_TO_DATE&&(r.dependenciesState=kt.POSSIBLY_STALE,r.isTracing!==It.NONE&&mn(r,e),r.onBecomeStale())}}}(this)},e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.get=function(){this.isComputing&&Pe("Cycle detected in computation "+this.name+": "+this.derivation),0!==ln.inBatch||0!==this.observers.length||this.keepAlive?(vn(this),Vt(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState!==kt.STALE){e.lowestObserverState=kt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===kt.POSSIBLY_STALE?r.dependenciesState=kt.STALE:r.dependenciesState===kt.UP_TO_DATE&&(e.lowestObserverState=kt.UP_TO_DATE)}}}(this)):Vt(this)&&(this.warnAboutUntrackedRead(),fn(),this.value=this.computeValue(!1),hn());var e=this.value;if(Rt(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(Rt(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){Fe(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Fe(!1,"production"!==process.env.NODE_ENV&&"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){An()&&Cn({object:this.scope,type:"compute",name:this.name});var e=this.value,t=this.dependenciesState===kt.NOT_TRACKING,n=this.computeValue(!0),r=t||Rt(e)||Rt(n)||!this.equals(e,n);return r&&(this.value=n),r},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,ln.computationDepth++,e)t=Lt(this,this.derivation,this.scope);else if(!0===ln.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(n){t=new jt(n)}return ln.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||($t(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return jn(function(){var i=n.get();if(!r||t){var a=Bt();e({type:"update",object:n,newValue:i,oldValue:o}),Ut(a)}r=!1,o=i})},e.prototype.warnAboutUntrackedRead=function(){"production"!==process.env.NODE_ENV&&(!0===this.requiresReaction&&Pe("[mobx] Computed value "+this.name+" is read outside a reactive context"),this.isTracing!==It.NONE&&console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context. Doing a full recompute"),ln.computedRequiresReaction&&console.warn("[mobx] Computed value "+this.name+" is being read outside a reactive context. Doing a full recompute"))},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return Ke(this.get())},e}();rn.prototype[Ge()]=rn.prototype.valueOf;var on=Ue("ComputedValue",rn),an=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},sn=!0,un=!1,ln=function(){var e=Ie();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(sn=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new an).version&&(sn=!1),sn?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new an):(setTimeout(function(){un||Pe("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new an)}();function cn(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function dn(e,t){if(1===e.observers.length)e.observers.length=0,pn(e);else{var n=e.observers,r=e.observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function pn(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,ln.pendingUnobservations.push(e))}function fn(){ln.inBatch++}function hn(){if(0===--ln.inBatch){xn();for(var e=ln.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof rn&&n.suspend())}ln.pendingUnobservations=[]}}function vn(e){!function(e){"production"!==process.env.NODE_ENV&&!ln.allowStateReads&&ln.observableRequiresReaction&&console.warn("[mobx] Observable "+e.name+" being read outside a reactive context")}(e);var t=ln.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.length&&ln.inBatch>0&&pn(e),!1)}function mn(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===It.BREAK){var n=[];yn(zn(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof rn?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function yn(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach(function(e){return yn(e,t,n+1)}))}var gn=function(){function e(e,t,n,r){void 0===e&&(e="Reaction@"+Te()),void 0===r&&(r=!1),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=kt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+Te(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=It.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,ln.pendingReactions.push(this),xn())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(fn(),this._isScheduled=!1,Vt(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&An()&&Cn({name:this.name,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation(e)}}hn()}},e.prototype.track=function(e){fn();var t,n=An();n&&(t=Date.now(),_n({name:this.name,type:"reaction"})),this._isRunning=!0;var r=Lt(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&$t(this),Rt(r)&&this.reportExceptionInDerivation(r.cause),n&&Nn({time:Date.now()-t}),hn()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(ln.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";ln.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),An()&&Cn({type:"error",name:this.name,message:n,error:""+e}),ln.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(fn(),$t(this),hn()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=function(e){switch(e.length){case 0:return ln.trackingDerivation;case 1:return Lr(e[0]);case 2:return Lr(e[0],e[1])}}(e);if(!r)return Pe("production"!==process.env.NODE_ENV&&"'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");r.isTracing===It.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?It.BREAK:It.LOG}(this,e)},e}(),bn=100,wn=function(e){return e()};function xn(){ln.inBatch>0||ln.isRunningReactions||wn(En)}function En(){ln.isRunningReactions=!0;for(var e=ln.pendingReactions,t=0;e.length>0;){++t===bn&&(console.error("Reaction doesn't converge to a stable state after "+bn+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}ln.isRunningReactions=!1}var On=Ue("Reaction",gn);function Sn(e){var t=wn;wn=function(n){return e(function(){return t(n)})}}function An(){return!!ln.spyListeners.length}function Cn(e){if(ln.spyListeners.length)for(var t=ln.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function _n(e){Cn(ut(ut({},e),{spyReportStart:!0}))}var Dn={spyReportEnd:!0};function Nn(e){Cn(e?ut(ut({},e),{spyReportEnd:!0}):Dn)}function kn(e){return ln.spyListeners.push(e),Ve(function(){ln.spyListeners=ln.spyListeners.filter(function(t){return t!==e})})}function In(){Pe("production"!==process.env.NODE_ENV&&"@action fields are not reassignable")}function Tn(e){return function(t,n,r){if(r){if("production"!==process.env.NODE_ENV&&void 0!==r.get)return Pe("@action cannot be used with getters");if(r.value)return{value:Xt(e,r.value),enumerable:!1,configurable:!0,writable:!0};var o=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Xt(e,o.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){ze(this,n,Pn(e,t))}})}}(e).apply(this,arguments)}}var Pn=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?Xt(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?Xt(e,t):1===arguments.length&&"string"==typeof e?Tn(e):!0!==r?Tn(t).apply(null,arguments):void(e[t]=Xt(e.name||t,n.value))};function Fn(e,t,n){ze(e,t,Xt(t,n.bind(e)))}function jn(e,t){var n;void 0===t&&(t=Ne),"production"!==process.env.NODE_ENV&&(Fe("function"==typeof e,"Autorun expects a function as first argument"),Fe(0==("function"==typeof(n=e)&&!0===n.isMobxAction),"Autorun does not accept actions since actions are untrackable"));var r,o=t&&t.name||e.name||"Autorun@"+Te();if(t.scheduler||t.delay){var i=Vn(t),a=!1;r=new gn(o,function(){a||(a=!0,i(function(){a=!1,r.isDisposed||r.track(s)}))},t.onError,t.requiresObservable)}else r=new gn(o,function(){this.track(s)},t.onError,t.requiresObservable);function s(){e(r)}return r.schedule(),r.getDisposer()}Pn.bound=function(e,t,n,r){return!0===r?(Fn(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Fn(this,t,n.value||n.initializer.call(this)),this[t]},set:In}:{enumerable:!1,configurable:!0,set:function(e){Fn(this,t,e)},get:function(){}}};var Rn=function(e){return e()};function Vn(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Rn}function Mn(e,t,n){void 0===n&&(n=Ne),"boolean"==typeof n&&(n={fireImmediately:n},Re("Using fireImmediately as argument is deprecated. Use '{ fireImmediately: true }' instead")),"production"!==process.env.NODE_ENV&&(Fe("function"==typeof e,"First argument to reaction should be a function"),Fe("object"==typeof n,"Third argument of reactions should be an object"));var r,o,i,a=n.name||"Reaction@"+Te(),s=Pn(a,n.onError?(r=n.onError,o=t,function(){try{return o.apply(this,arguments)}catch(e){r.call(this,e)}}):t),u=!n.scheduler&&!n.delay,l=Vn(n),c=!0,d=!1,p=n.compareStructural?it.structural:n.equals||it.default,f=new gn(a,function(){c||u?h():d||(d=!0,l(h))},n.onError,n.requiresObservable);function h(){if(d=!1,!f.isDisposed){var t=!1;f.track(function(){var n=e(f);t=c||!p(i,n),i=n}),c&&n.fireImmediately&&s(i,f),c||!0!==t||s(i,f),c&&(c=!1)}}return f.schedule(),f.getDisposer()}function Ln(e,t,n){return $n("onBecomeUnobserved",e,t,n)}function $n(e,t,n,r){var o="function"==typeof r?Lr(t,n):Lr(t),i="function"==typeof r?r:n,a=o[e];return"function"!=typeof a?Pe("production"!==process.env.NODE_ENV&&"Not an atom that can be (un)observed"):(o[e]=function(){a.call(this),i.call(this)},function(){o[e]=a})}function zn(e,t){return Bn(Lr(e,t))}function Bn(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n).map(Bn)),r}function Un(e,t,n){var r;if(_r(e)||Or(e)||nn(e))r=$r(e);else{if(!Mr(e))return Pe("production"!==process.env.NODE_ENV&&"Expected observable map, object or array as first array");if("string"!=typeof t)return Pe("production"!==process.env.NODE_ENV&&"InterceptReads can only be used with a specific property, not with an object in general");r=$r(e,t)}return void 0!==r.dehancer?Pe("production"!==process.env.NODE_ENV&&"An intercept reader was already established"):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})}function qn(e,t,n){return"function"==typeof n?function(e,t,n){return $r(e,t).intercept(n)}(e,t,n):function(e,t){return $r(e).intercept(t)}(e,t)}function Wn(e,t){return null!=e&&(void 0!==t?!1!==Mr(e)&&!!e.$mobx.values[t]&&on(Lr(e,t)):on(e))}function Hn(e){return arguments.length>1?Pe("production"!==process.env.NODE_ENV&&"isComputed expects only 1 argument. Use isObservableProp to inspect the observability of a property"):Wn(e)}function Gn(e){return 1!==arguments.length&&Pe("production"!==process.env.NODE_ENV&&"isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),function(e){return null!=e&&(Mr(e)||!!e.$mobx||nt(e)||On(e)||on(e))}(e)}function Kn(e){return Mr(e)?e.$mobx.getKeys():_r(e)||kr(e)?He(e.keys()):Or(e)?e.map(function(e,t){return t}):Pe("production"!==process.env.NODE_ENV&&"'keys()' can only be used on observable objects, arrays, sets and maps")}function Yn(e){return Mr(e)?Kn(e).map(function(t){return e[t]}):_r(e)?Kn(e).map(function(t){return e.get(t)}):kr(e)?He(e.values()):Or(e)?e.slice():Pe("production"!==process.env.NODE_ENV&&"'values()' can only be used on observable objects, arrays, sets and maps")}function Jn(e,t,n){if(2!==arguments.length||kr(e))if(Mr(e)){var r=e.$mobx;r.values[t]?r.write(e,t,n):Pr(e,t,n,r.defaultEnhancer)}else if(_r(e))e.set(t,n);else if(kr(e))e.add(t);else{if(!Or(e))return Pe("production"!==process.env.NODE_ENV&&"'set()' can only be used on observable objects, arrays and maps");"number"!=typeof t&&(t=parseInt(t,10)),Fe(t>=0,"Not a valid index: '"+t+"'"),fn(),t>=e.length&&(e.length=t+1),e[t]=n,hn()}else{fn();var o=t;try{for(var i in o)Jn(e,i,o[i])}finally{hn()}}}function Xn(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return $r(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return $r(e).observe(t,n)}(e,t,n)}Object.create(Error.prototype);var Zn={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Qn(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function er(e,t,n){if(!t.recurseEverything&&!Gn(e))return e;if("object"!=typeof e)return e;if(null===e)return null;if(e instanceof Date)return e;if(nn(e))return er(e.get(),t,n);if(Gn(e)&&Kn(e),!0===t.detectCycles&&null!==e&&n.has(e))return n.get(e);if(Or(e)||Array.isArray(e)){var r=Qn(n,e,[],t),o=e.map(function(e){return er(e,t,n)});r.length=o.length;for(var i=0,a=o.length;i<a;i++)r[i]=o[i];return r}if(kr(e)||Object.getPrototypeOf(e)===Set.prototype){if(!1===t.exportMapsAsObjects){var s=Qn(n,e,/* @__PURE__ */new Set,t);return e.forEach(function(e){s.add(er(e,t,n))}),s}var u=Qn(n,e,[],t);return e.forEach(function(e){u.push(er(e,t,n))}),u}if(_r(e)||Object.getPrototypeOf(e)===Map.prototype){if(!1===t.exportMapsAsObjects){var l=Qn(n,e,/* @__PURE__ */new Map,t);return e.forEach(function(e,r){l.set(r,er(e,t,n))}),l}var c=Qn(n,e,{},t);return e.forEach(function(e,r){c[r]=er(e,t,n)}),c}var d=Qn(n,e,{},t);for(var p in e)d[p]=er(e[p],t,n);return d}function tr(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=Zn),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(n=/* @__PURE__ */new Map),er(e,t,n)}function nr(e,t){void 0===t&&(t=void 0),fn();try{return e.apply(t)}finally{hn()}}function rr(e){return void 0!==e.interceptors&&e.interceptors.length>0}function or(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),Ve(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function ir(e,t){var n=Bt();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o<i&&(Fe(!(t=r[o](t))||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{Ut(n)}}function ar(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function sr(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),Ve(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function ur(e,t){var n=Bt(),r=e.changeListeners;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](t);Ut(n)}}var lr,cr,dr,pr,fr=(lr=!1,cr={},Object.defineProperty(cr,"0",{set:function(){lr=!0}}),Object.create(cr)[0]=1,!1===lr),hr=0,vr=function(){};dr=vr,pr=Array.prototype,void 0!==Object.setPrototypeOf?Object.setPrototypeOf(dr.prototype,pr):void 0!==dr.prototype.__proto__?dr.prototype.__proto__=pr:dr.prototype=pr,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(e){Object.defineProperty(vr.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})});var mr=function(){function e(e,t,n,r){this.array=n,this.owned=r,this.values=[],this.lastKnownLength=0,this.atom=new tt(e||"ObservableArray@"+Te()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return or(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),sr(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>hr&&xr(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;Mt(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=De),rr(this)){var i=ir(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return De;t=i.removedCount,n=i.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var a=n.length-t;this.updateArrayLength(o,a);var s=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,ct([e,t],n));var o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&An(),o=ar(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&_n(ut(ut({},i),{name:this.atom.name})),this.atom.reportChanged(),o&&ur(this,i),r&&Nn()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&An(),o=ar(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&_n(ut(ut({},i),{name:this.atom.name})),this.atom.reportChanged(),o&&ur(this,i),r&&Nn()},e}(),yr=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+Te()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new mr(r,n,i,o);if(Be(i,"$mobx",a),t&&t.length){var s=Zt(!0);i.spliceWithArray(0,0,t),Qt(s)}return fr&&Object.defineProperty(a.array,"0",gr),i}return st(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map(function(e){return Or(e)?e.peek():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},t.prototype.find=function(e,t,n){void 0===n&&(n=0),3===arguments.length&&Re("The array.find fromIndex argument to find will not be supported anymore in the next major");var r=this.findIndex.apply(this,arguments);return-1===r?void 0:this.get(r)},t.prototype.findIndex=function(e,t,n){void 0===n&&(n=0),3===arguments.length&&Re("The array.findIndex fromIndex argument to find will not be supported anymore in the next major");for(var r=this.peek(),o=r.length,i=n;i<o;i++)if(e.call(t,r[i],i,this))return i;return-1},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.spliceWithArray=function(e,t,n){return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(Re("observableArray.move is deprecated, use .slice() & .replace() instead"),n.call(this,e),n.call(this,t),e!==t){var r,o=this.$mobx.values;r=e<t?ct(o.slice(0,e),o.slice(e+1,t+1),[o[e]],o.slice(t+1)):ct(o.slice(0,t),[o[e]],o.slice(t,e),o.slice(e+1)),this.replace(r)}},t.prototype.get=function(e){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},t.prototype.set=function(e,t){var n=this.$mobx,r=n.values;if(e<r.length){Mt(n.atom);var o=r[e];if(rr(n)){var i=ir(n,{type:"update",object:this,index:e,newValue:t});if(!i)return;t=i.newValue}(t=n.enhancer(t,o))!==o&&(r[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}},t}(vr);Xe(yr.prototype,function(){this.$mobx.atom.reportObserved();var e=this,t=0;return Ze({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})}),Object.defineProperty(yr.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),ze(yr.prototype,Qe(),"Array"),["indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(e){var t=Array.prototype[e];Fe("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),ze(yr.prototype,e,function(){return t.apply(this.peek(),arguments)})}),["every","filter","forEach","map","some"].forEach(function(e){Fe("function"==typeof Array.prototype[e],"Base function not defined on Array prototype: '"+e+"'"),ze(yr.prototype,e,function(t,n){var r=this,o=this.$mobx;return o.atom.reportObserved(),o.dehanceValues(o.values)[e](function(e,o){return t.call(n,e,o,r)},n)})}),["reduce","reduceRight"].forEach(function(e){ze(yr.prototype,e,function(){var t=this,n=this.$mobx;n.atom.reportObserved();var r=arguments[0];return arguments[0]=function(e,o,i){return o=n.dehanceValue(o),r(e,o,i,t)},n.values[e].apply(n.values,arguments)})}),function(e,t){for(var n=0;n<t.length;n++)ze(e,t[n],e[t[n]])}(yr.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var gr=br(0);function br(e){return{enumerable:!1,configurable:!1,get:function(){return this.get(e)},set:function(t){this.set(e,t)}}}function wr(e){Object.defineProperty(yr.prototype,""+e,br(e))}function xr(e){for(var t=hr;t<e;t++)wr(t);hr=e}xr(1e3);var Er=Ue("ObservableArrayAdministration",mr);function Or(e){return Le(e)&&Er(e.$mobx)}var Sr={},Ar=function(){function e(e,t,n){if(void 0===t&&(t=mt),void 0===n&&(n="ObservableMap@"+Te()),this.enhancer=t,this.name=n,this.$mobx=Sr,this._keysAtom=rt(this.name+".keys()"),"function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=/* @__PURE__ */new Map,this._hasMap=/* @__PURE__ */new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!ln.trackingDerivation)return this._has(e);var n=this._hasMap.get(e);if(!n){var r=n=new tn(this._has(e),yt,this.name+"."+Cr(e)+"?",!1);this._hasMap.set(e,r),Ln(r,function(){return t._hasMap.delete(e)})}return n.get()},e.prototype.set=function(e,t){var n=this._has(e);if(rr(this)){var r=ir(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(Mt(this._keysAtom),rr(this)&&!(o=ir(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=An(),r=ar(this),o=r||n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return n&&_n(ut(ut({},o),{name:this.name,key:e})),nr(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),r&&ur(this,o),n&&Nn(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);n&&n.setNewValue(t)},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==ln.UNCHANGED){var r=An(),o=ar(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&_n(ut(ut({},i),{name:this.name,key:e})),n.setNewValue(t),o&&ur(this,i),r&&Nn()}},e.prototype._addValue=function(e,t){var n=this;Mt(this._keysAtom),nr(function(){var r=new tn(t,n.enhancer,n.name+"."+Cr(e),!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keysAtom.reportChanged()});var r=An(),o=ar(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&_n(ut(ut({},i),{name:this.name,key:e})),o&&ur(this,i),r&&Nn()},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=this.keys();return Ze({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:e.get(o)}}})},e.prototype.entries=function(){var e=this,t=this.keys();return Ze({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:[o,e.get(o)]}}})},e.prototype.forEach=function(e,t){var n=this;this._keysAtom.reportObserved(),this._data.forEach(function(r,o){return e.call(t,n.get(o),o,n)})},e.prototype.merge=function(e){var t=this;return _r(e)&&(e=e.toJS()),nr(function(){var n=Zt(!0);try{$e(e)?Object.keys(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=lt(e,2),r=n[0],o=n[1];return t.set(r,o)}):qe(e)?e.constructor!==Map?Pe("Cannot initialize from classes that inherit from Map: "+e.constructor.name):e.forEach(function(e,n){return t.set(n,e)}):null!=e&&Pe("Cannot initialize map from "+e)}finally{Qt(n)}}),this},e.prototype.clear=function(){var e=this;nr(function(){zt(function(){e._data.forEach(function(t,n){return e.delete(n)})})})},e.prototype.replace=function(e){var t=this;return nr(function(){var n=function(e){if(qe(e)||_r(e))return e;if(Array.isArray(e))return new Map(e);if($e(e)){var t=/* @__PURE__ */new Map;for(var n in e)t.set(n,e[n]);return t}return Pe("Cannot convert to map from '"+e+"'")}(e),r=/* @__PURE__ */new Map,o=!1;if(Ye(t._data.keys(),function(e){if(!n.has(e))if(t.delete(e))o=!0;else{var i=t._data.get(e);r.set(e,i)}}),Ye(n.entries(),function(e){var n=lt(e,2),i=n[0],a=n[1],s=t._data.has(i);if(t.set(i,a),t._data.has(i)){var u=t._data.get(i);r.set(i,u),s||(o=!0)}}),!o)if(t._data.size!==r.size)t._keysAtom.reportChanged();else for(var i=t._data.keys(),a=r.keys(),s=i.next(),u=a.next();!s.done;){if(s.value!==u.value){t._keysAtom.reportChanged();break}s=i.next(),u=a.next()}t._data=r}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e=this,t={};return this.forEach(function(n,r){return t["symbol"==typeof r?r:Cr(r)]=e.get(r)}),t},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+He(this.keys()).map(function(t){return Cr(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return"production"!==process.env.NODE_ENV&&Fe(!0!==t,"`observe` doesn't support fireImmediately=true in combination with maps."),sr(this,e)},e.prototype.intercept=function(e){return or(this,e)},e}();function Cr(e){return e&&e.toString?e.toString():new String(e).toString()}Xe(Ar.prototype,function(){return this.entries()}),Be(Ar.prototype,Qe(),"Map");var _r=Ue("ObservableMap",Ar),Dr={},Nr=function(){function e(e,t,n){if(void 0===t&&(t=mt),void 0===n&&(n="ObservableSet@"+Te()),this.name=n,this.$mobx=Dr,this._data=/* @__PURE__ */new Set,this._atom=rt(this.name),"function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,r){return t(e,r,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;nr(function(){zt(function(){e._data.forEach(function(t){e.delete(t)})})})},e.prototype.forEach=function(e,t){var n=this;this._atom.reportObserved(),this._data.forEach(function(r){e.call(t,r,r,n)})},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if(Mt(this._atom),rr(this)&&!(o=ir(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){nr(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=An(),r=ar(this),o=r||n?{type:"add",object:this,newValue:e}:null;n&&"production"!==process.env.NODE_ENV&&_n(o),r&&ur(this,o),n&&"production"!==process.env.NODE_ENV&&Nn()}return this},e.prototype.delete=function(e){var t=this;if(rr(this)&&!(o=ir(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=An(),r=ar(this),o=r||n?{type:"delete",object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&_n(ut(ut({},o),{name:this.name})),nr(function(){t._atom.reportChanged(),t._data.delete(e)}),r&&ur(this,o),n&&"production"!==process.env.NODE_ENV&&Nn(),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=He(this.keys()),n=He(this.values());return Ze({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e,t=this,n=0;return void 0!==this._data.values?e=He(this._data.values()):(e=[],this._data.forEach(function(t){return e.push(t)})),Ze({next:function(){return n<e.length?{value:t.dehanceValue(e[n++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return kr(e)&&(e=e.toJS()),nr(function(){var n=Zt(!0);try{Array.isArray(e)||We(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&Pe("Cannot initialize set from "+e)}finally{Qt(n)}}),this},e.prototype.observe=function(e,t){return"production"!==process.env.NODE_ENV&&Fe(!0!==t,"`observe` doesn't support fireImmediately=true in combination with sets."),sr(this,e)},e.prototype.intercept=function(e){return or(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+He(this.keys()).join(", ")+" ]"},e}();Xe(Nr.prototype,function(){return this.values()}),Be(Nr.prototype,Qe(),"Set");var kr=Ue("ObservableSet",Nr),Ir=function(){function e(e,t,n){this.target=e,this.name=t,this.defaultEnhancer=n,this.values={}}return e.prototype.read=function(e,t){if("production"!==process.env.NODE_ENV||this.target===e||(this.illegalAccess(e,t),this.values[t]))return this.values[t].get()},e.prototype.write=function(e,t,n){var r=this.target;"production"===process.env.NODE_ENV&&r!==e&&this.illegalAccess(e,t);var o=this.values[t];if(o instanceof rn)o.set(n);else{if(rr(this)){if(!(s=ir(this,{type:"update",object:r,name:t,newValue:n})))return;n=s.newValue}if((n=o.prepareNewValue(n))!==ln.UNCHANGED){var i=ar(this),a=An(),s=i||a?{type:"update",object:r,oldValue:o.value,name:t,newValue:n}:null;a&&_n(ut(ut({},s),{name:this.name,key:t})),o.setNewValue(n),i&&ur(this,s),a&&Nn()}}},e.prototype.remove=function(e){if(this.values[e]){var t=this.target;if(rr(this)&&!(i=ir(this,{object:t,name:e,type:"remove"})))return;try{fn();var n=ar(this),r=An(),o=this.values[e].get();this.keys&&this.keys.remove(e),delete this.values[e],delete this.target[e];var i=n||r?{type:"remove",object:t,oldValue:o,name:e}:null;r&&_n(ut(ut({},i),{name:this.name,key:e})),n&&ur(this,i),r&&Nn()}finally{hn()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return"production"!==process.env.NODE_ENV&&Fe(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),sr(this,e)},e.prototype.intercept=function(e){return or(this,e)},e.prototype.getKeys=function(){var e=this;return void 0===this.keys&&(this.keys=new yr(Object.keys(this.values).filter(function(t){return e.values[t]instanceof tn}),yt,"keys("+this.name+")",!0)),this.keys.slice()},e}();function Tr(e,t,n){void 0===t&&(t=""),void 0===n&&(n=mt);var r=e.$mobx;return r||("production"!==process.env.NODE_ENV&&Fe(Object.isExtensible(e),"Cannot make the designated object observable; it is not extensible"),$e(e)||(t=(e.constructor.name||"ObservableObject")+"@"+Te()),t||(t="ObservableObject@"+Te()),Be(e,"$mobx",r=new Ir(e,t,n)),r)}function Pr(e,t,n,r){var o,i,a=Tr(e);if(o=e,i=t,"production"===process.env.NODE_ENV||function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||!1!==n.configurable&&!1!==n.writable}(o,i)||Pe("Cannot make property '"+i+"' observable, it is not configurable and writable in the target object"),rr(a)){var s=ir(a,{object:e,name:t,type:"add",newValue:n});if(!s)return;n=s.newValue}n=(a.values[t]=new tn(n,r,a.name+"."+t,!1)).value,Object.defineProperty(e,t,function(e){return Fr[e]||(Fr[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,e)},set:function(t){this.$mobx.write(this,e,t)}})}(t)),a.keys&&a.keys.push(t),function(e,t,n,r){var o=ar(e),i=An(),a=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&_n(ut(ut({},a),{name:e.name,key:n})),o&&ur(e,a),i&&Nn()}(a,e,t,n)}var Fr=Object.create(null),jr=Object.create(null);function Rr(e){return e.$mobx||(ft(e),e.$mobx)}var Vr=Ue("ObservableObjectAdministration",Ir);function Mr(e){return!!Le(e)&&(ft(e),Vr(e.$mobx))}function Lr(e,t){if("object"==typeof e&&null!==e){if(Or(e))return void 0!==t&&Pe("production"!==process.env.NODE_ENV&&"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(kr(e))return e.$mobx;if(_r(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||Pe("production"!==process.env.NODE_ENV&&"the entry '"+t+"' does not exist in the observable map '"+zr(e)+"'"),r)}var r;if(ft(e),t&&!e.$mobx&&e[t],Mr(e))return t?((r=e.$mobx.values[t])||Pe("production"!==process.env.NODE_ENV&&"no observable property '"+t+"' found on the observable object '"+zr(e)+"'"),r):Pe("production"!==process.env.NODE_ENV&&"please specify a property");if(nt(e)||on(e)||On(e))return e}else if("function"==typeof e&&On(e.$mobx))return e.$mobx;return Pe("production"!==process.env.NODE_ENV&&"Cannot obtain atom from "+e)}function $r(e,t){return e||Pe("Expecting some object"),void 0!==t?$r(Lr(e,t)):nt(e)||on(e)||On(e)||_r(e)||kr(e)?e:(ft(e),e.$mobx?e.$mobx:void Pe("production"!==process.env.NODE_ENV&&"Cannot obtain administration from "+e))}function zr(e,t){return(void 0!==t?Lr(e,t):Mr(e)||_r(e)||kr(e)?$r(e):Lr(e)).name}var Br=Object.prototype.toString;function Ur(e,t,n){return void 0===n&&(n=-1),qr(e,t,n)}function qr(e,t,n,r,o){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;if("function"!==i&&"object"!==i&&"object"!=typeof t)return!1;e=Wr(e),t=Wr(t);var a=Br.call(e);if(a!==Br.call(t))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var s="[object Array]"===a;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,l=t.constructor;if(u!==l&&!("function"==typeof u&&u instanceof u&&"function"==typeof l&&l instanceof l)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),o=o||[];for(var c=(r=r||[]).length;c--;)if(r[c]===e)return o[c]===t;if(r.push(e),o.push(t),s){if((c=e.length)!==t.length)return!1;for(;c--;)if(!qr(e[c],t[c],n-1,r,o))return!1}else{var d=Object.keys(e),p=void 0;if(c=d.length,Object.keys(t).length!==c)return!1;for(;c--;)if(!Hr(t,p=d[c])||!qr(e[p],t[p],n-1,r,o))return!1}return r.pop(),o.pop(),!0}function Wr(e){return Or(e)?e.peek():qe(e)||_r(e)||We(e)||kr(e)?He(e.entries()):e}function Hr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}try{process.env.NODE_ENV}catch(tE){var Gr=Ie();"undefined"==typeof process&&(Gr.process={}),Gr.process.env={}}if(function(){if("testCodeMinification"!==function(){}.name&&"production"!==process.env.NODE_ENV&&"undefined"!=typeof process&&"true"!==process.env.IGNORE_MOBX_MINIFY_WARNING){var e=["process","env","NODE_ENV"].join(".");console.warn("[mobx] you are running a minified build, but '"+e+"' was not set to 'production' in your bundler. This results in an unnecessarily large and slow bundle")}}(),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:kn,extras:{getDebugName:zr},$mobx:"$mobx"}),"production"!==process.env.NODE_ENV&&"undefined"!=typeof module&&void 0!==module.exports){var Kr=!1;Object.defineProperty(module.exports,"default",{enumerable:!1,get:function(){Kr||(Kr=!0,console.warn('The MobX package does not have a default export. Use \'import { thing } from "mobx"\' (recommended) or \'import * as mobx from "mobx"\' instead."'))}}),["extras","Atom","BaseAtom","asFlat","asMap","asReference","asStructure","autorunAsync","createTranformer","expr","isModifierDescriptor","isStrictModeEnabled","map","useStrict","whyRun"].forEach(function(e){Object.defineProperty(module.exports,e,{enumerable:!1,get:function(){Pe("'"+e+"' is no longer part of the public MobX api. Please consult the changelog to find out where this functionality went")},set:function(){}})})}var Yr,Jr="warn";function Xr(){return Jr}!function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"}(Yr||(Yr={}));var Zr=function(e,t){return Zr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Zr(e,t)};function Qr(e,t){function n(){this.constructor=e}Zr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var eo=function(){return eo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},eo.apply(this,arguments)};function to(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function no(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ro(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function oo(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ro(arguments[t]));return e}function io(e){return Yo(e,1),Jo(e).type}function ao(e,t){Yo(e,1),Oi(t,function(e){return"object"==typeof e},"object or array",2),Jo(e).applyPatches(ui(t))}function so(e,t){void 0===t&&(t=!0),Yo(e,1);var n=Jo(e);return t?n.snapshot:pi(n.type.getSnapshot(n,!1))}function uo(e,t){void 0===t&&(t=1),Yo(e,1),function(e){Oi(e,function(e){return"number"==typeof e},"number",2),Oi(e,function(e){return e>=0},"number greater than 0",2)}(t);for(var n=t,r=Jo(e).parent;r;){if(0===--n)return r.storedValue;r=r.parent}throw oi("Failed to find the parent of "+Jo(e)+" at depth "+t)}function lo(e){return Yo(e,1),Jo(e).root.storedValue}function co(e,t){void 0===t&&(t=!0),Yo(e,1);var n=Jo(e);return n.type.create(n.snapshot,!0===t?n.root.environment:!1===t?void 0:t)}function po(e){Yo(e,1);var t=Jo(e);t.isRoot?t.die():t.parent.removeChild(t.subpath)}function fo(e){return Yo(e,1),Jo(e).observableIsAlive}function ho(e){return Yo(e,1),Jo(e).root.environment||ni}var vo,mo=function(){function e(e,t,n,r){this.type=e,this.environment=r,this._state=Bo.INITIALIZING,this.environment=r,this.baseSetParent(t,n)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){var t=this.isAlive;this._state=e;var n=this.isAlive;this.aliveAtom&&t!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),e.prototype.fireInternalHook=function(e){this._hookSubscribers&&this._hookSubscribers.emit(e,this,e)},e.prototype.registerHook=function(e,t){return this._hookSubscribers||(this._hookSubscribers=new yi),this._hookSubscribers.register(e,t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),e.prototype.baseSetParent=function(e,t){this._parent=e,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()},Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),e.prototype.getEscapedPath=function(e){return e&&(this.pathAtom||(this.pathAtom=rt("path")),this.pathAtom.reportObserved()),this.parent?(void 0===this._escapedSubpath&&(this._escapedSubpath=this._subpath?ki(this._subpath):""),this.parent.getEscapedPath(e)+"/"+this._escapedSubpath):""},Object.defineProperty(e.prototype,"isRoot",{get:function(){return null===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==Bo.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===Bo.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=rt("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),e.prototype.baseFinalizeCreation=function(e){if(Ei()&&!this.isAlive)throw fail("assertion failed: cannot finalize the creation of a node that is already dead");if(this.state===Bo.CREATED){if(this.parent){if(this.parent.state!==Bo.FINALIZED)return;this.fireHook(Yr.afterAttach)}this.state=Bo.FINALIZED,e&&e()}},e.prototype.baseFinalizeDeath=function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=Bo.DEAD},e.prototype.baseAboutToDie=function(){this.fireHook(Yr.beforeDestroy)},e}(),yo=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r,o)||this;try{a.storedValue=t.createNewInstance(i)}catch(tE){throw a.state=Bo.DEAD,tE}return a.state=Bo.CREATED,a.finalizeCreation(),a}return Qr(t,e),Object.defineProperty(t.prototype,"root",{get:function(){if(!this.parent)throw oi("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),t.prototype.setParent=function(e,t){var n=this.parent!==e,r=this.subpath!==t;if(n||r){if(Ei()){if(!t)throw oi("assertion failed: subpath expected");if(!e)throw oi("assertion failed: parent expected");if(n)throw oi("assertion failed: scalar nodes cannot change their parent")}this.environment=void 0,this.baseSetParent(this.parent,t)}},Object.defineProperty(t.prototype,"snapshot",{get:function(){return pi(this.getSnapshot())},enumerable:!1,configurable:!0}),t.prototype.getSnapshot=function(){return this.type.getSnapshot(this)},t.prototype.toString=function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")},t.prototype.die=function(){this.isAlive&&this.state!==Bo.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},t.prototype.finalizeCreation=function(){this.baseFinalizeCreation()},t.prototype.aboutToDie=function(){this.baseAboutToDie()},t.prototype.finalizeDeath=function(){this.baseFinalizeDeath()},t.prototype.fireHook=function(e){this.fireInternalHook(e)},to([Pn],t.prototype,"die",null),t}(mo),go=1,bo={onError:function(e){throw e}},wo=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r,o)||this;if(a.nodeId=++go,a.isProtectionEnabled=!0,a._autoUnbox=!0,a._isRunningAction=!1,a._hasSnapshotReaction=!1,a._observableInstanceState=0,a._cachedInitialSnapshotCreated=!1,a.unbox=a.unbox.bind(a),a._initialSnapshot=pi(i),a.identifierAttribute=t.identifierAttribute,n||(a.identifierCache=new qo),a._childNodes=t.initializeChildNodes(a,a._initialSnapshot),a.identifier=null,a.unnormalizedIdentifier=null,a.identifierAttribute&&a._initialSnapshot){var s=a._initialSnapshot[a.identifierAttribute];if(void 0===s){var u=a._childNodes[a.identifierAttribute];u&&(s=u.value)}if("string"!=typeof s&&"number"!=typeof s)throw oi("Instance identifier '"+a.identifierAttribute+"' for type '"+a.type.name+"' must be a string or a number");a.identifier=Na(s),a.unnormalizedIdentifier=s}return n?n.root.identifierCache.addNodeToCache(a):a.identifierCache.addNodeToCache(a),a}return Qr(t,e),t.prototype.applyPatches=function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)},t.prototype.applySnapshot=function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)},t.prototype.createObservableInstanceIfNeeded=function(){0===this._observableInstanceState&&this.createObservableInstance()},t.prototype.createObservableInstance=function(){var e,t;if(Ei()&&this.state!==Bo.INITIALIZING)throw oi("assertion failed: the creation of the observable instance must be done on the initializing phase");this._observableInstanceState=1;for(var n=[],r=this.parent;r&&0===r._observableInstanceState;)n.unshift(r),r=r.parent;try{for(var o=no(n),i=o.next();!i.done;i=o.next())i.value.createObservableInstanceIfNeeded()}catch(s){e={error:s}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}var a=this.type;try{this.storedValue=a.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,a.finalizeNewInstance(this,this.storedValue)}catch(tE){throw this.state=Bo.DEAD,tE}finally{this._isRunningAction=!1}this._observableInstanceState=2,Lr(this,"snapshot").trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=ni,this.state=Bo.CREATED,this.fireHook(Yr.afterCreate),this.finalizeCreation()},Object.defineProperty(t.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!1,configurable:!0}),t.prototype.clearParent=function(){if(this.parent){this.fireHook(Yr.beforeDetach);var e=this.state;this.state=Bo.DETACHING;var t=this.root,n=t.environment,r=t.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=r}finally{this.state=e}}},t.prototype.setParent=function(e,t){var n=e!==this.parent,r=t!==this.subpath;if(n||r){if(Ei()){if(!t)throw oi("assertion failed: subpath expected");if(!e)throw oi("assertion failed: new parent expected");if(this.parent&&n)throw oi("A node cannot exists twice in the state tree. Failed to add "+this+" to path '"+e.path+"/"+t+"'.");if(!this.parent&&e.root===this)throw oi("A state tree is not allowed to contain itself. Cannot assign "+this+" to path '"+e.path+"/"+t+"'");if(!this.parent&&this.environment&&this.environment!==e.root.environment)throw oi("A state tree cannot be made part of another state tree as long as their environments are different.")}n?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,t),this.fireHook(Yr.afterAttach)):r&&this.baseSetParent(this.parent,t)}},t.prototype.fireHook=function(e){var t=this;this.fireInternalHook(e);var n=this.storedValue&&"object"==typeof this.storedValue&&this.storedValue[e];"function"==typeof n&&(en?en(function(){n.apply(t.storedValue)}):n.apply(this.storedValue))},Object.defineProperty(t.prototype,"snapshot",{get:function(){return pi(this.getSnapshot())},enumerable:!1,configurable:!0}),t.prototype.getSnapshot=function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath},t.prototype._getActualSnapshot=function(){return this.type.getSnapshot(this)},t.prototype._getCachedInitialSnapshot=function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,n=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,n),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot},t.prototype.isRunningAction=function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()},t.prototype.assertAlive=function(e){var t=Xr();if(!this.isAlive&&"ignore"!==t){var n=this._getAssertAliveError(e);switch(t){case"error":throw oi(n);case"warn":xi(n)}}},t.prototype._getAssertAliveError=function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",n=e.subpath&&ki(e.subpath)||"",r=e.actionContext||No();r&&"action"!==r.type&&r.parentActionEvent&&(r=r.parentActionEvent);var o,i="";return r&&null!=r.name&&(i=(r&&r.context&&(Yo(o=r.context,1),Jo(o).path)||t)+"."+r.name+"()"),"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+n+"', Action: '"+i+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."},t.prototype.getChildNode=function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}},t.prototype.getChildren=function(){this.assertAlive(ni),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):ei(this._childNodes)}finally{this._autoUnbox=!0}},t.prototype.getChildType=function(e){return this.type.getChildType(e)},Object.defineProperty(t.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),t.prototype.assertWritable=function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw oi("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")},t.prototype.removeChild=function(e){this.type.removeChild(this,e)},t.prototype.unbox=function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e},t.prototype.toString=function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")},t.prototype.finalizeCreation=function(){var e=this;this.baseFinalizeCreation(function(){var t,n;try{for(var r=no(e.getChildren()),o=r.next();!o.done;o=r.next())o.value.finalizeCreation()}catch(i){t={error:i}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.fireInternalHook(Yr.afterCreationFinalization)})},t.prototype.detach=function(){if(!this.isAlive)throw oi("Error while detaching, node is not alive.");this.clearParent()},t.prototype.preboot=function(){var e=this;this._applyPatches=Po(this.storedValue,"@APPLY_PATCHES",function(t){t.forEach(function(t){var n=function(e){var t=e.split("/").map(Ii);if(!(""===e||"."===e||".."===e||bi(e,"/")||bi(e,"./")||bi(e,"../")))throw oi("a json path must be either rooted, empty or relative, but got '"+e+"'");return""===t[0]&&t.shift(),t}(t.path);Qo(e,n.slice(0,-1)).applyPatchLocally(n[n.length-1],t)})}),this._applySnapshot=Po(this.storedValue,"@APPLY_SNAPSHOT",function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)}),hi(this.storedValue,"$treenode",this),hi(this.storedValue,"toJSON",Zo)},t.prototype.die=function(){this.isAlive&&this.state!==Bo.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},t.prototype.aboutToDie=function(){0!==this._observableInstanceState&&(this.getChildren().forEach(function(e){e.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))},t.prototype.finalizeDeath=function(){this.getChildren().forEach(function(e){e.finalizeDeath()}),this.root.identifierCache.notifyDied(this),this._snapshotUponDeath=this.snapshot,this._internalEventsClearAll(),this.baseFinalizeDeath()},t.prototype.onSnapshot=function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)},t.prototype.emitSnapshot=function(e){this._internalEventsEmit("snapshot",e)},t.prototype.onPatch=function(e){return this._internalEventsRegister("patch",e)},t.prototype.emitPatch=function(e,t){if(this._internalEventsHasSubscribers("patch")){var n=ro(function(e){if(!("oldValue"in e))throw oi("Patches without `oldValue` field cannot be inversed");return[Di(e),Ni(e)]}(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var o=t[r];for(var i in o)e[i]=o[i]}return e}({},e,{path:t.path.substr(this.path.length)+"/"+e.path})),2),r=n[0],o=n[1];this._internalEventsEmit("patch",r,o)}this.parent&&this.parent.emitPatch(e,t)},t.prototype.hasDisposer=function(e){return this._internalEventsHas("dispose",e)},t.prototype.addDisposer=function(e){if(this.hasDisposer(e))throw oi("cannot add a disposer when it is already registered for execution");this._internalEventsRegister("dispose",e,!0)},t.prototype.removeDisposer=function(e){if(!this._internalEventsHas("dispose",e))throw oi("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",e)},t.prototype.removeMiddleware=function(e){if(this.middlewares){var t=this.middlewares.indexOf(e);t>=0&&this.middlewares.splice(t,1)}},t.prototype.addMiddleWare=function(e,t){var n=this;void 0===t&&(t=!0);var r={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(r):this.middlewares=[r],function(){n.removeMiddleware(r)}},t.prototype.applyPatchLocally=function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)},t.prototype._addSnapshotReaction=function(){var e=this;if(!this._hasSnapshotReaction){var t=Mn(function(){return e.snapshot},function(t){return e.emitSnapshot(t)},bo);this.addDisposer(t),this._hasSnapshotReaction=!0}},t.prototype._internalEventsHasSubscribers=function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)},t.prototype._internalEventsRegister=function(e,t,n){return void 0===n&&(n=!1),this._internalEvents||(this._internalEvents=new yi),this._internalEvents.register(e,t,n)},t.prototype._internalEventsHas=function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)},t.prototype._internalEventsUnregister=function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)},t.prototype._internalEventsEmit=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._internalEvents&&(t=this._internalEvents).emit.apply(t,oo([e],n))},t.prototype._internalEventsClear=function(e){this._internalEvents&&this._internalEvents.clear(e)},t.prototype._internalEventsClearAll=function(){this._internalEvents&&this._internalEvents.clearAll()},to([Pn],t.prototype,"createObservableInstance",null),to([Ft],t.prototype,"snapshot",null),to([Pn],t.prototype,"detach",null),to([Pn],t.prototype,"die",null),t}(mo);!function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor"}(vo||(vo={}));var xo="cannotDetermine",Eo=function(){function e(e){this.isType=!0,this.name=e}return e.prototype.create=function(e,t){return zo(this,e),this.instantiate(null,"",t,e).value},e.prototype.getSnapshot=function(e,t){throw oi("unimplemented method")},e.prototype.isAssignableFrom=function(e){return e===this},e.prototype.validate=function(e,t){if(Xo(e)){var n=io(e);return this.isAssignableFrom(n)?Mo():Lo(t,e)}return this.isValidSnapshot(e,t)},e.prototype.is=function(e){return 0===this.validate(e,[{path:"",type:this}]).length},Object.defineProperty(e.prototype,"Type",{get:function(){throw oi("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw oi("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw oi("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw oi("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),to([Pn],e.prototype,"create",null),e}(),Oo=function(e){function t(t){return e.call(this,t)||this}return Qr(t,e),t.prototype.create=function(t,n){return void 0===t&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,n)},t.prototype.getValue=function(e){return e.createObservableInstanceIfNeeded(),e.storedValue},t.prototype.tryToReconcileNode=function(e,t){return!(e.isDetaching||e.snapshot!==t&&(!Ko(t)||Jo(t)!==e)&&(e.type!==this||!ci(t)||Ko(t)||e.identifierAttribute&&e.identifier!==Na(t[e.identifierAttribute])||(e.applySnapshot(t),0)))},t.prototype.reconcile=function(e,t,n,r){if(this.tryToReconcileNode(e,t))return e.setParent(n,r),e;if(e.die(),Ko(t)&&this.isAssignableFrom(io(t))){var o=Jo(t);return o.setParent(n,r),o}return this.instantiate(n,r,void 0,t)},t.prototype.getSubTypes=function(){return null},to([Pn],t.prototype,"create",null),t}(Eo),So=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qr(t,e),t.prototype.createNewInstance=function(e){return e},t.prototype.getValue=function(e){return e.storedValue},t.prototype.getSnapshot=function(e){return e.storedValue},t.prototype.reconcile=function(e,t,n,r){if(!e.isDetaching&&e.type===this&&e.storedValue===t)return e;var o=this.instantiate(n,r,void 0,t);return e.die(),o},t.prototype.getSubTypes=function(){return null},t}(Eo);function Ao(e){return"object"==typeof e&&e&&!0===e.isType}function Co(e,t){Oi(e,Ao,"mobx-state-tree type",t)}!function(){function e(e,t){this.hooks=e,this.call=t,this.flowsPending=0,this.running=!0,e&&e.onStart(t)}e.prototype.finish=function(e){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,e))},e.prototype.incFlowsPending=function(){this.flowsPending++},e.prototype.decFlowsPending=function(){this.flowsPending--},Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0})}();var _o,Do=1;function No(){return _o}function ko(){return Do++}function Io(e,t){var n=Jo(e.context);"action"===e.type&&n.assertAlive({actionContext:e});var r=n._isRunningAction;n._isRunningAction=!0;var o=_o;_o=e;try{return function(e,t,n){var r=new Fo(e,n);if(r.isEmpty)return Pn(n).apply(null,t.args);var o=null;return function e(t){var i=r.getNextMiddleware(),a=i&&i.handler;if(!a)return Pn(n).apply(null,t.args);if(!i.includeHooks&&Yr[t.name])return e(t);var s=!1,u=!1;if(a(t,function(t,n){s=!0,o=e(t),n&&(o=n(o))},function(e){u=!0,o=e}),Ei()){if(!s&&!u){var l=Jo(t.tree);throw oi("Neither the next() nor the abort() callback within the middleware "+a.name+' for the action: "'+t.name+'" on the node: '+l.type.name+" was invoked.")}if(s&&u)throw l=Jo(t.tree),oi("The next() and abort() callback within the middleware "+a.name+' for the action: "'+t.name+'" on the node: '+l.type.name+" were invoked.")}return o}(t)}(n,e,t)}finally{_o=o,n._isRunningAction=r}}function To(e){if(e)return"action"===e.type?e:e.parentActionEvent}function Po(e,t,n){var r=function(){var r=ko(),o=_o,i=To(o);return Io({type:"action",name:t,id:r,args:gi(arguments),context:e,tree:lo(e),rootId:o?o.rootId:r,parentId:o?o.id:0,allParentIds:o?oo(o.allParentIds,[o.id]):[],parentEvent:o,parentActionEvent:i},n)};return r._isMSTAction=!0,r}var Fo=function(){function e(e,t){this.arrayIndex=0,this.inArrayIndex=0,this.middlewares=[],t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=e;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),e.prototype.getNextMiddleware=function(){var e=this.middlewares[this.arrayIndex];if(e)return e[this.inArrayIndex++]||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())},e}();function jo(e){return"function"==typeof e?"<function"+(e.name?" "+e.name:"")+">":Ko(e)?"<"+e+">":"`"+function(e){try{return JSON.stringify(e)}catch(tE){return"<Unserializable: "+tE+">"}}(e)+"`"}function Ro(e){var t=e.value,n=e.context[e.context.length-1].type,r=e.context.map(function(e){return e.path}).filter(function(e){return e.length>0}).join("/"),o=r.length>0?'at path "/'+r+'" ':"",i=Ko(t)?"value of type "+Jo(t).type.name+":":di(t)?"value":"snapshot",a=n&&Ko(t)&&n.is(Jo(t).snapshot);return""+o+i+" "+jo(t)+" is not assignable "+(n?"to type: `"+n.name+"`":"")+(e.message?" ("+e.message+")":"")+(n?function(e){return Ao(e)&&(e.flags&(vo.String|vo.Number|vo.Integer|vo.Boolean|vo.Date))>0}(n)||di(t)?".":", expected an instance of `"+n.name+"` or a snapshot like `"+n.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function Vo(e,t,n){return e.concat([{path:t,type:n}])}function Mo(){return ti}function Lo(e,t,n){return[{context:e,value:t,message:n}]}function $o(e){return e.reduce(function(e,t){return e.concat(t)},[])}function zo(e,t){(Ei()||"undefined"!=typeof process&&process.env&&"true"===process.env.ENABLE_TYPE_CHECK)&&function(e,t){var n=e.validate(t,[{path:"",type:e}]);if(n.length>0)throw oi(function(e,t,n){var r;if(0!==n.length)return"Error while converting "+((r=jo(t)).length<280?r:r.substring(0,272)+"......"+r.substring(r.length-8))+" to `"+e.name+"`:\n\n "+n.map(Ro).join("\n ")}(e,t,n))}(e,t)}var Bo,Uo=0,qo=function(){function e(){this.cacheId=Uo++,this.cache=Dt.map(),this.lastCacheModificationPerId=Dt.map()}return e.prototype.updateLastCacheModificationPerId=function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)},e.prototype.getLastCacheModificationPerId=function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t},e.prototype.addNodeToCache=function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var n=e.identifier;this.cache.has(n)||this.cache.set(n,Dt.array([],ri));var r=this.cache.get(n);if(-1!==r.indexOf(e))throw oi("Already registered");r.push(e),t&&this.updateLastCacheModificationPerId(n)}},e.prototype.mergeCache=function(e){var t=this;Yn(e.identifierCache.cache).forEach(function(e){return e.forEach(function(e){t.addNodeToCache(e)})})},e.prototype.notifyDied=function(e){if(e.identifierAttribute){var t=e.identifier,n=this.cache.get(t);n&&(n.remove(e),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}},e.prototype.splitCache=function(t){var n,r=this,o=new e,i=t.path;return(n=this.cache,Mr(n)?Kn(n).map(function(e){return[e,n[e]]}):_r(n)?Kn(n).map(function(e){return[e,n.get(e)]}):kr(n)?He(n.entries()):Or(n)?n.map(function(e,t){return[t,e]}):Pe("production"!==process.env.NODE_ENV&&"'entries()' can only be used on observable objects, arrays and maps")).forEach(function(e){for(var t=ro(e,2),n=t[0],a=t[1],s=!1,u=a.length-1;u>=0;u--)0===a[u].path.indexOf(i)&&(o.addNodeToCache(a[u],!1),a.splice(u,1),s=!0);s&&r.updateLastCacheModificationPerId(n)}),o},e.prototype.has=function(e,t){var n=this.cache.get(t);return!!n&&n.some(function(t){return e.isAssignableFrom(t.type)})},e.prototype.resolve=function(e,t){var n=this.cache.get(t);if(!n)return null;var r=n.filter(function(t){return e.isAssignableFrom(t.type)});switch(r.length){case 0:return null;case 1:return r[0];default:throw oi("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+r.map(function(e){return e.path}).join(", "))}},e}();function Wo(e,t,n,r,o){var i=Xo(o);if(i){if(i.parent)throw oi("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+n+"', but it lives already at '"+i.path+"'");return t&&i.setParent(t,n),i}return new wo(e,t,n,r,o)}function Ho(e,t,n,r,o){return new yo(e,t,n,r,o)}function Go(e){return e instanceof yo||e instanceof wo}function Ko(e){return!(!e||!e.$treenode)}function Yo(e,t){Oi(e,Ko,"mobx-state-tree node",t)}function Jo(e){if(!Ko(e))throw oi("Value "+e+" is no MST Node");return e.$treenode}function Xo(e){return e&&e.$treenode||null}function Zo(){return Jo(this).snapshot}function Qo(e,t,n){void 0===n&&(n=!0);for(var r=e,o=0;o<t.length;o++){var i=t[o];if(".."===i){if(r=r.parent)continue}else{if("."===i)continue;if(r){if(r instanceof yo)try{var a=r.value;Ko(a)&&(r=Jo(a))}catch(tE){if(!n)return;throw tE}if(r instanceof wo&&r.getChildType(i)&&(r=r.getChildNode(i)))continue}}if(n)throw oi("Could not resolve '"+i+"' in path '"+(Ti(t.slice(0,o))||"/")+"' while resolving '"+Ti(t)+"'");return}return r}function ei(e){if(!e)return ti;var t=Object.keys(e);if(!t.length)return ti;var n=new Array(t.length);return t.forEach(function(t,r){n[r]=e[t]}),n}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"}(Bo||(Bo={}));var ti=Object.freeze([]),ni=Object.freeze({}),ri={deep:!1};function oi(e){return void 0===e&&(e="Illegal state"),/* @__PURE__ */new Error("[mobx-state-tree] "+e)}function ii(e){return e}Object.freeze(ri);var ai=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function si(e){return Array.isArray(e)||Or(e)}function ui(e){return e?si(e)?e:[e]:ti}function li(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function ci(e){return!(null===e||"object"!=typeof e||e instanceof Date||e instanceof RegExp)}function di(e,t){return void 0===t&&(t=!0),null==e||!!("string"==typeof e||"number"==typeof e||"boolean"==typeof e||t&&e instanceof Date)}function pi(e){return Ei()?di(e)||Or(e)?e:Object.freeze(e):e}function fi(e){return Ei()?(pi(e),li(e)&&Object.keys(e).forEach(function(t){di(e[t])||Object.isFrozen(e[t])||fi(e[t])}),e):e}function hi(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function vi(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}var mi=function(){function e(){this.handlers=[]}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),e.prototype.register=function(e,t){var n=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){n.unregister(e)}},e.prototype.has=function(e){return this.handlers.indexOf(e)>=0},e.prototype.unregister=function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)},e.prototype.clear=function(){this.handlers.length=0},e.prototype.emit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.handlers.slice().forEach(function(t){return t.apply(void 0,oo(e))})},e}(),yi=function(){function e(){}return e.prototype.hasSubscribers=function(e){var t=this.eventHandlers&&this.eventHandlers[e];return!!t&&t.hasSubscribers},e.prototype.register=function(e,t,n){void 0===n&&(n=!1),this.eventHandlers||(this.eventHandlers={});var r=this.eventHandlers[e];return r||(r=this.eventHandlers[e]=new mi),r.register(t,n)},e.prototype.has=function(e,t){var n=this.eventHandlers&&this.eventHandlers[e];return!!n&&n.has(t)},e.prototype.unregister=function(e,t){var n=this.eventHandlers&&this.eventHandlers[e];n&&n.unregister(t)},e.prototype.clear=function(e){this.eventHandlers&&delete this.eventHandlers[e]},e.prototype.clearAll=function(){this.eventHandlers=void 0},e.prototype.emit=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=this.eventHandlers&&this.eventHandlers[e];o&&(t=o).emit.apply(t,oo(n))},e}();function gi(e){for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return t}function bi(e,t){return 0===e.indexOf(t)}var wi=function(e,t){Ei()&&(wi.ids&&!wi.ids.hasOwnProperty(e)&&xi("Deprecation warning: "+t),wi.ids&&(wi.ids[e]=!0))};function xi(e){console.warn(/* @__PURE__ */new Error("[mobx-state-tree] "+e))}function Ei(){return"production"!==process.env.NODE_ENV}function Oi(e,t,n,r){if(Ei()&&!t(e))throw oi("expected "+n+" as argument "+ui(r).join(" or ")+", got "+e+" instead")}function Si(e,t){Oi(e,function(e){return"function"==typeof e},"function",t)}function Ai(e,t,n){void 0===n&&(n=!0),Oi(e,function(e){return"string"==typeof e},"string",t),n||Oi(e,function(e){return""!==e},"not empty string",t)}function Ci(e){"function"==typeof queueMicrotask?queueMicrotask(e):"function"==typeof setImmediate?setImmediate(e):setTimeout(e,1)}function _i(e){return function(e,t){var n=function(){var r=ko(),o=No();if(!o)throw oi("a mst flow must always have a parent context");var i=To(o);if(!i)throw oi("a mst flow must always have a parent action context");var a={name:e,id:r,tree:o.tree,context:o.context,parentId:o.id,allParentIds:oo(o.allParentIds,[o.id]),rootId:o.rootId,parentEvent:o,parentActionEvent:i},s=arguments;function u(e,t,r){e.$mst_middleware=n.$mst_middleware,Io(eo(eo({},a),{type:t,args:[r]}),e)}return new Promise(function(e,r){var o,i=function(){o=t.apply(null,arguments),l(void 0)};function l(e){var t;try{u(function(e){t=o.next(e)},"flow_resume",e)}catch(tE){return void Ci(function(){u(function(t){r(tE)},"flow_throw",tE)})}d(t)}function c(e){var t;try{u(function(e){t=o.throw(e)},"flow_resume_error",e)}catch(tE){return void Ci(function(){u(function(t){r(tE)},"flow_throw",tE)})}d(t)}function d(t){if(!t.done){if(!t.value||"function"!=typeof t.value.then)throw oi("Only promises can be yielded to `async`, got: "+t);return t.value.then(l,c)}Ci(function(){u(function(t){e(t)},"flow_return",t.value)})}i.$mst_middleware=n.$mst_middleware,Io(eo(eo({},a),{type:"flow_spawn",args:gi(s)}),i)})};return n}(e.name,e)}function Di(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function Ni(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function ki(e){return 1==("number"==typeof e)?""+e:-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Ii(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ti(e){if(0===e.length)return"";var t=function(e){return e.map(ki).join("/")};return"."===e[0]||".."===e[0]?t(e):"/"+t(e)}wi.ids={};var Pi,Fi=function(e){function t(t,n,r){var o=e.call(this,r||t.name)||this;return o._subtype=t,o._processors=n,o}return Qr(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|vo.SnapshotProcessor},enumerable:!1,configurable:!0}),t.prototype.describe=function(){return"snapshotProcessor("+this._subtype.describe()+")"},t.prototype.preProcessSnapshot=function(e){return this._processors.preProcessor?this._processors.preProcessor.call(null,e):e},t.prototype.postProcessSnapshot=function(e){return this._processors.postProcessor?this._processors.postProcessor.call(null,e):e},t.prototype._fixNode=function(e){var t=this;!function(e,t){for(var n,r,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];try{for(var a=no(o),s=a.next();!s.done;s=a.next()){var u=s.value;e[u]=t[u].bind(t)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}(e.type,this,"isAssignableFrom","create");var n=e.getSnapshot;e.getSnapshot=function(){return t.postProcessSnapshot(n.call(e))}},t.prototype.instantiate=function(e,t,n,r){var o=Ko(r)?r:this.preProcessSnapshot(r),i=this._subtype.instantiate(e,t,n,o);return this._fixNode(i),i},t.prototype.reconcile=function(e,t,n,r){var o=this._subtype.reconcile(e,Ko(t)?t:this.preProcessSnapshot(t),n,r);return o!==e&&this._fixNode(o),o},t.prototype.getSnapshot=function(e,t){void 0===t&&(t=!0);var n=this._subtype.getSnapshot(e);return t?this.postProcessSnapshot(n):n},t.prototype.isValidSnapshot=function(e,t){var n=this.preProcessSnapshot(e);return this._subtype.validate(n,t)},t.prototype.getSubTypes=function(){return this._subtype},t.prototype.is=function(e){var t=Ao(e)?this._subtype:Ko(e)?so(e,!1):this.preProcessSnapshot(e);return 0===this._subtype.validate(t,[{path:"",type:this._subtype}]).length},t}(Eo),ji="Map.put can only be used to store complex values that have an identifier type attribute";function Ri(e,t){var n,r,o=e.getSubTypes();if(o===xo)return!1;if(o){var i=ui(o);try{for(var a=no(i),s=a.next();!s.done;s=a.next())if(!Ri(s.value,t))return!1}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}return e instanceof Gi&&t.push(e),!0}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"}(Pi||(Pi={}));var Vi=function(e){function t(t){return e.call(this,t,Dt.ref.enhancer)||this}return Qr(t,e),t.prototype.get=function(t){return e.prototype.get.call(this,""+t)},t.prototype.has=function(t){return e.prototype.has.call(this,""+t)},t.prototype.delete=function(t){return e.prototype.delete.call(this,""+t)},t.prototype.set=function(t,n){return e.prototype.set.call(this,""+t,n)},t.prototype.put=function(e){if(!e)throw oi("Map.put cannot be used to set empty values");if(Ko(e)){var t=Jo(e);if(Ei()&&!t.identifierAttribute)throw oi(ji);if(null===t.identifier)throw oi(ji);return this.set(t.identifier,e),e}if(ci(e)){var n=Jo(this),r=n.type;if(r.identifierMode!==Pi.YES)throw oi(ji);var o=e[r.mapIdentifierAttribute];if(!ka(o)){var i=this.put(r.getChildType().create(e,n.environment));return this.put(so(i))}var a=Na(o);return this.set(a,e),this.get(a)}throw oi("Map.put can only be used to store complex values")},t}(Ar),Mi=function(e){function t(t,n,r){void 0===r&&(r=[]);var o=e.call(this,t)||this;return o._subType=n,o.identifierMode=Pi.UNKNOWN,o.mapIdentifierAttribute=void 0,o.flags=vo.Map,o.hookInitializers=[],o._determineIdentifierMode(),o.hookInitializers=r,o}return Qr(t,e),t.prototype.hooks=function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)},t.prototype.instantiate=function(e,t,n,r){return this._determineIdentifierMode(),Wo(this,e,t,n,r)},t.prototype._determineIdentifierMode=function(){if(this.identifierMode===Pi.UNKNOWN){var e=[];if(Ri(this._subType,e)){var t=void 0;e.forEach(function(e){if(e.identifierAttribute){if(t&&t!==e.identifierAttribute)throw oi("The objects in a map should all have the same identifier attribute, expected '"+t+"', but child of type '"+e.name+"' declared attribute '"+e.identifierAttribute+"' as identifier");t=e.identifierAttribute}}),t?(this.identifierMode=Pi.YES,this.mapIdentifierAttribute=t):this.identifierMode=Pi.NO}}},t.prototype.initializeChildNodes=function(e,t){void 0===t&&(t={});var n=e.type._subType,r={};return Object.keys(t).forEach(function(o){r[o]=n.instantiate(e,o,void 0,t[o])}),r},t.prototype.createNewInstance=function(e){return new Vi(e)},t.prototype.finalizeNewInstance=function(e,t){Un(t,e.unbox),e.type.hookInitializers.forEach(function(e){var n=e(t);Object.keys(n).forEach(function(e){var r=n[e],o=Po(t,e,r);(Ei()?vi:hi)(t,e,o)})}),qn(t,this.willChange),Xn(t,this.didChange)},t.prototype.describe=function(){return"Map<string, "+this._subType.describe()+">"},t.prototype.getChildren=function(e){return Yn(e.storedValue)},t.prototype.getChildNode=function(e,t){var n=e.storedValue.get(""+t);if(!n)throw oi("Not a child "+t);return n},t.prototype.willChange=function(e){var t=Jo(e.object),n=e.name;t.assertWritable({subpath:n});var r=t.type,o=r._subType;switch(e.type){case"update":var i=e.newValue;if(i===e.object.get(n))return null;zo(o,i),e.newValue=o.reconcile(t.getChildNode(n),e.newValue,t,n),r.processIdentifier(n,e.newValue);break;case"add":zo(o,e.newValue),e.newValue=o.instantiate(t,n,void 0,e.newValue),r.processIdentifier(n,e.newValue)}return e},t.prototype.processIdentifier=function(e,t){if(this.identifierMode===Pi.YES&&t instanceof wo){var n=t.identifier;if(n!==e)throw oi("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+n+"', but expected: '"+e+"'")}},t.prototype.getSnapshot=function(e){var t={};return e.getChildren().forEach(function(e){t[e.subpath]=e.snapshot}),t},t.prototype.processInitialSnapshot=function(e){var t={};return Object.keys(e).forEach(function(n){t[n]=e[n].getSnapshot()}),t},t.prototype.didChange=function(e){var t=Jo(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:ki(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:ki(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var n=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:ki(e.name),oldValue:n},t)}},t.prototype.applyPatchLocally=function(e,t,n){var r=e.storedValue;switch(n.op){case"add":case"replace":r.set(t,n.value);break;case"remove":r.delete(t)}},t.prototype.applySnapshot=function(e,t){zo(this,t);var n=e.storedValue,r={};if(Array.from(n.keys()).forEach(function(e){r[e]=!1}),t)for(var o in t)n.set(o,t[o]),r[""+o]=!0;Object.keys(r).forEach(function(e){!1===r[e]&&n.delete(e)})},t.prototype.getChildType=function(){return this._subType},t.prototype.isValidSnapshot=function(e,t){var n=this;return li(e)?$o(Object.keys(e).map(function(r){return n._subType.validate(e[r],Vo(t,r,n._subType))})):Lo(t,e,"Value is not a plain object")},t.prototype.getDefaultSnapshot=function(){return ni},t.prototype.removeChild=function(e,t){e.storedValue.delete(t)},to([Pn],t.prototype,"applySnapshot",null),t}(Oo),Li=function(e){function t(t,n,r){void 0===r&&(r=[]);var o=e.call(this,t)||this;return o._subType=n,o.flags=vo.Array,o.hookInitializers=[],o.hookInitializers=r,o}return Qr(t,e),t.prototype.hooks=function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)},t.prototype.instantiate=function(e,t,n,r){return Wo(this,e,t,n,r)},t.prototype.initializeChildNodes=function(e,t){void 0===t&&(t=[]);var n=e.type._subType,r={};return t.forEach(function(t,o){var i=""+o;r[i]=n.instantiate(e,i,void 0,t)}),r},t.prototype.createNewInstance=function(e){return Dt.array(ei(e),ri)},t.prototype.finalizeNewInstance=function(e,t){$r(t).dehancer=e.unbox,e.type.hookInitializers.forEach(function(e){var n=e(t);Object.keys(n).forEach(function(e){var r=n[e],o=Po(t,e,r);(Ei()?vi:hi)(t,e,o)})}),qn(t,this.willChange),Xn(t,this.didChange)},t.prototype.describe=function(){return this._subType.describe()+"[]"},t.prototype.getChildren=function(e){return e.storedValue.slice()},t.prototype.getChildNode=function(e,t){var n=Number(t);if(n<e.storedValue.length)return e.storedValue[n];throw oi("Not a child: "+t)},t.prototype.willChange=function(e){var t=Jo(e.object);t.assertWritable({subpath:""+e.index});var n=t.type._subType,r=t.getChildren();switch(e.type){case"update":if(e.newValue===e.object[e.index])return null;var o=$i(t,n,[r[e.index]],[e.newValue],[e.index]);if(!o)return null;e.newValue=o[0];break;case"splice":var i=e.index,a=e.removedCount,s=e.added,u=$i(t,n,r.slice(i,i+a),s,s.map(function(e,t){return i+t}));if(!u)return null;e.added=u;for(var l=i+a;l<r.length;l++)r[l].setParent(t,""+(l+s.length-a))}return e},t.prototype.getSnapshot=function(e){return e.getChildren().map(function(e){return e.snapshot})},t.prototype.processInitialSnapshot=function(e){var t=[];return Object.keys(e).forEach(function(n){t.push(e[n].getSnapshot())}),t},t.prototype.didChange=function(e){var t=Jo(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:""+e.index,value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"splice":for(var n=e.removedCount-1;n>=0;n--)t.emitPatch({op:"remove",path:""+(e.index+n),oldValue:e.removed[n].snapshot},t);for(n=0;n<e.addedCount;n++)t.emitPatch({op:"add",path:""+(e.index+n),value:t.getChildNode(""+(e.index+n)).snapshot,oldValue:void 0},t);return}},t.prototype.applyPatchLocally=function(e,t,n){var r=e.storedValue,o="-"===t?r.length:Number(t);switch(n.op){case"replace":r[o]=n.value;break;case"add":r.splice(o,0,n.value);break;case"remove":r.splice(o,1)}},t.prototype.applySnapshot=function(e,t){zo(this,t),e.storedValue.replace(t)},t.prototype.getChildType=function(){return this._subType},t.prototype.isValidSnapshot=function(e,t){var n=this;return si(e)?$o(e.map(function(e,r){return n._subType.validate(e,Vo(t,""+r,n._subType))})):Lo(t,e,"Value is not an array")},t.prototype.getDefaultSnapshot=function(){return ti},t.prototype.removeChild=function(e,t){e.storedValue.splice(Number(t),1)},to([Pn],t.prototype,"applySnapshot",null),t}(Oo);function $i(e,t,n,r,o){for(var i=!0,a=0;;a++){var s=a<=r.length-1,u=n[a],l=s?r[a]:void 0,c=""+o[a];if(Go(l)&&(l=l.storedValue),!u&&!s)break;if(s)if(u)if(Bi(u,l))n[a]=zi(t,e,c,l,u);else{for(var d=void 0,p=a;p<n.length;p++)if(Bi(n[p],l)){d=n.splice(p,1)[0];break}i=!1,f=zi(t,e,c,l,d),n.splice(a,0,f)}else{if(Ko(l)&&Jo(l).parent===e)throw oi("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+e.path+"/"+c+"', but it lives already at '"+Jo(l).path+"'");i=!1;var f=zi(t,e,c,l);n.splice(a,0,f)}else i=!1,n.splice(a,1),u instanceof wo&&u.createObservableInstanceIfNeeded(),u.die(),a--}return i?null:n}function zi(e,t,n,r,o){zo(e,r);var i=function(){if(Ko(r)){var i=Jo(r);if(i.assertAlive(ni),null!==i.parent&&i.parent===t)return i.setParent(t,n),i}return o?e.reconcile(o,r,t,n):e.instantiate(t,n,void 0,r)}();return o&&o!==i&&(o instanceof wo&&o.createObservableInstanceIfNeeded(),o.die()),i}function Bi(e,t){if(!e.isAlive)return!1;if(Ko(t)){var n=Jo(t);return n.isAlive&&n===e}return e.snapshot===t||e instanceof wo&&null!==e.identifier&&e.identifierAttribute&&li(t)&&e.identifier===Na(t[e.identifierAttribute])&&e.type.is(t)}var Ui="preProcessSnapshot",qi="postProcessSnapshot";function Wi(){return Jo(this).toString()}var Hi={name:"AnonymousModel",properties:{},initializers:ti},Gi=function(e){function t(t){var n,r=e.call(this,t.name||Hi.name)||this;return r.flags=vo.Object,r.named=function(e){return r.cloneAndEnhance({name:e})},r.props=function(e){return r.cloneAndEnhance({properties:e})},r.preProcessSnapshot=function(e){var t=r.preProcessor;return t?r.cloneAndEnhance({preProcessor:function(n){return t(e(n))}}):r.cloneAndEnhance({preProcessor:e})},r.postProcessSnapshot=function(e){var t=r.postProcessor;return t?r.cloneAndEnhance({postProcessor:function(n){return e(t(n))}}):r.cloneAndEnhance({postProcessor:e})},Object.assign(r,Hi,t),r.properties=(n=r.properties,Object.keys(n).reduce(function(e,t){var n,r,o;if(t in Yr)throw oi("Hook '"+t+"' was defined as property. Hooks should be defined as part of the actions");var i=Object.getOwnPropertyDescriptor(e,t);if("get"in i)throw oi("Getters are not supported as properties. Please use views instead");var a=i.value;if(null==a)throw oi("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(di(a))return Object.assign({},e,((n={})[t]=ca(function(e){switch(typeof e){case"string":return Ji;case"number":return Xi;case"boolean":return Qi;case"object":if(e instanceof Date)return ra}throw oi("Cannot determine primitive type from value "+e)}(a),a),n));if(a instanceof Mi)return Object.assign({},e,((r={})[t]=ca(a,{}),r));if(a instanceof Li)return Object.assign({},e,((o={})[t]=ca(a,[]),o));if(Ao(a))return e;throw Ei()&&"function"==typeof a?oi("Invalid type definition for property '"+t+"', it looks like you passed a function. Did you forget to invoke it, or did you intend to declare a view / action?"):Ei()&&"object"==typeof a?oi("Invalid type definition for property '"+t+"', it looks like you passed an object. Try passing another model type or a types.frozen."):oi("Invalid type definition for property '"+t+"', cannot infer a type from a value like '"+a+"' ("+typeof a+")")},n)),pi(r.properties),r.propertyNames=Object.keys(r.properties),r.identifierAttribute=r._getIdentifierAttribute(),r}return Qr(t,e),t.prototype._getIdentifierAttribute=function(){var e=void 0;return this.forAllProps(function(t,n){if(n.flags&vo.Identifier){if(e)throw oi("Cannot define property '"+t+"' as object identifier, property '"+e+"' is already defined as identifier property");e=t}}),e},t.prototype.cloneAndEnhance=function(e){return new t({name:e.name||this.name,properties:Object.assign({},this.properties,e.properties),initializers:this.initializers.concat(e.initializers||[]),preProcessor:e.preProcessor||this.preProcessor,postProcessor:e.postProcessor||this.postProcessor})},t.prototype.actions=function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){return t.instantiateActions(n,e(n)),n}]})},t.prototype.instantiateActions=function(e,t){if(!li(t))throw oi("actions initializer should return a plain object containing actions");Object.keys(t).forEach(function(n){if(n===Ui)throw oi("Cannot define action '"+Ui+"', it should be defined using 'type.preProcessSnapshot(fn)' instead");if(n===qi)throw oi("Cannot define action '"+qi+"', it should be defined using 'type.postProcessSnapshot(fn)' instead");var r=t[n],o=e[n];if(n in Yr&&o){var i=r;r=function(){o.apply(null,arguments),i.apply(null,arguments)}}var a=r.$mst_middleware,s=r.bind(t);s.$mst_middleware=a;var u=Po(e,n,s);t[n]=u,(Ei()?vi:hi)(e,n,u)})},t.prototype.volatile=function(e){var t=this;if("function"!=typeof e)throw oi("You passed an "+typeof e+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(n){return t.instantiateVolatileState(n,e(n)),n}]})},t.prototype.instantiateVolatileState=function(e,t){if(!li(t))throw oi("volatile state initializer should return a plain object containing state");Jn(e,t)},t.prototype.extend=function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){var r=e(n),o=r.actions,i=r.views,a=r.state;for(var s in function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(r,["actions","views","state"]))throw oi("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+s+"'");return a&&t.instantiateVolatileState(n,a),i&&t.instantiateViews(n,i),o&&t.instantiateActions(n,o),n}]})},t.prototype.views=function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){return t.instantiateViews(n,e(n)),n}]})},t.prototype.instantiateViews=function(e,t){if(!li(t))throw oi("views initializer should return a plain object containing views");Object.keys(t).forEach(function(n){var r,o,i=Object.getOwnPropertyDescriptor(t,n);if("get"in i)if(r=e,"string"!=typeof(o=n)?Pe("production"!==process.env.NODE_ENV&&"isComputed expected a property name as second argument"):Wn(r,o)){var a=$r(e,n);a.derivation=i.get,a.scope=e,i.set&&(a.setter=Pn(a.name+"-setter",i.set))}else Ft(e,n,i,!0);else{if("function"!=typeof i.value)throw oi("A view member should either be a function or getter based property");(Ei()?vi:hi)(e,n,i.value)}})},t.prototype.instantiate=function(e,t,n,r){return Wo(this,e,t,n,Ko(r)?r:this.applySnapshotPreProcessor(r))},t.prototype.initializeChildNodes=function(e,t){void 0===t&&(t={});var n=e.type,r={};return n.forAllProps(function(n,o){r[n]=o.instantiate(e,n,void 0,t[n])}),r},t.prototype.createNewInstance=function(e){return Dt.object(e,ni,ri)},t.prototype.finalizeNewInstance=function(e,t){hi(t,"toString",Wi),this.forAllProps(function(n){Un(t,n,e.unbox)}),this.initializers.reduce(function(e,t){return t(e)},t),qn(t,this.willChange),Xn(t,this.didChange)},t.prototype.willChange=function(e){var t=e,n=Jo(t.object),r=t.name;n.assertWritable({subpath:r});var o=n.type.properties[r];return o&&(zo(o,t.newValue),t.newValue=o.reconcile(n.getChildNode(r),t.newValue,n,r)),t},t.prototype.didChange=function(e){var t=e,n=Jo(t.object);if(n.type.properties[t.name]){var r=t.oldValue?t.oldValue.snapshot:void 0;n.emitPatch({op:"replace",path:ki(t.name),value:t.newValue.snapshot,oldValue:r},n)}},t.prototype.getChildren=function(e){var t=this,n=[];return this.forAllProps(function(r){n.push(t.getChildNode(e,r))}),n},t.prototype.getChildNode=function(e,t){if(!(t in this.properties))throw oi("Not a value property: "+t);var n=$r(e.storedValue,t).value;if(!n)throw oi("Node not available for property "+t);return n},t.prototype.getSnapshot=function(e,t){var n=this;void 0===t&&(t=!0);var r={};return this.forAllProps(function(t,o){Lr(e.storedValue,t).reportObserved(),r[t]=n.getChildNode(e,t).snapshot}),t?this.applySnapshotPostProcessor(r):r},t.prototype.processInitialSnapshot=function(e){var t={};return Object.keys(e).forEach(function(n){t[n]=e[n].getSnapshot()}),this.applySnapshotPostProcessor(t)},t.prototype.applyPatchLocally=function(e,t,n){if("replace"!==n.op&&"add"!==n.op)throw oi("object does not support operation "+n.op);e.storedValue[t]=n.value},t.prototype.applySnapshot=function(e,t){var n=this.applySnapshotPreProcessor(t);zo(this,n),this.forAllProps(function(t){e.storedValue[t]=n[t]})},t.prototype.applySnapshotPreProcessor=function(e){var t=this.preProcessor;return t?t.call(null,e):e},t.prototype.applySnapshotPostProcessor=function(e){var t=this.postProcessor;return t?t.call(null,e):e},t.prototype.getChildType=function(e){return Ai(e,1),this.properties[e]},t.prototype.isValidSnapshot=function(e,t){var n=this,r=this.applySnapshotPreProcessor(e);return li(r)?$o(this.propertyNames.map(function(e){return n.properties[e].validate(r[e],Vo(t,e,n.properties[e]))})):Lo(t,r,"Value is not a plain object")},t.prototype.forAllProps=function(e){var t=this;this.propertyNames.forEach(function(n){return e(n,t.properties[n])})},t.prototype.describe=function(){var e=this;return"{ "+this.propertyNames.map(function(t){return t+": "+e.properties[t].describe()}).join("; ")+" }"},t.prototype.getDefaultSnapshot=function(){return ni},t.prototype.removeChild=function(e,t){e.storedValue[t]=void 0},to([Pn],t.prototype,"applySnapshot",null),t}(Oo);function Ki(e){return Ao(e)&&(e.flags&vo.Object)>0}var Yi=function(e){function t(t,n,r,o){void 0===o&&(o=ii);var i=e.call(this,t)||this;return i.flags=n,i.checker=r,i.initializer=o,i.flags=n,i}return Qr(t,e),t.prototype.describe=function(){return this.name},t.prototype.instantiate=function(e,t,n,r){return Ho(this,e,t,n,r)},t.prototype.createNewInstance=function(e){return this.initializer(e)},t.prototype.isValidSnapshot=function(e,t){return di(e)&&this.checker(e)?Mo():Lo(t,e,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))},t}(So),Ji=new Yi("string",vo.String,function(e){return"string"==typeof e}),Xi=new Yi("number",vo.Number,function(e){return"number"==typeof e}),Zi=new Yi("integer",vo.Integer,function(e){return ai(e)}),Qi=new Yi("boolean",vo.Boolean,function(e){return"boolean"==typeof e}),ea=new Yi("null",vo.Null,function(e){return null===e}),ta=new Yi("undefined",vo.Undefined,function(e){return void 0===e}),na=new Yi("Date",vo.Date,function(e){return"number"==typeof e||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});na.getSnapshot=function(e){return e.storedValue.getTime()};var ra=na,oa=function(e){function t(t){var n=e.call(this,JSON.stringify(t))||this;return n.flags=vo.Literal,n.value=t,n}return Qr(t,e),t.prototype.instantiate=function(e,t,n,r){return Ho(this,e,t,n,r)},t.prototype.describe=function(){return JSON.stringify(this.value)},t.prototype.isValidSnapshot=function(e,t){return di(e)&&e===this.value?Mo():Lo(t,e,"Value is not a literal "+JSON.stringify(this.value))},t}(So);function ia(e){return Oi(e,di,"primitive",1),new oa(e)}var aa=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._subtype=n,i._predicate=r,i._message=o,i}return Qr(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|vo.Refinement},enumerable:!1,configurable:!0}),t.prototype.describe=function(){return this.name},t.prototype.instantiate=function(e,t,n,r){return this._subtype.instantiate(e,t,n,r)},t.prototype.isAssignableFrom=function(e){return this._subtype.isAssignableFrom(e)},t.prototype.isValidSnapshot=function(e,t){var n=this._subtype.validate(e,t);if(n.length>0)return n;var r=Ko(e)?Jo(e).snapshot:e;return this._predicate(r)?Mo():Lo(t,e,this._message(e))},t.prototype.reconcile=function(e,t,n,r){return this._subtype.reconcile(e,t,n,r)},t.prototype.getSubTypes=function(){return this._subtype},t}(Eo),sa=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o._types=n,o._eager=!0,r=eo({eager:!0,dispatcher:void 0},r),o._dispatcher=r.dispatcher,r.eager||(o._eager=!1),o}return Qr(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=vo.Union;return this._types.forEach(function(t){e|=t.flags}),e},enumerable:!1,configurable:!0}),t.prototype.isAssignableFrom=function(e){return this._types.some(function(t){return t.isAssignableFrom(e)})},t.prototype.describe=function(){return"("+this._types.map(function(e){return e.describe()}).join(" | ")+")"},t.prototype.instantiate=function(e,t,n,r){var o=this.determineType(r,void 0);if(!o)throw oi("No matching type for union "+this.describe());return o.instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){var o=this.determineType(t,e.type);if(!o)throw oi("No matching type for union "+this.describe());return o.reconcile(e,t,n,r)},t.prototype.determineType=function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter(function(e){return e!==t}).find(function(t){return t.is(e)}):this._types.find(function(t){return t.is(e)})},t.prototype.isValidSnapshot=function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var n=[],r=0,o=0;o<this._types.length;o++){var i=this._types[o].validate(e,t);if(0===i.length){if(this._eager)return Mo();r++}else n.push(i)}return 1===r?Mo():Lo(t,e,"No type is applicable for the union").concat($o(n))},t.prototype.getSubTypes=function(){return this._types},t}(Eo);function ua(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Ao(e)?void 0:e,o=Ao(e)?oo([e],t):t,i="("+o.map(function(e){return e.name}).join(" | ")+")";return Ei()&&(r&&Oi(r,function(e){return li(e)},"object { eager?: boolean, dispatcher?: Function }",1),o.forEach(function(e,t){Co(e,r?t+2:t+1)})),new sa(i,o,r)}var la=function(e){function t(t,n,r){var o=e.call(this,t.name)||this;return o._subtype=t,o._defaultValue=n,o.optionalValues=r,o}return Qr(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|vo.Optional},enumerable:!1,configurable:!0}),t.prototype.describe=function(){return this._subtype.describe()+"?"},t.prototype.instantiate=function(e,t,n,r){if(this.optionalValues.indexOf(r)>=0){var o=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,n,o)}return this._subtype.instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),n,r)},t.prototype.getDefaultInstanceOrSnapshot=function(){var e="function"==typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"==typeof this._defaultValue&&zo(this,e),e},t.prototype.isValidSnapshot=function(e,t){return this.optionalValues.indexOf(e)>=0?Mo():this._subtype.validate(e,t)},t.prototype.isAssignableFrom=function(e){return this._subtype.isAssignableFrom(e)},t.prototype.getSubTypes=function(){return this._subtype},t}(Eo);function ca(e,t,n){return function(e,t){if("function"!=typeof t&&Ko(t))throw oi("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");Co(e,1),Ei()&&"function"!=typeof t&&zo(e,t)}(e,t),new la(e,t,n||da)}var da=[void 0],pa=ca(ta,void 0),fa=ca(ea,null);function ha(e){return Co(e,1),ua(e,pa)}var va=function(e){function t(t,n){var r=e.call(this,t)||this;return r._definition=n,r}return Qr(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|vo.Late},enumerable:!1,configurable:!0}),t.prototype.getSubType=function(e){if(!this._subType){var t=void 0;try{t=this._definition()}catch(tE){if(!(tE instanceof ReferenceError))throw tE;t=void 0}if(e&&void 0===t)throw oi("Late type seems to be used too early, the definition (still) returns undefined");if(t){if(Ei()&&!Ao(t))throw oi("Failed to determine subtype, make sure types.late returns a type definition.");this._subType=t}}return this._subType},t.prototype.instantiate=function(e,t,n,r){return this.getSubType(!0).instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){return this.getSubType(!0).reconcile(e,t,n,r)},t.prototype.describe=function(){var e=this.getSubType(!1);return e?e.name:"<uknown late type>"},t.prototype.isValidSnapshot=function(e,t){var n=this.getSubType(!1);return n?n.validate(e,t):Mo()},t.prototype.isAssignableFrom=function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)},t.prototype.getSubTypes=function(){return this.getSubType(!1)||xo},t}(Eo),ma=function(e){function t(t){var n=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return n.subType=t,n.flags=vo.Frozen,n}return Qr(t,e),t.prototype.describe=function(){return"<any immutable value>"},t.prototype.instantiate=function(e,t,n,r){return Ho(this,e,t,n,fi(r))},t.prototype.isValidSnapshot=function(e,t){return function(e){return"function"!=typeof e}(e)?this.subType?this.subType.validate(e,t):Mo():Lo(t,e,"Value is not serializable and cannot be frozen")},t}(So),ya=new ma,ga=function(){function e(e,t){if(this.targetType=t,ka(e))this.identifier=e;else{if(!Ko(e))throw oi("Can only store references to tree nodes or identifiers, got: '"+e+"'");var n=Jo(e);if(!n.identifierAttribute)throw oi("Can only store references with a defined identifier attribute.");var r=n.unnormalizedIdentifier;if(null==r)throw oi("Can only store references to tree nodes with a defined identifier.");this.identifier=r}}return e.prototype.updateResolvedReference=function(e){var t=Na(this.identifier),n=e.root,r=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==r){var o=this.targetType,i=n.identifierCache.resolve(o,t);if(!i)throw new ba("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:i,lastCacheModification:r}}},Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),ba=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Qr(t,e),t}(Error),wa=function(e){function t(t,n){var r=e.call(this,"reference("+t.name+")")||this;return r.targetType=t,r.onInvalidated=n,r.flags=vo.Reference,r}return Qr(t,e),t.prototype.describe=function(){return this.name},t.prototype.isAssignableFrom=function(e){return this.targetType.isAssignableFrom(e)},t.prototype.isValidSnapshot=function(e,t){return ka(e)?Mo():Lo(t,e,"Value is not a valid identifier, which is a string or a number")},t.prototype.fireInvalidated=function(e,t,n,r){var o=t.parent;if(o&&o.isAlive){var i=o.storedValue;i&&this.onInvalidated({cause:e,parent:i,invalidTarget:r?r.storedValue:void 0,invalidId:n,replaceRef:function(e){ao(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){Ki(o.type)?this.replaceRef(void 0):ao(t.root.storedValue,{op:"remove",path:t.path})}})}},t.prototype.addTargetNodeWatcher=function(e,t){var n=this,r=this.getValue(e);if(r){var o=Jo(r),i=function(r,i){var a=function(e){switch(e){case Yr.beforeDestroy:return"destroy";case Yr.beforeDetach:return"detach";default:return}}(i);a&&n.fireInvalidated(a,e,t,o)},a=o.registerHook(Yr.beforeDetach,i),s=o.registerHook(Yr.beforeDestroy,i);return function(){a(),s()}}},t.prototype.watchTargetNodeForInvalidations=function(e,t,n){var r=this;if(this.onInvalidated){var o;e.registerHook(Yr.beforeDestroy,function(){o&&o()});var i=function(i){o&&o();var a=e.parent,s=a&&a.storedValue;a&&a.isAlive&&s&&((n?n.get(t,s):e.root.identifierCache.has(r.targetType,Na(t)))?o=r.addTargetNodeWatcher(e,t):i||r.fireInvalidated("invalidSnapshotReference",e,t,null))};e.state===Bo.FINALIZED?i(!0):(e.isRoot||e.root.registerHook(Yr.afterCreationFinalization,function(){e.parent&&e.parent.createObservableInstanceIfNeeded()}),e.registerHook(Yr.afterAttach,function(){i(!1)}))}},t}(So),xa=function(e){function t(t,n){return e.call(this,t,n)||this}return Qr(t,e),t.prototype.getValue=function(e){if(e.isAlive)return e.storedValue.resolvedValue},t.prototype.getSnapshot=function(e){return e.storedValue.identifier},t.prototype.instantiate=function(e,t,n,r){var o,i=Ko(r)?(Yo(o=r,1),Jo(o).identifier):r,a=new ga(r,this.targetType),s=Ho(this,e,t,n,a);return a.node=s,this.watchTargetNodeForInvalidations(s,i,void 0),s},t.prototype.reconcile=function(e,t,n,r){if(!e.isDetaching&&e.type===this){var o=Ko(t),i=e.storedValue;if(!o&&i.identifier===t||o&&i.resolvedValue===t)return e.setParent(n,r),e}var a=this.instantiate(n,r,void 0,t);return e.die(),a},t}(wa),Ea=function(e){function t(t,n,r){var o=e.call(this,t,r)||this;return o.options=n,o}return Qr(t,e),t.prototype.getValue=function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)},t.prototype.getSnapshot=function(e){return e.storedValue},t.prototype.instantiate=function(e,t,n,r){var o=Ko(r)?this.options.set(r,e?e.storedValue:null):r,i=Ho(this,e,t,n,o);return this.watchTargetNodeForInvalidations(i,o,this.options),i},t.prototype.reconcile=function(e,t,n,r){var o=Ko(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===o)return e.setParent(n,r),e;var i=this.instantiate(n,r,void 0,o);return e.die(),i},t}(wa);function Oa(e,t){if(Co(e,1),Ei()&&2===arguments.length&&"string"==typeof arguments[1])throw oi("References with base path are no longer supported. Please remove the base path.");var n=t||void 0,r=t?t.onInvalidated:void 0;if(n&&(n.get||n.set)){if(Ei()&&(!n.get||!n.set))throw oi("reference options must either contain both a 'get' and a 'set' method or none of them");return new Ea(e,{get:n.get,set:n.set},r)}return new xa(e,r)}var Sa=function(e){function t(t,n){var r=e.call(this,t)||this;return r.validType=n,r.flags=vo.Identifier,r}return Qr(t,e),t.prototype.instantiate=function(e,t,n,r){if(!(e&&e.type instanceof Gi))throw oi("Identifier types can only be instantiated as direct child of a model type");return Ho(this,e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){if(e.storedValue!==t)throw oi("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(n,r),e},t.prototype.isValidSnapshot=function(e,t){return typeof e!==this.validType?Lo(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):Mo()},t}(So),Aa=function(e){function t(){var t=e.call(this,"identifier","string")||this;return t.flags=vo.Identifier,t}return Qr(t,e),t.prototype.describe=function(){return"identifier"},t}(Sa),Ca=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return Qr(t,e),t.prototype.getSnapshot=function(e){return e.storedValue},t.prototype.describe=function(){return"identifierNumber"},t}(Sa),_a=new Aa,Da=new Ca;function Na(e){return""+e}function ka(e){return"string"==typeof e||"number"==typeof e}var Ia=function(e){function t(t){var n=e.call(this,t.name)||this;return n.options=t,n.flags=vo.Custom,n}return Qr(t,e),t.prototype.describe=function(){return this.name},t.prototype.isValidSnapshot=function(e,t){if(this.options.isTargetType(e))return Mo();var n=this.options.getValidationMessage(e);return n?Lo(t,e,"Invalid value for type '"+this.name+"': "+n):Mo()},t.prototype.getSnapshot=function(e){return this.options.toSnapshot(e.storedValue)},t.prototype.instantiate=function(e,t,n,r){return Ho(this,e,t,n,this.options.isTargetType(r)?r:this.options.fromSnapshot(r,e&&e.root.environment))},t.prototype.reconcile=function(e,t,n,r){var o=!this.options.isTargetType(t);if(!e.isDetaching&&e.type===this&&(o?t===e.snapshot:t===e.storedValue))return e.setParent(n,r),e;var i=o?this.options.fromSnapshot(t,n.root.environment):t,a=this.instantiate(n,r,void 0,i);return e.die(),a},t}(So),Ta={enumeration:function(e,t){var n="string"==typeof e?t:e;Ei()&&n.forEach(function(e,t){Ai(e,t+1)});var r=ua.apply(void 0,oo(n.map(function(e){return ia(""+e)})));return"string"==typeof e&&(r.name=e),r},model:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new Gi({name:"string"==typeof e[0]?e.shift():"AnonymousModel",properties:e.shift()||{}})},compose:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"==typeof e[0],r=n?e[0]:"AnonymousModel";return n&&e.shift(),Ei()&&e.forEach(function(e,t){Oi(e,Ki,"mobx-state-tree model type",n?t+2:t+1)}),e.reduce(function(e,t){return e.cloneAndEnhance({name:e.name+"_"+t.name,properties:t.properties,initializers:t.initializers,preProcessor:function(n){return t.applySnapshotPreProcessor(e.applySnapshotPreProcessor(n))},postProcessor:function(n){return t.applySnapshotPostProcessor(e.applySnapshotPostProcessor(n))}})}).named(r)},custom:function(e){return new Ia(e)},reference:Oa,safeReference:function(e,t){var n=Oa(e,eo(eo({},t),{onInvalidated:function(e){t&&t.onInvalidated&&t.onInvalidated(e),e.removeRef()}}));return t&&!1===t.acceptsUndefined?n:ha(n)},union:ua,optional:ca,literal:ia,maybe:ha,maybeNull:function(e){return Co(e,1),ua(e,fa)},refinement:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"==typeof e[0]?e.shift():Ao(e[0])?e[0].name:null,r=e[0],o=e[1],i=e[2]?e[2]:function(e){return"Value does not respect the refinement predicate"};return Co(r,[1,2]),Ai(n,1),Si(o,[2,3]),Si(i,[3,4]),new aa(n,r,o,i)},string:Ji,boolean:Qi,number:Xi,integer:Zi,Date:ra,map:function(e){return new Mi("map<string, "+e.name+">",e)},array:function(e){return Co(e,1),new Li(e.name+"[]",e)},frozen:function(e){return 0===arguments.length?ya:Ao(e)?new ma(e):ca(ya,e)},identifier:_a,identifierNumber:Da,late:function(e,t){var n="string"==typeof e?e:"late("+e.toString()+")",r="string"==typeof e?t:e;if(Ei()&&("function"!=typeof r||0!==r.length))throw oi("Invalid late type, expected a function with zero arguments that returns a type, got: "+r);return new va(n,r)},undefined:ta,null:ea,snapshotProcessor:function(e,t,n){if(Co(e,1),Ei()){if(t.postProcessor&&"function"!=typeof t.postProcessor)throw fail("postSnapshotProcessor must be a function");if(t.preProcessor&&"function"!=typeof t.preProcessor)throw fail("preSnapshotProcessor must be a function")}return new Fi(e,t,n)}},Pa=/* @__PURE__ */n((e,t)=>{var n=N();t.exports=function(e){return e&&e.length?n(e):[]}}),Fa=/* @__PURE__ */n((e,t)=>{t.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}}),ja=/* @__PURE__ */n((e,t)=>{var n=fe(),r=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(tE){}}();t.exports=r}),Ra=/* @__PURE__ */n((e,t)=>{var n=ja();t.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}}),Va=/* @__PURE__ */n((e,t)=>{var n=Ra(),r=K();t.exports=function(e,t,o){(void 0!==o&&!r(e[t],o)||void 0===o&&!(t in e))&&n(e,t,o)}}),Ma=/* @__PURE__ */n((e,t)=>{t.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}}),La=/* @__PURE__ */n((e,t)=>{var n=Ma()();t.exports=n}),$a=/* @__PURE__ */n((e,t)=>{var n=Y(),r="object"==typeof e&&e&&!e.nodeType&&e,o=r&&"object"==typeof t&&t&&!t.nodeType&&t,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0;t.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}),za=/* @__PURE__ */n((e,t)=>{var n=J();t.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}}),Ba=/* @__PURE__ */n((e,t)=>{var n=za();t.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}}),Ua=/* @__PURE__ */n((e,t)=>{t.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}),qa=/* @__PURE__ */n((e,t)=>{var n=Z(),r=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();t.exports=o}),Wa=/* @__PURE__ */n((e,t)=>{var n=qa(),r=R(),o=he();t.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(r(e))}}),Ha=/* @__PURE__ */n((e,t)=>{var n=ye(),r=Q();t.exports=function(e){return r(e)&&n(e)}}),Ga=/* @__PURE__ */n((e,t)=>{t.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}}),Ka=/* @__PURE__ */n((e,t)=>{var n=Ra(),r=K(),o=Object.prototype.hasOwnProperty;t.exports=function(e,t,i){var a=e[t];o.call(e,t)&&r(a,i)&&(void 0!==i||t in e)||n(e,t,i)}}),Ya=/* @__PURE__ */n((e,t)=>{var n=Ka(),r=Ra();t.exports=function(e,t,o,i){var a=!o;o||(o={});for(var s=-1,u=t.length;++s<u;){var l=t[s],c=i?i(o[l],e[l],l,o,e):void 0;void 0===c&&(c=e[l]),a?r(o,l,c):n(o,l,c)}return o}}),Ja=/* @__PURE__ */n((e,t)=>{t.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}),Xa=/* @__PURE__ */n((e,t)=>{var n=Z(),r=he(),o=Ja(),i=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return o(e);var t=r(e),a=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&a.push(s);return a}}),Za=/* @__PURE__ */n((e,t)=>{var n=Ee(),r=Xa(),o=ye();t.exports=function(e){return o(e)?n(e,!0):r(e)}}),Qa=/* @__PURE__ */n((e,t)=>{var n=Ya(),r=Za();t.exports=function(e){return n(e,r(e))}}),es=/* @__PURE__ */n((e,t)=>{var n=Va(),r=$a(),o=Ba(),i=Ua(),a=Wa(),s=de(),u=ie(),l=Ha(),c=ve(),d=te(),p=Z(),f=k(),h=ce(),v=Ga(),m=Qa();t.exports=function(e,t,y,g,b,w,x){var E=v(e,y),O=v(t,y),S=x.get(O);if(S)n(e,y,S);else{var A=w?w(E,O,y+"",e,t,x):void 0,C=void 0===A;if(C){var _=u(O),D=!_&&c(O),N=!_&&!D&&h(O);A=O,_||D||N?u(E)?A=E:l(E)?A=i(E):D?(C=!1,A=r(O,!0)):N?(C=!1,A=o(O,!0)):A=[]:f(O)||s(O)?(A=E,s(E)?A=m(E):p(E)&&!d(E)||(A=a(O))):C=!1}C&&(x.set(O,A),b(A,O,g,w,x),x.delete(O)),n(e,y,A)}}}),ts=/* @__PURE__ */n((e,t)=>{var n=Se(),r=Va(),o=La(),i=es(),a=Z(),s=Za(),u=Ga();t.exports=function e(t,l,c,d,p){t!==l&&o(l,function(o,s){if(p||(p=new n),a(o))i(t,l,s,c,e,d,p);else{var f=d?d(u(t,s),o,s+"",t,l,p):void 0;void 0===f&&(f=o),r(t,s,f)}},s)}}),ns=/* @__PURE__ */n((e,t)=>{t.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}),rs=/* @__PURE__ */n((e,t)=>{var n=ns(),r=Math.max;t.exports=function(e,t,o){return t=r(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=r(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=i[a];return l[t]=o(u),n(e,this,l)}}}),os=/* @__PURE__ */n((e,t)=>{t.exports=function(e){return function(){return e}}}),is=/* @__PURE__ */n((e,t)=>{var n=os(),r=ja(),o=T(),i=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;t.exports=i}),as=/* @__PURE__ */n((e,t)=>{var n=Date.now;t.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}}),ss=/* @__PURE__ */n((e,t)=>{var n=is(),r=as()(n);t.exports=r}),us=/* @__PURE__ */n((e,t)=>{var n=T(),r=rs(),o=ss();t.exports=function(e,t){return o(r(e,t,n),e+"")}}),ls=/* @__PURE__ */n((e,t)=>{var n=K(),r=ye(),o=ge(),i=Z();t.exports=function(e,t,a){if(!i(a))return!1;var s=typeof t;return!!("number"==s?r(a)&&o(t,a.length):"string"==s&&t in a)&&n(a[t],e)}}),cs=/* @__PURE__ */n((e,t)=>{var n=us(),r=ls();t.exports=function(e){return n(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&r(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var u=n[o];u&&e(t,u,o,a)}return t})}}),ds=/* @__PURE__ */n((e,t)=>{var n=ts(),r=cs()(function(e,t,r){n(e,t,r)});t.exports=r}),ps=/* @__PURE__ */n((e,t)=>{var n=ee(),r=Q();t.exports=function(e){return"number"==typeof e||r(e)&&"[object Number]"==n(e)}}),fs=/* @__PURE__ */n((e,t)=>{var n=ps();t.exports=function(e){return n(e)&&e!=+e}}),hs=/* @__PURE__ */n((e,t)=>{var n=ee(),r=ie(),o=Q();t.exports=function(e){return"string"==typeof e||!r(e)&&o(e)&&"[object String]"==n(e)}}),vs=/* @__PURE__ */n((e,t)=>{var n=String.prototype.replace,r=/%20/g,o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(e){return n.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:o}}),ms=/* @__PURE__ */n((e,t)=>{var n=vs(),r=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};t.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),u=0;u<s.length;++u){var l=s[u],c=a[l];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:a,prop:l}),n.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(tE){return r}},encode:function(e,t,r,o,a){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var u="",l=0;l<s.length;++l){var c=s.charCodeAt(l);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||a===n.RFC1738&&(40===c||41===c)?u+=s.charAt(l):c<128?u+=i[c]:c<2048?u+=i[192|c>>6]+i[128|63&c]:c<55296||c>=57344?u+=i[224|c>>12]+i[128|c>>6&63]+i[128|63&c]:(l+=1,c=65536+((1023&c)<<10|1023&s.charCodeAt(l)),u+=i[240|c>>18]+i[128|c>>12&63]+i[128|c>>6&63]+i[128|63&c])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,i){if(!n)return t;if("object"!=typeof n){if(o(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(i&&(i.plainObjects||i.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var s=t;return o(t)&&!o(n)&&(s=a(t,i)),o(t)&&o(n)?(n.forEach(function(n,o){if(r.call(t,o)){var a=t[o];a&&"object"==typeof a&&n&&"object"==typeof n?t[o]=e(a,n,i):t.push(n)}else t[o]=n}),t):Object.keys(n).reduce(function(t,o){var a=n[o];return r.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t},s)}}}),ys=/* @__PURE__ */n((e,t)=>{var n=ms(),r=vs(),o=Object.prototype.hasOwnProperty,i={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Array.isArray,s=String.prototype.split,u=Array.prototype.push,l=function(e,t){u.apply(e,a(t)?t:[t])},c=Date.prototype.toISOString,d=r.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:d,formatter:r.formatters[d],indices:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(t,r,o,i,u,c,d,f,h,v,m,y,g,b){var w=t;if("function"==typeof d?w=d(r,w):w instanceof Date?w=v(w):"comma"===o&&a(w)&&(w=n.maybeMap(w,function(e){return e instanceof Date?v(e):e})),null===w){if(i)return c&&!g?c(r,p.encoder,b,"key",m):r;w=""}if(function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(w)||n.isBuffer(w)){if(c){var x=g?r:c(r,p.encoder,b,"key",m);if("comma"===o&&g){for(var E=s.call(String(w),","),O="",S=0;S<E.length;++S)O+=(0===S?"":",")+y(c(E[S],p.encoder,b,"value",m));return[y(x)+"="+O]}return[y(x)+"="+y(c(w,p.encoder,b,"value",m))]}return[y(r)+"="+y(String(w))]}var A,C=[];if(void 0===w)return C;if("comma"===o&&a(w))A=[{value:w.length>0?w.join(",")||null:void 0}];else if(a(d))A=d;else{var _=Object.keys(w);A=f?_.sort(f):_}for(var D=0;D<A.length;++D){var N=A[D],k="object"==typeof N&&void 0!==N.value?N.value:w[N];u&&null===k||l(C,e(k,a(w)?"function"==typeof o?o(r,N):r:r+(h?"."+N:"["+N+"]"),o,i,u,c,d,f,h,v,m,y,g,b))}return C};t.exports=function(e,t){var n,s=e,u=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=r.default;if(void 0!==e.format){if(!o.call(r.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=r.formatters[n],s=p.filter;return("function"==typeof e.filter||a(e.filter))&&(s=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof u.filter?s=(0,u.filter)("",s):a(u.filter)&&(n=u.filter);var c,d=[];if("object"!=typeof s||null===s)return"";c=t&&t.arrayFormat in i?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=i[c];n||(n=Object.keys(s)),u.sort&&n.sort(u.sort);for(var v=0;v<n.length;++v){var m=n[v];u.skipNulls&&null===s[m]||l(d,f(s[m],m,h,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset))}var y=d.join(u.delimiter),g=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),y.length>0?g+y:""}}),gs=/* @__PURE__ */n((e,t)=>{var n=ms(),r=Object.prototype.hasOwnProperty,o=Array.isArray,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,n,o){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=u?i.slice(0,u.index):i,c=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var d=0;n.depth>0&&null!==(u=a.exec(i))&&d<n.depth;){if(d+=1,!n.plainObjects&&r.call(Object.prototype,u[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(u[1])}return u&&c.push("["+i.slice(u.index)+"]"),function(e,t,n,r){for(var o=r?t:s(t,n),i=e.length-1;i>=0;--i){var a,u=e[i];if("[]"===u&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var l="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,c=parseInt(l,10);n.parseArrays||""!==l?!isNaN(c)&&u!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[])[c]=o:"__proto__"!==l&&(a[l]=o):a={0:o}}o=a}return o}(c,t,n,o)}};t.exports=function(e,t){var l=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return l.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var u,l={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,p=c.split(t.delimiter,d),f=-1,h=t.charset;if(t.charsetSentinel)for(u=0;u<p.length;++u)0===p[u].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[u]?h="utf-8":"utf8=%26%2310003%3B"===p[u]&&(h="iso-8859-1"),f=u,u=p.length);for(u=0;u<p.length;++u)if(u!==f){var v,m,y=p[u],g=y.indexOf("]="),b=-1===g?y.indexOf("="):g+1;-1===b?(v=t.decoder(y,i.decoder,h,"key"),m=t.strictNullHandling?null:""):(v=t.decoder(y.slice(0,b),i.decoder,h,"key"),m=n.maybeMap(s(y.slice(b+1),t),function(e){return t.decoder(e,i.decoder,h,"value")})),m&&t.interpretNumericEntities&&"iso-8859-1"===h&&(m=a(m)),y.indexOf("[]=")>-1&&(m=o(m)?[m]:m),r.call(l,v)?l[v]=n.combine(l[v],m):l[v]=m}return l}(e,l):e,d=l.plainObjects?Object.create(null):{},p=Object.keys(c),f=0;f<p.length;++f){var h=p[f],v=u(h,c[h],l,"string"==typeof e);d=n.merge(d,v,l)}return n.compact(d)}}),bs=/* @__PURE__ */n((e,t)=>{var n=ys(),r=gs(),o=vs();t.exports={formats:o,parse:r,stringify:n}}),ws=/* @__PURE__ */n((e,t)=>{var n={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ả":"A","Ạ":"A","Ẩ":"A","Ẫ":"A","Ậ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ẻ":"E","Ẽ":"E","Ẹ":"E","Ể":"E","Ễ":"E","Ệ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ỉ":"I","Ị":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ỏ":"O","Ọ":"O","Ổ":"O","Ỗ":"O","Ộ":"O","Ờ":"O","Ở":"O","Ỡ":"O","Ớ":"O","Ợ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ủ":"U","Ụ":"U","Ử":"U","Ữ":"U","Ự":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ả":"a","ạ":"a","ẩ":"a","ẫ":"a","ậ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ẻ":"e","ẽ":"e","ẹ":"e","ể":"e","ễ":"e","ệ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ỉ":"i","ị":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ỏ":"o","ọ":"o","ổ":"o","ỗ":"o","ộ":"o","ờ":"o","ở":"o","ỡ":"o","ớ":"o","ợ":"o","ù":"u","ú":"u","û":"u","ü":"u","ủ":"u","ụ":"u","ử":"u","ữ":"u","ự":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z","й":"и","Й":"И","ё":"е","Ё":"Е"},r=Object.keys(n).join("|"),o=new RegExp(r,"g"),i=new RegExp(r,"");function a(e){return n[e]}var s=function(e){return e.replace(o,a)};t.exports=s,t.exports.has=function(e){return!!e.match(i)},t.exports.remove=s}),xs=/* @__PURE__ */t(ws()),Es={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},Os=(e,t)=>String(e.rankedValue).localeCompare(String(t.rankedValue));function Ss(e,t,n){void 0===n&&(n={});const{keys:r,threshold:o=Es.MATCHES,baseSort:i=Os,sorter:a=e=>e.sort((e,t)=>Cs(e,t,i))}=n;return a(e.reduce(function(e,i,a){const s=function(e,t,n,r){return t?function(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const o=t[r],i=ks(o),a=Ds(e,o);for(let e=0,t=a.length;e<t;e++)n.push({itemValue:a[e],attributes:i})}return n}(e,t).reduce((e,t,o)=>{let{rank:i,rankedValue:a,keyIndex:s,keyThreshold:u}=e,{itemValue:l,attributes:c}=t,d=As(l,n,r),p=a;const{minRanking:f,maxRanking:h,threshold:v}=c;return d<f&&d>=Es.MATCHES?d=f:d>h&&(d=h),d>i&&(i=d,s=o,u=v,p=l),{rankedValue:p,rank:i,keyIndex:s,keyThreshold:u}},{rankedValue:e,rank:Es.NO_MATCH,keyIndex:-1,keyThreshold:r.threshold}):{rankedValue:e,rank:As(e,n,r),keyIndex:-1,keyThreshold:r.threshold}}(i,r,t,n),{rank:u,keyThreshold:l=o}=s;return u>=l&&e.push({...s,item:i,index:a}),e},[])).map(e=>{let{item:t}=e;return t})}function As(e,t,n){return e=_s(e,n),(t=_s(t,n)).length>e.length?Es.NO_MATCH:e===t?Es.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase())===(t=t.toLowerCase())?Es.EQUAL:e.startsWith(t)?Es.STARTS_WITH:e.includes(` ${t}`)?Es.WORD_STARTS_WITH:e.includes(t)?Es.CONTAINS:1===t.length?Es.NO_MATCH:function(e){let t="";return e.split(" ").forEach(e=>{e.split("-").forEach(e=>{t+=e.substr(0,1)})}),t}(e).includes(t)?Es.ACRONYM:function(e,t){let n=0,r=0;function o(e,t,r){for(let o=r,i=t.length;o<i;o++)if(t[o]===e)return n+=1,o+1;return-1}const i=o(t[0],e,0);if(i<0)return Es.NO_MATCH;r=i;for(let a=1,s=t.length;a<s;a++)if(r=o(t[a],e,r),!(r>-1))return Es.NO_MATCH;return function(e){const r=1/e,o=n/t.length;return Es.MATCHES+o*r}(r-i)}(e,t)}function Cs(e,t,n){const{rank:r,keyIndex:o}=e,{rank:i,keyIndex:a}=t;return r===i?o===a?n(e,t):o<a?-1:1:r>i?-1:1}function _s(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=(0,xs.default)(e)),e}function Ds(e,t){let n;if("object"==typeof t&&(t=t.key),"function"==typeof t)n=t(e);else if(null==e)n=null;else if(Object.hasOwnProperty.call(e,t))n=e[t];else{if(t.includes("."))return function(e,t){const n=e.split(".");let r=[t];for(let o=0,i=n.length;o<i;o++){const e=n[o];let t=[];for(let n=0,o=r.length;n<o;n++){const o=r[n];if(null!=o)if(Object.hasOwnProperty.call(o,e)){const n=o[e];null!=n&&t.push(n)}else"*"===e&&(t=t.concat(o))}r=t}return Array.isArray(r[0])?[].concat(...r):r}(t,e);n=null}return null==n?[]:Array.isArray(n)?n:[String(n)]}Ss.rankings=Es;var Ns={maxRanking:1/0,minRanking:-1/0};function ks(e){return"string"==typeof e?Ns:{...Ns,...e}}function Is(e,t){return u(this,void 0,void 0,function(){var n,r=this;return o(this,function(i){switch(i.label){case 0:return n=[],[4,e.reduce(function(e,i,a){return u(r,void 0,void 0,function(){var r,s;return o(this,function(o){switch(o.label){case 0:return[4,e];case 1:return o.sent(),s=(r=n).push,[4,t(i,a)];case 2:return s.apply(r,[o.sent()]),[2]}})})},Promise.resolve())];case 1:return i.sent(),[2,n]}})})}var Ts=function(e){function t(t,n){return e.call(this,t,n)||this}return s(t,e),t.prototype.document=function(e){return u(this,void 0,void 0,function(){var t,n,r=this;return o(this,function(i){switch(i.label){case 0:return e.body.length?(t=e.body.length>1,[4,Is(e.body,function(e){return u(r,void 0,void 0,function(){var n;return o(this,function(r){return n=this.evalute(e),t&&null==n?[2,""]:[2,n]})})})]):[2,void 0];case 1:return[2,1===(n=i.sent()).length?n[0]:n.join("")]}})})},t.prototype.filter=function(e){return u(this,void 0,void 0,function(){var t,n,r,i,a,s,l=this;return o(this,function(c){switch(c.label){case 0:return[4,this.evalute(e.input)];case 1:t=c.sent(),n=e.filters.concat(),r={filter:void 0,data:this.context,restFilters:n},c.label=2;case 2:if(!n.length)return[3,4];if(i=n.shift(),!(a=this.filters[i.name]))throw new Error("filter `".concat(i.name,"` not exists."));return r.filter=i,[4,Is(i.args,function(e){return u(l,void 0,void 0,function(){var t=this;return o(this,function(n){switch(n.label){case 0:return"mixed"!==(null==e?void 0:e.type)?[3,2]:[4,Is(e.body,function(e){return"string"==typeof e?e:t.evalute(e)})];case 1:return[2,n.sent().join("")];case 2:if(e.type)return[2,this.evalute(e)];n.label=3;case 3:return[2,e]}})})})];case 3:return s=c.sent(),t=a.apply(r,[t].concat(s)),[3,2];case 4:return[2,t]}})})},t.prototype.template=function(e){return u(this,void 0,void 0,function(){var t=this;return o(this,function(n){switch(n.label){case 0:return[4,Is(e.body,function(e){return t.evalute(e)})];case 1:return[2,n.sent().join("")]}})})},t.prototype.getter=function(e){var t;return u(this,void 0,void 0,function(){var n,r;return o(this,function(o){switch(o.label){case 0:return[4,this.evalute(e.host)];case 1:return n=o.sent(),[4,this.evalute(e.key)];case 2:return void 0===(r=o.sent())&&"variable"===(null===(t=e.key)||void 0===t?void 0:t.type)&&(r=e.key.name),[2,null==n?void 0:n[r]]}})})},t.prototype.unary=function(e){return u(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return[4,this.evalute(e.value)];case 1:switch(t=n.sent(),e.op){case"+":return[2,+t];case"-":return[2,-t];case"~":return[2,~t];case"!":return[2,!t]}return[2]}})})},t.prototype.power=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,Math.pow(this.formatNumber(t),this.formatNumber(n))]}})})},t.prototype.multiply=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,L(this.formatNumber(t)*this.formatNumber(n))]}})})},t.prototype.divide=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,L(this.formatNumber(t)/this.formatNumber(n))]}})})},t.prototype.remainder=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,this.formatNumber(t)%this.formatNumber(n)]}})})},t.prototype.add=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),isNaN(t)||isNaN(n)?[2,t+n]:[2,L(this.formatNumber(t)+this.formatNumber(n))]}})})},t.prototype.minus=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,L(this.formatNumber(t)-this.formatNumber(n))]}})})},t.prototype.shift=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.formatNumber(this.evalute(e.right),!0)];case 2:return n=r.sent(),"<<"===e.op?[2,t<<n]:">>"==e.op?[2,t>>n]:[2,t>>>n]}})})},t.prototype.lt=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,t<n]}})})},t.prototype.gt=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,t>n]}})})},t.prototype.le=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,t<=n]}})})},t.prototype.ge=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,t>=n]}})})},t.prototype.eq=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,t==n]}})})},t.prototype.ne=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,t!=n]}})})},t.prototype.streq=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,t===n]}})})},t.prototype.strneq=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),[2,t!==n]}})})},t.prototype.binary=function(e){return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,this.evalute(e.left)];case 1:return t=r.sent(),[4,this.evalute(e.right)];case 2:return n=r.sent(),"&"===e.op?[2,t&n]:"^"===e.op?[2,t^n]:[2,t|n]}})})},t.prototype.and=function(e){return u(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.evalute(e.left)];case 1:return[2,t.sent()&&this.evalute(e.right)]}})})},t.prototype.or=function(e){return u(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.evalute(e.left)];case 1:return[2,t.sent()||this.evalute(e.right)]}})})},t.prototype.array=function(e){var t=this;return Is(e.members,function(e){return t.evalute(e)})},t.prototype.object=function(e){return u(this,void 0,void 0,function(){var t,n=this;return o(this,function(r){switch(r.label){case 0:return t={},[4,e.members.reduce(function(e,r,i){var a=r.key,s=r.value;return u(n,void 0,void 0,function(){var n,r;return o(this,function(o){switch(o.label){case 0:return[4,e];case 1:return o.sent(),[4,this.evalute(a)];case 2:return n=o.sent(),[4,this.evalute(s)];case 3:return r=o.sent(),t[n]=r,[2]}})})},Promise.resolve())];case 1:return r.sent(),[2,t]}})})},t.prototype.conditional=function(e){return u(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return[4,this.evalute(e.test)];case 1:return n.sent()?[4,this.evalute(e.consequent)]:[3,3];case 2:return t=n.sent(),[3,5];case 3:return[4,this.evalute(e.alternate)];case 4:t=n.sent(),n.label=5;case 5:return[2,t]}})})},t.prototype.funcCall=function(e){return u(this,void 0,void 0,function(){var t,n,r,i=this;return o(this,function(o){switch(o.label){case 0:if(t="fn".concat(e.identifier),!(n=this.functions[t]||this[t]||this.filters.hasOwnProperty(e.identifier)&&this.filters[e.identifier]))throw new B("".concat(e.identifier,"函数没有定义"));return r=e.args,~["IF","AND","OR","XOR","IFS"].indexOf(e.identifier)?(r=r.map(function(e){return function(){return i.evalute(e)}}),[3,3]):[3,1];case 1:return[4,Is(r,function(e){return i.evalute(e)})];case 2:r=o.sent(),o.label=3;case 3:return[2,n.apply(this,r)]}})})},t.prototype.callAnonymousFunction=function(e,t){return u(this,void 0,void 0,function(){var n,r;return o(this,function(o){switch(o.label){case 0:return n=D(this.contextStack[this.contextStack.length-1]("&")||{},{}),e.args.forEach(function(e){if("variable"!==e.type)throw new Error("expected a variable as argument");n[e.name]=t.shift()}),this.contextStack.push(function(e){return"&"===e?n:n[e]}),[4,this.evalute(e.return)];case 1:return r=o.sent(),this.contextStack.pop(),[2,r]}})})},t.prototype.fnIF=function(e,t,n){return u(this,void 0,void 0,function(){var r;return o(this,function(o){switch(o.label){case 0:return[4,e()];case 1:return o.sent()?[4,t()]:[3,3];case 2:return r=o.sent(),[3,5];case 3:return[4,n()];case 4:r=o.sent(),o.label=5;case 5:return[2,r]}})})},t.prototype.fnAND=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return u(this,void 0,void 0,function(){var t=this;return o(this,function(n){return e.length?[2,e.reduce(function(e,n){return u(t,void 0,void 0,function(){var t;return o(this,function(r){switch(r.label){case 0:return[4,e];case 1:return(t=r.sent())?[2,n()]:[2,t]}})})},Promise.resolve(!0))]:[2,!1]})})},t.prototype.fnOR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return u(this,void 0,void 0,function(){var t=this;return o(this,function(n){return e.length?[2,e.reduce(function(e,n){return u(t,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,e];case 1:return t.sent()?[2,!0]:[2,n()]}})})},Promise.resolve(!1))]:[2,!1]})})},t.prototype.fnXOR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return u(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return e.length?[4,Is(e,function(e){return e()})]:[2,!1];case 1:return[2,!!(t.sent().filter(function(e){return e}).length%2)]}})})},t.prototype.fnIFS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return u(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:e.length%2&&e.splice(e.length-1,0,function(){return!0}),r.label=1;case 1:return e.length?(t=e.shift(),n=e.shift(),[4,t()]):[3,5];case 2:return r.sent()?[4,n()]:[3,4];case 3:return[2,r.sent()];case 4:return[3,1];case 5:return[2]}})})},t.prototype.fnARRAYMAP=function(e,t){var n=this;if(!t||"anonymous_function"!==t.type)throw new Error("expected an anonymous function get "+t);return(Array.isArray(e)?e:[]).reduce(function(e,r,i){return u(n,void 0,void 0,function(){var n,a,s;return o(this,function(o){switch(o.label){case 0:return[4,e];case 1:return n=o.sent(),s=(a=n).push,[4,this.callAnonymousFunction(t,[r,i])];case 2:return s.apply(a,[o.sent()]),[2,n]}})})},Promise.resolve([]))},t.prototype.fnARRAYFILTER=function(e,t){return u(this,void 0,void 0,function(){var n=this;return o(this,function(r){switch(r.label){case 0:if(!t||"anonymous_function"!==t.type)throw new Error("expected an anonymous function get "+t);return[4,(Array.isArray(e)?e:[]).reduce(function(e,r,i){return u(n,void 0,void 0,function(){var n;return o(this,function(o){switch(o.label){case 0:return[4,e];case 1:return n=o.sent(),[4,this.callAnonymousFunction(t,[r,i])];case 2:return o.sent()&&n.push(r),[2,n]}})})},Promise.resolve([]))];case 1:return[2,r.sent()]}})})},t.prototype.fnARRAYFINDINDEX=function(e,t){return u(this,void 0,void 0,function(){var n,r,i,s,u,l,c,p,f,h;return o(this,function(o){switch(o.label){case 0:if(!t||"anonymous_function"!==t.type)throw new Error("expected an anonymous function get "+t);n=-1,r=Array.isArray(e)?e:[],o.label=1;case 1:o.trys.push([1,6,7,8]),i=a(r.entries()),s=i.next(),o.label=2;case 2:return s.done?[3,5]:(u=d(s.value,2),l=u[0],c=u[1],[4,this.callAnonymousFunction(t,[c,l])]);case 3:if(o.sent())return n=l,[3,5];o.label=4;case 4:return s=i.next(),[3,2];case 5:return[3,8];case 6:return p=o.sent(),f={error:p},[3,8];case 7:try{s&&!s.done&&(h=i.return)&&h.call(i)}finally{if(f)throw f.error}return[7];case 8:return[2,n]}})})},t.prototype.fnARRAYFIND=function(e,t){return u(this,void 0,void 0,function(){var n,r,i,s,u,l,c,p,f,h;return o(this,function(o){switch(o.label){case 0:if(!t||"anonymous_function"!==t.type)throw new Error("expected an anonymous function get "+t);n=void 0,r=Array.isArray(e)?e:[],o.label=1;case 1:o.trys.push([1,6,7,8]),i=a(r.entries()),s=i.next(),o.label=2;case 2:return s.done?[3,5]:(u=d(s.value,2),l=u[0],c=u[1],[4,this.callAnonymousFunction(t,[c,l])]);case 3:if(o.sent())return n=c,[3,5];o.label=4;case 4:return s=i.next(),[3,2];case 5:return[3,8];case 6:return p=o.sent(),f={error:p},[3,8];case 7:try{s&&!s.done&&(h=i.return)&&h.call(i)}finally{if(f)throw f.error}return[7];case 8:return[2,n]}})})},t.prototype.fnARRAYSOME=function(e,t){return u(this,void 0,void 0,function(){var n=this;return o(this,function(r){switch(r.label){case 0:if(!t||"anonymous_function"!==t.type)throw new Error("expected an anonymous function get "+t);return[4,(Array.isArray(e)?e:[]).reduce(function(e,r,i){return u(n,void 0,void 0,function(){var n,a;return o(this,function(o){switch(o.label){case 0:return[4,e];case 1:return n=o.sent(),[4,this.callAnonymousFunction(t,[r,i])];case 2:return a=o.sent(),[2,n||a]}})})},Promise.resolve(!1))];case 1:return[2,r.sent()]}})})},t.prototype.fnARRAYEVERY=function(e,t){return u(this,void 0,void 0,function(){var n=this;return o(this,function(r){switch(r.label){case 0:if(!t||"anonymous_function"!==t.type)throw new Error("expected an anonymous function get "+t);return[4,(Array.isArray(e)?e:[]).reduce(function(e,r,i){return u(n,void 0,void 0,function(){var n,a;return o(this,function(o){switch(o.label){case 0:return[4,e];case 1:return n=o.sent(),[4,this.callAnonymousFunction(t,[r,i])];case 2:return a=o.sent(),[2,n&&a]}})})},Promise.resolve(!0))];case 1:return[2,r.sent()]}})})},t}(j),Ps={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Fs={raw:function(e){return e},html:function(e){return null==e?e:String(e).replace(/[&<>"'\/]/g,function(e){return Ps[e]})}};function js(){return Fs}var Rs={1:"Boolean",2:"Raw",3:"Variable",4:"OpenScript",5:"CloseScript",6:"EOF",7:"Identifier",8:"Literal",9:"Numeric",10:"Punctuator",11:"String",12:"RegularExpression",13:"TemplateRaw",14:"TemplateLeftBrace",15:"TemplateRightBrace",16:"OpenFilter",17:"Char"},Vs=["===","!==",">>>","==","!=","<>","<=",">=","||","&&","++","--","<<",">>","**","+=","*=","/=","<",">","=","*","/","-","+","^","!","~","%","&","|","(",")","[","]","{","}","?",":",";",",",".","$"],Ms={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8};function Ls(e){return e>="1"&&e<="9"}function $s(e){return e>="0"&&e<="9"}function zs(e){return"e"===e||"E"===e}function Bs(e,t){return void 0===t&&(t=[]),e.replace(/\\(.)/g,function(e,n){return"b"===n?"\b":"f"===n?"\f":"n"===n?"\n":"r"===n?"\r":"t"===n?"\t":"v"===n?"\v":"\\"===n?"\\":"/"===n?"/":~t.indexOf(n)?n:e})}function Us(e){return Number(e)}function qs(e,t){var n,r,o=function(e,t){void 0===t&&(t={});var n=1,r=1,o=0,i=0,a=[i],s=[],u=!1!==(t=p({},t)).allowFilter;if(!t.isFilter){var l=Object.keys(js());t.filters&&l.push.apply(l,f([],d(Object.keys(t.filters)),!1)),t.isFilter=function(e){return l.includes(e)}}function c(e){a.push(i=e)}function h(){a.pop(),i=a[a.length-1]}function v(e){if(e&&"string"==typeof e){var t=e.split(/[\r\n]+/);return{index:o+e.length,line:n+t.length-1,column:r+t[t.length-1].length}}return{index:o,line:n,column:r}}return(t.evalMode||t.variableMode)&&c(2),{next:function(){var a=s.length?s.shift():(1!==i&&2!==i&&3!==i||function(){for(;o<e.length;){var t=e[o];if("\r"===t)o++,n++,r=1,"\n"===e.charAt(o)&&o++;else if("\n"===t)o++,n++,r=1;else{if("\t"!==t&&" "!==t)break;o++,r++}}}(),function(){if(o>=e.length)return{type:Rs[6],value:void 0,start:v(),end:v()}}()||function(){if(0!==i)return null;for(var t="",n=0,r=o;r<e.length;){var a=e[r];if(1===n){if(!Ms.hasOwnProperty(a)&&"$"!==a){var u=v(t+a);throw new SyntaxError("Unexpected token ".concat(a," in ").concat(u.line,":").concat(u.column))}t+=a,r++,n=0}else{if("\\"===a){t+=a,r++,n=1;continue}if("$"===a){var l=e[r+1];if("{"===l)break;if("$"===l){s.push({type:Rs[3],value:"&",raw:"$$",start:v(e.substring(o,r)),end:v(e.substring(o,r+2))});break}var c=/^[a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*/.exec(e.substring(r+1));if(c){s.push({type:Rs[3],value:c[0],raw:c[0],start:v(e.substring(o,r)),end:v(e.substring(o,r+1+c[0].length))});break}}r++,t+=a}}return r>o?{type:Rs[2],value:Bs(t,["`","$"]),raw:t,start:v(),end:v(t)}:s.length?s.shift():null}()||function(){if(4===i||2===i)return null;if("$"===e[o]&&"{"===e[o+1]){c(1);var t=e.substring(o,o+2);return{type:Rs[4],value:t,start:v(),end:v(t)}}return null}()||function(){if(1!==i&&2!==i&&3!==i&&5!==i)return null;var n,r,a=function(){var t=e.substring(o).match(/^\w{4,10}/);if(!t)return null;var n=t[0].toLowerCase(),r=n,i=!1;return"true"===n||"null"===n?(i=!0,r="true"===n||null):"false"===n?(i=!0,r=!1):"undefined"===n&&(i=!0,r=void 0),i?{type:!0===r||!1===r?Rs[1]:Rs[8],value:r,raw:n,start:v(),end:v(n)}:null}()||((r=((null==t?void 0:t.variableMode)?/^[\u4e00-\u9fa5A-Za-z0-9_$@][\u4e00-\u9fa5A-Za-z0-9_\-$@]*/:/^(?:[\u4e00-\u9fa5A-Za-z_$@]([\u4e00-\u9fa5A-Za-z0-9_$@]|\\(?:\.|\[|\]|\(|\)|\{|\}|\s|=|!|>|<|\||&|\+|-|\*|\/|\^|~|%|&|\?|:|;|,))*|\d+[\u4e00-\u9fa5A-Za-z_$@](?:[\u4e00-\u9fa5A-Za-z0-9_$@]|\\(?:\.|\[|\]|\(|\)|\{|\}|\s|=|!|>|<|\||&|\+|-|\*|\/|\^|~|%|&|\?|:|;|,))*)/).exec(e.substring(o,o+256)))?{type:Rs[7],value:r[0].replace(/\\(\.|\[|\]|\(|\)|\{|\}|\s|=|!|>|<|\||&|\+|-|\*|\/|\^|~|%|&|\?|:|;|,)/g,function(e,t){return t}),start:v(),end:v(r[0])}:null)||function(){var t=o,n=t,r=0;e:for(;t<e.length;){var i=e.charAt(t);switch(r){case 0:if("0"===i)n=t+1,r=1;else{if(!Ls(i))return null;n=t+1,r=2}break;case 1:if("."===i)r=3;else{if(!zs(i))break e;r=5}break;case 2:if($s(i))n=t+1;else if("."===i)r=3;else{if(!zs(i))break e;r=5}break;case 3:if(!$s(i))break e;n=t+1,r=4;break;case 4:if($s(i))n=t+1;else{if(!zs(i))break e;r=5}}t++}if(n>0){var a=e.slice(o,n);return{type:Rs[9],value:Us(a),raw:a,start:v(),end:v(a)}}return null}()||function(){for(var t='"',n=0,r=o;r<e.length;){var i=e[r];if(0===n){if('"'!==i&&"'"!==i)break;t=i,r++,n=1}else if(2===n){if(!Ms.hasOwnProperty(i)&&i!==t){var a=v(e.substring(o,r+1));throw new SyntaxError("Unexpected token ".concat(i," in ").concat(a.line,":").concat(a.column))}r++,n=1}else if("\\"===i)r++,n=2;else{if(i===t){r++;break}r++}}if(r>o){var s=e.substring(o,r);return{type:Rs[11],value:Bs(s.substring(1,s.length-1),[t]),raw:s,start:v(),end:v(s)}}return null}()||((n=Vs.find(function(t){return e.substring(o,o+t.length)===t}))?{type:Rs[10],value:n,start:v(),end:v(n)}:null)||function(){if(5!==i)return null;var t=o,n=e[t];if("\\"===n){var r=e[t+1];if("$"!==r&&!~Vs.indexOf(r)&&!Ms.hasOwnProperty(r)){var a=v(e.substring(o,o+2));throw new SyntaxError("Unexpected token ".concat(r," in ").concat(a.line,":").concat(a.column))}t++,n="b"===r?"\b":"f"===r?"\f":"n"===r?"\n":"r"===r?"\r":"t"===r?"\t":"v"===r?"\v":r}return{type:Rs[17],value:n,start:v(),end:v(e.substring(o,t+1))}}();if("{"===(null==a?void 0:a.value)&&"Punctuator"==a.type)c(3);else if("}"===(null==a?void 0:a.value)&&"Punctuator"==a.type){5===i&&h();var s=i;if(h(),1===s||2===s)return{type:Rs[2===s?15:5],value:a.value,start:v(),end:v(a.value)}}if(1===i&&"Punctuator"==(null==a?void 0:a.type)&&"|"===a.value&&u){if(null==t?void 0:t.isFilter){var l=e.substring(a.start.index+1).trim(),d=/^[A-Za-z0-9_$@][A-Za-z0-9_\-$@]*/.exec(l);if(!d||!t.isFilter(d[0]))return a}return c(5),{type:Rs[16],value:"|",start:v(),end:v("|")}}return 5===i&&"|"===(null==a?void 0:a.value)&&"Punctuator"==a.type?{type:Rs[16],value:"|",start:v(),end:v("|")}:a||"`"!==e[o]?a:(c(4),{type:Rs[10],value:"`",start:v(),end:v("`")})}()||function(){if(4!==i)return null;for(var t=0,n=o;n<e.length;){var r=e[n];if(2===t){if(!Ms.hasOwnProperty(r)&&"`"!==r&&"$"!==r){var a=v(e.substring(o,n+1));throw new SyntaxError("Unexpected token ".concat(r," in ").concat(a.line,":").concat(a.column))}n++,t=1}else if("\\"===r)n++,t=2;else{if("`"===r){h(),s.push({type:Rs[10],value:"`",start:v(e.substring(o,n)),end:v(e.substring(o,n+1))});break}if("$"===r){if("{"===e[n+1]){c(2),s.push({type:Rs[14],value:"${",start:v(e.substring(o,n)),end:v(e.substring(o,n+2))});break}n++}else n++}}if(n>o){var u=e.substring(o,n);return{type:Rs[13],value:Bs(u,["`","$"]),raw:u,start:v(),end:v(u)}}return s.length?s.shift():null}());if(a)return o=a.end.index,n=a.end.line,r=a.end.column,a;var l=v();throw new SyntaxError('unexpected character "'.concat(e[o],'" at ').concat(l.line,":").concat(l.column))}}}(e,t),i=[],a=[],s=null!==(n=null==t?void 0:t.variableNamespaces)&&void 0!==n?n:["window","cookie","ls","ss"];function u(){if(!(r=a.length?a.shift():o.next()))throw new TypeError("next token is undefined");i.push(r)}function l(){a.unshift(i.pop()),r=i[i.length-1]}function c(e){return r.type===Rs[10]&&(Array.isArray(e)?~e.indexOf(r.value):r.value===e)}function h(){throw TypeError("Unexpected token ".concat(r.value||r.type," in ").concat(r.start.line,":").concat(r.start.column))}function v(e){return e||h(),e}function m(){return B()}function y(){for(;r.type===Rs[17]&&/^\s+$/m.test(r.value);)u()}function g(){for(var e=[];!c(":")&&r.type!==Rs[16]&&r.type!==Rs[5];){var t=M()||j()||F()||R()||L()||q()||z();t?e.push(t):(v(~[Rs[7],Rs[10],Rs[17]].indexOf(r.type)),e.length&&"string"==typeof e[e.length-1]?e[e.length-1]+=r.raw||r.value:e.push(r.raw||r.value),u())}return e.length&&"string"==typeof e[e.length-1]&&(e[e.length-1]=e[e.length-1].replace(/\s+$/,""),e[e.length-1]||e.pop()),e}function b(e,t,n,r,o,i){var a;void 0===r&&(r=n),void 0===o&&(o="left"),void 0===i&&(i="right");var s=n();if(!s)return null;if(c(t))for(;c(t);){u();var l=v(r());(a={type:e,op:t})[o]=s,a[i]=l,a.start=s.start,a.end=l.end,s=a}return s}function w(){return b("and","&&",x)}function x(){return b("binary","|",E)}function E(){return b("binary","^",O)}function O(){return b("binary","&",S)}function S(){return b("eq","==",function(){return b("ne","!=",function(){return b("streq","===",function(){return b("strneq","!==",A)})})})}function A(){return b("lt","<",function(){return b("gt",">",function(){return b("le","<=",function(){return b("ge",">=",C)})})})}function C(){return b("shift","<<",function(){return b("shift",">>",function(){return b("shift",">>>",_)})})}function _(){return b("add","+",function(){return b("minus","-",D)})}function D(){return b("multiply","*",function(){return b("divide","/",function(){return b("remainder","%",N)})})}function N(){return b("power","**",k)}function k(){for(var e=["+","-","~","!"],t=[];c(e);)t.push(r),u();var n=I();for(v(!t.length||n);t.length;){var o=t.pop();n={type:"unary",op:o.value,value:n,start:o.start,end:o.end}}return n}function I(e){void 0===e&&(e=T);var t=e();if(!t)return null;for(;c("[")||c(".");){var n=c(".");u();var r=v(n?V()||j()||q():m());n||(v(c("]")),u()),t={type:"getter",host:t,key:r,start:t.start,end:r.end}}return t}function T(){return function(){if(r.type===Rs[7]){var e=r;if(u(),c("(")){var t=$();return v(t),{type:"func_call",identifier:e.value,args:null==t?void 0:t.body,start:e.start,end:t.end}}l()}return null}()||function(){var e,t=function(e,t){void 0===e&&(e="("),void 0===t&&(t=")");var n=0,o=function(){for(;n-- >0;)l();return null};if(c(e)){var i=r,a=i;u(),n++;for(var s=[],d=0;!c(t);)if(1===d||0===d){var p=W(!1);if(!p)return o();n++,s.push(p),d=2}else{if(2!==d||!c(","))return o();u(),n++,d=1}return c(t)?(a=r,u(),{type:"arg-list",body:s,start:i.start,end:a.end}):o()}return null}()||W(),n=[];if("variable"===(null==t?void 0:t.type)?(n=[t],e=t.start):"arg-list"===(null==t?void 0:t.type)&&(e=t.start,n=t.body),Array.isArray(n)&&c("=")){if(u(),c(">")){u();var o=v(m());return{type:"anonymous_function",args:n,return:o,start:e,end:o.end}}l()}return t}()||W()||M()||j()||F()||R()||L()||z()||function(){var e=$();return 1===(null==e?void 0:e.body.length)?e.body[0]:e}()||q()}function P(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!1),(e?W():V())||F()||j()||(t?function(){if(c("[")){u();var e=v(R());return v(c("]")),u(),e}return null}():R())}function F(){if(r.type===Rs[11]){var e=r;return u(),{type:"string",value:e.value,start:e.start,end:e.end}}return null}function j(){if(r.type===Rs[9]){var e=r.value,t=r;return u(),{type:"literal",value:e,start:t.start,end:t.end}}return null}function R(){if(c("`")){var e=r,t=e;u();for(var n=0,o={type:"template",body:[],start:e.start,end:e.end};;)if(1===n){var i=v(m());o.body.push(i),v(r.type===Rs[15]),u(),n=0}else{if(c("`")){t=r,u();break}r.type===Rs[14]?(u(),n=1):r.type===Rs[13]?(o.body.push({type:"template_raw",value:r.value,start:r.start,end:r.end}),u()):h()}return o.end=t.end,o}return null}function V(){if(r.type===Rs[7]){var e=r;return u(),{type:"identifier",name:e.value,start:e.start,end:e.end}}return null}function M(){if(r.type===Rs[8]||r.type===Rs[1]){var e=r.value,t=r;return u(),{type:"literal",value:e,start:t.start,end:t.end}}return null}function L(){if(c("[")){var e=$("[","]");return v(e),{type:"array",members:null==e?void 0:e.body,start:e.start,end:e.end}}return null}function $(e,t){if(void 0===e&&(e="("),void 0===t&&(t=")"),c(e)){var n=r,o=void 0;u();for(var i=[],a=0;;)if(1!==a&&c(t)){if(c(t)){o=r,u();break}}else{var s=v(m());i.push(s),a=0,c(",")&&(u(),a=1)}return{type:"expression-list",body:i,start:n.start,end:o.end}}return null}function z(){if(c("{")){var e=r,t=e;u();for(var n={type:"object",members:[],start:e.start,end:e.end},o=0,i=void 0,a=void 0;;)if(1===o)v(c(":")),u(),o=2;else if(2===o)a=v(m()),n.members.push({key:i,value:a}),o=3;else if(3===o)if(c(","))u(),o=4;else{if(c("}")){t=r,u();break}h()}else{if(4!=o&&c("}")){t=r,u();break}i=v(P(!1,!0)),o=1}return n.end=t.end,n}return null}function B(){return function(){var e=b("or","||",w);if(!e)return null;if(c("?")){u();var t=B();v(t),v(c(":")),u();var n=B();return v(n),{type:"conditional",test:e,consequent:t,alternate:n,start:e.start,end:n.end}}return e}()}function U(){if(r.type!==Rs[2])return null;var e=r;return u(),{type:"raw",value:e.value,start:e.start,end:e.end}}function q(){if(r.type!==Rs[4])return null;var e,t=r;u();var n=v(function(){for(var e=m(),t=[];r.type===Rs[16];){u(),y();var n=v(V()).name,o=[];for(y();c(":");){u(),y();var i=g();1===i.length?i=i[0]:i.length||(i=""),o.push(Array.isArray(i)?{type:"mixed",body:i}:i)}t.push({name:n,args:o})}return t.length&&(e={type:"filter",input:e,filters:t,start:e.start,end:t[t.length-1].end}),e}());return v(r.type===Rs[5]),e=r,u(),{type:"script",body:n,start:t.start,end:e.end}}function W(e){if(void 0===e&&(e=!0),r.type===Rs[7]){var t=r;if(u(),e&&c(":")&&~s.indexOf(t.value)){u();var n=v(I());return{type:"ns-variable",namespace:t.value,body:n,start:t.start,end:n.end}}return{type:"variable",name:t.value,start:t.start,end:t.end}}if(c("&")){var o=r;return u(),{type:"variable",name:"&",start:o.start,end:o.end}}return null}function H(){if(r.type!==Rs[3])return null;var e=r;return u(),{type:"script",body:e.value.split(".").reduce(function(t,n){return t?{type:"getter",host:t,key:n,start:e.start,end:e.end}:{type:"variable",name:n,start:e.start,end:e.end}},null),start:e.start,end:e.end}}Array.isArray(s)||(s=[]),u();var G=(null==t?void 0:t.variableMode)?I(W):(null==t?void 0:t.evalMode)?m():function(){for(var e={type:"document",body:[],start:r.start,end:r.end};r.type!==Rs[6];){var t=U()||q()||H();if(!t)break;e.body.push(t)}return e.body.length&&(e.end=e.body[e.body.length-1].end),e}();return v((null==r?void 0:r.type)===Rs[6]),G}function Ws(e,t,n){var r=e;return"string"==typeof e&&(r=qs(e,n)),new j(t,n).evalute(r)}function Hs(){return u(this,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,import("./doc-CmSOujco.js")];case 1:return e.sent(),[2,Object.entries(M).map(function(e){var t=d(e,2);return{groupName:t[0],items:t[1]}})]}})})}j.extendDefaultFilters(js()),Ts.setDefaultFilters(js());var Gs=function(){function e(e,t){this.visitCountOrder=[],this.keyOrderMatrixForByCount={},this.capacity=e,this.cache=/* @__PURE__ */new Map,this.releaseCount=this.capacity*(t||1/8)|0||1}return e.prototype.updateCacheEntryOrder=function(e,t,n){var r=t.visitCount,o=this.keyOrderMatrixForByCount[r];if(Array.isArray(o)){var i=o.indexOf(e);-1!==i&&o.splice(i,1)}this.keyOrderMatrixForByCount[n]=Array.isArray(this.keyOrderMatrixForByCount[n])?f(f([],d(this.keyOrderMatrixForByCount[n]),!1),[e],!1):[e],t.visitCount=n,this.visitCountOrder=f([],d(new Set(f(f([],d(this.visitCountOrder),!1),[n],!1))),!1).sort(function(e,t){return e-t})},e.prototype.get=function(e){if(this.cache.has(e)){var t=this.cache.get(e);if(void 0!==t){var n=t.visitCount;return this.updateCacheEntryOrder(e,t,n+1),t.value}}},e.prototype.set=function(e,t){if(this.cache.has(e)){var n=this.cache.get(e);if(void 0!==n){var r=n.visitCount;this.updateCacheEntryOrder(e,n,r+1),n.value=t}}else{if(this.cache.size===this.capacity)for(var o=this.releaseCount,i=0,a=0;a<o&&i<=this.visitCountOrder.length-1;){var s=this.visitCountOrder[i],u=this.keyOrderMatrixForByCount[s];if(u.length)for(;u.length>0&&a<o;)this.cache.delete(u.shift()),a++;else i++}var l={visitCount:1,value:t};this.cache.set(e,l),this.updateCacheEntryOrder(e,l,1)}},e.prototype.has=function(e){return this.cache.has(e)},e}(),Ks=new Gs(40);function Ys(e,t){if(void 0===t&&(t={evalMode:!1}),"string"==typeof e){var n=e+JSON.stringify(t);if(Ks.has(n))return Ks.get(n);var r=qs(e,t);return Ks.set(n,r),r}}var Js={};function Xs(e,t){var n="".concat(e).concat((null==t?void 0:t.evalMode)?"-eval":"").concat((null==t?void 0:t.allowFilter)?"-filter":"").concat((null==t?void 0:t.variableMode)?"-variable":""),r=Js[n]||qs(e,t);return Js[n]=r,r}var Zs=function(e,t,n){if(void 0===n&&(n="| html"),!e||"string"!=typeof e)return e;try{var r=Xs(e,{evalMode:!1,allowFilter:!0}),o=new j(t,{defaultFilter:n}).evalute(r);return"".concat(null==o?"":o)}catch(tE){return console.warn(tE),e}},Qs=function(e,t,n,r){if(void 0===t&&(t={}),void 0===n&&(n="| html"),void 0===r&&(r=function(e){return e}),e&&"string"==typeof e)try{var o=Xs(e,{evalMode:!1,allowFilter:!0}),i=new j(t,{defaultFilter:n}).evalute(o);return null!=i||~e.indexOf("default")||~e.indexOf("now")?i:r(i)}catch(tE){return void console.warn(tE)}};function eu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tu(e){return tu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tu(e)}var nu=e(()=>{}),ru=e(()=>{nu()});function ou(e){var t=function(e){if("object"!=tu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tu(t)?t:t+""}var iu=e(()=>{nu(),ru()});function au(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ou(r.key),r)}}function su(e,t,n){return t&&au(e.prototype,t),n&&au(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function uu(e,t,n){return(t=ou(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}iu();var lu=e(()=>{iu()});function cu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function du(e,t){if(e){if("string"==typeof e)return cu(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cu(e,t):void 0}}function pu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||du(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fu(){return"function"==typeof BigInt}function hu(e){return!e&&0!==e&&!Number.isNaN(e)||!String(e).trim()}function vu(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),(t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,"")).startsWith(".")&&(t="0".concat(t));var r=t||"0",o=r.split("."),i=o[0]||"0",a=o[1]||"0";"0"===i&&"0"===a&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:r,integerStr:i,decimalStr:a,fullStr:"".concat(s).concat(r)}}function mu(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function yu(e){var t=pu(e.toLowerCase().split("e"),2),n=t[0],r=t[1],o=void 0===r?"0":r,i=n.startsWith("-"),a=pu((i?n.slice(1):n).split("."),2),s=a[0],u=void 0===s?"0":s,l=a[1],c=void 0===l?"":l;return{decimal:c,digits:"".concat(u).concat(c).replace(/^0+/,"")||"0",exponent:Number(o),integer:u,negative:i}}function gu(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function bu(e){var t=String(e);return mu(e)?gu(yu(t)):t.includes(".")&&xu(t)?t.length-t.indexOf(".")-1:0}function wu(e){var t=String(e);if(mu(e)){if(e>Number.MAX_SAFE_INTEGER)return String(fu()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(fu()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);var n=yu(t),r=gu(n);t=r>100?function(e){var t=e.decimal,n=e.digits,r=e.exponent,o=e.integer,i=e.negative;if("0"===n)return"0";var a,s=o.replace(/^0+/,"").length,u=(t.match(/^0*/)||[""])[0].length,l=(s||-u)+r;return a=l<=0?"0.".concat("0".repeat(-l)).concat(n):l>=n.length?"".concat(n).concat("0".repeat(l-n.length)):"".concat(n.slice(0,l),".").concat(n.slice(l)),"".concat(i?"-":"").concat(a)}(n):e.toFixed(r)}return vu(t).fullStr}function xu(e){return"number"==typeof e?!Number.isNaN(e):!!e&&(/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e))}lu();var Eu=/* @__PURE__ */function(){function e(t){if(eu(this,e),uu(this,"origin",""),uu(this,"negative",void 0),uu(this,"integer",void 0),uu(this,"decimal",void 0),uu(this,"decimalLen",void 0),uu(this,"empty",void 0),uu(this,"nan",void 0),hu(t))this.empty=!0;else if(this.origin=String(t),"-"===t||Number.isNaN(t))this.nan=!0;else{var n=t;if(mu(n)&&(n=Number(n)),xu(n="string"==typeof n?n:wu(n))){var r=vu(n);this.negative=r.negative;var o=r.trimStr.split(".");this.integer=BigInt(o[0]);var i=o[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}}return su(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(e){var t="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(e,"0"));return BigInt(t)}},{key:"negate",value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:"cal",value:function(t,n,r){var o=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),i=n(this.alignDecimal(o),t.alignDecimal(o)).toString(),a=r(o),s=vu(i),u=s.negativeStr,l=s.trimStr,c="".concat(u).concat(l.padStart(a+1,"0"));return new e("".concat(c.slice(0,-a),".").concat(c.slice(-a)))}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:"multi",value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return 2*e})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(e){return this.toString()===(null==e?void 0:e.toString())}},{key:"lessEquals",value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?this.origin:this.isInvalidate()?"":vu("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr}}]),e}();lu();var Ou=/* @__PURE__ */function(){function e(t){eu(this,e),uu(this,"origin",""),uu(this,"number",void 0),uu(this,"empty",void 0),hu(t)?this.empty=!0:(this.origin=String(t),this.number=Number(t))}return su(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(bu(this.number),bu(n));return new e(r.toFixed(o))}},{key:"multi",value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(bu(this.number),bu(n));return new e(r.toFixed(o))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(e){return this.toNumber()===(null==e?void 0:e.toNumber())}},{key:"lessEquals",value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?this.origin:this.isInvalidate()?"":mu(this.number)&&bu(this.number)>100?String(this.number):wu(this.number)}}]),e}();function Su(e){return fu()?new Eu(e):new Ou(e)}function Au(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(""===e)return"";var o=vu(e),i=o.negativeStr,a=o.integerStr,s=o.decimalStr,u="".concat(t).concat(s),l="".concat(i).concat(a);if(n>=0){var c=Number(s[n]);return c>=5&&!r?Au(Su(e).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-c)).toString(),t,n,r):0===n?l:"".concat(l).concat(t).concat(s.padEnd(n,"0").slice(0,n))}return".0"===u?l:"".concat(l).concat(u)}var Cu=Su,_u=function(e,t,n,r,i){return void 0===t&&(t={}),void 0===n&&(n="| html"),void 0===r&&(r=function(e){return e}),void 0===i&&(i=!1),u(void 0,void 0,void 0,function(){var a,s,u;return o(this,function(o){switch(o.label){case 0:if(!e||"string"!=typeof e)return[2,void 0];o.label=1;case 1:return o.trys.push([1,3,,4]),a=Ys(e,{evalMode:!1,allowFilter:!0}),[4,new Ts(t,{defaultFilter:n}).evalute(a)];case 2:return[2,null!=(s=o.sent())||~e.indexOf("default")||~e.indexOf("now")?s:r(s)];case 3:if("FormulaEvalError"===(u=o.sent()).name){if(!i)return[2,void 0];throw u}return console.warn(u),[2,void 0];case 4:return[2]}})})},Du=function(e){void 0===e&&(e="");var t=[];return e.charCodeAt(0)===".".charCodeAt(0)&&t.push(""),e.replace(/* @__PURE__ */new RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),function(e,n,r,o){var i=e;return r?i=o.replace(/\\(\\)?/g,"$1"):n&&(i=n.trim()),t.push(i),""}),t};function Nu(e,t,n){if(void 0===n&&(n=!0),e&&t&&"object"==typeof e)return(n?t in e:e.hasOwnProperty(t))?e[t]:Du(t).reduce(function(e,t){return e&&"object"==typeof e&&(n?t in e:e.hasOwnProperty(t))?e[t]:void 0},e)}function ku(e,t,n){if(void 0===t&&(t={}),"&"===e||"$$"==e)return t;if(e&&"string"==typeof e){if(!~e.indexOf(":"))return Nu(t,"$"===e[0]?e.substring(1):e,n);try{return new j(t).evalute(Ys(e,{variableMode:!0,allowFilter:!1}))}catch(tE){return}}}var Iu=/* @__PURE__ */n((e,t)=>{t.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}),Tu=/* @__PURE__ */n((e,t)=>{var n=La(),r=ue();t.exports=function(e,t){return e&&n(e,t,r)}}),Pu=/* @__PURE__ */n((e,t)=>{var n=Iu(),r=qa(),o=Tu(),i=I(),a=R(),s=ie(),u=ve(),l=te(),c=Z(),d=ce();t.exports=function(e,t,p){var f=s(e),h=f||u(e)||d(e);if(t=i(t,4),null==p){var v=e&&e.constructor;p=h?f?new v:[]:c(e)&&l(v)?r(a(e)):{}}return(h?n:o)(e,function(e,n,r){return t(p,e,n,r)}),p}}),Fu=/* @__PURE__ */n((e,t)=>{t.exports=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}}),ju=/* @__PURE__ */n((e,t)=>{var n=ye();t.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&!1!==o(s[a],a,s););return r}}}),Ru=/* @__PURE__ */n((e,t)=>{var n=Tu(),r=ju()(n);t.exports=r}),Vu=/* @__PURE__ */n((e,t)=>{var n=Ru();t.exports=function(e,t,r,o){return n(e,function(e,n,i){t(o,e,r(e),i)}),o}}),Mu=/* @__PURE__ */n((e,t)=>{var n=Fu(),r=Vu(),o=I(),i=ie();t.exports=function(e,t){return function(a,s){var u=i(a)?n:r,l=t?t():{};return u(a,e,o(s,2),l)}}}),Lu=/* @__PURE__ */n((e,t)=>{var n=Ra(),r=Mu(),o=Object.prototype.hasOwnProperty,i=r(function(e,t,r){o.call(e,r)?e[r].push(t):n(e,r,[t])});t.exports=i}),$u=/* @__PURE__ */t(k());function zu(e,t,n){e&&Object.isFrozen(e)&&(e=Wu(e));var r=e?Object.create(e,p(p({},n),{__super:{value:e,writable:!1,enumerable:!1}})):Object.create(Object.prototype,n);return t&&Gu(t)&&Object.keys(t).forEach(function(e){return r[e]=t[e]}),r}function Bu(e){for(var t=e?[e]:[];null==e?void 0:e.__super;)t.unshift(e.__super),e=e.__super;return t}function Uu(e){return e.filter(function(e){return e}).reduce(function(e,t){return e=e||Object.prototype,Object.isFrozen(e)&&(e=Wu(e)),Object.assign(Object.create(e,{__super:{value:e,writable:!1,enumerable:!1}}),t)})}function qu(e,t){var n=Bu(e);return n.splice(n.length-1,0,t),Uu(n)}function Wu(e,t){void 0===t&&(t=!0);var n=e&&e.__super?Object.create(e.__super,{__super:{value:e.__super,writable:!1,enumerable:!1}}):Object.create(Object.prototype);return t&&e&&Object.keys(e).forEach(function(t){return n[t]=e[t]}),n}function Hu(e,t,n){void 0===n&&(n=!0);var r=Wu(e,n);return t&&Object.keys(t).forEach(function(e){return r[e]=t[e]}),r}function Gu(e){var t=typeof e;return e&&"string"!==t&&"number"!==t&&"boolean"!==t&&"function"!==t&&!Array.isArray(e)}function Ku(e,t,n,r){if(t in(e=e||{}))e[t]=n;else{for(var o=!1!==r?Du(t):[t],i=o.pop(),a=[];o.length;){var s=e,u=o.shift();if((0,$u.default)(e[u]))e=e[u]=p({},e[u]);else if(Array.isArray(e[u]))e[u]=e[u].concat(),e=e[u];else if(e[u])e[u]={},e=e[u];else{if(/^\d+$/.test(u)&&a.length){var l=a[a.length-1];Array.isArray(l.host[l.key])||Object.keys(l.host[l.key]).length||(s=e=l.host[l.key]=[])}e[u]={},e=e[u]}a.push({host:s,key:u})}e[i]=n}}function Yu(e,t){if(e)if(e.hasOwnProperty(t))delete e[t];else{for(var n=Du(t),r=n.pop();n.length;){var o=n.shift();if(!(0,$u.default)(e[o])){if(e[o])throw new Error("目标路径不是纯对象,不能修改");break}e=e[o]=p({},e[o])}e&&e.hasOwnProperty&&e.hasOwnProperty(r)&&delete e[r]}}function Ju(e,t){var n,r;if(!e||(r=e.split(","))&&r.length<2){var o=e.indexOf("~");if(~o){var i=e.substring(0,o),a=e.substring(o+1);return(n={})[i]=ku(a,t),n}return ku(e,t)}var s={};return r.forEach(function(e){var n=e.indexOf("~"),r=e;~n&&(r=e.substring(n+1),e=e.substring(0,n)),Ku(s,e,ku(r,t))}),s}function Xu(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),"string"!=typeof e)throw new TypeError("Expected a string");return new RegExp(e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),"".concat(t?"":"i").concat(n?"g":""))}var Zu={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Qu=function(e){return String(e).replace(/[&<>"'\/]/g,function(e){return Zu[e]})},el=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],tl=function(e,t){if(void 0===t&&(t=1e3),e&&"string"==typeof e){if(e.endsWith("B"))return e;e=parseFloat(e)}if(!Number.isFinite(e))throw new TypeError("Expected a finite number, got ".concat(typeof e,": ").concat(e));var n=e<0;if(n&&(e=-e),e<1)return(n?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(t)),el.length-1);return(n?"-":"")+Number((e/Math.pow(t,r)).toPrecision(3))+" "+el[r]};function nl(e,t){return void 0===t&&(t=16),"number"!=typeof e||Number.isInteger(e)?e:parseFloat(Au(e.toString(),".",t))}S();var rl={year:"Y",month:"M",week:"w",weekday:"W",day:"d",hour:"h",minute:"m",min:"m",second:"s",millisecond:"ms"},ol=/^(.+)?(\+|-)(\d+)(minute|min|hour|day|week|month|year|weekday|second|millisecond)s?$/i,il=function(e,t,n,r){void 0===t&&(t={}),void 0===n&&(n="X"),void 0===r&&(r=!1);var o,i=r?b.utc:b;"string"==typeof e&&(e=e.trim());var a=/* @__PURE__ */new Date;if((e="string"==typeof e?Qs(e,zu(t,{now:i().toDate(),today:i([a.getFullYear(),a.getMonth(),a.getDate()])}),"| raw"):e)&&"string"==typeof e&&(o=ol.exec(e))){var s=/* @__PURE__ */new Date,u=parseInt(o[3],10),l=o[1]?il(o[1],t,n,r):i(/(minute|min|hour|second)s?/.test(o[4])?[s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()]:[s.getFullYear(),s.getMonth(),s.getDate()]);return"-"===o[2]?l.subtract(u,rl[o[4]]):l.add(u,rl[o[4]])}if("now"===e)return i();if("today"===e){var c=/* @__PURE__ */new Date;return i([c.getFullYear(),c.getMonth(),c.getDate()])}var d=[i(e,n),i(e)].find(function(e){return e.isValid()})||i(e);return r?d.local():d};function al(e){var t=/^((?:\-|\+)?(?:\d*\.)?\d+)(minute|min|hour|day|week|month|quarter|year|weekday|second|millisecond)s?$/.exec(e);if(t){var n=b.duration(parseFloat(t[1]),t[2]);if(b.isDuration(n))return n}}function sl(e,t,n){if(e&&"0"!==e){var r=(null==n?void 0:n.utc)?b.utc(e,t).local():b(e,t,!0);if(r.isValid())return r;if("string"==typeof e||"number"==typeof e){var o=["","YYYY-MM-DD HH:mm:ss","X"];for(/^\d{10}((\.\d+)*)$/.test(e.toString())?o=["X","x","YYYY-MM-DD HH:mm:ss",""]:/^\d{13}((\.\d+)*)$/.test(e.toString())&&(o=["x","X","YYYY-MM-DD HH:mm:ss",""]);o.length;){var i=b(e,o.shift());if(i.isValid())return i}}}}S();var ul,ll=/* @__PURE__ */t(Pu()),cl=/* @__PURE__ */t(Lu()),dl=/* @__PURE__ */t(U()),pl=/* @__PURE__ */t(Pa());function fl(e,t,n,r,o,i,a){var s,u,l;void 0===a&&(a=1),(t||r)&&function(e){for(var t;~["isTrue","isFalse","isMatch","isEquals","notMatch","notEquals"].indexOf(null===(t=e[0])||void 0===t?void 0:t.name);)e.shift()}(n.restFilters);var c=r?o:i,d=r?null===(s=n.filter)||void 0===s?void 0:s.args[0+a]:null===(u=n.filter)||void 0===u?void 0:u.args[1+a];return r||t?null!==(l=hl(c,n.data,d))&&void 0!==l?l:c:e}function hl(e,t,n){return(null==n?void 0:n.type)&&"literal"!==n.type?e:"string"==typeof e&&/,/.test(e)?e.split(/\s*,\s*/).filter(function(e){return e}):"string"==typeof e?ku(e,t):e}function vl(e){return e&&"string"==typeof e?/^\[.*\]$/.test(e)?e.substring(1,e.length-1).split(/\s*,\s*/).filter(function(e){return e}):e.split(/\s*,\s*/).filter(function(e){return e}):e}ul={map:function(e,t){for(var n=this,r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return Array.isArray(e)&&Fs[t]?e.map(function(e){var o;return(o=Fs[t]).call.apply(o,f([n,e],d(r),!1))}):e},html:function(e){return null==e?e:Qu(e)},json:function(e,t){return void 0===t&&(t=2),t?JSON.stringify(e,null,parseInt(t,10)):JSON.stringify(e)},toJson:function(e){if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(tE){return null}},toInt:function(e){return"string"==typeof e?parseInt(e,10):e},toFloat:function(e){return"string"==typeof e?parseFloat(e):e},raw:function(e){return e},now:function(){/* @__PURE__ */
|
|
2
|
-
return new Date},toDate:function(e,t){void 0===t&&(t="");var n=b(e,t);return n.isValid()?n.toDate():void 0},fromNow:function(e,t){return void 0===t&&(t=""),b(e,t).fromNow()},dateModify:function(e,t,n,r){return void 0===t&&(t="add"),void 0===n&&(n=0),void 0===r&&(r="days"),e instanceof Date||(e=b(e).isValid()?b(e).toDate():b().toDate()),"endOf"===t||"startOf"===t?b(e)["endOf"===t?"endOf":"startOf"](n||"day").toDate():b(e)["add"===t?"add":"subtract"](parseInt(n,10)||0,r).toDate()},date:function(e,t,n){return void 0===t&&(t="LLL"),void 0===n&&(n="X"),b(e,n).format(t)},number:function(e){var t=String(e).split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},trim:function(e){return"string"==typeof e?e.trim():e},percent:function(e,t){void 0===t&&(t=0),e=parseFloat(e)||0,t=parseInt(t,10)||0;var n=100*e,r=Math.pow(10,t);return(Math.round(n*r)/r).toFixed(t)+"%"},duration:function(e){return e?function(e){for(var t=["秒","分","时","天","月","季","年"],n=[1,60,3600,86400,2592e3,7776e3,31104e3],r=n.length,o=[];r--;)n[r]&&e>=n[r]?(o.push(Math.floor(e/n[r])+t[r]),e%=n[r]):0===r&&e&&o.push((e.toFixed?e.toFixed(2):"0")+t[0]);return o.join("")}(e):e},bytes:function(e,t){var n;return void 0===t&&(t=1e3),e?tl(e,null!==(n=parseInt(t,10))&&void 0!==n?n:1e3):e},round:function(e,t){var n;if(void 0===t&&(t=2),isNaN(e))return 0;t=null!==(n=parseInt(t,10))&&void 0!==n?n:2;var r=Math.pow(10,t);return(Math.round(e*r)/r).toFixed(t)},truncate:function(e,t,n){return"string"!=typeof e?e:(n=n||"...",null==t?e:(t=parseInt(t,10)||200,e.substring(0,t)+(e.length>t?n:"")))},url_encode:function(e){return null==e?"":encodeURIComponent(e)},url_decode:function(e){var t,n;try{n=decodeURIComponent(e)}catch(tE){console.warn("[amis] ".concat(null!==(t=null==tE?void 0:tE.name)&&void 0!==t?t:"URIError",": input string is not valid."))}return n},default:function(e,t,n){var r;return void 0===n&&(n=!1),null!==(r=n?e:e||void 0)&&void 0!==r?r:function(){try{if("undefined"===t)return;return JSON.parse(t)}catch(tE){return t}}()},join:function(e,t){return e&&e.join?e.join(t):e},split:function(e,t){return void 0===t&&(t=","),"string"==typeof e?e.split(t):e},sortBy:function(e,t,n,r){return void 0===t&&(t="&"),void 0===n&&(n="alpha"),Array.isArray(e)?e.sort(function(e,t,n){return function(r,o){if(!r||!o)return 0;var i=ku(e,r),a=ku(e,o);return("numerical"===t?(parseFloat(i)||0)-(parseFloat(a)||0):String(i).localeCompare(String(a)))*("desc"===n?-1:1)}}(t,n,r)):e},objectToArray:function(e,t,n){return void 0===t&&(t="label"),void 0===n&&(n="value"),(0,ll.default)(e,function(e,r,o){var i;(e||(e=[])).push(((i={})[t]=r,i[n]=o,i))},[])},unique:function(e,t){return Array.isArray(e)?t?(0,dl.default)(e,t):(0,pl.default)(e):e},topAndOther:function(e,t,n,r){if(void 0===t&&(t=10),void 0===n&&(n="name"),void 0===r&&(r="其他"),Array.isArray(e)&&t){var o=(0,cl.default)(e,function(n){var r=e.indexOf(n)+1;return r>=t?t:r});return Object.keys(o).map(function(e,i){var a=o[e].reduce(function(e,t){return Object.keys(t).forEach(function(n){e.hasOwnProperty(n)&&"labelField"!==n?"number"==typeof t[n]&&"number"==typeof e[n]?e[n]+=t[n]:"string"==typeof t[n]&&/^(?:\-|\.)\d/.test(t[n])&&"number"==typeof e[n]?e[n]+=parseFloat(t[n])||0:"string"==typeof t[n]&&"string"==typeof e[n]?e[n]+=", ".concat(t[n]):e[n]=t[n]:e[n]=t[n]}),e},{});return i===t-1&&(a[n]=r||"其他"),a})}return e},first:function(e){return e&&e[0]},nth:function(e,t){return void 0===t&&(t=0),e&&e[t]},last:function(e){return e&&(e.length?e[e.length-1]:null)},minus:function(e,t){var n;return void 0===t&&(t=1),nl((Number(e)||0)-Number(hl(t,this.data,null===(n=this.filter)||void 0===n?void 0:n.args[0])))},plus:function(e,t){var n;return void 0===t&&(t=1),nl((Number(e)||0)+Number(hl(t,this.data,null===(n=this.filter)||void 0===n?void 0:n.args[0])))},times:function(e,t){var n;return void 0===t&&(t=1),nl((Number(e)||0)*Number(hl(t,this.data,null===(n=this.filter)||void 0===n?void 0:n.args[0])))},division:function(e,t){var n;return void 0===t&&(t=1),nl((Number(e)||0)/Number(hl(t,this.data,null===(n=this.filter)||void 0===n?void 0:n.args[0])))},count:function(e){return Array.isArray(e)||"string"==typeof e?e.length:0},sum:function(e,t){return Array.isArray(e)?nl(e.reduce(function(e,n){return e+(parseFloat(t?Ju(t,n):n)||0)},0)):e},abs:function(e){return"number"==typeof e?Math.abs(e):e},pick:function(e,t){return void 0===t&&(t="&"),Array.isArray(e)&&!/^\d+$/.test(t)?e.map(function(e,n){return Ju(t,zu({index:n},e))}):Ju(t,e)},pick_if_exist:function(e,t){return void 0===t&&(t="&"),Array.isArray(e)?e.map(function(e){return ku(t,e)||e}):ku(t,e)||e},str2date:function(e,t,n){return void 0===t&&(t="X"),void 0===n&&(n="X"),e?il(e,this.data,t).format(n):""},asArray:function(e){return Array.isArray(e)?e:e?[e]:e},concat:function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return Array.isArray(e)?e.concat.apply(e,f([],d(n.map(function(e,n){var r;return hl(e,t.data,null===(r=t.filter)||void 0===r?void 0:r.args[n])})),!1)):e},filter:function(e,t,n,r){var o,i,a,s;if(!Array.isArray(e)||!t||!n)return e;var u=n,l=function(){return!0};if("isTrue"===u)l=function(e){return!!e};else if("isFalse"===u)l=function(e){return!e};else if("isExists"===u)l=function(e){return void 0!==e};else if("equals"===u||"equal"===u)r=r?hl(r,this.data,null===(o=this.filter)||void 0===o?void 0:o.args[2]):"",l=function(e){return r==e};else if("isIn"===u){var c=r?hl(r,this.data,null===(i=this.filter)||void 0===i?void 0:i.args[2]):[];c=vl(c),c=Array.isArray(c)?c:c?[c]:[],l=function(e){return!c.length||!!~c.indexOf(e)}}else if("notIn"===u){var d=r?hl(r,this.data,null===(a=this.filter)||void 0===a?void 0:a.args[2]):[];d=vl(d),d=Array.isArray(d)?d:d?[d]:[],l=function(e){return!~d.indexOf(e)}}else{if("match"!==u&&(u="match",r=n),!(r=r?hl(r,this.data,null===(s=this.filter)||void 0===s?void 0:s.args[2]):""))return e;var p=Xu("".concat(r),!1);l=function(e){return p.test(String(e))}}var f=/\s*\*\s*/.test(t);return t=t.split(/\s*,\s*/),e.filter(function(e){return(f?Object.keys(e):t).some(function(t){return l(ku(t,e),t,e)})})},base64Encode:function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))},base64Decode:function(e){return decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))},substring:function(e,t,n){return e&&"string"==typeof e?e.substring(t,n):e},lowerCase:function(e){return e&&"string"==typeof e?e.toLowerCase():e},upperCase:function(e){return e&&"string"==typeof e?e.toUpperCase():e},isTrue:function(e,t,n){return fl(e,arguments.length>2,this,!!e,t,n,0)},isFalse:function(e,t,n){return fl(e,arguments.length>2,this,!e,t,n,0)},isMatch:function(e,t,n,r){var o,i;return fl(e,arguments.length>3,this,(t=null!==(i=hl(t,this.data,null===(o=this.filter)||void 0===o?void 0:o.args[0]))&&void 0!==i?i:t)&&Xu("".concat(t),!1).test(String(e)),n,r)},notMatch:function(e,t,n,r){var o,i;return fl(e,arguments.length>3,this,(t=null!==(i=hl(t,this.data,null===(o=this.filter)||void 0===o?void 0:o.args[0]))&&void 0!==i?i:t)&&!Xu("".concat(t),!1).test(String(e)),n,r)},isEquals:function(e,t,n,r){var o,i;return t=null!==(i=hl(t,this.data,null===(o=this.filter)||void 0===o?void 0:o.args[0]))&&void 0!==i?i:t,fl(e,arguments.length>3,this,e===t,n,r)},notEquals:function(e,t,n,r){var o,i;return t=null!==(i=hl(t,this.data,null===(o=this.filter)||void 0===o?void 0:o.args[0]))&&void 0!==i?i:t,fl(e,arguments.length>3,this,e!==t,n,r)}},Object.assign(Fs,ul),j.extendDefaultFilters(Fs),S();var ml=/* @__PURE__ */n((e,t)=>{var n=ee(),r=Q(),o=k();t.exports=function(e){if(!r(e))return!1;var t=n(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!o(e)}}),yl=/* @__PURE__ */n((e,t)=>{var n=ns(),r=us(),o=ml(),i=r(function(e,t){try{return n(e,void 0,t)}catch(tE){return o(tE)?tE:new Error(tE)}});t.exports=i}),gl=/* @__PURE__ */n((e,t)=>{var n=y();t.exports=function(e,t){return n(t,function(t){return e[t]})}}),bl=/* @__PURE__ */n((e,t)=>{var n=K(),r=Object.prototype,o=r.hasOwnProperty;t.exports=function(e,t,i,a){return void 0===e||n(e,r[i])&&!o.call(a,i)?t:e}}),wl=/* @__PURE__ */n((e,t)=>{var n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=function(e){return"\\"+n[e]}}),xl=/* @__PURE__ */n((e,t)=>{t.exports=/<%=([\s\S]+?)%>/g}),El=/* @__PURE__ */n((e,t)=>{t.exports=/<%-([\s\S]+?)%>/g}),Ol=/* @__PURE__ */n((e,t)=>{t.exports=/<%([\s\S]+?)%>/g}),Sl=/* @__PURE__ */n((e,t)=>{var n=C(),r={escape:El(),evaluate:Ol(),interpolate:xl(),variable:"",imports:{_:{escape:n}}};t.exports=r}),Al=/* @__PURE__ */n((e,t)=>{var n=yl(),r=gl(),o=bl(),i=wl(),a=ml(),s=ls(),u=ue(),l=xl(),c=Sl(),d=w(),p=/\b__p \+= '';/g,f=/\b(__p \+=) '' \+/g,h=/(__e\(.*?\)|\b__t\)) \+\n'';/g,v=/[()=,{}\[\]\/\s]/,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,y=/($^)/,g=/['\n\r\u2028\u2029\\]/g,b=Object.prototype.hasOwnProperty;t.exports=function(e,t,w){var x=c.imports._.templateSettings||c;w&&s(e,t,w)&&(t=void 0),e=d(e),t=assignWith({},t,x,o);var E=assignWith({},t.imports,x.imports,o),O=u(E),S=r(E,O);arrayEach(O,function(e){if(v.test(e))throw new Error("Invalid `imports` option passed into `_.template`")});var A,C,_=0,D=t.interpolate||y,N="__p += '",k=RegExp((t.escape||y).source+"|"+D.source+"|"+(D===l?m:y).source+"|"+(t.evaluate||y).source+"|$","g"),I=b.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+"\n":"";e.replace(k,function(t,n,r,o,a,s){return r||(r=o),N+=e.slice(_,s).replace(g,i),n&&(A=!0,N+="' +\n__e("+n+") +\n'"),a&&(C=!0,N+="';\n"+a+";\n__p += '"),r&&(N+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),_=s+t.length,t}),N+="';\n";var T=b.call(t,"variable")&&t.variable;if(T){if(v.test(T))throw new Error("Invalid `variable` option passed into `_.template`")}else N="with (obj) {\n"+N+"\n}\n";N=(C?N.replace(p,""):N).replace(f,"$1").replace(h,"$1;"),N="function("+(T||"obj")+") {\n"+(T?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(A?", __e = _.escape":"")+(C?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+N+"return __p\n}";var P=n(function(){return Function(O,I+"return "+N).apply(void 0,S)});if(P.source=N,a(P))throw P;return P}}),Cl=/* @__PURE__ */t(Al());S();var _l={default:void 0,moment:b,countDown:function(e){if(!e)return"--";var t=/* @__PURE__ */new Date(1e3*parseInt(e,10)),n=Date.now();return t.getTime()<n?"已结束":Math.ceil((t.getTime()-n)/864e5)+"天"},formatDate:function(e,t,n){return void 0===t&&(t="LLL"),void 0===n&&(n=""),b(e,n).format(t)}},Dl={};function Nl(e,t){try{var n=js(),r=p(p(p({},n),{formatTimeStamp:n.date,formatNumber:n.number,defaultValue:n.defaut}),_l);return delete r.default,(Dl[e]||(Dl[e]=(0,Cl.default)(e,{imports:r,variable:"data",interpolate:/<%=([\s\S]+?)%>/g}))).call(t,t)}catch(tE){return'<span class="text-danger">'.concat(tE.message,"</span>")}}var kl=/* @__PURE__ */n((e,t)=>{t.exports=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}}),Il=/* @__PURE__ */n((e,t)=>{var n=kl(),r=x(),o=E(),i=w();t.exports=function(e,t,a){e=i(e),t=r(t);var s=e.length,u=a=void 0===a?s:n(o(a),0,s);return(a-=t.length)>=0&&e.slice(a,u)==t}}),Tl=/* @__PURE__ */n((e,t)=>{var n=we(),r=be(),o=de(),i=ie(),a=ye(),s=ve(),u=he(),l=ce(),c=Object.prototype.hasOwnProperty;t.exports=function(e){if(null==e)return!0;if(a(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||s(e)||l(e)||o(e)))return!e.length;var t=r(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!n(e).length;for(var d in e)if(c.call(e,d))return!1;return!0}}),Pl=/* @__PURE__ */n((e,t)=>{var n=kl(),r=x(),o=E(),i=w();t.exports=function(e,t,a){return e=i(e),a=null==a?0:n(o(a),0,e.length),t=r(t),e.slice(a,a+t.length)==t}});function Fl(e){if("string"==typeof e&&e.includes("$"))try{var t=Ys(e);return 1===(null==t?void 0:t.body.length)&&"script"===t.body[0].type}catch(n){return!1}return!1}var jl=/* @__PURE__ */t(V()),Rl=/* @__PURE__ */t(Il()),Vl=/* @__PURE__ */t(Tl()),Ml=/* @__PURE__ */t(xe()),Ll=/* @__PURE__ */t(Pl());S();var $l=/* @__PURE__ */t(v()),zl={},Bl=!0;function Ul(e,t,n){return void 0===n&&(n=!0),u(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:if(!(e&&e.conjunction&&Array.isArray(e.children)&&e.children.length))return[2,n];r.label=1;case 1:return r.trys.push([1,3,,6]),[4,Wl(e.children,e.conjunction,t)];case 2:return[2,r.sent()];case 3:return"FormulaEvalError"!==r.sent().name?[3,5]:[4,void 0];case 4:return[2,r.sent()];case 5:return[2,n];case 6:return[2]}})})}function ql(e,t,n){if(void 0===n&&(n=!0),!(e&&e.conjunction&&Array.isArray(e.children)&&e.children.length))return n;try{return Hl(e.children,e.conjunction,t)}catch(tE){if("FormulaEvalError"===tE.name)return;return n}}function Wl(e,t,n){return void 0===t&&(t="and"),u(this,void 0,void 0,function(){var r,i,a,s,u,l;return o(this,function(o){switch(o.label){case 0:r=!0,i=0,a=e.length,o.label=1;case 1:return i<a?(s=e[i]).conjunction&&Array.isArray(s.children)&&s.children.length?[4,Wl(s.children,s.conjunction,n)]:[3,3]:[3,7];case 2:return l=o.sent(),[3,5];case 3:return[4,Gl(s,0,n)];case 4:l=o.sent(),o.label=5;case 5:if(r=!!(u=l),u&&"or"===t||!u&&"and"===t)return[3,7];o.label=6;case 6:return i++,[3,1];case 7:return[2,r]}})})}function Hl(e,t,n){void 0===t&&(t="and");for(var r=!0,o=0,i=e.length;o<i;o++){var a=e[o],s=a.conjunction&&Array.isArray(a.children)&&a.children.length?Hl(a.children,a.conjunction,n):Kl(a,0,n);if(r=!!s,s&&"or"===t||!s&&"and"===t)break}return r}function Gl(e,t,n){var r;return u(this,void 0,void 0,function(){var t,i,a;return o(this,function(o){switch(o.label){case 0:return t=(0,jl.default)(n,e.left.field),[4,_u(e.right,n,void 0,void 0,!0)];case 1:return i=o.sent(),[2,(a=null!==(r=zl["".concat(e.op,"For").concat((0,$l.default)(e.left.type))])&&void 0!==r?r:zl[e.op])?a(t,i,e.left.type):Bl]}})})}function Kl(e,t,n){var r,o=(0,jl.default)(n,e.left.field),i=Fl(e.right)?Qs(e.right,n):e.right,a=null!==(r=zl["".concat(e.op,"For").concat((0,$l.default)(e.left.type))])&&void 0!==r?r:zl[e.op];return a&&"function"==typeof a?a(o,i,e.left.type):Bl}function Yl(e){if("string"==typeof e||"number"==typeof e){var t=["","YYYY-MM-DD HH:mm:ss","X"];for(/^\d{10}((\.\d+)*)$/.test(e.toString())?t=["X","x","YYYY-MM-DD HH:mm:ss",""]:/^\d{13}((\.\d+)*)$/.test(e.toString())&&(t=["x","X","YYYY-MM-DD HH:mm:ss",""]);t.length;){var n=b(e,t.shift());if(n.isValid())return n.toDate()}}return e}function Jl(e){return(Array.isArray(e)?e:e.split(",")).map(function(e){return Yl(String(e).trim())})}function Xl(e,t){return e=Yl(e),t=Yl(t),b(e).isAfter(b(t),"s")}function Zl(e,t){return e=Yl(e),t=Yl(t),b(e).isSameOrAfter(b(t),"s")}function Ql(e,t){return e=Yl(e),t=Yl(t),b(e).isBefore(b(t),"s")}function ec(e,t){return e=Yl(e),t=Yl(t),b(e).isSameOrBefore(b(t),"s")}function tc(e,t){if(void 0!==t){var n=d(Jl(t),2),r=n[0],o=n[1];return b(Yl(e)).isBetween(r,o,"s","[]")}return Bl}function nc(e,t){if(void 0!==t){var n=d(Jl(t),2),r=n[0],o=n[1];return!b(Yl(e)).isBetween(r,o,"s","[]")}return Bl}function rc(e,t,n){zl["".concat(e).concat(n?"For"+(0,$l.default)(n):"")]=t}rc("greater",function(e,t){return void 0===e||void 0===t?Bl:parseFloat(e)>parseFloat(t)}),rc("greater",Xl,"date"),rc("greater",Xl,"time"),rc("greater",Xl,"datetime"),rc("greater_or_equal",function(e,t){return void 0===e||void 0===t?Bl:parseFloat(e)>=parseFloat(t)}),rc("greater_or_equal",Zl,"date"),rc("greater_or_equal",Zl,"time"),rc("greater_or_equal",Zl,"datetime"),rc("less",function(e,t){return void 0===e||void 0===t?Bl:parseFloat(e)<parseFloat(t)}),rc("less",Ql,"date"),rc("less",Ql,"time"),rc("less",Ql,"datetime"),rc("less_or_equal",function(e,t){return void 0===e||void 0===t?Bl:parseFloat(e)<=parseFloat(t)}),rc("less_or_equal",ec,"date"),rc("less_or_equal",ec,"time"),rc("less_or_equal",ec,"datetime"),rc("is_empty",function(e){return"string"==typeof e?!e:"number"==typeof e?void 0===e:Array.isArray(e)?!e.length:"object"==typeof e?(0,Vl.default)(e):Bl}),rc("is_not_empty",function(e){return"string"==typeof e?!e:"number"==typeof e?void 0!==e:Array.isArray(e)?!!e.length:"object"==typeof e?!(0,Vl.default)(e):Bl}),rc("between",function(e,t){if("number"==typeof e&&void 0!==t){var n=d(t.sort(),2),r=n[0],o=n[1];return e>=parseFloat(r)&&e<=parseFloat(o)}return Bl}),rc("between",tc,"date"),rc("between",tc,"time"),rc("between",tc,"datetime"),rc("not_between",function(e,t){if("number"==typeof e&&void 0!==t){var n=d(t.sort(),2),r=n[0],o=n[1];return e<parseFloat(r)&&e>parseFloat(o)}return Bl}),rc("not_between",nc,"date"),rc("not_between",nc,"time"),rc("not_between",nc,"datetime"),rc("equal",function(e,t){return(0,Ml.default)(e,t)}),rc("not_equal",function(e,t){return!(0,Ml.default)(e,t)}),rc("like",function(e,t){return void 0===e||void 0===t?Bl:!!~e.indexOf(t)}),rc("not_like",function(e,t){return void 0===e||void 0===t?Bl:!~e.indexOf(t)}),rc("select_any_in",function(e,t){return Array.isArray(t)?Array.isArray(e)?t.every(function(t){return e.includes(t)}):t.includes(e):Bl}),rc("select_not_any_in",function(e,t){return Array.isArray(t)?Array.isArray(e)?!t.every(function(t){return e.includes(t)}):!t.includes(e):Bl}),rc("starts_with",function(e,t){return void 0===e||void 0===t?Bl:(0,Ll.default)(e,t)}),rc("ends_with",function(e,t){return void 0===e||void 0===t?Bl:(0,Rl.default)(e,t)});var oc={};function ic(e,t){void 0===t&&(t={});for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!e||"string"!=typeof e)return"";for(var o=Object.keys(oc),i=0,a=o.length;i<a;i++){var s=oc[o[i]];if(s.test(e))return s.compile.apply(s,f([e,t],d(n),!1));s.removeEscapeToken&&(e=s.removeEscapeToken(e))}return e}function ac(e,t){void 0===t&&(t={});for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!e||"string"!=typeof e)return Promise.resolve("");for(var o=Object.keys(oc),i=0,a=o.length;i<a;i++){var s=oc[o[i]];if(s.test(e))return s.asyncCompile.apply(s,f([e,t],d(n),!1));s.removeEscapeToken&&(e=s.removeEscapeToken(e))}return e}var sc={},uc={};function lc(e,t){if(!e||"string"!=typeof e)return!1;try{if("string"==typeof e&&"${"===e.substring(0,2)&&"}"===e[e.length-1])return!!pc(e,t);var n=!1;~e.indexOf("debugger")&&(n=!0,e=e.replace(/debugger;?/,""));var r=void 0;return e in sc?r=sc[e]:(r=new Function("data","utils","with(data) {".concat(n?"debugger;":"","return !!(").concat(e,");}")),sc[e]=r),t=t||{},r.call(t,t,js())}catch(tE){return uc[e]||(console.warn(e,tE),uc[e]=!0),!1}}function cc(e,t,n){return u(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return"[object Object]"!==Object.prototype.toString.call(e)?[3,2]:[4,Ul(e,t,n)];case 1:return[2,r.sent()];case 2:return[2,lc(String(e),t)]}})})}function dc(e,t,n){return"[object Object]"===Object.prototype.toString.call(e)?ql(e,t,n):lc(String(e),t)}function pc(e,t){return Ws(Xs(e,{evalMode:!1}),t,{defaultFilter:"raw"})}function fc(e,t){try{if("string"==typeof e&&"${"===e.substring(0,2)&&"}"===e[e.length-1])return pc(e,t);var n=new Function("data","utils","with(data) {".concat(/^\s*return\b/.test(e)?"":"return ").concat(e,";}"));return t=t||{},n.call(t,t,js())}catch(tE){return console.warn(e,tE),null}}[function(){var e=this;return{name:"builtin",test:function(e){return"string"==typeof e&&function(e){for(var t=0;;){var n=e.indexOf("$",t);if(~n){var r=e[n+1];if(!r||~['"',"'"," "].indexOf(r)){t=n+1;continue}var o=e[n-1];if(o&&"\\"===o){t=n+1;continue}return!0}break}return!1}(e)},removeEscapeToken:function(e){return"string"==typeof e?e.replace(/\\\$/g,"$"):e},compile:function(e,t,n){void 0===n&&(n="| html");try{return Zs(e,t,n)}catch(tE){return"error: ".concat(tE.message)}},asyncCompile:function(t,n,r){return void 0===r&&(r="| html"),u(e,void 0,void 0,function(){return o(this,function(e){try{return[2,_u(t,n,r)]}catch(tE){return[2,"error: ".concat(tE.message)]}return[2]})})}}},function(){return{name:"lodash",test:function(e){return!!~e.indexOf("<%")},compile:function(e,t){return Nl(e,t)},asyncCompile:function(e,t){return Nl(e,t)}}}].forEach(function(e){if(e){var t,n,r=e();t=r.name,n={test:r.test,compile:r.compile,asyncCompile:r.asyncCompile,removeEscapeToken:r.removeEscapeToken},oc[t]=n}});var hc,vc=Object.defineProperty,mc=Object.getPrototypeOf;function yc(e,t){return e.bind?e.bind(t):function(){return e.apply(t,arguments)}}function gc(e){return function(t){return vc(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t}),t}}var bc=/* @__PURE__ */n((e,t)=>{var n=ee(),r=Q();t.exports=function(e){return!0===e||!1===e||r(e)&&"[object Boolean]"==n(e)}});function wc(e,t){e&&e.type&&(t(e),Object.keys(e).forEach(function(n){var r=e[n];Array.isArray(r)?r.forEach(function(e){return wc(e,t)}):wc(r,t)}))}var xc={};function Ec(e,t){var n=[];return"string"==typeof e&&xc[e]?xc[e]:(wc("string"==typeof e?Ys(e,{evalMode:null!=t&&t}):e,function(e){"variable"===e.type&&n.push(e.name)}),"string"==typeof e&&(xc[e]=n),n)}var Oc=/* @__PURE__ */t(Z()),Sc=/* @__PURE__ */t(hs());bc(),S();var Ac={},Cc={tpl:function(e,t){return ic(e,t||{})},formula:function(e,t){if(/^\$\{([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})\}$/.test(e))return e.substring(2,e.length-1);var n=t||{},r=void 0;try{r=Qs(e,n,"| raw")}catch(tE){return console.warn("[formula]表达式执行异常,当前表达式: ",e,",当前上下文数据: ",t),e}return r},evalFormula:function(e,t){var n=t||{},r=void 0;try{r=Ws(e,n,{evalMode:!0,allowFilter:!1})}catch(tE){return console.warn("[evalFormula]表达式执行异常,当前表达式: ",e,",当前上下文数据: ",t),e}return null!=r?r:e},js:function(e,t){var n,r=!1;~e.indexOf("debugger")&&(r=!0,e=e.replace(/debugger;?/,"")),e in Ac?n=Ac[e]:(n=new Function("data","utils","with(data) {".concat(r?"debugger;":"","return (").concat(e,");}")),Ac[e]=n),t=t||{};var o=void 0;try{o=n.call(t,t,js())}catch(tE){return console.warn("[formula:js]表达式执行异常,当前表达式: ",e,",当前上下文数据: ",t),e}return o},var:function(e,t){var n=Nu(t||{},e);return null!=n?n:e},collect:function(e){return(0,Oc.default)(e)||(0,Sc.default)(e)?Ec(e):[]}};function _c(e){return!(!e||!(0,Sc.default)(e))&&/(^|[^\\])\$\{[\s\S]+\}/.test(e)}function Dc(e){return e&&(0,Sc.default)(e)&&/(\\)(\${).+(\})/.test(e)?e.replace(/\\\$\{/g,"${"):e}var Nc=/* @__PURE__ */t(Fa()),kc=/* @__PURE__ */t(ds()),Ic=/* @__PURE__ */t(fs()),Tc=/* @__PURE__ */t(ps()),Pc=/* @__PURE__ */t(bs());function Fc(e){("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault()}function jc(){var e=navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(e)}function Rc(e,t,n){return Math.min(Math.max(e,t),n)}function Vc(e,t,n,r,o){var i=p({},e),a=[];return r&&"FormStore"===r.storeType&&!1!==r.canAccessSuperData?a=(0,pl.default)(r.items.map(function(e){return"".concat(e.name).replace(/\..*$/,"")}).concat(Object.keys(i))):o&&(a=Object.keys(i)),(t||n)&&a.forEach(function(e){e&&(t&&void 0!==t[e]||n&&void 0!==n[e])&&(n&&!t||!n&&t||n[e]!==t[e])&&(i[e]=t[e])}),i}function Mc(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()}function Lc(){}function $c(e,t,n,r){return void 0===r&&(r=!0),("string"==typeof e?e.split(",").map(function(e){return e.trim()}):e).some(function(e){return r?!Object.is(t[e],n[e]):t[e]!=n[e]})}function zc(e,t,n,r,o){void 0===o&&(o=!0);var i={};("string"==typeof e?e.split(",").map(function(e){return e.trim()}):e).forEach(function(e){(o?Object.is(t[e],n[e]):t[e]==n[e])||(i[e]=n[e])}),Object.keys(i).length&&r(i)}function Bc(e){var t={};return"object"!=typeof e?e:(Object.keys(e).forEach(function(n){void 0!==e[n]&&(t[n]=e[n])}),t)}function Uc(e,t,n,r,o,i){if(void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=[]),void 0===i&&(i=-1),Array.isArray(e)&&Array.isArray(t))return e.length!==t.length||e.some(function(e,i){return Uc(e,t[i],n,r,o)});if((0,Ic.default)(e)&&(0,Ic.default)(t))return!1;if(null==e||null==t||!Gu(e)||!Gu(t)||e.constructor!==Object||t.constructor!==Object)return n&&"function"==typeof n?n(e,t):n?e!==t:e!=t;r&&(e=Bc(e),t=Bc(t));var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length||a.sort().join(",")!==s.sort().join(","))return!0;if(~o.indexOf(e))return!1;if(o.push(e),i>0&&o.length>i)return!0;for(var u=a.length-1;u>=0;u--){var l=a[u];if(Uc(e[l],t[l],n,r,o))return!0}return!1}function qc(e,t,n){if(void 0===n&&(n=!0),!Array.isArray(e)||!Array.isArray(t))return n?e!==t:e!=t;if(e.length!==t.length)return!0;for(var r=e.length-1;r>=0;r--)if((n?e[r]!==t[r]:e[r]!=t[r])||qc(e[r].children,t[r].children,n))return!0;return!1}function Wc(e,t,n){if(!Gu(e)||!Gu(t))return e;var r=e;return Object.keys(t).forEach(function(n){var o=e[n],i=t[n];o!==i&&((r=r!==e?r:p({},e))[n]=i)}),r}function Hc(e){return!(!e.visibleOn&&!e.hiddenOn)}function Gc(e,t,n){var r;if((e.id||e.name)&&n){var o=ic(e.id,t),i=ic(e.name,t),a=fo(n)?null!==(r=n.visibleState[o])&&void 0!==r?r:n.visibleState[i]:void 0;if(void 0!==a)return a}return!(e.hidden||!1===e.visible||e.hiddenOn&&dc(e.hiddenOn,t)||e.visibleOn&&!dc(e.visibleOn,t))}function Kc(e,t){var n=t.foldedField,r=t.unfoldedField;return r||(r="unfolded"),n||(n="folded"),r&&void 0!==e[r]?!!e[r]:!(!n||void 0===e[n]||e[n])}function Yc(e,t){return e.filter(function(e){return Gc(e,t)})}function Jc(e,t){return e.disabled||e.disabledOn&&dc(e.disabledOn,t)}function Xc(e,t,n,r){return void 0===r&&(r=!0),e.hasOwnProperty(t)?e[t]:e.hasOwnProperty("".concat(t,"On"))?dc(e["".concat(t,"On")],n||e):r}function Zc(e,t){if(t>1&&/\bcol-(xs|sm|md|lg)-(\d+)\b/.test(e.left)){var n=parseInt(RegExp.$2,10)*t;return{leftFixed:e.leftFixed,left:n,right:12-n,offset:n}}return t>1&&"number"==typeof e.left?(n=e.left*t,{leftFixed:e.leftFixed,left:n,right:12-n,offset:n}):e}function Qc(e){if(e._promisified)return e;var t=function(){try{var t=e.apply(null,arguments);return t&&t.then?t:"function"==typeof t?new Promise(function(e,n){return t(function(t,r){return t?n(t):e(r)})}):Promise.resolve(t)}catch(tE){return Promise.reject(tE)}};return t.raw=e,t._promisified=!0,t}function ed(e,t){if(void 0===t&&(t=function(){return!0}),null==e)return null;var n=getComputedStyle(e);if(!n)return null;var r=n.getPropertyValue("overflow")+n.getPropertyValue("overflow-x")+n.getPropertyValue("overflow-y");return"BODY"===e.nodeName||/auto|scroll/.test(r)&&t(e)?e:ed(e.parentNode,t)}function td(e,t,n){return function e(t,r){if(Gu(t)&&Gu(r)){var o=(0,pl.default)(Object.keys(t).concat(Object.keys(r))),i={};return o.forEach(function(o){var a=t[o],s=r[o];n&&~n.indexOf(o)&&(i[o]=a),t.hasOwnProperty(o)&&r.hasOwnProperty(o)&&!Uc(a,s,!0,void 0,void 0,10)||(t.hasOwnProperty(o)?Array.isArray(a)&&Array.isArray(s)?i[o]=a:i[o]=e(a,s):i[o]=void 0)}),i}return t}(e,t)}S();var nd=function(e,t,n){void 0===t&&(t=4),void 0===n&&(n=!1);for(var r=[[]],o=e.concat(),i=0;o.length||n&&r[r.length-1].length<t;){var a=r[i]||(r[i]=[]);a.length>=t?i+=1:a.push(o.shift())}return r};function rd(e){if("string"!=typeof e)return!!e;var t=e.split(/\s*,\s*|\s+/);if(window.matchMedia)return t.some(function(e){return"*"===e||"xs"===e&&matchMedia("screen and (max-width: 767px)").matches||"sm"===e&&matchMedia("screen and (min-width: 768px) and (max-width: 991px)").matches||"md"===e&&matchMedia("screen and (min-width: 992px) and (max-width: 1199px)").matches||"lg"===e&&matchMedia("screen and (min-width: 1200px)").matches});var n=window.innerWidth;return t.some(function(e){return"*"===e||"xs"===e&&n<768||"sm"===e&&n>=768&&n<992||"md"===e&&n>=992&&n<1200||"lg"===e&&n>=1200})}function od(e,t,n,r){var i,a=this;void 0===r&&(r=5e3);var s=!1;return new Promise(function(l,c){var d=function(){return u(a,void 0,void 0,function(){var n,a;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e()];case 1:return n=o.sent(),s?[2]:(t(n)?(s=!0,l(n)):i=setTimeout(d,r),[3,3]);case 2:return a=o.sent(),c(a),[3,3];case 3:return[2]}})})};d(),n&&n(function(){clearTimeout(i),s=!0})})}function id(e){return!(Gu(e)&&Object.keys(e).length)}var ad=function(){return(+/* @__PURE__ */new Date).toString(36)},sd=function(){return("00000000000000000"+(0x10000000000000000*Math.random()).toString(16)).slice(-16)},ud=function(){var e=sd(),t=sd();return e.slice(0,8)+"-"+e.slice(8,12)+"-4"+e.slice(13)+"-a"+t.slice(1,4)+"-"+t.slice(4)};function ld(e,t,n,r,o,i){return void 0===n&&(n=1),void 0===r&&(r=!1),void 0===o&&(o=[]),void 0===i&&(i=[]),e.map(function(e,a){if(r){var s=e.children?ld(e.children,t,n+1,r,o.concat(e),i.concat(a)):void 0;return s&&(e=p(p({},e),{children:s})),t(e,a,n,o,i.concat(a))||p({},e)}return(e=t(e,a,n,o,i.concat(a))||p({},e)).children&&e.children.splice&&(e.children=ld(e.children,t,n+1,r,o.concat(e),i.concat(a))),e})}function cd(e,t,n,r){var o;void 0===n&&(n=1),void 0===r&&(r=[]);for(var i=e.length,a=0;a<i;a++){var s=e[a],u=t(s,a,n,r);if("break"===u)break;"continue"!==u&&(null===(o=s.children)||void 0===o?void 0:o.splice)&&cd(s.children,t,n+1,r.concat(s))}}var dd={tree:null,map:null};function pd(e,t,n){var r=function(e){return""!==e&&((0,Sc.default)(e)||(0,Tc.default)(e))};if(n&&r(n.value)){var o=n.resolve,i=n.value,a=n.foundEffect;if(e!==dd.tree||!dd.map){var s=/* @__PURE__ */new Map;cd(e,function(e,t,n,i){var a=o?o(e):e;r(a)&&s.set(String(a),[e,t,n,i])}),dd.map=s,dd.tree=e}var u=dd.map.get(String(i));if(null!=u)return a&&a.apply(null,u.slice()),u[0]}var l=null;return md(e,function(e,n,r,o){return!t(e,n,r,o)||(l=e,!1)}),l}function fd(e,t,n){var r=[],o=function(t,n,o,i){r=[n],(i=i.concat()).unshift({children:e});for(var a=i.length-1;a>0;a--){var s=i[a-1],u=i[a];r.unshift(s.children.indexOf(u))}};return pd(e,function(e,n,r,i){return!!t(e,n,r,i)&&(o(0,n,0,i),!0)},n?p(p({},n),{foundEffect:o}):void 0),r.length?r:void 0}function hd(e,t){for(var n=Array.isArray(t)?t.concat():[t],r=n.pop(),o=e,i=0,a=n.length;i<a;i++){var s=n[i];if(!o[s]){o=null;break}o=o[s].children}return o?o[r]:void 0}function vd(e,t,n,r,o){return void 0===n&&(n=1),void 0===r&&(r=!1),void 0===o&&(o=[]),r?e.map(function(e){var i=e.children?vd(e.children,t,n+1,r,o.concat(e)):void 0;return Array.isArray(i)&&Array.isArray(e.children)&&(e=p(p({},e),{children:i})),e}).filter(function(e,r){return t(e,r,n,o)}):e.filter(function(e,r){return t(e,r,n,o)}).map(function(e){var i;if(null===(i=e.children)||void 0===i?void 0:i.splice){var a=vd(e.children,t,n+1,r,o.concat(e));Array.isArray(a)&&Array.isArray(e.children)&&(e=p(p({},e),{children:a}))}return e})}function md(e,t,n,r,o){var i,a=[];for(a.push({item:null,index:-1,level:1,paths:[],indexes:[]});a.length>0;){var s=a.pop(),u=s.item,l=s.index,c=s.level,d=s.paths,p=s.indexes;if(l>=0){var f=t(u,l,c,d,p);if(f&&(null===(i=u.children)||void 0===i?void 0:i.splice))for(var h=u.children,v=h.length-1;v>=0;v--)a.push({item:h[v],index:v,level:c+1,paths:d.concat(u),indexes:p.concat(l)});else if(!f)return!1}else{if(!Array.isArray(e)&&!Or(e))return!1;for(v=e.length-1;v>=0;v--)a.push({item:e[v],index:v,level:1,paths:[],indexes:[]})}}return!0}function yd(e,t){var n=!1;return md(e,function(e,r,o,i){return!t(e,r,o,i)||(n=!0,!1)}),n}function gd(e,t){var n=[];return cd(e,function(e,r,o,i){return n.push(t?t(e,r,o,i):e)}),n}function bd(e,t){var n=[];return cd(e,function(e,r){e.hasOwnProperty("children")||n.push(t?t(e,r):e)}),n}function wd(e,t,n){void 0===n&&(n=0);for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=e.concat();if("number"==typeof t)i.splice.apply(i,f([t,n],d(r),!1));else if(Array.isArray(t)&&t.length){var a=(t=t.concat()).pop(),s=t.reduce(function(e,t){var n=p(p({},e[t]),{children:e[t].children?e[t].children.concat():[]});return e[t]=n,n.children},i);s.splice.apply(s,f([a,n],d(r),!1))}return i}function xd(e){return Array.isArray(e)&&0===e.length?0:Math.max.apply(Math,f([],d(e.map(function(e){return Array.isArray(e.children)?1+xd(e.children):1})),!1))}function Ed(e,t,n){void 0===n&&(n=!1);var r=null;return pd(e,function(e,o,i,a){return e===t&&(r=a,n&&r.push(e),!0)}),r}function Od(e,t){var n=Ed(e,t);return(null==n?void 0:n.length)?n[n.length-1]:null}function Sd(e){return"string"==typeof e?e.substring(0,1).toUpperCase()+e.substring(1):e}function Ad(e){return e?e.split(/[\s_\-]/).map(function(e,t){return 0===t?function(e){return e?e.substring(0,1).toLowerCase()+e.substring(1):""}(e):Sd(e)}).join(""):""}function Cd(e,t){return void 0===t&&(t=!1),"string"==typeof e&&/\bcol\-\w+\-(\d+)\b/.test(e)?parseInt(RegExp.$1,10):t?0:e||0}function _d(e,t){return void 0===t&&(t="default"),/\b(?:btn|text)-(link|primary|secondary|info|success|warning|danger|light|dark)\b/.test(e)?RegExp.$1:t}function Dd(e){var t={};return e&&Object.keys(e).forEach(function(n){return/^on/.test(n)&&(t[n]=e[n])}),t}var Nd=function(e,t,n){var r=n.value,o=n.configurable,i=n.enumerable;if("function"!=typeof r)throw new SyntaxError("@autobind can only be used on functions, not: ".concat(r));var a=e.constructor;return{configurable:o,enumerable:i,get:function(){if(this===e)return r;if(this.constructor!==a&&mc(this).constructor===a)return r;if(this.constructor!==a&&t in this.constructor.prototype)return function(e,t){if("undefined"==typeof WeakMap)throw new Error("Using @autobind on ".concat(t.name,"() requires WeakMap support due to its use of super.").concat(t.name,"()\n See https://github.com/jayphelps/core-decorators.js/issues/20"));hc||(hc=/* @__PURE__ */new WeakMap),hc.has(e)||hc.set(e,/* @__PURE__ */new WeakMap);var n=hc.get(e);return n.has(t)||n.set(t,yc(t,e)),n.get(t)}(this,r);var n=yc(r,this);return vc(this,t,{configurable:!0,writable:!0,enumerable:!1,value:n}),n},set:gc(t)}},kd=function(e,t){t.forEach(function(t){return e[t]=e[t].bind(e)})};function Id(e,t,n,r){return e.sort(function(e,o){var i=r?r(e,t):e[t],a=r?r(o,t):o[t];return("number"==typeof i&&"number"==typeof a?i<a?-1:i===a?0:1:String(i).localeCompare(String(a)))*n})}function Td(e,t){return t.matchFunc&&"function"==typeof t.matchFunc?e=t.matchFunc(e,e,t):Array.isArray(t.columns)&&t.columns.forEach(function(n){var r="string"==typeof n.name?Nu(t.query,n.name):void 0,o=n.name;if((t.filterOnAllColumns||n.searchable||n.filterable)&&o&&null!=r)if(Array.isArray(r)){if(r.length>0){var i=f([],d(e),!1),a=[];r.forEach(function(e){a=f(f([],d(a),!1),d(Ss(i,e,{keys:[o],threshold:Ss.rankings.CONTAINS})),!1)}),e=e.filter(function(e){return a.find(function(t){return t===e})})}}else e=Ss(e,r,{keys:[o],threshold:Ss.rankings.CONTAINS})}),e}function Pd(e,t,n){return void 0===t&&(t={arrayFormat:"indices",encodeValuesOnly:!0}),n&&(e=Zd(e,function(e){return Array.isArray(e)&&!e.length?"":e})),Pc.default.stringify(e,t)}function Fd(e,t){return void 0===t&&(t={arrayFormat:"indices",encodeValuesOnly:!0,depth:1e3,arrayLimit:1e3}),Pc.default.parse(e,t)}function jd(e,t,n,r){if(n=n&&"function"==typeof n?n:function(e){return e instanceof File},n(e))return e;if(Array.isArray(e))return e.map(function(e){return jd(e,t,n,r)});if(Gu(e)){var o={};return Object.keys(e).forEach(function(i){var a=r?r(i):i;o[a]=jd(e[i],t,n,r)}),o}return t(e)}function Rd(e){return new Promise(function(t,n){var r=document.createElement("script");if(r.onerror=function(e){return n(e)},~e.indexOf("{{callback}}")){var o="loadscriptcallback_".concat(ad());window[o]=function(){t(),delete window[o]},e=e.replace("{{callback}}",o)}else r.onload=function(){return t()};r.src=e,document.head.appendChild(r)})}function Vd(e){return new Promise(function(t,n){var r=document.createElement("link");r.rel="stylesheet",r.onerror=function(e){return n(e)},r.onload=function(){return t()},r.href=e,document.head.appendChild(r)})}var Md,Ld=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t}(Error),$d=function(e){function t(t,n,r){var o=e.call(this)||this;return o.name="ValidateError",o.message=t,o.detail=n,o.rawError=r,o}return s(t,e),t}(Error);function zd(e,t){var n=[];for(var r in e)e.hasOwnProperty(r)&&(r===t?n.push(e):"object"==typeof e[r]&&(n=n.concat(zd(e[r],t))));return n}function Bd(e,t){return function(e){var t=[];return function e(n){if(n&&"object"==typeof n){if(-1!==t.indexOf(n))return!0;for(var r in t.push(n),n)if(n.hasOwnProperty(r)&&e(n[r]))return!0}return!1}(e)}(e)?[]:zd(e,t)}function Ud(){if(void 0!==Md)return Md;var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=document.createElement("div");return e.appendChild(t),Md=e.offsetWidth-t.offsetWidth,e.parentNode.removeChild(e),Md}function qd(e,t,n){return Fl(t)?Qs(t,e,"|raw"):ku(t,e,n)}function Wd(e,t,n){var r,o;void 0===n&&(n=e.canAccessSuperData);var i=e.name,a=e.value,s=e.data,u=e.defaultValue;return null!==(o=null!==(r=null!=a?a:null==t?void 0:t(e))&&void 0!==r?r:qd(s,i,n))&&void 0!==o?o:_c(u)?Qs(u,s):Dc(u)}function Hd(e,t,n,r){var o;void 0!==e.value?e.value!==t.value&&n(e.value):void 0!==(o=null==r?void 0:r(e))?o!==r(t)&&n(o):"string"==typeof e.name&&void 0!==(o=qd(e.data,e.name))?o!==qd(t.data,t.name)&&n(o):e.defaultValue!==t.defaultValue&&n(e.defaultValue)}function Gd(e){return"string"==typeof e?e.replace(/<\/?[^>]+(>|$)/g,""):e}function Kd(e,t,n,r,o,i){var a;void 0===n&&(n="label"),void 0===r&&(r="value"),void 0===o&&(o="/"),void 0===i&&(i=",");var s=[],u=[],l=function(e){return(0,Nc.default)(e?e.toString().split(o):[])};return void 0!==e&&t?(Array.isArray(e)?e.forEach(function(e){var t;e&&e.hasOwnProperty(r)?(s.push(p(p({},e),((t={})[n]=l(e[n]),t[r]=l(e[r]),t))),u.push(e[r])):(s.push(l(e)),u.push(e))}):"string"==typeof e?e.toString().split(i).forEach(function(e){s.push(l(e)),u.push(e)}):(s.push(p(p({},e),((a={})[n]=l(e[n]),a[r||"value"]=l(e[r]),a))),u.push(e[r])),{nodeValueArray:s,nodePathArray:u}):{nodeValueArray:s,nodePathArray:u}}function Yd(e){var t,n=e.target;return!!(!e.currentTarget.contains(n)||~["INPUT","TEXTAREA"].indexOf(n.tagName)||(t=n.closest('button, a, [data-role="form-item"], label[data-role="checkbox"], label[data-role="switch"]'))&&e.currentTarget.contains(t))}function Jd(e){return e.split("").reduce(function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e},0)}function Xd(e,t,n){void 0===n&&(n=Number.MAX_VALUE),n<=0||Object.keys(e).forEach(function(r){var o=e[r];Gn(o)||((0,$u.default)(o)||Array.isArray(o)?Xd(o,t,n-1):t(o,r,e))})}function Zd(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=[]),!(0,$u.default)(e)&&!Array.isArray(e))return e;var o=function(e,r,o,i){var a,s;if(void 0===i&&(i=[]),n){var u=Zd(e,t,n,i);return null!==(a=t(u,r,o,i))&&void 0!==a?a:u}var l=null!==(s=t(e,r,o,i))&&void 0!==s?s:e;return l===e?Zd(e,t,n,i):l};if(Array.isArray(e)){var i=!1,a=e.map(function(t,n){var a=o(t,n,e,[e].concat(r));return i=i||a!==t,a});return i?a:e}var s=!1,u={};return Object.keys(e).forEach(function(t){var n=e[t],i=o(n,t,e,[e].concat(r));i!==n&&(s=!0,u[t]=i)}),s?p(p({},e),u):e}function Qd(e,t,n){if(0===e.length)return n;for(var r=0;r<t.length;r++){var o=t[r];n.set(o,e[r])}return n}function ep(e,t,n){void 0===n&&(n=1);for(var r=[],o=e;o<=t;o+=n)r.push(o);return r}function tp(e){return"number"==typeof e||/^[-+]?(?:\d*[.])?\d+$/.test(e)}function np(e,t){return(0,$u.default)(e)?(t=t||{primitiveTypes:["boolean"]},Array.isArray(t.primitiveTypes)&&0!==t.primitiveTypes.length||(t.primitiveTypes=["boolean"]),Zd(e,function(e){var n,r;if((null===(n=null==t?void 0:t.primitiveTypes)||void 0===n?void 0:n.includes("boolean"))&&"true"===e||"false"===e)return"true"===e;if((null===(r=null==t?void 0:t.primitiveTypes)||void 0===r?void 0:r.includes("number"))&&tp(e)&&isFinite(e)&&e>=-Number.MAX_SAFE_INTEGER&&e<=Number.MAX_SAFE_INTEGER){var o=Number(e);return(0,Ic.default)(o)?e:o}return e})):e}function rp(e,t){var n,r=t||{},o=r.parsePrimitive,i=void 0!==o&&o,a=r.primitiveTypes,s=void 0===a?["boolean"]:a,u=e&&!(e instanceof Location)&&(null==e?void 0:e.query)||e&&(null==e?void 0:e.search)&&Fd(e.search.substring(1))||window.location.search&&Fd(window.location.search.substring(1)),l=(0,$u.default)(u)?i?np(u,{primitiveTypes:s}):u:{},c=null===(n=window.location)||void 0===n?void 0:n.hash,d={},p=-1;return"string"==typeof c&&~(p=c.indexOf("?"))&&(d=Fd(c.substring(p+1))),(0,kc.default)(l,d)}var op={allOptions:null,options:null,res:[]};function ip(e,t,n){if(e===op.allOptions&&t===op.options)return op.res;var r=new Map(e.map(function(e){return[n(e),e]})),o=t.filter(function(e){return!r.get(n(e))});return op.allOptions=e,op.options=t,op.res=o,o}function ap(e){if(!(0,$u.default)(e)&&!Array.isArray(e))return"";var t=[];return Xd(e,function(e,n){"string"==typeof e&&("name"===n?t.push(Fl(e)?e:"${".concat(e,"}")):"source"===n?t.push(e):n.endsWith("On")||"condition"===n||"trackExpression"===n?t.push(e.startsWith("${")?e:"<script>".concat(e,"<\/script>")):e.includes("$")&&t.push(e))},10),t.join("|")}function sp(e,t){if("string"!=typeof e)return"";for(var n=[];;){var r=e.indexOf("<script>");if(-1===r)break;var o=e.indexOf("<\/script>");if(-1===o)throw new Error("Invalid trackExpression miss end script token `<\/script>`");r&&n.push({type:"text",value:e.substring(0,r)}),n.push({type:"script",value:e.substring(r+8,o)}),e=e.substring(o+9)}return e&&n.push({type:"text",value:e}),n.map(function(e){return"text"===e.type?Zs(e.value,t):lc(e.value,t)}).join("")}function up(e){return e.default.__esModule?e.default:e}function lp(e,t){return"string"==typeof e&&/\:\w+/.test(e)?function(e,t){return function(e,t){void 0===t&&(t={});var n=function(e){return e&&e.sensitive?"":"i"}(t),r=t.encode,o=void 0===r?function(e){return e}:r,i=t.validate,a=void 0===i||i,s=e.map(function(e){if("object"==typeof e)return new RegExp("^(?:"+e.pattern+")$",n)});return function(t){for(var n="",r=0;r<e.length;r++){var i=e[r];if("string"!=typeof i){var u=t?t[i.name]:void 0,l="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(u)){if(!c)throw new TypeError('Expected "'+i.name+'" to not repeat, but got an array');if(0===u.length){if(l)continue;throw new TypeError('Expected "'+i.name+'" to not be empty')}for(var d=0;d<u.length;d++){var p=o(u[d],i);if(a&&!s[r].test(p))throw new TypeError('Expected all "'+i.name+'" to match "'+i.pattern+'", but got "'+p+'"');n+=i.prefix+p+i.suffix}}else if("string"!=typeof u&&"number"!=typeof u){if(!l){var f=c?"an array":"a string";throw new TypeError('Expected "'+i.name+'" to be '+f)}}else{if(p=o(String(u),i),a&&!s[r].test(p))throw new TypeError('Expected "'+i.name+'" to match "'+i.pattern+'", but got "'+p+'"');n+=i.prefix+p+i.suffix}}else n+=i}return n}}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0===--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);i+=e[s++]}else i+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var u=e.charCodeAt(s);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^"+function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}(t.delimiter||"/#?")+"]+?",a=[],s=0,u=0,l="",c=function(e){if(u<n.length&&n[u].type===e)return n[u++].value},d=function(e){var t=c(e);if(void 0!==t)return t;var r=n[u],o=r.type,i=r.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},p=function(){for(var e,t="";e=c("CHAR")||c("ESCAPED_CHAR");)t+=e;return t};u<n.length;){var f=c("CHAR"),h=c("NAME"),v=c("PATTERN");if(h||v){var m=f||"";-1===o.indexOf(m)&&(l+=m,m=""),l&&(a.push(l),l=""),a.push({name:h||s++,prefix:m,suffix:"",pattern:v||i,modifier:c("MODIFIER")||""})}else{var y=f||c("ESCAPED_CHAR");if(y)l+=y;else if(l&&(a.push(l),l=""),c("OPEN")){m=p();var g=c("NAME")||"",b=c("PATTERN")||"",w=p();d("CLOSE"),a.push({name:g||(b?s++:""),pattern:g&&!b?i:b,prefix:m,suffix:w,modifier:c("MODIFIER")||""})}else d("END")}}return a}(e,t),t)}(e)(t):e}var cp="data-testid",dp=function(){function e(e){this.testId=e}return e.fast=function(e){var t;return(t={})[cp]=e,t},e.prototype.getChild=function(t,n){return null==this.testId?new e:new e(n?ic("".concat(this.testId,"-").concat(t),n):"".concat(this.testId,"-").concat(t))},e.prototype.getTestId=function(e){var t;if(null!=this.testId)return(t={})[cp]=e?ic(this.testId,e):this.testId,t},e.prototype.getTestIdValue=function(e){if(null!=this.testId)return e?ic(this.testId,e):this.testId},e}();function pp(e,t){var n;if(!e)return{};var r=e["".concat(t,"ClassName")]||{},o=e["".concat(t,"ControlClassName")]||{},i={},a={},s={},u={};return Object.keys(r).forEach(function(e){if(e.includes("checked-")){var n=e.replace("checked-","");u[n]=r[e]}else e.includes("".concat(t,"-"))?(n=e.replace("".concat(t,"-"),""),s[n]=r[e]):s[e]=r[e]}),Object.keys(o).forEach(function(e){if(e.includes("checked-")){var n=e.replace("checked-","");a[n]=o[e]}else e.includes("".concat(t,"-"))?(n=e.replace("".concat(t,"-"),""),i[n]=o[e]):i[e]=o[e]}),p(p({},e),((n={})["".concat(t,"ControlClassName")]=i,n["".concat(t,"ControlCheckedClassName")]=a,n["".concat(t,"ClassName")]=s,n["".concat(t,"CheckedClassName")]=u,n))}function fp(e,t,n,r){void 0===n&&(n="| raw"),void 0===r&&(r=!1);var o="string"==typeof e&&Fl(e)?Qs(e,t,n,function(){return""}):"string"==typeof e&&~e.indexOf("$")?Zs(e,t,n):e;return!r||null!=o&&""!==o?o:e}function hp(e,t){var n,r;try{for(var o=a(Object.keys(e)),i=o.next();!i.done;i=o.next()){var s=i.value;"string"==typeof e[s]&&(e[s]=fp(e[s],t))}}catch(u){n={error:u}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}function vp(e,t,n,r,o){if(void 0===t&&(t={}),void 0===n&&(n=!1),void 0===o&&(o=!1),Array.isArray(e))return e.map(function(e){return vp(e,t,n,r,o)});if("string"==typeof e)return fp(e,t,void 0,o);if(!(0,$u.default)(e))return e;var i={},a=Object.keys(e);if(1===a.length&&"$"===a[0][0]&&(0,$u.default)(e[a[0]])){var s=fp(a[0],t,"| raw");if(!Array.isArray(s)&&o)i[a[0]]=e[a[0]];else{var u=Array.isArray(s)?s:[],l=e[a[0]];i=u.map(function(e){return vp(l,zu(t,p({item:e},e)),n,r,o)})}}else{var c=Object.keys(e),d=c.indexOf("&");if(~d){var f=e["&"];if(c.splice(d,1),"$$"===f)i=p(p({},i),t);else{var h,v=(0,$u.default)(f)&&(h=Object.keys(f))&&1===h.length&&t[h[0].substring(1)]&&Array.isArray(t[h[0].substring(1)])?t[h[0].substring(1)].map(function(e){return vp(f[h[0]],zu(t,e),n,r,o)}):fp(f,t,void 0,o);i=Array.isArray(v)||"string"==typeof v?v:p(p({},i),"function"==typeof v?v(t):v)}}c.forEach(function(a){var s=e[a];if("function"==typeof n&&n(a,s))Ku(i,a,s,r);else if("$$"===s)Ku(i,a,t,r);else if("string"==typeof s&&s.length>0&&"$"===s[0]){var u=fp(s,t,void 0,o);Ku(i,a,u,r),"__undefined"===u&&Yu(i,a)}else(0,$u.default)(s)||Array.isArray(s)?Ku(i,a,vp(s,t,n,r,o),r):"string"==typeof s&&~s.indexOf("$")?Ku(i,a,fp(s,t,void 0,o),r):"function"==typeof s&&!0!==n?Ku(i,a,s(t),r):(Ku(i,a,s,r),"__undefined"===s&&Yu(i,a))})}return i}var mp=/* @__PURE__ */n((e,t)=>{var n=I(),r=ye(),o=ue();t.exports=function(e){return function(t,i,a){var s=Object(t);if(!r(t)){var u=n(i,3);t=o(t),i=function(e){return u(s[e],e,s)}}var l=e(t,i,a);return l>-1?s[u?t[l]:l]:void 0}}}),yp=/* @__PURE__ */n((e,t)=>{var n=W(),r=I(),o=E(),i=Math.max;t.exports=function(e,t,a){var s=null==e?0:e.length;if(!s)return-1;var u=null==a?0:o(a);return u<0&&(u=i(s+u,0)),n(e,r(t,3),u)}}),gp=/* @__PURE__ */n((e,t)=>{var n=mp()(yp());t.exports=n}),bp=/* @__PURE__ */t(gp()),wp=/* @__PURE__ */t(yp()),xp=function(){function e(){this.list=[]}return e.prototype.has=function(e){return!!(0,bp.default)(this.list,function(t){return t.key===e})},e.prototype.set=function(e,t){this.list.push({key:e,value:t})},e.prototype.get=function(e){var t=(0,bp.default)(this.list,function(t){return t.key===e});return t?t.value:null},e.prototype.delete=function(e){var t=(0,wp.default)(this.list,function(t){return t.key===e});~t&&this.list.splice(t,1)},e.prototype.dispose=function(){this.list.splice(0,this.list.length)},e}(),Ep={};function Op(e){return Ep[e.id]?Ep[e.id]:(Ep[e.id]=e,e.parentId&&!/(?:dialog|drawer)$/.test(e.path)&&Ep[e.parentId].addChildId(e.id),Ap(),e)}var Sp=[];function Ap(){for(var e=Sp.length-1;e>=0;){var t=Sp[e],n=Ep[t];n&&!fo(n)?(delete Ep[t],Sp.splice(e,1)):e--}}function Cp(e){return Ep[e]}var _p=Ta.model("StoreNode",{id:Ta.identifier,path:"",storeType:Ta.string,disposed:!1,parentId:"",childrenIds:Ta.optional(Ta.array(Ta.string),[])}).views(function(e){return{get parentStore(){return fo(e)&&e.parentId?Cp(e.parentId):null},get __(){return ho(e).translate},get hasChildren(){return!!e.childrenIds.length},get children(){return e.childrenIds.map(function(e){return Cp(e)})}}}).actions(function(e){function t(t){var r=e.childrenIds.filter(function(e){return e!==t});e.childrenIds.replace(r),e.disposed&&n()}function n(t){if(e.disposed=!0,/(?:dialog|drawer)$/.test(e.path))po(e),null==t||t();else if(!e.childrenIds.length){var n=e.parentStore;n&&fo(n)&&n.onChildStoreDispose(e),po(e),null==t||t()}}return{onChildStoreDispose:function(e){t(e.id)},syncProps:function(t,n,r){void 0===r&&(r=Object.keys(t));var o=e;r.forEach(function(e){if(!n||t[e]!==n[e]){var r="set".concat(e.substring(0,1).toUpperCase()).concat(e.substring(1));"function"==typeof o[r]?o[r](t[e]):o.hasOwnProperty(e)&&(o[e]=t[e])}})},dispose:n,addChildId:function(t){e.childrenIds.push(t)},removeChildId:t}}),Dp=/* @__PURE__ */n((e,t)=>{var n=Ya(),r=ue();t.exports=function(e,t){return e&&n(t,r(t),e)}}),Np=/* @__PURE__ */n((e,t)=>{var n=Ya(),r=Za();t.exports=function(e,t){return e&&n(t,r(t),e)}}),kp=/* @__PURE__ */n((e,t)=>{var n=Ya(),r=se();t.exports=function(e,t){return n(e,r(e),t)}}),Ip=/* @__PURE__ */n((e,t)=>{var n=Ae(),r=R(),o=se(),i=Oe(),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=r(e);return t}:i;t.exports=a}),Tp=/* @__PURE__ */n((e,t)=>{var n=Ya(),r=Ip();t.exports=function(e,t){return n(e,r(e),t)}}),Pp=/* @__PURE__ */n((e,t)=>{var n=le(),r=Ip(),o=Za();t.exports=function(e){return n(e,o,r)}}),Fp=/* @__PURE__ */n((e,t)=>{var n=Object.prototype.hasOwnProperty;t.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}}),jp=/* @__PURE__ */n((e,t)=>{var n=za();t.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}}),Rp=/* @__PURE__ */n((e,t)=>{var n=/\w*$/;t.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}}),Vp=/* @__PURE__ */n((e,t)=>{var n=Ce(),r=n?n.prototype:void 0,o=r?r.valueOf:void 0;t.exports=function(e){return o?Object(o.call(e)):{}}}),Mp=/* @__PURE__ */n((e,t)=>{var n=za(),r=jp(),o=Rp(),i=Vp(),a=Ba();t.exports=function(e,t,s){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return r(e,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Symbol]":return i(e)}}}),Lp=/* @__PURE__ */n((e,t)=>{var n=be(),r=Q();t.exports=function(e){return r(e)&&"[object Map]"==n(e)}}),$p=/* @__PURE__ */n((e,t)=>{var n=Lp(),r=oe(),o=ne(),i=o&&o.isMap,a=i?r(i):n;t.exports=a}),zp=/* @__PURE__ */n((e,t)=>{var n=be(),r=Q();t.exports=function(e){return r(e)&&"[object Set]"==n(e)}}),Bp=/* @__PURE__ */n((e,t)=>{var n=zp(),r=oe(),o=ne(),i=o&&o.isSet,a=i?r(i):n;t.exports=a}),Up=/* @__PURE__ */n((e,t)=>{var n=Se(),r=Iu(),o=Ka(),i=Dp(),a=Np(),s=$a(),u=Ua(),l=kp(),c=Tp(),d=pe(),p=Pp(),f=be(),h=Fp(),v=Mp(),m=Wa(),y=ie(),g=ve(),b=$p(),w=Z(),x=Bp(),E=ue(),O=Za(),S="[object Arguments]",A="[object Function]",C="[object Object]",_={};_[S]=_["[object Array]"]=_["[object ArrayBuffer]"]=_["[object DataView]"]=_["[object Boolean]"]=_["[object Date]"]=_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Map]"]=_["[object Number]"]=_[C]=_["[object RegExp]"]=_["[object Set]"]=_["[object String]"]=_["[object Symbol]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_["[object Error]"]=_[A]=_["[object WeakMap]"]=!1,t.exports=function e(t,D,N,k,I,T){var P,F=1&D,j=2&D,R=4&D;if(N&&(P=I?N(t,k,I,T):N(t)),void 0!==P)return P;if(!w(t))return t;var V=y(t);if(V){if(P=h(t),!F)return u(t,P)}else{var M=f(t),L=M==A||"[object GeneratorFunction]"==M;if(g(t))return s(t,F);if(M==C||M==S||L&&!I){if(P=j||L?{}:m(t),!F)return j?c(t,a(P,t)):l(t,i(P,t))}else{if(!_[M])return I?t:{};P=v(t,M,F)}}T||(T=new n);var $=T.get(t);if($)return $;T.set(t,P),x(t)?t.forEach(function(n){P.add(e(n,D,N,n,t,T))}):b(t)&&t.forEach(function(n,r){P.set(r,e(n,D,N,r,t,T))});var z=V?void 0:(R?j?p:d:j?O:E)(t);return r(z||t,function(n,r){z&&(n=t[r=n]),o(P,r,e(n,D,N,r,t,T))}),P}}),qp=/* @__PURE__ */n((e,t)=>{var n=F(),r=g();t.exports=function(e,t){return t.length<2?e:n(e,r(t,0,-1))}}),Wp=/* @__PURE__ */n((e,t)=>{var n=_(),r=Fa(),o=qp(),i=P(),a=Object.prototype.hasOwnProperty;t.exports=function(e,t){var s=-1,u=(t=n(t,e)).length;if(!u)return!0;for(;++s<u;){var l=i(t[s]);if("__proto__"===l&&!a.call(e,"__proto__"))return!1;if(("constructor"===l||"prototype"===l)&&s<u-1)return!1}var c=o(e,t);return null==c||delete c[i(r(t))]}}),Hp=/* @__PURE__ */n((e,t)=>{var n=k();t.exports=function(e){return n(e)?void 0:e}}),Gp=/* @__PURE__ */n((e,t)=>{var n=Ce(),r=de(),o=ie(),i=n?n.isConcatSpreadable:void 0;t.exports=function(e){return o(e)||r(e)||!!(i&&e&&e[i])}}),Kp=/* @__PURE__ */n((e,t)=>{var n=Ae(),r=Gp();t.exports=function e(t,o,i,a,s){var u=-1,l=t.length;for(i||(i=r),s||(s=[]);++u<l;){var c=t[u];o>0&&i(c)?o>1?e(c,o-1,i,a,s):n(s,c):a||(s[s.length]=c)}return s}}),Yp=/* @__PURE__ */n((e,t)=>{var n=Kp();t.exports=function(e){return null!=e&&e.length?n(e,1):[]}}),Jp=/* @__PURE__ */n((e,t)=>{var n=Yp(),r=rs(),o=ss();t.exports=function(e){return o(r(e,void 0,n),e+"")}}),Xp=/* @__PURE__ */n((e,t)=>{var n=y(),r=Up(),o=Wp(),i=_(),a=Ya(),s=Hp(),u=Jp(),l=Pp(),c=u(function(e,t){var u={};if(null==e)return u;var c=!1;t=n(t,function(t){return t=i(t,e),c||(c=t.length>1),t}),a(e,l(e),u),c&&(u=r(u,7,s));for(var d=t.length;d--;)o(u,t[d]);return u});t.exports=c}),Zp=/* @__PURE__ */n((e,t)=>{!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)t.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&t.push(a)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){t.push(o.toString());continue}for(var s in o)e.call(o,s)&&o[s]&&t.push(s)}}}return t.join(" ")}void 0!==t&&t.exports?(n.default=n,t.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return n}):window.classNames=n}()}),Qp=/* @__PURE__ */t(r());if(!Qp.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!kn)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var ef=/* @__PURE__ */t(_e());function tf(){var e=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}((0,Qp.useState)(0),2)[1];return(0,Qp.useCallback)(function(){e(function(e){return e+1})},[])}var nf,rf={},of=(nf="observerBatching","function"==typeof Symbol?Symbol.for(nf):"__$mobx-react "+nf+"__");function af(e){e()}function sf(e){return zn(e)}var uf,lf=/* @__PURE__ */new Set;function cf(){void 0===uf&&(uf=setTimeout(df,1e4))}function df(){uf=void 0;var e=Date.now();lf.forEach(function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,lf.delete(t))}),lf.size>0&&cf()}var pf=!1,ff=[],hf={};function vf(e){return"observer"+e}function mf(e,t,n){void 0===t&&(t="observed"),void 0===n&&(n=hf);var r,o,i=(r=(n.useForceUpdate||tf)(),function(){pf?ff.push(r):r()}),a=Qp.useRef(null);if(!a.current){var s=new gn(vf(t),function(){u.mounted?i():(s.dispose(),a.current=null)}),u=function(e){return{cleanAt:Date.now()+1e4,reaction:e}}(s);a.current=u,o=a,lf.add(o),cf()}var l=a.current.reaction;return Qp.useDebugValue(l,sf),Qp.useEffect(function(){var e;return e=a,lf.delete(e),a.current?a.current.mounted=!0:(a.current={reaction:new gn(vf(t),function(){i()}),cleanAt:1/0},i()),function(){a.current.reaction.dispose(),a.current=null}},[]),function(){pf=!0,ff=[];try{var t=function(){var t,n;if(l.track(function(){try{t=e()}catch(tE){n=tE}}),n)throw n;return t}();pf=!1;var n=ff.length>0?ff:void 0;return Qp.useLayoutEffect(function(){n&&n.forEach(function(e){return e()})},[n]),t}finally{pf=!1}}()}var yf=function(){return yf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yf.apply(this,arguments)};function gf(e,t){var n,r,o,i=yf({forwardRef:!1},t),a=e.displayName||e.name,s=function(t,n){return mf(function(){return e(t,n)},a)};return s.displayName=a,n=i.forwardRef?(0,Qp.memo)((0,Qp.forwardRef)(s)):(0,Qp.memo)(s),r=e,o=n,Object.keys(r).forEach(function(e){bf[e]||Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(r,e))}),n.displayName=a,n}var bf={$$typeof:!0,render:!0,compare:!0,type:!0};function wf(e){var t=e.children,n=e.render,r=t||n;return"function"!=typeof r?null:mf(r)}function xf(e,t,n,r,o){var i="children"===t?"render":"children",a="function"==typeof e[t],s="function"==typeof e[i];return a&&s?/* @__PURE__ */new Error("MobX Observer: Do not use children and render in the same time in`"+n):a||s?null:/* @__PURE__ */new Error("Invalid prop `"+o+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}wf.propTypes={children:xf,render:xf},wf.displayName="Observer",function(e){e||(e=af,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),function(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,o=e.disableErrorBoundaries,i=e.arrayBuffer,a=e.reactionScheduler,s=e.reactionRequiresObservable,u=e.observableRequiresReaction;if(!0===e.isolateGlobalState&&((ln.pendingReactions.length||ln.inBatch||ln.isRunningReactions)&&Pe("isolateGlobalState should be called before MobX is running any reactions"),un=!0,sn&&(0===--Ie().__mobxInstanceCount&&(Ie().__mobxGlobals=void 0),ln=new an)),void 0!==t){"boolean"!=typeof t&&"strict"!==t||Re("Deprecated value for 'enforceActions', use 'false' => '\"never\"', 'true' => '\"observed\"', '\"strict\"' => \"'always'\" instead");var l=void 0;switch(t){case!0:case"observed":l=!0;break;case!1:case"never":l=!1;break;case"strict":case"always":l="strict";break;default:Pe("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}ln.enforceActions=l,ln.allowStateChanges=!0!==l&&"strict"!==l}void 0!==n&&(ln.computedRequiresReaction=!!n),void 0!==s&&(ln.reactionRequiresObservable=!!s),void 0!==u&&(ln.observableRequiresReaction=!!u,ln.allowStateReads=!ln.observableRequiresReaction),void 0!==r&&(ln.computedConfigurable=!!r),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on."),ln.disableErrorBoundaries=!!o),"number"==typeof i&&xr(i),a&&Sn(a)}({reactionScheduler:e}),("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:rf)[of]=!0}(ef.unstable_batchedUpdates);var Ef=0,Of={};function Sf(e){return Of[e]||(Of[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+Ef+")";return Ef++,t}(e)),Of[e]}function Af(e,t){if(Cf(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.hasOwnProperty.call(t,n[o])||!Cf(e[n[o]],t[n[o]]))return!1;return!0}function Cf(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function _f(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var Df=/* @__PURE__ */Sf("patchMixins"),Nf=/* @__PURE__ */Sf("patchedDefinition");function kf(e,t){for(var n=this,r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];t.locks++;try{var a;return null!=e&&(a=e.apply(this,o)),a}finally{t.locks--,0===t.locks&&t.methods.forEach(function(e){e.apply(n,o)})}}function If(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];kf.call.apply(kf,[this,e,t].concat(r))}}function Tf(e,t,n){var r=function(e,t){var n=e[Df]=e[Df]||{},r=n[t]=n[t]||{};return r.locks=r.locks||0,r.methods=r.methods||[],r}(e,t);r.methods.indexOf(n)<0&&r.methods.push(n);var o=Object.getOwnPropertyDescriptor(e,t);if(!o||!o[Nf]){var i=e[t],a=Pf(e,t,o?o.enumerable:void 0,r,i);Object.defineProperty(e,t,a)}}function Pf(e,t,n,r,o){var i,a=If(o,r);return(i={})[Nf]=!0,i.get=function(){return a},i.set=function(o){if(this===e)a=If(o,r);else{var i=Pf(this,t,n,r,o);Object.defineProperty(this,t,i)}},i.configurable=!0,i.enumerable=n,i}var Ff="$mobx",jf=/* @__PURE__ */Sf("isMobXReactObserver"),Rf=/* @__PURE__ */Sf("isUnmounted"),Vf=/* @__PURE__ */Sf("skipRender"),Mf=/* @__PURE__ */Sf("isForcingUpdate");function Lf(e){var t=e.prototype;if(e[jf]){var n=$f(t);console.warn("The provided component class ("+n+") \n has already been declared as an observer component.")}else e[jf]=!0;if(t.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==Qp.PureComponent)if(t.shouldComponentUpdate){if(t.shouldComponentUpdate!==Bf)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else t.shouldComponentUpdate=Bf;Uf(t,"props"),Uf(t,"state");var r=t.render;return t.render=function(){return zf.call(this,r)},Tf(t,"componentWillUnmount",function(){var e;if(null===(e=this.render[Ff])||void 0===e||e.dispose(),this[Rf]=!0,!this.render[Ff]){var t=$f(this);console.warn("The reactive render of an observer class component ("+t+") \n was overriden after MobX attached. This may result in a memory leak if the \n overriden reactive render was not properly disposed.")}}),e}function $f(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function zf(e){var t=this;_f(this,Vf,!1),_f(this,Mf,!1);var n=$f(this),r=e.bind(this),o=!1,i=new gn(n+".render()",function(){if(!o&&(o=!0,!0!==t[Rf])){var e=!0;try{_f(t,Mf,!0),t[Vf]||Qp.Component.prototype.forceUpdate.call(t),e=!1}finally{_f(t,Mf,!1),e&&i.dispose()}}});function a(){o=!1;var e=void 0,t=void 0;if(i.track(function(){try{t=function(e,t){var n,r=Zt(!1);try{n=t()}finally{Qt(r)}return n}(0,r)}catch(tE){e=tE}}),e)throw e;return t}return i.reactComponent=this,a[Ff]=i,this.render=a,a.call(this)}function Bf(e,t){return this.state!==t||!Af(this.props,e)}function Uf(e,t){var n=Sf("reactProp_"+t+"_valueHolder"),r=Sf("reactProp_"+t+"_atomHolder");function o(){return this[r]||_f(this,r,rt("reactive "+t)),this[r]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return qt&&Wt&&(e=qt(!0)),o.call(this).reportObserved(),qt&&Wt&&Wt(e),this[n]},set:function(e){this[Mf]||Af(this[n],e)?_f(this,n,e):(_f(this,n,e),_f(this,Vf,!0),o.call(this).reportChanged(),_f(this,Vf,!1))}})}var qf="function"==typeof Symbol&&Symbol.for,Wf=qf?/* @__PURE__ */Symbol.for("react.forward_ref"):"function"==typeof Qp.forwardRef&&(0,Qp.forwardRef)(function(e){return null}).$$typeof,Hf=qf?/* @__PURE__ */Symbol.for("react.memo"):"function"==typeof Qp.memo&&(0,Qp.memo)(function(e){return null}).$$typeof;function Gf(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),Hf&&e.$$typeof===Hf)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(Wf&&e.$$typeof===Wf){var t=e.render;if("function"!=typeof t)throw new Error("render property of ForwardRef was not a function");return(0,Qp.forwardRef)(function(){var e=arguments;return(0,Qp.createElement)(wf,null,function(){return t.apply(void 0,e)})})}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(Qp.Component,e)?Lf(e):gf(e)}if(!Qp.Component)throw new Error("mobx-react requires React to be available");if(!Dt)throw new Error("mobx-react requires mobx to be available");function Kf(e){var t=null==e?void 0:e.ownerDocument,n={top:0,left:0,height:0,width:0},r=t&&t.documentElement;return r&&r.contains(e)?(void 0!==e.getBoundingClientRect&&(n=e.getBoundingClientRect()),n={top:n.top+r.scrollTop-(r.clientTop||0),left:n.left+r.scrollLeft-(r.clientLeft||0),width:n.width,height:n.height}):n}var Yf=function(e){return!!e&&"offsetParent"in e};function Jf(e,t){var n,r={top:0,left:0};if("fixed"===getComputedStyle(e).getPropertyValue("position"))n=e.getBoundingClientRect();else{var o=t||function(e){for(var t=null==e?void 0:e.ownerDocument,n=e&&e.offsetParent;Yf(n)&&"HTML"!==n.nodeName&&"static"===getComputedStyle(n).getPropertyValue("position");)n=n.offsetParent;return n||t.documentElement}(e);if(n=Kf(e),o===e)return{top:0,left:0,width:n.width,height:n.height};"html"!==function(e){return e.nodeName&&e.nodeName.toLowerCase()}(o)&&(r=Kf(o));var i=getComputedStyle(o),a=String(i.getPropertyValue("border-top-width")||0);r.top+=parseInt(a,10)-o.scrollTop||0;var s=String(i.getPropertyValue("border-left-width")||0);r.left+=parseInt(s,10)-o.scrollLeft||0}return p(p({},n),{top:n.top-r.top,left:n.left-r.left})}var Xf=/* @__PURE__ */t(Zp()),Zf=Qp.lazy(function(){return import("./main-CLaM-mkN.js").then(e=>/* @__PURE__ */t(e.default)).then(up)});!function(){function e(){this.cat="",this.level="",this.msg="",this.ext=""}c([Dt,l("design:type",Object)],e.prototype,"cat",void 0),c([Dt,l("design:type",Object)],e.prototype,"level",void 0),c([Dt,l("design:type",Object)],e.prototype,"msg",void 0),c([Dt,l("design:type",Object)],e.prototype,"ext",void 0)}();var Qf=new(function(){function e(){this.tab="log",this.position="right",this.logs=[],this.isExpanded=!1,this.inspectMode=!1}return e.prototype.open=function(){this.isExpanded=!0,this.inspectMode=!0},e.prototype.close=function(){this.isExpanded=!1,this.activeId="",this.hoverId="",this.inspectMode=!1},e.prototype.toggleInspectMode=function(){this.inspectMode=!this.inspectMode},c([Dt,l("design:type",String)],e.prototype,"tab",void 0),c([Dt,l("design:type",String)],e.prototype,"position",void 0),c([Dt,l("design:type",Array)],e.prototype,"logs",void 0),c([Dt,l("design:type",Object)],e.prototype,"isExpanded",void 0),c([Dt,l("design:type",Object)],e.prototype,"inspectMode",void 0),c([Dt,l("design:type",String)],e.prototype,"hoverId",void 0),c([Dt,l("design:type",String)],e.prototype,"activeId",void 0),c([Dt,l("design:type",Number)],e.prototype,"ellipsisThreshold",void 0),c([Pn.bound,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],e.prototype,"open",null),c([Pn.bound,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],e.prototype,"close",null),c([Pn.bound,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],e.prototype,"toggleInspectMode",null),e}()),eh={},th=Gf(function(e){var t,n=e.store,r=n.logs,o=null!==(t=n.ellipsisThreshold)&&void 0!==t?t:50;return Qp.createElement(Qp.Fragment,null,r.map(function(t,n){var r="string"==typeof t.ext&&(t.ext.startsWith("{")||t.ext.startsWith("["))?fh(t.ext):"object"==typeof t.ext?function(t){try{return fh(JSON.stringify(t))}catch(e){var n={};return Object.keys(t).forEach(function(e){var r=t[e];"object"!=typeof r||null===r||(0,$u.default)(r)?n[e]=r:n[e]="[complicated data]"}),n}}(t.ext):t.ext;return Qp.createElement("div",{className:"AMISDebug-logLine",key:"log-".concat(n)},Qp.createElement("div",{className:"AMISDebug-logLineMsg"},"[",t.cat,"] ",t.msg),"object"==typeof r?Qp.createElement(Qp.Suspense,{fallback:Qp.createElement("div",null,"Loading...")},Qp.createElement(Zf,{name:null,theme:"monokai",src:r,collapsed:!0,enableClipboard:!1,displayDataTypes:!1,collapseStringsAfterLength:o,iconStyle:"square"})):Qp.createElement("pre",{className:"AMISDebug-value"},JSON.stringify(r)))}))}),nh=Gf(function(e){for(var t,n,r,o,i=e.store,s=i.activeId,u=eh[s],l=(null===(o=null===(r=null==u?void 0:u.component)||void 0===r?void 0:r.props)||void 0===o?void 0:o.data)||{},c=[l];Object.getPrototypeOf(l)!==Object.prototype;){var p=Object.getPrototypeOf(l);if("[object Object]"!==Object.prototype.toString.call(p))break;c.push(p),l=p}var f=[];if(Object.keys(c[0]).length||c.length>1){var h=0;try{for(var v=a(c),m=v.next();!m.done;m=v.next()){var y=m.value;f.push(Qp.createElement("div",{key:"data-".concat(h)},Qp.createElement("h3",null,"Data Level-",h),Qp.createElement(Qp.Suspense,{fallback:Qp.createElement("div",null,"Loading...")},Qp.createElement(Zf,{key:"dataview-".concat(y),name:null,theme:"monokai",src:y,collapsed:0!==h,enableClipboard:!1,displayDataTypes:!1,iconStyle:"square"})))),h+=1}}catch(N){t={error:N}}finally{try{m&&!m.done&&(n=v.return)&&n.call(v)}finally{if(t)throw t.error}}}var g=(0,Qp.useRef)(null),b=d((0,Qp.useState)(!1),2),w=b[0],x=b[1],E=d((0,Qp.useState)(0),2),O=E[0],S=E[1],A=d((0,Qp.useState)(0),2),C=A[0],_=A[1];(0,Qp.useEffect)(function(){var e=function(){x(!1)},t=function(e){if(w){var t="right"===i.position?e.clientX-O:O-e.clientX,n=g.current,r=Math.max(200,C-t);return n.style.width=r+"px",e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,!1}};return w&&(document.addEventListener("mousemove",t),document.addEventListener("mouseup",e)),function(){w&&(document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",e))}},[w]),(0,Qp.useEffect)(function(){var e=function(e){e.preventDefault()};return g.current.addEventListener("mouseup",e),function(){var t;null===(t=g.current)||void 0===t||t.removeEventListener("mouseup",e)}},[]);var D=Qp.useCallback(function(e){var t;if("Enter"===e.key){var n=e.target,r=n.value;n.value="";try{var o=(null===(t=eh[i.activeId])||void 0===t?void 0:t.component.props.data)||{},a=r.startsWith("${")?Qs(r,o,"| raw"):Nh(new Function("data","with(data) {return ".concat(r,";}")),["data"],o);vh("debug","evaluate expression `".concat(r,"`"),a)}catch(e){vh("error","evaluate expression `".concat(r,"`"),"Error: ".concat(e.message))}finally{i.tab="log"}}},[]);return Qp.createElement("div",{className:(0,Xf.default)("AMISDebug",{"is-expanded":i.isExpanded,"is-left":"left"===i.position}),ref:g},Qp.createElement("div",{className:"AMISDebug-toggle",title:"open debug",onClick:i.open},i.isExpanded?Qp.createElement("i",{className:"fas fa-times"}):Qp.createElement("i",{className:"fas fa-bug"})),i.isExpanded?Qp.createElement("div",{className:(0,Xf.default)("AMISDebug-content")},Qp.createElement("div",{className:"AMISDebug-close",title:"Close",onClick:i.close},Qp.createElement("i",{className:"fas fa-times"})),Qp.createElement("div",{className:"AMISDebug-resize",onMouseDown:function(e){S(e.clientX),_(parseInt(getComputedStyle(g.current).getPropertyValue("width"),10)),x(!0)}}),Qp.createElement("div",{className:"AMISDebug-tab"},Qp.createElement("button",{className:(0,Xf.default)({active:"log"===i.tab}),onClick:function(){i.tab="log"}},"Log(",i.logs.length,")"),Qp.createElement("button",{className:(0,Xf.default)({active:"inspect"===i.tab}),onClick:function(){i.tab="inspect"}},"Inspect")),Qp.createElement("div",{className:"AMISDebug-changePosition"},"right"===i.position?Qp.createElement("i",{className:"fas fa-chevron-left",title:"move to left",onClick:function(){i.position="left"}}):Qp.createElement("i",{className:"fas fa-chevron-right",title:"move to right",onClick:function(){i.position="right"}})),"log"===i.tab?Qp.createElement("div",{className:"AMISDebug-log"},Qp.createElement("button",{onClick:function(){i.logs=[]}},"Clear Log"),Qp.createElement(th,{store:i})):null,"inspect"===i.tab?Qp.createElement("div",{className:"AMISDebug-inspect"},Qp.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 1024 1024",className:"AMISDebug-inspectIcon ".concat(i.inspectMode?"is-active":""),onClick:i.toggleInspectMode},Qp.createElement("path",{d:"M64 192L128 128h768l64 64v384H896v-384H128v512h320V768H128l-64-64v-512z m941.226667 621.226667L576 384v602.496l173.226667-173.226667h256zM640 832v-293.504l210.773333 210.773333h-128L640 832z"})),i.inspectMode?Qp.createElement("span",null,"Select an element in the page to inspect it."):Qp.createElement("span",null,"Click to inspect an element."),s?Qp.createElement(Qp.Fragment,null,Qp.createElement("h3",null,"Component:"," ",Qp.createElement("span",{className:"primary"},null==u?void 0:u.name)),f):null):null,s?Qp.createElement("div",{className:"AMISDebug-footer"},Qp.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 1024 1024"},Qp.createElement("path",{d:"M724.48 521.728c-1.8432 7.7824-5.7344 14.848-11.3664 20.48l-341.9136 342.016c-16.6912 16.6912-43.7248 16.6912-60.3136 0s-16.6912-43.7248 0-60.3136L622.6944 512 310.8864 200.0896c-16.6912-16.6912-16.6912-43.7248 0-60.3136 16.6912-16.6912 43.7248-16.6912 60.3136 0l341.9136 341.9136c10.8544 10.8544 14.6432 26.112 11.3664 40.0384z",fill:"currentColor"})),Qp.createElement("input",{type:"text",placeholder:"",onKeyUp:D})):null):null)});function rh(e){if(Qf.inspectMode){var t=e.target.closest("[data-debug-id]");t&&(Qf.hoverId=t.getAttribute("data-debug-id"))}}function oh(e){if(Qf.inspectMode){e.preventDefault();var t=e.target.closest("[data-debug-id]");t&&!t.closest(".AMISDebug")&&(Qf.activeId=t.getAttribute("data-debug-id"),Qf.tab="inspect",Qf.inspectMode=!1)}}var ih=document.createElement("div");ih.className="AMISDebug-hoverBox";var ah=document.createElement("div");ah.className="AMISDebug-activeBox";var sh=null;jn(function(){var e=Qf.hoverId,t=document.querySelector('[data-debug-id="'.concat(e,'"]'));if(t){var n=Jf(t,document.body);ih.style.top="".concat(n.top,"px"),ih.style.left="".concat(n.left,"px"),ih.style.width="".concat(n.width,"px"),ih.style.height="".concat(n.height,"px")}else ih.style.top="-999999px"}),jn(function(){var e=Qf.activeId,t=document.querySelector('[data-debug-id="'.concat(e,'"]'));if(t){var n=Jf(t,document.body);ah.style.top="".concat(n.top,"px"),ah.style.left="".concat(n.left,"px"),ah.style.width="".concat(n.width,"px"),ah.style.height="".concat(n.height,"px"),ah.classList.add("shake"),clearTimeout(sh),sh=setTimeout(function(){ah.classList.remove("shake")},500)}else ah.style.top="-999999px"});var uh,lh=!1;function ch(){if(!lh){lh=!0;var e=document.createElement("div");document.body.appendChild(e),(0,ef.render)(Qp.createElement(nh,{store:Qf}),e),uh=function(){(0,ef.unmountComponentAtNode)(e),document.body.removeChild(e)},document.body.appendChild(ih),document.body.appendChild(ah),document.addEventListener("mousemove",rh),document.addEventListener("click",oh,!0)}}function dh(){lh&&(lh=!1,null==uh||uh(),document.body.removeChild(ih),document.body.removeChild(ah),document.removeEventListener("mousemove",rh),document.removeEventListener("click",oh))}var ph=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.debugId=ud(),t}return s(t,e),t.prototype.componentDidMount=function(){var e=(0,ef.findDOMNode)(this);if(e){var t=this.props.renderer;e.setAttribute("data-debug-id",this.debugId),eh[this.debugId]={name:t.name,component:this.props.children}}},t.prototype.componentDidUpdate=function(e){var t=this.props.renderer;eh[this.debugId]&&(eh[this.debugId]={name:t.name,component:this.props.children})},t.prototype.componentWillUnmount=function(){delete eh[this.debugId],this.debugId===Qf.activeId&&(Qf.activeId=""),this.debugId===Qf.hoverId&&(Qf.hoverId="")},t.prototype.render=function(){return this.props.children},t}(Qp.Component);function fh(e){try{return JSON.parse(e)}catch(tE){return tE}}function hh(e){try{return JSON.stringify(e)}catch(eb){return e}}function vh(e,t,n){if(lh){console.groupCollapsed("[amis debug]",t),console.debug(n),console.groupEnd();var r={cat:e,level:"debug",msg:t,ext:hh(n)};Qf.logs.push(r),Qf.logs.length>200&&Qf.logs.splice(0,Qf.logs.length-200)}}var mh=/* @__PURE__ */n((e,t)=>{var n=Up();t.exports=function(e){return n(e,5)}}),yh=/* @__PURE__ */t(Xp());S();var gh=/* @__PURE__ */t(mh()),bh=/(?:^|raw\:)(get|post|put|delete|patch|options|head|jsonp|js):/i,wh=[],xh=[],Eh=[],Oh=!!document.documentMode;function Sh(e,t){if(void 0===t&&(t="get"),"string"==typeof e){var n=bh.test(e)?RegExp.$1:"";n&&(e=e.replace(n+":","")),e={method:n||t,url:e}}else e=p({},e);return e.url="string"==typeof e.url?e.url.trim():e.url,e}function Ah(e,t,n){void 0===n&&(n={}),e=Sh(e,n.method);var r=n.autoAppend,o=n.ignoreData,a=i(n,["autoAppend","ignoreData"]);if(e.config=p({},a),e.method=(e.method||n.method||"get").toLowerCase(),e.headers&&(e.headers=vp(e.headers,t,void 0,!1)),e.requestAdaptor&&"string"==typeof e.requestAdaptor&&(e.requestAdaptor=Dh(e.requestAdaptor,"api","context")),e.adaptor&&"string"==typeof e.adaptor&&(e.adaptor=Dh(e.adaptor,"payload","response","api","context")),!t)return e;if(t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer)return e.data=t,e;var s=e.url=e.url||"",u=void 0;try{u=Ys(e.url)}catch(tE){return console.warn("api 配置语法出错:".concat(tE)),e}var l=u.body.map(function(e,t){return"raw"===e.type?e.value:"__expression__".concat(t,"__")}).join(""),c=l.indexOf("?"),d=function(e,n,r){return void 0===n&&(n="url_encode"),void 0===r&&(r=void 0),e.replace(/__expression__(\d+)__/g,function(e,o){var i;return null!==(i=Ws(u.body[o],t,{defaultFilter:n}))&&void 0!==i?i:r})},f=function(t){return Pd(t,(null==e?void 0:e.filterEmptyQuery)?{filter:function(e,t){return""===t?void 0:t instanceof Date?Date.prototype.toISOString.call(t):t}}:void 0)},h=function(e,t,n){e.originUrl=e.originUrl||e.url;var r=e.url.indexOf("?");if(~r){var o=e.query=p(p(p({},Fd(e.url.substring(r+1))),e.query),t);e.url=e.url.substring(0,r)+"?"+f(o)}else{e.query=p(p({},e.query),t);var i=f(n?e.query:t);i&&(e.url="".concat(e.url,"?").concat(i))}return e},v=!1;if(~c){var m=l.indexOf("#"),y=Fd(l.substring(c+1,~m&&m>c?m:void 0));v=!0,Xd(y=vp(Object.assign(y,e.query),t,void 0,e.convertKeyToPath),function(e,n,r){var o;"string"==typeof e&&/^__expression__(\d+)__$/.test(e)?r[n]=null!==(o=Ws(u.body[RegExp.$1].body,t))&&void 0!==o?o:"":"string"==typeof e&&(r[n]=d(r[n],"raw",""))}),e.query=y;var g=d(l.substring(0,c),"raw","");e.url=g+(~g.indexOf("?")?"&":"?")+f(e.query)+(~m&&m>c?d(l.substring(m)):"")}else e.url=d(l,"raw","");if(o)return e;var b=e.data;if(e.data?e.body=e.data=vp(e.data,t,void 0,e.convertKeyToPath):"post"!==e.method&&"put"!==e.method&&"patch"!==e.method||(e.body=e.data=t),e.query&&!v&&(e.query=vp(e.query,t,void 0,e.convertKeyToPath)),"get"===e.method||"jsonp"===e.method||"js"===e.method)!e.data&&(!~s.indexOf("$")&&r||e.forceAppendDataToQuery)?(e.data=t,e.query=p(p({},e.query),t)):!1===e.attachDataToQuery&&e.data&&(!~s.indexOf("$")&&r||e.forceAppendDataToQuery)&&(e=h(e,t,!1)),e.data&&!1!==e.attachDataToQuery&&delete(e=h(e,e.data,!0)).data;else if(e.method){var w=e.url.indexOf("?");if(~w)y=e.query=p(p({},Fd(e.url.substring(w+1))),e.query),e.url=e.url.substring(0,w)+"?"+f(y);else{var x=f(e.query);x&&(e.url="".concat(e.url,"?").concat(x))}}return e.graphql?"get"===e.method?e.query=e.data=p(p({},e.query),{query:e.graphql}):"post"!==e.method&&"put"!==e.method&&"patch"!==e.method||(e.body=e.data={query:e.graphql,operationName:e.operationName,variables:Wu(e.data)}):e.jsonql&&(e.method="post",e.jsonql=vp(e.jsonql,Hu(t,p(p({},e.query),t),!1),void 0,!1,!0),e.body=e.data=b&&e.jsonql?{data:e.data,jsonql:e.jsonql}:e.jsonql,e.forceAppendDataToQuery&&(e=h(e,t,!0))),e}function Ch(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];try{return new(Function.bind.apply(Function,f(f([void 0],d(t),!1),[e],!1)))}catch(tE){return console.warn(tE),null}}var _h=Object.getPrototypeOf(function(){return u(this,void 0,void 0,function(){return o(this,function(e){return[2]})})}).constructor;function Dh(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];try{return new(_h.bind.apply(_h,f(f([void 0],d(t),!1),[e],!1)))}catch(tE){return console.warn(tE),null}}function Nh(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if("function"==typeof e)return e.apply(this,n);if("string"==typeof e&&e){var o=Ch.apply(void 0,f([e],d(t),!1));return null==o?void 0:o.apply(this,n)}}function kh(e,t){var n,r=e.data,o=!0;if(!r)throw new Error("Response is empty");if("string"==typeof r){var i=(null===(n=e.headers)||void 0===n?void 0:n["content-type"])||"";if(e.headers&&i.startsWith("text/")&&!i.includes("markdown")&&"blob"!==t.responseType)try{if(void 0===(r=JSON.parse(r)))throw new Error("Response should be JSON")}catch(tE){var a="string"==typeof r?Qu(r.substring(0,100)):"";throw new Error("Response should be JSON\n ".concat(a))}else{if("blob"===t.responseType)throw new Error('Should have "Content-Disposition" in Header');if(!i.includes("markdown"))throw new Error('Content is wrong content-type:"'.concat(i,'" content: ').concat(Qu(r.substring(0,100))))}}r.hasOwnProperty("errorCode")?(r.status=r.errorCode,r.msg=r.errorMessage||r.errorMsg):r.hasOwnProperty("errno")?(r.status=r.errno,r.msg=r.errmsg||r.errstr||r.msg):r.hasOwnProperty("no")?(r.status=r.no,r.msg=r.error||r.msg):r.hasOwnProperty("error")&&("object"==typeof r.error&&r.error.hasOwnProperty("code")?(r.status=r.error.code,r.msg=r.error.message):(r.status=r.error,r.msg=r.errmsg||r.msg)),r.hasOwnProperty("status")||(o=!1);var s={ok:!1===o||0==r.status,status:!1===o?0:r.status,msg:r.msg||r.message,defaultMsg:r.defaultMsg,msgTimeout:r.msgTimeout,data:r.data||o?r.data:r};if(r&&r.type&&(s.data=r),422==s.status&&(s.errors=r.errors),vh("api","response",s),t.responseData&&(s.ok||!id(s.data))){vh("api","before dataMapping",s.data);var u=vp(t.responseData,zu({api:t},Bh(s.data)),void 0,t.convertKeyToPath);vh("api","after dataMapping",u),s.data=u}return s}function Ih(e,t){return void 0===t&&(t=1e3),new Promise(function(n){setTimeout(function(){n(e)},t)})}function Th(e,t){if(e._wrappedFetcher)return e;var n=function(n,r,i){var a,s,l,c,d;return u(this,void 0,void 0,function(){var p,f,h,v,m=this;return o(this,function(y){switch(y.label){case 0:return(n=Ah(n,r,i)).context=r,p=xh.concat(),n.requestAdaptor&&(f=n.requestAdaptor,p.unshift(function(e,t){return u(m,void 0,void 0,function(){var n,r,i;return o(this,function(o){switch(o.label){case 0:return n=e.query,r=(0,$u.default)(e.query)?(0,gh.default)(e.query):e.query,vh("api","before requestAdaptor",e),[4,f.call(e,e,t)];case 1:return"string"==typeof(e=o.sent()||e).url&&(e.query!==n||(0,$u.default)(e.query)&&!(0,Ml.default)(e.query,r))&&(i=e.url.indexOf("?"),e.url="".concat(~i?e.url.substring(0,i):e.url,"?").concat(Pd(e.query))),vh("api","after requestAdaptor",e),[2,e]}})})})),p.length?[4,p.reduce(function(e,t){return u(m,void 0,void 0,function(){var n;return o(this,function(o){switch(o.label){case 0:return[4,e];case 1:return n=o.sent(),[4,t(n,r)];case 2:return[2,n=o.sent()||n]}})})},Promise.resolve(n))]:[3,2];case 1:n=y.sent(),y.label=2;case 2:if(n.data&&(n.data instanceof FormData||(g=n.data,Object.keys(g).some(function(e){var t=g[e];return t instanceof File||Array.isArray(t)&&t.length&&t[0]instanceof File}))||"form-data"===n.dataType)?n.data=n.data instanceof FormData?n.data:function(e,t,n){void 0===t&&(t={arrayFormat:"indices",encodeValuesOnly:!0}),void 0===n&&(n=new FormData);var r=[],o={};return Object.keys(e).forEach(function(t){var n=e[t];n instanceof File?r.push([t,n]):Array.isArray(n)&&n.length&&n[0]instanceof File?n.forEach(function(e){return r.push(["".concat(t,"[]"),e])}):o[t]=n}),Pd(o,t).split("&").forEach(function(e){var t=e.split("=");t[0]&&n.append(t[0],decodeURIComponent(t[1]))}),r.forEach(function(e){return n.append(e[0],e[1],e[1].name)}),n}(n.data,n.qsOptions):n.data&&"string"!=typeof n.data&&"form"===n.dataType?(n.data=Pd(n.data,n.qsOptions),n.headers=n.headers||(n.headers={}),n.headers["Content-Type"]||(n.headers["Content-Type"]="application/x-www-form-urlencoded")):n.data&&"string"!=typeof n.data&&"json"===n.dataType&&(n.data=JSON.stringify(n.data),n.headers=n.headers||(n.headers={}),n.headers["Content-Type"]||(n.headers["Content-Type"]="application/json")),n.mockResponse)return console.debug("fetch api ".concat(n.url).concat(n.data?"?".concat("string"==typeof n.data?n.data:Pd(n.data,n.qsOptions)):""," with mock response"),n.mockResponse,n),[2,Ph(Ih(n.mockResponse,null!==(s=null===(a=n.mockResponse)||void 0===a?void 0:a.delay)&&void 0!==s?s:100),n,r)];if(!Mh(n.url))throw new Error("invalid api url:".concat(n.url));return vh("api","request api",n),null==t||t({eventType:"api",eventData:(0,yh.default)(n,["config","data","body"])},n.data),"jsonp"===(null===(l=n.method)||void 0===l?void 0:l.toLocaleLowerCase())?[2,Ph(jh(n),n,r)]:"js"===(null===(c=n.method)||void 0===c?void 0:c.toLocaleLowerCase())?[2,Ph(Fh(e,n),n,r)]:"number"==typeof n.cache&&n.cache>0?(h=function(e){for(var t,n=Date.now(),r=0,o=wh.length;r<o;r++){var i=wh[r];if(n-i.requestTime>i.cache)wh.splice(r,1),o--,r--;else if($h(e,i)){t=i;break}}return t}(n),[2,Ph(h?h.cachedPromise:zh(n,e(n)),n,r)]):(Oh&&n&&"get"===(null===(d=n.method)||void 0===d?void 0:d.toLocaleLowerCase())&&(v="_t=".concat(Date.now()),-1===n.url.indexOf("?")?n.url=n.url+"?".concat(v):n.url=n.url+"&".concat(v)),[2,Ph(e(n),n,r)])}var g})})};return n._wrappedFetcher=!0,n}function Ph(e,t,n){return u(this,void 0,void 0,function(){var r,i,a=this;return o(this,function(s){switch(s.label){case 0:return r=Eh.concat(),t.adaptor&&(i=t.adaptor,r.push(function(e,t,n,r){return u(a,void 0,void 0,function(){var e;return o(this,function(o){switch(o.label){case 0:return vh("api","before adaptor data",t.data),(null==(e=i(t.data,t,n,r))?void 0:e.then)?[4,e]:[3,2];case 1:e=o.sent(),o.label=2;case 2:return vh("api","after adaptor data",e),[2,e]}})})})),[4,r.reduce(function(e,r){return u(a,void 0,void 0,function(){var i,a,s;return o(this,function(o){switch(o.label){case 0:return[4,e];case 1:return i=o.sent(),(null==(a=null!==(s=r(i.data,i,t,n))&&void 0!==s?s:i.data)?void 0:a.then)?[4,a]:[3,3];case 2:a=o.sent(),o.label=3;case 3:return[2,p(p({},i),{data:a})]}})})},e)];case 1:return[2,kh(s.sent(),t)]}})})}function Fh(e,t){return new Promise(function(n,r){t.method="get",e(t).then(function(e){"string"==typeof e.data?n({status:200,headers:{},data:{status:0,msg:"",data:new Function("api",e.data)(t)}}):r("must return string: "+e.data)})})}function jh(e){return new Promise(function(t,n){var r,o=document.createElement("script"),i=e.url;function a(){o&&(o.onload=o.onreadystatechange=o.onerror=null,o.parentNode&&o.parentNode.removeChild(o),o=null)}o.async=!0;var s=(null===(r=e.query)||void 0===r?void 0:r.callback)||"axiosJsonpCallback"+ad(),u=window[s];window[s]=function(e){window[s]=u,t({data:e,status:200,headers:{}})};var l={_:/* @__PURE__ */(new Date).getTime(),_callback:s};i+=(i.indexOf("?")>=0?"&":"?")+Pd(l),o.onload=o.onreadystatechange=function(){o.readyState&&!/loaded|complete/.test(o.readyState)||a()},o.onerror=function(){a(),n({status:0,headers:{}})},o.src=i,document.head.appendChild(o)})}function Rh(e,t,n,r){return!!t&&(!e||Uc(Ah(Sh(e),n),Ah(Sh(t),r)))}function Vh(e,t,n,r){var o;if(!t)return!1;if(void 0===e)return!0;if(t=Sh(t),e=e?Sh(e):e,!1===t.autoRefresh)return!1;if(e&&e.url!==t.url||!e)return!(!Mh(t.url)||t.sendOn&&!lc(t.sendOn,r));var i=null!==(o=t.trackExpression)&&void 0!==o?o:t.url;if("string"!=typeof i||!~i.indexOf("$"))return!1;var a=!1;return t.trackExpression||e.trackExpression?a=Zs(e.trackExpression||"",n)!==Zs(t.trackExpression||"",r):(e=Ah(e,n,{ignoreData:!0}),t=Ah(t,r,{ignoreData:!0}),a=e.url!==t.url),!(!a||!Mh(t.url)||t.sendOn&&!lc(t.sendOn,r))}function Mh(e){if(!e||"string"!=typeof e)return!1;var t=e.indexOf("://");if(~t&&t+3===e.length)return!1;try{e=(~t?"":"schema://domain".concat("/"===e[0]?"":"/"))+e,new URL(e)}catch(n){return!1}return!0}function Lh(e,t,n,r){return!(!e||!1===n||r&&t&&!lc(r,t)||("string"!=typeof e||!e.length)&&(!Gu(e)||!e.url||e.sendOn&&t&&!lc(e.sendOn,t)))}function $h(e,t){return e.method===t.method&&e.url===t.url&&!Uc(e.data,t.data,!1)}function zh(e,t){return wh.push(p(p({},e),{cachedPromise:t,requestTime:Date.now()})),t}function Bh(e){var t;return void 0===e?e={}:(0,$u.default)(e)||((t={})[Array.isArray(e)?"items":"result"]=e,e=t),e}var Uh,qh=/* @__PURE__ */n((e,t)=>{var n,r;n=e,r=function(){function e(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function r(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,i=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(t,i,a){var s=o.URL||o.webkitURL,u=document.createElement("a");i=i||t.name||"download",u.download=i,u.rel="noopener","string"==typeof t?(u.href=t,u.origin===location.origin?r(u):n(u.href)?e(t,i,a):r(u,u.target="_blank")):(u.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(u.href)},4e4),setTimeout(function(){r(u)},0))}:"msSaveOrOpenBlob"in navigator?function(t,o,i){if(o=o||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(t,i),o);else if(n(t))e(t,o,i);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){r(a)})}}:function(t,n,r,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,r);var s="application/octet-stream"===t.type,u=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&u||i)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},c.readAsDataURL(t)}else{var d=o.URL||o.webkitURL,p=d.createObjectURL(t);a?a.location=p:location.href=p,a=null,setTimeout(function(){d.revokeObjectURL(p)},4e4)}});o.saveAs=a.saveAs=a,void 0!==t&&(t.exports=a)},"function"==typeof define&&define.amd?define([],r):void 0!==e?r():(r(),n.FileSaver={})}),Wh=!!(Uh=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./))&&parseInt(Uh[2],10),Hh=navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS"),Gh=function(){function e(e,t,n,r){void 0===r&&(r=1),this.r=e,this.g=t,this.b=n,this.a=r}return e.prototype.toRGBString=function(){return"rgb(".concat(Math.floor(this.r*this.a),",").concat(Math.floor(this.g*this.a),",").concat(Math.floor(this.b*this.a),")")},e.prototype.toRGBAString=function(){return"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.a,")")},e.prototype.toHexString=function(){return function(e){var t=Math.floor(e.r*e.a),n=Math.floor(e.g*e.a),r=Math.floor(e.b*e.a);return"#".concat(Kh(t)).concat(Kh(n)).concat(Kh(r))}(this)},e}();function Kh(e){var t=e.toString(16);return 1===t.length?"0"+t:t}var Yh=function(){function e(e,t,n,r){var o;void 0===r&&(r=1),this.min=isNaN(e)?0:e,this.max=isNaN(t)?0:t,this.min===this.max&&(this.max=this.min+1),this.max<this.min&&(o=d([this.min,this.max],2),this.max=o[0],this.min=o[1]),n.length<2&&(n=["#FFEF9C","#FF7127"]),this.alpha=r,this.colorStops=n.map(function(e){return function(e,t){e.match(/^#(?:[0-9a-fA-F]{3})$/)&&(e=e.substring(1).split("").map(function(e){return e+e}).join(""));var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return new Gh(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),t);throw new Error("".concat(e," is not a valid hex color."))}(e,r)})}return e.prototype.getColor=function(e){var t=this.colorStops.length;if(e<this.min)return this.colorStops[0];if(e>this.max)return this.colorStops[t-1];var n=this.max-this.min,r=(e-this.min)/n,o=Math.max(Math.ceil(r*(t-1)),1),i=this.colorStops[o-1],a=this.colorStops[o];return r=r*(t-1)-(o-1),new Gh(Math.floor(r*a.r+(1-r)*i.r),Math.floor(r*a.g+(1-r)*i.g),Math.floor(r*a.b+(1-r)*i.b),this.alpha)},e}(),Jh=/* @__PURE__ */n((e,t)=>{var n=g(),r=ls(),o=E(),i=Math.ceil,a=Math.max;t.exports=function(e,t,s){t=(s?r(e,t,s):void 0===t)?1:a(o(t),0);var u=null==e?0:e.length;if(!u||t<1)return[];for(var l=0,c=0,d=Array(i(u/t));l<u;)d[c++]=n(e,l,l+=t);return d}});function Xh(e,t,n){n=Array.isArray(n)?n:n.split(",").map(function(e){return e.trim()}).filter(function(e){return e});var r=p({},e),o=!1;return t&&n.forEach(function(n){var i=Nu(t,n),a=Nu(e,n),s=[];void 0!==i&&s.push(i),void 0!==a&&s.push(a),o=!0,Ku(r,n,[].concat.apply([],s))}),o?r:e}var Zh={boolean:"布尔",integer:"整数",number:"数字",string:"文本",array:"数组",object:"对象"},Qh=function(){function e(e,t){this.children=[],this.schemas=[],this.setSchemas(Array.isArray(e)?e:[e]),this.id=t}return e.prototype.addChild=function(t,n){var r=new e(n||{type:"object",properties:{}},t);return this.children.push(r),r.parent=this,r},e.prototype.removeChild=function(e){var t=this.children.findIndex(function(t){return"string"==typeof e?e===t.id:t===e});~t&&(delete this.children[t].parent,this.children.splice(t,1))},e.prototype.setSchemas=function(e){var t,n;this.schemas.splice(0,this.schemas.length);try{for(var r=a(e),o=r.next();!o.done;o=r.next()){var i=o.value;if("object"!==i.type)throw new TypeError("data scope accept only object");this.schemas.push(p({$id:Mc()},i))}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.addSchema=function(e){return e=p({$id:Mc()},e),this.schemas.push(e),this},e.prototype.removeSchema=function(e){var t=this.schemas.findIndex(function(t){return t.$id===e});return~t&&this.schemas.splice(t,1),this},e.prototype.contains=function(e){for(var t=e;t;){if(this===t)return!0;t=t.parent}return!1},e.prototype.assignSchema=function(e,t){var n,r;if(e.type&&e.type===t.type){if("array"===e.type)return e.items?Array.isArray(e.items)?t.items?Array.isArray(t.items)?t.items:p(p({},e),{items:f(f([],d(e.items),!1),[t.items],!1)}):p(p({},e),t):p(p({},e),{items:this.assignSchema(e.items,t.items)}):t;if("object"===e.type&&e.properties){var o={};try{for(var i=a(Array.from(new Set(f(f([],d(Object.keys(e.properties)),!1),d(Object.keys(t.properties)),!1)))),s=i.next();!s.done;s=i.next()){var u=s.value,l=e.properties[u];o[u]=l?t.properties[u]?this.assignSchema(l,t.properties[u]):l:t.properties[u]}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return p(p({},e),{properties:o})}return t}return Array.isArray(e.oneOf)?p(p({},e),{oneOf:f(f([],d(e.oneOf),!1),[t],!1)}):p(p({},e),{oneOf:[e,t]})},e.prototype.getMergedSchema=function(){var e=this,t={type:"object",properties:{}};return this.schemas.forEach(function(n){var r=n.properties||{};Object.keys(r).forEach(function(n){var o=r[n];t.properties[n]?t.properties[n]=e.assignSchema(t.properties[n],o):t.properties[n]=o})}),t},e.prototype.buildOptions=function(e,t,n,r,o){var i,a,s,u=this;void 0===n&&(n={label:"",value:""}),void 0===r&&(r="");var l={label:t.title||r,value:"成员"===t.title?"":n.value,path:"成员"===t.title?"":n.label,type:t.type,rawType:t.rawType,tag:null!==(a=null!==(i=t.typeLabel)&&void 0!==i?i:Zh[t.type])&&void 0!==a?a:t.type,description:t.description,isMember:o,disabled:"成员"===t.title};if(t.group){var c=e.findIndex(function(e){return e.label===t.group});~c?e[c].children.push(l):e.push({label:t.group,value:"",children:[l]})}else e.push(l);"object"===t.type&&t.properties?(l.children=[],Object.keys(t.properties).forEach(function(e){var r,o=t.properties[e];u.buildOptions(l.children,o,{label:n.label+(n.label?".":"")+(null!==(r=o.title)&&void 0!==r?r:e),value:n.value+(n.value?".":"")+e},e,"成员"===t.title)})):"array"===t.type&&(null===(s=t.items)||void 0===s?void 0:s.properties)&&(l.children=[],this.buildOptions(l.children,p(p({title:"成员"},t.items),{disabled:!0}),{label:n.label,value:n.value},"items","成员"===t.title),l.children=ld(l.children,function(e){return p({},e)}))},e.prototype.getDataPropsAsOptions=function(){var e=[];return this.buildOptions(e,this.getMergedSchema()),e[0].children},e.prototype.getSchemaByPath=function(e){var t,n,r=Du(e);try{for(var o=a(this.schemas),i=o.next();!i.done;i=o.next()){var s=i.value,u=r.reduce(function(e,t){return e&&"object"===e.type&&e.properties?e.properties[t]:null},s);if(u)return u}}catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return null},e.prototype.getSchemaById=function(e){var t;return null===(t=this.schemas)||void 0===t?void 0:t.find(function(t){return t.$id===e})},e}(),ev=function(){function e(e){this.idMap={},this.root=new Qh(e,"root"),this.idMap.root=this.root,this.current=this.root}return e.prototype.setSchema=function(e){return this.current.setSchemas(e),this},e.prototype.addSchema=function(e){return this.current.addSchema(e),this},e.prototype.removeSchema=function(e){return this.current.removeSchema(e),delete this.idMap[e],this},e.prototype.getSchemas=function(){for(var e=[],t=this.current;t;)e.push.apply(e,f([],d(t.schemas),!1)),t=t.parent;return e},e.prototype.addScope=function(e,t){if(void 0===t&&(t=Mc()),this.idMap[t])throw new Error("scope id `"+t+"` already exists");return this.current=this.current.addChild(t,e),this.idMap[t]=this.current,this},e.prototype.removeScope=function(e){var t,n=this.getScope(e);if(!n.parent)throw new Error("cannot remove root scope");return n.contains(this.current)&&(this.current=n.parent),null===(t=n.parent)||void 0===t||t.removeChild(n),delete this.idMap[n.id],this},e.prototype.hasScope=function(e){var t="string"==typeof e?e:e.id;return!!this.idMap[t]},e.prototype.getScope=function(e){var t="string"==typeof e?e:e.id;return this.idMap[t]},e.prototype.switchToRoot=function(){return this.current=this.root,this},e.prototype.switchTo=function(e){return this.current=this.getScope(e),this},e.prototype.pushVariable=function(e,t){e.tag?t.push({label:e.tag,children:e.getDataPropsAsOptions()}):t.push.apply(t,f([],d(e.getDataPropsAsOptions()),!1))},e.prototype.getDataPropsAsOptions=function(){for(var e,t=[],n=this.current;n;){if(n.group){var r=[];this.pushVariable(n,r);var o=t.findIndex(function(e){return e.label===(null==n?void 0:n.group)});~o?(e=t[o].children).push.apply(e,f([],d(r),!1)):t.push({label:n.group,children:r})}else this.pushVariable(n,t);n=n.parent}return t},e.prototype.getSchemaByPath=function(e){for(var t=this.current;t;){var n=t.getSchemaByPath(e);if(n)return n;t=t.parent}return null},e}(),tv=function(e){function t(n,r){var o=e.call(this,n)||this;return o.type="ServerError",Object.setPrototypeOf(o,t.prototype),o.response=r,o}return s(t,e),t}(Error),nv=/* @__PURE__ */t(q()),rv=(0,nv.default)(function(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(r.response)},r.onerror=n,r.open("GET",e),r.responseType="blob",r.send()})}),ov=(0,nv.default)(function(e){return new Promise(function(t,n){var r=new Image;r.onerror=n,r.onload=function(){t({width:r.width,height:r.height})},r.src=e})}),iv=/* @__PURE__ */n((e,t)=>{var n=Y();t.exports=function(){return n.Date.now()}}),av=/* @__PURE__ */n((e,t)=>{var n=Z(),r=iv(),o=h(),i=Math.max,a=Math.min;t.exports=function(e,t,s){var u,l,c,d,p,f,h=0,v=!1,m=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=u,r=l;return u=l=void 0,h=t,d=e.apply(r,n)}function b(e){var n=e-f;return void 0===f||n>=t||n<0||m&&e-h>=c}function w(){var e=r();if(b(e))return x(e);p=setTimeout(w,function(e){var n=t-(e-f);return m?a(n,c-(e-h)):n}(e))}function x(e){return p=void 0,y&&u?g(e):(u=l=void 0,d)}function E(){var e=r(),n=b(e);if(u=arguments,l=this,f=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(w,t),v?g(e):d}(f);if(m)return clearTimeout(p),p=setTimeout(w,t),g(f)}return void 0===p&&(p=setTimeout(w,t)),d}return t=o(t)||0,n(s)&&(v=!!s.leading,c=(m="maxWait"in s)?i(o(s.maxWait)||0,t):c,y="trailing"in s?!!s.trailing:y),E.cancel=function(){void 0!==p&&clearTimeout(p),h=0,u=f=l=p=void 0},E.flush=function(){return void 0===p?d:x(r())},E}}),sv=function(){function e(){this.q=[]}return e.prototype.add=function(e,t){void 0===t&&(t="both"),this.q.push({fn:e,type:t})},e.prototype.call=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.q.forEach(function(n){n.type!==e&&"both"!==n.type&&"both"!==e||n.fn.apply(null,t)})},e}();function uv(e,t){if(e.currentStyle)return e.currentStyle[t];if(window.getComputedStyle){var n=window.getComputedStyle(e,void 0);return n?n.getPropertyValue(t):void 0}return e.style[t]}function lv(e,t,n){if(void 0===n&&(n="both"),e){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t,n)}else e.resizedAttached=new sv,e.resizedAttached.add(t,n);var r=e.resizeSensor=document.createElement("div");r.className="resize-sensor";var o="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: scroll; z-index: -1; visibility: hidden;",i="position: absolute; left: 0; top: 0;";r.style.cssText=o,r.innerHTML='\n <div class="resize-sensor-expand" style="'.concat(o,'">\n <div style="').concat(i,'"></div>\n </div>\n <div class="resize-sensor-shrink" style="').concat(o,'">\n <div style="').concat(i,' width: 200%; height: 200%"></div>\n </div>\n <div class="resize-sensor-appear" style="').concat(o,'animation-name: apearSensor; animation-duration: 0.2s;"></div>'),e.appendChild(r),e.hasInlineStyle=e.hasAttribute("style");var a=e.originPosition=uv(e,"position");~["fixed","absolute"].indexOf(a)||(e.style.position="relative");var s,u,l=r.children[0],c=l.children[0],d=r.children[1],p=r.children[2],f=function(){c.style.width=l.offsetWidth+10+"px",c.style.height=l.offsetHeight+10+"px",l.scrollLeft=l.scrollWidth,l.scrollTop=l.scrollHeight,d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,s=e.offsetWidth,u=e.offsetHeight},h=function(){f(),b&&(v(),b=!1)};f();var v=function(t){void 0===t&&(t="both"),e.resizedAttached&&e.resizedAttached.call(t)},m=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n)},y=function(e,t,n){e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener(t,n)},g=function(t){var n=e.offsetWidth!=s,r=e.offsetHeight!=u;(n||r)&&v(n&&r?"both":n?"width":"height"),f()};m(l,"scroll",g),m(d,"scroll",g),m(p,"animationstart",h);var b=!l.offsetWidth;return function(){y(l,"scroll",g),y(d,"scroll",g),y(p,"animationstart",h)}}}function cv(e){if(e.resizeSensor){e.hasInlineStyle?e.style.position=e.originPosition:e.removeAttribute("style");try{e.removeChild(e.resizeSensor)}catch(tE){}delete e.resizeSensor,delete e.resizedAttached,delete e.hasInlineStyle,delete e.originPosition}}function dv(e,t,n){var r;void 0===n&&(n=!1),n&&(r=t,t=function(){r(),a()}),e.addEventListener("animationstart",t);var o=e.style.animationName,i=e.style.animationDuration;e.style.cssText="animation-name: apearSensor; animation-duration: 0.2s;";var a=function(){e.style.animationName=o,e.style.animationDuration=i,e.removeEventListener("animationstart",t)};return a}function pv(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r="both");var o=e.getBoundingClientRect(),i=o.width,a=o.height,s=new ResizeObserver(function(e){n&&s.disconnect();var o=e[0].contentRect,u=Math.abs(o.width-i)>.5,l=Math.abs(o.height-a)>.5;(u||l)&&(("both"===r||"width"===r&&u||"height"===r&&l)&&t(),i=o.width,a=o.height)});return s.observe(e),function(){s.disconnect()}}function fv(e,t,n,r,o){if(void 0===n&&(n=!1),void 0===r&&(r="both"),void 0===o&&(o=!1),!e)return function(){};if("undefined"!=typeof ResizeObserver){var i=[pv(e,t,n,r),o?dv(e,t,!0):void 0];return function(){i.forEach(function(e){return null==e?void 0:e()})}}var a=void 0;if(n)return a=lv(e,function(){t.apply(this,arguments),null==a||a(),cv(e)},r),function(){};a=lv(e,t,r);var s=!1;return function(){s||(s=!0,null==a||a(),cv(e))}}var hv=!("undefined"==typeof window||!window.document||!window.document.createElement),vv=!1,mv=!1;try{var yv={get passive(){return vv=!0},get once(){return mv=vv=!0}};hv&&(window.addEventListener("test",yv,yv),window.removeEventListener("test",yv,!0))}catch(tE){}function gv(e,t,n,r){return function(e,t,n,r){if(r&&"boolean"!=typeof r&&!mv){var o=r.once,i=r.capture,a=n;!mv&&o&&(a=n.__once||function e(r){this.removeEventListener(t,e,i),n.call(this,r)},n.__once=a),e.addEventListener(t,a,vv?r:i)}e.addEventListener(t,n,r)}(e,t,n,r),function(){!function(e,t,n,r){var o=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}(e,t,n,r)}}function bv(e){var t=function(e){var t=(0,Qp.useRef)(e);return(0,Qp.useEffect)(function(){t.current=e},[e]),t}(e);return(0,Qp.useCallback)(function(){return t.current&&t.current.apply(t,arguments)},[t])}var wv=/* @__PURE__ */n((e,t)=>{var n=function(){};if("production"!==process.env.NODE_ENV){var r=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return t[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(a){}};n=function(e,t,n){var o=arguments.length;n=new Array(o>2?o-2:0);for(var i=2;i<o;i++)n[i-2]=arguments[i];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||r.apply(null,[t].concat(n))}}t.exports=n});function xv(e){return e&&e.ownerDocument||document}var Ev=/* @__PURE__ */t(wv()),Ov=function(){},Sv=function(e){return e&&("current"in e?e.current:e)},Av=/* @__PURE__ */n((e,t)=>{var n=Ra(),r=Tu(),o=I();t.exports=function(e,t){var i={};return t=o(t,3),r(e,function(e,r,o){n(i,r,t(e,r,o))}),i}}),Cv=/* @__PURE__ */n((e,t)=>{t.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}}),_v=/* @__PURE__ */n((e,t)=>{var n=m()({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});t.exports=n}),Dv=/* @__PURE__ */n((e,t)=>{var n=_v(),r=w(),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(e){return(e=r(e))&&e.replace(o,n).replace(i,"")}}),Nv=/* @__PURE__ */n((e,t)=>{var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(e){return e.match(n)||[]}}),kv=/* @__PURE__ */n((e,t)=>{var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(e){return n.test(e)}}),Iv=/* @__PURE__ */n((e,t)=>{var n="\\ud800-\\udfff",r="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",a="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",s="["+a+"]",u="\\d+",l="["+r+"]",c="["+o+"]",d="[^"+n+a+u+r+o+i+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="["+i+"]",v="(?:"+c+"|"+d+")",m="(?:"+h+"|"+d+")",y="(?:['’](?:d|ll|m|re|s|t|ve))?",g="(?:['’](?:D|LL|M|RE|S|T|VE))?",b="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",w="[\\ufe0e\\ufe0f]?",x=w+b+"(?:\\u200d(?:"+["[^"+n+"]",p,f].join("|")+")"+w+b+")*",E="(?:"+[l,p,f].join("|")+")"+x,O=RegExp([h+"?"+c+"+"+y+"(?="+[s,h,"$"].join("|")+")",m+"+"+g+"(?="+[s,h+v,"$"].join("|")+")",h+"?"+v+"+"+y,h+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",u,E].join("|"),"g");t.exports=function(e){return e.match(O)||[]}}),Tv=/* @__PURE__ */n((e,t)=>{var n=Nv(),r=kv(),o=w(),i=Iv();t.exports=function(e,t,a){return e=o(e),void 0===(t=a?void 0:t)?r(e)?i(e):n(e):e.match(t)||[]}}),Pv=/* @__PURE__ */n((e,t)=>{var n=Cv(),r=Dv(),o=Tv(),i=RegExp("['’]","g");t.exports=function(e){return function(t){return n(o(r(t).replace(i,"")),e,"")}}}),Fv=/* @__PURE__ */n((e,t)=>{var n=v(),r=Pv()(function(e,t,r){return t=t.toLowerCase(),e+(r?n(t):t)});t.exports=r}),jv=/* @__PURE__ */n((e,t)=>{var n=Ru(),r=ye();t.exports=function(e,t){var o=-1,i=r(e)?Array(e.length):[];return n(e,function(e,n,r){i[++o]=t(e,n,r)}),i}}),Rv=/* @__PURE__ */n((e,t)=>{var n=y(),r=I(),o=jv(),i=ie();t.exports=function(e,t){return(i(e)?n:o)(e,r(t,3))}}),Vv=/* @__PURE__ */n((e,t)=>{var n=Pv()(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});t.exports=n});function Mv(){return Mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mv.apply(null,arguments)}function Lv(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var $v=/* @__PURE__ */n((e,t)=>{t.exports=function(e,t,n,r,o,i,a,s){if("production"!==process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===t)u=/* @__PURE__ */new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],c=0;(u=new Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}}),zv=/* @__PURE__ */t($v()),Bv=function(){};function Uv(e,t){return void 0!==e[t]}function qv(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function Wv(e,t){return Wv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wv(e,t)}function Hv(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wv(e,t)}function Gv(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function Kv(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function Yv(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function Jv(e,t,n){void 0===n&&(n=[]);var r,o=e.displayName||e.name||"Component",i=!!(r=e)&&("function"!=typeof r||r.prototype&&r.prototype.isReactComponent),a=Object.keys(t),s=a.map(qv);!i&&n.length&&("production"!==process.env.NODE_ENV?(0,zv.default)(!1,"[uncontrollable] stateless function components cannot pass through methods because they have no associated instances. Check component: "+o+", attempting to pass through methods: "+n.join(", ")):(0,zv.default)(!1));var u=/* @__PURE__ */function(r){function o(){for(var e,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(e=r.call.apply(r,[this].concat(i))||this).handlers=Object.create(null),a.forEach(function(n){var r=t[n];e.handlers[r]=function(t){if(e.props[r]){var o;e._notifying=!0;for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];(o=e.props)[r].apply(o,[t].concat(a)),e._notifying=!1}e.unmounted||e.setState(function(e){var r,o=e.values;return{values:Mv(Object.create(null),o,(r={},r[n]=t,r))}})}}),n.length&&(e.attachRef=function(t){e.inner=t});var u=Object.create(null);return a.forEach(function(t){u[t]=e.props[qv(t)]}),e.state={values:u,prevProps:{}},e}Hv(o,r);var i=o.prototype;return i.shouldComponentUpdate=function(){return!this._notifying},o.getDerivedStateFromProps=function(e,t){var n=t.values,r=t.prevProps,o={values:Mv(Object.create(null),n),prevProps:{}};return a.forEach(function(t){o.prevProps[t]=e[t],!Uv(e,t)&&Uv(r,t)&&(o.values[t]=e[qv(t)])}),o},i.componentWillUnmount=function(){this.unmounted=!0},i.render=function(){var t=this,n=this.props,r=n.innerRef,o=Lv(n,["innerRef"]);s.forEach(function(e){delete o[e]});var i={};return a.forEach(function(e){var n=t.props[e];i[e]=void 0!==n?n:t.state.values[e]}),Qp.createElement(e,Mv({},o,i,this.handlers,{ref:r||this.attachRef}))},o}(Qp.Component);!function(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,r=null,o=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?r="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?o="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==n||null!==r||null!==o){var i=e.displayName||e.name,a="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=Gv,t.componentWillReceiveProps=Kv),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=Yv;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,r)}}}(u),u.displayName="Uncontrolled("+o+")",u.propTypes=Mv({innerRef:function(){}},function(e,t){var n={};return Object.keys(e).forEach(function(r){if(n[qv(r)]=Bv,"production"!==process.env.NODE_ENV){var o=e[r];("string"!=typeof o||!o.trim().length)&&("production"!==process.env.NODE_ENV?(0,zv.default)(!1,"Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable",t,r):(0,zv.default)(!1)),n[r]=function(e,t){return function(n,r){if(void 0!==n[r]&&!n[e])/* @__PURE__ */return new Error("You have provided a `"+r+"` prop to `"+t+"` without an `"+e+"` handler prop. This will render a read-only field. If the field should be mutable use `"+qv(r)+"`. Otherwise, set `"+e+"`.")}}(o,t)}}),n}(t,o)),n.forEach(function(e){u.prototype[e]=function(){var t;return(t=this.inner)[e].apply(t,arguments)}});var l=u;return Qp.forwardRef&&((l=Qp.forwardRef(function(e,t){return Qp.createElement(u,Mv({},e,{innerRef:t,__source:{fileName:"/Users/jquense/src/uncontrollable/src/uncontrollable.js",lineNumber:128},__self:this}))})).propTypes=u.propTypes),l.ControlledComponent=e,l.deferControlTo=function(e,n,r){return void 0===n&&(n={}),Jv(e,Mv({},t,n),r)},l}Gv.__suppressDeprecationWarning=!0,Kv.__suppressDeprecationWarning=!0,Yv.__suppressDeprecationWarning=!0;var Xv=/* @__PURE__ */n(e=>{var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case l:case c:case o:case a:case i:case p:return e;default:switch(e=e&&e.$$typeof){case u:case d:case v:case h:case s:return e;default:return t}}case r:return t}}}function x(e){return w(e)===c}e.AsyncMode=l,e.ConcurrentMode=c,e.ContextConsumer=u,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=o,e.Lazy=v,e.Memo=h,e.Portal=r,e.Profiler=a,e.StrictMode=i,e.Suspense=p,e.isAsyncMode=function(e){return x(e)||w(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return w(e)===u},e.isContextProvider=function(e){return w(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return w(e)===d},e.isFragment=function(e){return w(e)===o},e.isLazy=function(e){return w(e)===v},e.isMemo=function(e){return w(e)===h},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===a},e.isStrictMode=function(e){return w(e)===i},e.isSuspense=function(e){return w(e)===p},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===c||e===a||e===i||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===h||e.$$typeof===s||e.$$typeof===u||e.$$typeof===d||e.$$typeof===y||e.$$typeof===g||e.$$typeof===b||e.$$typeof===m)},e.typeOf=w}),Zv=/* @__PURE__ */n(e=>{"production"!==process.env.NODE_ENV&&function(){var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var f=e.type;switch(f){case l:case c:case o:case a:case i:case p:return f;default:var m=f&&f.$$typeof;switch(m){case u:case d:case v:case h:case s:return m;default:return t}}case r:return t}}}var x=l,E=c,O=u,S=s,A=n,C=d,_=o,D=v,N=h,k=r,I=a,T=i,P=p,F=!1;function j(e){return w(e)===c}e.AsyncMode=x,e.ConcurrentMode=E,e.ContextConsumer=O,e.ContextProvider=S,e.Element=A,e.ForwardRef=C,e.Fragment=_,e.Lazy=D,e.Memo=N,e.Portal=k,e.Profiler=I,e.StrictMode=T,e.Suspense=P,e.isAsyncMode=function(e){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(e)||w(e)===l},e.isConcurrentMode=j,e.isContextConsumer=function(e){return w(e)===u},e.isContextProvider=function(e){return w(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return w(e)===d},e.isFragment=function(e){return w(e)===o},e.isLazy=function(e){return w(e)===v},e.isMemo=function(e){return w(e)===h},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===a},e.isStrictMode=function(e){return w(e)===i},e.isSuspense=function(e){return w(e)===p},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===c||e===a||e===i||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===h||e.$$typeof===s||e.$$typeof===u||e.$$typeof===d||e.$$typeof===y||e.$$typeof===g||e.$$typeof===b||e.$$typeof===m)},e.typeOf=w}()}),Qv=/* @__PURE__ */n((e,t)=>{"production"===process.env.NODE_ENV?t.exports=Xv():t.exports=Zv()}),em=/* @__PURE__ */n((e,t)=>{var n=Qv(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function s(e){return n.isMemo(e)?i:a[e.$$typeof]||r}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=i;var u=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;t.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var a=l(n);c&&(a=a.concat(c(n)));for(var h=s(t),v=s(n),m=0;m<a.length;++m){var y=a[m];if(!(o[y]||r&&r[y]||v&&v[y]||h&&h[y])){var g=d(n,y);try{u(t,y,g)}catch(tE){}}}}return t}});function tm(e){if(!/^\d{17}(\d|X)$/.test(e))return!1;var t=om(e);if(!t)return!1;var n=t.province,r=t.city,o=t.country,i=t.birthday;return!(!im(n,r,o)||!am(i))&&function(e){for(var t=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],n=0,r=0;r<17;r++)n+=+e.slice(r,r+1)*t[r];return["1","0","X","9","8","7","6","5","4","3","2"][n%11]===e.slice(17,18)}(e)}function nm(e){if(!/^\d{15}$/.test(e))return!1;var t=om(e);if(!t)return!1;var n=t.province,r=t.city,o=t.country,i=t.birthday;return im(n,r,o)&&am(i)}function rm(e){return{11:"北京市",12:"天津市",13:"河北省",14:"山西省",15:"内蒙古自治区",21:"辽宁省",22:"吉林省",23:"黑龙江省",31:"上海省",32:"江苏省",33:"浙江省",34:"安徽省",35:"福建省",36:"江西省",37:"山东省",41:"河南省",42:"湖北省",43:"湖南省",44:"广东省",45:"广西壮族自治区",46:"海南省",50:"重庆市",51:"四川省",52:"贵州省",53:"云南省",54:"西藏自治区",61:"陕西省",62:"甘肃省",63:"青海省",64:"宁夏回族自治区",65:"新疆维吾尔自治区",71:"台湾省",81:"香港",82:"澳门",91:"国外"}[e]}function om(e){var t;if((18!==e.length||/^\d{17}(\d|X)$/.test(e))&&(15!==e.length||/^\d{15}$/.test(e))&&(18==e.length?t=e.match(/^(\d{2})(\d{2})(\d{2})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/):15==e.length&&(t=e.match(/^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{3})$/)),t)){var n=d(t,9);n[0];var r=n[1],o=n[2],i=n[3],a=n[4],s=n[5],u=n[6],l=n[7],c=n[8];return{province:r,provinceName:rm(r),city:o,country:i,year:a,month:s,day:u,birthday:/* @__PURE__ */new Date(a+"/"+s+"/"+u),sequenceCode:l,checkCode:c,isMale:+l%2==1,isFemale:+l%2==0}}}function im(e,t,n){return!!rm(e)&&!!/^(?:[0-6]\d|70|90)$/.test(t)&&!!/^\d\d$/.test(n)}function am(e){var t=b(/* @__PURE__ */new Date("1850-01-01")),n=b().endOf("day");return!isNaN(+e)&&b(e).isBetween(t,n)}S(),S();var sm=function(e){return null!=e},um=function(e){return""===e},lm=(0,nv.default)(function(e){var t=(e=p({schemes:["http","https","ftp","sftp"],allowLocal:!0,allowDataUrl:!1},(0,$u.default)(e)?e:{})).schemes,n=e.allowLocal,r=e.allowDataUrl;Array.isArray(t)||(t=["http","https","ftp","sftp"]);var o="^(?:(?:"+t.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",i="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";return n?i+="?":o+="(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})",o+="(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"+i+")(?::\\d{2,5})?(?:[/?#]\\S*)?$",r&&(o="(?:"+o+")|(?:^data:(?:\\w+\\/[-+.\\w]+(?:;[\\w=]+)*)?(?:;base64)?,[A-Za-z0-9-_.!~\\*'();\\/?:@&=+$,%]*$)"),new RegExp(o,"i")}),cm=function(e){return null==e?"":"string"==typeof e?e:e instanceof Date?e.toISOString():JSON.stringify(e)},dm={isRequired:function(e,t){return!(void 0===t||""===t||null===t||Array.isArray(t)&&!t.length)},isExisty:function(e,t){return sm(t)},matchRegexp:function(e,t,n){return!sm(t)||um(t)||(r=n,r instanceof RegExp?r:/^(?:matchRegexp\:)?\/(.+)\/([gimuy]*)$/.test(r)?new RegExp(RegExp.$1,RegExp.$2||""):"string"==typeof r?new RegExp(r):/^$/).test(t);var r},isUndefined:function(e,t){return void 0===t},isEmptyString:function(e,t){return um(t)},isEmail:function(e,t){return dm.matchRegexp(e,t,/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i)},isUrl:function(e,t,n){return dm.matchRegexp(e,t,lm(n))},isTrue:function(e,t){return!0===t},isFalse:function(e,t){return!1===t},isNumeric:function(e,t){return"number"==typeof t||dm.matchRegexp(e,t,/^[-+]?(?:\d*[.])?\d+$/)},isAlpha:function(e,t){return dm.matchRegexp(e,t,/^[A-Z]+$/i)},isAlphanumeric:function(e,t){return dm.matchRegexp(e,t,/^[0-9A-Z]+$/i)},isInt:function(e,t){return dm.matchRegexp(e,t,/^(?:[-+]?(?:0|[1-9]\d*))$/)},isFloat:function(e,t){return dm.matchRegexp(e,t,/^(?:[-+]?(?:\d+))?(?:\.\d*)?(?:[eE][\+\-]?(?:\d+))?$/)},isWords:function(e,t){return dm.matchRegexp(e,t,/^[A-Z\s]+$/i)},isSpecialWords:function(e,t){return dm.matchRegexp(e,t,/^[A-Z\s\u00C0-\u017F]+$/i)},isLength:function(e,t,n){return t=cm(t),!sm(t)||um(t)||t.length===n},equals:function(e,t,n){return!sm(t)||um(t)||t==n},equalsField:function(e,t,n){return t==e[n]},maxLength:function(e,t,n){return t=cm(t),!sm(t)||t.length<=n},minLength:function(e,t,n){return t=cm(t),!sm(t)||um(t)||t.length>=n},isUrlPath:function(e,t,n){return!sm(t)||um(t)||/^[a-z0-9_\\-]+$/i.test(t)},maximum:function(e,t,n){return!sm(t)||um(t)||(parseFloat(t)||0)<=(parseFloat(n)||0)},lt:function(e,t,n){return!sm(t)||um(t)||(parseFloat(t)||0)<(parseFloat(n)||0)},minimum:function(e,t,n){return!sm(t)||um(t)||(parseFloat(t)||0)>=(parseFloat(n)||0)},gt:function(e,t,n){return!sm(t)||um(t)||(parseFloat(t)||0)>(parseFloat(n)||0)},isJson:function(e,t,n){if(sm(t)&&!um(t)&&"string"==typeof t)try{var r=JSON.parse(t);return!("object"!=typeof r||!r)}catch(tE){return!1}return!0},isPhoneNumber:function(e,t){return!sm(t)||um(t)||/^(\+\d{2}-)?[1]([3-9])[0-9]{9}$/.test(t)},isTelNumber:function(e,t){return!sm(t)||um(t)||/^(\+\d{2}-)?(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/.test(t)},isZipcode:function(e,t){return!sm(t)||um(t)||/^\d{6}$/.test(t)},isId:function(e,t){return!sm(t)||um(t)||tm(n=String(t))||nm(n);var n},isId18:function(e,t){return!sm(t)||um(t)||tm(String(t))},isId15:function(e,t){return!sm(t)||um(t)||nm(String(t))},notEmptyString:function(e,t){return!sm(t)||!(String(t)&&""===String(t).trim())},matchRegexp1:function(e,t,n){return dm.matchRegexp(e,t,n)},matchRegexp2:function(e,t,n){return dm.matchRegexp(e,t,n)},matchRegexp3:function(e,t,n){return dm.matchRegexp(e,t,n)},matchRegexp4:function(e,t,n){return dm.matchRegexp(e,t,n)},matchRegexp5:function(e,t,n){return dm.matchRegexp(e,t,n)},matchRegexp6:function(e,t,n){return dm.matchRegexp(e,t,n)},matchRegexp7:function(e,t,n){return dm.matchRegexp(e,t,n)},matchRegexp8:function(e,t,n){return dm.matchRegexp(e,t,n)},matchRegexp9:function(e,t,n){return dm.matchRegexp(e,t,n)},isDateTimeSame:function(e,t,n,r){return b(t).isSame(b(n),r)},isDateTimeBefore:function(e,t,n,r){return b(t).isBefore(b(n),r)},isDateTimeAfter:function(e,t,n,r){return b(t).isAfter(b(n),r)},isDateTimeSameOrBefore:function(e,t,n,r){return b(t).isSameOrBefore(b(n),r)},isDateTimeSameOrAfter:function(e,t,n,r){return b(t).isSameOrAfter(b(n),r)},isDateTimeBetween:function(e,t,n,r,o,i){return b(t).isBetween(b(n),b(r),o,i)},isTimeSame:function(e,t,n,r,o){return b(t,o=null!=o?o:"hh:mm:ss").isSame(b(n,o),r)},isTimeBefore:function(e,t,n,r,o){return b(t,o=null!=o?o:"hh:mm:ss").isBefore(b(n,o),r)},isTimeAfter:function(e,t,n,r,o){return b(t,o=null!=o?o:"hh:mm:ss").isAfter(b(n,o),r)},isTimeSameOrBefore:function(e,t,n,r,o){return b(t,o=null!=o?o:"hh:mm:ss").isSameOrBefore(b(n,o),r)},isTimeSameOrAfter:function(e,t,n,r,o){return b(t,o=null!=o?o:"hh:mm:ss").isSameOrAfter(b(n,o),r)},isTimeBetween:function(e,t,n,r,o,i,a){return b(t,a=null!=a?a:"hh:mm:ss").isBetween(b(n,a),b(r,a),o,i)},isVariableName:function(e,t,n){return dm.matchRegexp(e,t,n instanceof RegExp?n:/^[a-zA-Z_]+[a-zA-Z0-9_]*$/)}},pm={isEmail:"validate.isEmail",isRequired:"validate.isRequired",isUrl:"validate.isUrl",isInt:"validate.isInt",isAlpha:"validate.isAlpha",isNumeric:"validate.isNumeric",isAlphanumeric:"validate.isAlphanumeric",isFloat:"validate.isFloat",isWords:"validate.isWords",isUrlPath:"validate.isUrlPath",matchRegexp:"validate.matchRegexp",minLength:"validate.minLength",maxLength:"validate.maxLength",minLengthArray:"validate.array.minLength",maxLengthArray:"validate.array.maxLength",maximum:"validate.maximum",lt:"validate.lt",minimum:"validate.minimum",gt:"validate.gt",isJson:"validate.isJson",isLength:"validate.isLength",notEmptyString:"validate.notEmptyString",equalsField:"validate.equalsField",equals:"validate.equals",isPhoneNumber:"validate.isPhoneNumber",isTelNumber:"validate.isTelNumber",isZipcode:"validate.isZipcode",isId:"validate.isId",isId18:"validate.isId",isId15:"validate.isId",isDateTimeSame:"validate.isDateTimeSame",isDateTimeBefore:"validate.isDateTimeBefore",isDateTimeAfter:"validate.isDateTimeAfter",isDateTimeSameOrBefore:"validate.isDateTimeSameOrBefore",isDateTimeSameOrAfter:"validate.isDateTimeSameOrAfter",isDateTimeBetween:"validate.isDateTimeBetween",isTimeSame:"validate.isTimeSame",isTimeBefore:"validate.isTimeBefore",isTimeAfter:"validate.isTimeAfter",isTimeSameOrBefore:"validate.isTimeSameOrBefore",isTimeSameOrAfter:"validate.isTimeSameOrAfter",isTimeBetween:"validate.isTimeBetween",isVariableName:"validate.isVariableName"};function fm(e,t,n,r,o){var i;if(void 0===o&&(o=function(e){return e}),n)for(var a=Object.keys(n),s=a.length,u=0;u<s;u++){var l=a[u];if(n[l]||0===n[l]){if("function"!=typeof dm[l])throw new Error("Validation `"+l+"` not exists!");var c=dm[l],h=(Array.isArray(n[l])?n[l]:[n[l]]).map(function(e){return"string"==typeof e&&Fl(e)?Qs(e,t,"|raw"):e}),v=c.apply(void 0,f([t,e],d(h),!1)),m="";if("object"==typeof v&&!0===v.error&&(m=null!==(i=null==v?void 0:v.msg)&&void 0!==i?i:""),!v||m){var y=l;return Array.isArray(e)&&(y="".concat(l,"Array")),[{rule:l,msg:ic(o(r&&r[l]||m||pm[y]||pm[l]),p({},[""].concat(h)))}]}}}return[]}function hm(e,t,n,r){void 0===r&&(r=function(e){return e});var o={};return Object.keys(t).forEach(function(i){var a=fm(e[i],e,!0===t[i]?{isRequired:!0}:t[i],n,r);a.length&&(o[i]=a)}),o}function vm(e){return"string"==typeof e?e?(t=e,n=0,r={},t.replace(/matchRegexp\d*\s*\:\s*\/.*?\/[igm]*/g,function(e){return r["__".concat(n)]=e,"__".concat(n++)}).split(/,(?![^{\[]*[}\]])/g).map(function(e){return/^__\d+$/.test(e)?r[e]:e.trim()})).reduce(function(e,t){var n=t.indexOf(":"),r=t,o=[];return~n&&(r=t.substring(0,n),o=/^matchRegexp/.test(r)?[t.substring(n+1).trim()]:t.substring(n+1).split(",").map(function(e){try{return JSON.parse(e)}catch(tE){return e}})),e[r]=!o.length||o,e},{}):{}:e||{};var t,n,r}var mm=function(e){if("undefined"!=typeof window&&window.navigator)return!!/* @__PURE__ */navigator.userAgent.match(e)}(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);function ym(e){var t="";if("string"==typeof e)t=e;else{var n=gm(e,"transform");n&&"none"!==n&&(t=n+" "+t)}var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function gm(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function bm(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function wm(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var i,a,s,u,l,c,d;if(e!==window&&e!==(document.scrollingElement||document.documentElement)?(a=(i=e.getBoundingClientRect()).top,s=i.left,u=i.bottom,l=i.right,c=i.height,d=i.width):(a=0,s=0,u=window.innerHeight,l=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!mm))do{if(o&&o.getBoundingClientRect&&("none"!==gm(o,"transform")||n&&"static"!==gm(o,"position"))){var p=o.getBoundingClientRect();a-=p.top+parseInt(gm(o,"border-top-width")),s-=p.left+parseInt(gm(o,"border-left-width")),u=a+i.height,l=s+i.width;break}}while(o=o.parentNode);if(r&&e!==window){var f=ym(o||e),h=f&&f.a,v=f&&f.d;f&&(u=(a/=v)+(c/=v),l=(s/=h)+(d/=h))}return{top:a,left:s,bottom:u,right:l,width:d,height:c}}}var xm=new(function(){function e(){this.animating=!1,this.states=[]}return e.prototype.capture=function(e){var t=this;this.states=[],[].slice.call(e.children).forEach(function(e){if(!e.classList.contains("is-ghost")){var n=wm(e);if(n.width){var r=p({},n),o={target:e,rect:n};if(e.thisAnimationDuration){var i=ym(e);i&&(r.top-=i.f,r.left-=i.e)}e.fromRect=r,t.states.push(o)}}})},e.prototype.animateAll=function(e){var t=this;this.animating=!1;var n=0;this.states.forEach(function(e){var r=0,o=e.target,i=o.fromRect,a=p({},wm(o)),s=o.prevFromRect,u=o.prevToRect,l=e.rect,c=ym(o);c&&(a.top-=c.f,a.left-=c.e),o.toRect=a,o.thisAnimationDuration&&bm(s,a)&&!bm(i,a)&&(l.top-a.top)/(l.left-a.left)===(i.top-a.top)/(i.left-a.left)&&(r=function(e,t,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*150}(l,s,u)),bm(a,i)||(o.prevFromRect=i,o.prevToRect=a,r||(r=150),t.animate(o,l,a,r)),r&&(t.animating=!0,n=Math.max(n,r),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout(function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null},r),o.thisAnimationDuration=r)}),clearTimeout(this.animationCallbackId),this.animating?this.animationCallbackId=setTimeout(function(){t.animating=!1,"function"==typeof e&&e()},n):"function"==typeof e&&e(),this.states=[]},e.prototype.animate=function(e,t,n,r){if(r){var o=!1;gm(e,"transition",""),gm(e,"transform","");var i=t.left-n.left,a=t.top-n.top;e.animatingX=!!i,e.animatingY=!!a,gm(e,"transform","translate3d("+i+"px,"+a+"px,0)"),"inline"===gm(e,"display")&&(o=!0,gm(e,"display","inline-block")),e.offsetWidth,gm(e,"transition","transform "+r+"ms cubic-bezier(1, 0, 0, 1)"),gm(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){gm(e,"transition",""),gm(e,"transform",""),o&&gm(e,"display",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},r)}},e}());S();var Em,Om=qh(),Sm=/* @__PURE__ */t(Jh()),Am=/* @__PURE__ */t(av()),Cm=/* @__PURE__ */t(Av()),_m=/* @__PURE__ */t(Fv()),Dm=/* @__PURE__ */t(Rv()),Nm=/* @__PURE__ */t(Vv()),km=/* @__PURE__ */t(em());!function(e){e[e.NORMAL=0]="NORMAL",e[e.BREAK=1]="BREAK",e[e.CONTINUE=2]="CONTINUE"}(Em||(Em={}));var Im,Tm,Pm={},Fm={},jm={},Rm=function(e,t){Pm[e]=t},Vm=function(e){return Pm[e]},Mm=function(e,t,n,r){var o=t;if(r&&n.context.scoped){var i=e.componentId?"getComponentById":"getComponentByName";"function"==typeof n.context.scoped[i]&&(o=n.context.scoped[i](r))}return o},Lm=function(e,t,n){return u(void 0,void 0,void 0,function(){var r,i,s,u,l,c,d,p,f;return o(this,function(o){switch(o.label){case 0:Array.isArray(e)||(e=[e]),o.label=1;case 1:o.trys.push([1,9,10,11]),r=a(e),i=r.next(),o.label=2;case 2:if(i.done)return[3,8];s=i.value,(u=Vm(s.actionType))||!s.componentId&&!s.componentName?["url","link","jump"].includes(s.actionType)&&(u=Vm("openlink")):u=["static","nonstatic","show","visibility","hidden","enabled","disabled","usability"].includes(s.actionType)?Vm("status"):Vm("component"),u||(u=Vm("component")),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,$m(u,s,t,n)];case 4:return o.sent(),[3,6];case 5:return l=o.sent(),null!==(f=s.ignoreError)&&void 0!==f&&f||(n.stopPropagation(),n.preventDefault(),console.error("".concat(s.actionType," 动作执行失败,原因:").concat(l.message||"未知"))),[3,6];case 6:if(n.stoped)return[3,8];o.label=7;case 7:return i=r.next(),[3,2];case 8:return[3,11];case 9:return c=o.sent(),d={error:c},[3,11];case 10:try{i&&!i.done&&(p=r.return)&&p.call(r)}finally{if(d)throw d.error}return[7];case 11:return[2]}})})},$m=function(e,t,n,r){return u(void 0,void 0,void 0,function(){var i,a,s,u,l,c,h,v,m,y,g,b,w,x,E,O,S,A,C,_,D,N,k,I,T,P,F,j,R,V,M,L,$,z,B,U,q,W,H,G;return o(this,function(o){switch(o.label){case 0:return i={event:r},(a=p({},t)).args=p({},t.args),s=null!==(D=null===(_=(C=n.props).getData)||void 0===_?void 0:_.call(C))&&void 0!==D?D:n.props.data,(null===(N=r.data)||void 0===N?void 0:N.__rendererData)||(i={event:r,__rendererData:s}),u=qu(r.data,i),l=null!==(k=a.expression)&&void 0!==k?k:a.execOn,c=!1,l?[4,cc(l,u,!0)]:[3,2];case 1:c=!o.sent(),o.label=2;case 2:return c?[2]:(h=!1,a.preventDefault?[4,cc(a.preventDefault,u,!1)]:[3,4]);case 3:h=o.sent(),o.label=4;case 4:v={componentId:vp(a.componentId,u),componentName:vp(a.componentName,u)},"dialog"===a.actionType?(a.dialog=p({},null!==(I=a.dialog)&&void 0!==I?I:null===(T=a.args)||void 0===T?void 0:T.dialog),null===(P=a.args)||void 0===P||delete P.dialog):"drawer"===a.actionType?(a.drawer=p({},null!==(F=a.drawer)&&void 0!==F?F:null===(j=a.args)||void 0===j?void 0:j.drawer),null===(R=a.args)||void 0===R||delete R.drawer):["ajax","download"].includes(a.actionType)&&(m=null!==(V=a.api)&&void 0!==V?V:null===(M=a.args)||void 0===M?void 0:M.api,a.api="string"==typeof m?m:p({},m),a.options=p({},null!==(L=a.options)&&void 0!==L?L:null===($=a.args)||void 0===$?void 0:$.options),a.messages=p({},null!==(z=a.messages)&&void 0!==z?z:null===(B=a.args)||void 0===B?void 0:B.messages),null===(U=a.args)||void 0===U||delete U.api,null===(q=a.args)||void 0===q||delete q.options,null===(W=a.args)||void 0===W||delete W.messages),y=v.componentId||v.componentName,g=Mm(a,n,r,y),b=vp(a.args,u,function(e){var t,n=null===(t=null==g?void 0:g.props)||void 0===t?void 0:t.type,r=a.actionType;return f(f([],d(Fm[r]||[]),!1),d(jm[n]||[]),!1).includes(e)}),w=vp(a.data,u),x=b&&Object.keys(b).length?(0,yh.default)(p(p({},b),null!=w?w:{}),function(e){var t=[];switch(e){case"toast":t=["msgType","msg","position","closeButton","showIcon","timeout","title"];break;case"alert":t=["msg"];break;case"confirm":t=["msg","title"];break;case"ajax":case"download":t=["api","messages","options"];break;case"setValue":t=["value","index"];break;case"copy":t=["content","copyFormat"];break;case"email":t=["to","cc","bcc","subject","body"];break;case"link":t=["link","blank","params"];break;case"url":t=["url","blank","params"];break;case"for":t=["loopName"];break;case"goPage":t=["delta"];break;case"custom":t=["script"];break;case"broadcast":t=["eventName"];break;case"dialog":case"confirmDialog":t=["dialog"];break;case"drawer":t=["drawer"];break;case"reload":t=["resetPage"]}return t}(a.actionType)):w,E=void 0===x||["ajax","download","dialog","drawer"].includes(a.actionType)?u:x,null===(H=console.group)||void 0===H||H.call(console,"run action ".concat(a.actionType)),console.debug("[".concat(a.actionType,"] action args, data"),b,E),vh("action","run action ".concat(a.actionType," with args"),b),vh("action","run action ".concat(a.actionType," with data"),E),o.label=5;case 5:return o.trys.push([5,,9,10]),O=!1,[4,e.run(p(p(p({},a),{args:b,rawData:t.data,data:"reload"===a.actionType?x:E}),v),n,r,u)];case 6:return S=o.sent(),"confirmDialog"!==(null==a?void 0:a.actionType)||S||(O=!0,h=!0),A=!1,a.stopPropagation?[4,cc(a.stopPropagation,u,!1)]:[3,8];case 7:A=o.sent(),o.label=8;case 8:return h&&r.preventDefault(),(A||O)&&r.stopPropagation(),[3,10];case 9:return console.debug("[".concat(a.actionType,"] action end event"),r),null===(G=console.groupEnd)||void 0===G||G.call(console),[7];case 10:return[2]}})})};Im={ajax:["adaptor","responseAdaptor","requestAdaptor","responseData"]},void 0===Tm&&(Tm=!0),Object.keys(Im).forEach(function(e){!function(e,t,n){void 0===n&&(n=!0),Fm[e]=n?t:f(f([],d(Fm[e]||[]),!1),d(t),!1)}(e,Im[e],Tm)}),function(e,t){void 0===t&&(t=!0),Object.keys(e).forEach(function(n){!function(e,t,n){void 0===n&&(n=!0),jm[e]=n?t:f(f([],d(jm[e]||[]),!1),d(t),!1)}(n,e[n],t)})}({"input-table":["condition"],table:["condition"],table2:["condition"],crud:["condition"],combo:["condition"],list:["condition"],cards:["condition"]});var zm=/* @__PURE__ */n((e,t)=>{var n=W(),r=I(),o=E(),i=Math.max,a=Math.min;t.exports=function(e,t,s){var u=null==e?0:e.length;if(!u)return-1;var l=u-1;return void 0!==s&&(l=o(s),l=s<0?i(u+l,0):a(l,u-1)),n(e,r(t,3),l,!0)}});S();var Bm,Um,qm=/* @__PURE__ */t(zm()),Wm=_p.named("iRendererStore").props({hasRemoteData:Ta.optional(Ta.boolean,!1),data:Ta.optional(Ta.frozen(),{}),initedAt:0,updatedAt:0,pristine:Ta.optional(Ta.frozen(),{}),pristineRaw:Ta.optional(Ta.frozen(),{}),upStreamData:Ta.optional(Ta.frozen(),{}),action:Ta.optional(Ta.frozen(),void 0),dialogSchema:Ta.frozen(),dialogOpen:!1,dialogData:Ta.optional(Ta.frozen(),void 0),drawerSchema:Ta.frozen(),drawerOpen:!1,drawerData:Ta.optional(Ta.frozen(),void 0)}).views(function(e){return{getValueByName:function(t,n){return void 0===n&&(n=!0),Nu(e.data,t,n)},getPristineValueByName:function(t){return Nu(e.pristine,t,!1)},get pristineDiff(){var t={};return Object.keys(e.pristine).forEach(function(n){e.pristine[n]!==e.pristineRaw[n]&&(t[n]=e.pristine[n])}),t}}}).actions(function(e){var t=new xp,n=null,r=null,o=null;return{setTopStore:function(e){o=e},initData:function(t,n,r){void 0===t&&(t={}),void 0===n&&(n=!1),e.initedAt=Date.now(),e.data.__tag&&(t=qu(t,e.data.__tag)),n||(e.pristine=t,e.pristineRaw=t),r&&Object.isExtensible(t)&&!t.__changeReason&&Object.defineProperty(t,"__changeReason",{value:r,enumerable:!1,configurable:!1,writable:!1}),e.data=t,e.upStreamData=t},temporaryUpdateGlobalVars:function(t){var n=Bu(e.data).filter(function(e){return!e.hasOwnProperty("__isTempGlobalLayer")}),r=(0,qm.default)(n,function(e){return e.hasOwnProperty("global")||e.hasOwnProperty("globalState")});-1!==r&&n.splice(r+1,0,p(p({},t),{__isTempGlobalLayer:!0})),e.data=Uu(n)},unDoTemporaryUpdateGlobalVars:function(){e.data=Uu(Bu(e.data).filter(function(e){return!e.hasOwnProperty("__isTempGlobalLayer")}))},reset:function(){e.data=e.pristine},updateData:function(t,n,r,o,i){void 0===t&&(t={}),o&&(t=Xh(t,e.data,o));var a,s=e.data;a=n?zu(zu(e.data.__super||null,p(p({},n),{__tag:n})),p(p({},r?{}:e.data),t)):Hu(e.data,t,!r),Object.defineProperty(a,"__prev",{value:p({},s),enumerable:!1,configurable:!1,writable:!1}),i&&Object.isExtensible(a)&&!a.__changeReason&&Object.defineProperty(a,"__changeReason",{value:i,enumerable:!1,configurable:!1,writable:!1}),e.data=a},changeValue:function(t,n,r,o,i,a){if(t){var s=Nu(e.data,t,!1);if(n!==s||o){var u=e.data,l=Wu(e.data);if(u.hasOwnProperty("__prev")){var c=Wu(u.__prev);Ku(c,t,s),Object.defineProperty(l,"__prev",{value:c,enumerable:!1,configurable:!1,writable:!1})}else Object.defineProperty(l,"__prev",{value:p({},u),enumerable:!1,configurable:!1,writable:!1});if(void 0===n?Yu(l,t):Ku(l,t,n),null==i||i(l),r){var d=Wu(e.pristine);Ku(d,t,n),null==i||i(d),e.pristine=d}l.__pristine||Object.defineProperty(l,"__pristine",{value:e.pristine,enumerable:!1,configurable:!1,writable:!1}),a&&Object.isExtensible(l)&&!l.__changeReason&&Object.defineProperty(l,"__changeReason",{value:a,enumerable:!1,configurable:!1,writable:!1}),e.data=l}}},setCurrentAction:function(t,n){n&&["dialog","drawer"].forEach(function(e){var r,o;(null===(o=t[e])||void 0===o?void 0:o.$ref)&&(t=p(p({},t),((r={})[e]=p(p({},n(t[e].$ref)),t[e]),r)))}),e.action=t},openDialog:function(r,i,a,s){var u,l,c=Bu(r);1===c.length&&c.unshift(e.data),i&&c.splice(c.length-1,0,i);var d=Uu(c),f=null!==(u=e.action.data)&&void 0!==u?u:null===(l=e.action.dialog)||void 0===l?void 0:l.data;if(f){e.dialogData=Uu([null==o?void 0:o.context,vp(f,d)]);var h=p(p({},e.action),{dialog:p({},e.action.dialog)});delete h.dialog.data,e.action=h}else e.dialogData=d;e.dialogSchema=e.action.dialog,e.dialogOpen=!0,a&&t.set(e.dialogData,a),n=s||null},closeDialog:function(r,o){var i=t.get(e.dialogData);e.dialogOpen=!1,n=null,i&&(t.delete(e.dialogData),setTimeout(function(){return i(r,o)},200))},openDrawer:function(n,i,a,s){var u,l=Bu(n);1===l.length&&l.unshift(e.data),i&&l.splice(l.length-1,0,i);var c=Uu(l),d=null!==(u=e.action.data)&&void 0!==u?u:e.action.drawer.data;if(d){e.drawerData=Uu([null==o?void 0:o.context,vp(d,c)]);var f=p(p({},e.action),{drawer:p({},e.action.drawer)});delete f.drawer.data,e.action=f}else e.drawerData=c;e.drawerSchema=e.action.drawer,e.drawerOpen=!0,a&&t.set(e.drawerData,a),r=s||null},closeDrawer:function(n,o){var i=t.get(e.drawerData);e.drawerOpen=!1,r=null,i&&(t.delete(e.drawerData),setTimeout(function(){return i(n,o)},200))},getDialogScoped:function(){return n},getDrawerScoped:function(){return r}}});function Hm(e,t,n){if(t&&Gu(t)){var r=Object.keys(t);if(!r.length)return e;r.sort(function(e,t){return t.length-e.length});var o=new Set(Array.isArray(n)?n:[]),i="function"==typeof n?n:function(e){return o.has(e)};return Zd(e,function(e,n,o){var s,u;if("string"==typeof e&&!i(n,e,o))try{for(var l=a(r),c=l.next();!c.done;c=l.next()){var d=c.value;if(~e.indexOf(d))return e.replaceAll(d,t[d])}}catch(p){s={error:p}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(s)throw s.error}}return e})}return e}var Gm=!!(null===(Um=(Bm=window).matchMedia)||void 0===Um?void 0:Um.call(Bm,"(max-width: 768px)").matches),Km=function(e,t,n){var r="mobile"===n||Gm;return Zd(e,function(e){return(0,$u.default)(e)?t&&e[t]?(delete(n=Object.assign({},e,e[t]))[t],n):r&&e.mobile?(delete(n=Object.assign({},e,e.mobile)).mobile,n):void 0:e;var n},!0)};S();var Ym=Wm.named("ServiceStore").props({msg:"",error:!1,fetching:!1,saving:!1,busying:!1,checking:!1,initializing:!1,schema:Ta.optional(Ta.frozen(),null),schemaKey:""}).views(function(e){return{get loading(){return e.fetching||e.saving||e.busying||e.initializing}}}).actions(function(e){var t,n;function r(t){void 0===t&&(t=!0),e.fetching=t}function i(t){void 0===t&&(t=!0),e.saving=t}function a(t,n,r){void 0===n&&(n=!1),r&&(t=Xh(t,e.data,r)),e.data=e.pristine=Hu(e.data,t,!n)}function s(t,n){void 0===n&&(n=!1),e.msg=t&&ic(t,e.data)||"",e.error=n}var u=_i(function(n,i,u){var l,c,d,f,h,v,m,y,g,b,w,x,E,O;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,6,,7]),t&&(t(),t=null,e.fetching=!1),e.fetching?[2]:(u&&u.silent||r(!0),[4,ho(e).fetcher(n,i,p(p({},u),{cancelExecutor:function(e){return t=e}}))]);case 1:return l=o.sent(),t=null,l.ok?[3,2]:(s(null!==(b=null!==(g=null===(y=null==n?void 0:n.messages)||void 0===y?void 0:y.failed)&&void 0!==g?g:l.msg)&&void 0!==b?b:u&&u.errorMessage,!0),!n.silent&&ho(e).notify("error",e.msg,void 0!==l.msgTimeout?{closeButton:!0,timeout:l.msgTimeout}:void 0),[3,5]);case 2:return e.updatedAt=Date.now(),c=!!n.replaceData,a(d=p(p({},c?{}:e.data),Bh(l.data)),c,n.concatDataFields),e.hasRemoteData=!0,u&&u.onSuccess&&(f=u.onSuccess(l,d))&&f.then?[4,f]:[3,4];case 3:o.sent(),o.label=4;case 4:s(null!==(O=null!==(E=null!==(x=null===(w=null==n?void 0:n.messages)||void 0===w?void 0:w.success)&&void 0!==x?x:l.msg)&&void 0!==E?E:u&&u.successMessage)&&void 0!==O?O:l.defaultMsg),u&&u.successMessage&&ho(e).notify("success",e.msg),o.label=5;case 5:return r(!1),[2,l];case 6:return h=o.sent(),v=ho(e),!fo(e)||e.disposed||v.isCancel(h)||(r(!1),console.error(h),m=h.message||h,h&&"Network Error"===h.message&&(m=e.__("networkError")),!n.silent&&v.notify("error",m)),[2];case 7:return[2]}})});return{markFetching:r,markSaving:i,markBusying:function(t){void 0===t&&(t=!0),e.busying=t},fetchInitData:u,fetchData:_i(function(n,i,a){var u,l,c,d,f,h,v,m,y,g,b;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,6,,7]),t&&(t(),t=null,e.fetching=!1),e.fetching?[2]:(a&&a.silent||r(!0),[4,ho(e).fetcher(n,i,p(p({},a),{cancelExecutor:function(e){return t=e}}))]);case 1:return u=o.sent(),t=null,id(u.data)&&!u.ok||(e.updatedAt=Date.now(),u.data&&e.updateData(Bh(u.data),void 0,!!n.replaceData,n.concatDataFields,{type:"api"}),e.hasRemoteData=!0),u.ok?[3,2]:(s(null!==(m=null!==(v=null===(h=null==n?void 0:n.messages)||void 0===h?void 0:h.failed)&&void 0!==v?v:u.msg)&&void 0!==m?m:a&&a.errorMessage,!0),!n.silent&&ho(e).notify("error",e.msg,void 0!==u.msgTimeout?{closeButton:!0,timeout:u.msgTimeout}:void 0),[3,5]);case 2:return a&&a.onSuccess&&(l=a.onSuccess(u,u.data))&&l.then?[4,l]:[3,4];case 3:o.sent(),o.label=4;case 4:s(null!==(b=null!==(g=null===(y=null==n?void 0:n.messages)||void 0===y?void 0:y.success)&&void 0!==g?g:u.msg)&&void 0!==b?b:a&&a.successMessage),a&&a.successMessage&&ho(e).notify("success",e.msg),o.label=5;case 5:return r(!1),[2,u];case 6:return c=o.sent(),d=ho(e),!fo(e)||e.disposed||d.isCancel(c)||(r(!1),console.error(c),f=c.message||c,c&&"Network Error"===c.message&&(f=e.__("networkError")),!n.silent&&d.notify("error",f)),[2];case 7:return[2]}})}),reInitData:a,updateMessage:s,clearMessage:function(){s("")},setHasRemoteData:function(){e.hasRemoteData=!0},saveRemote:_i(function(t,n,r){var a,u,l,c,d,f,h,v,m,y,g;return void 0===r&&(r={}),o(this,function(o){switch(o.label){case 0:return o.trys.push([0,8,,9]),r=p({method:"post"},r),e.saving?[2]:(i(!0),[4,ho(e).fetcher(t,n,r)]);case 1:return id((a=o.sent()).data)&&!a.ok||(e.updatedAt=Date.now(),a.data&&e.updateData(Bh(a.data),void 0,!!t.replaceData,t.concatDataFields,{type:"api"})),a.ok?[3,4]:r&&r.onFailed&&(u=r.onFailed(a))&&u.then?[4,u]:[3,3];case 2:o.sent(),o.label=3;case 3:throw s(null!==(v=null!==(h=null!==(f=null===(d=null==t?void 0:t.messages)||void 0===d?void 0:d.failed)&&void 0!==f?f:a.msg)&&void 0!==h?h:r&&r.errorMessage)&&void 0!==v?v:e.__("saveFailed"),!0),new tv(e.msg,a);case 4:return r&&r.onSuccess&&(u=r.onSuccess(a,a.data))&&u.then?[4,u]:[3,6];case 5:o.sent(),o.label=6;case 6:s(null!==(g=null!==(y=null===(m=null==t?void 0:t.messages)||void 0===m?void 0:m.success)&&void 0!==y?y:a.msg)&&void 0!==g?g:r&&r.successMessage),e.msg&&ho(e).notify("success",e.msg,void 0!==a.msgTimeout?{closeButton:!0,timeout:a.msgTimeout}:void 0),o.label=7;case 7:return i(!1),[2,a.data];case 8:if(l=o.sent(),e.saving=!1,!fo(e)||e.disposed)return[2];throw console.error(l),t.silent||("ServerError"===l.type?(c=l.response,ho(e).notify("error",l.message,void 0!==c.msgTimeout?{closeButton:!0,timeout:c.msgTimeout}:void 0)):ho(e).notify("error",l.message)),l;case 9:return[2]}})}),fetchSchema:_i(function(t,r,i){var a,u,l,c,d,f,h,v,m,y,g,b;return void 0===i&&(i={}),o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),i=p(p({method:"post"},i),{cancelExecutor:function(e){return n=e}}),n&&(n(),n=null,e.initializing=!1),e.initializing?[2]:(e.initializing=!0,"string"==typeof t?t+=(~t.indexOf("?")?"&":"?")+"_replace=1":t=p(p({},t),{url:t.url+(~t.url.indexOf("?")?"&":"?")+"_replace=1"}),[4,ho(e).fetcher(t,r,i)]);case 1:return a=o.sent(),n=null,a.ok?(a.data&&(l=ho(e),a.data=Km(a.data,l.locale),a.data=Hm(a.data,l.replaceText,l.replaceTextIgnoreKeys),e.schema=Array.isArray(a.data)?a.data:Object.assign((null===(m=a.data)||void 0===m?void 0:m.type)?{}:{type:"wrapper",wrap:!1},Bh(a.data)),e.schemaKey=""+Date.now(),Gu(a.data.data)&&e.updateData(a.data.data,void 0,!!t.replaceData,t.concatDataFields,{type:"api"})),s(null!==(b=null!==(g=null===(y=null==t?void 0:t.messages)||void 0===y?void 0:y.success)&&void 0!==g?g:a.msg)&&void 0!==b?b:i&&i.successMessage),i&&i.successMessage&&ho(e).notify("success",e.msg)):(s(null!==(v=null!==(h=null!==(f=null===(d=null==t?void 0:t.messages)||void 0===d?void 0:d.failed)&&void 0!==f?f:a.msg)&&void 0!==h?h:i&&i.errorMessage)&&void 0!==v?v:e.__("fetchFailed"),!0),!(null==t?void 0:t.silent)&&ho(e).notify("error",e.msg,void 0!==a.msgTimeout?{closeButton:!0,timeout:a.msgTimeout}:void 0)),e.initializing=!1,[2,a.data];case 2:return u=o.sent(),l=ho(e),e.initializing=!1,!fo(e)||e.disposed||l.isCancel(u)?[2]:(console.error(u),c=u.message||u,u&&"Network Error"===u.message&&(c=e.__("networkError")),!(null==t?void 0:t.silent)&&l.notify("error",c),[3,3]);case 3:return[2]}})}),checkRemote:_i(function(t,n,r){var i;return o(this,function(o){switch(o.label){case 0:if(e.checking)return[2];o.label=1;case 1:return o.trys.push([1,,3,4]),e.checking=!0,[4,ho(e).fetcher(t,n,r)];case 2:if((i=o.sent()).ok&&e.updateData(i.data,void 0,!!t.replaceData,t.concatDataFields),!i.ok)throw new Error(i.msg);return[2,i.data];case 3:return e.checking=!1,[7];case 4:return[2]}})})}}),Jm=Ta.model("UniqueGroup",{name:Ta.identifier,itemsRef:Ta.array(Ta.string)}).views(function(e){return{get items(){return e.itemsRef.map(function(e){return Cp(e)})}}}).actions(function(e){return{removeItem:function(t){e.itemsRef.replace(e.itemsRef.filter(function(e){return e!==t.id}))},addItem:function(t){e.itemsRef.push(t.id)}}}),Xm=Wm.named("ComboStore").props({uniques:Ta.map(Jm),multiple:!1,formsRef:Ta.optional(Ta.array(Ta.string),[]),minLength:0,maxLength:0,length:0,activeKey:0,perPage:0,page:1,memberValidMap:Ta.optional(Ta.frozen(),{})}).views(function(e){function t(){return e.formsRef.map(function(e){return Cp(e)})}return{get forms(){return t()},get addable(){if(e.maxLength&&e.length>=e.maxLength)return!1;if(e.uniques.size){var t=!1;if(e.uniques.forEach(function(e){if(!t&&e.items.length){var n,r,o,i=(n=e.items[0].options,r=function(e){return void 0!==e.value},o=0,cd(n,function(e,t,n,i){r&&!r(e)||o++}),o),a=e.items.reduce(function(e,t){return e+t.selectedOptions.length},0);t=!!(i&&a>=i)}}),t)return!1}return!0},get removable(){return!(e.minLength&&e.minLength>=e.length)},getItemsByName:function(n){var r=t();return e.multiple?[r[parseInt(n,10)]]:r[0].getItemsByName(n)},get multiplePage(){return e.multiple&&e.perPage>0},get offset(){return(e.page-1)*e.perPage},getRangeByPage:function(t){if(e.perPage<=0)return t;var n=this.offset,r=n+e.perPage;return t.slice(n,r)}}}).actions(function(e){function t(t){var n=e.uniques.get(t.name);n.removeItem(t),n.items.length||e.uniques.delete(t.name)}return{config:function(t){void 0!==t.multiple&&(e.multiple=t.multiple),void 0!==t.minLength&&(e.minLength=parseInt(t.minLength,10)),void 0!==t.maxLength&&(e.maxLength=parseInt(t.maxLength,10)),void 0!==t.length&&(e.length=t.length)},setActiveKey:function(t){e.activeKey=t},bindUniuqueItem:function(t){e.uniques.has(t.name)||e.uniques.put({name:t.name}),e.uniques.get(t.name).addItem(t)},unBindUniuqueItem:t,addForm:function(t){e.formsRef.push(t.id)},onChildStoreDispose:function(n){if("FormStore"===n.storeType){var r=e.formsRef.indexOf(n.id);~r&&(e.formsRef.splice(r,1),n.items.forEach(function(e){e.unique&&t(e)}),e.forms.forEach(function(e){return e.items.forEach(function(t){t.unique&&(t.syncOptions(void 0,e.data),t.errors.length&&t.validate(t.tmpValue))})}))}e.removeChildId(n.id)},setMemberValid:function(t,n){var r;e.memberValidMap=p(p({},e.memberValidMap),((r={})[n]=t,r))},changePage:function(t,n){e.page=t||1,"number"==typeof n&&(e.perPage=n)}}}),Zm=/* @__PURE__ */n((e,t)=>{var n=av(),r=Z();t.exports=function(e,t,o){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(o)&&(i="leading"in o?!!o.leading:i,a="trailing"in o?!!o.trailing:a),n(e,t,{leading:i,maxWait:t,trailing:a})}}),Qm=/* @__PURE__ */n((e,t)=>{var n=y();t.exports=function(e,t){return n(t,function(t){return[t,e[t]]})}}),ey=/* @__PURE__ */n((e,t)=>{t.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}}),ty=/* @__PURE__ */n((e,t)=>{var n=Qm(),r=be(),o=ae(),i=ey();t.exports=function(e){return function(t){var a=r(t);return"[object Map]"==a?o(t):"[object Set]"==a?i(t):n(t,e(t))}}}),ny=/* @__PURE__ */n((e,t)=>{var n=ty()(ue());t.exports=n}),ry=/* @__PURE__ */n((e,t)=>{var n=Ka(),r=_(),o=ge(),i=Z(),a=P();t.exports=function(e,t,s,u){if(!i(e))return e;for(var l=-1,c=(t=r(t,e)).length,d=c-1,p=e;null!=p&&++l<c;){var f=a(t[l]),h=s;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(l!=d){var v=p[f];void 0===(h=u?u(v,f,p):void 0)&&(h=i(v)?v:o(t[l+1])?[]:{})}n(p,f,h),p=p[f]}return e}}),oy=/* @__PURE__ */n((e,t)=>{var n=F(),r=ry(),o=_();t.exports=function(e,t,i){for(var a=-1,s=t.length,u={};++a<s;){var l=t[a],c=n(e,l);i(c,l)&&r(u,o(l,e),c)}return u}}),iy=/* @__PURE__ */n((e,t)=>{var n=oy(),r=$();t.exports=function(e,t){return n(e,t,function(t,n){return r(e,n)})}}),ay=/* @__PURE__ */n((e,t)=>{var n=iy(),r=Jp()(function(e,t){return null==e?{}:n(e,t)});t.exports=r}),sy=/* @__PURE__ */t(Zm()),uy=/* @__PURE__ */t(ny()),ly=/* @__PURE__ */t(ay()),cy=/* @__PURE__ */t(Yp());S();var dy=Ym.named("FormStore").props({inited:!1,validated:!1,submited:!1,submiting:!1,savedData:Ta.frozen(),canAccessSuperData:!0,persistData:Ta.optional(Ta.union(Ta.string,Ta.boolean),""),restError:Ta.optional(Ta.array(Ta.string),[])}).views(function(e){return{get items(){return function(){for(var t=[],n=e.children.concat();n.length;){var r=n.shift();"FormItemStore"!==r.storeType||r.isControlled?["ComboStore","TableStore","FormStore"].includes(r.storeType)||n.push.apply(n,f([],d(r.children),!1)):t.push(r)}return t}()}}}).views(function(e){return{get loading(){return e.saving||e.fetching},get inputGroupItems(){for(var t,n,r={},o=e.items.concat();o.length;){var i=o.shift();if(i.inputGroupControl&&(null===(t=i.inputGroupControl)||void 0===t?void 0:t.name)){var a=null===(n=i.inputGroupControl)||void 0===n?void 0:n.name;r.hasOwnProperty(a)?r[a].push(i):r[a]=[i]}}return r},get errors(){var t={};return e.items.forEach(function(e){e.valid||(t[e.name]=Array.isArray(t[e.name])?t[e.name].concat(e.errors):e.errors.concat())}),t},getValueByName:function(t,n){return void 0===n&&(n=e.canAccessSuperData),Nu(e.data,t,n)},getPristineValueByName:function(t){return Nu(e.pristine,t)},getItemById:function(t){return e.items.find(function(e){return e.itemId===t})},getItemByName:function(t){return e.items.find(function(e){return e.name===t})},getItemsByName:function(t){return e.items.filter(function(e){return e.name===t})},get valid(){return e.items.every(function(e){return e.valid})&&(!e.restError||!e.restError.length)},get validating(){return e.items.some(function(e){return e.validating})},get isPristine(){return(0,Ml.default)(e.pristine,e.data)},get modified(){return e.savedData?e.savedData!==e.data:!this.isPristine},get persistKey(){return"".concat(location.pathname,"/").concat(e.path,"/").concat("string"==typeof e.persistData?ic(e.persistData,e.data):e.persistData)}}}).actions(function(e){function t(t,r,o,i,a){e.updateData(t,r,o,i,a),e.items.forEach(function(n){var r;if(n.extraName){if((r=[Nu(t,n.name,!1),Nu(t,n.extraName,!1)]).some(function(e){return void 0!==e})&&!(0,Ml.default)(r,n.tmpValue)){var o=n.splitExtraValue(n.tmpValue);n.changeTmpValue(r.map(function(e,t){return null!=e?e:o[t]}),"dataChanged"),n.changeEmitedValue(void 0)}}else void 0!==(r=Nu(t,n.name,!1))&&r!==n.tmpValue&&(n.changeTmpValue(r,"dataChanged"),n.changeEmitedValue(void 0));n.reset(),e.inited&&n.validateOnChange&&n.validate(e.data)}),n()}var n=(0,Am.default)(function(){return e.items.forEach(function(t){return t.syncOptions(void 0,e.data)})},250,{trailing:!0,leading:!1});function r(t){e.restError.replace(t)}function i(){r([])}var a=_i(function(n,r,a){var u,l,c,d,f,h,m,y,g,b,w,x,E,O,S,A,C,_,D;return void 0===a&&(a={}),o(this,function(o){switch(o.label){case 0:i(),o.label=1;case 1:return o.trys.push([1,12,,15]),(a=p({method:"post"},a))&&a.beforeSend?(c=a.beforeSend(r))&&c.then?[4,c]:[3,3]:[3,4];case 2:c=o.sent(),o.label=3;case 3:if(!1===c)return[2];o.label=4;case 4:return e.markSaving(!0),[4,ho(e).fetcher(n,r,a)];case 5:if(id((u=o.sent()).data)&&!u.ok||(e.updatedAt=Date.now(),t(Bh(u.data),u.ok?{__saved:Date.now()}:void 0,!!n.replaceData,n.concatDataFields,{type:"api"})),u.ok)return[3,6];throw 422===u.status&&u.errors?(s(u.errors),e.updateMessage(null!==(y=null!==(m=null!==(h=null===(f=null==n?void 0:n.messages)||void 0===f?void 0:f.failed)&&void 0!==h?h:u.msg)&&void 0!==m?m:e.__(a&&a.errorMessage))&&void 0!==y?y:e.__("Form.validateFailed"),!0)):e.updateMessage(null!==(w=null!==(b=null===(g=null==n?void 0:n.messages)||void 0===g?void 0:g.failed)&&void 0!==b?b:u.msg)&&void 0!==w?w:e.__(a&&a.errorMessage),!0),new tv(e.msg,u);case 6:return v(),(null==(c=null===(x=null==a?void 0:a.onSuccess)||void 0===x?void 0:x.call(a,u,u.data))?void 0:c.then)?[4,c]:[3,8];case 7:c=o.sent(),o.label=8;case 8:return(null===(E=null==c?void 0:c.cbResult)||void 0===E?void 0:E.then)?[4,c.cbResult]:[3,10];case 9:o.sent(),o.label=10;case 10:return e.markSaving(!1),e.updateMessage(null!==(C=null!==(A=null!==(S=null===(O=null==n?void 0:n.messages)||void 0===O?void 0:O.success)&&void 0!==S?S:u.msg)&&void 0!==A?A:"saveSuccess"===a.successMessage?u.defaultMsg:e.__(a&&a.successMessage))&&void 0!==C?C:u.defaultMsg),(null===(_=null==c?void 0:c.dispatcher)||void 0===_?void 0:_.prevented)||e.msg&&ho(e).notify("success",e.msg,void 0!==u.msgTimeout?{closeButton:!0,timeout:u.msgTimeout}:void 0),[2,u.data];case 11:return[3,15];case 12:return l=o.sent(),e.markSaving(!1),(null==(c=a&&a.onFailed&&a.onFailed(l.response||{}))?void 0:c.then)?[4,c]:[3,14];case 13:c=o.sent(),o.label=14;case 14:if(!fo(e)||e.disposed)return[2];if(null===(D=null==c?void 0:c.dispatcher)||void 0===D?void 0:D.prevented)return[2];throw(null==n?void 0:n.silent)||("ServerError"===l.type?(d=l.response,ho(e).notify("error",l.message,void 0!==d.msgTimeout?{closeButton:!0,timeout:d.msgTimeout}:void 0)):ho(e).notify("error",l.message)),l;case 15:return[2]}})});function s(t,n){void 0===n&&(n="remote"),Object.keys(t).forEach(function(r){var o=e.getItemById(r),i=e.getItemsByName(r);if(o)o.setError(t[r],n),delete t[r];else if(i.length)i.forEach(function(e){return e.setError(t[r],n)}),delete t[r];else{var a=u(r);Array.isArray(a)&&a.length&&(a.forEach(function(e){return e.setError("".concat(t[r]),n)}),delete t[r])}}),!id(t)&&r(Object.keys(t).map(function(e){return String(t[e])}))}var u=function(t){var n=Du(t),r=n.length;return n.reduce(function(e,t,n){if(Array.isArray(e)&&e.every(function(e){return e.getItemsByName})){var o=(0,cy.default)(e.map(function(e){return e.getItemsByName(t)})).filter(function(e){return e}),i=o.map(function(e){var t;return null===(t=null==e?void 0:e.getSubStore)||void 0===t?void 0:t.call(e)}).filter(function(e){return e});return i.length&&n<r-1?i:o}return null},[e])},l=(0,sy.default)(function(t,n){ho(e).notify("error",t,{validateError:n})},5e3,{trailing:!1,leading:!0}),c=_i(function(t,n,r,i,a){var s,u;return o(this,function(o){switch(o.label){case 0:e.submited=!0,e.submiting=!0,o.label=1;case 1:return o.trys.push([1,,5,6]),[4,f(n,!0,!0,r,i)];case 2:return o.sent(),t?(s=td(e.data,e.pristine),[4,t(zu(zu(e.data.__super,{diff:s,__diff:s,pristine:e.pristine}),e.data))]):[3,4];case 3:return[2,null!=(u=o.sent())?u:e.data];case 4:return[2,e.data];case 5:return e.submiting=!1,[7];case 6:return[2]}})}),f=_i(function(t,n,r,i,a){var s,u,c,p,f,h,v,m;return o(this,function(o){switch(o.label){case 0:e.validated=!0,s=e.items.concat(),c=0,p=s.length,o.label=1;case 1:return c<p?((u=s[c]).clearError("rules"),u.validated&&Gu(u.rules)&&(0,uy.default)(u.rules).filter(function(e){var t=d(e,2),n=t[0];return t[1],/^is(Date)?Time/.test(n)}).some(function(e){var t=d(e,2);t[0];var n=t[1];return Array.isArray(n)?n.some(function(e){return Fl(e)}):Fl(n)})&&u.resetValidationStatus(),!u.validated||u.rules.equals||u.rules.equalsField||u.unique||n||u.validateApi||u.isValueSchemaExp?[4,u.validate(e.data)]:[3,3]):[3,4];case 2:o.sent(),o.label=3;case 3:return c++,[3,1];case 4:if(o.trys.push([4,9,,10]),!t||!t.length)return[3,8];c=0,p=t.length,o.label=5;case 5:return c<p?[4,t[c](e.data)]:[3,8];case 6:if("string"==typeof(h=o.sent())&&h)throw new Error(h);if(!1===h)throw new $d(i||e.__("Form.validateFailed"),e.errors);o.label=7;case 7:return c++,[3,5];case 8:return[3,10];case 9:if(f=o.sent(),r)throw f;return l(f.message),[2,!1];case 10:return e.valid?[3,14]:e.items.some(function(e){return e.errorData.some(function(e){return"remote"!==e.tag})})||e.restError.length?(h=null!=i?i:e.__("Form.validateFailed"),(null==(v=a&&a())?void 0:v.then)?[4,v]:[3,12]):[3,13];case 11:v=o.sent(),o.label=12;case 12:(null==v?void 0:v.prevented)||(m=new $d(i||e.__("Form.validateFailed"),e.errors,{items:e.items,msg:{customMsg:i,defaultMsg:e.__("Form.validateFailed")}}),h&&l(h,m)),o.label=13;case 13:if(r)throw new $d(i||e.__("Form.validateFailed"),e.errors);o.label=14;case 14:return[2,e.valid]}})}),h=_i(function(t){var n,r,i,a,s,u;return o(this,function(l){switch(l.label){case 0:n=e.items.concat(),r=t.map(function(e){return"string"==typeof e?{name:e,rules:{}}:e}),i=[],a=function(t,a){var s,u,l,c;return o(this,function(o){switch(o.label){case 0:return s=n[t],(u=(0,bp.default)(r,function(e){return e.name===s.name}))?(c=(l=i).push,[4,s.validate(e.data,void 0,u.rules)]):[3,2];case 1:c.apply(l,[o.sent()]),o.label=2;case 2:return[2]}})},s=0,u=n.length,l.label=1;case 1:return s<u?[5,a(s,u)]:[3,4];case 2:l.sent(),l.label=3;case 3:return s++,[3,1];case 4:return[2,i.every(function(e){return e})]}})});function v(){e.savedData=e.data}return{setInited:function(t){e.inited=t},setValues:t,setValueByName:function(t,r,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!1);var s=Nu(e.data,t,!1),u=e.data,l=Wu(e.data);if(r!==s)if(u.hasOwnProperty("__prev")){var c=Wu(u.__prev);Ku(c,t,s),Object.defineProperty(l,"__prev",{value:c,enumerable:!1,configurable:!1,writable:!1})}else Object.defineProperty(l,"__prev",{value:p({},u),enumerable:!1,configurable:!1,writable:!1});else if(!i)return;if(Ku(l,t,r),o){var d=Wu(e.pristine);Ku(d,t,r),e.pristine=d}l.__pristine||Object.defineProperty(l,"__pristine",{value:e.pristine,enumerable:!1,configurable:!1,writable:!1}),a&&Object.isExtensible(l)&&!l.__changeReason&&Object.defineProperty(l,"__changeReason",{value:a,enumerable:!1,configurable:!1,writable:!1}),e.data=l,n()},trimValues:function(){var t=jd(e.data,function(e){return"string"==typeof e?e.trim():e});e.updateData(t)},submit:c,validate:f,validateFields:h,clearErrors:function(){e.items.concat().forEach(function(e){return e.reset()})},saveRemote:a,reset:function(t,n){void 0===n&&(n=!0),n&&(e.data=zu(e.data.__super,e.pristine)),e.validated=!1,e.submited=!1,e.items.forEach(function(e){return e.reset()}),t&&t(e.data)},syncOptions:n,setCanAccessSuperData:function(t){void 0===t&&(t=!0),e.canAccessSuperData=t},deleteValueByName:function(t,n){var r=e.data,o=Wu(e.data);if(r.hasOwnProperty("__prev")){var i=Wu(r.__prev);Ku(i,t,Nu(r,t)),Object.defineProperty(o,"__prev",{value:i,enumerable:!1,configurable:!1,writable:!1})}else Object.defineProperty(o,"__prev",{value:p({},r),enumerable:!1,configurable:!1,writable:!1});Yu(o,t),n&&Object.isExtensible(o)&&!o.__changeReason&&Object.defineProperty(o,"__changeReason",{value:n,enumerable:!1,configurable:!1,writable:!1}),e.data=o},getLocalPersistData:function(){var t=localStorage.getItem(e.persistKey);t&&e.updateData(JSON.parse(t))},setLocalPersistData:function(t){var n=e.data;t&&t.length&&(n=(0,ly.default)(n,t)),localStorage.setItem(e.persistKey,JSON.stringify(n))},clearLocalPersistData:function(){localStorage.removeItem(e.persistKey)},setPristine:function(t){e.pristine=t},setPersistData:function(t){void 0===t&&(t=""),e.persistData=t},clear:function(n){var r={};e.items.forEach(function(e){e.name&&"hidden"!==e.type&&Ku(r,e.name,e.resetValue),e.extraName&&"string"==typeof e.extraName&&Ku(r,e.extraName,e.resetValue)}),t(r),e.validated=!1,e.submited=!1,e.items.forEach(function(e){return e.reset()}),n&&n(e.data)},updateSavedData:v,setFormItemErrors:s,getItemsByPath:u,setRestError:r,addRestError:function(t,n){var r=n?Array.isArray(n)?n.concat():[n]:null;if(Array.isArray(r)){var o={};r.forEach(function(e){return o[e]=t}),s(o,"rules")}else e.restError.push(t)},clearRestError:i,beforeDestroy:function(){n.cancel(),l.cancel()}}}),py=/* @__PURE__ */n((e,t)=>{t.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}),fy=/* @__PURE__ */n((e,t)=>{var n=O();t.exports=function(e,t){if(e!==t){var r=void 0!==e,o=null===e,i=e==e,a=n(e),s=void 0!==t,u=null===t,l=t==t,c=n(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||o&&s&&l||!r&&l||!i)return 1;if(!o&&!a&&!c&&e<t||c&&r&&i&&!o&&!a||u&&r&&i||!s&&i||!l)return-1}return 0}}),hy=/* @__PURE__ */n((e,t)=>{var n=fy();t.exports=function(e,t,r){for(var o=-1,i=e.criteria,a=t.criteria,s=i.length,u=r.length;++o<s;){var l=n(i[o],a[o]);if(l)return o>=u?l:l*("desc"==r[o]?-1:1)}return e.index-t.index}}),vy=/* @__PURE__ */n((e,t)=>{var n=y(),r=F(),o=I(),i=jv(),a=py(),s=oe(),u=hy(),l=T(),c=ie();t.exports=function(e,t,d){t=t.length?n(t,function(e){return c(e)?function(t){return r(t,1===e.length?e[0]:e)}:e}):[l];var p=-1;return t=n(t,s(o)),a(i(e,function(e,r,o){return{criteria:n(t,function(t){return t(e)}),index:++p,value:e}}),function(e,t){return u(e,t,d)})}}),my=/* @__PURE__ */n((e,t)=>{var n=Kp(),r=vy(),o=us(),i=ls(),a=o(function(e,t){if(null==e)return[];var o=t.length;return o>1&&i(e,t[0],t[1])?t=[]:o>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])});t.exports=a});function yy(){var e=location.pathname;return location.hash&&location.hash.startsWith("#/")&&(e+=location.hash.slice(1)),e}S();var gy,by=/* @__PURE__ */t(my());function wy(e,t,n,r,o,i){return void 0===o&&(o=""),t+=1,e.map(function(e,a){var s;e=Gu(e)?e:{item:e};var u=String(i?i(e,a):null!==(s=e.__id)&&void 0!==s?s:Mc());return{id:String(u),parentId:String(r),key:String("".concat(n,"-").concat(t,"-").concat(a)),path:"".concat(o).concat(a),depth:t,index:a,newIndex:a,pristine:e,data:e,defer:!!e.defer,loaded:!1,loading:!1,rowSpans:{},children:e&&Array.isArray(e.children)?wy(e.children,t,a,u,"".concat(o).concat(a,"."),i):[]}})}!function(e){e[e.ALL=0]="ALL",e[e.PARTIAL=1]="PARTIAL",e[e.NONE=2]="NONE"}(gy||(gy={}));var xy=Ta.model("Column",{label:Ta.optional(Ta.frozen(),void 0),type:Ta.optional(Ta.string,"plain"),name:Ta.maybe(Ta.string),value:Ta.frozen(),id:"",groupName:"",toggled:!1,toggable:!0,expandable:!1,checkdisable:!1,searchable:Ta.maybe(Ta.frozen()),enableSearch:!0,sortable:!1,filterable:Ta.optional(Ta.frozen(),void 0),fixed:"",index:0,rawIndex:0,width:0,minWidth:0,realWidth:0,breakpoint:Ta.optional(Ta.frozen(),void 0),pristine:Ta.optional(Ta.frozen(),void 0),remark:Ta.optional(Ta.frozen(),void 0),className:Ta.union(Ta.string,Ta.frozen()),appeared:!1}).views(function(e){return{get isPrimary(){var t;return(null===(t=uo(e,2).filteredColumns.find(function(e){return!e.type.startsWith("__")}))||void 0===t?void 0:t.id)===e.id},get columnKey(){return e.pristine.uid||e.name||e.label||e.rawIndex}}}).actions(function(e){return{toggleToggle:function(t){void 0===t&&(t=1),e.toggled=!e.toggled;var n=uo(e,2);n.activeToggaleColumns.length<t&&(e.toggled=!0),n.persistSaveToggledColumns()},setToggled:function(t){e.toggled=t},setEnableSearch:function(t,n){void 0===n&&(n=!1),e.enableSearch=t,n||uo(e,2).persistSaveToggledColumns()},setMinWidth:function(t){e.minWidth=t},setWidth:function(t){e.width=t},setRealWidth:function(t){e.realWidth=t},markAppeared:function(t){e.appeared=e.appeared||t}}}),Ey=Ta.model("Row",{storeType:"Row",id:Ta.identifier,parentId:"",key:Ta.string,pristine:Ta.frozen({}),data:Ta.frozen({}),rowSpans:Ta.frozen({}),index:Ta.number,newIndex:Ta.number,path:"",checkdisable:!1,isHover:!1,children:Ta.optional(Ta.array(Ta.late(function(){return Ey})),[]),defer:!1,loaded:!1,loading:!1,error:"",depth:Ta.number}).views(function(e){return{get parent(){return uo(e,2)},get table(){return uo(e,2*e.depth)},get expandable(){var t;return!!(e&&e.children.length||e&&e.defer&&!e.loaded||(t=uo(e,2*e.depth))&&t.footable&&t.footableColumns.length)},childrenSelected:function(){var t=e,n=t.children,r=t.table,o=n.filter(function(e){return r.isSelected(e)}).length;return o?o===n.length?gy.ALL:gy.PARTIAL:gy.NONE},get partial(){var t=this.childrenSelected()===gy.PARTIAL,n=e.children.some(function(e){return e.partial});return t||n},get checked(){return uo(e,2*e.depth).isSelected(e)},get modified(){return!!e.data&&Object.keys(e.data).some(function(t){return!(0,Ml.default)(e.data[t],e.pristine[t])})},getDataWithModifiedChilden:function(){var t=e.data;return t.children&&e.children&&(t=p(p({},t),{children:e.children.map(function(e){return e.getDataWithModifiedChilden()})})),t},get collapsed(){var t=uo(e,2*e.depth);if(t.dragging)return!0;for(var n=e;n&&n!==t;){if(!t.isExpanded(n))return!0;n=uo(n,2)}return!1},get expanded(){return!this.collapsed},get moved(){return e.index!==e.newIndex},get locals(){var t=null;e.children.length&&(t=e.children.map(function(e){return e.locals}));var n=uo(e,2*e.depth),r=uo(e,2);return zu(Hu(uo(e,2*e.depth).data,p({index:e.index,path:e.path,parent:r.storeType===Ey.name?r.data:void 0},n.eventContext)),t?p(p({},e.data),{children:t}):e.data)},get checkable(){var t=uo(e,2*e.depth);return!t||!t.itemCheckableOn||lc(t.itemCheckableOn,e.locals)},get draggable(){var t=uo(e,2*e.depth);return!t||!t.itemDraggableOn||lc(t.itemDraggableOn,e.locals)},get isCheckAvaiableOnClick(){var t,n=uo(e,2*e.depth),r=n.getSelectionUpperLimit();if(!Number.isInteger(r)||r===1/0)return!0;var o=(null!==(t=null==n?void 0:n.selectedRows)&&void 0!==t?t:[]).map(function(e){return e.id});return!((o.includes(e.id)?o.length-1:o.length+1)>r)},get indentStyle(){return{paddingLeft:"calc(".concat(e.depth-1," * var(--Table-tree-indent))")}}}}).actions(function(e){return{toggle:function(t){var n=e.table,r=e;n.toggle(r,t),n.multiple&&(n.toggleAncestors(r),n.toggleDescendants(r,t))},toggleExpanded:function(){uo(e,2*e.depth).toggleExpanded(e)},setExpanded:function(t){uo(e,2*e.depth).setExpanded(e,t)},change:function(t,n){var r=Wc(e.data,t);Object.isExtensible(r)&&!r.__pristine&&Object.defineProperty(r,"__pristine",{value:n?r:e.pristine,enumerable:!1,configurable:!1,writable:!1}),e.data=r,n&&(e.pristine=r)},reset:function(){e.newIndex=e.index,e.data=e.pristine},setCheckdisable:function(t){e.checkdisable=t},setIsHover:function(t){e.isHover=t},replaceWith:function(t){Object.keys(t).forEach(function(n){"id"!==n&&(e[n]=t[n])}),Array.isArray(t.children)&&this.replaceChildren(t.children)},replaceChildren:function(t){var n=t,r=n.concat();e.children.length>n.length&&e.children.splice(n.length,e.children.length-n.length);for(var o=0,i=e.children.length;r.length;){var a=p(p({},r.shift()),{parentId:e.id});if(o<i)e.children[o].replaceWith(a);else{var s=Ey.create(a);e.children.push(s)}o++}},markLoading:function(t){e.loading=!!t},markLoaded:function(t){e.loaded=!!t},setError:function(t){e.error=String(t)},resetDefered:function(){e.error="",e.loaded=!1},updateData:function(t){var n=t.children,r=i(t,["children"]),o=p(p({},e.data),r);Object.isExtensible(o)&&!o.__pristine&&Object.defineProperty(o,"__pristine",{value:e.data.__pristine||e.pristine,enumerable:!1,configurable:!1,writable:!1}),e.data=o,Array.isArray(n)&&this.replaceChildren(wy(n,e.depth,e.index,e.id,"".concat(e.path,".")))}}}),Oy=Wm.named("TableStore").props({columns:Ta.array(xy),rows:Ta.array(Ey),fullItems:Ta.optional(Ta.array(Ta.frozen()),[]),fullSelectedItems:Ta.optional(Ta.array(Ta.frozen()),[]),selectedRows:Ta.array(Ta.reference(Ey)),expandedRows:Ta.array(Ta.string),primaryField:"id",orderBy:"",orderDir:Ta.optional(Ta.union(Ta.literal("asc"),Ta.literal("desc"),Ta.literal("")),"asc"),loading:!1,canAccessSuperData:!1,draggable:!1,dragging:!1,selectable:!1,showIndex:!1,multiple:!0,footable:Ta.frozen(),expandConfig:Ta.frozen(),isNested:!1,columnsTogglable:Ta.optional(Ta.union(Ta.boolean,Ta.literal("auto")),"auto"),itemCheckableOn:"",itemDraggableOn:"",hideCheckToggler:!1,combineNum:0,combineFromIndex:0,formsRef:Ta.optional(Ta.array(Ta.frozen()),[]),maxKeepItemSelectionLength:1/0,keepItemSelectionOnPageChange:!1,maxItemSelectionLength:1/0,exportExcelLoading:!1,searchFormExpanded:!1,lazyRenderAfter:100,tableLayout:"auto",theadHeight:0,persistKey:""}).views(function(e){function t(){return e.columns.filter(function(t){return t&&Gc(t.pristine,Hc(t.pristine)?e.data:{})&&("__checkme"===t.type?e.selectable&&!e.dragging&&!e.hideCheckToggler&&e.rows.length:"__dragme"===t.type?e.dragging:"__expandme"===t.type?n().length&&!e.dragging:(t.toggled||!t.toggable)&&(!e.footable||!t.breakpoint||!rd(t.breakpoint)))})}function n(){return e.columns.filter(function(t){return"__checkme"!==t.type&&"__dragme"!==t.type&&"__expandme"!==t.type&&(t.toggled||!t.toggable)&&e.footable&&t.breakpoint&&rd(t.breakpoint)})}function r(){return e.columns.filter(function(t){return Gc(t.pristine,e.data)&&!1!==t.toggable})}function o(t,n){return void 0===t&&(t=[]),void 0===n&&(n=[]),(t=t&&t.length?t:e.rows).forEach(function(e){e.children&&e.children.length&&o(e.children,n);var t=td(e.data,e.pristine);Object.keys(t).length&&n.push(e)}),n}function i(){return gd(e.rows).filter(function(e){return e.moved})}function a(){return e.columns.filter(function(e){return e.searchable})}function s(){return e.keepItemSelectionOnPageChange&&e.maxKeepItemSelectionLength!==1/0?e.maxKeepItemSelectionLength:e.maxItemSelectionLength}return{get __(){return ho(e).translate},getSelectionUpperLimit:s,get columnsKey(){return e.persistKey?ic(e.persistKey,e.data):(ho(e).getPageId||yy)()+e.path},get columnsData(){return e.columns.filter(function(t){return!/^__/.test(t.type)&&Gc(t.pristine,Hc(t.pristine)?e.data:{})})},get forms(){return e.formsRef.map(function(e){return{store:Cp(e.id),rowIndex:e.rowIndex}})},get searchableColumns(){return a()},get activedSearchableColumns(){return a().filter(function(e){return e.enableSearch})},get exportColumns(){return e.columns.filter(function(t){return t&&Gc(t.pristine,Hc(t.pristine)?e.data:{})&&(t.toggled||!t.toggable)&&!/^__/.test(t.type)})},get filteredColumns(){return t()},get footableColumns(){return n()},get toggableColumns(){return r()},get activeToggaleColumns(){return r().filter(function(e){return e.toggled})},get someChecked(){return!!e.selectedRows.length},get allChecked(){return s()!==1/0?e.isSelectionThresholdReached:e.checkableRows.every(function(t){return e.selectedRows.includes(t)})},isSelected:function(t){return!!~e.selectedRows.indexOf(t)},get allExpanded(){return!(e.expandedRows.length!==this.expandableRows.length||!this.expandableRows.length)},isExpanded:function(t){return e.expandedRows.includes(t.id)},get toggable(){return"auto"===e.columnsTogglable?e.columns.filter(function(e){return!/^__/.test(e.type)}).length>5:e.columnsTogglable},get modified(){return o().length},get modifiedRows(){return o()},get unSelectedRows(){return gd(e.rows).filter(function(e){return!e.checked})},get falttenedRows(){return gd(e.rows)},get checkableRows(){return this.falttenedRows.filter(function(e){return e.checkable})},get expandableRows(){return e.rows.filter(function(e){return e.expandable})},get moved(){return i().length},get movedRows(){return i()},get hoverRow(){return gd(e.rows).find(function(e){return e.isHover})},get isSelectionThresholdReached(){var t,n,r=null===(n=null===(t=e.data)||void 0===t?void 0:t.selectedItems)||void 0===n?void 0:n.length,o=s();return!(!e.data||o===1/0)&&o<=r},get firstToggledColumnIndex(){return null==(t=e.columns.find(function(e){return!/^__/.test(e.type)&&e.toggled}))?null:t.index;var t},getData:function(e){return zu(e,this.eventContext)},get columnGroup(){return function(){var n=t(),r=n.length;if(!r)return[];for(var o=[{label:n[0].groupName,colSpan:1,rowSpan:1,index:n[0].index,has:[n[0]]}],i=n.some(function(e){return e.groupName}),a=1;a<r;a++){var s=o[o.length-1],u=n[a];u.groupName!==s.label&&Qs(u.groupName,e.data)!==Qs(s.label,e.data)||!(i&&u.groupName||!i)?o.push({label:~["__checkme","__expandme"].indexOf(u.type)?void 0:u.groupName||u.label||" ",colSpan:1,rowSpan:1,index:u.index,has:[u]}):(s.colSpan++,s.has.push(u))}return 1!==o.length||o[0].label||o.pop(),o.map(function(e){var t=!e.label||1===e.has.length&&e.label===e.has[0].label?2:1;return p(p({},e),{rowSpan:t,label:2===t?e.label||e.has[0].label:e.label,fixed:e.has.every(function(e){return e.fixed})?e.has[0].fixed:void 0,get width(){return e.has.reduce(function(e,t){return e+t.width},0)}})})}()},getRowById:function(t){return pd(e.rows,function(e){return e.id===t})},getItemsByName:function(e){return this.forms.filter(function(t){return t.rowIndex===parseInt(e,10)}).map(function(e){return e.store})},hasColumnHidden:function(){return-1!==e.columns.findIndex(function(e){return!e.toggled})},getExpandedRows:function(){var t=[];return cd(e.rows,function(n){e.expandedRows.includes(n.id)&&t.push(n)}),t},get columnWidthReady(){return t().every(function(e){return e.realWidth})},getStickyStyles:function(e,t,n){void 0===n&&(n=1);var r="",o={},i=["__checkme","__dragme","__expandme"];if("left"===e.fixed||i.includes(e.type)){r="is-sticky is-sticky-left";var a=t.indexOf(e)-1;t.slice(a+(n-1)+2).every(function(e){return!(e&&"left"===e.fixed||i.includes(e.type))})&&(r+=" is-sticky-last-left");for(var s=[];a>=0;)((c=t[a])&&"left"===c.fixed||i.includes(c.type))&&s.push("var(--Table-column-".concat(c.index,"-width)")),a--;o.left=s.length?1===s.length?s[0]:"calc(".concat(s.join(" + "),")"):0}else if("right"===e.fixed){r="is-sticky is-sticky-right";var u=[];a=t.indexOf(e)+1,t.slice(0,a-1).every(function(e){return"right"!==e.fixed})&&(r+=" is-sticky-first-right");for(var l=t.length;a<l;){var c;(c=t[a])&&"right"===c.fixed&&u.push("var(--Table-column-".concat(c.index,"-width)")),a++}o.right=u.length?1===u.length?u[0]:"calc(".concat(u.join(" + "),")"):0}return[o,r]},get items(){return e.rows.concat()},buildStyles:function(n){return n=p(p({},n),{"--Table-thead-height":e.theadHeight+"px"}),t().forEach(function(e){n["--Table-column-".concat(e.index,"-width")]=e.realWidth+"px"}),n},get eventContext(){var t={selectedItems:e.selectedRows.map(function(e){return e.data}),selectedIndexes:e.selectedRows.map(function(e){return e.path}),items:e.rows.map(function(e){return e.data}),unSelectedItems:this.unSelectedRows.map(function(e){return e.data})};if(e.fullItems.length>e.rows.length){var n=e.fullSelectedItems.filter(function(t){return!e.rows.find(function(e){return e.pristine===(t.__pristine||t)})}).concat(t.selectedItems);t.selectedItems=n,t.items=e.fullItems.concat(),t.unSelectedItems=e.fullItems.filter(function(e){return!n.includes(e)}),t.selectedIndexes=n.map(function(t){var n;return(null===(n=fd(e.fullItems,function(e){return(t.__pristine||t)===(e.__pristine||e)}))||void 0===n?void 0:n.join("."))||"-1"})}return t}}}).actions(function(e){var t=null;function n(t){if(t&&Array.isArray(t)){(t=t.filter(function(e){return e}).concat()).length||t.push({type:"text",label:"空"}),e.showIndex&&!t.some(function(e){return"__index"===e.type})&&t.unshift({type:"__index",label:e.__("Table.index"),width:50}),t.some(function(e){return"__expandme"===e.type})||t.unshift({type:"__expandme",toggable:!1,className:"Table-expandCell"}),t.some(function(e){return"__checkme"===e.type})||t.unshift({type:"__checkme",fixed:"left",toggable:!1,className:"Table-checkCell"}),t.some(function(e){return"__dragme"===e.type})||t.unshift({type:"__dragme",toggable:!1,className:"Table-dragCell"});var n=e.columns.concat(),r=[];t=t.map(function(e,t){var o=e.id?n.find(function(t){return t.pristine.id===e.id}):n[t],i=(null==o?void 0:o.id)||Mc();return r.includes(i)&&(i=Mc()),r.push(i),p(p({},e),{id:i,index:t,width:(null==o?void 0:o.width)||0,minWidth:(null==o?void 0:o.minWidth)||0,realWidth:(null==o?void 0:o.realWidth)||0,rawIndex:t-3,type:e.type||"plain",pristine:e.pristine||e,toggled:!1!==e.toggled,breakpoint:e.breakpoint,isPrimary:3===t})}),e.columns.replace(t)}}function r(e,t){if(!t.length||!e.length)return e;var n=t.shift(),o=0,i=e[o];i.rowSpans[n]=1;for(var a=ku(n,i.data),s=1,u=e.length;s<u;s++){var l=e[s];(0,Ml.default)(ku(n,l.data),a)?(i.rowSpans[n]+=1,l.rowSpans[n]=0):(i.rowSpans[n]>1&&r(e.slice(o,s),t.concat()),o=s,(i=l).rowSpans[n]=1,a=ku(n,i.data))}return i.rowSpans[n]>1&&t.length&&r(e.slice(o,e.length),t.concat()),e}function o(e,t,n,o){if(void 0===o&&(o=0),!t.length||!n||!e.length)return e;o=o||(e.some(function(e){return Array.isArray(e.children)&&e.children.length})?1:0);for(var i=[],a=0;a<t.length&&i.length!==n;a++){var s=t[a];if("__"!==s.type.substring(0,2)){var u=s.name;if(!u)break;o>0?o--:i.push(u)}}return r(e,i)}function i(e){return e.reduce(function(e,t){return e.push(t.id),t.children&&t.children.length&&(e=e.concat(i(t.children))),e},[])}function s(){var t,n=e.getSelectionUpperLimit(),r=null===(t=e.data)||void 0===t?void 0:t.selectedItems;if(n!==1/0&&r&&n>=r.length){var o=e.checkableRows.filter(function(e){return!e.checked}).filter(function(e,t){return t<n-r.length});return f(f([],d(e.selectedRows),!1),d(o),!1)}return f(f([],d(e.selectedRows.filter(function(e){return!e.checkable})),!1),d(e.checkableRows),!1)}var u=null;function l(t,n){if(t.checkable){u=t;var r=e.selectedRows.indexOf(t);e.multiple?~r?!n&&e.selectedRows.splice(r,1):n&&e.selectedRows.push(t):~r?!n&&e.selectedRows.splice(r,1):n&&e.selectedRows.replace([t])}}function c(t){var n,r;if(!u||t===u||!e.multiple)return[t];var o=[],i=e.maxKeepItemSelectionLength,s=e.checkableRows,l=s.findIndex(function(e){return e===u}),c=s.findIndex(function(e){return t===e}),d=l>c?c:l+1,p=l>c?l:c+1,f=s.slice(d,p);try{for(var h=a(f),v=h.next();!v.done;v=h.next()){var m=v.value;u.checked&&i&&e.selectedRows.length+o.length>=i||o.push(m)}}catch(y){n={error:y}}finally{try{v&&!v.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}return o}function h(t,n){e.orderBy=t,e.orderDir=t?n:""}function v(){var t=e.columnsKey,n=e.activeToggaleColumns,r=e.activedSearchableColumns;localStorage.setItem(t,JSON.stringify({unToggledColumns:e.columnsData.filter(function(e){return!n.includes(e)}).map(function(e){return e.columnKey}),columnOrder:e.columnsData.map(function(e){return e.columnKey}),disabledSearchableColumn:e.columnsData.filter(function(e){return e.searchable&&!r.includes(e)}).map(function(e){return e.columnKey})}))}function m(t){var n;if(void 0===t&&(t=1),e.activeToggaleColumns.length<t)for(var r=0;r<t;r++)null===(n=e.toggableColumns[r])||void 0===n||n.setToggled(!0)}return{setTable:function(e){t=e},getTable:function(){return t},update:function(t,r){var o;if(void 0!==t.primaryField&&(e.primaryField=t.primaryField),void 0!==t.selectable&&(e.selectable=t.selectable),void 0!==t.columnsTogglable&&(e.columnsTogglable=t.columnsTogglable),void 0!==t.draggable&&(e.draggable=t.draggable),"string"!=typeof t.orderBy&&"string"!=typeof t.orderDir||h(null!==(o=t.orderBy)&&void 0!==o?o:e.orderBy,void 0!==t.orderDir?"desc"===t.orderDir?"desc":"asc":e.orderDir),void 0!==t.multiple&&(e.multiple=t.multiple),void 0!==t.footable&&(e.footable=t.footable),void 0!==t.expandConfig&&(e.expandConfig=t.expandConfig),void 0!==t.itemCheckableOn&&(e.itemCheckableOn=t.itemCheckableOn),void 0!==t.itemDraggableOn&&(e.itemDraggableOn=t.itemDraggableOn),void 0!==t.hideCheckToggler&&(e.hideCheckToggler=!!t.hideCheckToggler),void 0!==t.combineNum&&(e.combineNum=parseInt(t.combineNum,10)||0),void 0!==t.combineFromIndex&&(e.combineFromIndex=parseInt(t.combineFromIndex,10)||0),void 0!==t.maxKeepItemSelectionLength&&(e.maxKeepItemSelectionLength=t.maxKeepItemSelectionLength),void 0!==t.keepItemSelectionOnPageChange&&(e.keepItemSelectionOnPageChange=t.keepItemSelectionOnPageChange),void 0!==t.maxItemSelectionLength&&(e.maxItemSelectionLength=t.maxItemSelectionLength),void 0!==t.exportExcelLoading&&(e.exportExcelLoading=t.exportExcelLoading),void 0!==t.loading&&(e.loading=t.loading),void 0!==t.canAccessSuperData&&(e.canAccessSuperData=!!t.canAccessSuperData),"number"==typeof t.lazyRenderAfter&&(e.lazyRenderAfter=t.lazyRenderAfter),"string"==typeof t.tableLayout&&(e.tableLayout=t.tableLayout),void 0!==t.showIndex&&(e.showIndex=t.showIndex),void 0!==t.persistKey&&(e.persistKey=t.persistKey),t.columns&&Array.isArray(t.columns)){var i=t.columns.map(function(e){return(null==r?void 0:r.resolveDefinitions)&&"string"==typeof(null==e?void 0:e.$ref)&&e.$ref?p(p({},r.resolveDefinitions(e.$ref)),e):e}).filter(function(e){return e}),a=e.columnsKey,s=localStorage.getItem(a),u=null;if(s){try{u=JSON.parse(s)}catch(c){}var l=null==u?void 0:u.columnOrder;Array.isArray(l)&&0!=l.length&&(i=(0,by.default)(i,function(e,t){var n=e.uid||e.name||e.label||t,r=l.indexOf(n);return-1===r?Number.MAX_SAFE_INTEGER:r}))}n(i)}},updateColumns:n,initTableWidth:function(){var n=t;if(n){var r=n.parentElement.offsetWidth,o=n.querySelector(":scope>thead"),i=null,a=[],s="fixed"===e.tableLayout,u=e.columns.some(function(e){return e.pristine.width}),l={};if(s&&(i=n.querySelector(":scope>tbody"),a.push('<table style="table-layout:auto!important;width:0!important;min-width:0!important;" class="'.concat(n.className,'">').concat(o.outerHTML,"</table>"))),(u||s)&&a.push('<table style="table-layout:auto!important;min-width:'.concat(r,"px!important;width:").concat(r,'px!important;" class="').concat(n.className.replace("is-layout-fixed",""),'">').concat(o.outerHTML).concat(i?"<tbody>".concat(i.innerHTML,"</tbody>"):"","</table>")),a.length){var c=document.createElement("div");c.className="amis-scope",c.style.cssText+="visibility: hidden!important;",c.innerHTML=a.join("");var d=[],p=[];s&&(d=[].slice.call(c.querySelectorAll(":scope>table:first-child>thead>tr>th[data-index]"))),(u||s)&&(p=[].slice.call(c.querySelectorAll(":scope>table:last-child>thead>tr>th[data-index]"))),d.forEach(function(e){e.style.cssText+="width: 0"}),p.forEach(function(t){var n=parseInt(t.getAttribute("data-index"),10),r=e.columns[n];t.style.cssText+="".concat("number"==typeof r.pristine.width?"width: ".concat(r.pristine.width,"px;"):r.pristine.width?"width: ".concat(r.pristine.width,";min-width: ").concat(r.pristine.width,";"):"")}),document.body.appendChild(c),d.forEach(function(t){var n=parseInt(t.getAttribute("data-index"),10);l[n]=t.clientWidth,e.columns[n].setMinWidth(l[n])}),p.forEach(function(t){var n=parseInt(t.getAttribute("data-index"),10),r=e.columns[n];(r.pristine.width||s)&&r.setWidth(Math.max("number"==typeof r.pristine.width?r.pristine.width:t.clientWidth,l[n]||0))}),document.body.removeChild(c)}}},syncTableWidth:function(n){if(void 0===n&&(n=!1),t){var r=t.querySelector(":scope>thead"),o=[].slice.call(r.querySelectorAll("tr>th[data-index]"));e.theadHeight=r.offsetHeight,o.forEach(function(t){var r=parseInt(t.getAttribute("data-index"),10),o=e.columns[r],i=t.getBoundingClientRect().width;o.setRealWidth(i),n&&o.setWidth(i)})}},initRows:function(t,n,r,a,s){e.selectedRows.clear();var u=(t=Array.isArray(t)?t:[]).map(function(e,t){var r;Gu(e)||(e={item:e});var o=String(n?n(e,t):null!==(r=e.__id)&&void 0!==r?r:Mc());return{id:o,key:String("".concat(t,"-1-").concat(t)),depth:1,index:t,newIndex:t,pristine:e.__pristine||e,path:"".concat(t),data:e,rowSpans:{},defer:!!e.defer,loaded:!1,loading:!1,children:e&&Array.isArray(e.children)?wy(e.children,1,t,o,"".concat(t,"."),n):[]}});e.combineNum&&(u=o(u,e.columns,e.combineNum,e.combineFromIndex));var l=function(t,n){if(!1===n)return e.rows.replace(t.map(function(e){return Ey.create(e)})),!1;if("match"===n){var r=e.falttenedRows,o=!0;return e.rows.replace(t.map(function(e){var t=r.find(function(t){return t.id===e.id});return t?(t.replaceWith(e),t):(o=!1,Ey.create(e))})),o}var i=t.concat();e.rows.length>t.length&&e.rows.splice(t.length,e.rows.length-t.length);for(var a=0,s=e.rows.length;i.length;){var u=i.shift();if(a<s)e.rows[a].replaceWith(u);else{var l=Ey.create(u);e.rows.push(l)}a++}return!1}(u,r);if(e.isNested=e.rows.some(function(e){return e.children.length||e.defer&&!e.loaded}),!l){var c=e.footable&&e.footable.expand;"first"===c||e.expandConfig&&"first"===e.expandConfig.expand?e.rows.length&&e.expandedRows.push(e.rows[0].id):("all"===c&&!e.footable.accordion||e.expandConfig&&"all"===e.expandConfig.expand&&!e.expandConfig.accordion)&&e.expandedRows.replace(i(e.rows))}e.dragging=!1,Array.isArray(a)&&e.fullItems.replace(a),Array.isArray(s)&&e.fullSelectedItems.replace(s)},updateSelected:function(t,n){e.selectedRows.clear(),t.forEach(function(t){var r=pd(e.rows,function(e){return e.pristine===t||e.data===t});r||(r=pd(e.rows,function(e){return t[n||"value"]===e.pristine[n||"value"]})),r||(r=pd(e.rows,function(e){return t[n||"value"]==e.pristine[n||"value"]})),r&&e.selectedRows.push(r)}),function(){if(e.data){var t=e.getSelectionUpperLimit(),n=e.selectedRows.map(function(e){return e.data});e.selectedRows.map(function(e){return e.setCheckdisable(!1)}),t!==1/0&&t<=n.length?e.unSelectedRows.map(function(e){return!e.checked&&e.setCheckdisable(!0)}):e.unSelectedRows.map(function(e){return e.checkdisable&&e.setCheckdisable(!1)})}}()},toggleAll:function(){e.allChecked?e.selectedRows.replace(e.selectedRows.filter(function(e){return!e.checkable})):e.selectedRows.replace(s())},getSelectedRows:s,toggle:l,toggleAncestors:function e(t){var n=t.parent;n.depth&&(l(n,n.childrenSelected()===gy.ALL),e(n))},toggleDescendants:function e(t,n){var r=t.children;(null==r?void 0:r.length)&&r.forEach(function(t){l(t,n),e(t,n)})},toggleShift:function(t,n){var r=c(t);1!==(null==r?void 0:r.length)?(r.forEach(function(t){var r=e.selectedRows.indexOf(t);-1===r&&n?e.selectedRows.push(t):~r&&!n&&e.selectedRows.splice(r,1)}),u=t):l(t,n)},getToggleShiftRows:c,toggleExpandAll:function(){e.allExpanded?e.expandedRows.clear():e.expandedRows.replace(e.rows.filter(function(e){return e.expandable}).map(function(e){return e.id}))},toggleExpanded:function(t){var n=e.expandedRows.indexOf(t.id);if(~n)e.expandedRows.splice(n,1);else if(e.footable&&e.footable.accordion)e.expandedRows.replace([t.id]);else if(e.expandConfig&&e.expandConfig.accordion){var r=e.getExpandedRows().filter(function(e){return e.depth!==t.depth});r.push(t),e.expandedRows.replace(r.map(function(e){return e.id}))}else e.expandedRows.push(t.id)},setExpanded:function(t,n){var r="string"==typeof t?t:t.id,o=e.expandedRows.indexOf(r);n?~o||e.expandedRows.push(r):~o&&e.expandedRows.splice(o,1)},collapseAllAtDepth:function(t){var n=e.getExpandedRows().filter(function(e){return e.depth!==t});e.expandedRows.replace(n.map(function(e){return e.id}))},clear:function(){e.selectedRows.clear()},setOrderByInfo:h,changeOrder:function(t,n){h(t,n);var r=/desc/i.test(e.orderDir)?-1:1;e.rows.replace(Id(e.rows.concat(),e.orderBy,r,function(e,t){return e.data[t]}))},reset:function(){e.rows.forEach(function(e){return e.reset()});var t=e.rows.concat();cd(t,function(e){if(e.children){var t=e.children.concat().sort(function(e,t){return e.index-t.index});t.forEach(function(e){return e.reset()}),e.children.replace(t)}}),t.forEach(function(e){return e.reset()}),t=t.sort(function(e,t){return e.index-t.index}),e.rows.replace(t),e.dragging=!1},toggleDragging:function(){e.dragging=!e.dragging},startDragging:function(){e.dragging=!0},stopDragging:function(){e.dragging=!1},exchange:function(t,n,r){if((r=r||e.rows[t]).parentId){var o=e.getRowById(r.parentId),i=o.children.indexOf(r)-t;n+=i,t+=i;var a=o.children.concat();return a.splice(t,1),a.splice(n,0,r),a.forEach(function(e,t){return e.newIndex=t}),void o.children.replace(a)}var s=e.rows.concat();s.splice(t,1),s.splice(n,0,r),s.forEach(function(e,t){return e.newIndex=t}),e.rows.replace(s)},addForm:function(t,n){e.formsRef.push({id:t.id,rowIndex:n})},toggleAllColumns:function(t){void 0===t&&(t=1),e.activeToggaleColumns.length&&e.activeToggaleColumns.length===e.toggableColumns.length?(e.toggableColumns.map(function(e){return e.setToggled(!1)}),m(t)):e.toggableColumns.map(function(e){return e.setToggled(!0)}),v()},toggleColumnsAtLeast:m,persistSaveToggledColumns:v,setSearchFormExpanded:function(t){e.searchFormExpanded=!!t},toggleSearchFormExpanded:function(){e.searchFormExpanded=!e.searchFormExpanded},switchToFixedLayout:function(){this.syncTableWidth(!0),e.tableLayout="fixed"},afterCreate:function(){setTimeout(function(){if(fo(e)){var t=e.columnsKey,n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=Array.isArray(r.unToggledColumns)?r.unToggledColumns:[],i=Array.isArray(r.disabledSearchableColumn)?r.disabledSearchableColumn:[];e.toggableColumns.forEach(function(e){return e.setToggled(!o.includes(e.columnKey))}),e.searchableColumns.forEach(function(e){e.setEnableSearch(!i.includes(e.columnKey),!0)})}}},200)}}});S();var Sy=function(e){function t(n,r){var o=e.call(this,n)||this;return o.type="ServerError",Object.setPrototypeOf(o,t.prototype),o.response=r,o}return s(t,e),t}(Error),Ay=Ym.named("CRUDStore").props({pristineQuery:Ta.optional(Ta.frozen(),{}),query:Ta.optional(Ta.frozen(),{}),prevPage:1,page:1,perPage:10,total:0,mode:"normal",hasNext:!1,selectedAction:Ta.frozen(),columns:Ta.frozen(),items:Ta.optional(Ta.array(Ta.frozen()),[]),selectedItems:Ta.optional(Ta.array(Ta.frozen()),[]),unSelectedItems:Ta.optional(Ta.array(Ta.frozen()),[]),filterTogglable:!1,filterVisible:!0,hasInnerModalOpen:!1}).views(function(e){return{get lastPage(){return Math.max(Math.ceil(e.total/(e.perPage<1?10:e.perPage)),1)},get filterData(){return zu(e.data,p({},e.query))},get toolbarData(){return zu(zu(e.data,this.eventContext),p({},e.query))},get mergedData(){return Hu(e.data,p(p(p({},e.query),this.eventContext),e.data))},get hasModalOpened(){return e.dialogOpen||e.drawerOpen||e.hasInnerModalOpen},get selectedItemsAsArray(){return e.selectedItems.concat()},get itemsAsArray(){return e.items.concat()},fetchCtxOf:function(t,n){var r;return zu(t,p(p(p({},e.query),((r={})[n.pageField||"page"]=e.page,r[n.perPageField||"perPage"]=e.perPage,r)),t))},get eventContext(){return{items:e.items.concat(),selectedItems:e.selectedItems.concat(),unSelectedItems:e.unSelectedItems.concat(),selectedIndexes:e.selectedItems.map(function(t){var n;return(null===(n=fd(e.items,function(e){return(t.__pristine||t)===(e.__pristine||e)}))||void 0===n?void 0:n.join("."))||"-1"})}},get offset(){return(e.page-1)*e.perPage}}}).actions(function(e){var n=null;function r(t,n,r,o,i){void 0===r&&(r="page"),void 0===o&&(o="perPage"),void 0===i&&(i=!1);var a=e.query,s=p(i?{}:p({},a),t),u=[[0,""],[!1,""],[!1,"0"],[!1,0],[!0,1],[!0,"1"]];Uc(a,s,function(e,t){return u.some(function(n){return n.includes(e)&&n.includes(t)})?e!==t:e!=t})&&(s[r||"page"]&&(e.page=parseInt(s[r||"page"],10)),s[o||"perPage"]&&(e.perPage=parseInt(s[o||"perPage"],10)),e.query=s,n&&setTimeout(n.bind(null,"?".concat(Pd(s))),4))}var s=_i(function(t,s,u){var l,c,d,f,h,v,m,y,g,b,w,x,E,O,S,A,C,_,D,N,k,I,T,P,F,j,R,V,M,L,$,z,B,U,q,W,H,G,K,Y,J;return void 0===u&&(u={}),o(this,function(o){switch(o.label){case 0:return o.trys.push([0,6,,7]),l=Date.now(),c=u.source?Qs(u.source,zu(e.mergedData,{items:e.data.itemsRaw,rows:e.data.itemsRaw}),"| raw"):e.items.concat(),!u.forceReload&&u.loadDataOnce&&(null==c?void 0:c.length)?(d=u.matchFunc,_=Td(_=c,{query:e.query,columns:u.columns,matchFunc:d,filterOnAllColumns:u.filterOnAllColumns}),e.query.orderBy&&(F=/desc/i.test(e.query.orderDir)?-1:1,_=Id(_,e.query.orderBy,F)),f=p(p({},e.data),((V={count:_.length})[u.totalField||"total"]=_.length,V.items=_.slice((e.page-1)*e.perPage,e.page*e.perPage),V)),e.total=parseInt(null!==(z=f[u.totalField||"total"])&&void 0!==z?z:f.count,10)||0,e.reInitData(f),[2]):(n&&(n(),n=null,e.fetching=!1),u.silent||e.markFetching(!0),h=zu(e.data,p(p(p({},e.query),s),((M={})[u.pageField||"page"]=e.page,M[u.perPageField||"perPage"]=e.perPage,M))),u.loadDataOnce&&delete h[u.perPageField||"perPage"],[4,ho(e).fetcher(t,h,p(p({},u),{cancelExecutor:function(e){return n=e}}))]);case 1:return v=o.sent(),n=null,v.ok?[3,2]:(e.updateMessage(null!==(W=null!==(q=null!==(U=null===(B=null==t?void 0:t.messages)||void 0===B?void 0:B.failed)&&void 0!==U?U:v.msg)&&void 0!==q?q:u.errorMessage)&&void 0!==W?W:e.__("CRUD.fetchFailed"),!0),!(null==t?void 0:t.silent)&&ho(e).notify("error",v.msg,void 0!==v.msgTimeout?{closeButton:!0,timeout:v.msgTimeout}:void 0),[3,5]);case 2:if(!v.data)throw new Error(e.__("CRUD.invalidData"));return u.minLoadingTime?(m=Date.now()-l,(y=u.minLoadingTime-m)>0?[4,new Promise(function(e){return setTimeout(e,y)})]:[3,4]):[3,4];case 3:o.sent(),o.label=4;case 4:if(e.updatedAt=Date.now(),g=Bh(v.data),b=g.total,w=g.count,x=g.page,E=g.hasNext,O=g.items,S=g.rows,A=g.columns,C=i(g,["total","count","page","hasNext","items","rows","columns"]),_=void 0,_=u.source?Qs(u.source,zu(e.filterData,g),"| raw"):g.items||g.rows,Array.isArray(_))null==_&&(_=[]);else try{for(D=a(Object.keys(g)),N=D.next();!N.done;N=D.next())if(k=N.value,g.hasOwnProperty(k)&&Array.isArray(g[k])){_=g[k];break}}catch(X){L={error:X}}finally{try{N&&!N.done&&($=D.return)&&$.call(D)}finally{if(L)throw L.error}}if(!Array.isArray(_))throw new Error(e.__("CRUD.invalidArray"));_.map(function(e){return"string"==typeof e?{text:e}:e}),I=[],I=u.loadDataMode&&Array.isArray(e.data.items)?"top"===u.dataAppendTo?_.concat(e.data.items):e.data.items.concat(_):_,T=p(p(p({},t.replaceData?{}:e.pristine),{items:I,count:w,total:b}),C),u.loadDataOnce&&(T.itemsRaw=O||S||I.concat(),P=Td(I,{query:e.query,columns:u.columns,filterOnAllColumns:!1,matchFunc:u.matchFunc}),e.query.orderBy&&(F=/desc/i.test(e.query.orderDir)?-1:1,P=Id(P,e.query.orderBy,F)),T.items=P.slice((e.page-1)*e.perPage,e.page*e.perPage),T.count=T.total=P.length),Array.isArray(A)?e.columns=A.concat():C.isTable2&&(e.columns=u.columns),e.items.replace(I),e.reInitData(T,!!t.replaceData,t.concatDataFields),!1!==u.syncResponse2Query&&r((0,ly.default)(C,Object.keys(e.query)),void 0,u.pageField||"page",u.perPageField||"perPage"),e.total=parseInt(null!==(H=T[u.totalField||"total"])&&void 0!==H?H:T.count,10)||0,void 0!==x&&(e.page=parseInt(x,10)),void 0!==E&&(e.mode="simple",e.total=0,e.hasNext=!!E),e.updateMessage(null!==(J=null!==(Y=null!==(K=null===(G=t.messages)||void 0===G?void 0:G.success)&&void 0!==K?K:v.msg)&&void 0!==Y?Y:u.successMessage)&&void 0!==J?J:v.defaultMsg),u&&u.successMessage&&ho(e).notify("success",e.msg),o.label=5;case 5:return e.markFetching(!1),[2,v];case 6:return j=o.sent(),R=ho(e),!fo(e)||e.disposed||(e.markFetching(!1),R.isCancel(j)||(console.error(j),!(null==t?void 0:t.silent)&&R.notify("error",j.message))),[2];case 7:return[2]}})});function l(t){var n="number"!=typeof t?parseInt(t,10):t;e.perPage=isNaN(n)?10:n}var c=_i(function(t,n,r){var i,a,s,u,l,c,d,f,h,v;return void 0===r&&(r={}),o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=p({method:"post"},r),e.markSaving(!0),[4,ho(e).fetcher(t,n,r)];case 1:if(i=o.sent(),e.markSaving(!1),id(i.data)&&!i.ok||(e.updateData(Bh(i.data),{__saved:Date.now()},!!t&&t.replaceData,null==t?void 0:t.concatDataFields),e.updatedAt=Date.now()),!i.ok)throw e.updateMessage(null!==(c=null!==(l=null!==(u=null===(s=null==t?void 0:t.messages)||void 0===s?void 0:s.failed)&&void 0!==u?u:i.msg)&&void 0!==l?l:r.errorMessage)&&void 0!==c?c:e.__("saveFailed"),!0),!(null==t?void 0:t.silent)&&ho(e).notify("error",e.msg,void 0!==i.msgTimeout?{closeButton:!0,timeout:i.msgTimeout}:void 0),new Sy(e.msg,i);return e.updateMessage(null!==(v=null!==(h=null!==(f=null===(d=null==t?void 0:t.messages)||void 0===d?void 0:d.success)&&void 0!==f?f:i.msg)&&void 0!==h?h:r.successMessage)&&void 0!==v?v:i.defaultMsg),e.msg&&ho(e).notify("success",e.msg,void 0!==i.msgTimeout?{closeButton:!0,timeout:i.msgTimeout}:void 0),[2,i.data||{}];case 2:if(a=o.sent(),!fo(e)||e.disposed)return[2];if(e.markSaving(!1),ho(e).isCancel(a))return[2];throw!(null==t?void 0:t.silent)&&"ServerError"!==a.type&&ho(e).notify("error",a.message),a;case 3:return[2]}})}),d=function(t){e.selectedItems.replace(t)},f=function(t){e.unSelectedItems.replace(t)};return{getData:function(t){return zu(t,p({total:e.total,page:e.page,perPage:e.perPage},e.eventContext))},updateSelectData:function(t,n){e.selectedItems.replace(t),e.unSelectedItems.replace(n),e.reInitData({selectedItems:t,unSelectedItems:n})},setPristineQuery:function(){e.pristineQuery=e.query},updateQuery:r,fetchInitData:s,changePage:function(t,n){var r="number"!=typeof t?parseInt(t,10):t;e.page=isNaN(r)?1:r,n&&l(n)},changePerPage:l,selectAction:function(t){e.selectedAction=t},saveRemote:c,setFilterTogglable:function(t,n){e.filterTogglable=t,void 0!==n&&(e.filterVisible=n)},setFilterVisible:function(t){e.filterVisible=t},setSelectedItems:d,setUnSelectedItems:f,setInnerModalOpened:function(t){e.hasInnerModalOpen=t},initFromScope:function(t,n,r){var o,i=Qs(n,t,"| raw");if(Array.isArray(i)||e.items.length){if(i=Td(Array.isArray(i)?i:[],{query:e.query,columns:r.columns,matchFunc:r.matchFunc,filterOnAllColumns:!0}),e.query.orderBy){var a=/desc/i.test(e.query.orderDir)?-1:1;i=Id(i.concat(),e.query.orderBy,a)}var s=p(p({},e.pristine),{items:i.length>e.perPage?i.slice((e.page-1)*e.perPage,e.page*e.perPage):i,count:i.length,total:i.length});e.total=parseInt(null!==(o=s[r.totalField||"total"])&&void 0!==o?o:s.count,10)||0,e.items.replace(i),e.reInitData(s)}},exportAsCSV:function(n){return void 0===n&&(n={}),u(void 0,void 0,void 0,function(){var r,i,s,u,l,c,d,f;return o(this,function(o){switch(o.label){case 0:return r=n.loadDataOnce?e.data.itemsRaw:e.data.items,i=n.filename?ic(n.filename,n.data,"| raw"):"data",n.api?(s=n.pageField||"page",u=n.perPageField||"perPage",l=ho(e),c=zu(e.data,p(p(p({},e.query),n.data),((f={})[s]=e.page||1,f[u]=e.perPage||10,f))),[4,l.fetcher(n.api,c,{autoAppend:!0,pageField:s,perPageField:u})]):[3,2];case 1:if(!(d=o.sent()).data)return[2];r=Array.isArray(d.data)?d.data:d.data.rows||d.data.items,o.label=2;case 2:return import("./papaparse.min-CU0u_rom.js").then(e=>/* @__PURE__ */t(e.default)).then(function(e){var t,n,o=[];try{for(var s=a(r),u=s.next();!u.done;u=s.next()){var l=u.value,c={};for(var d in l){var p=l[d];c[d]="object"==typeof p?JSON.stringify(p):p}o.push(c)}}catch(h){t={error:h}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var f=e.unparse(o);f&&(0,Om.saveAs)(new Blob([new Uint8Array([239,187,191]),f],{type:"text/plain;charset=utf-8"}),"".concat(i,".csv"))}),[2]}})})},updateColumns:function(t){e.columns=t},updateTotal:function(t){e.total=t||0},resetSelection:function(){var t,n,r,o;d([]),f([]);var i=null===(n=null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.find)||void 0===n?void 0:n.call(t,function(e){return e.storeType===Oy.name});i&&(null===(o=(r=i).clear)||void 0===o||o.call(r))},replaceItems:function(t){e.items.replace(t)}}}),Cy=function(e){function t(n){var r=e.call(this,n)||this;return r.type="ServerError",Object.setPrototypeOf(r,t.prototype),r}return s(t,e),t}(Error),_y=Ta.model("Column",{title:Ta.optional(Ta.frozen(),void 0),label:Ta.optional(Ta.frozen(),void 0),name:"",toggled:!1,breakpoint:Ta.optional(Ta.frozen(),void 0),pristine:Ta.optional(Ta.frozen(),void 0),toggable:!0,index:0,type:"",children:Ta.optional(Ta.array(Ta.late(function(){return _y})),[])}).actions(function(e){return{toggleToggle:function(){e.toggled=!e.toggled;var t=uo(e,2);t.activeToggaleColumns.length||(e.toggled=!0),t.persistSaveToggledColumns()},setToggled:function(t){e.toggled=t}}}),Dy=Ta.model("Row",{storeType:"Row",id:Ta.identifier,parentId:"",name:Ta.string,pristine:Ta.frozen({}),data:Ta.frozen({}),index:Ta.number,newIndex:Ta.number,depth:Ta.number,children:Ta.optional(Ta.array(Ta.late(function(){return Dy})),[]),path:""}).views(function(e){return{get checked(){return uo(e,2*e.depth).isSelected(e)},get modified(){return!!e.data&&Object.keys(e.data).some(function(t){return!(0,Ml.default)(e.data[t],e.pristine[t])})},get moved(){return e.index!==e.newIndex},get locals(){var t=null;e.children.length&&(t=e.children.map(function(e){return e.locals}));var n=uo(e,2);return zu(Hu(uo(e,2*e.depth).data,{index:e.index,parent:n.storeType===Dy.name?n.data:void 0}),t?p(p({},e.data),{children:t}):e.data)},getDataWithModifiedChilden:function(){var t=p({},e.data);return t.children&&e.children&&(t.children=e.children.map(function(e){return e.getDataWithModifiedChilden()})),t}}}).actions(function(e){return{replaceWith:function(t){if(Object.keys(t).forEach(function(n){"id"!==n&&(e[n]=t[n])}),Array.isArray(t.children)){var n=t.children,r=n.concat();e.children.length>n.length&&e.children.splice(n.length,e.children.length-n.length);for(var o=0,i=e.children.length;r.length;){var a=p(p({},r.shift()),{parentId:e.id});if(o<i)e.children[o].replaceWith(a);else{var s=Dy.create(a);e.children.push(s)}o++}}},change:function(t,n){e.data=Wc(e.data,t),n&&(e.pristine=e.data)},reset:function(){e.newIndex=e.index,e.data=e.pristine}}}),Ny=Ym.named("TableStore2").props({columns:Ta.array(_y),rows:Ta.array(Dy),selectedRowKeys:Ta.array(Ta.frozen()),selectedRows:Ta.array(Ta.reference(Dy)),expandedRowKeys:Ta.array(Ta.frozen()),columnsTogglable:Ta.optional(Ta.union(Ta.boolean,Ta.literal("auto"),Ta.frozen()),"auto"),orderBy:"",order:Ta.optional(Ta.union(Ta.literal("asc"),Ta.literal("desc")),"asc"),query:Ta.optional(Ta.frozen(),{}),pageNo:1,pageSize:10,dragging:!1,rowSelectionKeyField:"id",formsRef:Ta.optional(Ta.array(Ta.frozen()),[]),canAccessSuperData:!1,persistKey:""}).views(function(e){function t(){return e.columns.filter(function(t){return Gc(t.pristine,e.data)&&!1!==t.toggable})}function n(t){return t?t.filter(function(t){return t&&Gc(t.pristine,Hc(t.pristine)?e.data:{})&&(t.toggled||!t.toggable)}).map(function(e){return p(p({},e.pristine),{type:e.type,children:e.children?n(e.children):void 0})}):[]}function r(){return n(e.columns)}function o(){return gd(e.rows).filter(function(e){return!e.checked})}function i(){return gd(e.rows).filter(function(e){return e.moved})}function a(t,n){return void 0===t&&(t=[]),void 0===n&&(n=[]),(t=t&&t.length?t:e.rows).forEach(function(e){e.children&&e.children.length&&a(e.children,n);var t=td(e.data,e.pristine);Object.keys(t).length&&n.push(e)}),n}return{get toggable(){return"auto"===e.columnsTogglable?e.columns.filter(function(e){return!/^__/.test(e.type)}).length>5:!!e.columnsTogglable},get columnsData(){return e.columns},get toggableColumns(){return t()},get filteredColumns(){return r()},get activeToggaleColumns(){return t().filter(function(e){return e.toggled})},get dataSource(){return e.rows.map(function(t){return e.canAccessSuperData?t.locals:t.data})},get currentSelectedRowKeys(){return e.data&&e.data.selectedItems?e.data.selectedItems.map(function(t){return t[e.rowSelectionKeyField]})||[]:e.selectedRowKeys.map(function(e){return e})},get currentExpandedKeys(){return e.expandedRowKeys.map(function(e){return e})},get unSelectedRows(){return o()},hasColumnHidden:function(){return-1!==e.columns.findIndex(function(e){return!e.toggled})},getData:function(t){return zu(t,{items:e.rows.map(function(e){return e.data}),selectedItems:e.selectedRows.map(function(e){return e.data}),unSelectedItems:o().map(function(e){return e.data})})},getRowById:function(t){return pd(e.rows,function(e){return e.id===t})},isSelected:function(t){return!!~e.selectedRows.indexOf(t)},getRowByIndex:function t(n,r,o){if(o=o||e.rows,r&&r.length>0){var i=+(r.shift()||0);return t(n,r,o[i].children)}return o[n]},get moved(){return i().length},get movedRows(){return i()},get keyField(){return e.rowSelectionKeyField},get modified(){return a().length},get modifiedRows(){return a()}}}).actions(function(e){function t(e,n){if(e&&Array.isArray(e))return e.filter(function(e){return e}).concat().map(function(e,r){return(null==n?void 0:n.resolveDefinitions)&&"string"==typeof(null==e?void 0:e.$ref)&&e.$ref&&(e=p(p({},n.resolveDefinitions(e.$ref)),e)),p(p({},e),{index:r,type:e.type||"plain",pristine:e,toggled:!1!==e.toggled,breakpoint:e.breakpoint,children:e.children?t(e.children,n):[]})})}function n(){return e.persistKey?ic(e.persistKey,e.data):(ho(e).getPageId||yy)()+e.path}function r(){var t=n()+e.toggableColumns.map(function(e){return e.name||e.index}).join("-");localStorage.setItem(t,JSON.stringify(e.activeToggaleColumns.map(function(e){return e.index})))}function i(t,n){e.orderBy=t,e.order=n}function a(t,n){var r=e.rowSelectionKeyField;cd(t,function(t){~n.indexOf(t.pristine[r])||(0,bp.default)(n,function(e){return e&&e==t.pristine[r]})?(e.selectedRows.push(t.id),e.selectedRowKeys.push(t.pristine[r])):t.children&&a(t.children,n)})}function s(e,t,n,r,o,i){void 0===o&&(o="");var a=i||"children";return t+=1,e.map(function(e,i){e=Gu(e)?e:{item:e};var u=Mc();return{id:u,parentId:r,name:String("".concat(n,"-").concat(t,"-").concat(i)),path:"".concat(o).concat(i),depth:t,index:i,newIndex:i,pristine:e,data:e,rowSpans:{},children:e&&Array.isArray(e[a])?s(e[a],t,i,u,"".concat(o).concat(i,".")):[]}})}var u=_i(function(t,n,r){var i,a,s,u,l,c,d,f,h,v;return void 0===r&&(r={}),o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=p({method:"post"},r),e.markSaving(!0),[4,ho(e).fetcher(t,n,r)];case 1:if(i=o.sent(),e.markSaving(!1),id(i.data)&&!i.ok||(e.updateData(Bh(i.data),{__saved:Date.now()},!!t&&t.replaceData,null==t?void 0:t.concatDataFields),e.updatedAt=Date.now()),!i.ok)throw e.updateMessage(null!==(c=null!==(l=null!==(u=null===(s=null==t?void 0:t.messages)||void 0===s?void 0:s.failed)&&void 0!==u?u:i.msg)&&void 0!==l?l:r.errorMessage)&&void 0!==c?c:e.__("saveFailed"),!0),!(null==t?void 0:t.silent)&&ho(e).notify("error",e.msg,void 0!==i.msgTimeout?{closeButton:!0,timeout:i.msgTimeout}:void 0),new Cy(e.msg);return e.updateMessage(null!==(v=null!==(h=null!==(f=null===(d=null==t?void 0:t.messages)||void 0===d?void 0:d.success)&&void 0!==f?f:i.msg)&&void 0!==h?h:r.successMessage)&&void 0!==v?v:i.defaultMsg),e.msg&&ho(e).notify("success",e.msg,void 0!==i.msgTimeout?{closeButton:!0,timeout:i.msgTimeout}:void 0),[2,i.data];case 2:if(a=o.sent(),e.markSaving(!1),!fo(e)||e.disposed)return[2];throw!(null==t?void 0:t.silent)&&"ServerError"!==a.type&&ho(e).notify("error",a.message),a;case 3:return[2]}})});return{update:function(n,r){void 0!==n.columnsTogglable&&(e.columnsTogglable=n.columnsTogglable),void 0!==n.canAccessSuperData&&(e.canAccessSuperData=!!n.canAccessSuperData),void 0!==n.persistKey&&(e.persistKey=n.persistKey),"string"==typeof n.orderBy&&i(n.orderBy,"desc"===n.order?"desc":"asc"),n.rowSelectionKeyField&&(e.rowSelectionKeyField=n.rowSelectionKeyField),n.columns&&Array.isArray(n.columns)&&e.columns.replace(t(n.columns,r))},persistSaveToggledColumns:r,setOrderByInfo:i,updateQuery:function(t,n,r,o,i){void 0===r&&(r="pageNo"),void 0===o&&(o="pageSize"),void 0===i&&(i=!1);var a=e.query;e.query=p(i?{}:p({},e.query),t),e.query[r||"pageNo"]&&(e.pageNo=parseInt(e.query[r||"pageNo"],10)),e.query[o||"pageSize"]&&(e.pageSize=parseInt(e.query[o||"pageSize"],10)),n&&Uc(a,e.query,!1)&&setTimeout(n.bind(null,"?".concat(Pd(e.query))),4)},initRows:function(t,n,r,o){e.selectedRows.clear();var i=o||"children";!function(t,n){if(!1!==n){var r=t.concat();e.rows.length>t.length&&e.rows.splice(t.length,e.rows.length-t.length);for(var o=0,i=e.rows.length;r.length;){var a=r.shift();if(o<i)e.rows[o].replaceWith(a);else{var s=Dy.create(a);e.rows.push(s)}o++}}else e.rows.replace(t.map(function(e){return Dy.create(e)}))}(t.map(function(e,t){var r=n?n(e,t):Mc();return{id:r,name:String("".concat(t,"-1-").concat(t)),index:t,newIndex:t,pristine:e,path:"".concat(t),data:e,depth:1,children:e&&Array.isArray(e[i])?s(e[i],1,t,r,"".concat(t,"."),i):[]}}),r)},updateSelected:function(t){e.selectedRows.clear(),e.selectedRowKeys.clear(),a(e.rows,t)},updateSelectedAll:function(){var t=[];cd(e.rows,function(n){return t.push(n.pristine[e.rowSelectionKeyField])}),a(e.rows,t)},updateExpanded:function(t,n){e.expandedRowKeys.clear(),cd(e.rows,function(r){(~t.indexOf(r.pristine[n])||(0,bp.default)(t,function(e){return e&&e==r.pristine[n]}))&&e.expandedRowKeys.push(r.pristine[n])})},exchange:function(t,n,r){if(null==(r=r||e.rows[t])?void 0:r.parentId){var o=e.getRowById(r.parentId),i=o.children.concat();return i.splice(t,1),i.splice(n,0,r),i.forEach(function(e,t){return e.newIndex=t}),void o.children.replace(i)}var a=e.rows.concat();a.splice(t,1),a.splice(n,0,r),a.forEach(function(e,t){return e.newIndex=t}),e.rows.replace(a)},reset:function(){e.rows.forEach(function(e){return e.reset()});var t=e.rows.concat();cd(t,function(e){if(e.children){var t=e.children.concat().sort(function(e,t){return e.index-t.index});t.forEach(function(e){return e.reset()}),e.children.replace(t)}}),t.forEach(function(e){return e.reset()}),t=t.sort(function(e,t){return e.index-t.index}),e.rows.replace(t),e.dragging=!1},toggleAllColumns:function(){e.activeToggaleColumns.length&&e.activeToggaleColumns.length===e.toggableColumns.length?e.toggableColumns.map(function(e){return e.setToggled(!1)}):e.toggableColumns.map(function(e){return e.setToggled(!0)}),r()},afterCreate:function(){setTimeout(function(){if(fo(e)){var t=n()+e.toggableColumns.map(function(e){return e.name||e.index}).join("-"),r=localStorage.getItem(t);if(r){var o=JSON.parse(r);e.toggableColumns.forEach(function(e){return e.setToggled(!!~o.indexOf(e.index))})}}},200)},saveRemote:u,addForm:function(t,n){e.formsRef.push({id:t.id,rowIndex:n})}}}),ky=Ta.model("Item",{storeType:"Item",id:Ta.identifier,pristine:Ta.frozen(),data:Ta.frozen(),index:Ta.number,newIndex:Ta.number}).views(function(e){return{get checked(){return uo(e,2).isSelected(e)},get modified(){return!!e.data&&Object.keys(e.data).some(function(t){return!(0,Ml.default)(e.data[t],e.pristine[t])})},get moved(){return e.index!==e.newIndex},get locals(){var t=uo(e,2);return zu(Hu(t.data,p({index:e.index},t.eventContext)),e.data)},get checkable(){var t=uo(e,2);return!t||!t.itemCheckableOn||lc(t.itemCheckableOn,e.locals)},get draggable(){var t=uo(e,2);return t&&t.itemDraggableOn?lc(t.itemDraggableOn,e.locals):t.draggable}}}).actions(function(e){return{toggle:function(){uo(e,2).toggle(e)},change:function(t,n){e.data=Wc(e.data,t),n&&(e.pristine=e.data)},reset:function(){e.newIndex=e.index,e.data=e.pristine},updateData:function(t){t.children;var n=i(t,["children"]);e.data=p(p({},e.data),n)}}}),Iy=Wm.named("ListStore").props({items:Ta.array(ky),fullItems:Ta.optional(Ta.array(Ta.frozen()),[]),fullSelectedItems:Ta.optional(Ta.array(Ta.frozen()),[]),selectedItems:Ta.array(Ta.reference(ky)),primaryField:"id",orderBy:"",orderDir:Ta.optional(Ta.union(Ta.literal("asc"),Ta.literal("desc")),"asc"),draggable:!1,dragging:!1,multiple:!0,strictMode:!1,selectable:!1,itemCheckableOn:"",itemDraggableOn:"",hideCheckToggler:!1}).views(function(e){function t(){return e.items.filter(function(e){return e.modified})}function n(){return e.items.filter(function(e){return e.moved})}return{get allChecked(){return!(e.selectedItems.length!==e.checkableItems.length||!e.checkableItems.length)},get checkableItems(){return e.items.filter(function(e){return e.checkable})},get unSelectedItems(){return e.items.filter(function(e){return!e.checked})},isSelected:function(t){return!!~e.selectedItems.indexOf(t)},get modified(){return t().length},get modifiedItems(){return t()},get moved(){return n().length},get movedItems(){return n()},get eventContext(){var t={selectedItems:e.selectedItems.map(function(e){return e.data}),selectedIndexes:e.selectedItems.map(function(e){return e.index}),items:e.items.map(function(e){return e.data}),unSelectedItems:this.unSelectedItems.map(function(e){return e.data})};if(e.fullItems.length>e.items.length){var n=e.fullSelectedItems.filter(function(t){return!e.items.find(function(e){return e.pristine===(t.__pristine||t)})}).concat(t.selectedItems);t.selectedItems=n,t.items=e.fullItems.concat(),t.unSelectedItems=e.fullItems.filter(function(e){return!n.includes(e)}),t.selectedIndexes=n.map(function(t){return e.fullItems.indexOf(t.__pristine||t)})}return t}}}).actions(function(e){function t(t,n){e.orderBy=t,e.orderDir=n}return{getData:function(t){return zu(t,p({},e.eventContext))},update:function(n){void 0===n.selectable||(e.selectable=n.selectable),void 0===n.draggable||(e.draggable=n.draggable),void 0===n.multiple||(e.multiple=n.multiple),void 0===n.strictMode||(e.strictMode=n.strictMode),void 0===n.hideCheckToggler||(e.hideCheckToggler=n.hideCheckToggler),void 0!==n.orderBy&&t(n.orderBy,"desc"===n.orderDir?"desc":"asc"),void 0===n.itemCheckableOn||(e.itemCheckableOn=n.itemCheckableOn),void 0===n.itemDraggableOn||(e.itemDraggableOn=n.itemDraggableOn)},initItems:function(t,n,r){var o=t.map(function(e,t){return e=Gu(e)?e:{item:e},{id:Mc(),index:t,newIndex:t,pristine:e.__pristine||e,data:e}});e.selectedItems.clear(),e.items.replace(o),e.dragging=!1,Array.isArray(n)&&e.fullItems.replace(n),Array.isArray(r)&&e.fullSelectedItems.replace(r)},updateSelected:function(t,n){e.selectedItems.clear(),t.forEach(function(t){var r=e.items.find(function(e){return e.pristine===t});r||(r=e.items.find(function(e){return t[n||"value"]===e.pristine[n||"value"]})),r||(r=e.items.find(function(e){return t[n||"value"]==e.pristine[n||"value"]})),r&&e.selectedItems.push(r)})},toggleAll:function(){e.allChecked?e.selectedItems.clear():e.selectedItems.replace(e.checkableItems)},clearAll:function(){e.selectedItems.clear()},selectAll:function(){e.selectedItems.replace(e.checkableItems)},toggle:function(t){if(t.checkable){var n=e.selectedItems.indexOf(t);e.multiple?~n?e.selectedItems.splice(n,1):e.selectedItems.push(t):~n?e.selectedItems.splice(n,1):e.selectedItems.replace([t])}},clear:function(){e.selectedItems.clear()},setOrderByInfo:t,reset:function(){e.items.forEach(function(e){return e.reset()}),e.dragging=!1},toggleDragging:function(){e.dragging=!e.dragging},startDragging:function(){e.dragging=!0},stopDragging:function(){e.dragging=!1},exchange:function(t,n){var r=e.items[t];r.newIndex=n;var o=e.items.slice();o.splice(t,1),o.splice(n,0,r),e.items.replace(o)}}}),Ty=Ym.named("ModalStore").props({form:Ta.frozen(),entered:!1,dragging:!1,resizeCoord:0,schema:Ta.frozen(),isFullscreen:!1}).views(function(e){return{get formData(){return zu(e.data,e.form)},get inDragging(){return e.dragging}}}).actions(function(e){return{setEntered:function(t){e.entered=t},setDragging:function(t){e.dragging=t},setFormData:function(t){e.form=t},reset:function(){e.form={},e.reInitData({},!0)},setResizeCoord:function(t){e.resizeCoord=t},setSchema:function(t){t&&t.then?t.then(function(t){return fo(e)&&e.setSchema(t)}):e.schema=t},setFullScreen:function(t){void 0===t&&(t=!1),e.isFullscreen=t}}}),Py=/* @__PURE__ */n((e,t)=>{var n=me();t.exports=function(e,t,r){var o=(r="function"==typeof r?r:void 0)?r(e,t):void 0;return void 0===o?n(e,t,void 0,r):!!o}});function Fy(e,t,n){return void 0===t&&(t={values:[],options:[]}),void 0===n&&(n="value"),"string"==typeof e?e.split(",").map(function(e){var r,o=t.values.indexOf(e);if(~o)return t.options[o];var i=((r={label:e})[n]=e,r);return t.values.push(i.value),t.options.push(i),i}):!Array.isArray(e)||"string"!=typeof e[0]&&"number"!=typeof e[0]?Array.isArray(e)?e.filter(function(e){return null!=e}).map(function(e){var r,o=e&&e[n],i=void 0===o||e.children?-1:t.values.indexOf(o);if(~i)return t.options[i];var a=p(p({},e),((r={})[n]=o,r));return void 0!==a.children?a.children=Fy(a.children,{values:[],options:[]},n):void 0!==o&&(t.values.push(o),t.options.push(a)),a}):(0,$u.default)(e)?Object.keys(e).map(function(r){var o,i=t.values.indexOf(r);if(~i)return t.options[i];var a=((o={label:e[r]})[n]=r,o);return t.values.push(a.value),t.options.push(a),a}):[]:e.map(function(e){var r,o=t.values.indexOf(e);if(~o)return t.options[o];var i=((r={label:e})[n]=e,r);return t.values.push(i[n]),t.options.push(i),i})}function jy(e,t){return void 0===t&&(t="value"),Gu(e)&&e&&e.hasOwnProperty(t)?e[t]:e}function Ry(e){return void 0===e&&(e="value"),function(t){return jy(t,e)}}function Vy(e,t){return void 0===t&&(t="value"),function(n){return function(e,t,n){void 0===n&&(n="value");var r=jy(e,n),o=t[n||"value"];return Gu(r)?(0,Ml.default)(r,o):void 0!==r&&void 0!==o&&String(o)===String(r)}(e,n,t)}}var My=/* @__PURE__ */t(Py()),Ly=/* @__PURE__ */t(G());S();var $y=Ta.model("ErrorDetail",{msg:"",tag:"",rule:""}),zy={value:null,nodeValueArray:null,res:null},By=_p.named("FormItemStore").props({isFocused:!1,isControlled:!1,type:"",label:"",unique:!1,loading:!1,required:!1,isValueSchemaExp:Ta.optional(Ta.boolean,!1),tmpValue:Ta.frozen(),emitedValue:Ta.frozen(),changeMotivation:"input",rules:Ta.optional(Ta.frozen(),{}),messages:Ta.optional(Ta.frozen(),{}),errorData:Ta.optional(Ta.array($y),[]),name:Ta.string,extraName:"",itemId:"",unsetValueOnInvisible:!1,itemsRef:Ta.optional(Ta.array(Ta.string),[]),inited:!1,validated:!1,validatedAt:0,validating:!1,multiple:!1,delimiter:",",valueField:"value",labelField:"label",joinValues:!0,extractValue:!1,options:Ta.optional(Ta.frozen(),[]),optionsRaw:Ta.optional(Ta.frozen(),[]),expressionsInOptions:!1,selectFirst:!1,autoFill:Ta.frozen(),clearValueOnHidden:!1,validateApi:Ta.optional(Ta.frozen(),""),selectedOptions:Ta.optional(Ta.frozen(),[]),filteredOptions:Ta.optional(Ta.frozen(),[]),dialogSchema:Ta.frozen(),dialogOpen:!1,dialogData:Ta.frozen(),resetValue:Ta.optional(Ta.frozen(),""),validateOnChange:!1,inputGroupControl:Ta.optional(Ta.frozen(),{}),colIndex:Ta.frozen(),rowIndex:Ta.frozen(),pagination:Ta.optional(Ta.frozen(),{enable:!1,page:1,perPage:10,total:0}),accumulatedOptions:Ta.optional(Ta.frozen(),[]),popOverOpen:!1,popOverData:Ta.frozen(),popOverSchema:Ta.frozen()}).views(function(e){function t(){var t=e.parentStore;return(null==t?void 0:t.storeType)===dy.name?t:void 0}function n(){return e.errorData.map(function(e){return e.msg})}return{get subFormItems(){return e.itemsRef.map(function(e){return Cp(e)})},get form(){return t()},get value(){return function(){var n;return null===(n=t())||void 0===n?void 0:n.getValueByName(e.name)}()},get prinstine(){var n;return null===(n=t())||void 0===n?void 0:n.getPristineValueByName(e.name)},get errors(){return n()},get valid(){var e=n();return!(e&&e.length)},get errClassNames(){return e.errorData.map(function(e){return e.rule}).filter(function(e,t,n){return e&&n.indexOf(e)===t}).map(function(e){return"has-error--".concat(e)}).join(" ")},get lastSelectValue(){return e.selectedOptions.length?e.selectedOptions[e.selectedOptions.length-1].value:""},get enableSourcePagination(){return!!e.pagination.enable},get sourcePageNum(){var t;return null!==(t=e.pagination.page)&&void 0!==t?t:1},get sourcePerPageNum(){var t;return null!==(t=e.pagination.perPage)&&void 0!==t?t:10},get sourceTotalNum(){var t;return null!==(t=e.pagination.total)&&void 0!==t?t:0},getSelectedOptions:function(t,n){if(void 0===t&&(t=e.tmpValue),null!=t&&null!=n&&(0,Ml.default)(t,zy.value)&&(0,Ml.default)(n,zy.nodeValueArray)&&zy.res)return zy.res;if(void 0===t)return[];var r=e.filteredOptions,o=e.labelField,i=e.extractValue,a=e.multiple,s=e.delimiter,u=e.valueField||"value",l=n||(Array.isArray(t)?t:"string"==typeof t&&a?t.split(s||",").map(function(e){return e.trim()}):[t]),c=l.map(function(e){return e&&e.hasOwnProperty(u)?e[u]:e}),d=[];return c.forEach(function(t,n){var a,s,c=pd(r,Vy(t,u),{resolve:Ry(u),value:jy(t,u)});if(c)d.push(c);else{var p=l&&l[n]||t,f=p||0===p;if(!f||"string"!=typeof p&&"number"!=typeof p)f&&i&&((s={})[u||"value"]=t,s[o||"label"]="UnKnown",s.__unmatched=!0,p=s);else{(a={})[u||"value"]=t,a[o||"label"]=t,a.__unmatched=!0,p=a;var h=e.selectedOptions?(0,bp.default)(e.selectedOptions,Vy(t,u)):null;h&&(p[o]=h[o])}f&&d.push(p)}}),d.length&&(zy.value=t,zy.nodeValueArray=n,zy.res=d),d},splitExtraValue:function(t){var n=e.delimiter||",";return""===t?["",""]:Array.isArray(t)?t:"string"==typeof t?t.split(n||",").map(function(e){return e.trim()}):[]},getMergedData:function(t){var n=Wu(t);return Ku(n,e.name,e.tmpValue),Ku(n,"__value",e.tmpValue),Ku(n,"__name",e.name),n}}}).actions(function(e){e.form;var t=new xp,n=null,r=[],i=null,s=_i(function(t,n,r){var a,s,u,d,p,f,h,v;return o(this,function(o){switch(o.label){case 0:return e.validating&&!Lh(e.validateApi,t)?[2,e.valid]:(e.validating=!0,c(),n?[4,n()]:[3,2]);case 1:o.sent(),o.label=2;case 2:if(l(fm(e.tmpValue,t,r?vm(r):e.rules,e.messages,e.__)),e.errors.length||!Lh(e.validateApi,t))return[3,6];i&&(i(),i=null),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,ho(e).fetcher(e.validateApi,zu(t,(u={},u[e.name]=e.tmpValue,u)),{cancelExecutor:function(e){return i=e}})];case 4:return a=o.sent(),i=null,!a.ok&&422===a.status&&a.errors&&l(String(null!==(f=null===(p=null===(d=e.validateApi)||void 0===d?void 0:d.messages)||void 0===p?void 0:p.failed)&&void 0!==f?f:a.errors||a.msg||"表单项「".concat(e.name,"」校验失败"))),[3,6];case 5:return s=o.sent(),l(String(s)),[3,6];case 6:return e.validated=!0,e.unique&&"ComboStore"===(null===(v=null===(h=e.form)||void 0===h?void 0:h.parentStore)||void 0===v?void 0:v.storeType)&&e.form.parentStore.uniques.get(e.name).items.some(function(t){return t!==e&&void 0!==e.tmpValue&&""!==e.tmpValue&&t.value===e.tmpValue})&&l(e.__("Form.unique")),e.validating=!1,e.validatedAt=Date.now(),[2,e.valid]}})});function u(e,t){void 0===t&&(t="builtin"),c(),l(e,t)}function l(t,n){void 0===n&&(n="builtin"),(Array.isArray(t)?t:[t]).forEach(function(t){return e.errorData.push({msg:"string"==typeof t?t:t.msg,rule:"string"!=typeof t?t.rule:void 0,tag:n})})}function c(t){if(t){var n=e.errorData.filter(function(e){return e.tag!==t});e.errorData.replace(n)}else e.errorData.clear()}function h(t){var n,r;if(Array.isArray(t))try{for(var o=a(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(Array.isArray(s.children)&&s.children.length){var u=h(s.children);if(void 0!==u)return u}else if(null!=s[e.valueField||"value"]&&!s.disabled)return s}}catch(l){n={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}function v(t,n,r){if(Array.isArray(t)){t=vd(t,function(e){return e});var o,i=e.options.concat();if(e.options=t,e.accumulatedOptions=e.enableSourcePagination?(0,Ly.default)(f(f([],d(i),!1),d(t),!1),function(t,n){var r,o;return t[null!==(r=e.valueField)&&void 0!==r?r:"value"]===n[null!==(o=e.valueField)&&void 0!==o?o:"value"]}):t,A(i,r),n&&e.selectFirst&&e.filteredOptions.length&&(o=e.getSelectedOptions(e.value))&&!o.filter(function(e){return!e.__unmatched}).length){var a=h(e.filteredOptions);if(!a)return;var s=[a].map(function(t){return e.extractValue||e.joinValues?t[e.valueField||"value"]:t});n(e.joinValues&&e.multiple?s.join(e.delimiter):e.multiple?s:s[0])}}}var m,y=null,g=_i(function(t,n,r,i){var a,s,l,c,d,f,h,v,m,g,b;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),y&&(y(),y=null,e.loading=!1),(null==r?void 0:r.silent)||(e.loading=!0),[4,ho(e).fetcher(t,n,p({autoAppend:!1,cancelExecutor:function(e){return y=e}},r))];case 1:return a=o.sent(),y=null,s=null,a.ok?s=a:(l=Ah(t,n),!1!==i&&u(e.__("Form.loadOptionsFailed",{reason:null!==(m=null!==(v=null===(h=l.messages)||void 0===h?void 0:h.failed)&&void 0!==v?v:a.msg)&&void 0!==m?m:r&&r.errorMessage})),(c=a.msg)||(c="status: ".concat(a.status)),!(null==t?void 0:t.silent)&&ho(e).notify("error",null!==(b=null===(g=l.messages)||void 0===g?void 0:g.failed)&&void 0!==b?b:e.errors.join("")||"".concat(l.url,": ").concat(c),void 0!==a.msgTimeout?{closeButton:!0,timeout:a.msgTimeout}:void 0)),e.loading=!1,[2,s];case 2:return d=o.sent(),f=ho(e),!fo(e)||e.disposed||(e.loading=!1,f.isCancel(d)||(console.error(d),!(null==t?void 0:t.silent)&&f.notify("error",d.message))),[2];case 3:return[2]}})}),b=_i(function(t,n,r,i,a,s){var u,l,d,f,h,m,y,b,w;return o(this,function(o){switch(o.label){case 0:return[4,g(t,n,r,s)];case 1:return(u=o.sent())?(c(),e.validated=!1,l=Fy(l=(null===(d=u.data)||void 0===d?void 0:d.options)||(null===(f=u.data)||void 0===f?void 0:f.items)||(null===(h=u.data)||void 0===h?void 0:h.rows)||u.data||[],void 0,e.valueField),e.enableSourcePagination&&(e.pagination=p(p({},e.pagination),{page:parseInt(null===(m=u.data)||void 0===m?void 0:m.page,10)||1,total:parseInt(null!==(b=null===(y=u.data)||void 0===y?void 0:y.total)&&void 0!==b?b:null===(w=u.data)||void 0===w?void 0:w.count,10)||0})),(null==r?void 0:r.extendsOptions)&&e.selectedOptions.length>0&&e.selectedOptions.forEach(function(t){pd(l,Vy(t,e.valueField||"value"),{resolve:Ry(e.valueField),value:jy(t,e.valueField)})||l.push(t)}),v(l,a,n),u.data&&void 0!==u.data.value?a&&a(u.data.value,!1,!0):i&&!e.selectFirst&&e.selectedOptions.some(function(e){return e.__unmatched})&&a&&a(!1===e.joinValues&&e.multiple?[]:"",!1,!0),[2,u]):[2,null]}})}),w=_i(function(t,r,i){var a,s,u,l;return void 0===i&&(i=!0),o(this,function(o){switch(o.label){case 0:return n&&(n(),n=null),[4,ho(e).fetcher(t,r,{cancelExecutor:function(e){return n=e}})];case 1:return a=o.sent(),n=null,a?1===(null==(s=(null===(u=a.data)||void 0===u?void 0:u.items)||(null===(l=a.data)||void 0===l?void 0:l.rows))?void 0:s.length)?[2,s[0]]:(0,$u.default)(a.data)?[2,a.data]:(!i&&!(null==t?void 0:t.silent)&&ho(e).notify("info",e.__("FormItem.autoFillLoadFailed")),[2]):[2]}})}),x=_i(function(t,n,r,i,a){var s,u,l,c,d,f,h,m;return o(this,function(o){switch(o.label){case 0:return Array.isArray(n)?(s=fd(e.options,function(e){return e.leftOptions===n}),u=fd(n,function(e){return e===t}),l=pd(e.options,function(e){return e.leftOptions===n}),s&&u&&l?(v(wd(e.options,s,1,p(p({},l),{loading:!0,leftOptions:wd(l.leftOptions,u,1,p(p({},t),{loading:!0}))})),void 0,i),[4,g(r,i,p(p({},a),{silent:!0}),!1)]):[2]):[2];case 1:return(c=o.sent())?(d=(null===(m=c.data)||void 0===m?void 0:m.options)||c.data.items||c.data.rows||c.data||[],f=wd(l.leftOptions,u,1,p(p({},t),{loading:!1,loaded:!0,children:d})),v(wd(e.options,s,1,p(p({},l),{loading:!1,loaded:!0,children:d,leftOptions:f})),void 0,i),Array.isArray(l.children)&&(h=l.children.concat(),gd(f).forEach(function(e){pd(l.children,function(t){return t.ref===e.value},{resolve:function(e){return e.ref},value:e.value})||h.push({ref:e.value,defer:!0})}),v(wd(e.options,s,1,p(p({},l),{leftOptions:f,children:h})),void 0,i)),[2,c]):(v(wd(e.options,s,1,p(p({},l),{loading:!1,error:!0,leftOptions:wd(l.leftOptions,u,1,p(p({},t),{loading:!1,error:!0}))})),void 0,i),[2])}})}),E=_i(function(e,t,n,r,i){return o(this,function(o){switch(o.label){case 0:return[4,x(e,t,n,r,i)];case 1:return[2,o.sent()]}})}),O=_i(function(t,n,r,i){var a,s,u,l,c,d,f,h;return o(this,function(o){switch(o.label){case 0:return a=e.labelField||"label",s=e.valueField||"value",(u=fd(e.options,function(e){return e===t||(0,My.default)(e,t,function(e,t){return null!=(null==e?void 0:e[s])&&null!=(null==t?void 0:t[s])&&(null==e?void 0:e[a])===(null==t?void 0:t[a])&&(null==e?void 0:e[s])===(null==t?void 0:t[s])})}))?[3,2]:(l=null===(f=e.options[0])||void 0===f?void 0:f.leftOptions,[4,x(t,l,n,r,i)]);case 1:return[2,o.sent()];case 2:return v(wd(e.options,u,1,p(p({},t),{loading:!0})),void 0,r),[4,g(n,r,p(p({},i),{silent:!0}),!1)];case 3:return(c=o.sent())?(d=(null===(h=c.data)||void 0===h?void 0:h.options)||c.data.items||c.data.rows||c.data||[],v(wd(e.options,u,1,p(p({},t),{loading:!1,loaded:!0,children:d})),void 0,r),[2,c]):(v(wd(e.options,u,1,p(p({},t),{loading:!1,error:!0})),void 0,r),[2])}})}),S=_i(function(t,n,r,i){var s,u,l,c,d,f,h,m,y,b;return o(this,function(r){switch(r.label){case 0:s=/* @__PURE__ */new Map,r.label=1;case 1:r.trys.push([1,8,9,10]),u=a(t),l=u.next(),r.label=2;case 2:if(l.done)return[3,7];if((c=l.value).length<=1)return[3,6];d=function(t){var r,a,u,l,d,f;return o(this,function(o){switch(o.label){case 0:return r=e.options.concat(),a=c[t],s.has(a)?[2,"continue"]:(u=pd(r,function(n,r,o){return o===t+1&&Vy(a,e.valueField||"value")(n)}))&&u.defer?(l=fd(r,function(e){return e===u}),v(wd(r,l,1,p(p({},u),{loading:!0})),void 0,u),[4,g(n,u,p(p({},i),{silent:!0}),!1)]):[2,"continue"];case 1:return(d=o.sent())||v(wd(r,l,1,p(p({},u),{loading:!1,error:!0})),void 0,u),s.set(a,!0),f=(null===(b=d.data)||void 0===b?void 0:b.options)||d.data.items||d.data.rows||d.data||[],v(wd(r,l,1,p(p({},u),{loading:!1,loaded:!0,children:f})),void 0,u),[2]}})},f=0,r.label=3;case 3:return f<c.length-1?[5,d(f)]:[3,6];case 4:r.sent(),r.label=5;case 5:return f++,[3,3];case 6:return l=u.next(),[3,2];case 7:return[3,10];case 8:return h=r.sent(),m={error:h},[3,10];case 9:try{l&&!l.done&&(y=u.return)&&y.call(u)}finally{if(m)throw m.error}return[7];case 10:return[2]}})});function A(t,n){var r;if(!e.options.length&&void 0===e.value)return qc(e.filteredOptions,[])&&(e.filteredOptions=[]),void(qc(e.selectedOptions,[])&&(e.selectedOptions=[]));var o=e.tmpValue,i=e.valueField||"value",a=e.labelField||"label",s=Array.isArray(o)?o.map(function(e){return e&&e.hasOwnProperty(i)?e[i]:e}):"string"==typeof o?o.split(e.delimiter||",").map(function(e){return e.trim()}):void 0===o?[]:[o&&o.hasOwnProperty(i)?o[i]:o];o&&o.hasOwnProperty(a)&&(s[0]=((r={})[a]=o[a],r[i]=o[i],r));var u=!1,l=e.filteredOptions,c=e.options.filter(function(e){return!u&&(e.visibleOn||e.hiddenOn||e.disabledOn)&&(u=!0),e.visibleOn?!1!==lc(e.visibleOn,n):e.hiddenOn?!0!==lc(e.hiddenOn,n):!1!==e.visible&&!0!==e.hidden}).map(function(e,t){var r=lc(e.disabledOn,n);return e.disabledOn?l.length>t&&l[t].disabled===r?l[t]:p(p({},e),{disabled:r}):e});e.expressionsInOptions=u;var h=/* @__PURE__ */new Map,v=[];cd(c,function(e){var t=jy(e,i);null!=t&&h.set(t,e),null!=t&&v.push(e)});var m=[];s.forEach(function(n,r){var o,s,u=jy(n,i);if(h.get(u))m.push(h.get(u));else{var l=(0,wp.default)(v,Vy(n,i));if(~l)m.push(v[l]);else{var c=u&&u[r]||n,d=c||0===c;if(!d||"string"!=typeof c&&"number"!=typeof c)d&&e.extractValue&&((s={})[i]=n,s[a]="UnKnown",s.__unmatched=!0,c=s);else{(o={})[i]=n,o[a]=n,o.__unmatched=!0,c=o;var p=t&&(0,bp.default)(t,Vy(n,i));p&&(c[a]=p[a])}d&&m.push(c)}}});var y=e.form,g=null==y?void 0:y.parentStore;if((null==g?void 0:g.storeType)===Xm.name){var b=g.uniques.get(e.name),w=[];b&&b.items.forEach(function(t){e!==t&&w.push.apply(w,f([],d(t.selectedOptions.map(function(e){return e&&e[i]})),!1))}),c.length&&w.length&&(c=ld(c,function(e){return~w.indexOf(e[i])?p(p({},e),{disabled:!0}):e}))}qc(e.selectedOptions,m)&&(e.selectedOptions=m),qc(e.filteredOptions,c)&&(e.filteredOptions=c)}return{focus:function(){e.isFocused=!0},blur:function(){e.isFocused=!1},config:function(t){var n=t.name,r=t.extraName,o=t.required,i=t.unique;t.value;var a=t.isValueSchemaExp,s=t.rules,u=t.messages,l=t.delimiter,d=t.multiple,f=t.valueField,h=t.labelField,v=t.joinValues,m=t.extractValue,y=t.type,g=t.id,b=t.selectFirst,w=t.autoFill,x=t.clearValueOnHidden,E=t.validateApi,O=t.maxLength,S=t.minLength,A=t.validateOnChange,C=t.label,_=t.inputGroupControl,D=t.pagination;"string"==typeof s&&(s=vm(s)),void 0!==n&&(e.name=n),void 0!==r&&(e.extraName=r),void 0!==y&&(e.type=y),void 0!==g&&(e.itemId=g),void 0!==u&&(e.messages=u),void 0!==o&&(e.required=!!o),void 0!==i&&(e.unique=!!i),void 0!==d&&(e.multiple=!!d),void 0!==b&&(e.selectFirst=!!b),void 0!==w&&(e.autoFill=w),void 0!==v&&(e.joinValues=!!v),void 0!==m&&(e.extractValue=!!m),void 0!==l&&(e.delimiter=l||","),void 0!==f&&(e.valueField=f||"value"),void 0!==h&&(e.labelField=h||"label"),void 0!==x&&(e.clearValueOnHidden=!!x),void 0!==E&&(e.validateApi=E),void 0!==A&&(e.validateOnChange=!!A),"string"==typeof C&&(e.label=C),e.isValueSchemaExp=!!a,Gu(_)&&null!=(null==_?void 0:_.name)&&(e.inputGroupControl=_),D&&Gu(D)&&D.enable&&(e.pagination={enable:!0,page:D.page&&D.page||1,perPage:D.perPage&&D.perPage||10,total:0}),void 0===s&&void 0===o&&"number"!=typeof S&&"number"!=typeof O||(s=p(p({},null!=s?s:e.rules),{isRequired:e.required||(null==s?void 0:s.isRequired)}),~["input-text","textarea"].indexOf(e.type)&&("number"==typeof S&&(s.minLength=S),"number"==typeof O&&(s.maxLength=O)),Uc(s,e.rules)&&(e.rules=s,c("builtin"),e.validated=!1))},validate:s,setError:u,addError:l,clearError:c,setPagination:function(t){var n=t||{},r=n.page,o=n.perPage,i=n.total;e.enableSourcePagination&&(e.pagination=p(p(p(p({},e.pagination),null!=r&&"number"==typeof r?{page:r}:{}),null!=o&&"number"==typeof o?{perPage:o}:{}),null!=i&&"number"==typeof i?{total:i}:{}))},setOptions:v,loadOptions:b,loadOptionsFromDataScope:function(t,n,r,o){var i=Qs(t,n,"| raw");return Array.isArray(i)?(i=Fy(i,void 0,e.valueField),e.enableSourcePagination&&(e.pagination=p(p(p(p({},e.pagination),(null==n?void 0:n.page)?{page:null==n?void 0:n.page}:{}),(null==n?void 0:n.perPage)?{perPage:null==n?void 0:n.perPage}:{}),{total:i.length}),i=i.slice((e.pagination.page-1)*e.pagination.perPage,e.pagination.page*e.pagination.perPage)),v(i,r,n),o&&!e.selectFirst&&e.selectedOptions.some(function(e){return e.__unmatched})&&r&&r("",!1,!0),i):[]},deferLoadOptions:O,deferLoadLeftOptions:E,expandTreeOptions:S,syncOptions:A,setLoading:function(t){e.loading=t},setSubStore:function(e){m=e},getSubStore:function(){return m},reset:function(t){void 0===t&&(t=!1),e.validated=!1,m&&"ComboStore"===m.storeType&&m.forms.forEach(function(e){return e.reset(void 0,!1)}),!t&&c()},resetValidationStatus:function(t){e.validated=!1,c()},openDialog:function(n,r,o){n.data?e.dialogData=vp(n.data,r):e.dialogData=r,e.dialogSchema=n,e.dialogOpen=!0,o&&t.set(e.dialogData,o)},closeDialog:function(n,r){var o=t.get(e.dialogData);e.dialogOpen=!1,o&&(t.delete(e.dialogData),setTimeout(function(){return o(n,r)},200))},openPopOver:function(n,r,o){e.popOverData=r||{},e.popOverOpen=!0,e.popOverSchema=n,o&&t.set(e.popOverData,o)},closePopOver:function(n,r){var o=t.get(e.popOverData);e.popOverOpen=!1,o&&(t.delete(e.popOverData),setTimeout(function(){return o(n,r)},200))},changeTmpValue:function(t,n){e.extraName&&Array.isArray(t)?e.tmpValue=t.filter(function(e){return e}).length?t:"":e.tmpValue=t,n&&(e.changeMotivation=n)},changeEmitedValue:function(t){e.emitedValue=t},addSubFormItem:function(t){e.itemsRef.push(t.id)},removeSubFormItem:function(t){var n=e.itemsRef.findIndex(function(e){return e===t.id});~n&&e.itemsRef.splice(n,1)},loadAutoUpdateData:w,setIsControlled:function(t){e.isControlled=!!t},init:_i(function(){var t,n,i,s,u,l;return o(this,function(o){switch(o.label){case 0:t=r.sort(function(e,t){return(e.__weight||0)-(t.__weight||0)}),o.label=1;case 1:o.trys.push([1,,10,11]),o.label=2;case 2:o.trys.push([2,7,8,9]),n=a(t),i=n.next(),o.label=3;case 3:return i.done?[3,6]:[4,(0,i.value)(e)];case 4:o.sent(),o.label=5;case 5:return i=n.next(),[3,3];case 6:return[3,9];case 7:return s=o.sent(),u={error:s},[3,9];case 8:try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(u)throw u.error}return[7];case 9:return[3,11];case 10:return fo(e)&&(e.inited=!0),[7];case 11:return[2]}})}),addInitHook:function(e,t){return void 0===t&&(t=0),e=Qc(e),r.push(e),e.__weight=t,function(){var t=r.indexOf(e);~t&&r.splice(t,1)}},beforeDestroy:function(){r.splice(0,r.length)}}});S();var Uy=Wm.named("PaginationStore").props({page:1,perPage:10,inputName:"",outputName:"",mode:"normal",ellipsisPageGap:5}).views(function(e){return{get inputItems(){var t=ku(e.inputName||"items",e.data);return Array.isArray(t)?t:[]},get locals(){var t,n=(e.page-1)*e.perPage;return zu(e.data,((t={currentPage:e.page,lastPage:this.lastPage})[e.outputName||"items"]=this.inputItems.slice(n,n+e.perPage),t))},get lastPage(){return Math.ceil(this.inputItems.length/e.perPage)}}}).actions(function(e){return{switchTo:function(t,n){e.page=t,"number"==typeof n&&(e.perPage=n)}}});S();var qy=Ym.named("AppStore").props({pages:Ta.frozen(),activePage:Ta.frozen(),folded:!1,offScreen:!1}).views(function(e){return{get navigations(){return Array.isArray(e.pages)?ld(e.pages,function(t){var n=Gc(t,e.data);return!1!==n&&t.path&&!~t.path.indexOf("http")&&~t.path.indexOf(":")&&(n=!1),{label:t.label,icon:t.icon,path:t.path,children:t.children,className:t.className,visible:n,badge:"string"==typeof t.badge?ic(t.badge,e.data):t.badge,badgeClassName:ic(t.badgeClassName,e.data)}}):[{label:e.__("App.navigation"),children:[]}]},get bcn(){var t;return(null===(t=e.activePage)||void 0===t?void 0:t.bcn)||[]},get pageData(){var t;return zu(e.data,{params:(null===(t=e.activePage)||void 0===t?void 0:t.params)||{}})}}}).actions(function(e){return{toggleFolded:function(){e.folded=!e.folded},toggleOffScreen:function(){e.offScreen=!e.offScreen},updateOffScreen:function(t){e.offScreen=t},setPages:function(t){if(t&&!Array.isArray(t))t=[t];else if(!Array.isArray(t))return;t=ld(t,function(e,t,n,r){var o=e.link||e.url;if((e.schema||e.schemaApi)&&(o=e.url||"/".concat(r.map(function(e){return e.index}).concat(t).map(function(e){return"page-".concat(e+1)}).join("/")),o&&"/"!==o[0])){for(var i="/",a=r.length;a>0;){var s=r[a-1];if(null==s?void 0:s.path){i=s.path+"/";break}a--}o=i+o}return p(p({},e),{index:t,id:e.id||Mc(),label:e.label,icon:e.icon,path:o})}),e.pages=t},rewrite:function(t,n){var r=pd(e.pages,function(e){return e.path===t});r&&this.setActivePage(r,n)},setActivePage:function(t,n,r){var o;if((null===(o=e.activePage)||void 0===o?void 0:o.id)!==t.id){var i=[];if(pd(e.pages,function(o,a,s,u){return o.id===t.id&&(i=u.filter(function(e){return e.path&&e.label}).map(function(e){return p(p({},e),{path:lp(e.path,r)})}),n.showFullBreadcrumbPath&&(i=u.filter(function(e){return e.label})),i.push(p(p({},o),{path:""})),e.__,n.showBreadcrumbHomePath&&"/"!==i[0].path&&i.unshift({label:e.__("App.home"),path:"/"}),!0)}),e.activePage=p(p({},t),{params:r||{},bcn:i}),t.label&&(document.title=t.label),t.schema)e.schema=t.schema,e.schemaKey=""+Date.now();else if(t.schemaApi)e.schema=null,e.fetchSchema(t.schemaApi,e.activePage,{method:"get"});else{if(t.redirect)return void n.jumpTo(t.redirect,void 0,e.data);t.rewrite?this.rewrite(t.rewrite,n):(e.schema=null,e.schemaKey="")}}else void 0!==r&&(e.activePage=p(p({},e.activePage),{params:r}))},updateActivePage:function(t){if(Array.isArray(e.pages)){var n,r=pd(e.pages,function(e){return!(!e.path||!(n=t.isCurrentUrl(e.path,e)))});if(r)this.setActivePage(r,t,"object"==typeof n?n.params:void 0);else{var o=pd(e.pages,function(e){return e.isDefaultPage});o?this.setActivePage(o,t):e.activePage=null}}}}}),Wy=[];function Hy(e){Wy.push(e)}var Gy=["__page.","appVariables.","global.","globalState."];function Ky(e){return"string"==typeof e&&_c(e)&&Gy.some(function(t){return e.includes(t)})}S();var Yy,Jy=Ym.named("RootStore").props({runtimeError:Ta.frozen(),runtimeErrorStack:Ta.frozen(),query:Ta.frozen(),ready:!1,globalVarTempStates:Ta.optional(Ta.map(Ta.frozen()),{}),globalVarStates:Ta.optional(Ta.map(Ta.frozen()),{})}).volatile(function(e){return{context:{},legacyGlobalTempContext:{},globalVars:[],globalData:{global:{},globalState:{}}}}).views(function(e){return{get nextGlobalData(){var t,n={},r=Bu(e.data),o=!1,i=!0,a={},s=!0;return e.globalVarTempStates.forEach(function(e,t){n[t]=e.value,o=o||e.touched,e.saved||(i=!1),e.errorMessages.length&&(a[t]=e.errorMessages),e.initialized||(s=!1)}),t={fields:e.globalVarTempStates.toJSON(),initialized:s,touched:o,saved:i,errors:a,valid:!Object.keys(a).length},r.unshift({global:n,globalState:t}),r.unshift(e.legacyGlobalTempContext),r.unshift(e.context),Uu(r)},get downStream(){var t=e.data;if(e.context||e.query){var n=Bu(t),r={},o=!1,i=!0,a={},s=!0;e.globalVarStates.forEach(function(e,t){r[t]=e.value,o=o||e.touched,e.saved||(i=!1),e.errorMessages.length&&(a[t]=e.errorMessages),e.initialized||(s=!1)}),Object.assign(e.globalData.global,r),Object.assign(e.globalData.globalState,{fields:e.globalVarStates.toJSON(),initialized:s,touched:o,saved:i,errors:a,valid:!Object.keys(a).length}),n.unshift(e.globalData),n.unshift(e.context),e.query&&n.splice(n.length-1,0,p(p({},e.query),{__query:e.query})),t=Uu(n)}return t}}}).actions(function(e){function t(t,n){return e.updateGlobalVarState(t,n)}var n=_i(function(t){var n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,4,5]),(null==(n=t())?void 0:n.then)?[4,n]:[3,2];case 1:o.sent(),o.label=2;case 2:return[3,5];case 3:return r=o.sent(),e.runtimeError=r.message,e.runtimeErrorStack=r.stack,[3,5];case 4:return e.ready=!0,[7];case 5:return[2]}})});function r(e,n,r){return u(this,void 0,void 0,function(){var i;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,,2,3]),t(e.key,{busy:!0}),[4,r(e,n)];case 1:return i=o.sent(),t(e.key,{value:i}),[3,3];case 2:return t(e.key,{busy:!1}),[7];case 3:return[2]}})})}function s(n,i){return u(this,void 0,void 0,function(){var s,l,c,d,f,h,v,m,y,g,b;return o(this,function(w){switch(w.label){case 0:s=n.concat(i),l=p(p({},e.context),{variables:s}),c=s.map(function(e){return function(e,t){var n=[],r=Wy.reduce(function(e,r){var o=r(e,t);return"function"==typeof o&&n.push(o),null!=o?o:e},e);return r=n.reduce(function(e,n){var r;return null!==(r=n(e,t))&&void 0!==r?r:e},r),r}(e,l)}),d=[],f=[],h=function(t){var n=e.globalVarTempStates.get(t.key);if(null==n?void 0:n.initialized)return"continue";if(f.push(t),t.bulkGetter){var r=d.find(function(e){return e.fn===t.bulkGetter});r||(r={fn:t.bulkGetter,variables:[]},d.push(r)),r.variables.push(t)}};try{for(v=a(c),m=v.next();!m.done;m=v.next())y=m.value,h(y)}catch(x){g={error:x}}finally{try{m&&!m.done&&(b=v.return)&&b.call(v)}finally{if(g)throw g.error}}return[4,Promise.all(f.map(function(n){return function(n,i,a){return u(this,void 0,void 0,function(){var s,u;return o(this,function(o){switch(o.label){case 0:return s=n.defaultValue,a?[4,r(n,i,a)]:[3,2];case 1:return o.sent(),u=e.globalVarTempStates.get(n.key),t(n.key,{initialized:!0,pristine:u.value}),[3,3];case 2:t(n.key,{value:s,pristine:s,initialized:!n.bulkGetter}),o.label=3;case 3:return[2]}})})}(n,l,n.getter)}))];case 1:return w.sent(),[4,Promise.all(d.map(function(n){var r=n.fn;return function(n,r,i){return u(this,void 0,void 0,function(){var a,s,u;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,,2,3]),n.forEach(function(e){t(e.key,{busy:!0})}),[4,i.call(null,p(p({},r),{variables:n}))];case 1:if(a=o.sent(),!(0,$u.default)(a))return[2];for(u in s=function(r){if(!n.some(function(e){return e.key===r}))return"continue";e.globalVarTempStates.get(r)&&t(r,{value:a[r],pristine:a[r],initialized:!0})},a)s(u);return[3,3];case 2:return n.forEach(function(e){t(e.key,{busy:!1})}),[7];case 3:return[2]}})})}(n.variables,l,r)}))];case 2:return w.sent(),[2,c]}})})}var l=_i(function(t){var n,r,i,u,l;return o(this,function(o){switch(o.label){case 0:return n=function(e,t){var n,r,o=t.concat(),i=[],s=[],u=function(e){var t=o.findIndex(function(t){return t.key===e.key});~t?d(o.splice(t,1),1)[0].id!==e.id&&i.push(e):s.push(e)};try{for(var l=a(e),c=l.next();!c.done;c=l.next())u(c.value)}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return{newVars:s,updateVars:i,removeVars:o}}(t||[],e.globalVars),r=n.newVars,i=n.updateVars,u=n.removeVars,[4,s(r,i)];case 1:return l=o.sent(),fo(e)?(e.globalVars=l,u.forEach(function(t){e.globalVarTempStates.delete(t.key)}),h(),[2]):[2]}})}),c=function(n,r){var o=e.globalVarTempStates.get(n);if(o){var i=o.value;"set"===r.op&&(i=r.value),t(n,{value:i,touched:!0}),f()}},f=(0,Am.default)(function(n){return u(this,void 0,void 0,function(){var r,i,s,l,c,d,f,h,v,m;return o(this,function(y){switch(y.label){case 0:r=p(p({},e.context),{variables:e.globalVars}),i=[],s=[],l={},c=function(t){var r=e.globalVarTempStates.get(t.key);if(!(null==r?void 0:r.touched))return"continue";if(n&&n!==t.key)return"continue";if(!n&&!1===t.autoSave)return"continue";if(l[t.key]=r.value,t.setter&&i.push({fn:t.setter,item:t,value:r.value}),t.bulkSetter){var o=s.find(function(e){return e.fn===t.bulkSetter});o||(o={fn:t.bulkSetter,variables:[],values:{}},s.push(o)),o.variables.push(t),o.values[t.key]=r.value}};try{for(d=a(e.globalVars),f=d.next();!f.done;f=d.next())h=f.value,c(h)}catch(g){v={error:g}}finally{try{f&&!f.done&&(m=d.return)&&m.call(d)}finally{if(v)throw v.error}}return[4,Promise.all(i.map(function(e){var n=e.fn;return function(e,n,r,i){return u(this,void 0,void 0,function(){return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,,2,3]),t(e.key,{busy:!0}),[4,i(e,n,r)];case 1:return o.sent(),t(e.key,{saved:!0}),[3,3];case 2:return t(e.key,{busy:!1}),[7];case 3:return[2]}})})}(e.item,e.value,r,n)}).concat(s.map(function(e){var n=e.variables,i=e.values,a=e.fn;return function(e,n,r,i){return u(this,void 0,void 0,function(){return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,,2,3]),e.forEach(function(e){t(e.key,{busy:!0})}),[4,i(n,p(p({},r),{variables:e}))];case 1:return o.sent(),e.forEach(function(e){t(e.key,{saved:!0})}),[3,3];case 2:return e.forEach(function(e){t(e.key,{busy:!1})}),[7];case 3:return[2]}})})}(n,i,r,a)})))];case 1:return y.sent(),[2]}})})},250,{trailing:!0,leading:!1});function h(){e.globalVarStates.clear(),e.globalVarTempStates.forEach(function(t,n){e.globalVarStates.set(n,p({},t))})}var v=0,m=[];function y(e,t){if(!e||e.__observed)return e;var n=0;return new Proxy(p({},e),{get:function(e,t){return"__observed"===t||Reflect.get(e,t)},set:function(e,r,o){return Reflect.set(e,r,o),cancelAnimationFrame(n),n=requestAnimationFrame(function(){return t(e)}),console.warn("Don't modify the context directly."),!0}})}return{updateContextBySetter:function(t){this.updateContext(t),e.data=Wu(e.data)},updateContext:function(t,n){void 0===n&&(n=!1);var r=t||{},o=r.__page,a=r.appVariables,s=i(r,["__page","appVariables"]);(o||a)&&(o=o?y(o,function(t){return e.updateContextBySetter(p(p({},e.context),{__page:t}))}):o,a=a?y(a,function(t){return e.updateContextBySetter(p(p({},e.context),{appVariables:t}))}):a,n&&(e.context.__page=o,e.context.appVariables=a),e.legacyGlobalTempContext.__page=o,e.legacyGlobalTempContext.appVariables=a),Object.assign(e.context,s)},updateGlobalVarState:function(t,n){var r=p(p({},e.globalVarTempStates.get(t)||{value:void 0,pristine:void 0,initialized:!1,valid:!0,errorMessages:[],touched:!1,saved:!1}),n);e.globalVarTempStates.set(t,r)},setGlobalVars:l,updateGlobalVarValue:function(e,t){return c(e,{op:"set",value:t})},modifyGlobalVarValue:c,saveGlobalVarValues:f,setRuntimeError:function(t,n){e.runtimeError=t,e.runtimeErrorStack=n},updateLocation:function(t,n){var r=n?n(t):rp(t);Uc(r,e.query,!1)&&(e.query=r)},init:n,syncGlobalVarStates:h,syncLegacyGlobalVarStates:function(){e.legacyGlobalTempContext.__page===e.context.__page&&e.legacyGlobalTempContext.appVariables===e.context.appVariables||(Object.assign(e.context,e.legacyGlobalTempContext),e.data=Wu(e.data))},addSyncGlobalVarStatePendingTask:function(t,n){v++,n&&m.push(n),t(function(){0===--v&&(m.forEach(function(e){return e()}),m=[],fo(e)&&(e.syncGlobalVarStates(),e.syncLegacyGlobalVarStates()))})},afterCreate:function(){var t,n;t=e,n=Mn(function(){return e.nextGlobalData},function(){return e.addSyncGlobalVarStatePendingTask(function(e){return requestAnimationFrame(e)})}),Yo(t,1),Si(n,2),Jo(t).addDisposer(n)},afterDestroy:function(){f.flush()}}});Yy="production"===process.env.NODE_ENV?"ignore":"error",Jr=Yy;var Xy=[Ym,dy,Xm,Ay,Oy,Ny,Iy,Ty,By,Uy,qy],Zy=Ta.model("RendererStore",{storeType:"RendererStore"}).views(function(e){return{get fetcher(){return ho(e).fetcher},get notify(){return ho(e).notify},get isCancel(){return ho(e).isCancel},get __(){return ho(e).translate},getStoreById:function(e){return Cp(e)},get stores(){return Ep}}}).actions(function(e){return{addStore:function(t){return t.storeType===Jy.name?Op(Jy.create(t,ho(e))):Op((0,bp.default)(Xy,function(e){return e.name===t.storeType}).create(t,ho(e)))},removeStore:function(e){!function(e){var t=e.id;Sp.push(t),e.dispose(Ap)}(e)}}}),Qy=function(e,t){void 0===t&&(t=window.location),(e=e||"")&&"#"===e[0]?e=t.pathname+t.search+e:e&&"?"===e[0]&&(e=t.pathname+e);var n=e.indexOf("?"),r=e.indexOf("#"),o=e,i="",a=t.hash;if(n<r?(o=~n?e.substring(0,n):~r?e.substring(0,r):e,a=~r?e.substring(r):t.hash,i=~n?e.substring(n,~r?r:void 0):""):n>r&&(o=~r?e.substring(0,r):~n?e.substring(0,n):e,a=~r?e.substring(r,~n?n:void 0):t.hash,i=~n?e.substring(n):""),o){if("/"!=o[0]&&!/^https?\:\/\//.test(o)){var s=t.pathname.split("/");s.pop();for(var u=void 0;u=/^\.\.?\//.exec(o);)"../"===u[0]&&s.pop(),o=o.substring(u[0].length);o=s.concat(o).join("/")}}else o=t.pathname;return o+(n<r?i+a:a+i)},eg=/* @__PURE__ */n((e,t)=>{var n=gl(),r=ue();t.exports=function(e){return null==e?[]:n(e,r(e))}}),tg=[];function ng(e,t){var n=Object.defineProperties({context:Hu({pristineData:t.data},t),type:e,prevented:!1,stoped:!1,preventDefault:function(){n.prevented=!0},stopPropagation:function(){n.stoped=!0},get data(){return n.context.data},get pristineData(){return n.context.pristineData},setData:function(e){n.context.data=e},pendingPromise:[],allDone:function(){return Promise.all(n.pendingPromise)}},{context:{enumerable:!1},pristineData:{enumerable:!1},preventDefault:{enumerable:!1},stopPropagation:{enumerable:!1},setData:{enumerable:!1},pendingPromise:{enumerable:!1},allDone:{enumerable:!1}});return n}var rg=function(e){var t,n,r,o,i;if(e){var s=e.props.$schema.onEvent;if(s){var u=function(t){var n=tg.find(function(n){return n.renderer===e&&n.type===t&&n.actions===s[t].actions});(null==n?void 0:n.executing)&&(null===(o=null===(r=null==n?void 0:n.debounceInstance)||void 0===r?void 0:r.cancel)||void 0===o||o.call(r),tg=tg.filter(function(e){return!(e.renderer===n.renderer&&e.type===n.type)}),n.actions.length&&tg.push({renderer:e,type:t,debounce:n.debounce||null,track:s[t].track||null,weight:n.weight||0,actions:n.actions})),!n&&(null===(i=s[t].actions)||void 0===i?void 0:i.length)&&tg.push({renderer:e,type:t,debounce:s[t].debounce||null,track:s[t].track||null,weight:s[t].weight||0,actions:s[t].actions})};try{for(var l=a(Object.keys(s)),c=l.next();!c.done;c=l.next())u(c.value)}catch(d){t={error:d}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return function(t){tg=tg.filter(function(n){return void 0===t?n.renderer!==e:n.renderer!==e||n.type!==t})}}}};function og(e,t,n,r,i){var a,s,l,c,d;return u(this,void 0,void 0,function(){var p;return o(this,function(f){return p=(null==t?void 0:t.props.id)||(null==t?void 0:t.props.name)||"",vh("event","dispatch `".concat(e,"` from 「").concat((null==t?void 0:t.props.type)||"unknown").concat(p?"#".concat(p):"","」"),r),null===(l=null===(s=null===(a=null==t?void 0:t.props)||void 0===a?void 0:a.env)||void 0===s?void 0:s.beforeDispatchEvent)||void 0===l||l.call(s,e,t,n,r,i),null===(d=(c=t.props).onBroadcast)||void 0===d||d.call(c,e,i,r),function(e,t){u(this,void 0,void 0,function(){var n;return o(this,function(r){return"function"!=typeof BroadcastChannel?(console.error("BroadcastChannel is not supported in your browser"),[2]):((n=new BroadcastChannel(e)).postMessage({eventName:e,data:t}),n.close(),[2])})})}(e,r),[2]})})}var ig=function(e,t,n){var r,o,i,a;void 0===n&&(n="value");var s=null!==(a=null===(i=e.getData)||void 0===i?void 0:i.call(e))&&void 0!==a?a:e.data;return zu(s,e.name&&n?p(p({},t),((r={})[e.name]=t[n],r.__rendererData=p(p({},s),((o={})[e.name]=t[n],o)),r)):t)};function ag(e,t,n,r,i){return u(this,void 0,void 0,function(){var a,s,l,c,d,p=this;return o(this,function(f){switch(f.label){case 0:return a=[],"number"!=typeof n?[3,1]:((s=e[n])&&a.push(s),[3,9]);case 1:return"string"!=typeof n?[3,5]:_c(n)?[4,_u(n,t)]:[3,3];case 2:return l=f.sent(),[3,4];case 3:l=n,f.label=4;case 4:return(n=l).split(",").forEach(function(t){if(t=t.trim()){var n=hd(e,t.split(".").map(function(e){return parseInt(e,10)}));n&&a.push(n)}}),[3,9];case 5:return r?(c=[],cd(e,function(e){var n=e.storeType?e.data:e;c.push(function(){return u(p,void 0,void 0,function(){return o(this,function(o){switch(o.label){case 0:return[4,cc(r,zu(t,n))];case 1:return o.sent()&&a.push(e),[2]}})})})}),[4,Promise.all(c.map(function(e){return e()}))]):[3,7];case 6:return f.sent(),[3,9];case 7:return i?(d=[],cd(e,function(e,n){var r=e.storeType?e.data:e;d.push(function(){return u(p,void 0,void 0,function(){return o(this,function(o){return lc(i,zu(t,{record:r,rowIndex:n,item:r,index:n,indexPath:e.path}))&&a.push(e),[2]})})})}),[4,Promise.all(d.map(function(e){return e()}))]):[3,9];case 8:f.sent(),f.label=9;case 9:return[2,a]}})})}S();var sg=function(){function e(){}return e.prototype.run=function(e,t,n,r){var i,s;return u(this,void 0,void 0,function(){var u,l,c,d,p,f,h,v,m,y,g,b,w,x,E;return o(this,function(o){switch(o.label){case 0:return"string"!=typeof(u=null===(i=e.args)||void 0===i?void 0:i.loopName)?(console.error("loopName 必须是字符串类型"),[2]):(l=ku(u,r)||[])?[3,1]:(console.error("没有找到数据 ".concat(u)),[3,18]);case 1:return Array.isArray(l)?[3,2]:(console.error("".concat(u," 数据不是数组")),[3,18]);case 2:if(!(null===(s=e.children)||void 0===s?void 0:s.length))return[3,18];c=n.data,o.label=3;case 3:o.trys.push([3,15,16,17]),d=a(l),p=d.next(),o.label=4;case 4:if(p.done)return[3,14];f=p.value,t.loopStatus=Em.NORMAL,n.setData(zu(n.data,f)),o.label=5;case 5:o.trys.push([5,10,11,12]),x=void 0,h=a(e.children),v=h.next(),o.label=6;case 6:return v.done?[3,9]:(m=v.value,t.loopStatus===Em.CONTINUE?[3,8]:[4,Lm(m,t,n)]);case 7:if(o.sent(),t.loopStatus===Em.BREAK||n.stoped)return n.setData(c),n.stopPropagation(),[3,9];o.label=8;case 8:return v=h.next(),[3,6];case 9:return[3,12];case 10:return y=o.sent(),x={error:y},[3,12];case 11:try{v&&!v.done&&(E=h.return)&&E.call(h)}finally{if(x)throw x.error}return[7];case 12:if(n.stoped)return n.setData(c),[3,14];o.label=13;case 13:return p=d.next(),[3,4];case 14:return[3,17];case 15:return g=o.sent(),b={error:g},[3,17];case 16:try{p&&!p.done&&(w=d.return)&&w.call(d)}finally{if(b)throw b.error}return[7];case 17:t.loopStatus=Em.NORMAL,n.setData(c),o.label=18;case 18:return[2]}})})},e}();Rm("loop",new sg),Rm("break",new(function(){function e(){}return e.prototype.run=function(e,t,n){return u(this,void 0,void 0,function(){return o(this,function(e){return t.loopStatus=Em.BREAK,[2]})})},e}())),Rm("continue",new(function(){function e(){}return e.prototype.run=function(e,t,n){return u(this,void 0,void 0,function(){return o(this,function(e){return t.loopStatus=Em.CONTINUE,[2]})})},e}()));var ug=function(){function e(){}return e.prototype.run=function(e,t,n,r){return u(this,void 0,void 0,function(){var i,s,u,l,c,d;return o(this,function(o){switch(o.label){case 0:o.trys.push([0,6,7,8]),i=a(e.children||[]),s=i.next(),o.label=1;case 1:return s.done?[3,5]:(u=s.value).expression?[4,cc(u.expression,r)]:[3,4];case 2:return o.sent()?[4,Lm(u,t,n)]:[3,4];case 3:return o.sent(),[3,5];case 4:return s=i.next(),[3,1];case 5:return[3,8];case 6:return l=o.sent(),c={error:l},[3,8];case 7:try{s&&!s.done&&(d=i.return)&&d.call(i)}finally{if(c)throw c.error}return[7];case 8:return[2]}})})},e}();Rm("switch",new ug);var lg=function(){function e(){}return e.prototype.run=function(e,t,n){return u(this,void 0,void 0,function(){var r;return o(this,function(o){switch(o.label){case 0:return e.children&&e.children.length?(r=e.children.map(function(e){return Lm(e,t,n)}),[4,Promise.all(r)]):[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},e}();Rm("parallel",new lg),S();var cg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i;return u(this,void 0,void 0,function(){var a,s;return o(this,function(o){switch(o.label){case 0:return"string"==typeof(a=null!==(i=null===(r=e.args)||void 0===r?void 0:r.script)&&void 0!==i?i:e.script)&&(a=Dh(a,"context","doAction","event")),s=new Proxy({},{get:function(e,t,r){var o,i;if("string"==typeof t)return null===(i=null===(o=n.context.scoped)||void 0===o?void 0:o.getComponentByName)||void 0===i?void 0:i.call(o,t)}}),[4,null==a?void 0:a.call(s,t,function(e){return Lm(e,t,n)},n,e)];case 1:return o.sent(),[2]}})})},e}();Rm("custom",new cg);var dg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i,a;return u(this,void 0,void 0,function(){return o(this,function(o){switch(o.label){case 0:return(null===(r=e.args)||void 0===r?void 0:r.eventName)||e.eventName?(n.setData(zu(n.data,null!==(i=e.data)&&void 0!==i?i:{})),[4,og((null===(a=e.args)||void 0===a?void 0:a.eventName)||e.eventName,t,n.context.scoped,e.data,n)]):(console.error("eventName 未定义,请定义事件名称"),[2]);case 1:return[2,o.sent()]}})})},e}();Rm("broadcast",new dg);var pg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i,a,s,l,c,d,f,h,v,m,y,g,b,w,x,E,O,S,A,C,_,D,N,k,I,T,P,F,j,R;return u(this,void 0,void 0,function(){var u,V,M,L,$,z,B,U,q,W,H,G,K,Y,J,X,Z,Q;return o(this,function(o){switch(o.label){case 0:return u=e.componentId||e.componentName,V=e.dataMergeMode||"merge",M=null===(r=e.args)||void 0===r?void 0:r.path,"setValue"===e.actionType&&M&&"string"==typeof M?(M.startsWith("global.")&&(null==(L=t.props.topStore)||L.updateGlobalVarValue(M.substring(7),e.args.value)),($=null===(a=null===(i=null==n?void 0:n.context)||void 0===i?void 0:i.env)||void 0===a?void 0:a.beforeSetData)&&"function"==typeof $?[4,$(t,e,n)]:[3,2]):[3,2];case 1:if(!1===o.sent())return[2];o.label=2;case 2:if(z=Mm(e,t,n,u),u&&!z){if(B="尝试执行一个不存在的目标组件动作(".concat(u,"),请检查目标组件非隐藏状态,且正确指定了componentId或componentName"),!1===e.ignoreError)throw Error(B);return console.warn(B),[2]}return"setValue"===e.actionType?(null==z?void 0:z.setData)?[2,null==z?void 0:z.setData(null===(s=e.args)||void 0===s?void 0:s.value,"override"===V,null===(l=e.args)||void 0===l?void 0:l.index,null===(c=e.args)||void 0===c?void 0:c.condition)]:[2,null===(f=null==z?void 0:(d=z.props).onChange)||void 0===f?void 0:f.call(d,null===(h=e.args)||void 0===h?void 0:h.value)]:"reload"!==e.actionType?[3,4]:[4,null===(v=null==z?void 0:z.reload)||void 0===v?void 0:v.call(z,void 0,e.data,n.data,void 0,"override"===V,p(p({},e.args),{resetPage:null!==(y=null===(m=e.args)||void 0===m?void 0:m.resetPage)&&void 0!==y?y:e.resetPage}))];case 3:return(H=o.sent())&&e.outputVar&&n.setData(Hu(n.data,((K={})[e.outputVar]=H,K))),[2,H];case 4:if("validateFormItem"!==e.actionType||!(null===(b=wb(null===(g=null==z?void 0:z.props)||void 0===g?void 0:g.type))||void 0===b?void 0:b.isFormItem))return[3,11];o.label=5;case 5:return o.trys.push([5,9,,10]),[4,null===(x=null==z?void 0:(w=z.props).onValidate)||void 0===x?void 0:x.call(w)];case 6:return(q=o.sent())?[4,null===(E=null==z?void 0:z.validate)||void 0===E?void 0:E.call(z)]:[3,8];case 7:q=!o.sent(),o.label=8;case 8:return(U=q)?n.setData(zu(n.data,((Y={})[e.outputVar||"".concat(e.actionType,"Result")]={error:"",value:null===(S=null===(O=null==z?void 0:z.props)||void 0===O?void 0:O.formItem)||void 0===S?void 0:S.value},Y))):n.setData(zu(n.data,((J={})[e.outputVar||"".concat(e.actionType,"Result")]={error:"string"==typeof U?U:((null===(C=null===(A=null==z?void 0:z.props)||void 0===A?void 0:A.formItem)||void 0===C?void 0:C.errors)||[]).join(","),value:null===(D=null===(_=null==z?void 0:z.props)||void 0===_?void 0:_.formItem)||void 0===D?void 0:D.value},J))),[3,10];case 9:return W=o.sent(),n.setData(zu(n.data,((X={})[e.outputVar||"".concat(e.actionType,"Result")]={error:W.message||"未知错误",value:null===(k=null===(N=null==z?void 0:z.props)||void 0===N?void 0:N.formItem)||void 0===k?void 0:k.value},X))),[3,10];case 10:return[2];case 11:return o.trys.push([11,13,,14]),[4,null===(I=null==z?void 0:z.doAction)||void 0===I?void 0:I.call(z,e,n.data,!0,e.args)];case 12:return H=o.sent(),["validate","submit"].includes(e.actionType)&&n.setData(zu(n.data,((Z={})[e.outputVar||"".concat(e.actionType,"Result")]={error:"",payload:null!==(T=null==H?void 0:H.__payload)&&void 0!==T?T:null===(F=null===(P=null==z?void 0:z.props)||void 0===P?void 0:P.store)||void 0===F?void 0:F.data,responseData:null==H?void 0:H.__response},Z))),[2,H];case 13:return G=o.sent(),n.setData(zu(n.data,((Q={})[e.outputVar||"".concat(e.actionType,"Result")]={error:G.message,errors:"ValidateError"===G.name?G.detail:G,payload:null===(R=null===(j=null==z?void 0:z.props)||void 0===j?void 0:j.store)||void 0===R?void 0:R.data},Q))),[3,14];case 14:return[2]}})})},e}();Rm("component",new pg);var fg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i;return u(this,void 0,void 0,function(){var n,a,s;return o(this,function(o){return n=e.componentId||e.componentName,["show","hidden","visibility"].includes(e.actionType)?(a="visibility"===e.actionType?null===(r=e.args)||void 0===r?void 0:r.value:"show"===e.actionType,[2,t.props.statusStore.setVisible(n,a)]):["static","nonstatic"].includes(e.actionType)?[2,t.props.statusStore.setStatic(n,"static"===e.actionType)]:["enabled","disabled","usability"].includes(e.actionType)?(s="usability"===e.actionType?!(null===(i=e.args)||void 0===i?void 0:i.value):"disabled"===e.actionType,[2,t.props.statusStore.setDisable(n,s)]):[2]})})},e}();Rm("status",new fg);var hg=function(){function e(e){void 0===e&&(e="ajax"),this.fetcherType=e}return e.prototype.run=function(e,t,n){var r,i,a,s,l,c,d,f,h,v,m,y,g;return u(this,void 0,void 0,function(){var t,u,b,w,x,E,O,S,A;return o(this,function(o){switch(o.label){case 0:if(!(null===(r=n.context.env)||void 0===r?void 0:r.fetcher))throw new Error("env.fetcher is required!");if(!e.api)throw new Error("api is required!");return"download"===this.fetcherType&&"download"===e.actionType&&e.api&&(e.api.responseType="blob"),t=n.context.env,u=(null===(i=null==e?void 0:e.options)||void 0===i?void 0:i.silent)||(null==e?void 0:e.api).silent,b=null===(a=null==e?void 0:e.api)||void 0===a?void 0:a.messages,(w=Sh(e.api)).sendOn?[4,cc(w.sendOn,null!==(s=e.data)&&void 0!==s?s:{},!1)]:[3,2];case 1:if(!o.sent())return[2];o.label=2;case 2:null==(null==w?void 0:w.data)&&(w=p(p({},w),{data:{}})),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,t.fetcher(w,null!==(l=e.data)&&void 0!==l?l:{},null!==(c=null==e?void 0:e.options)&&void 0!==c?c:{})];case 4:if(S=o.sent(),x=!id(S.data)||S.ok?Bh(S.data):null,n.setData(zu(n.data,p(p(p({},n.data),x),((A={responseData:x})[e.outputVar||"responseResult"]=p(p({},x),{responseData:x,responseStatus:S.status,responseMsg:S.msg}),A)))),!u){if(!S.ok)throw new tv(null!==(h=null!==(d=null==b?void 0:b.failed)&&void 0!==d?d:null===(f=e.messages)||void 0===f?void 0:f.failed)&&void 0!==h?h:S.msg,S);(E=null!==(g=null!==(y=null!==(v=null==b?void 0:b.success)&&void 0!==v?v:null===(m=e.messages)||void 0===m?void 0:m.success)&&void 0!==y?y:S.msg)&&void 0!==g?g:S.defaultMsg)&&t.notify("success",E,void 0!==S.msgTimeout?{closeButton:!0,timeout:S.msgTimeout}:void 0)}return[2,S.data];case 5:throw O=o.sent(),u||("ServerError"===O.type?(S=O.response,t.notify("error",O.message,void 0!==S.msgTimeout?{closeButton:!0,timeout:S.msgTimeout}:void 0)):t.notify("error",O.message)),O;case 6:return[2]}})})},e}();Rm("ajax",new hg),Rm("download",new hg("download"));var vg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i,a,s,l;return u(this,void 0,void 0,function(){return o(this,function(t){if(!(null===(r=n.context.env)||void 0===r?void 0:r.copy))throw new Error("env.copy is required!");return(null===(i=e.args)||void 0===i?void 0:i.content)&&(null===(s=null===(a=n.context.env)||void 0===a?void 0:a.copy)||void 0===s||s.call(a,e.args.content,{format:null===(l=e.args)||void 0===l?void 0:l.copyFormat})),[2]})})},e}();Rm("copy",new vg),S();var mg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i;return u(this,void 0,void 0,function(){var a,s,u,l,c;return o(this,function(o){switch(o.label){case 0:return void 0!==e.$$id?[2]:(a=t.handleAction?t.handleAction(n,{actionType:"dialog",dialog:e.dialog,reload:"none",data:e.rawData},e.data):null===(i=(r=t.props).onAction)||void 0===i?void 0:i.call(r,n,{actionType:"dialog",dialog:e.dialog,reload:"none",data:e.rawData},e.data),n.pendingPromise.push(a),e.waitForAction?[4,a]:[3,2]);case 1:s=o.sent(),u=s.confirmed,l=s.value,n.setData(Hu(n.data,((c={})[e.outputVar||"dialogResponse"]={confirmed:u,value:l},c))),o.label=2;case 2:return[2]}})})},e}(),yg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i;return u(this,void 0,void 0,function(){return o(this,function(o){return e.componentId?n.context.scoped.closeById(e.componentId):null===(i=(r=t.props).onAction)||void 0===i||i.call(r,n,p(p({},e),{actionType:"close"}),e.data),[2]})})},e}(),gg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i,a,s,l,c,d,p,f,h;return u(this,void 0,void 0,function(){return o(this,function(t){return null===(i=(r=n.context.env).alert)||void 0===i||i.call(r,null!==(s=ic(null===(a=e.dialog)||void 0===a?void 0:a.msg,n.data))&&void 0!==s?s:null===(l=e.args)||void 0===l?void 0:l.msg,null!==(d=ic(null===(c=e.dialog)||void 0===c?void 0:c.title,n.data))&&void 0!==d?d:null===(p=e.args)||void 0===p?void 0:p.title,null!==(h=ic(null===(f=e.dialog)||void 0===f?void 0:f.className,n.data))&&void 0!==h?h:""),[2]})})},e}(),bg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i,a,s,l,c,d,f,h,v,m,y,g,b,w,x,E,O,S;return u(this,void 0,void 0,function(){var u;return o(this,function(o){switch(o.label){case 0:return(u=null!==(r=e.dialog)&&void 0!==r?r:e.args).$ref&&t.props.resolveDefinitions&&(u=p(p({},t.props.resolveDefinitions(u.$ref)),u)),(null==u?void 0:u.type)?[3,2]:[4,null===(a=(i=n.context.env).confirm)||void 0===a?void 0:a.call(i,ic(null==u?void 0:u.msg,n.data)||(null===(s=e.args)||void 0===s?void 0:s.msg),ic(null===(l=e.dialog)||void 0===l?void 0:l.title,n.data)||(null===(c=e.args)||void 0===c?void 0:c.title),{closeOnEsc:ic(null===(d=e.dialog)||void 0===d?void 0:d.closeOnEsc,n.data)||(null===(f=e.args)||void 0===f?void 0:f.closeOnEsc),size:ic(null===(h=e.dialog)||void 0===h?void 0:h.size,n.data)||(null===(v=e.args)||void 0===v?void 0:v.size),confirmText:ic(null===(m=e.dialog)||void 0===m?void 0:m.confirmText,n.data)||(null===(y=e.args)||void 0===y?void 0:y.confirmText),cancelText:ic(null===(g=e.dialog)||void 0===g?void 0:g.cancelText,n.data)||(null===(b=e.args)||void 0===b?void 0:b.cancelText),confirmBtnLevel:ic(null===(w=e.dialog)||void 0===w?void 0:w.confirmBtnLevel,n.data)||(null===(x=e.args)||void 0===x?void 0:x.confirmBtnLevel),cancelBtnLevel:ic(null===(E=e.dialog)||void 0===E?void 0:E.cancelBtnLevel,n.data)||(null===(O=e.args)||void 0===O?void 0:O.cancelBtnLevel),className:ic(null===(S=e.dialog)||void 0===S?void 0:S.className,n.data)||""})];case 1:case 3:return[2,o.sent()];case 2:return[4,new Promise(function(r,o){var i,a;t.handleAction?t.handleAction(n,{actionType:"dialog",dialog:u,data:e.rawData,reload:"none",callback:function(e){return r(e)}},e.data):null===(a=(i=t.props).onAction)||void 0===a||a.call(i,n,{actionType:"dialog",dialog:u,data:e.rawData,reload:"none",callback:function(e){return r(e)}},e.data)})]}})})},e}();Rm("dialog",new mg),Rm("closeDialog",new yg),Rm("alert",new gg),Rm("confirmDialog",new bg),S();var wg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i;return u(this,void 0,void 0,function(){var a,s,u,l,c;return o(this,function(o){switch(o.label){case 0:return void 0!==e.$$id?[2]:(a=t.handleAction?t.handleAction(n,{actionType:"drawer",drawer:e.drawer,reload:"none",data:e.rawData},e.data):null===(i=(r=t.props).onAction)||void 0===i?void 0:i.call(r,n,{actionType:"drawer",drawer:e.drawer,reload:"none",data:e.rawData},e.data),n.pendingPromise.push(a),e.waitForAction?[4,a]:[3,2]);case 1:s=o.sent(),u=s.confirmed,l=s.value,n.setData(Hu(n.data,((c={})[e.outputVar||"drawerResponse"]={confirmed:u,value:l},c))),o.label=2;case 2:return[2]}})})},e}(),xg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i;return u(this,void 0,void 0,function(){return o(this,function(o){return e.componentId?n.context.scoped.closeById(e.componentId):null===(i=(r=t.props).onAction)||void 0===i||i.call(r,n,p(p({},e),{actionType:"close"}),e.data),[2]})})},e}();Rm("drawer",new wg),Rm("closeDrawer",new xg);var Eg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i;return u(this,void 0,void 0,function(){var t,n,a,s;return o(this,function(o){return t=null===(r=e.args)||void 0===r?void 0:r.to,n=(0,ly.default)(null!==(i=e.args)&&void 0!==i?i:{},"cc","bcc","subject","body"),a=Pc.default.stringify(n),s="mailto:".concat(t,"?").concat(a),window.open(s),[2]})})},e}();Rm("email",new Eg),S();var Og=function(){function e(){}return e.prototype.run=function(e,t,n){var r;return u(this,void 0,void 0,function(){var t,i;return o(this,function(o){switch(o.label){case 0:switch(e.actionType){case"setEventData":return[3,1];case"preventDefault":return[3,5];case"stopPropagation":return[3,6]}return[3,7];case 1:return"string"!=typeof(null===(r=e.args)||void 0===r?void 0:r.key)?[3,4]:(t=Wu(n.data),_c(i=e.args.value)?[4,_u(i,n.data,"| raw")]:[3,3]);case 2:i=o.sent(),o.label=3;case 3:Ku(t,e.args.key,i),n.setData(t),o.label=4;case 4:return[3,7];case 5:return n.preventDefault(),[3,7];case 6:return n.stopPropagation(),[3,7];case 7:return[2]}})})},e}();Rm("setEventData",new Og),Rm("preventDefault",new Og),Rm("stopPropagation",new Og);var Sg=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i,a,s,l,c,d,f;return u(this,void 0,void 0,function(){var t,u;return o(this,function(o){if(!(null===(r=n.context.env)||void 0===r?void 0:r.jumpTo))throw new Error("env.jumpTo is required!");return t=p(p({},null!==(a=null===(i=e.args)||void 0===i?void 0:i.params)&&void 0!==a?a:{}),null!==(s=e.data)&&void 0!==s?s:{}),"link"===(null==e?void 0:e.actionType)&&(null==t?void 0:t.targetType)&&delete t.targetType,u=Ah({url:(null===(l=e.args)||void 0===l?void 0:l.url)||(null===(c=e.args)||void 0===c?void 0:c.link),method:"get"},t,{autoAppend:!0}),null===(d=n.context.env)||void 0===d||d.jumpTo(u.url,p({actionType:e.actionType,type:"button"},e.args),null!==(f=e.data)&&void 0!==f?f:{}),[2]})})},e}();Rm("openlink",new Sg);var Ag=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i,a,s,l;return u(this,void 0,void 0,function(){return o(this,function(o){if(!(null===(r=n.context.env)||void 0===r?void 0:r.notify))throw new Error("env.notify is required!");return null===(a=null===(i=n.context.env)||void 0===i?void 0:i.notify)||void 0===a||a.call(i,(null===(s=e.args)||void 0===s?void 0:s.msgType)||"info",String(null===(l=e.args)||void 0===l?void 0:l.msg),p(p({},e.args),{mobileUI:t.props.mobileUI})),[2]})})},e}();Rm("toast",new Ag);var Cg=function(){function e(){}return e.prototype.run=function(e,t,n){var r;return u(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return"number"!=typeof(t=null===(r=e.args)||void 0===r?void 0:r.time)?[3,2]:[4,new Promise(function(e){return setTimeout(e,t)})];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e}();Rm("wait",new Cg);var _g=function(){function e(){}return e.prototype.run=function(e,t,n){return u(this,void 0,void 0,function(){return o(this,function(e){return window.history.back(),[2]})})},e}(),Dg=function(){function e(){}return e.prototype.run=function(e,t,n){var r;return u(this,void 0,void 0,function(){return o(this,function(t){return window.history.go((null===(r=e.args)||void 0===r?void 0:r.delta)||0),[2]})})},e}(),Ng=function(){function e(){}return e.prototype.run=function(e,t,n){return u(this,void 0,void 0,function(){return o(this,function(e){return window.location.reload(),[2]})})},e}();Rm("goBack",new _g),Rm("refresh",new Ng),Rm("goPage",new Dg);var kg="pe-no-print",Ig="pe-preserve-print",Tg="pe-preserve-ancestor";function Pg(e){e.classList.contains(Ig)||e.classList.add(kg)}function Fg(e){e.classList.remove(kg),e.classList.remove(Ig),e.classList.remove(Tg)}function jg(e,t){for(var n=e.previousElementSibling;n;)t(n),n=n.previousElementSibling;for(n=e.nextElementSibling;n;)t(n),n=n.nextElementSibling}function Rg(e,t){!function(e,t){e.classList.remove(kg),e.classList.add(Ig),t||e.classList.add(Tg)}(e,t),jg(e,Pg)}function Vg(e,t){Fg(e),jg(e,Fg)}function Mg(e,t){var n=e;for(t(n,!0),n=n.parentElement;n&&"BODY"!==n.nodeName;)t(n,!1),n=n.parentElement}function Lg(e){for(var t=0;t<e.length;t++)Mg(e[t],Rg);for(window.print(),t=0;t<e.length;t++)Mg(e[t],Vg)}var $g=function(){function e(){}return e.prototype.run=function(e,t,n){var r,i,a,s;return u(this,void 0,void 0,function(){var t,u,l;return o(this,function(o){return e.componentId?(t=null===(r=n.context.scoped)||void 0===r?void 0:r.getComponentById(e.componentId),null===(i=null==t?void 0:t.doAction)||void 0===i||i.call(t,e,n.data,!0,e.args),[2]):((null===(a=e.args)||void 0===a?void 0:a.id)?(u=document.querySelector("[data-id='".concat(e.args.id,"']")))&&Lg([u]):(null===(s=e.args)||void 0===s?void 0:s.ids)&&(l=[],e.args.ids.forEach(function(e){var t=document.querySelector("[data-id='".concat(e,"']"));t&&l.push(t)}),Lg(l)),[2])})})},e}();Rm("print",new $g);var zg=/* @__PURE__ */t(eg());function Bg(e,t){var n=e.indexOf("?");return~n?ic(e.slice(0,n),t)+e.slice(n):ic(e,t,"| raw")}function Ug(e){try{var t=Xs(e),n=[];if(t.body.forEach(function(e){if("raw"===e.type){var t=e.value.split(",");if(t.length>1){t.pop();var r=e.start.index;t.forEach(function(e){n.push(r+e.length),r+=e.length+1})}}}),n.length){var r=[];return n.reduceRight(function(t,n){var r;return t.unshift(null===(r=e.slice(n+1))||void 0===r?void 0:r.trim()),e=e.slice(0,n),t},r),r.unshift(e),r}}catch(tE){}return[e]}S();var qg=Hg(""),Wg=Qp.createContext(qg);function Hg(e,t,n,r){var i=[],s={rendererType:r,component:void 0,parent:t,registerComponent:function(n){if(n.props.$path===e&&t)return s.component=n,t.registerComponent(n);~i.indexOf(n)||i.push(n)},unRegisterComponent:function(n){if(n.props.$path===e&&t){var r=t.children.indexOf(s);return~r&&t.children.splice(r,1),t.unRegisterComponent(n)}var o=i.indexOf(n);~o&&i.splice(o,1)},getComponentByName:function(e){if(~e.indexOf(".")){var n=e.split("."),r=n.length;return n.reduce(function(e,t,n){if(e&&e.getComponentByName){var o=e.getComponentByName(t);return o&&n<r-1?o.context:o}return null},this)}return(0,bp.default)(i,function(t){return ic(t.props.name,t.props.data)===e||t.props.id===e})||t&&t.getComponentByName(e)},getComponentByIdUnderCurrentScope:function(e,t){var n=void 0;return pd([this],function(r){return r!==t&&r.getComponents().find(function(t){return ic(t.props.id,t.props.data)===e&&(n=t,!0)})}),n},getComponentById:function(e){for(var t=this,n=void 0;t;){var r=t.getComponentByIdUnderCurrentScope(e,n);if(r)return r;if(!t.parent||t.parent===qg)break;n=t,t=t.parent}},getComponentsByRefPath:function(e,t){if(!t||"string"!=typeof t)return[];for(var n={},r=this;r.parent;)r=r.parent;return cd([r],function(r){var o,i,s,u,l,c,d,p,f,h,v=r.getComponents()||[];if(Array.isArray(v))try{for(var m=a(v),y=m.next();!y.done;y=m.next()){var g=y.value,b=null!==(c=null===(l=null==g?void 0:g.props)||void 0===l?void 0:l.$path)&&void 0!==c?c:"unknown",w=null!==(p=null===(d=null==g?void 0:g.props)||void 0===d?void 0:d.$schema)&&void 0!==p?p:{},x=null!==(h=null===(f=null==g?void 0:g.props.env)||void 0===f?void 0:f.session)&&void 0!==h?h:"global";if(!n[b]&&e===x)if((null==g?void 0:g.setData)&&"function"==typeof g.setData)n[b]=g;else try{for(var E=(s=void 0,a(Object.keys(w))),O=E.next();!O.done;O=E.next()){var S=w[O.value];if("string"==typeof S&&Fl(S)){var A=S.substring(2,S.length-1).split("|")[0];if(A&&A===t){n[b]=g;break}}}}catch(C){s={error:C}}finally{try{O&&!O.done&&(u=E.return)&&u.call(E)}finally{if(s)throw s.error}}}}catch(_){o={error:_}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}}),(0,zg.default)(n)},getComponents:function(){return i.concat()},reload:function(e,t){var r=this;("string"==typeof e?Ug(e):e).forEach(function(e){var o=e.indexOf("?"),i=null;~o&&(i=vp(Fd(e.substring(o+1).replace(/\$\{(.*?)\}/,function(e,t){return"${"+encodeURIComponent(t)+"}"})),t),e=e.substring(0,o));var a=e.indexOf("."),s="";if(~a&&(s=e.substring(1+a),e=e.substring(0,a)),"window"===e)if(i){var u=location.pathname+"?"+Pd(i);n?n.updateLocation(u,!0):location.replace(u)}else location.reload();else{var l=r.getComponentByName(e)||r.getComponentById(e);l&&l.reload&&l.reload(s,i,t)}})},send:function(e,t){var r=this;("string"==typeof e?Ug(e):e).forEach(function(e){var o=e.indexOf("?");if(~o){var i=Fd((l=e.substring(o+1)).replace(/\$\{(.*?)\}/,function(e,t){return"${"+encodeURIComponent(t)+"}"}));e=e.substring(0,o),t=vp(i,t)}var a=e.indexOf("."),s="";~a&&(s=e.substring(1+a),e=e.substring(0,a));var u=r.getComponentByName(e);if(u&&u.receive)u.receive(t,s);else if("window"===e&&n&&n.updateLocation){var l=p(p({},rp(location)),t),c=location.pathname+"?"+Pd(l);n.updateLocation(c,!0)}})},close:function(e){var t=this;"string"==typeof e&&Ug(e).map(function(e){return t.getComponentByName(e)}).filter(function(e){return e&&e.props.show}).forEach(Gg)},closeById:function(e){var t=this.getComponentById(e);t&&t.props.show&&Gg(t)},doAction:function(e,t){return u(this,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:return r=this.getComponents()[0],i=ng("embed",{env:n,nativeEvent:void 0,data:zu(r.props.data,t),scoped:this}),[4,Lm(e,r,i)];case 1:return o.sent(),i.prevented,[2]}})})}};return z("GETRENDERERDATA",function(e,t,n){var r;void 0===n&&(n=s);var o=n.getComponentById(e),i=null===(r=null==o?void 0:o.getData)||void 0===r?void 0:r.call(o);return t?Nu(i,t):i}),z("GETRENDERERPROP",function(e,t,n){void 0===n&&(n=s);var r=n.getComponentById(e),o=null==r?void 0:r.props;return t?Nu(o,t):o}),t?(!t.children&&(t.children=[]),t.children.push(s),s):s}function Gg(e){e.context.getComponents().filter(function(e){return e&&("dialog"===e.props.type||"drawer"===e.props.type)&&e.props.show}).forEach(Gg),e.props.onClose&&e.props.onClose()}function Kg(e,t){var n=function(n){function r(e,r){var o=n.call(this,e)||this;o.scoped=Hg(o.props.$path,r,o.props.env,t);var i=e.scopeRef;return i&&i(o.scoped),o}return s(r,n),r.prototype.getWrappedInstance=function(){return this.ref},r.prototype.childRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.ref=e},r.prototype.componentWillUnmount=function(){var e=this.props.scopeRef;e&&e(null),delete this.scoped},r.prototype.render=function(){var t=this.props;t.scopeRef;var n=i(t,["scopeRef"]);return Qp.createElement(Wg.Provider,{value:this.scoped},Qp.createElement(e,p({},n,{ref:this.childRef})))},r.displayName="Scoped(".concat(e.displayName||e.name,")"),r.contextType=Wg,r.ComposedComponent=e,c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],r.prototype,"childRef",null),r}(Qp.Component);return(0,km.default)(n,e),n}function Yg(e,t){void 0===t&&(t={});var n=e;return e&&"string"==typeof e?n=Zs(e,t):e&&(0,$u.default)(e)&&(n=jd(e,function(e){return"string"==typeof e?lc(e,t):e},void 0,function(e){return Zs(e,t)})),n}function Jg(e,t,n,r){void 0===t&&(t={}),void 0===n&&(n=["addOn","ref"]);var o={},i=null;return Object.getOwnPropertyNames(e).forEach(function(a){if(!n||!~n.indexOf(a)){var s=/^(.*)(On|Expr|(?:c|C)lassName)(Raw)?$/.exec(a),u=null==s?void 0:s[2],l=e[a];!l||"string"!=typeof l&&"[object Object]"!==Object.prototype.toString.call(l)||!(null==s?void 0:s[1])||"On"!==u&&"Expr"!==u?"className"!==u&&"ClassName"!==u||(null==r?void 0:r[a])||!l||"string"!=typeof l&&!(0,$u.default)(l)||(o["".concat(a,"Raw")]=l,o[a]=Yg(l,t)):(a=s[1],"On"!==u&&"Expr"!==u||(!i&&r&&"string"==typeof l&&~l.indexOf("__props")&&(i=function(e,t){var n=Object.create(e.__super||null);Object.keys(t).forEach(function(e){return n[e]=t[e]});var r=Object.create(n);return Object.keys(e).forEach(function(t){return r[t]=e[t]}),r}(t,{__props:r})),l="On"===u?(null==r?void 0:r[a])||dc(l,i||t):ic(l,i||t)),o[a]=l)}}),o}var Xg=Qp.createContext(void 0);function Zg(e,t){return!(!["clickAction"].includes(e)||"string"==typeof t)}function Qg(e){return function(t){var n=function(n){function r(t,r){var o,a=this,s=r;(a=n.call(this,t)||this).renderChild=a.renderChild.bind(a),a.refFn=a.refFn.bind(a);var u=s.addStore({id:Mc(),path:a.props.$path,storeType:e.storeType,parentId:a.props.store?a.props.store.id:""});u.setTopStore(t.topStore),null===(o=t.storeRef)||void 0===o||o.call(t,u),a.store=u,!1===("function"==typeof e.extendsData?e.extendsData(t):e.extendsData)?u.initData(zu(a.props.data?a.props.data.__super:null,p(p({},a.formatData(vp(a.props.defaultData,a.props.data,Zg))),a.formatData(a.props.data)))):a.props.scope||a.props.data&&a.props.data.__super?a.props.store&&a.props.data===a.props.scope?u.initData(zu(a.props.store.data,p({},a.formatData(vp(a.props.defaultData,a.props.data,Zg))))):u.initData(zu(a.props.data.__super||a.props.scope,p(p({},a.formatData(vp(a.props.defaultData,a.props.data,Zg))),a.formatData(a.props.data)))):u.initData(p(p({},a.formatData(vp(a.props.defaultData,a.props.data,Zg))),a.formatData(a.props.data))),a.state={};var l=t.detectField,c=i(t,["detectField"]),d={};return l&&"data"!==l||(d=Jg(c,u.data),a.state=p({},d),a.unReaction=Mn(function(){return JSON.stringify(Jg(a.props,u.data))},function(){return a.setState(p({},Jg(a.props,u.data)))})),a}return s(r,n),r.prototype.getWrappedInstance=function(){return this.ref},r.prototype.refFn=function(e){this.ref=e},r.prototype.formatData=function(e){return Array.isArray(e)?{items:e}:e},r.prototype.componentDidUpdate=function(t){var n,r,o,i,a,s,u,l,c,d,f,h,v,m,y,g,b,w,x=this,E=this.props,O=this.store;if((!E.detectField||"data"===E.detectField)&&(b=this.props,w=t,Object.getOwnPropertyNames(b).some(function(e){return!!/^(.*)(On|Expr|(?:c|C)lassName)(Raw)?$/.exec(e)&&b[e]!==w[e]}))){var S=Jg(this.props,O.data);Uc(S,this.state)&&this.setState(S),null===(n=this.unReaction)||void 0===n||n.call(this),this.unReaction=Mn(function(){return Jg(x.props,O.data)},function(e){return x.setState(e)})}var A=null===(r=e.shouldSyncSuperStore)||void 0===r?void 0:r.call(e,O,E,t);!1!==A&&(!1===("function"==typeof e.extendsData?e.extendsData(E):e.extendsData)?(!0===A||t.defaultData!==E.defaultData||(E.trackExpression?Zs(E.trackExpression,E.data)!==Zs(E.trackExpression,t.data):Uc(t.data,E.data)||E.data&&t.data&&E.data.__super!==t.data.__super))&&O.initData(Hu(E.data,p(p(p({},this.formatData(vp(this.props.defaultData,this.props.data,Zg))),O.hasRemoteData?O.data:null),this.formatData(E.data))),!1===(null!==(o=E.updatePristineAfterStoreDataReInit)&&void 0!==o?o:E.dataUpdatedAt!==t.dataUpdatedAt),null===(i=E.data)||void 0===i?void 0:i.__changeReason):!0===A||(E.trackExpression?Zs(E.trackExpression,E.data)!==Zs(E.trackExpression,t.data):Uc(t.data,E.data)||!1!==E.syncSuperStore&&function(e,t,n){var r;return r=n&&"FormStore"===n.storeType?(0,pl.default)(n.items.map(function(e){return"".concat(e.name).replace(/\..*$/,"")}).concat(Object.keys(n.data))):Object.keys(n.data),!(!Array.isArray(r)||!r.length)&&r.some(function(n){return e[n]!==t[n]})}(E.data,t.data,O))?E.store&&E.scope===E.data?O.initData(zu(E.store.data,p(p({},this.formatData(vp(this.props.defaultData,this.props.data,Zg))),!1===E.syncSuperStore?p({},O.data):Vc(O.data,E.store.data,t.scope,O,!0===E.syncSuperStore))),!1===(null!==(a=E.updatePristineAfterStoreDataReInit)&&void 0!==a?a:E.dataUpdatedAt!==t.dataUpdatedAt),null===(s=E.data)||void 0===s?void 0:s.__changeReason):E.data&&E.data.__super?O.initData(Hu(E.data,p(p({},this.formatData(vp(this.props.defaultData,this.props.data,Zg))),O.hasRemoteData||!O.path.includes("/")?p(p({},O.data),E.data):"ComboStore"===(null===(u=E.store)||void 0===u?void 0:u.storeType)?void 0:Vc(p(p({},O.pristineDiff),E.data),E.data.__super,t.data.__super,O,!1))),!1===(null!==(l=E.updatePristineAfterStoreDataReInit)&&void 0!==l?l:E.dataUpdatedAt!==t.dataUpdatedAt),null===(c=E.data)||void 0===c?void 0:c.__changeReason):O.initData(zu(E.scope,E.data),!1===(null!==(d=E.updatePristineAfterStoreDataReInit)&&void 0!==d?d:E.dataUpdatedAt!==t.dataUpdatedAt),null===(f=E.data)||void 0===f?void 0:f.__changeReason):E.trackExpression||E.store&&E.data===E.scope||!E.data||!E.data.__super?!E.trackExpression&&E.scope&&E.data===E.store.data&&t.data!==E.data&&O.initData(zu(E.scope,p({},O.data)),!1===(null!==(y=E.updatePristineAfterStoreDataReInit)&&void 0!==y?y:E.dataUpdatedAt!==t.dataUpdatedAt),null===(g=E.data)||void 0===g?void 0:g.__changeReason):t.data&&!Uc(E.data.__super,t.data.__super,!1)||O.initData(zu(E.data.__super,p(p({},E.data),O.data)),!1===(null!==(h=E.updatePristineAfterStoreDataReInit)&&void 0!==h?h:E.dataUpdatedAt!==t.dataUpdatedAt)||"FormStore"===O.storeType&&"CRUDStore"===(null===(v=t.store)||void 0===v?void 0:v.storeType),null===(m=E.data)||void 0===m?void 0:m.__changeReason))},r.prototype.componentWillUnmount=function(){var e,t,n,r=this.context,o=this.store;null===(e=this.unReaction)||void 0===e||e.call(this),fo(o)&&(o.setTopStore(null),r.removeStore(o)),delete this.store,null===(n=(t=this.props).storeRef)||void 0===n||n.call(t,null)},r.prototype.renderChild=function(e,t,n){return void 0===n&&(n={}),(0,this.props.render)(e,t,p(p({data:this.store.data,dataUpdatedAt:this.store.updatedAt},n),{scope:this.store.data,store:this.store}))},r.prototype.render=function(){var e,n=this.props;n.detectField,n.storeRef;var r=i(n,["detectField","storeRef"]);if(this.state.hidden||!1===this.state.visible)return null;var o=(null===(e=t.prototype)||void 0===e?void 0:e.isReactComponent)||t.$$typeof===Symbol.for("react.forward_ref")?{ref:this.refFn}:{forwardedRef:this.refFn};return Qp.createElement(t,p({},r,this.state,o,{data:this.store.data,dataUpdatedAt:this.store.updatedAt,store:this.store,scope:this.store.data,render:this.renderChild}))},r.displayName="WithStore(".concat(t.displayName||t.name,")"),r.ComposedComponent=t,r.contextType=Xg,c([Gf,l("design:paramtypes",[Object,void 0])],r)}(Qp.Component);return(0,km.default)(n,t),n}}S();var eb,tb,nb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.componentDidMount=function(){console.warn("Please implement this renderer(".concat(this.props.type,")"))},t.prototype.render=function(){return null},t}(Qp.Component),rb=[],ob={},ib={},ab=[],sb=1;function ub(e){ab.push(e)}function lb(e){return function(t){return cb(p(p({},e),{component:t})).component}}function cb(e){if(!e.test&&!e.type)throw new TypeError("please set config.type or config.test");e.type||"static"===e.name||console.warn("config.type is recommended for register renderer(".concat(e.test,")")),"string"==typeof e.type&&e.type&&(e.type=e.type.toLowerCase(),e.test=e.test||new RegExp("(^|/)(?:".concat((e.alias||[]).concat(e.type).map(function(e){return Xu(e)}).join("|"),")$"),"i"));var t=ob[e.type||""],n=p({},e);if(t&&t.component&&t.component!==nb&&e.component&&!t.origin&&!e.override)throw new Error('The renderer with type "'.concat(e.type,'" has already exists, please try another type!'));if(t&&(n=Object.assign(t,e),t.component===nb&&!e.component&&e.getComponent&&(delete n.component,delete n.Renderer)),n.weight=n.weight||0,n.name=n.name||n.type||"anonymous-".concat(sb++),e.component&&(n.Renderer=e.component,n.component=function(e,t){return t.storeType&&t.component&&(e=Qg({storeType:t.storeType,extendsData:t.storeExtendsData,shouldSyncSuperStore:t.shouldSyncSuperStore})(Gf(function(e){var t,n=e.prototype;if((null==n?void 0:n.render)&&(n.__originRender=n.render),null===(t=null==n?void 0:n.__proto__)||void 0===t?void 0:t.hasOwnProperty("__originRender")){var r=n.__proto__;n.__proto__=Object.create(r.__proto__||Object),Object.assign(n.__proto__,r),n.__proto__.render=r.__originRender}return e}(e)))),t.isolateScope&&(e=Kg(e,t.type)),e}(e.component,n)),!t){var r=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n]))return n;return-1}(rb,function(t){return e.weight<t.weight});~r?rb.splice(r,0,n):rb.push(n)}return ib[n.name]=!(!n.component||n.component===nb),n.type&&(ob[n.type]=n),(n.alias||[]).forEach(function(e){var t=p(p({},n),{type:e,name:e,alias:void 0,origin:n}),r=rb.findIndex(function(t){return t.name===e});~r?Object.assign(rb[r],t):rb.push(t),ob[e]=t,ib[e]=!0}),n}function db(e,t){return Qp.createElement("div",{className:"RuntimeError"},Qp.createElement("p",null,"Error: 找不到对应的渲染器"),Qp.createElement("p",null,"Path: ",t),Qp.createElement("pre",null,Qp.createElement("code",null,JSON.stringify(e,null,2))))}function pb(e){return u(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return fb(e)?[4,e.getComponent()]:[2];case 1:return t=n.sent(),!e.component&&t.default&&cb(p(p({},e),{component:t.default})),[2]}})})}function fb(e){return e&&(!e.component||e.component===nb)&&e.getComponent}function hb(e){return(Array.isArray(e)?rb.filter(function(t){return t.type&&e.includes(t.type)}):rb).some(fb)}var vb={session:"global",richTextToken:"",useMobileUI:!0,enableAMISDebug:null!==(tb=null!==(eb=window.enableAMISDebug)&&void 0!==eb?eb:-1!==location.search.indexOf("amisDebug=1"))&&void 0!==tb&&tb,loadRenderer:db,fetcher:function(){return Promise.reject("fetcher is required")},wsFetcher:function(e,t,n){if(e){var r=new WebSocket(e.url);return r.onopen=function(t){e.body&&r.send(JSON.stringify(e.body))},r.onmessage=function(n){var r;if(n.data){var o=void 0;try{o=JSON.parse(n.data)}catch(i){}"object"!=typeof o&&((r={})[e.responseKey||"data"]=n.data,o=r),t(o)}},r.onerror=n,{close:r.close}}return{close:function(){}}},isCancel:function(){return console.error("Please implement isCancel. see https://aisuda.bce.baidu.com/amis/zh-CN/start/getting-started#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97"),!1},updateLocation:function(){console.error("Please implement updateLocation. see https://aisuda.bce.baidu.com/amis/zh-CN/start/getting-started#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97")},jumpTo:function(e,t){if("goBack"===e)return window.history.back();e=Qy(e),t&&"url"===t.actionType?!1===t.blank?window.location.href=e:window.open(e):"link"===(null==t?void 0:t.actionType)&&["blank","self"].includes(null==t?void 0:t.targetType)?"self"===t.targetType?(window.history.pushState(null,"",e),location.reload()):window.open(e):/^https?:\/\//.test(e)?window.location.replace(e):location.href=e},isCurrentUrl:function(e){if(!e)return!1;var t=Qy(e),n=window.location,r=t,o="",i=t.indexOf("?");if(~i&&(r=t.substring(0,i),o=t.substring(i)),o){if(r!==n.pathname||!n.search)return!1;var a=Fd(o.substring(1)),s=rp(n);return Object.keys(a).every(function(e){return a[e]===s[e]})}return r===n.pathname},copy:function(e){console.error("copy contents",e)},tracker:function(e,t){},rendererResolver:bb,replaceTextIgnoreKeys:["type","name","mode","target","reload","persistData"],filterHtml:function(e){return e},isMobile:function(){var e,t;return null===(t=(e=window).matchMedia)||void 0===t?void 0:t.call(e,"(max-width: 768px)").matches},getPageId:yy},mb={};function yb(e){Object.assign(vb,e)}var gb={};function bb(e,t){var n="string"==typeof(null==t?void 0:t.type)?t.type.toLowerCase():"";if(n&&ob[n])return ob[n];if(gb[e])return gb[e];if(e&&e.length>3072)throw new Error("Path太长是不是死循环了?");var r=null;return rb.some(function(n){var o=!1;return"function"==typeof n.test?o=n.test(e,t,bb):n.test instanceof RegExp&&(o=n.test.test(e)),o&&(r=n),o}),null!==r&&r.component!==nb&&(r.type||r.test instanceof RegExp||"function"==typeof r.test&&r.test.length<2)&&(gb[e]=r),r}function wb(e){return(0,bp.default)(rb,function(t){return t.name===e})}"DragEvent"in window||Object.defineProperty(window,"DragEvent",{value:function(){}});var xb=Object.defineProperty,Eb=(e,t,n)=>(((e,t,n)=>{t in e?xb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),Ob=/* @__PURE__ */new Map,Sb=/* @__PURE__ */new WeakMap,Ab=0;function Cb(e,t,n={},r=void 0){if(void 0===window.IntersectionObserver&&void 0!==r){const o=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:o,observer:i,elements:a}=function(e){let t=function(e){return Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{return`${t}_${"root"===t?(n=e.root,n?(Sb.has(n)||(Ab+=1,Sb.set(n,Ab.toString())),Sb.get(n)):"0"):e[t]}`;var n}).toString()}(e),n=Ob.get(t);if(!n){const r=/* @__PURE__ */new Map;let o;const i=new IntersectionObserver(t=>{t.forEach(t=>{var n;const i=t.isIntersecting&&o.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=r.get(t.target))||n.forEach(e=>{e(i,t)})})},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},Ob.set(t,n)}return n}(n);let s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),i.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),i.unobserve(e)),0===a.size&&(i.disconnect(),Ob.delete(o))}}var _b=class extends Qp.Component{constructor(e){super(e),Eb(this,"node",null),Eb(this,"_unobserveCb",null),Eb(this,"handleNode",e=>{this.node&&(this.unobserve(),e||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()}),Eb(this,"handleChange",(e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),function(e){return"function"!=typeof e.children}(this.props)||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidUpdate(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve(),this.node=null}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:o,fallbackInView:i}=this.props;this._unobserveCb=Cb(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:o},i)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if("function"==typeof e){const{inView:t,entry:n}=this.state;return e({inView:t,entry:n,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:r,root:o,rootMargin:i,onChange:a,skip:s,trackVisibility:u,delay:l,initialInView:c,fallbackInView:d,...p}=this.props;return Qp.createElement(t||"div",{ref:this.handleNode,...p},e)}};function Db({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:s,fallbackInView:u,onChange:l}={}){var c;const[d,p]=Qp.useState(null),f=Qp.useRef(),[h,v]=Qp.useState({inView:!!s,entry:void 0});f.current=l,Qp.useEffect(()=>{if(a||!d)return;let s;return s=Cb(d,(e,t)=>{v({inView:e,entry:t}),f.current&&f.current(e,t),t.isIntersecting&&i&&s&&(s(),s=void 0)},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},u),()=>{s&&s()}},[Array.isArray(e)?e.toString():e,d,o,r,i,a,n,u,t]);const m=null==(c=h.entry)?void 0:c.target,y=Qp.useRef();d||!m||i||a||y.current===m||(y.current=m,v({inView:!!s,entry:void 0}));const g=[p,h.inView,h.entry];return g.ref=g[0],g.inView=g[1],g.entry=g[2],g}var Nb={default:{},cxd:{classPrefix:"cxd-"}};function kb(e,t){Nb[e]=p(p({},Nb[e]),t)}var Ib={};function Tb(e){if(e&&Ib[e])return Ib[e];var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=Xf.default.apply(void 0,f([],d(t),!1));return r&&e?r.replace(/(^|\s)([A-Z])/g,"$1"+e+"$2").replace(/(^|\s)\:/g,"$1"):r||""};return e&&(Ib[e]=t),t}function Pb(e){"string"!=typeof e&&(e="cxd");var t=Nb[e||"cxd"];if(t.getRendererConfig||(t.getRendererConfig=function(t){var n=Nb[e||"cxd"];return n.renderers&&t?n.renderers[t]:null}),!t.classnames){var n=t.classPrefix;t.classnames=t.classnames||Tb(n)}return t.getComponentConfig||(t.getComponentConfig=function(e){return t.components&&e?t.components[e]:null}),t}var Fb="cxd",jb=Qp.createContext("");function Rb(e,t){var n,r=(0,km.default)((n=function(t){function n(e){var n=t.call(this,e)||this;return n.childRef=n.childRef.bind(n),n.getWrappedInstance=n.getWrappedInstance.bind(n),n}return s(n,t),n.prototype.childRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.ref=e},n.prototype.getWrappedInstance=function(){return this.ref},n.prototype.render=function(){var t,n=this.props.theme||this.context||Fb,r=function(e){return!!Nb[e]}(n)?Pb(n):Pb(Fb),o={classPrefix:r.classPrefix,classnames:r.classnames,theme:n},i=(null===(t=e.prototype)||void 0===t?void 0:t.isReactComponent)||e.$$typeof===Symbol.for("react.forward_ref")?{ref:this.childRef}:{forwardedRef:this.childRef},a=Qp.createElement(e,p({},r.getComponentConfig(e.themeKey),this.props,o,i));return this.context?a:Qp.createElement(jb.Provider,{value:n},a)},n}(Qp.Component),n.displayName="Themeable(".concat(e.displayName||e.name,")"),n.contextType=jb,n.ComposedComponent=e,n),e);return Array.isArray(t)&&t.forEach(function(t){e.prototype[t]&&(r.prototype[t]=function(){var e,n=null===(e=this.ref)||void 0===e?void 0:e[t];return n?n.apply(this.ref,arguments):void 0})}),r}var Vb=function(e){function t(t){var n,r=this;return(r=e.call(this,t)||this).mounted=!1,r.handleVisibleChange=r.handleVisibleChange.bind(r),r.mounted=!0,r.state={visible:null!==(n=t.defaultVisible)&&void 0!==n&&n,component:t.component},r}return s(t,e),t.prototype.componentDidMount=function(){("undefined"!=typeof jest||this.state.visible)&&this.handleVisibleChange(!0)},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.handleVisibleChange=function(e,t){var n=this;this.setState({visible:e}),e&&!this.state.component&&this.props.getComponent&&this.props.getComponent().then(function(e){return n.mounted&&"function"==typeof e&&n.setState({component:e})}).catch(function(e){return n.mounted&&n.setState({component:function(){return Qp.createElement("div",{className:"alert alert-danger"},String(e))}})})},t.prototype.render=function(){var e=this.props,t=e.placeholder,n=e.unMountOnHidden,r=e.childProps,o=e.partialVisibility,a=e.children,s=e.className,u=i(e,["placeholder","unMountOnHidden","childProps","partialVisibility","children","className"]),l=this.props.classnames,c=this.state,d=c.visible,f=c.component;return n?Qp.createElement(_b,{onChange:this.handleVisibleChange,threshold:o?0:1},function(e){var n=e.ref;return Qp.createElement("div",{ref:n,className:"visibility-sensor ".concat(d?"in":"")},f&&d?Qp.createElement(f,p({},u,r)):a&&d?a:t)}):d?f?Qp.createElement(f,p({},u,r)):a||Qp.createElement("div",{className:l("LazyComponent",s)},t):Qp.createElement(_b,{onChange:this.handleVisibleChange,threshold:o?0:1},function(e){var n=e.ref;return Qp.createElement("div",{ref:n,className:"visibility-sensor"},t)})},t.defaultProps={placeholder:Qp.createElement("span",null,"Loading..."),unMountOnHidden:!1,partialVisibility:!0},t}(Qp.Component),Mb=Rb(Vb);Mb.defaultProps=Vb.defaultProps,S();var Lb={marginTop:"margin-top",marginRight:"margin-right",marginBottom:"margin-bottom",marginLeft:"margin-left",paddingTop:"padding-top",paddingRight:"padding-right",paddingBottom:"padding-bottom",paddingLeft:"padding-left","top-border-width":"border-top-width","right-border-width":"border-right-width","bottom-border-width":"border-bottom-width","left-border-width":"border-left-width","top-border-style":"border-top-style","right-border-style":"border-right-style","bottom-border-style":"border-bottom-style","left-border-style":"border-left-style","top-border-color":"border-top-color","right-border-color":"border-right-color","bottom-border-color":"border-bottom-color","left-border-color":"border-left-color",fontSize:"font-size",fontWeight:"font-weight",lineHeight:"line-height"},$b={background:"bg-color",radius:"border"};function zb(e){var t=e.style,n=e.classId,r=e.id,o=function(e){var t,n=e.classId,r=e.doc,o=e.before,i=e.id,a=(r=r||document).getElementById(n);if(!a){(a=r.createElement("style")).id=n,a.setAttribute("class",i||"");var s=null===(t=r.getElementsByClassName(o||""))||void 0===t?void 0:t[0];s?s.before(a):r.body.appendChild(a)}return a}({classId:"amis-"+n,doc:e.doc,before:e.before,id:r});o.innerHTML=t,t||o.remove()}function Bb(e,t,n){Object.keys(e).forEach(function(r){if("$$id"!==r)if((0,Oc.default)(e[r])){var o=r.split(","),i=t?o.map(function(e){return t.split(",").map(function(t){return"".concat(t," ").concat(e)}).join(",")}).join(","):r;Bb(e[r],i,n)}else""===t?(!n[r]&&(n[r]={}),n[r]=e[r]):(!n[t]&&(n[t]={}),n[t][r]=e[r])})}function Ub(e){var t,n,r=e.customStyle;e.doc;var o=e.data,i=e.customStyleClassPrefix,a=(null===(n=null===(t=e.id)||void 0===t?void 0:t.replace)||void 0===n?void 0:n.call(t,"u:",""))||e.id+"",s={};Bb(r,"",s);var u="",l="";if("number"==typeof(null==o?void 0:o.index)&&(l="-".concat(o.index)),!(0,Vl.default)(s)){var c=".wrapperCustomStyle-".concat(a).concat(l);i&&(c="".concat(i," ").concat(c)),Object.keys(s).forEach(function(e){if((0,Oc.default)(s[e]))if(e.startsWith("root")){var t=(0,Dm.default)(s[e],function(e,t){return"".concat(t,": ").concat(Qs(e.replace(/['|"]/g,""),o,"| raw")||e,";")});u+="\n".concat(e.replace(/root/g,c)," {\n ").concat(t.join("\n "),"\n}")}else{t=(0,Dm.default)(s[e],function(e,t){return"".concat(t,": ").concat(Qs(e.replace(/['|"]/g,""),o,"| raw")||e,";")});var n=e.split(",");u+="\n".concat(n.map(function(e){return"".concat(c," ").concat(e)})," {\n ").concat(t.join("\n "),"\n}")}else u+="\n".concat(c," {\n ").concat(e,": ").concat(Qs(s[e].replace(/['|"]/g,""),o,"| raw")||s[e],"\n}")})}return{content:u,index:l,id:a}}function qb(e,t,n,r){var o,i="amis-"+(e?e+"-":"")+((null===(o=t.replace)||void 0===o?void 0:o.call(t,"u:",""))||t+"");"number"==typeof(null==r?void 0:r.index)&&(i+="-".concat(r.index));var a=(n||document).getElementById(i);a&&a.remove()}function Wb(e){if(e){var t={inputControlClassName:{}},n=(null==e?void 0:e.inputControlClassName)||{};return Object.keys(n).forEach(function(e){~e.indexOf("font")&&(t.inputControlClassName[e]=n[e])}),t}}function Hb(e){var t=e.name,n=e.id,r=e.themeCss,o=e.extra,i=e.data;if(!n||!r)return"";var a="";function s(e,t){var n;return"wrapperCustomStyle"===e||r[e]?"".concat(e,"-").concat((null===(n=t.replace)||void 0===n?void 0:n.call(t,"u:",""))||t)+(o?"-".concat(o):"")+a:""}return"number"==typeof(null==i?void 0:i.index)&&(a="-".concat(i.index)),"string"==typeof t?s(t,n):t.map(function(e){return s(e,n)}).join(" ")}var Gb=/* @__PURE__ */new Map;function Kb(e){var t=e.config,n=e.env,r=e.data,o=t.themeCss,i=t.classNames,s=t.defaultData,u=t.wrapperCustomStyle,l=t.id?"".concat(t.id):t.id;return(0,Qp.useEffect)(function(){return Gb.has(l)?Gb.set(l,Gb.get(l)+1):l&&Gb.set(l,1),function(){Gb.has(l)&&(Gb.set(l,Gb.get(l)-1),0===Gb.get(l)&&Gb.delete(l))}},[l]),(0,Qp.useEffect)(function(){var e,t;return o&&l&&function(e){var t,n=e.themeCss,r=e.id,o=e.customStyleClassPrefix,i=e.doc,s=e.data;if(n){var u=function(e,t,n,r,o){var i,s;if(!e||!t)return{value:"",origin:[]};var u=[],l={default:"",hover:":hover",active:":hover:active",focused:"",disabled:""},c=function(t){var i=e[t.key];if(!i)return"continue";var a=t.key+"-"+(null==n?void 0:n.replace("u:","")),s=t.weights||{};"number"==typeof(null==o?void 0:o.index)&&(a+="-".concat(o.index));var c={default:{},hover:{},active:{},focused:{},disabled:{}};Object.keys(i).forEach(function(e){"$$id"!==e&&i[e]&&(~e.indexOf(":default")?c.default[e.replace(":default","")]=i[e]:~e.indexOf(":hover")?c.hover[e.replace(":hover","")]=i[e]:~e.indexOf(":active")?c.active[e.replace(":active","")]=i[e]:~e.indexOf(":focused")?c.focused[e.replace(":focused","")]=i[e]:~e.indexOf(":disabled")?c.disabled[e.replace(":disabled","")]=i[e]:c.default[e]=i[e])}),function(e,t){t&&["hover","active"].forEach(function(n){Object.keys(e[n]).forEach(function(r){if("object"==typeof e[n][r])Object.keys(e[n][r]).forEach(function(o){if("inherit"===e[n][r][o])if(e.default[r]&&e.default[r][o])e[n][r][o]=e.default[r][o];else{var i=$b[r]||r;e[n][r][o]=t.default.body[i][o]}});else if("inherit"===e[n][r])if(e.default[r]&&e.default[r])e[n][r]=e.default[r];else{var o=$b[r]||r;e[n][r]=t.default.body[o]}})})}(c,r),Object.keys(c).forEach(function(e){var t=s[e],n=[],r=function(e,r){e=Lb[e]||e,r=Qs(r,o,"| raw")||r,n.push("".concat(e.startsWith("--")?e:(0,Nm.default)(e),": ").concat(r+((null==t?void 0:t.important)?" !important":""),";"))};if(Object.keys(c[e]).forEach(function(t){if("$$id"!==t){var n=c[e][t];if("object"==typeof n)"radius"===t?r("border-radius",[n["top-left-border-radius"]||0,n["top-right-border-radius"]||0,n["bottom-right-border-radius"]||0,n["bottom-left-border-radius"]||0].join(" ")):Object.keys(n).forEach(function(e){if("$$id"!==e){var t=n[e];t&&r(e,t)}});else{var o=n;"iconSize"===t?(r("width",o),r("height",o),r("font-size",o)):o&&r(t,o)}}}),n.length>0){var i=((null==t?void 0:t.pre)||"")+a+((null==t?void 0:t.suf)||""),d=(null==t?void 0:t.inner)||"",p=(null==t?void 0:t.parent)||"";u.push({className:p+i+l[e]+d,content:"".concat(p," .").concat(i+l[e]," ").concat(d,"{\n ").concat(n.join("\n "),"\n}")})}})};try{for(var d=a(t),p=d.next();!p.done;p=d.next())c(p.value)}catch(f){i={error:f}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}return{value:u.map(function(e){return e.content}).join("\n"),origin:u}}(n,e.classNames,r,e.defaultData,s).value;u=o?"".concat(o," ").concat(u):u;var l=(null===(t=null==r?void 0:r.replace)||void 0===t?void 0:t.call(r,"u:",""))||r+"";"number"==typeof(null==s?void 0:s.index)&&(l+="-".concat(s.index)),zb({style:u,classId:l,doc:i,id:l.replace(/(-.*)/,""),before:l.replace(/(-.*)/,"")})}}({themeCss:o,classNames:i,id:l,defaultData:s,customStyleClassPrefix:null==n?void 0:n.customStyleClassPrefix,doc:null===(t=null===(e=null==n?void 0:n.getModalContainer)||void 0===e?void 0:e.call(n))||void 0===t?void 0:t.ownerDocument,data:r}),function(){var e,t;l&&!Gb.get(l)&&qb("",l,null===(t=null===(e=null==n?void 0:n.getModalContainer)||void 0===e?void 0:e.call(n))||void 0===t?void 0:t.ownerDocument,r)}},[o,l]),(0,Qp.useEffect)(function(){var e,t;return u&&l&&function(e){var t=e.doc,n=Ub(e),r=n.content,o=n.index,i=n.id;zb({style:r,classId:"wrapperCustomStyle-"+(i||ad())+o,doc:t,id:i.replace(/(-.*)/,"")})}({customStyle:u,id:l,customStyleClassPrefix:null==n?void 0:n.customStyleClassPrefix,doc:null===(t=null===(e=null==n?void 0:n.getModalContainer)||void 0===e?void 0:e.call(n))||void 0===t?void 0:t.ownerDocument,data:r}),function(){var e,t;l&&!Gb.get(l)&&qb("wrapperCustomStyle",l,null===(t=null===(e=null==n?void 0:n.getModalContainer)||void 0===e?void 0:e.call(n))||void 0===t?void 0:t.ownerDocument,r)}},[u,l]),null}var Yb=function(e){function t(t){var n=e.call(this,t)||this;n.hooks={},n.toDispose=[],n.shouldLoadInitApi=!1,n.lazyEmitChange=(0,Am.default)(n.emitChange.bind(n),250,{trailing:!0,leading:!1}),n.lazyJumpToErrorComponent=(0,Am.default)(n.jumpToErrorComponent.bind(n),250,{trailing:!1,leading:!0}),n.formRef=Qp.createRef(),n.flushing=!1,n.emittedData=null,n.emitting=!1,n.onInit=n.onInit.bind(n),n.handleAction=n.handleAction.bind(n),n.handleQuery=n.handleQuery.bind(n),n.handleChange=n.handleChange.bind(n),n.handleDialogConfirm=n.handleDialogConfirm.bind(n),n.handleDialogClose=n.handleDialogClose.bind(n),n.handleDrawerConfirm=n.handleDrawerConfirm.bind(n),n.handleDrawerClose=n.handleDrawerClose.bind(n),n.handleFormSubmit=n.handleFormSubmit.bind(n),n.validate=n.validate.bind(n),n.submit=n.submit.bind(n),n.addHook=n.addHook.bind(n),n.removeHook=n.removeHook.bind(n),n.emitChange=n.emitChange.bind(n),n.handleBulkChange=n.handleBulkChange.bind(n),n.renderFormItems=n.renderFormItems.bind(n),n.reload=n.reload.bind(n),n.silentReload=n.silentReload.bind(n),n.initInterval=n.initInterval.bind(n),n.dispatchInited=n.dispatchInited.bind(n),n.blockRouting=n.blockRouting.bind(n),n.beforePageUnload=n.beforePageUnload.bind(n),n.dispatchEvent=n.dispatchEvent.bind(n),n.flush=n.flush.bind(n);var r=t.store,o=t.canAccessSuperData,i=t.persistData,a=t.simpleMode,s=t.formLazyChange;if(r.setCanAccessSuperData(!1!==o),r.setPersistData(i),a&&r.setInited(!0),r&&r.parentStore&&"ComboStore"===r.parentStore.storeType){var u=r.parentStore;u.addForm(r),u.forms.forEach(function(e){return e.items.forEach(function(t){return t.unique&&t.syncOptions(void 0,e.data)})})}return n.toDispose.push(Mn(function(){return r.initedAt},function(){r.inited&&(!1===s?n.emitChange:n.lazyEmitChange)(!!n.props.submitOnChange,!0)})),n}return s(t,e),t.prototype.componentDidMount=function(){var e,t,n=this,r=this.props,i=r.initApi,a=r.initFetch,s=r.initFetchOn,l=r.initAsyncApi,c=r.initFinishedField,d=r.initCheckInterval,p=r.store,f=r.messages,h=f.fetchSuccess,v=f.fetchFailed,m=r.onValidate,y=r.onValidChange,g=r.promptPageLeave,b=r.env,w=this.getNormalizedRules();if(this.mounted=!0,m){var x=Qc(m);this.toDispose.push(this.addHook(function(){return u(n,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:return[4,x(p.data,p)];case 1:return(e=t.sent())&&Gu(e)&&(Object.keys(e).forEach(function(t){var n=e[t],r=p.getItemsByPath(t);Array.isArray(r)&&r.length&&(r.forEach(function(e){return e.clearError()}),n&&(n=Array.isArray(n)?n:[n],r.forEach(function(e){return e.addError(n)})),delete e[t])}),id(e)?p.clearRestError():p.setRestError(Object.keys(e).map(function(t){return e[t]}))),[2]}})})}))}y&&this.toDispose.push(Mn(function(){return p.valid},function(e){return y(e,n.props)})),w.length&&this.toDispose.push(this.addHook(function(){p.valid&&w.forEach(function(e){return!lc(e.rule,p.data)&&p.addRestError(e.message,e.name)})})),Lh(i,p.data,a,s)?p.fetchInitData(i,p.data,{successMessage:h,errorMessage:v,onSuccess:function(e,t){if(p.setValues(t,void 0,void 0,void 0,{type:"api"}),Lh(l,p.data)&&!p.data[c||"finished"])return od(function(){return p.checkRemote(l,p.data)},function(e){return e&&e[c||"finished"]},function(e){return n.asyncCancel=e},d)}}).then(this.initInterval).then(function(){return n.props.dispatchEvent("initApiFinished",qu(p.data,{__trigger:"init"}))}).then(this.onInit):setTimeout(this.onInit.bind(this),4),g&&(window.addEventListener("beforeunload",this.beforePageUnload),this.unBlockRouting=null!==(t=null===(e=b.blockRouting)||void 0===e?void 0:e.call(b,this.blockRouting))&&void 0!==t?t:void 0)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.store;if(Vh(e.initApi,t.initApi,e.data,t.data)){var r=t.fetchSuccess,o=t.fetchFailed;n[n.hasRemoteData?"fetchData":"fetchInitData"](t.initApi,n.data,{successMessage:r,errorMessage:o}).then(this.initInterval).then(this.dispatchInited)}},t.prototype.componentWillUnmount=function(){var e;this.mounted=!1,clearTimeout(this.timer),this.lazyEmitChange.cancel(),this.lazyJumpToErrorComponent.cancel(),this.asyncCancel&&this.asyncCancel(),this.toDispose.forEach(function(e){return e()}),this.toDispose=[],window.removeEventListener("beforeunload",this.beforePageUnload),null===(e=this.unBlockRouting)||void 0===e||e.call(this)},t.prototype.getNormalizedRules=function(){var e=this.props,t=e.rules,n=e.translate;return!Array.isArray(t)||t.length<1?[]:t.map(function(e){return p(p({},e),e.message&&"string"==typeof e.message?{}:{message:n("Form.rules.message")})}).filter(function(e){return e.rule&&"string"==typeof e.rule})},t.prototype.dispatchInited=function(e){var t;return u(this,void 0,void 0,function(){var n,r,i,a;return o(this,function(o){switch(o.label){case 0:return n=this.props,r=n.data,i=n.store,a=n.dispatchEvent,!fo(i)||i.fetching?[2,e]:[4,a("inited",zu(r,p(p({},null==e?void 0:e.data),{responseData:null!==(t=null==e?void 0:e.data)&&void 0!==t?t:{},responseStatus:i.error?1:0,responseMsg:i.msg})))];case 1:return[2,o.sent()]}})})},t.prototype.blockRouting=function(){var e=this.props.store,t=this.props,n=t.promptPageLeaveMessage;if(t.promptPageLeave&&e.modified)return n||"新的修改没有保存,确认要离开?"},t.prototype.beforePageUnload=function(e){this.blockRouting()&&(e.preventDefault(),e.returnValue="")},t.prototype.onInit=function(){return u(this,void 0,void 0,function(){var e,t,n,r,i,a,s,u,l,c,d=this;return o(this,function(o){switch(o.label){case 0:return e=this.props,t=e.onInit,n=e.store,r=e.persistData,i=e.submitOnInit,e.dispatchEvent,fo(n)?(a=Wu(n.data),s=n.initedAt,n.setInited(!0),[4,new Promise(function(e){return d.forceUpdate(e)})]):[2];case 1:return o.sent(),u=this.hooks.init||[],l=(0,cl.default)(u,function(e){return"prev"===e.__enforce?"prev":"post"===e.__enforce?"post":"normal"}),[4,Promise.all((l.prev||[]).map(function(e){return e(a)}))];case 2:return o.sent(),[4,Promise.all((l.normal||[]).map(function(e){return u.includes(e)&&e(a)}))];case 3:return o.sent(),[4,Promise.all((l.post||[]).map(function(e){return u.includes(e)&&e(a)}))];case 4:return o.sent(),fo(n)?(n.initedAt!==s&&(a=p(p({},a),n.data)),r&&(n.getLocalPersistData(),a=Wu(n.data)),t&&t(a,this.props),[4,this.dispatchInited({data:a})]):[2];case 5:return(null==(c=o.sent())?void 0:c.prevented)||i&&this.handleAction(void 0,{type:"submit"},n.data),[2]}})})},t.prototype.reload=function(e,t,n,r){return u(this,void 0,void 0,function(){var e,n,i,a,s,u,l,c,d,p,f=this;return o(this,function(o){switch(o.label){case 0:return t?[2,this.receive(t)]:(e=this.props,n=e.store,i=e.initApi,a=e.initAsyncApi,s=e.initFinishedField,u=e.messages,l=u.fetchSuccess,c=u.fetchFailed,Lh(a,n.data)&&n.updateData(((p={})[s||"finished"]=!1,p)),d=void 0,Lh(i,n.data)?[4,n.fetchInitData(i,n.data,{successMessage:l,errorMessage:c,silent:r,onSuccess:function(e,t){if(n.setValues(t),Lh(a,n.data)&&!n.data[s||"finished"])return od(function(){return n.checkRemote(a,n.data)},function(e){return e&&e[s||"finished"]},function(e){return f.asyncCancel=e})}})]:[3,4]);case 1:return(null==(d=o.sent())?void 0:d.ok)?(this.initInterval(d),n.reset(void 0,!1),[4,this.props.dispatchEvent("initApiFinished",qu(n.data,{__trigger:"reload"}))]):[3,3];case 2:o.sent(),o.label=3;case 3:return[3,5];case 4:n.reset(void 0,!1),o.label=5;case 5:return this.dispatchInited(d),[2,n.data]}})})},t.prototype.receive=function(e,t,n){return this.props.store.updateData(e,void 0,n),this.reload()},t.prototype.silentReload=function(e,t){return this.reload(e,t,void 0,!0)},t.prototype.initInterval=function(e){var t=this.props,n=t.interval,r=t.silentPolling,o=t.stopAutoRefreshWhen,i=t.data;return clearTimeout(this.timer),null!=e&&e.ok&&n&&this.mounted&&(!o||!lc(o,i))&&(this.timer=setTimeout(r?this.silentReload:this.reload,Math.max(n,1e3))),e},t.prototype.isValidated=function(){return this.props.store.validated},t.prototype.validate=function(e,t,n,r){return void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!1),u(this,void 0,void 0,function(){var i,a,s,u,l,c,d;return o(this,function(o){switch(o.label){case 0:return i=this.props,a=i.store,s=i.dispatchEvent,u=i.data,l=i.messages,c=i.translate,r?[3,2]:[4,this.flush()];case 1:o.sent(),o.label=2;case 2:return[4,a.validate(this.hooks.validate||[],e,t,!1===n?"":"string"==typeof(null==l?void 0:l.validateFailed)?c(ic(l.validateFailed,a.data)):void 0)];case 3:return d=o.sent(),s(d?"validateSucc":"validateError",u),[2,d]}})})},t.prototype.setErrors=function(e,t){void 0===t&&(t="remote"),this.props.store.setFormItemErrors(e,t)},t.prototype.clearErrors=function(){return this.props.store.clearErrors()},t.prototype.getValues=function(){var e=this.props.store;return this.flush(),e.data},t.prototype.setValues=function(e,t){var n=this.props.store;this.flush(),n.setValues(e,void 0,t,void 0,{type:"action"})},t.prototype.submit=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!1),u(this,void 0,void 0,function(){var r,i,a,s,u,l,c;return o(this,function(o){switch(o.label){case 0:return r=this.props,i=r.store,a=r.messages,s=r.translate,u=r.dispatchEvent,l=r.data,n?[3,2]:[4,this.flush()];case 1:o.sent(),o.label=2;case 2:return c=function(){return u("validateError",l)},[2,i.submit(e,this.hooks.validate||[],"string"==typeof(null==a?void 0:a.validateFailed)?s(ic(a.validateFailed,i.data)):void 0,c,t)]}})})},t.prototype.flush=function(){return u(this,void 0,void 0,function(){var e,t,n,r,i,s;return o(this,function(o){switch(o.label){case 0:if(o.trys.push([0,,11,12]),this.flushing)return[2];this.flushing=!0,e=this.hooks.flush||[],o.label=1;case 1:o.trys.push([1,6,7,8]),t=a(e),n=t.next(),o.label=2;case 2:return n.done?[3,5]:[4,(0,n.value)()];case 3:o.sent(),o.label=4;case 4:return n=t.next(),[3,2];case 5:return[3,8];case 6:return r=o.sent(),i={error:r},[3,8];case 7:try{n&&!n.done&&(s=t.return)&&s.call(t)}finally{if(i)throw i.error}return[7];case 8:return this.emitting?[3,10]:[4,this.lazyEmitChange.flush()];case 9:o.sent(),o.label=10;case 10:return[3,12];case 11:return this.flushing=!1,[7];case 12:return[2]}})})},t.prototype.reset=function(){var e=this.props,t=e.store,n=e.onReset;t.reset(n)},t.prototype.addHook=function(e,t,n){var r=this;void 0===t&&(t="validate"),this.hooks[t]=this.hooks[t]||[];var o="flush"===t?e:Qc(e);return o.__enforce=n,this.hooks[t].push(o),function(){r.removeHook(e,t),e=Lc}},t.prototype.removeHook=function(e,t){void 0===t&&(t="validate");var n=this.hooks[t];if(n)for(var r=0,o=n.length;r<o;r++){var i=n[r];i!==e&&i.raw!==e||(n.splice(r,1),o--,r--)}},t.prototype.handleChange=function(e,t,n,r,o){void 0===r&&(r=!1);var i=this.props,a=i.store,s=i.formLazyChange,u=i.persistDataKeys;"string"==typeof t&&(a.changeValue(t,e,r,void 0,void 0,o||{type:"input"}),r&&void 0===e||(!1===s?this.emitChange:this.lazyEmitChange)(n),a.persistData&&a.inited&&a.setLocalPersistData(u))},t.prototype.jumpToErrorComponent=function(e){var t,n;"function"==typeof(null==e?void 0:e.focus)?e.focus():null===(n=null===(t=this.formRef.current)||void 0===t?void 0:t.querySelector(".".concat(this.props.classPrefix,"Form-feedback")))||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},t.prototype.dispatchEvent=function(e,t,n,r){return"formItemValidateSucc"!==e&&"formItemValidateError"!==e||"form"===(null==n?void 0:n.props.type)||("formItemValidateError"===e&&this.lazyJumpToErrorComponent(n),n=void 0,r=void 0),this.props.dispatchEvent(e,t,n,r)},t.prototype.emitChange=function(e,t){return void 0===t&&(t=!1),u(this,void 0,void 0,function(){var n,r,i,a,s,u,l,c,d,p;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,,4,5]),this.emitting=!0,n=this.props,r=n.onChange,i=n.store,a=n.submitOnChange,s=n.dispatchEvent,u=n.data,l=n.originData,fo(i)?(c=td(i.data,null!=l?l:i.upStreamData),!t||Object.keys(c).length&&!(0,Ml.default)(i.data,this.emittedData)?(this.emittedData=i.data,d=[i.data,c,this.props],[4,s("change",zu(u,i.data))]):[2]):[2];case 1:return(null==(p=o.sent())?void 0:p.prevented)||r&&r.apply(null,d),fo(i)&&i.clearRestError(),t||!(e||a&&i.inited)?[3,3]:[4,this.handleAction(void 0,{type:"submit",skipFormFlush:!0},i.data)];case 2:o.sent(),o.label=3;case 3:return[3,5];case 4:return this.emitting=!1,[7];case 5:return[2]}})})},t.prototype.handleBulkChange=function(e,t,n){var r=this.props;r.onChange;var o=r.store,i=r.formLazyChange;o.setValues(e,void 0,void 0,void 0,n||{type:"input"}),(!1===i?this.emitChange:this.lazyEmitChange)(t)},t.prototype.handleFormSubmit=function(e){var t=this.props,n=t.preventEnterSubmit,r=t.onActionSensor,o=t.close;if(e.preventDefault(),n)return!1;var i=this.handleAction(e,{type:"submit",close:o},this.props.store.data);return null==r||r(i),i},t.prototype.handleReset=function(e){var t=this.props.onReset;return function(n){t&&t(n,e)}},t.prototype.handleAction=function(e,t,n,r,i){var a,s;return void 0===r&&(r=!1),u(this,void 0,void 0,function(){var l,c,d,p,f,h,v,m,y,g,b,w,x,E,O,S,A,C,_,D,N,k,I,T,P,F,j,R,V,M,L,$,z,B,U=this;return o(this,function(q){switch(q.label){case 0:return l=this.props,c=l.store,d=l.onSubmit,p=l.api,f=l.asyncApi,h=l.finishedField,v=l.checkInterval,m=l.messages,y=m.saveSuccess,g=m.saveFailed,b=l.resetAfterSubmit,w=l.clearAfterSubmit,x=l.onAction,E=l.onSaved,O=l.onReset,S=l.onFinished,A=l.onFailed,C=l.redirect,_=l.reload,D=l.target,N=l.env,k=l.onChange,I=l.clearPersistDataAfterSubmit,T=l.trimValues,P=l.dispatchEvent,F=l.translate,t.skipFormFlush?[3,2]:[4,this.flush()];case 1:q.sent(),q.label=2;case 2:return fo(c)?(T&&c.trimValues(),n===this.props.data&&(n=c.data),Array.isArray(t.required)&&t.required.length?(c.clearErrors(),j=t.required.map(function(e){return{name:e,rules:{isRequired:!0}}}),[4,c.validateFields(j)]):[3,6]):[2];case 3:return q.sent()?[3,5]:[4,P("validateError",this.props.data)];case 4:return(null==($=q.sent())?void 0:$.prevented)||N.notify("error",F("Form.validateFailed")),[2,Promise.reject(F("Form.validateFailed"))];case 5:c.clearErrors(),q.label=6;case 6:return"submit"!==t.type&&"submit"!==t.actionType&&"confirm"!==t.actionType&&"reset-and-submit"!==t.actionType&&"clear-and-submit"!==t.actionType?[3,8]:(R=this.props,V=R.dispatchEvent,M=R.onEvent,L=null===(s=null===(a=null==M?void 0:M.submit)||void 0===a?void 0:a.actions)||void 0===s?void 0:s.length,[4,V("submit",this.props.data)]);case 7:return(null==($=q.sent())?void 0:$.prevented)||L?[2]:(c.setCurrentAction(t,this.props.resolveDefinitions),"reset-and-submit"===t.actionType?c.reset(this.handleReset(t)):"clear-and-submit"===t.actionType&&c.clear(this.handleReset(t)),[2,this.submit(function(e){return u(U,void 0,void 0,function(){var r,a,s=this;return o(this,function(l){switch(l.label){case 0:return d?[4,d(e,t)]:[3,2];case 1:if(!1===l.sent())return[2,Promise.resolve(!1)];l.label=2;case 2:if(V("validateSucc",zu(this.props.data,e)),D)this.submitToTarget(Bg(D,e),e),I&&c.clearLocalPersistData(),V("submitSucc",zu(this.props.data,e));else if("reload"===t.actionType)t.target&&this.reloadTarget(Bg(t.target,e),e);else{if("dialog"===t.actionType)return[2,new Promise(function(e){c.openDialog(n,void 0,function(n,r){var o;null===(o=t.callback)||void 0===o||o.call(t,n,r),e({confirmed:n,value:r})},i||s.context)})];if("drawer"===t.actionType)return[2,new Promise(function(e){c.openDrawer(n,void 0,function(n,r){var o;null===(o=t.callback)||void 0===o||o.call(t,n,r),e({confirmed:n,value:r})})})];if(Lh(t.api||p,e))return Lh(r=t.asyncApi||f,c.data)&&c.updateData(((a={})[h||"finished"]=!1,a)),[2,c.saveRemote(t.api||p,e,{successMessage:"string"==typeof y?ic(y,c.data):void 0,errorMessage:"string"==typeof g?ic(g,c.data):void 0,onSuccess:function(e){return u(s,void 0,void 0,function(){var t,n=this;return o(this,function(o){switch(o.label){case 0:return I&&c.clearLocalPersistData(),[4,V("submitSucc",zu(this.props.data,{result:e}))];case 1:return t=o.sent(),!Lh(r,c.data)||c.data[h||"finished"]?[2,{cbResult:null,dispatcher:t}]:[2,{cbResult:od(function(){return c.checkRemote(r,c.data)},function(e){return e&&e[h||"finished"]},function(e){return n.asyncCancel=e},v).then(function(e){V("asyncApiFinished",c.data)}),dispatcher:t}]}})})},onFailed:function(e){return u(s,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,V("submitFail",zu(this.props.data,{error:e}))];case 1:return[2,{dispatcher:t.sent()}]}})})}}).then(function(n){return u(s,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:return E&&E(e,n),(r=t.feedback||this.props.feedback)&&Gc(r,c.data)?[4,this.openFeedback(r,c.data)]:[3,2];case 1:if(i=o.sent(),r.skipRestOnCancel&&!i)throw new Ld;if(r.skipRestOnConfirm&&i)throw new Ld;o.label=2;case 2:return[2,qu(c.data,{__payload:e,__response:n})]}})})})];if(function(e,t){return!!(Gu(e)&&e.url&&e.sendOn&&t)&&!lc(e.sendOn,t)}(t.api||p,e))return[2];I&&c.clearLocalPersistData(),V("submitSucc",zu(this.props.data,e))}return[2,Promise.resolve(null)]}})})},r,!0).then(function(e){if(!1===e)return c.data;if(S&&!1===S(e,t,c))return e;if(b&&c.reset(U.handleReset(t)),w&&c.clear(U.handleReset(t)),I&&c.clearLocalPersistData(),t.redirect||C){var n=ic(t.redirect||C,c.data);n&&N.jumpTo(n,t,c.data)}else(t.reload||_)&&U.reloadTarget(Bg(t.reload||_,c.data),c.data);return t.close&&U.closeTarget(t.close),e}).catch(function(e){if(A&&A(e,c.errors),r)throw e})]);case 8:if("reset"===t.type||"reset"===t.actionType)c.setCurrentAction(t,this.props.resolveDefinitions),c.reset(O);else if("clear"===t.actionType)c.setCurrentAction(t,this.props.resolveDefinitions),c.clear(O);else{if("validate"===t.actionType)return c.setCurrentAction(t,this.props.resolveDefinitions),[2,this.validate(!0,r,!0,!0)];if("dialog"===t.actionType)return c.setCurrentAction(t,this.props.resolveDefinitions),[2,new Promise(function(e){c.openDialog(n,void 0,function(n,r){var o;null===(o=t.callback)||void 0===o||o.call(t,n,r),e({confirmed:n,value:r})},i||U.context)})];if("drawer"===t.actionType)return c.setCurrentAction(t,this.props.resolveDefinitions),[2,new Promise(function(e){c.openDrawer(n,void 0,function(n,r){var o;null===(o=t.callback)||void 0===o||o.call(t,n,r),e({confirmed:n,value:r})})})];if("ajax"===t.actionType)return c.setCurrentAction(t,this.props.resolveDefinitions),Lh(t.api)?(z=t.messages&&t.messages.success||y,B=t.messages&&t.messages.failed||g,[2,c.saveRemote(t.api,n,{successMessage:F("string"==typeof z?ic(z,c.data):void 0),errorMessage:F("string"==typeof B?ic(B,c.data):void 0)}).then(function(e){return u(U,void 0,void 0,function(){var n;return o(this,function(r){switch(r.label){case 0:return e&&k&&k(c.data,td(c.data,c.pristine),this.props),c.validated?[4,this.validate(!0)]:[3,2];case 1:r.sent(),r.label=2;case 2:return t.feedback&&Gc(t.feedback,c.data)?[4,this.openFeedback(t.feedback,c.data)]:[3,4];case 3:r.sent(),r.label=4;case 4:return(n=t.redirect&&ic(t.redirect,c.data))&&N.jumpTo(n,t,c.data),t.reload&&this.reloadTarget(Bg(t.reload,c.data),c.data),t.close&&this.closeTarget(t.close),[2]}})})}).catch(function(e){if(A&&A(e,c.errors),r||t.countDown)throw e})]):[2,N.alert(F("当 actionType 为 ajax 时,请设置 api 属性"))];if("reload"===t.actionType)c.setCurrentAction(t,this.props.resolveDefinitions),t.target?this.reloadTarget(Bg(t.target,n),n):this.receive(n);else if(x)return[2,x(e,t,n,r,i||this.context)]}q.label=9;case 9:return[2]}})})},t.prototype.handleQuery=function(e){return this.props.initApi?!((null==e?void 0:e.hasOwnProperty("orderBy"))&&!Vh(this.props.initApi,this.props.initApi,this.props.store.data,zu(this.props.store.data,e)))&&void this.receive(e):!!this.props.onQuery&&this.props.onQuery(e)},t.prototype.handleDialogConfirm=function(e,t,n,r){var o=this.props,i=o.store;o.onChange,(t.mergeData||i.action.mergeData)&&1===e.length&&e[0]&&"form"===r[0].props.type&&this.handleBulkChange(e[0],!1),i.closeDialog(!0,e)},t.prototype.handleDialogClose=function(e){void 0===e&&(e=!1),this.props.store.closeDialog(e)},t.prototype.handleDrawerConfirm=function(e,t,n,r){var o=this.props,i=o.store,a=o.onChange;(t.mergeData||i.action.mergeData)&&1===e.length&&e[0]&&"form"===r[0].props.type&&(i.updateData(e[0]),a&&a(i.data,td(i.data,i.pristine),this.props)),i.closeDrawer(!0,e)},t.prototype.handleDrawerClose=function(){this.props.store.closeDrawer(!1)},t.prototype.submitToTarget=function(e,t){},t.prototype.reloadTarget=function(e,t){},t.prototype.closeTarget=function(e){},t.prototype.openFeedback=function(e,t){var n=this;return new Promise(function(r){var o=n.props.store;o.setCurrentAction({type:"button",actionType:"dialog",dialog:e},n.props.resolveDefinitions),o.openDialog(t,void 0,function(e){r(e)},n.context)})},t.prototype.buildActions=function(){var e=this.props,t=e.actions,n=e.submitText,r=e.body,o=e.translate,i=e.loadingConfig;return!1===e.wrapWithPanel||void 0!==t||!n||Array.isArray(r)&&r.some(function(e){var t,n,r;return e&&!!~["submit","button","button-group","reset"].indexOf((null===(n=null===(t=null==e?void 0:e.body)||void 0===t?void 0:t[0])||void 0===n?void 0:n.type)||(null===(r=null==e?void 0:e.body)||void 0===r?void 0:r.type)||e.type)})?t:[{type:"submit",label:o(n),primary:!0,loadingConfig:i}]},t.prototype.renderFormItems=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n={});var r=Array.isArray(e.body)?e.body:e.body?[e.body]:[];return!r.length&&e.controls&&(console.warn("请用 body 代替 controls"),r=[{size:"none",type:"wrapper",wrap:!1,controls:e.controls}]),this.renderChildren(r,t,n)},t.prototype.renderChildren=function(e,t,n){var r=this;void 0===n&&(n={}),e=e||[];var o=this.props.classnames;if(Array.isArray(e)||(e=[e]),"row"===this.props.mode)return this.props.classPrefix,(e=(0,cy.default)(e).filter(function(e){if(e.hidden||!1===e.visible)return!1;var t=Jg(e,r.props.store.data,void 0,r.props);return!t.hidden&&!1!==t.visible})).length?Qp.createElement("div",{className:o("Form-row")},e.map(function(e,t){var i,a=null===(i=e.colSize)||void 0===i?void 0:i.split("/"),s=(null==a?void 0:a[0])&&(null==a?void 0:a[1])?a[0]/a[1]*100+"%":e.colSize;return~["hidden","formula"].indexOf(e.type)||"inline"===e.mode?r.renderChild(e,t,n):Qp.createElement("div",{key:t,className:o("Form-col",e.columnClassName),style:{flex:s&&!["1","auto"].includes(s)?"0 0 ".concat(s):"1"}},r.renderChild(e,"",p(p({},n),{mode:"row"})))})):null;if("flex"===this.props.mode){var i=[];return e.forEach(function(e){"number"==typeof e.row?i[e.row]?i[e.row].push(e):i[e.row]=[e]:i.push([e])}),Qp.createElement(Qp.Fragment,null,i.map(function(e,t){return Qp.createElement("div",{className:o("Form-flex"),role:"flex-row",key:t},e.map(function(e,t){var i,a=null===(i=e.colSize)||void 0===i?void 0:i.split("/"),s=(null==a?void 0:a[0])&&(null==a?void 0:a[1])?a[0]/a[1]*100+"%":e.colSize;return~["hidden","formula"].indexOf(e.type)?r.renderChild(e,t,n):Qp.createElement("div",{key:e.id||t,className:o("Form-flex-col",e.columnClassName),style:{flex:s&&!["1","auto"].includes(s)?"0 0 ".concat(s):""},role:"flex-col"},r.renderChild(e,"",p(p({},n),{mode:"flex"})))}))}))}return e.map(function(e,o){return r.renderChild(e,o,n,t)})},t.prototype.renderChild=function(e,t,n,r){if(void 0===t&&(t=""),void 0===n&&(n={}),void 0===r&&(r=""),!e)return null;"string"==typeof e&&(e={type:"tpl",tpl:e});var o=p(p({},this.props),n),i=this.props.store,a=o.render,s=o.mode,u=o.horizontal,l=o.store,c=o.disabled,d=o.controlWidth,f=o.resolveDefinitions,h=o.lazyChange;o.formLazyChange,o.dispatchEvent;var v=o.labelAlign,m=o.labelWidth,y=o.labelOverflow;o.static,o.canAccessSuperData;var g={formStore:i,data:l.data,key:"".concat(e.name||"","-").concat(e.type,"-").concat(t),formInited:i.inited,formSubmited:i.submited,formMode:s,formHorizontal:u,formLabelAlign:v&&["left","right","top"].includes(v)?v:"right",formLabelWidth:m,formLabelOverflow:y,controlWidth:d,disabled:c||e.disabled||!!i.loading||void 0,btnDisabled:c||i.loading||i.validating,onAction:this.handleAction,onQuery:this.handleQuery,onChange:this.handleChange,onBulkChange:this.handleBulkChange,addHook:this.addHook,removeHook:this.removeHook,renderFormItems:this.renderFormItems,dispatchEvent:this.dispatchEvent,formPristine:i.pristine,onFlushForm:this.flush},b=p({},e);return b.$ref&&(b=p(p({},f(b.$ref)),b)),!1===h&&(b.changeImmediately=!0),a("".concat(r?"".concat(r,"/"):"").concat(t),b,g)},t.prototype.renderBody=function(){var e=this.props,t=e.body,n=e.mode,r=e.className,o=e.classnames,i=e.debug,a=e.debugConfig,s=e.$path,u=e.store,l=e.columnCount,c=e.render,d=e.staticClassName,f=e.static,h=void 0!==f&&f,v=e.loadingConfig,m=e.themeCss,y=e.id,g=e.wrapperCustomStyle,b=e.env,w=e.wrapWithPanel;e.testid;var x=u.restError,E=this.props.wrapperComponent||(/(?:\/|^)form\//.test(s)?"div":"form"),O=function(e,t){for(var n=[],r=0;e--;)n.push(t(r++));return n}(l&&Array.isArray(t)?(l-t.length%l)%l:0,function(e){return Qp.createElement("div",{className:o("Form-item Form-item--".concat(n," is-placeholder")),key:e})});return Qp.createElement(E,{ref:this.formRef,className:o("Form","Form--".concat(n||"normal"),l?"Form--column Form--column-".concat(l):null,d&&h?d:r,h?"Form--isStatic":null,Hb(p(p({},this.props),{name:["formControlClassName","itemClassName","staticClassName","itemLabelClassName"],id:y,themeCss:m})),!w&&Hb(p(p({},this.props),{name:"wrapperCustomStyle",id:y,themeCss:g}))),onSubmit:this.handleFormSubmit,noValidate:!0},Qp.createElement("input",{type:"submit",style:{display:"none"}}),i?c("form-debug-json",p({type:"json",value:u.data,ellipsisThreshold:120,className:o("Form--debug")},a)):null,c("spinner",{type:"spinner"},{overlay:!0,show:u.loading,loadingConfig:v}),this.renderFormItems({body:t}),O,x&&x.length?Qp.createElement("ul",{className:o("Form-restError","Form-feedback")},x.map(function(e,t){return Qp.createElement("li",{key:t},e)})):null,c("modal",p(p({},u.dialogSchema),{type:"dialog"}),{key:"dialog",data:u.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:u.dialogOpen}),c("modal",p(p({},u.drawerSchema),{type:"drawer"}),{key:"drawer",data:u.drawerData,onConfirm:this.handleDrawerConfirm,onClose:this.handleDrawerClose,show:u.drawerOpen}),Qp.createElement(Kb,p({},this.props,{config:{themeCss:m,classNames:[w&&{key:"panelClassName"},!w&&{key:"formControlClassName"},{key:"headerControlClassName",weights:{default:{parent:".".concat(o("Panel"))}}},w&&{key:"headerTitleControlClassName",weights:{default:{important:!0}}},w&&{key:"bodyControlClassName"},w&&{key:"actionsControlClassName",weights:{default:{parent:".".concat(o("Panel--form"))}}},{key:"itemClassName",weights:{default:{inner:".".concat(o("Form-item"))}}},{key:"staticClassName",weights:{default:{inner:".".concat(o("Form-static"))}}},{key:"itemLabelClassName",weights:{default:{inner:".".concat(o("Form-label"))}}}].filter(function(e){return e}),wrapperCustomStyle:g,id:y},env:b})))},t.prototype.render=function(){var e=this.props;e.$path,e.$schema;var t=e.wrapWithPanel,n=e.render,r=e.title,o=e.store,i=e.panelClassName,a=e.headerClassName,s=e.footerClassName,u=e.footerWrapClassName,l=e.actionsClassName,c=e.bodyClassName,d=e.classnames,f=e.style,h=e.affixFooter,v=e.lazyLoad,m=e.translate,y=e.footer,g=e.id,b=e.wrapperCustomStyle,w=e.themeCss,x=this.renderBody();return t&&(x=n("body",{type:"panel",title:m(r)},{className:d(i,"Panel--form",Hb(p(p({},this.props),{name:"wrapperCustomStyle",id:g,themeCss:b})),Hb(p(p({},this.props),{name:"panelClassName",id:g,themeCss:w}))),style:f,formStore:this.props.store,children:x,actions:this.buildActions(),onAction:this.handleAction,onQuery:this.handleQuery,disabled:o.loading,btnDisabled:o.loading||o.validating,headerClassName:a,headerControlClassName:Hb(p(p({},this.props),{name:"headerControlClassName",id:g,themeCss:w})),headerTitleControlClassName:Hb(p(p({},this.props),{name:"headerTitleControlClassName",id:g,themeCss:w})),footer:y,footerClassName:s,footerWrapClassName:u,actionsClassName:l,actionsControlClassName:Hb(p(p({},this.props),{name:"actionsControlClassName",id:g,themeCss:w})),bodyClassName:c,bodyControlClassName:Hb(p(p({},this.props),{name:"bodyControlClassName",id:g,themeCss:w})),affixFooter:h})),v&&(x=Qp.createElement(Mb,null,x)),x},t.defaultProps={title:"Form.title",submitText:"Form.submit",initFetch:!0,wrapWithPanel:!0,mode:"normal",collapsable:!1,controlWidth:"full",horizontal:{left:2,right:10,offset:2},columnCount:0,panelClassName:"Panel--default",messages:{fetchFailed:"fetchFailed",saveSuccess:"saveSuccess",saveFailed:"saveFailed"},wrapperComponent:"",finishedField:"finished",initFinishedField:"finished",labelAlign:"right"},t.propsList=["title","header","controls","tabs","fieldSet","submitText","initFetch","wrapWithPanel","mode","columnCount","collapsable","horizontal","panelClassName","messages","wrapperComponent","resetAfterSubmit","clearAfterSubmit","submitOnInit","submitOnChange","onInit","onReset","onSubmit","onChange","onFailed","onFinished","onValidate","onValidChange","onSaved","canAccessSuperData","lazyChange","formLazyChange","lazyLoad","formInited","simpleMode","inputOnly","value","actions","multiple"],t}(Qp.Component),Jb=function(e){function t(t,n){var r=e.call(this,t)||this;return n.registerComponent(r),r}return s(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.props.autoFocus&&this.focus()},t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),e.prototype.componentWillUnmount.call(this)},t.prototype.focus=function(){var e=(0,bp.default)(this.context.getComponents(),function(e){return e.focus});e&&setTimeout(function(){return e.focus()},200)},t.prototype.doAction=function(e,t,n){return void 0===t&&(t=this.props.store.data),void 0===n&&(n=!1),this.handleAction(void 0,e,t,n)},t.prototype.handleAction=function(t,n,r,i,a){return void 0===i&&(i=!1),u(this,void 0,void 0,function(){var s;return o(this,function(o){return n.target&&"reload"!==n.actionType?(s=this.context,[2,Promise.all(n.target.split(",").map(function(e){var t=s.getComponentByName(e);return t&&t.doAction&&t.doAction(p(p({},n),{target:void 0}),r,i)}))]):"clearError"===n.actionType?[2,e.prototype.clearErrors.call(this)]:[2,e.prototype.handleAction.call(this,t,n,r,i,a)]})})},t.prototype.handleDialogConfirm=function(t,n,r,o){e.prototype.handleDialogConfirm.call(this,t,n,r,o);var i=this.props.store,a=this.context;n.reload?a.reload(n.reload,r):i.action&&i.action.reload&&a.reload(i.action.reload,r)},t.prototype.submitToTarget=function(e,t){this.context.send(e,t)},t.prototype.reloadTarget=function(e,t){this.context.reload(e,t)},t.prototype.closeTarget=function(e){this.context.close(e)},t.prototype.reload=function(t,n,r,i,a){return u(this,void 0,void 0,function(){var s,u,l,c,d,p;return o(this,function(o){switch(o.label){case 0:return n?[2,this.receive(n,void 0,a)]:(s=this.context,u="",c=null,t&&~(l=t.indexOf("."))&&(u=t.substring(l+1),t=t.substring(0,l)),~(d=t?t.indexOf("?"):-1)&&(c=vp(Fd(t.substring(d+1)),r),t=t.substring(0,d)),t&&(p=s.getComponentByName(t))&&p.reload?(p.reload(u,c,r),[3,4]):[3,1]);case 1:return"*"!==t?[3,3]:[4,e.prototype.reload.call(this,t,n,r,i)];case 2:return o.sent(),s.getComponents().forEach(function(e){return e.reload&&e.reload("",c,r)}),[3,4];case 3:return[2,e.prototype.reload.call(this,t,n,r,i)];case 4:return[2]}})})},t.prototype.receive=function(t,n,r){return u(this,void 0,void 0,function(){var i,a,s,u;return o(this,function(o){return n?(i=this.context,a=n.indexOf("."),s="",~a&&(s=n.substring(1+a),n=n.substring(0,a)),(u=i.getComponentByName(n))&&u.receive&&u.receive(t,s),[2]):[2,e.prototype.receive.call(this,t,void 0,r)]})})},t.prototype.setData=function(t,n){var r=this.props,o=r.onChange,i=r.store;e.prototype.setValues.call(this,t,n),o&&o(i.data,td(i.data,i.pristine),this.props)},t.prototype.getData=function(){return this.getValues()},t.contextType=Wg,t}(Yb),Xb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t=c([lb({type:"form",storeType:dy.name,isolateScope:!0,storeExtendsData:function(e){return e.inheritData},shouldSyncSuperStore:function(e,t,n){var r,o;if(t.quickEditFormRef&&t.onQuickChange&&(Uc(n.data,t.data)||Uc(n.data.__super,t.data.__super)||Uc(null===(r=n.data.__super)||void 0===r?void 0:r.__super,null===(o=t.data.__super)||void 0===o?void 0:o.__super)))return!0}})],t),t}(Jb);cb({type:"spinner",component:nb}),cb({type:"alert",component:nb}),cb({type:"dialog",component:nb}),cb({type:"drawer",component:nb});var Zb=/* @__PURE__ */n((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=/* @__PURE__ */new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var l in i=Object(arguments[u]))r.call(i,l)&&(s[l]=i[l]);if(n){a=n(i);for(var c=0;c<a.length;c++)o.call(i,a[c])&&(s[a[c]]=i[a[c]])}}return s}}),Qb=/* @__PURE__ */n((e,t)=>{t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}),ew=/* @__PURE__ */n((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)}),tw=/* @__PURE__ */n((e,t)=>{var n=function(){};if("production"!==process.env.NODE_ENV){var r=Qb(),o={},i=ew();n=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}}function a(e,t,a,s,u){if("production"!==process.env.NODE_ENV)for(var l in e)if(i(e,l)){var c;try{if("function"!=typeof e[l]){var d=Error((s||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}c=e[l](t,l,s,a,null,r)}catch(f){c=f}if(!c||c instanceof Error||n((s||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in o)){o[c.message]=!0;var p=u?u():"";n("Failed "+a+" type: "+c.message+(null!=p?p:""))}}}a.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(o={})},t.exports=a}),nw=/* @__PURE__ */n((e,t)=>{var n=Qv(),r=Zb(),o=Qb(),i=ew(),a=tw(),s=function(){};function u(){return null}"production"!==process.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}),t.exports=function(e,t){var l="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",d={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:h(u),arrayOf:function(e){return h(function(t,n,r,i,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new f("Invalid "+i+" `"+a+"` of type `"+g(s)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u<s.length;u++){var l=e(s,u,r,i,a+"["+u+"]",o);if(l instanceof Error)return l}return null})},element:h(function(t,n,r,o,i){var a=t[n];return e(a)?null:new f("Invalid "+o+" `"+i+"` of type `"+g(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:h(function(e,t,r,o,i){var a=e[t];return n.isValidElementType(a)?null:new f("Invalid "+o+" `"+i+"` of type `"+g(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return h(function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||c;return new f("Invalid "+o+" `"+i+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var s;return null})},node:h(function(e,t,n,r,o){return y(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return h(function(t,n,r,a,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],l=g(u);if("object"!==l)return new f("Invalid "+a+" `"+s+"` of type `"+l+"` supplied to `"+r+"`, expected an object.");for(var c in u)if(i(u,c)){var d=e(u,c,r,a,s+"."+c,o);if(d instanceof Error)return d}return null})},oneOf:function(e){return Array.isArray(e)?h(function(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(p(a,e[s]))return null;var u=JSON.stringify(e,function(e,t){return"symbol"===b(t)?String(t):t});return new f("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+u+".")}):("production"!==process.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),u)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(n)+" at index "+t+"."),u}return h(function(t,n,r,a,s){for(var u=[],l=0;l<e.length;l++){var c=(0,e[l])(t,n,r,a,s,o);if(null==c)return null;c.data&&i(c.data,"expectedType")&&u.push(c.data.expectedType)}return new f("Invalid "+a+" `"+s+"` supplied to `"+r+"`"+(u.length>0?", expected one of type ["+u.join(", ")+"]":"")+".")})},shape:function(e){return h(function(t,n,r,i,a){var s=t[n],u=g(s);if("object"!==u)return new f("Invalid "+i+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var c=e[l];if("function"!=typeof c)return m(r,i,a,l,b(c));var d=c(s,l,r,i,a+"."+l,o);if(d)return d}return null})},exact:function(e){return h(function(t,n,a,s,u){var l=t[n],c=g(l);if("object"!==c)return new f("Invalid "+s+" `"+u+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");for(var d in r({},t[n],e)){var p=e[d];if(i(e,d)&&"function"!=typeof p)return m(a,s,u,d,b(p));if(!p)return new f("Invalid "+s+" `"+u+"` key `"+d+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=p(l,d,a,s,u+"."+d,o);if(h)return h}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var n={},r=0;function i(i,a,u,l,d,p,h){if(l=l||c,p=p||u,h!==o){if(t){var v=/* @__PURE__ */new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=l+":"+u;!n[m]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[m]=!0,r++)}}return null==a[u]?i?null===a[u]?new f("The "+d+" `"+p+"` is marked as required in `"+l+"`, but its value is `null`."):new f("The "+d+" `"+p+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(a,u,l,d,p)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function v(e){return h(function(t,n,r,o,i,a){var s=t[n];return g(s)!==e?new f("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function m(e,t,n,r,o){return new f((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function y(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(y);if(null===t||e(t))return!0;var n=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!y(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!y(i[1]))return!1}return!0;default:return!1}}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,d.checkPropTypes=a,d.resetWarningCache=a.resetWarningCache,d.PropTypes=d,d}}),rw=/* @__PURE__ */n((e,t)=>{var n=Qb();function r(){}function o(){}o.resetWarningCache=r,t.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var s=/* @__PURE__ */new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var i={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return i.PropTypes=i,i}}),ow=/* @__PURE__ */n((e,t)=>{if("production"!==process.env.NODE_ENV){var n=Qv();t.exports=nw()(n.isElement,!0)}else t.exports=rw()()}),iw=function(e){var t;return"undefined"==typeof document?null:null==e?xv().body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),null!=(t=e)&&t.nodeType&&e||null)},aw=/* @__PURE__ */t(ow()),sw={container:aw.default.any,onRendered:aw.default.func},uw=function(e){var t=e.container,n=e.children,r=function(e,t){var n=(0,Qp.useState)(function(){return iw(e)}),r=n[0],o=n[1];if(!r){var i=iw(e);i&&o(i)}return(0,Qp.useEffect)(function(){t&&r&&t(r)},[t,r]),(0,Qp.useEffect)(function(){var t=iw(e);t!==r&&o(t)},[e,r]),r}(t,e.onRendered);return r?/* @__PURE__ */Qp.createElement(Qp.Fragment,null,/* @__PURE__ */ef.createPortal(n,r)):null};function lw(e){var t;return(null===(t=ef.findDOMNode(e))||void 0===t?void 0:t.ownerDocument)||document}function cw(e){var t,n,r,o;return"BODY"===e.tagName?(n=window.innerWidth,r=window.innerHeight,o=lw(e).documentElement.scrollTop||(null==e?void 0:e.scrollTop)):(n=(t=Kf(e)).width,r=t.height,o=e.scrollTop),{width:n,height:r,scroll:o}}function dw(e,t,n,r,o,i){var a;void 0===o&&(o=0),void 0===i&&(i=[0,0]);var s=ed(r),u="BODY"===r.tagName?Kf(n):Jf(n,r),l=Kf(t),c=l.height,p=l.width,f=r.getBoundingClientRect(),h=t.getBoundingClientRect(),v=s.getBoundingClientRect(),m=t.offsetWidth?h.width/t.offsetWidth:1,y=t.offsetHeight?h.height/t.offsetHeight:1,g="auto"===e,b="left-bottom-left-top",w=0,x=0,E="",O="",S=e=g?"left-bottom-left-top right-bottom-right-top left-top-left-bottom right-top-right-bottom ".concat(b):e;if("asContextMenu"===e){w=u.left+1+p<=f.width?u.left+1:u.left-p>=0?u.left-p:Math.max(f.width-p,10),x=u.top+1+c<=f.height?u.top+1:Math.max(f.height-c-5,10);var A=d(i,2),C=A[0],_=void 0===C?0:C,D=A[1];return{positionLeft:(w+_)/m,positionTop:(x+(void 0===D?0:D))/y,arrowOffsetLeft:E,arrowOffsetTop:O,activePlacement:S}}if(~e.indexOf("-"))for(var N=e.split(/\s+/),k={};N.length;){var I=S=N.shift();if(g&&0===N.length){var T=d(b.split("-"),4),P=T[0],F=T[1],j=T[2],R=T[3],V=k.atX,M=void 0===V?P:V,L=k.atY,$=void 0===L?F:L,z=k.myX,B=void 0===z?j:z,U=k.myY;I=S=[M,$,B,void 0===U?R:U].join("-")}var q=d(I.split("-"),4),W=q[0],H=q[1],G=q[2],K=q[3];G=G||W,K=K||H,w="left"===W?u.left:"right"===W?u.left+u.width:u.left+u.width/2,x="top"===H?u.top:"bottom"===H?u.top+u.height:u.top+u.height/2,w-="left"===G?0:"right"===G?p:p/2;var Y=(x-="top"===K?0:"bottom"===K?c:c/2)<0&&window.self!==window.top?v.y:0;if(N.length||g){var J={x:f.x+w/m,y:f.y-Y+x/y,width:p,height:c},X=!1,Z=!1;if(J.x>=0&&J.x+J.width<window.innerWidth+s.scrollLeft&&(X=!0,!k.atX&&(k.atX=W),!k.myX&&(k.myX=G)),J.y>=0&&J.y+J.height<window.innerHeight+s.scrollTop&&(Z=!0,!k.atY&&(k.atY=H),!k.myY&&(k.myY=K)),X&&Z)break;if(g&&0===N.length){for(var Q=t.offsetParent;Q&&"static"===window.getComputedStyle(Q).position;)Q=Q.offsetParent;var ee=null===(a=null==Q?void 0:Q.getBoundingClientRect)||void 0===a?void 0:a.call(Q),te={x:(null==ee?void 0:ee.x)||0,y:(null==ee?void 0:ee.y)||0};Z||(x=Math.max(10,window.innerHeight-J.height)+s.scrollTop-te.y-10),X||(w=Math.max(10,window.innerWidth-J.width)+s.scrollLeft-te.x)}}}else if("left"===e||"right"===e){w="left"===e?u.left-p:u.left+u.width;var ne=function(e,t,n,r){var o=cw(n),i=o.scroll,a=o.height,s=e-r-i,u=e+r-i+t;return s<0?-s:u>a?a-u:0}(x=u.top+(u.height-c)/2,c,r,o);x+=ne,O=50*(1-2*ne/c)+"%"}else if("top"===e||"bottom"===e){x="top"===e?u.top-c:u.top+u.height;var re=function(e,t,n,r){var o=cw(n).width,i=e-r,a=e+r+t;return i<0?-i:a>o?o-a:0}(w=u.left+(u.width-p)/2,p,r,o);w+=re,E=50*(1-2*re/c)+"%"}else{if("center"!==e)throw new Error('calcOverlayPosition(): No such placement of "'.concat(e,'" found.'));w=u.left+(u.width-p)/2,x=u.top+(u.height-c)/2,E=O=void 0}var oe=d(i,2),ie=oe[0],ae=void 0===ie?0:ie,se=oe[1],ue=void 0===se?0:se;return{positionLeft:(w+ae)/m,positionTop:(x+ue)/y,arrowOffsetLeft:(E+ae)/m,arrowOffsetTop:(O+ue)/y,activePlacement:S}}function pw(e,t){return e&&parseFloat(getComputedStyle(e).getPropertyValue(t))||0}function fw(e,t){if(!e||"string"!=typeof e)return e;if(t&&~e.indexOf(t)){var n=e.indexOf(t),r=n+t.length;return Qp.createElement("span",null,e.substring(0,n),Qp.createElement("span",{className:"is-keyword"},t),e.substring(r))}return e}function hw(e,t){for(var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=Math.abs(r.top-n.top),i=0,a=t,s=a.parentElement;s;){for(var u=pw(s,"padding-bottom"),l=pw(s,"border-bottom-width"),c=0,d=a.nextElementSibling;d;){var p=getComputedStyle(d).position,f=d.className;if("absolute"!==p&&"fixed"!==p&&!f.includes("Spinner")){var h=a.getBoundingClientRect(),v=d.getBoundingClientRect();h.bottom<=v.top&&(c+=d.offsetHeight+pw(d,"margin-bottom"))}d=d.nextElementSibling}if(i+=u+l+pw(a,"margin-bottom")+c,s=(a=s).parentElement,e===a)break}return o+i}uw.displayName="Portal",uw.propTypes=sw;var vw=function(e){var t=e.children,n=e.onRootClose,r=i(e,["children","onRootClose"]),o=d((0,Qp.useState)(null),2),a=o[0],s=o[1];return function(e,t,n){var r=void 0===n?{}:n,o=r.disabled,i=r.clickTrigger,a=void 0===i?"click":i,s=(0,Qp.useRef)(!1),u=t||Ov,l=(0,Qp.useCallback)(function(t){var n,r,o,i=Sv(e);(0,Ev.default)(!!i,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),s.current=!(i&&(o=t,!(o.metaKey||o.altKey||o.ctrlKey||o.shiftKey))&&function(e){return 0===e.button}(t)&&(n=i,r=t.target,!(n.contains?n.contains(r):n.compareDocumentPosition?n===r||16&n.compareDocumentPosition(r):void 0)))},[e]),c=bv(function(e){s.current||u(e)}),d=bv(function(e){27===e.keyCode&&u(e)});(0,Qp.useEffect)(function(){if(!o&&null!=e){var t=window.event,n=xv((p=Sv(e))&&"setState"in p?ef.findDOMNode(p):null!=p?p:null),r=gv(n,a,l,!0),i=gv(n,a,function(e){e!==t?c(e):t=void 0}),s=gv(n,"keyup",function(e){e!==t?d(e):t=void 0}),u=[];return"ontouchstart"in n.documentElement&&(u=[].slice.call(n.body.children).map(function(e){return gv(e,"mousemove",Ov)})),function(){r(),i(),s(),u.forEach(function(e){return e()})}}var p},[e,o,a,l,c,d])}((0,ef.findDOMNode)(a),n,r),"function"==typeof t?t(s):t},mw=Qp.createContext(void 0);S();var yw="data-sub-popover-displayed",gw=function(e){function t(t){var n=e.call(this,t)||this;return n.getTarget=function(){var e=n.props.target,t="function"==typeof e?e():e;return t&&ef.findDOMNode(t)||null},n.maybeUpdatePosition=function(e){var t=n.getTarget();(n.props.shouldUpdatePosition||t!==n._lastTarget||e)&&n.updatePosition(t)},n.state={ready:!1,positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null},n._lastTarget=null,n.componentId=ad(),n}return s(t,e),t.prototype.updatePosition=function(e){var t,n,r=this;if(this._lastTarget=e,e){var o=null===(t=null==e?void 0:e.closest)||void 0===t?void 0:t.call(e,"[role=popover]");!this.parentPopover&&o&&(this.parentPopover=o,this.parentPopover.setAttribute(yw+"-"+this.componentId,!0))}if(!e||!e.offsetWidth)return this.setState({});var i,a,s,u=this.props.watchTargetSizeChange,l=this.overlay,c=function(e,t){return e="function"==typeof e?e():e,ef.findDOMNode(e)||t}(this.props.container,lw(this).body);if(!this.watchedTarget||this.watchedTarget!==e){null===(n=this.resizeDispose)||void 0===n||n.forEach(function(e){return e()}),this.watchedTarget=e,this.resizeDispose=[!1!==u?fv(e,function(){return r.updatePosition(e)}):Lc,fv(l,function(){return r.updatePosition(e)})];var d=ed(e);d&&c.contains(d)&&this.resizeDispose.push((a=function(){r.updatePosition(e)},s=function(){requestAnimationFrame(a)},(i=d).addEventListener("scroll",s),function(){i.removeEventListener("scroll",s)}))}this.setState(p(p({},dw(this.props.placement,l,e,c,this.props.containerPadding,this.props.offset)),{ready:!0}))},t.prototype.componentDidMount=function(){this.overlay=(0,ef.findDOMNode)(this),this.updatePosition(this.getTarget())},t.prototype.componentDidUpdate=function(e){this.maybeUpdatePosition(this.props.placement!==e.placement)},t.prototype.componentWillUnmount=function(){var e;this.parentPopover&&this.parentPopover.getAttribute("data-sub-popover-displayed-"+this.componentId)&&(this.parentPopover.removeAttribute(yw+"-"+this.componentId),this.parentPopover=null),null===(e=this.resizeDispose)||void 0===e||e.forEach(function(e){return e()})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=i(e,["children","className"]),o=this.state,a=o.ready,s=o.positionLeft,u=o.positionTop,l=i(o,["ready","positionLeft","positionTop"]);delete r.target,delete r.container,delete r.containerPadding,delete r.shouldUpdatePosition;var c=Qp.Children.only(t);return(0,Qp.cloneElement)(c,p(p(p(p({},r),l),c.props.offset?{offset:c.props.offset}:{}),{positionLeft:s,positionTop:u,className:(0,Xf.default)(n,c.props.className),style:p(p({},c.props.style),{left:s,top:u,visibility:a?void 0:"hidden"}),componentId:this.componentId}))},t.defaultProps={containerPadding:0,placement:"right",shouldUpdatePosition:!1},t}(Qp.Component),bw=function(e){function t(t){var n=e.call(this,t)||this;return n.position=null,n.positionRef=function(e){n.position=e},n.state={exited:!t.show},n}return s(t,e),t.prototype.updatePosition=function(){var e;null===(e=this.position)||void 0===e||e.maybeUpdatePosition(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;e.show!==n.show&&n.show?this.setState({exited:!1}):n.transition===e.transition||n.transition||this.setState({exited:!0})},t.prototype.onHiddenListener=function(e){this.setState({exited:!0}),this.props.onExited&&this.props.onExited(e)},t.prototype.getContainerSelector=function(){var e=this.props.containerSelector,t=null;return"string"==typeof e&&(t=document.querySelector(e)),t},t.prototype.render=function(){var e,t=this.props,n=t.containerPadding,r=t.target,o=t.placement,a=t.shouldUpdatePosition,s=t.rootClose,u=t.children;t.watchTargetSizeChange;var l=t.transition,c=t.offset,d=i(t,["containerPadding","target","placement","shouldUpdatePosition","rootClose","children","watchTargetSizeChange","transition","offset"]),f=(this.getContainerSelector()?this.getContainerSelector:this.props.container)||(null===(e=this.context)||void 0===e?void 0:e.getModalContainer);if(!(d.show||l&&!this.state.exited))return null;var h=u;if(h=Qp.createElement(gw,p({},{container:f,containerPadding:n,target:r,placement:o,shouldUpdatePosition:a,offset:c},{ref:this.positionRef}),h),l){var v=d.onExit,m=d.onExiting,y=d.onEnter,g=d.onEntering,b=d.onEntered;h=Qp.createElement(l,{in:d.show,appear:!0,onExit:v,onExiting:m,onExited:this.onHiddenListener,onEnter:y,onEntering:g,onEntered:b},h)}return s?Qp.createElement(uw,{container:f},Qp.createElement(vw,{onRootClose:d.onHide},function(e){return Qp.isValidElement(h)?Qp.cloneElement(h,{ref:e}):Qp.createElement("div",{ref:e},h)})):Qp.createElement(uw,{container:f},h)},t.defaultProps={placement:"auto"},t.contextType=mw,c([Nd,l("design:type",Function),l("design:paramtypes",[HTMLElement]),l("design:returntype",void 0)],t.prototype,"onHiddenListener",null),c([Nd,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],t.prototype,"getContainerSelector",null),t}(Qp.Component);S();var ww=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={xOffset:0,yOffset:0},t.wrapperRef=Qp.createRef(),t.isRootClosed=!1,t}return s(t,e),t.prototype.componentDidMount=function(){this.mayUpdateOffset(),this.parent=(0,ef.findDOMNode)(this).parentNode,this.parent.classList.add("has-popover"),this.wrapperRef&&this.wrapperRef.current&&this.wrapperRef.current.addEventListener("touchmove",Fc,{passive:!1,capture:!1}),document.body.addEventListener("mousedown",this.handleRootMouseDownCapture,!0),document.body.addEventListener("mouseup",this.handleRootMouseUpCapture,!0),document.body.addEventListener("mouseup",this.handleRootMouseUp)},t.prototype.componentDidUpdate=function(){this.mayUpdateOffset()},t.prototype.componentWillUnmount=function(){this.parent&&this.parent.classList.remove("has-popover"),this.wrapperRef&&this.wrapperRef.current&&this.wrapperRef.current.removeEventListener("touchmove",Fc),document.body.removeEventListener("mouseup",this.handleRootMouseUp),document.body.removeEventListener("mousedown",this.handleRootMouseDownCapture,!0),document.body.removeEventListener("mouseup",this.handleRootMouseUpCapture,!0)},t.prototype.handleRootMouseDownCapture=function(e){var t=e.target,n=this.props,r=n.overlay,o=n.classPrefix;this.isRootClosed=!!((1===e.button&&null!==window.event||0===e.button)&&r&&t&&this.wrapperRef.current&&this.wrapperRef.current.offsetHeight&&!this.wrapperRef.current.getAttributeNames().find(function(e){return e.startsWith("data-sub-popover-displayed")})&&(!this.wrapperRef.current.contains(t)&&!t.closest("[role=dialog]")||t.matches(".".concat(o,"Modal"))&&t===this.wrapperRef.current))},t.prototype.handleRootMouseUpCapture=function(e){this.isRootClosed&&this.handleRootMouseDownCapture(e)},t.prototype.handleRootMouseUp=function(e){var t=this.props.onHide;if(this.isRootClosed&&!e.defaultPrevented){var n=function(e){e.stopPropagation(),window.removeEventListener("click",n,!0)};window.addEventListener("click",n,!0),null==t||t()}},t.prototype.mayUpdateOffset=function(){var e,t=this.props.offset;if(t&&"function"==typeof t){var n=this.props,r=n.placement,o=n.positionTop,i=n.positionLeft;e=t((0,ef.findDOMNode)(this).getBoundingClientRect(),{x:i,y:o,placement:r})}else e=t;this.setState({xOffset:e&&e.x?e.x:0,yOffset:e&&e.y?e.y:0})},t.prototype.handleOverlayClick=function(e){var t,n;e.preventDefault(),null===(n=(t=this.props).onHide)||void 0===n||n.call(t)},t.prototype.render=function(){var e=this.props;e.placement;var t=e.activePlacement,n=e.positionTop,r=e.positionLeft;e.arrowOffsetLeft,e.arrowOffsetTop;var o=e.style,a=e.children;e.offset;var s=e.overlay;e.onHide;var u=e.classPrefix,l=e.classnames,c=e.className;e.componentId;var d=e.testIdBuilder,f=i(e,["placement","activePlacement","positionTop","positionLeft","arrowOffsetLeft","arrowOffsetTop","style","children","offset","overlay","onHide","classPrefix","classnames","className","componentId","testIdBuilder"]),h=this.state,v=h.xOffset,m=h.yOffset,y=p(p({display:"block"},o),{top:n+m,left:r+v}),g="string"==typeof t?t.split("-"):[];return Qp.createElement("div",p({ref:this.wrapperRef,role:"popover",className:l("PopOver",c,t?"PopOver--".concat(Ad(t)):"",g[3]?"PopOver--v-".concat(g[3]):""),style:y},null==d?void 0:d.getTestId(),f),s?Qp.createElement("div",p({className:"".concat(u,"PopOver-overlay"),onClick:this.handleOverlayClick},null==d?void 0:d.getChild("overlay").getTestId())):null,a)},t.defaultProps={className:"",offset:{x:0,y:0},overlay:!1,placement:"auto"},c([Nd,l("design:type",Function),l("design:paramtypes",[MouseEvent]),l("design:returntype",void 0)],t.prototype,"handleRootMouseDownCapture",null),c([Nd,l("design:type",Function),l("design:paramtypes",[MouseEvent]),l("design:returntype",void 0)],t.prototype,"handleRootMouseUpCapture",null),c([Nd,l("design:type",Function),l("design:paramtypes",[MouseEvent]),l("design:returntype",void 0)],t.prototype,"handleRootMouseUp",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"handleOverlayClick",null),t}(Qp.PureComponent),xw=Rb(ww),Ew=function(e){var t=e.staticLabelClassName,n=e.labelClassName,r=e.id,o=e.themeCss;return e.static&&t?t:(0,Xf.default)(n,Hb(p(p({},e),{name:"labelClassName",id:r,themeCss:o,extra:"item"})))},Ow=function(e){var t=e.staticInputClassName,n=e.inputClassName;return e.static&&t?t:n},Sw=function(e){function t(t){var n=e.call(this,t)||this;n.mounted=!1,n.initedOptionFilled=!1,n.initedApiFilled=!1,n.toDispose=[],n.syncApiAutoFill=(0,Am.default)(function(e,t,r){return void 0===r&&(r=!1),u(n,void 0,void 0,function(){var n,i,a,s,u,l,c,d,p,f,h,v;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),n=this.props,i=n.autoFill,a=n.onBulkChange,s=n.formItem,u=n.data,a&&s&&i&&(!i||(null==i?void 0:i.hasOwnProperty("api")))&&(!r||i.fillMapping&&!Object.keys(i.fillMapping).some(function(e){return void 0!==Nu(u,e)}))?(null==i?void 0:i.showSuggestion)?(this.handleAutoFill("change"),[3,3]):[3,1]:[2];case 1:return l=s.name,Ku(c=zu(u,{__term:e}),l,e),t||Lh(i.api,c)&&this.lastSearchTerm!==e?[4,s.loadAutoUpdateData(i.api,c,!!(null===(f=i.api)||void 0===f?void 0:f.silent))]:[3,3];case 2:if(d=o.sent(),this.lastSearchTerm=null!==(h=d&&Nu(d,l))&&void 0!==h?h:e,!d)return[2];this.applyMapping(null!==(v=null==i?void 0:i.fillMapping)&&void 0!==v?v:{"&":"$$"},d,!1),o.label=3;case 3:return[3,5];case 4:return p=o.sent(),console.error(p),[3,5];case 5:return[2]}})})},250,{trailing:!0,leading:!1});var r=t.formItem,i=t.formInited,a=t.addHook,s=t.initAutoFill;if(!r)return n;n.toDispose.push(Mn(function(){return"".concat(r.errors.join("")).concat(r.isFocused).concat(r.dialogOpen).concat(JSON.stringify(r.filteredOptions)).concat(r.popOverOpen)},function(){return n.forceUpdate()}));var l=function(){var e;n.initedOptionFilled=!0,!1!==s&&fo(r)&&n.syncOptionAutoFill(r.getSelectedOptions(r.tmpValue),"fillIfNotSet"===s),n.initedApiFilled=!0,!1!==s&&fo(r)&&n.syncApiAutoFill(null!==(e=r.tmpValue)&&void 0!==e?e:"",!1,"fillIfNotSet"===s),n.toDispose.push(Mn(function(){return JSON.stringify(r.tmpValue)},function(){return n.mounted&&n.initedApiFilled&&n.syncApiAutoFill(r.tmpValue)})),n.toDispose.push(Mn(function(){return JSON.stringify(r.getSelectedOptions(r.tmpValue))},function(){return n.mounted&&n.initedOptionFilled&&n.syncOptionAutoFill(r.getSelectedOptions(r.tmpValue))}))};return n.toDispose.push(i||!a?r.addInitHook(l,999):a(l,"init","post")),n}return s(t,e),t.prototype.componentDidMount=function(){this.mounted=!0,this.target=(0,ef.findDOMNode)(this)},t.prototype.componentDidUpdate=function(e){var t,n,r,o=this.props,i=o.formItem;Lh(null===(t=o.autoFill)||void 0===t?void 0:t.api,o.data)&&Vh(null===(n=e.autoFill)||void 0===n?void 0:n.api,null===(r=o.autoFill)||void 0===r?void 0:r.api,e.data,o.data)&&this.syncApiAutoFill(null==i?void 0:i.tmpValue,!0)},t.prototype.componentWillUnmount=function(){this.syncApiAutoFill.cancel(),this.mounted=!1,this.toDispose.forEach(function(e){return e()}),this.toDispose=[]},t.prototype.handleFocus=function(e){var t=this.props,n=t.formItem,r=t.autoFill;n&&n.focus(),this.props.onFocus&&this.props.onFocus(e),!r||r&&!(null==r?void 0:r.hasOwnProperty("showSuggestion"))||this.handleAutoFill("focus")},t.prototype.handleBlur=function(e){var t=this.props,n=t.formItem,r=t.autoFill;n&&n.blur(),this.props.onBlur&&this.props.onBlur(e),!r||r&&!(null==r?void 0:r.hasOwnProperty("showSuggestion"))||this.handleAutoFill("blur")},t.prototype.handleAutoFill=function(e){var t=this,n=this.props,r=n.autoFill,o=n.formItem,i=n.data,a=r.trigger,s=r.mode;a===e&&"popOver"===s?null==o||o.openPopOver(this.buildAutoFillSchema(),i,function(e,n){e&&(null==n?void 0:n.selectedItems)&&t.updateAutoFillData(n.selectedItems)}):a!==e||"dialog"!==s&&"drawer"!==s||null==o||o.openDialog(this.buildAutoFillSchema(),i,function(e,n){e&&(null==n?void 0:n.selectedItems)&&t.updateAutoFillData(n.selectedItems)})},t.prototype.updateAutoFillData=function(e){var t=this.props,n=t.data,r=t.autoFill;t.onBulkChange;var o=r.fillMapping;r.multiple;var i=Array.isArray(e)?zu(n,{items:e}):Uu([n,{items:[e]},e]);this.applyMapping(null!=o?o:{},i,!1)},t.prototype.syncOptionAutoFill=function(e,t){void 0===t&&(t=!1);var n=this.props,r=n.autoFill,o=n.multiple,i=n.onBulkChange,a=n.data,s=this.props.formItem;(null==r?void 0:r.hasOwnProperty("api"))||i&&r&&!id(r)&&s.filteredOptions.length&&this.applyMapping(r,o?{items:e.map(function(e){return zu(p(p({},a),{ancestors:Ed(s.filteredOptions,e,!0)}),e)})}:zu(p(p({},a),{ancestors:Ed(s.filteredOptions,e[0],!0)}),e[0]),t)},t.prototype.applyMapping=function(e,t,n){void 0===n&&(n=!1);var r=this.props,o=r.onBulkChange,i=r.data;r.formItem;var a=vp(e,t),s=p({},i),u=p({},a);Object.keys(e).forEach(function(e){if("&"!==e){var t=Du(e),r=Nu(a,e);if(n){var o=Nu(i,e);void 0!==o&&(r=o)}Ku(u,e,r),t.length>1&&(0,$u.default)(s[t[0]])&&(Ku(s,e,r),u[t[0]]=s[t[0]])}}),o(u)},t.prototype.buildAutoFillSchema=function(){var e=this.props;e.formItem;var t=e.autoFill,n=e.translate;if(t&&(!t||(null==t?void 0:t.hasOwnProperty("api")))){var r=t.api,o=t.mode,i=t.size,a=t.offset,s=t.position,u=t.placement,l=t.multiple,c=t.filter,d=t.columns,f=t.labelField,h=t.popOverContainer,v=t.popOverClassName,m={type:"form",title:"",className:"suggestion-form",body:[{type:"picker",embed:!0,joinValues:!1,strictMode:!1,label:!1,labelField:f,valueField:t.valueField||"value",multiple:l,name:"selectedItems",value:t.defaultSelection||[],options:[],required:!0,source:r,pickerSchema:{type:"crud",bodyClassName:"mb-0",affixHeader:!1,alwaysShowPagination:!0,keepItemSelectionOnPageChange:!0,headerToolbar:[],footerToolbar:[{type:"pagination",align:"left"},{type:"bulkActions",align:"right",className:"ml-2"}],multiple:l,filter:c,columns:d||[]}}],actions:[{type:"button",actionType:"cancel",label:n("cancel")},{type:"submit",actionType:"submit",level:"primary",label:n("confirm")}]};return"popOver"===o?{popOverContainer:h,popOverClassName:v,placement:null!=u?u:s,offset:a,body:m}:{type:o,className:"auto-fill-dialog",title:n("FormItem.autoFillSuggest"),size:i,body:p(p({},m),{wrapWithPanel:!1}),actions:[{type:"button",actionType:"cancel",label:n("cancel")},{type:"submit",actionType:"submit",level:"primary",label:n("confirm")}]}}},t.prototype.handlePopOverConfirm=function(e){var t=this.props;t.onBulkChange;var n=t.autoFill;!n||n&&!(null==n?void 0:n.hasOwnProperty("api"))||(this.updateAutoFillData(e.selectedItems),this.closePopOver())},t.prototype.handlePopOverAction=function(e,t,n,r,o){void 0===r&&(r=!1);var i=this.props.onAction;if("cancel"===t.actionType)this.closePopOver();else if(i)return i(e,t,n,r,o)},t.prototype.closePopOver=function(){var e;null===(e=this.props.formItem)||void 0===e||e.closePopOver()},t.prototype.handleOpenDialog=function(e,t){return u(this,void 0,void 0,function(){var n;return o(this,function(r){return(n=this.props.formItem)?[2,new Promise(function(r){return n.openDialog(e,t,function(e,t){return r(!!e&&t)})})]:[2]})})},t.prototype.handleDialogConfirm=function(e){var t=d(e,1)[0],n=this.props.formItem;n&&n.closeDialog(!0,t)},t.prototype.handleDialogClose=function(e){void 0===e&&(e=!1);var t=this.props.formItem;t&&t.closeDialog(e)},t.prototype.renderControl=function(){var e,t=this.props;t.inputClassName;var n=t.formItem,r=t.classnames;t.children;var o=t.type,a=t.renderControl;t.formItemConfig;var s=t.sizeMutable,u=t.size,l=t.defaultSize,c=t.mobileUI,d=i(t,["inputClassName","formItem","classnames","children","type","renderControl","formItemConfig","sizeMutable","size","defaultSize","mobileUI"]);if(a){var f=u||l;return a(p(p({},d),{onOpenDialog:this.handleOpenDialog,type:o,classnames:r,formItem:n,className:r("Form-control",(e={"is-inline":!!d.inline&&!c,"is-error":n&&!n.valid,"is-full":"full"===u},e["Form-control--withSize Form-control--size".concat(Sd(f))]=!1!==s&&"string"==typeof f&&!!f&&"full"!==f,e),null==n?void 0:n.errClassNames,Hb(p(p({},this.props),{name:"wrapperCustomStyle",id:d.id,themeCss:d.wrapperCustomStyle,extra:"item"})),Ow(this.props))}))}return null},t.prototype.render=function(){var e,n,r,o,i=this,a=this.props,s=a.formMode,u=a.inputOnly,l=a.wrap,c=a.render,d=a.formItem,f=a.css,h=a.themeCss,v=a.id,m=a.wrapperCustomStyle,y=a.env,g=a.classnames,b=a.popOverContainer;a.data;var w=this.props.mode||s;if(!1===l||u)return this.renderControl();var x=t.layoutRenderers[w]||t.layoutRenderers.normal;return Qp.createElement(Qp.Fragment,null,x(this.props,this.renderControl.bind(this)),d?c("modal",p({type:"dialog"},d.dialogSchema),{show:d.dialogOpen,onClose:this.handleDialogClose,onConfirm:this.handleDialogConfirm,data:d.dialogData,formStore:void 0}):null,d?Qp.createElement(bw,{container:b||this.target,target:function(){return i.target},placement:(null===(e=d.popOverSchema)||void 0===e?void 0:e.placement)||"left-bottom-left-top",show:d.popOverOpen},Qp.createElement(xw,{className:g("Autofill-popOver",null===(n=d.popOverSchema)||void 0===n?void 0:n.popOverClassName),style:{minWidth:this.target?this.target.offsetWidth:void 0},offset:null===(r=d.popOverSchema)||void 0===r?void 0:r.offset,onHide:this.closePopOver},c("popOver-auto-fill-form",null===(o=d.popOverSchema)||void 0===o?void 0:o.body,{onAction:this.handlePopOverAction,onSubmit:this.handlePopOverConfirm}))):null,Qp.createElement(Kb,p({},this.props,{config:{themeCss:h||f,classNames:[{key:"labelClassName",weights:{default:{suf:".".concat(g("Form-label")),parent:".".concat(g("Form-item"))}}},{key:"descriptionClassName"}],wrapperCustomStyle:m,id:v&&v+"-item"},env:y})))},t.layoutRenderers={horizontal:function(e,t){var n,r,o,i=e.className,a=e.style,s=e.classnames,u=e.description,l=e.descriptionClassName,c=e.captionClassName,d=e.desc,f=e.label,h=e.render,v=e.required,m=e.caption,y=e.remark,g=e.labelRemark,b=e.env,w=e.formItem,x=e.renderLabel,E=e.renderDescription,O=e.hint;e.data;var S=e.showErrorMsg,A=e.mobileUI;e.translate;var C=e.static,_=e.staticClassName,D=e.id,N=e.wrapperCustomStyle,k=e.themeCss;!1===x&&(f=!1!==f&&""),u=u||d;var I=e.horizontal||e.formHorizontal||{},T=Cd(I.left),P=Cd(I.right),F="inherit"!==e.labelAlign&&e.labelAlign||e.formLabelAlign,j=e.labelWidth||e.formLabelWidth,R=e.labelOverflow||e.formLabelOverflow;return Qp.createElement("div",{"data-role":"form-item","data-amis-name":e.name,className:s("Form-item Form-item--horizontal",C&&_?_:i,(n={"Form-item--horizontal-justify":I.justify},n["is-error"]=w&&!w.valid,n["is-required"]=v,n),null==w?void 0:w.errClassNames,Hb(p(p({},e),{name:"wrapperCustomStyle",id:D,themeCss:N,extra:"item"}))),style:a},!1!==f?Qp.createElement("label",{className:s("Form-label",(r={},r["Form-itemColumn--".concat("string"==typeof I.leftFixed?I.leftFixed:"normal")]=I.leftFixed,r["Form-itemColumn--".concat(T)]=!I.leftFixed,r["Form-label--left"]="left"===F,r["Form-label-noLabel"]=""===f,r),Ew(e)),style:null!=j?{width:j}:void 0},Qp.createElement("span",p({},"ellipsis"===R?{className:s("Form-ellipsis"),title:f}:{}),f?h("label",f):null,v&&(f||g)?Qp.createElement("span",{className:s("Form-star")},"*"):null,g?h("label-remark",{type:"remark",icon:g.icon||"warning-mark",tooltip:g,mobileUI:A,className:s("Form-labelRemark"),container:e.popOverContainer||b.getModalContainer}):null)):null,Qp.createElement("div",{className:s("Form-value",(o={},o["Form-itemColumn--".concat(P)]=!I.leftFixed&&!!P&&P!==12-T,o))},t(),m?h("caption",m,{className:s("Form-caption",c)}):null,y?h("remark",{type:"remark",icon:y.icon||"warning-mark",tooltip:y,className:s("Form-remark"),mobileUI:A,container:e.popOverContainer||b.getModalContainer}):null,O&&w&&w.isFocused?h("hint",O,{className:s("Form-hint")}):null,w&&!w.valid&&!1!==S&&Array.isArray(w.errors)?Qp.createElement("ul",{className:s("Form-feedback")},w.errors.map(function(e,t){return Qp.createElement("li",{key:t},e)})):null,!1!==E&&u?h("description",u,{className:s("Form-description",l,Hb(p(p({},e),{name:"descriptionClassName",id:D,themeCss:k,extra:"item"})))}):null))},normal:function(e,t){var n,r=e.className,o=e.style,i=e.classnames,a=e.desc,s=e.description,u=e.label,l=e.render,c=e.required,d=e.caption,f=e.remark,h=e.labelRemark,v=e.env,m=e.descriptionClassName,y=e.captionClassName,g=e.formItem,b=e.renderLabel,w=e.renderDescription,x=e.hint;e.data;var E=e.showErrorMsg,O=e.mobileUI;e.translate;var S=e.static,A=e.staticClassName,C=e.themeCss,_=e.wrapperCustomStyle,D=e.id;return s=s||a,Qp.createElement("div",{"data-role":"form-item","data-amis-name":e.name,className:i("Form-item Form-item--normal",S&&A?A:r,(n={"is-error":g&&!g.valid},n["is-required"]=c,n),null==g?void 0:g.errClassNames,Hb(p(p({},e),{name:"wrapperCustomStyle",id:D,themeCss:_,extra:"item"}))),style:o},u&&!1!==b?Qp.createElement("label",{className:i("Form-label",Ew(e))},Qp.createElement("span",null,u?l("label",u):null,c&&(u||h)?Qp.createElement("span",{className:i("Form-star")},"*"):null,h?l("label-remark",{type:"remark",icon:h.icon||"warning-mark",tooltip:h,className:i("Form-lableRemark"),mobileUI:O,container:e.popOverContainer||v.getModalContainer}):null)):null,O?Qp.createElement("div",{className:i("Form-item-controlBox")},t(),d?l("caption",d,{className:i("Form-caption",y)}):null,f?l("remark",{type:"remark",icon:f.icon||"warning-mark",className:i("Form-remark"),tooltip:f,mobileUI:O,container:e.popOverContainer||v.getModalContainer}):null,x&&g&&g.isFocused?l("hint",x,{className:i("Form-hint")}):null,g&&!g.valid&&!1!==E&&Array.isArray(g.errors)?Qp.createElement("ul",{className:i("Form-feedback")},g.errors.map(function(e,t){return Qp.createElement("li",{key:t},e)})):null,!1!==w&&s?l("description",s,{className:i("Form-description",m,Hb(p(p({},e),{name:"descriptionClassName",id:D,themeCss:C,extra:"item"})))}):null):Qp.createElement(Qp.Fragment,null,t(),d?l("caption",d,{className:i("Form-caption",y)}):null,f?l("remark",{type:"remark",icon:f.icon||"warning-mark",className:i("Form-remark"),tooltip:f,mobileUI:O,container:e.popOverContainer||v.getModalContainer}):null,x&&g&&g.isFocused?l("hint",x,{className:i("Form-hint")}):null,g&&!g.valid&&!1!==E&&Array.isArray(g.errors)?Qp.createElement("ul",{className:i("Form-feedback")},g.errors.map(function(e,t){return Qp.createElement("li",{key:t},e)})):null,!1!==w&&s?l("description",s,{className:i("Form-description",m,Hb(p(p({},e),{name:"descriptionClassName",id:D,themeCss:C,extra:"item"})))}):null))},inline:function(e,t){var n,r=e.className,o=e.style,i=e.classnames,a=e.desc,s=e.description,u=e.label,l=e.render,c=e.required,d=e.caption,f=e.descriptionClassName,h=e.captionClassName,v=e.formItem,m=e.remark,y=e.labelRemark,g=e.env,b=e.hint,w=e.renderLabel,x=e.renderDescription;e.data;var E=e.showErrorMsg,O=e.mobileUI;e.translate;var S=e.static,A=e.staticClassName,C=e.themeCss,_=e.wrapperCustomStyle,D=e.id,N=e.labelWidth||e.formLabelWidth;return s=s||a,Qp.createElement("div",{"data-role":"form-item","data-amis-name":e.name,className:i("Form-item Form-item--inline",S&&A?A:r,(n={"is-error":v&&!v.valid},n["is-required"]=c,n),null==v?void 0:v.errClassNames,Hb(p(p({},e),{name:"wrapperCustomStyle",id:D,themeCss:_,extra:"item"}))),style:o},u&&!1!==w?Qp.createElement("label",{className:i("Form-label",Ew(e)),style:null!=N?{width:N}:void 0},Qp.createElement("span",null,u?l("label",u):u,c&&(u||y)?Qp.createElement("span",{className:i("Form-star")},"*"):null,y?l("label-remark",{type:"remark",icon:y.icon||"warning-mark",tooltip:y,className:i("Form-lableRemark"),mobileUI:O,container:e.popOverContainer||g.getModalContainer}):null)):null,Qp.createElement("div",{className:i("Form-value")},t(),d?l("caption",d,{className:i("Form-caption",h)}):null,m?l("remark",{type:"remark",icon:m.icon||"warning-mark",className:i("Form-remark"),tooltip:m,mobileUI:O,container:e.popOverContainer||g.getModalContainer}):null,b&&v&&v.isFocused?l("hint",b,{className:i("Form-hint")}):null,v&&!v.valid&&!1!==E&&Array.isArray(v.errors)?Qp.createElement("ul",{className:i("Form-feedback")},v.errors.map(function(e,t){return Qp.createElement("li",{key:t},e)})):null,!1!==x&&s?l("description",s,{className:i("Form-description",f,Hb(p(p({},e),{name:"descriptionClassName",id:D,themeCss:C,extra:"item"})))}):null))},row:function(e,t){var n,r=e.className,o=e.style,i=e.classnames,a=e.desc,s=e.description,u=e.label,l=e.render,c=e.required,d=e.caption,f=e.remark,h=e.labelRemark,v=e.env,m=e.descriptionClassName,y=e.captionClassName,g=e.formItem,b=e.renderLabel,w=e.renderDescription,x=e.hint;e.data;var E=e.showErrorMsg,O=e.mobileUI;e.translate;var S=e.static,A=e.staticClassName,C=e.wrapperCustomStyle,_=e.themeCss,D=e.id;s=s||a;var N=e.labelWidth||e.formLabelWidth;return Qp.createElement("div",{"data-role":"form-item","data-amis-name":e.name,className:i("Form-item Form-item--row",S&&A?A:r,(n={"is-error":g&&!g.valid},n["is-required"]=c,n),null==g?void 0:g.errClassNames,Hb(p(p({},e),{name:"wrapperCustomStyle",id:D,themeCss:C,extra:"item"}))),style:o},Qp.createElement("div",{className:i("Form-rowInner")},u&&!1!==b?Qp.createElement("label",{className:i("Form-label",Ew(e)),style:null!=N?{width:N}:void 0},Qp.createElement("span",null,l("label",u),c&&(u||h)?Qp.createElement("span",{className:i("Form-star")},"*"):null,h?l("label-remark",{type:"remark",icon:h.icon||"warning-mark",tooltip:h,className:i("Form-lableRemark"),mobileUI:O,container:e.popOverContainer||v.getModalContainer}):null)):null,t(),d?l("caption",d,{className:i("Form-caption",y)}):null,f?l("remark",{type:"remark",icon:f.icon||"warning-mark",className:i("Form-remark"),tooltip:f,container:e.popOverContainer||v.getModalContainer}):null),x&&g&&g.isFocused?l("hint",x,{className:i("Form-hint")}):null,g&&!g.valid&&!1!==E&&Array.isArray(g.errors)?Qp.createElement("ul",{className:i("Form-feedback")},g.errors.map(function(e,t){return Qp.createElement("li",{key:t},e)})):null,s&&!1!==w?l("description",s,{className:i("Form-description",m,Hb(p(p({},e),{name:"descriptionClassName",id:D,themeCss:_,extra:"item"})))}):null)},flex:function(e,t){var n,r=e.className,o=e.style,i=e.classnames,a=e.desc,s=e.description,u=e.label,l=e.render,c=e.required,d=e.caption,f=e.remark,h=e.labelRemark,v=e.env,m=e.descriptionClassName,y=e.captionClassName,g=e.formItem,b=e.renderLabel,w=e.renderDescription,x=e.hint;e.data;var E=e.showErrorMsg,O=e.mobileUI;e.translate;var S=e.static,A=e.staticClassName,C=e.wrapperCustomStyle,_=e.themeCss,D=e.id,N="inherit"!==e.labelAlign&&e.labelAlign||e.formLabelAlign,k=e.labelWidth||e.formLabelWidth;return s=s||a,Qp.createElement("div",{"data-role":"form-item","data-amis-name":e.name,className:i("Form-item Form-item--flex",S&&A?A:r,(n={"is-error":g&&!g.valid},n["is-required"]=c,n),null==g?void 0:g.errClassNames,Hb(p(p({},e),{name:"wrapperCustomStyle",id:D,themeCss:C,extra:"item"}))),style:o},Qp.createElement("div",{className:i("Form-flexInner",N&&"Form-flexInner--label-".concat(N))},u&&!1!==b?Qp.createElement("label",{className:i("Form-label",Ew(e)),style:null!=k?{width:"top"===N?"100%":k}:void 0},Qp.createElement("span",null,l("label",u),c&&(u||h)?Qp.createElement("span",{className:i("Form-star")},"*"):null,h?l("label-remark",{type:"remark",icon:h.icon||"warning-mark",tooltip:h,className:i("Form-lableRemark"),mobileUI:O,container:e.popOverContainer||v.getModalContainer}):null)):null,Qp.createElement("div",{className:i("Form-value")},t(),d?l("caption",d,{className:i("Form-caption",y)}):null,f?l("remark",{type:"remark",icon:f.icon||"warning-mark",className:i("Form-remark"),tooltip:f,container:e.popOverContainer||v.getModalContainer}):null,x&&g&&g.isFocused?l("hint",x,{className:i("Form-hint")}):null,g&&!g.valid&&!1!==E&&Array.isArray(g.errors)?Qp.createElement("ul",{className:i("Form-feedback")},g.errors.map(function(e,t){return Qp.createElement("li",{key:t},e)})):null,s&&!1!==w?l("description",s,{className:i("Form-description",m,Hb(p(p({},e),{name:"descriptionClassName",id:D,themeCss:_,extra:"item"})))}):null)))}},c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"handleFocus",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"handleBlur",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"handlePopOverConfirm",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object,Object,Object,Boolean,Object]),l("design:returntype",void 0)],t.prototype,"handlePopOverAction",null),c([Nd,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],t.prototype,"closePopOver",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object,Object]),l("design:returntype",Promise)],t.prototype,"handleOpenDialog",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Array]),l("design:returntype",void 0)],t.prototype,"handleDialogConfirm",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"handleDialogClose",null),t}(Qp.Component),Aw=["formPristine","formInited","addable","addButtonClassName","addButtonText","addOn","btnClassName","btnLabel","style","btnDisabled","className","clearable","columns","columnsCount","controls","desc","description","disabled","static","staticClassName","staticLabelClassName","staticInputClassName","draggable","editable","editButtonClassName","formHorizontal","formMode","hideRoot","horizontal","icon","inline","inputClassName","label","labelClassName","labelField","language","level","max","maxRows","min","minRows","multiLine","multiple","option","placeholder","removable","required","remark","hint","rows","searchable","showCompressOptions","size","step","showInput","unit","value","diffValue","borderMode","items","showCounter","minLength","maxLength","embed","displayMode","revealPassword","loading","themeCss","formLabelAlign","formLabelWidth","formHorizontal","labelAlign","colSize"];function Cw(e){return function(t){var n,r=t.prototype instanceof Qp.Component||t.$$typeof===Symbol.for("react.forward_ref");if(e.validate&&!t.prototype.validate){var a=e.validate;t.prototype.validate=function(){var e={input:this};return a.apply(e,arguments)}}else e.validate&&console.error("FormItem配置中的 validate 将不起作用,因为类的成员函数中已经定义了 validate 方法,将优先使用类里面的实现。");return e.storeType&&(t=Qg({storeType:e.storeType,extendsData:e.extendsData})(Gf(t)),delete e.storeType),function(e,t){var n;return(0,km.default)(function(e){var t;return(0,km.default)(((t=function(t){function n(e){var n=t.call(this,e)||this;return n.refFn=n.refFn.bind(n),n}return s(n,t),n.prototype.getWrappedInstance=function(){return this.ref.control},n.prototype.refFn=function(e){this.ref=e},n.prototype.render=function(){var t={rootStore:this.context};return Qp.createElement(e,p({},this.props,t,{ref:this.refFn}))},n}(Qp.Component)).displayName="WithRootStore(".concat(e.displayName||e.name,")"),t.contextType=Xg,t.ComposedComponent=e,t),e)}(Gf((n=function(n){function r(r){var o,i,a=this;(a=n.call(this,r)||this).value=void 0,a.lazyEmitChange=(0,Am.default)(a.emitChange.bind(a),250,{trailing:!0,leading:!1});var s=a.props,u=s.formStore,l=s.formItem,c=s.rootStore,d=s.store,f=s.onChange,h=s.data,v=s.inputGroupControl,m=s.colIndex,y=s.rowIndex,g=s.$schema,b=g.id,w=g.type,x=g.required,E=g.validations,O=g.validationErrors,S=g.unique,A=g.value,C=g.extraName;g.multiple;var _=g.delimiter,D=g.valueField,N=g.labelField,k=g.joinValues,I=g.extractValue,T=g.selectFirst,P=g.autoFill,F=g.clearValueOnHidden,j=g.validateApi,R=g.minLength,V=g.maxLength,M=g.validateOnChange,L=g.label,$=g.pagination;a.getValue=a.getValue.bind(a),a.setValue=a.setValue.bind(a),a.handleChange=a.handleChange.bind(a),a.setPrinstineValue=a.setPrinstineValue.bind(a),a.controlRef=a.controlRef.bind(a),a.handleBlur=a.handleBlur.bind(a),a.validate=a.validate.bind(a),a.flushChange=a.flushChange.bind(a),a.renderChild=a.renderChild.bind(a);var z=a.props.$schema.name||(null===(o=t.defaultProps)||void 0===o?void 0:o.name);if(_c(z)&&(z=Zs(z,h)),!z)return a;var B=_c(A),U=a.props.value,q=c.addStore({id:Mc(),path:a.props.$path,storeType:e.formItemStoreType||By.name,parentId:null==d?void 0:d.id,name:z,colIndex:void 0!==m?m:void 0,rowIndex:void 0!==y?y:void 0});a.model=q;var W=E&&q&&e.validations?p(p({},E),vm(e.validations)):E;if(null==l||l.addSubFormItem(q),q.config(p(p({},(0,ly.default)(p(p({},t.defaultProps),a.props.$schema),["multiple"])),{id:b,type:w,required:r.required||x,unique:S,value:A,isValueSchemaExp:B&&A.replace(/\s/g,"")!=="${".concat(z,"}"),rules:W,messages:O,delimiter:_,valueField:D,labelField:N,joinValues:k,extractValue:I,selectFirst:T,autoFill:P,clearValueOnHidden:F,validateApi:j,minLength:R,maxLength:V,validateOnChange:M,label:L,inputGroupControl:v,extraName:C,pagination:$})),a.model.unique&&(null===(i=null==u?void 0:u.parentStore)||void 0===i?void 0:i.storeType)===Xm.name&&u.parentStore.bindUniuqueItem(q),null!=U?(q.changeTmpValue(U,"controlled"),q.setIsControlled(!0)):a.setInitialValue(A),f&&void 0!==A&&void 0!==q.tmpValue&&(A===q.tmpValue||B))q.extraName?(f((H=q.splitExtraValue(q.tmpValue))[0],q.name,!1,!0),f(H[1],q.extraName,!1,!0)):f(q.tmpValue,q.name,!1,!0);else if(f&&void 0===U&&void 0===(null==d?void 0:d.getValueByName(q.name,!1))&&(null==d?void 0:d.storeType)!==Oy.name)if(q.extraName){var H;f((H=q.splitExtraValue(q.tmpValue))[0],q.name,!1,!0),f(H[1],q.extraName,!1,!0)}else f(q.tmpValue,q.name,!1,!0);return a.reaction=Mn(function(){return q.validatedAt},function(e){var t,n,r,o;null===(n=(t=a.props).dispatchEvent)||void 0===n||n.call(t,q.valid?"formItemValidateSucc":"formItemValidateError",qu(null!==(o=null===(r=a.props.formStore)||void 0===r?void 0:r.data)&&void 0!==o?o:a.props.data,{__errors:q.errors,__formName:q.name,__formValue:q.tmpValue,__formControl:a.control}))}),a}return s(r,n),r.prototype.componentDidMount=function(){var e=this,t=this.props;t.store,t.formStore;var n=t.$schema.validate,r=t.addHook;this.hook3=function(){return e.lazyEmitChange.flush()},null==r||r(this.hook3,"flush");var o=this.model;if(o&&n){var i=Qc(n.bind(this.control));this.hook2=function(){return o.clearError("control:valdiate"),i(e.props.data,e.getValue(),o.name).then(function(e){("string"==typeof e||Array.isArray(e))&&e&&o.addError(e,"control:valdiate")})},null==r||r(this.hook2)}null==o||o.init()},r.prototype.componentDidUpdate=function(e){var t,n,r,o=this,i=this.props,a=this.model;if(a)if(zc(["name","id","validations","validationErrors","value","defaultValue","required","unique","multiple","delimiter","valueField","labelField","joinValues","extractValue","selectFirst","autoFill","clearValueOnHidden","validateApi","minLength","maxLength","label","extraName","pagination"],e.$schema,i.$schema,function(e){a.config(p(p({},e),{isValueSchemaExp:_c(i.$schema.value)&&i.$schema.value.replace(/\s/g,"")!=="${".concat(i.$schema.name,"}"),inputGroupControl:null==i?void 0:i.inputGroupControl})),e.hasOwnProperty("name")&&o.setInitialValue(o.props.$schema.value)}),i.required!==e.required&&a.config({required:i.required}),void 0!==i.value)(0,Ml.default)(i.value,e.value)||(0,Ml.default)(i.value,a.tmpValue)||a.changeTmpValue(i.value,"controlled");else if(void 0!==i.defaultValue&&_c(i.defaultValue)&&i.defaultValue.replace(/\s/g,"")!=="${".concat(i.name,"}")&&(!(0,Ml.default)(i.defaultValue,e.defaultValue)||i.data!==e.data&&function(e,t,n){try{return Cc.collect(e).some(function(e){return Cc.var(e,t)!==Cc.var(e,n)})}catch(tE){return console.warn("[isNeedFormula]表达式执行异常,当前表达式: ",e,",当前上下文数据: ",n),!1}}(i.defaultValue,i.data,e.data))){var s=Cc.formula(i.defaultValue,i.data);if(!(0,Ml.default)(s,Cc.formula(e.defaultValue,e.data))&&!(0,Ml.default)(s,a.tmpValue))if(a.changeTmpValue(s,"formulaChanged"),a.extraName){var u=a.splitExtraValue(s);null===(t=i.onChange)||void 0===t||t.call(i,u[0],a.name,!1),null===(n=i.onChange)||void 0===n||n.call(i,u[1],a.extraName,!1)}else null===(r=i.onChange)||void 0===r||r.call(i,s,a.name,!1)}else if(i.data!==e.data&&(!a.emitedValue||(0,Ml.default)(a.emitedValue,a.tmpValue))){a.changeEmitedValue(void 0);var l=a.extraName?[Nu(i.data,a.name,!1),Nu(i.data,a.extraName,!1)]:Nu(i.data,a.name,!1);(0,Ml.default)(l,a.extraName?a.splitExtraValue(a.tmpValue):a.tmpValue)||(0,Ml.default)(a.extraName?l[0]:l,Nu(e.data,a.name,!1))&&(!a.extraName||(0,Ml.default)(l[1],Nu(e.data,a.extraName,!1)))||(a.changeTmpValue(l,i.formInited&&!e.formInited?"formInited":"dataChanged"),this.checkValidate())}},r.prototype.componentWillUnmount=function(){var e,t,n,r,o,i,a;this.hook&&(null===(t=(e=this.props).removeHook)||void 0===t||t.call(e,this.hook)),this.hook2&&(null===(r=(n=this.props).removeHook)||void 0===r||r.call(n,this.hook2)),this.hook3&&(null===(i=(o=this.props).removeHook)||void 0===i||i.call(o,this.hook3,"flush")),this.lazyEmitChange.cancel(),null===(a=this.reaction)||void 0===a||a.call(this),this.disposeModel()},r.prototype.setInitialValue=function(e){var t=this.model,n=this.props,r=n.formStore,o=n.data,i=n.canAccessSuperData,a=n.name,s=_c(e);s&&e.replace(/\s/g,"")==="${".concat(a,"}")&&(console.warn("value 不要使用表达式关联自己"),s=!1,e=void 0);var u=t.extraName?[Nu(o,t.name,null!=i?i:null==r?void 0:r.canAccessSuperData),Nu(o,t.extraName,null!=i?i:null==r?void 0:r.canAccessSuperData)]:Nu(o,t.name,null!=i?i:null==r?void 0:r.canAccessSuperData);t.extraName&&u.every(function(e){return void 0===e})&&(u=void 0),void 0===u&&(e=s?Cc.formula(e,o):Dc(e)),t.changeTmpValue(null!=u?u:e,void 0!==u?"initialValue":s?"formulaChanged":"defaultValue")},r.prototype.disposeModel=function(){var e,t=this.props,n=t.formStore,r=t.formItem,o=t.rootStore;this.model&&this.model.unique&&(null==n?void 0:n.parentStore)&&(null==n?void 0:n.parentStore.storeType)===Xm.name&&n.parentStore.unBindUniuqueItem(this.model),this.model&&(r&&fo(r)&&r.removeSubFormItem(this.model),this.model.clearValueOnHidden&&(null===(e=this.model.form)||void 0===e||e.deleteValueByName(this.model.name,{type:"hide"})),fo(o)&&o.removeStore(this.model)),delete this.model},r.prototype.controlRef=function(e){var t=this,n=this.props,r=n.addHook,o=n.removeHook;n.formStore;for(var i=n.formItemRef;e&&e.getWrappedInstance;)e=e.getWrappedInstance();if(e&&!e.props&&Object.defineProperty(e,"props",{get:function(){return t.props}}),e&&e.validate&&this.model){var a=this.model,s=Qc(e.validate.bind(e));this.hook=function(){return a.clearError("component:valdiate"),s(t.props.data,t.getValue(),a.name).then(function(e){("string"==typeof e||Array.isArray(e))&&e&&a.setError(e,"component:valdiate")})},null==r||r(this.hook)}else!e&&this.hook&&(null==o||o(this.hook),this.hook=void 0);null==i||i(e);var u=this.control;this.control=e;var l=this.context;e?l.registerComponent(this.control):u&&l.unRegisterComponent(u)},r.prototype.checkValidate=function(){var e;if(this.model){var t=this.model.validated,n=this.props,r=n.formSubmited,o=n.validateOnChange;!0===o||!1!==o&&(r||t)?this.validate():!1===o&&(null===(e=this.model)||void 0===e||e.reset())}},r.prototype.validate=function(){return u(this,void 0,void 0,function(){var e,t,n,r,i,a,s;return o(this,function(o){switch(o.label){case 0:return this.model?(e=this.props,t=e.formStore,n=e.data,e.dispatchEvent,this.model.unique&&(null==t?void 0:t.parentStore)&&t.parentStore.storeType===Xm.name?(i=t.parentStore,a=i.uniques.get(this.model.name),s=a.items.map(function(e){return e.validate(n)}),[4,Promise.all(s)]):[3,2]):[2];case 1:return r=o.sent(),[3,4];case 2:return[4,this.model.validate(n)];case 3:r=[o.sent()],o.label=4;case 4:return[2,!r.some(function(e){return!1===e})]}})})},r.prototype.flushChange=function(){this.lazyEmitChange.flush()},r.prototype.handleChange=function(e,t,n){void 0===t&&(t=this.props.$schema.submitOnChange),void 0===n&&(n=!1);var r=this.props;r.formStore;var o=r.onChange,i=r.$schema,a=i.type,s=i.pipeOut,u=i.changeImmediately,l=r.formInited,c=r.data;if(this.model&&!~["service","group","hbox","panel","grid","input-group"].indexOf(a)){if(s){var d=this.model.value;e=Nh.call(this,s,["value","oldValue","data"],e,d,c)}this.model.changeTmpValue(e,"formula"===a?"formulaChanged":"input"),n||u||!l?this.emitChange(t):this.lazyEmitChange(t)}else o&&o.apply(null,arguments)},r.prototype.emitChange=function(e){void 0===e&&(e=this.props.$schema.submitOnChange);var t=this.props,n=t.formStore,r=t.onChange,o=t.$schema,i=o.id,a=o.label,s=o.type,u=o.onChange;o.maxLength,o.minLength;var l=t.data,c=t.env;if(t.validateOnChange,t.formSubmited,this.model){var d=this.model,p=this.model.tmpValue,f=void 0;if((d.isControlled||(f=d.extraName?[Nu(l,d.name,!1),Nu(l,d.extraName,!1)]:Nu(l,d.name,!1),!(d.extraName?(0,Ml.default)(f,p):f===p)))&&("input-password"!==s&&(null==c||c.tracker({eventType:"formItemChange",eventData:{id:i,name:d.name,label:a,type:s,value:p}},this.props)),this.model.changeEmitedValue(p),!1!==(null==u?void 0:u(p,f,this.model,n))&&this.model)){var h={type:"input"};if("formulaChanged"===d.changeMotivation?h.type="formula":"initialValue"!==d.changeMotivation&&"formInited"!==d.changeMotivation&&"defaultValue"!==d.changeMotivation||(h.type="init"),d.extraName){var v=d.splitExtraValue(p);null==r||r(v[0],d.name,void 0,void 0,h),null==r||r(v[1],d.extraName,!0===e,void 0,h)}else null==r||r(p,d.name,!0===e,void 0,h);this.checkValidate()}}},r.prototype.handleBlur=function(e){var t=this.props,n=t.onBlur;t.$schema.validateOnBlur&&this.model&&this.validate(),n&&n(e)},r.prototype.setPrinstineValue=function(e){if(this.model){var t=this.model,n=this.props;n.formStore;var r=n.$schema.pipeOut,o=n.onChange,i=n.value,a=n.data;if(r&&(e=Nh.call(this,r,["value","oldValue","data"],e,i,a)),t.extraName){var s=t.splitExtraValue(e);null==o||o(s[0],t.name,!1,!0),null==o||o(s[1],t.extraName,!1,!0)}else null==o||o(e,t.name,!1,!0)}},r.prototype.getValue=function(){var e=this.props,t=e.formStore,n=e.data,r=e.$schema,o=this.model?this.model.tmpValue:r.value;return r.pipeIn&&(o=Nh.call(this,r.pipeIn,["value","store","data"],o,t,n)),o},r.prototype.setValue=function(e,t){var n,r=this.props.onBulkChange;!t||this.model&&t===this.model.name?this.handleChange(e):r&&r(((n={})[t]=e,n))},r.prototype.renderChild=function(e,t,n){void 0===n&&(n={});var r=this.props,o=r.render,i=r.data,a=r.store,s=this.model;return o(e,t,p({data:s?s.getMergedData(i||(null==a?void 0:a.data)):i||(null==a?void 0:a.data)},n))},r.prototype.render=function(){var e,n,r,o=this.props,i=o.controlWidth,a=o.disabled,s=o.formMode,u=o.$schema,l=o.store,c=o.data,d=o.invisible,f=o.defaultStatic;if(d)return null;var h=this.getValue(),v=this.model,m={defaultSize:i,disabled:null!=a?a:u.disabled,static:null!==(n=null!==(e=this.props.static)&&void 0!==e?e:u.static)&&void 0!==n?n:f,formItem:this.model,formMode:u.mode||s,ref:this.controlRef,data:c||(null==l?void 0:l.data),name:null!==(r=null==v?void 0:v.name)&&void 0!==r?r:u.name,value:h,changeMotivation:null==v?void 0:v.changeMotivation,defaultValue:u.value,formItemValue:h,onChange:this.handleChange,onBlur:this.handleBlur,setValue:this.setValue,getValue:this.getValue,prinstine:v?v.prinstine:void 0,setPrinstineValue:this.setPrinstineValue,onValidate:this.validate,onFlushChange:this.flushChange};return Qp.createElement(t,p({},this.props,m))},r}(Qp.Component),n.displayName="WrapControl".concat(t.displayName||t.name?"(".concat(t.displayName||t.name,")"):""),n.contextType=Wg,n.defaultProps={},n))),t)}(e,(0,km.default)((n=function(n){function o(t){var r=n.call(this,t)||this;r.refFn=r.refFn.bind(r),r.getData=r.getData.bind(r);var o=t.validations,i=t.formItem;return i&&!o&&e.validations&&i.config({rules:e.validations}),r}return s(o,n),o.prototype.shouldComponentUpdate=function(t){var n;return!(!(null===(n=e.shouldComponentUpdate)||void 0===n?void 0:n.call(e,this.props,t))&&!1!==t.strictMode&&!1!==e.strictMode&&!$c(Aw.concat(e.detectProps||[]),this.props,t))},o.prototype.getWrappedInstance=function(){return this.ref},o.prototype.refFn=function(e){this.ref=e},o.prototype.getData=function(){return this.props.data},o.prototype.renderControl=function(){var n,o=this.props;o.inputClassName;var a=o.formItem,s=o.classnames;o.children;var u=o.type,l=o.size,c=o.defaultSize,d=o.mobileUI,f=i(o,["inputClassName","formItem","classnames","children","type","size","defaultSize","mobileUI"]),h=l&&["xs","sm","md","lg","full"].includes(l),v=h?l:c;return Qp.createElement(Qp.Fragment,null,Qp.createElement(t,p({},f,{getData:this.getData,mobileUI:d,onOpenDialog:this.handleOpenDialog,size:!1!==e.sizeMutable?void 0:l,onFocus:this.handleFocus,onBlur:this.handleBlur,type:u,classnames:s,ref:r?this.refFn:void 0,forwardedRef:r?void 0:this.refFn,formItem:a,style:{width:!h&&l?l:void 0},className:s("Form-control",(n={"is-inline":!!f.inline&&!d,"is-error":a&&!a.valid,"is-full":"full"===l,"is-thin":e.thin},n["Form-control--withSize Form-control--size".concat(Sd(v))]=!1!==e.sizeMutable&&"string"==typeof v&&!!v&&"full"!==v,n),null==a?void 0:a.errClassNames,Ow(this.props))})))},o}(Sw),n.defaultProps=p({initAutoFill:"fillIfNotSet",className:"",renderLabel:e.renderLabel,renderDescription:e.renderDescription,sizeMutable:e.sizeMutable,wrap:e.wrap,showErrorMsg:e.showErrorMsg},t.defaultProps),n.propsList=f(["value","defaultValue","onChange","setPrinstineValue","readOnly","strictMode"],d(t.propsList||[]),!1),n.displayName="FormItem".concat(e.type?"(".concat(e.type,")"):""),n.ComposedComponent=t,n),t))}}function _w(e){var t=Cw(e)(e.component);return cb(p(p({},e),{weight:void 0!==e.weight?e.weight:-100,component:t,isFormItem:!0}))}function Dw(e){return function(t){return _w(p(p({},e),{component:t})).component}}var Nw=Aw.concat(["value","options","size","buttons","columnsCount","multiple","hideRoot","checkAll","defaultCheckAll","showIcon","showRadio","btnDisabled","joinValues","extractValue","borderMode","hideSelected"]),kw=function(e){function t(t,n){var r,i=this;(i=e.call(this,t)||this).config=n,i.toDispose=[],i.mounted=!1;var a=t.initFetch,s=t.formItem,l=t.source,c=t.data,d=t.setPrinstineValue,p=t.defaultValue,f=t.multiple,h=t.joinValues,v=t.extractValue,m=t.addHook,y=t.formInited,g=t.valueField,b=t.options,w=t.value,x=t.defaultCheckAll;if(!s)return i;s.setOptions(Fy(b,void 0,g),i.changeOptionValue,c),i.toDispose.push(Mn(function(){return JSON.stringify([s.loading,s.filteredOptions])},function(){return i.mounted&&i.forceUpdate()})),f&&x&&(null===(r=s.filteredOptions)||void 0===r?void 0:r.length)&&!l&&i.defaultCheckAll();var E=null;return!1===h&&p&&(E=function(){var e=v?s.getSelectedOptions(w).map(function(e){return e[g||"value"]}):s.getSelectedOptions(w);d(f?e.concat():e[0])}),!1!==a&&!1!==n.autoLoadOptionsFromSource?i.toDispose.push(y||!m?s.addInitHook(function(){return u(i,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,this.reload()];case 1:return e.sent(),null==E||E(),[2]}})})}):m(function(e){return u(i,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.initOptions(e)];case 1:return t.sent(),null==E||E(),[2]}})})},"init")):null==E||E(),i}return s(t,e),t.prototype.componentDidMount=function(){this.mounted=!0,this.normalizeValue()},t.prototype.shouldComponentUpdate=function(e){var t;return!!(!1===this.config.strictMode||!1===e.strictMode||e.source||e.autoComplete||(null===(t=e.formItem)||void 0===t?void 0:t.expressionsInOptions)||$c(Nw,this.props,e))},t.prototype.componentDidUpdate=function(e){var t=this,n=this.props,r=n.formItem;!n.source&&e.options!==n.options&&r?(r.setOptions(Fy(n.options||[],void 0,n.valueField),this.changeOptionValue,n.data),this.normalizeValue()):!1===this.config.autoLoadOptionsFromSource||!n.formInited&&void 0!==n.formInited||!n.source||!r||e.source===n.source&&e.data===n.data||(Fl(n.source)?Qs(e.source,e.data,"| raw")!==Qs(n.source,n.data,"| raw")&&(r.loadOptionsFromDataScope(n.source,n.data,this.changeOptionValue,n.clearValueOnSourceChange),this.normalizeValue()):Lh(n.source,n.data)&&Vh(e.source,n.source,e.data,n.data)&&r.loadOptions(n.source,n.data,void 0,!0,this.changeOptionValue).then(function(){return t.normalizeValue()})),(e.value!==n.value||(null==r?void 0:r.expressionsInOptions))&&(null==r||r.syncOptions(void 0,n.data))},t.prototype.componentWillUnmount=function(){var e,t;null===(t=(e=this.props).removeHook)||void 0===t||t.call(e,this.reload,"init"),this.mounted=!1,this.toDispose.forEach(function(e){return e()}),this.toDispose=[]},t.prototype.oldDispatchOptionEvent=function(e,t){return void 0===t&&(t=""),u(this,void 0,void 0,function(){var n,r,i,a;return o(this,function(o){switch(o.label){case 0:return n=this.props,r=n.dispatchEvent,i=n.options,[4,r(e,ig(this.props,{value:t,options:i,items:i}))];case 1:return[2,!!(null==(a=o.sent())?void 0:a.prevented)]}})})},t.prototype.dispatchOptionEvent=function(e,t){return void 0===t&&(t=""),u(this,void 0,void 0,function(){var n,r,i,a,s;return o(this,function(o){switch(o.label){case 0:return n=this.props,r=n.dispatchEvent,i=n.options,a=n.value,[4,r(e,ig(this.props,p({value:a,options:i,items:i},t)))];case 1:return[2,!!(null==(s=o.sent())?void 0:s.prevented)]}})})},t.prototype.doAction=function(e,t,n){var r=this.props,o=r.resetValue,i=r.onChange,a=null==e?void 0:e.actionType;"clear"===a?null==i||i(""):"reset"===a&&(null==i||i(null!=o?o:""))},t.prototype.normalizeValue=function(){var e=this.props,t=e.joinValues,n=e.extractValue,r=e.value,o=e.multiple,i=e.formItem,a=e.valueField;e.enableNodePath,e.pathSeparator;var s=e.onChange;if(i&&!1===t&&i.options.length)if(!1!==n||"string"!=typeof r&&"number"!=typeof r)!0===n&&r&&!(Array.isArray(r)&&r.every(function(e){return"string"==typeof e||"number"==typeof e})||"string"==typeof r||"number"==typeof r)&&(u=i.getSelectedOptions(r).map(function(e){return e[a||"value"]}),null==s||s(o?u.concat():u[0]));else{var u=i.getSelectedOptions(r);null==s||s(o?u.concat():u[0])}},t.prototype.getWrappedInstance=function(){return this.input},t.prototype.inputRef=function(e){this.input=e},t.prototype.handleToggle=function(e,t,n){return u(this,void 0,void 0,function(){var r,i,a,s,u;return o(this,function(o){switch(o.label){case 0:return r=this.props,i=r.onChange,a=r.formItem,s=r.value,a?(u=this.toggleValue(e,s),[4,this.dispatchOptionEvent("change",{value:u})]):[2];case 1:return o.sent()||i&&i(u,t,n),[2]}})})},t.prototype.defaultCheckAll=function(){var e=this.props,t=e.value,n=e.formItem,r=e.setPrinstineValue;if(n&&!n.getSelectedOptions(t).length){var o=n.filteredOptions.concat(),i=this.formatValueArray(o);null==r||r(i)}},t.prototype.formatValueArray=function(e){var t=this.props,n=t.joinValues,r=t.extractValue,o=t.valueField,i=t.delimiter,a=t.resetValue,s="";return t.multiple?(s=xd(e)>1?gd(e):e,n?s=s.map(function(e){return e[o||"value"]}).filter(function(e){return null!=e}).join(i):r&&(s=s.map(function(e){return e[o||"value"]}).filter(function(e){return null!=e}))):(s=e[0]||a,n&&s&&(s=s[o||"value"])),s},t.prototype.handleToggleAll=function(){return u(this,void 0,void 0,function(){var e,t,n,r,i,a,s,u,l;return o(this,function(o){switch(o.label){case 0:return e=this.props,t=e.value,n=e.onChange,r=e.formItem,i=e.valueField,r?(a=r.getSelectedOptions(t),s=gd(r.filteredOptions.concat()).filter(function(e){return null!=e&&null!=e[i||"value"]}),u=a.length===s.length?[]:r.filteredOptions.concat(),l=this.formatValueArray(u),[4,this.dispatchOptionEvent("change",{value:l})]):[2];case 1:return o.sent()||n&&n(l),[2]}})})},t.prototype.toggleValue=function(e,t){var n=this.props,r=n.joinValues,o=n.extractValue,i=n.valueField,a=n.delimiter,s=n.clearable,u=n.resetValue,l=n.multiple,c=n.formItem,d=void 0!==t?c.getSelectedOptions(t).concat():[],p=(0,wp.default)(d,Vy(e[i||"value"],i||"value")),f="";return l?(~p?d.splice(p,1):d.push(e),f=d,r?f=f.map(function(e){return e[i||"value"]}).join(a):o&&(f=f.map(function(e){return e[i||"value"]}))):(~p&&s?d.splice(p,1):d=[e],f=d[0]||u,(r||o)&&f&&(f=f[i||"value"])),f},t.prototype.reload=function(e,t){var n,r,o=this.props.data;return t&&(null===(r=(n=this.props).onBulkChange)||void 0===r||r.call(n,t),o=Hu(o,t)),this.reloadOptions(!1,!1,o)},t.prototype.reloadOptions=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=this.props.data);var r=this.props,o=r.source,i=r.formItem,a=r.onChange,s=r.setPrinstineValue;if(r.valueField,i&&Fl(o))fo(i)&&i.loadOptionsFromDataScope(o,n,this.changeOptionValue);else if(i&&Lh(o,n))return fo(i)?i.loadOptions(o,n,void 0,!1,t?s:a,e):void 0},t.prototype.deferLoad=function(e){return u(this,void 0,void 0,function(){var t,n,r,i,a,s,u,l;return o(this,function(o){switch(o.label){case 0:return t=this.props,n=t.deferApi,r=t.source,i=t.env,a=t.formItem,s=t.data,(u=e.deferApi||n||r)?[4,null==a?void 0:a.deferLoadOptions(e,u,zu(s,e))]:(i.notify("error","请在选项中设置 `deferApi` 或者表单项中设置 `deferApi`,用来加载子选项。"),[2]);case 1:return l=o.sent(),this.oldDispatchOptionEvent("loadFinished",l),this.dispatchOptionEvent("deferLoadFinished",{result:l}),[2]}})})},t.prototype.leftDeferLoad=function(e,t){var n=this.props,r=n.deferApi,o=n.source,i=n.env,a=n.formItem,s=n.data,u=e.deferApi||r||o;u?null==a||a.deferLoadLeftOptions(e,t,u,zu(s,e)):i.notify("error","请在选项中设置 `deferApi` 或者表单项中设置 `deferApi`,用来加载子选项。")},t.prototype.expandTreeOptions=function(e){var t=this.props,n=t.deferApi,r=t.source,o=t.env,i=t.formItem,a=t.data,s=n||r;s?null==i||i.expandTreeOptions(e,s,zu(a)):o.notify("error","请在选项中设置 `deferApi` 或者表单项中设置 `deferApi`,用来加载子选项。")},t.prototype.initOptions=function(e){var t;return u(this,void 0,void 0,function(){var n,r,i,a,s;return o(this,function(o){switch(o.label){case 0:return[4,this.reloadOptions(!1,!0)];case 1:return o.sent(),n=this.props,r=n.formItem,i=n.name,a=n.multiple,s=n.defaultCheckAll,r?(fo(r)&&r.value&&Ku(e,i,r.value),a&&s&&(null===(t=r.filteredOptions)||void 0===t?void 0:t.length)&&this.defaultCheckAll(),[2]):[2]}})})},t.prototype.focus=function(){this.input&&this.input.focus&&this.input.focus()},t.prototype.changeOptionValue=function(e){var t=this.props,n=t.onChange,r=t.formInited,o=t.setPrinstineValue,i=t.value;!1===r?void 0===i&&(null==o||o(e)):null==n||n(e)},t.prototype.setOptions=function(e,t){void 0===t&&(t=!1);var n=this.props.formItem;n&&n.setOptions(t?e:Fy(e||[],void 0,this.props.valueField),this.changeOptionValue,this.props.data)},t.prototype.syncOptions=function(){var e=this.props.formItem;e&&e.syncOptions(void 0,this.props.data)},t.prototype.setLoading=function(e){var t=this.props.formItem;t&&t.setLoading(e)},t.prototype.handleOptionAdd=function(e,t,n,r){var i,a;return void 0===e&&(e=-1),void 0===n&&(n=!1),u(this,void 0,void 0,function(){var s,l,c,h,v,m,y,g,b,w,x,E,O,S,A,C,_,D,N,k,I,T,P,F,j,R=this;return o(this,function(V){switch(V.label){case 0:return s=this.props,l=s.addControls,c=s.addDialog,h=s.disabled,v=s.labelField,m=s.onOpenDialog,y=s.optionLabel,g=s.addApi,b=s.source,w=s.data,x=s.valueField,E=s.deferField,O=s.formItem,S=s.createBtnLabel,A=s.env,C=s.translate,h||!O?[2]:(n||Array.isArray(l)&&l.length||(l=[{type:"text",name:v||"label",label:!1,required:!0,placeholder:C("Options.addPlaceholder")}]),_=Array.isArray(e)?hd(O.options,e.slice(0,-1)):void 0,D=zu(w,Array.isArray(e)?p({parent:_},t):t),N=!1,n?(I=D,[3,3]):[3,1]);case 1:return[4,m(p(p({type:"dialog",title:S||"新增".concat(y||"选项")},c),{body:{type:"form",api:g,controls:f([{type:"hidden",name:"idx",value:e},{type:"hidden",name:"parent",value:_}],d(l||[]),!1),onSubmit:function(e){return u(R,void 0,void 0,function(){var t,n,r,i;return o(this,function(o){switch(o.label){case 0:return t=v||"label",n=x||"value",[4,this.dispatchOptionEvent("addConfirm",{item:(r={},r[t]=e[t],r[n]=null!==(i=e[n])&&void 0!==i?i:e[t],r)})];case 1:return[2,!(N=o.sent())]}})})}}}),D)];case 2:I=V.sent(),V.label=3;case 3:return k=I,n?[4,this.dispatchOptionEvent("addConfirm",{item:k})]:[3,5];case 4:return V.sent()?[2]:[3,6];case 5:if(N)return[2];V.label=6;case 6:if(!n||!g)return[3,10];V.label=7;case 7:return V.trys.push([7,9,,10]),[4,A.fetcher(g,k,{method:"post"})];case 8:return(T=V.sent()).ok?k=T.data||k:(!g.silent&&A.notify("error",null!==(a=null===(i=null==g?void 0:g.messages)||void 0===i?void 0:i.failed)&&void 0!==a?a:T.msg||C("Options.createFailed")),k=null),[3,10];case 9:return P=V.sent(),k=null,console.error(P),!g.silent&&A.notify("error",P.message),[3,10];case 10:return k?(k.hasOwnProperty(x||"value")||(k=p(p({},k),((j={})[x||"value"]=k[v||"label"],j))),[4,this.oldDispatchOptionEvent("add",p(p({},k),{idx:e}))]):[2];case 11:return V.sent()?[2]:[4,null==r?void 0:r(k)];case 12:return!1!==V.sent()?[3,13]:[2];case 13:return(null==_?void 0:_.hasOwnProperty(E))&&_[E]||(null==_?void 0:_.defer)?[4,this.deferLoad(_)]:[3,15];case 14:return V.sent(),[3,16];case 15:b&&g?this.reload():(F=O.options.concat(),Array.isArray(e)?F=wd(F,e,0,p({},k)):~e?F.splice(e,0,p({},k)):F.push(p({},k)),O.setOptions(F,this.changeOptionValue,w)),V.label=16;case 16:return[2]}})})},t.prototype.handleOptionEdit=function(e,t,n,r){var i,a;return void 0===t&&(t=e),void 0===n&&(n=!1),u(this,void 0,void 0,function(){var s,l,c,d,f,h,v,m,y,g,b,w,x,E,O,S,A,C,_,D,N,k=this;return o(this,function(I){switch(I.label){case 0:return s=this.props,l=s.editControls,c=s.editDialog,d=s.disabled,f=s.labelField,h=s.valueField,v=s.onOpenDialog,m=s.editApi,y=s.editInitApi,g=s.env,b=s.source,w=s.data,x=s.formItem,E=s.optionLabel,O=s.translate,d||!x?[2]:(n||Array.isArray(l)&&l.length||(l=[{type:"text",name:f||"label",label:!1,placeholder:O("Options.addPlaceholder")}]),S=!1,n?(C=e,[3,3]):[3,1]);case 1:return[4,v(p(p({type:"dialog",title:O("Options.editLabel",{label:E||O("Options.label")})},c),{body:{type:"form",initApi:y,api:m,controls:l,onSubmit:function(e){return u(k,void 0,void 0,function(){var t,n,r,i;return o(this,function(o){switch(o.label){case 0:return t=f||"label",n=h||"value",[4,this.dispatchOptionEvent("editConfirm",{item:(r={},r[t]=e[t],r[n]=null!==(i=e[n])&&void 0!==i?i:e[t],r)})];case 1:return[2,!(S=o.sent())]}})})}}}),zu(w,e))];case 2:C=I.sent(),I.label=3;case 3:return A=C,n?[4,this.dispatchOptionEvent("editConfirm",{item:A})]:[3,5];case 4:return I.sent()?[2]:[3,6];case 5:if(S)return[2];I.label=6;case 6:if(!n||!m)return[3,10];I.label=7;case 7:return I.trys.push([7,9,,10]),[4,g.fetcher(m,zu(w,A),{method:"post"})];case 8:return(_=I.sent()).ok?A=_.data||A:(!m.silent&&g.notify("error",null!==(a=null===(i=null==m?void 0:m.messages)||void 0===i?void 0:i.failed)&&void 0!==a?a:_.msg||O("saveFailed")),A=null),[3,10];case 9:return D=I.sent(),A=null,console.error(D),!m.silent&&g.notify("error",D.message),[3,10];case 10:return A?[4,this.oldDispatchOptionEvent("edit",A)]:[2];case 11:return I.sent()?[2]:[4,null==r?void 0:r(A)];case 12:return!1===I.sent()||(b&&m?this.reload():(N=fd(x.options,function(e){return e===t}))&&x.setOptions(wd(x.options,N,1,p(p({},t),A)),this.changeOptionValue,w)),[2]}})})},t.prototype.handleOptionDelete=function(e,t){var n,r;return u(this,void 0,void 0,function(){var i,a,s,u,l,c,d,p,f,h,v,m,y,g,b,w,x;return o(this,function(o){switch(o.label){case 0:return i=this.props,a=i.deleteConfirmText,s=i.disabled,u=i.data,l=i.deleteApi,c=i.onDelete,d=i.env,p=i.formItem,f=i.source,h=i.valueField,v=i.translate,s||!p?[2]:(m=zu(u,e),a?[4,d.confirm(ic(v(a),m))]:[3,2]);case 1:return y=o.sent(),[3,3];case 2:y=!0,o.label=3;case 3:return y?[4,this.oldDispatchOptionEvent("delete",m)]:[2];case 4:return o.sent()?[2]:[4,this.dispatchOptionEvent("deleteConfirm",{item:e})];case 5:if(o.sent())return[2];o.label=6;case 6:return o.trys.push([6,9,,10]),l?[4,d.fetcher(l,m,{method:"delete"})]:[3,8];case 7:if(!(g=o.sent()).ok)return!l.silent&&d.notify("error",null!==(r=null===(n=null==l?void 0:l.messages)||void 0===n?void 0:n.failed)&&void 0!==r?r:g.msg||v("deleteFailed")),[2];o.label=8;case 8:return c&&c(m),!1===(null==t?void 0:t(m))?[2]:(f?this.reload():(b=p.options.concat(),(w=fd(b,function(t){return t[h||"value"]==e[h||"value"]}))&&p.setOptions(wd(b,w,1),this.changeOptionValue,u)),[3,10]);case 9:return x=o.sent(),console.error(x),!l.silent&&d.notify("error",x.message),[3,10];case 10:return[2]}})})},t.prototype.render=function(){var e=this.props,t=e.value,n=e.formItem,r=e.addApi,o=e.editApi,i=e.deleteApi,a=e.creatable,s=e.editable,u=e.removable,l=e.enableNodePath,c=e.pathSeparator,d=e.delimiter,f=void 0===d?",":d,h=e.labelField,v=void 0===h?"label":h,m=e.valueField,y=void 0===m?"value":m,g=e.translate,b=Kd(t,l,v,y,c,f),w=b.nodePathArray,x=b.nodeValueArray,E=this.config.component;return Qp.createElement(E,p({},this.props,{placeholder:g(this.props.placeholder),ref:this.inputRef,options:n?n.filteredOptions:[],onToggle:this.handleToggle,onToggleAll:this.handleToggleAll,selectedOptions:n?n.getSelectedOptions(t,l?x:void 0):[],nodePath:w,loading:!!n&&n.loading,setLoading:this.setLoading,setOptions:this.setOptions,syncOptions:this.syncOptions,reloadOptions:this.reload,deferLoad:this.deferLoad,leftDeferLoad:this.leftDeferLoad,expandTreeOptions:this.expandTreeOptions,creatable:!(!1===a||!Lh(r))||a,editable:s||!1!==s&&Lh(o),removable:u||!1!==u&&Lh(i),onAdd:this.handleOptionAdd,onEdit:this.handleOptionEdit,onDelete:this.handleOptionDelete}))},c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"inputRef",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object,Boolean,Boolean]),l("design:returntype",Promise)],t.prototype,"handleToggle",null),c([Nd,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",Promise)],t.prototype,"handleToggleAll",null),c([Nd,l("design:type",Function),l("design:paramtypes",[String,Object]),l("design:returntype",void 0)],t.prototype,"reload",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Boolean,Object,Object]),l("design:returntype",void 0)],t.prototype,"reloadOptions",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],t.prototype,"deferLoad",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object,Object]),l("design:returntype",void 0)],t.prototype,"leftDeferLoad",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Array]),l("design:returntype",void 0)],t.prototype,"expandTreeOptions",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],t.prototype,"initOptions",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"changeOptionValue",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Array,Object]),l("design:returntype",void 0)],t.prototype,"setOptions",null),c([Nd,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],t.prototype,"syncOptions",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Boolean]),l("design:returntype",void 0)],t.prototype,"setLoading",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object,Object,Boolean,Function]),l("design:returntype",Promise)],t.prototype,"handleOptionAdd",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object,Object,Boolean,Function]),l("design:returntype",Promise)],t.prototype,"handleOptionEdit",null),c([Nd,l("design:type",Function),l("design:paramtypes",[Object,Function]),l("design:returntype",Promise)],t.prototype,"handleOptionDelete",null),t}(Qp.Component);function Iw(e){return function(t){return function(e){var t=e.component,n=function(n){function r(t){return n.call(this,t,e)||this}return s(r,n),r.displayName="OptionsControl(".concat(e.type,")"),r.defaultProps=p({delimiter:",",labelField:"label",valueField:"value",joinValues:!0,extractValue:!1,multiple:!1,placeholder:"Select.placeholder",resetValue:"",deleteConfirmText:"deleteConfirm"},t.defaultProps),r.propsList=t.propsList?f([],d(t.propsList),!1):[],r.ComposedComponent=t,r}(kw);return _w(p(p({},e),{strictMode:!1,component:n}))}(p(p({},e),{component:t})).component}}function Tw(e,t){var n={renderer:lb,formitem:Dw,options:Iw},r=t.component;!r&&window.AmisCustomRenderers&&window.AmisCustomRenderers[t.type]&&window.AmisCustomRenderers[t.type].component&&(r=window.AmisCustomRenderers[t.type].component),r&&["renderer","formitem","options"].includes(e)&&n[e]&&n[e](p(p({},t.config||{}),{type:t.type,weight:t.weight||0,autoVar:t.autoVar||!1}))(r)}function Pw(e,t,n){if(Array.isArray(n)&&n.length){var r=0,o=[],i=Math.max(Math.round(12/Math.max.apply(Math,f([],d(n),!1))),1),a="Grid-col--sm".concat(i);n.forEach(function(n,i){n&&(o.push(Qp.createElement("div",{className:t("Grid"),key:i},Array.from({length:n}).map(function(n,o){return r+o<e.length?Qp.createElement("div",{key:o,className:t(a)},e[r+o]):null}))),r+=n)}),e=o}else if("number"==typeof n&&n>1){var s=12/n,u="Grid-col--sm".concat(s===Math.round(s)?s:"");e=(0,Sm.default)(e,n).map(function(e,r){return Qp.createElement("div",{className:t("Grid"),key:r},Array.from({length:n}).map(function(n,r){return Qp.createElement("div",{key:r,className:t(u)},e[r])}))})}return e}function Fw(e,t,n,r){e.persist();var o=n.onAction,i=t.onClick;"string"==typeof i&&(i=Ch(i,"event","props","data"));var a=i&&i(e,n,r||n.data);if(!e.isDefaultPrevented()&&!1!==a&&o){if(e.preventDefault(),"download"===t.actionType){t.actionType="ajax";var s=Sh(t.api);s.responseType="blob",s.downloadFileName=t.downloadFileName,t.api=s}o(e,t,r||n.data)}}function jw(e,t,n){if(void 0===n&&(n="is-matched"),!t)return e;e=String(e);var r=Xu(t,!1,!0);if(!r.test(e))return e;var o=[],i=0,a=null;for(r.lastIndex=0;a=r.exec(e);){var s=e.substring(i,a.index);s&&o.push(Qp.createElement("span",{key:o.length},s)),a[0]&&o.push(Qp.createElement("span",{className:n,key:o.length},a[0])),i=a.index+a[0].length}var u=e.substring(i);return u&&o.push(Qp.createElement("span",{key:o.length},u)),o}window.AmisCustomRenderers&&Object.keys(window.AmisCustomRenderers).forEach(function(e){if(ib[e])console.warn("[amis-core]:预注册渲染器失败,当前已存在重名渲染器(".concat(e,")。"));else{var t=window.AmisCustomRenderers[e];t&&Tw(e,t)}}),window.addEventListener("message",function(e){var t,n,r;if(e.data&&"amis-renderer-register-event"===(null===(t=e.data)||void 0===t?void 0:t.type)&&(null===(n=e.data)||void 0===n?void 0:n.amisRenderer)&&e.data.amisRenderer.type){var o=null===(r=e.data)||void 0===r?void 0:r.amisRenderer,i=(null==o?void 0:o.usage)||"renderer";ib[o.type]?console.warn("[amis-core]:动态注册渲染器失败,当前已存在重名渲染器(".concat(o.type,")。")):(console.info("[amis-core]响应动态注册渲染器事件:",o.type),Tw(i,o))}},!1);var Rw=/* @__PURE__ */new Map;function Vw(e,t){Rw.set(e,t)}function Mw(e){if(e)return Rw.get(e)}function Lw(e){var t,n,r=typeof e;if("undefined"===r||null===e)return"-";if("string"===r)return e;if("number"===r)return"".concat(e);if("boolean"===r)return String(e);if((0,$u.default)(e))try{for(var o=a(["__title","label",Object.keys(e)[0]]),i=o.next();!i.done;i=o.next()){var s=i.value;if("string"==typeof e[s])return e[s]}}catch(u){t={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return"invalid label"}var $w={},zw={},Bw={};function Uw(e,t){return void 0===t&&(t=20),Bw[e]?Bw[e]:(clearTimeout(zw[e]),zw[e]=setTimeout(function(){delete $w[e],delete zw[e]},1e3),$w[e]&&$w[e]>t?(Bw[e]=!0,!0):($w[e]=($w[e]||0)+1,!1))}function qw(e){return"string"==typeof e&&-1===e.indexOf(",")&&-1===e.indexOf("(")?'url("'.concat(e,'")'):e}function Ww(e,t){if(!e)return e;var n="string"==typeof e?Qs(e,t,"| raw")||{}:(0,Cm.default)(e,function(e){return Qs(e,t,"| raw")||e});return Object.keys(n).forEach(function(e){"radius"===e&&(n.borderRadius=n.radius["top-left-border-radius"]+" "+n.radius["top-right-border-radius"]+" "+n.radius["bottom-right-border-radius"]+" "+n.radius["bottom-left-border-radius"],delete n.radius),e.indexOf("-")>0&&(n[(0,_m.default)(Lb[e]||e)]=n[e],delete n[e])}),n.backgroundImage&&(n.backgroundImage=qw(n.backgroundImage)),n.borderImage&&(n.borderImage=qw(n.borderImage)),n.listStyleImage&&(n.listStyleImage=qw(n.listStyleImage)),n}function Hw(e){return e?"string"==typeof e?e.split(";").reduce(function(e,t){var n=d(t.split(":").map(function(e){return e.trim()}),2),r=n[0],o=n[1];return r&&o&&(e[(0,_m.default)(r)]=o),e},{}):e:{}}function Gw(e,t,n){return(0,km.default)(Jv(e,t,n),e)}function Kw(e,t){void 0===t&&(t=0);var n=parseInt(e,10);return isNaN(n)?t:n}S();var Yw=function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value};function Jw(e,t){var n,r;if("string"!=typeof t)return e;if(Or(e)&&(e=tr(e)),!(t=t.trim())||!Array.isArray(e))return e;var o=t.split(","),i=[],s=e.length;if(!s)return e;try{for(var u=a(o),l=u.next();!l.done;l=u.next()){var c=l.value;if(-1===c.indexOf(":")){var p=parseInt(c,10);!isNaN(p)&&p<s&&i.push(e[p])}else{var h=d(c.split(":"),2),v=h[0],m=h[1],y=parseInt(v||"0",10);if((isNaN(y)||y<0)&&(y=0),y>=s)continue;var g=parseInt(m,10);if(isNaN(g)&&(g=s),g<0&&(g=s+g),g<y)continue;g>s&&(g=s),i.push.apply(i,f([],d(e.slice(y,g)),!1))}}}catch(b){n={error:b}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return i}function Xw(e,t){var n,r,o;try{n=e.toString().split(".")[1].length}catch(tE){n=0}try{r=t.toString().split(".")[1].length}catch(tE){r=0}return(e*(o=Math.pow(10,Math.max(n,r)))+t*o)/o}function Zw(e,t){var n,r,o;try{n=e.toString().split(".")[1].length}catch(tE){n=0}try{r=t.toString().split(".")[1].length}catch(tE){r=0}return(e*(o=Math.pow(10,Math.max(n,r)))-t*o)/o}function Qw(e,t){var n,r=+e,o="number"==typeof t?t:(null===(n=r.toString().split(".")[1])||void 0===n?void 0:n.length)||0;if("number"==typeof r&&!isNaN(r)){var i=o?/(\d)(?=(\d{3})+\.)/g:/(\d)(?=(\d{3})+$)/g;return r.toFixed(o).replace(i,"$1,")}return(0).toFixed(o)}function ex(e){if(!e)return"";var t=e.toString(),n=t.replace(/,/g,"");if(t.includes(".")){var r=t.split(".")[1].length;return Number(n).toFixed(r)}return n}var tx=new(function(){function e(){this.styles={},this.styleDom=document.createElement("style"),this.styleDom.id="amis-styles",document.head.appendChild(this.styleDom)}return e.prototype.updateStyle=function(e){var t=this;Object.keys(e).forEach(function(n){t.styles[n]?t.styles[n]=p(p({},t.styles[n]),e[n]):t.styles[n]=e[n]}),this.updateStyleDom()},e.prototype.removeStyles=function(e){delete this.styles[e],this.updateStyleDom()},e.prototype.updateStyleDom=function(){var e=this,t=Object.keys(this.styles).map(function(t){var n=e.styles[t];return Object.keys(n).map(function(e){return"".concat(e," {").concat(Object.keys(n[e]).map(function(t){return"".concat((0,Nm.default)(t),": ").concat(n[e][t],";")}).join(""),"}")}).join("")}).join("");this.styleDom.innerHTML=t,this.styleText=t},e}());function nx(e,t){var n=localStorage.getItem(e),r={};try{r=JSON.parse(n||"{}")}catch(tE){console.error('parse localstorage "'.concat(e,' error"'),tE)}var o={};return t.forEach(function(e){r.hasOwnProperty(e.key)&&(o[e.key]=r[e.key])}),o}function rx(e,t,n){var r=localStorage.getItem(e),o={};try{o=JSON.parse(r||"{}")}catch(tE){console.error('parse localstorage "'.concat(e,' error"'),tE)}Object.assign(o,t),localStorage.setItem(e,JSON.stringify(o))}function ox(e){return nx("amis-client-vars",e.variables)}function ix(e,t){return rx("amis-client-vars",e,t.variables)}function ax(e){var t=e.variables;return nx("amis-client-vars-".concat(e.pageId||location.pathname),t)}function sx(e,t){return rx("amis-client-vars-".concat(t.pageId||location.pathname),e,t.variables)}Hy(function(e,t){if("client"===e.storageOn)return p(p({},e),{bulkGetter:"page"===e.scope?ax:ox,bulkSetter:"page"===e.scope?sx:ix})}),Hy(function(e,t){var n;if(e.defaultValue&&"string"==typeof e.defaultValue){var r=e.defaultValue;try{var o=r,i=null===(n=e.valueSchema)||void 0===n?void 0:n.type;return i&&["number","array","object"].includes(i)&&(o=JSON.parse(r)),p(p({},e),{defaultValue:o})}catch(tE){}}}),S();var ux="zh-CN",lx={"zh-CN":"zh-cn","en-US":"en","de-DE":"de"},cx={};function dx(e,t){!function(e,t,n){void 0===n&&(n=!0),cx[e]=n?p(p({},cx[e]||{}),t):p(p({},t),cx[e]||{})}(e,t)}var px={};function fx(e,t){return e.includes("{{")?e.replace(/(\\)?\{\{([^{}]+?)\}\}/g,function(e,n,r){return n?e.substring(1):ku(r,t||{})}):e}function hx(e){if(e&&px[e])return px[e];var t=function(t){for(var n,r,o,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];if(!t||"string"!=typeof t)return t;var s=(null===(n=cx[e])||void 0===n?void 0:n[t])||(null===(r=cx[ux])||void 0===r?void 0:r[t])||(null===(o=cx["zh-CN"])||void 0===o?void 0:o[t])||t;return fx.apply(void 0,f([s],d(i),!1))};return e&&(px[e]=t),t}function vx(){return ux}var mx=Qp.createContext("");function yx(e,t){var n,r=(0,km.default)((n=function(t){function n(e){var n=t.call(this,e)||this;return n.childRef=n.childRef.bind(n),n.getWrappedInstance=n.getWrappedInstance.bind(n),n}return s(n,t),n.prototype.childRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.ref=e},n.prototype.getWrappedInstance=function(){return this.ref},n.prototype.render=function(){var t,n,r=this.props.locale||this.context||ux,o={locale:r,translate:this.props.translate||hx(r)};b.locale(null!==(t=null==lx?void 0:lx[r])&&void 0!==t?t:r);var i=(null===(n=e.prototype)||void 0===n?void 0:n.isReactComponent)||e.$$typeof===Symbol.for("react.forward_ref")?{ref:this.childRef}:{forwardedRef:this.childRef},a=Qp.createElement(e,p({},this.props,o,i));return this.context?a:Qp.createElement(mx.Provider,{value:r},a)},n}(Qp.Component),n.displayName="I18N(".concat(e.displayName||e.name,")"),n.contextType=mx,n.ComposedComponent=e,n),e);return Array.isArray(t)&&t.forEach(function(t){e.prototype[t]&&(r.prototype[t]=function(){var e,n=null===(e=this.ref)||void 0===e?void 0:e[t];return n?n.apply(this.ref,arguments):void 0})}),r}var gx=function(e){function t(t){var n,r=this;return(r=e.call(this,t)||this).store=t.rootStore.addStore({id:Mc(),path:r.props.$path,storeType:Jy.name,parentId:""}),r.store.updateContext(t.context,!0),r.store.initData(t.data),r.store.updateLocation(t.location,null===(n=r.props.env)||void 0===n?void 0:n.parseLocation),kd(r,["handleAction","dispatchEvent","handleDialogConfirm","handleDialogClose","handleDrawerConfirm","handleDrawerClose","handlePageVisibilityChange"]),r.store.init(function(){if(hb()){var e=t.schema,n=["tpl","dialog","drawer","cell","spinner","group","container","dropdown-button","plain"];return Xd(e,function(e,t){"type"===t&&(n.push(e),"form"===e&&n.push("panel"))}),hb(n)?function(e,t){return void 0===t&&(t=!1),u(this,void 0,void 0,function(){var n,r;return o(this,function(o){switch(o.label){case 0:return n=Array.isArray(e)?e:[e],r=n.map(function(e){var n=ob[e];if(!n&&!t)throw new Error("Can not find the renderer by type: ".concat(e));return n}).filter(fb),r.length?[4,Promise.all(r.map(function(e){return pb(e)}))]:[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})}(n,!0):void 0}}),r}return s(t,e),t.prototype.componentDidMount=function(){if(this.store.setGlobalVars(this.props.globalVars),document.addEventListener("visibilitychange",this.handlePageVisibilityChange),void 0!==this.props.env.affixOffsetTop||void 0!==this.props.env.affixOffsetBottom){var e=(0,ef.findDOMNode)(this);(null==e?void 0:e.parentElement)&&(e.parentElement.style.cssText+="--affix-offset-top: ".concat(this.props.env.affixOffsetTop||0,"px; --affix-offset-bottom: ").concat(this.props.env.affixOffsetBottom||0,"px;"))}},t.prototype.componentDidUpdate=function(e){var t,n=this.props;n.globalVars!==e.globalVars&&this.store.setGlobalVars(n.globalVars),n.location!==e.location&&this.store.updateLocation(n.location,null===(t=this.props.env)||void 0===t?void 0:t.parseLocation);var r=!1;n.context!==e.context&&(r=!0,this.store.updateContext(n.context)),(n.data!==e.data||r)&&this.store.initData(n.data)},t.prototype.componentDidCatch=function(e,t){var n,r;null===(r=null===(n=this.props.env)||void 0===n?void 0:n.errorCatcher)||void 0===r||r.call(n,e,t),this.store.setRuntimeError(e,t)},t.prototype.componentWillUnmount=function(){this.props.rootStore.removeStore(this.store),document.removeEventListener("visibilitychange",this.handlePageVisibilityChange)},t.prototype.handlePageVisibilityChange=function(){var e=this.props.env;"hidden"===document.visibilityState?null==e||e.tracker({eventType:"pageHidden"}):"visible"===document.visibilityState&&(null==e||e.tracker({eventType:"pageVisible"}))},t.prototype.handleAction=function(e,t,n,r,a){var s,l,c=this;void 0===r&&(r=!1);var d=this.props,f=d.env,h=d.messages,v=d.onAction,m=d.mobileUI,y=d.render,g=this.store;if(!1!==(null==v?void 0:v(e,t,n,r,a||this.context))){var b=a||this.context;if("reload"===t.actionType)t.target&&b.reload(t.target,n);else if(t.target)t.target.split(",").forEach(function(e){var r=b.getComponentByName(e);r&&r.doAction&&r.doAction(p(p({},t),{target:void 0}),n)});else if("url"===t.actionType||"link"===t.actionType||"jump"===t.actionType){if(!f||!f.jumpTo)throw new Error("env.jumpTo is required!");f.jumpTo(ic(t.to||t.url||t.link,n,"| raw"),t,n)}else if("email"===t.actionType){var w=ic(t.to,n),x=(0,Cm.default)((0,ly.default)(t,"to","cc","bcc","subject","body"),function(e){return ic(e,n)}),E=Pc.default.stringify(x),O="mailto:".concat(w,"?").concat(E);window.open(O)}else{if("dialog"===t.actionType)return g.setCurrentAction(t,this.props.resolveDefinitions),new Promise(function(e){g.openDialog(n,void 0,function(n,r){var o;null===(o=t.callback)||void 0===o||o.call(t,n,r),e({confirmed:n,value:r})},a||c.context)});if("drawer"===t.actionType)return g.setCurrentAction(t,this.props.resolveDefinitions),new Promise(function(e){g.openDrawer(n,void 0,function(n,r){var o;null===(o=t.callback)||void 0===o||o.call(t,n,r),e({confirmed:n,value:r})},a)});if("toast"===t.actionType)null===(l=null===(s=t.toast)||void 0===s?void 0:s.items)||void 0===l||l.forEach(function(e){var r=e.level,o=e.body,a=e.title,s=i(e,["level","body","title"]);f.notify(r||"info",o?y("body",o,p(p({},c.props),{data:n,context:g.context})):"",p(p(p({},t.toast),s),{title:a?y("title",a,p(p({},c.props),{data:n,context:g.context})):null,mobileUI:m}))});else if("ajax"===t.actionType)g.setCurrentAction(t,this.props.resolveDefinitions),g.saveRemote(t.api,n,{successMessage:t.messages&&t.messages.success||h&&h.saveSuccess,errorMessage:t.messages&&t.messages.failed||h&&h.saveSuccess}).then(function(){return u(c,void 0,void 0,function(){var e;return o(this,function(r){switch(r.label){case 0:return t.feedback&&Gc(t.feedback,g.data)?[4,this.openFeedback(t.feedback,g.data)]:[3,2];case 1:r.sent(),r.label=2;case 2:return(e=t.redirect&&ic(t.redirect,g.data))&&f.jumpTo(e,t,g.data),t.reload&&this.reloadTarget(a||this.context,Bg(t.reload,n),g.data),[2]}})})}).catch(function(e){if(r||t.countDown)throw e});else if("copy"===t.actionType&&(t.content||t.copy))f.copy&&f.copy(ic(t.content||t.copy,n,"| raw"),{format:t.copyFormat});else if("saveAs"===t.actionType){var S=Sh(t.api);if("string"==typeof S.url){var A=t.fileName||"data.txt";t.fileName||-1===S.url.indexOf(".")||(A=S.url.split("/").pop()),(0,Om.saveAs)(S.url,A)}}}}},t.prototype.dispatchEvent=function(e,t,n,r){return function(e,t,n,r){var i,s,l,c,d,p,f,h;return u(this,void 0,void 0,function(){var v,m,y,g,b,w,x,E,O,S,A,C,_,D,N=this;return o(this,function(k){switch(k.label){case 0:if(v=null,m="string"==typeof e?e:e.type,y=(null==t?void 0:t.props.id)||(null==t?void 0:t.props.name)||"",vh("event","dispatch `".concat(m,"` from 「").concat((null==t?void 0:t.props.type)||"unknown").concat(y?"#".concat(y):"","」"),r),null===(l=null===(s=null===(i=null==t?void 0:t.props)||void 0===i?void 0:i.env)||void 0===s?void 0:s.beforeDispatchEvent)||void 0===l||l.call(s,e,t,n,r,void 0),!(null===(d=null===(c=null==t?void 0:t.props)||void 0===c?void 0:c.onEvent)||void 0===d?void 0:d[m]))return[2,Promise.resolve()];if(v=rg(t),!tg.length)return[2,Promise.resolve()];g=ng(m,{env:null===(p=null==t?void 0:t.props)||void 0===p?void 0:p.env,nativeEvent:e,data:r,scoped:n}),b=tg.filter(function(e){var n,r;return e.type===m&&e.renderer===t&&e.actions===(null===(r=null===(n=t.props)||void 0===n?void 0:n.onEvent)||void 0===r?void 0:r[m].actions)}).sort(function(e,t){return t.weight-e.weight}),w=0,x=function(){++w===b.length&&(null==v||v(m))},E=function(e){var n,r,i,a,s,l,c,d,p,v,m,y,b;return o(this,function(w){switch(w.label){case 0:return n=(null==e?void 0:e.debounce)||{},r=n.wait,i=void 0===r?100:r,a=n.trailing,s=void 0===a||a,l=n.leading,c=void 0!==l&&l,d=n.maxWait,p=void 0===d?1e4:d,(null==e?void 0:e.debounce)?(v=(0,Am.default)(function(){return u(N,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,Lm(e.actions,e.renderer,g)];case 1:return t.sent(),x(),[2]}})})},i,{trailing:s,leading:c,maxWait:p}),tg.forEach(function(t){t.renderer===e.renderer&&e.type===t.type&&(t.executing=!0,t.debounceInstance=v)}),v(),[3,3]):[3,1];case 1:return[4,Lm(e.actions,e.renderer,g)];case 2:w.sent(),x(),w.label=3;case 3:return(null==e?void 0:e.track)&&(m=e.track,y=m.id,b=m.name,null===(h=null===(f=null==t?void 0:t.props)||void 0===f?void 0:f.env)||void 0===h||h.tracker({eventType:e.type,eventData:{trackId:y,trackName:b}})),g.stoped?[2,"break"]:[2]}})},k.label=1;case 1:k.trys.push([1,6,7,8]),O=a(b),S=O.next(),k.label=2;case 2:return S.done?[3,5]:(A=S.value,[5,E(A)]);case 3:if("break"===k.sent())return[3,5];k.label=4;case 4:return S=O.next(),[3,2];case 5:return[3,8];case 6:return C=k.sent(),_={error:C},[3,8];case 7:try{S&&!S.done&&(D=O.return)&&D.call(O)}finally{if(_)throw _.error}return[7];case 8:return[2,Promise.resolve(g)]}})})}(e,n,r,t)},t.prototype.handleDialogConfirm=function(e,t){for(var n,r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=this.store;t.mergeData&&1===e.length&&e[0]&&i.updateData(e[0]);var a=i.action.dialog;if(!a||!a.onConfirm||!1!==a.onConfirm.apply(a,f([e,t],d(r),!1))){var s=i.action,u=null!==(n=t.reload)&&void 0!==n?n:s.reload,l=i.getDialogScoped()||this.context;i.closeDialog(!0,e),u&&l.reload(u,i.data)}},t.prototype.handleDialogClose=function(e){void 0===e&&(e=!1),this.store.closeDialog(e)},t.prototype.handleDrawerConfirm=function(e,t){for(var n,r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=this.store;t.mergeData&&1===e.length&&e[0]&&i.updateData(e[0]);var a=i.action.drawer;if(!a||!a.onConfirm||!1!==a.onConfirm.apply(a,f([e,t],d(r),!1))){var s=i.action,u=null!==(n=t.reload)&&void 0!==n?n:s.reload,l=i.getDrawerScoped()||this.context;i.closeDrawer(!0,e),setTimeout(function(){u&&l.reload(u,i.data)},300)}},t.prototype.handleDrawerClose=function(){this.store.closeDrawer(!1)},t.prototype.openFeedback=function(e,t){var n=this;return new Promise(function(r){var o=n.store;o.setCurrentAction({type:"button",actionType:"dialog",dialog:e},n.props.resolveDefinitions),o.openDialog(t,void 0,function(e){r(e)},n.context)})},t.prototype.reloadTarget=function(e,t,n){e.reload(t,n)},t.prototype.renderRuntimeError=function(){var e,t=this.props,n=t.render,r=i(t,["render"]),o=this.store;return n("error",{type:"alert",level:"danger"},p(p({},r),{topStore:o,body:Qp.createElement(Qp.Fragment,null,Qp.createElement("h3",null,null===(e=o.runtimeError)||void 0===e?void 0:e.toString()),Qp.createElement("pre",null,Qp.createElement("code",null,o.runtimeErrorStack.componentStack)))}))},t.prototype.renderSpinner=function(){var e=this.props,t=e.render,n=i(e,["render"]),r=this.store;return t("spinner",{type:"spinner"},p(p({},n),{topStore:r,show:r.loading}))},t.prototype.renderError=function(){var e=this.props,t=e.render,n=i(e,["render"]),r=this.store;return r.error?t("error",{type:"alert"},p(p({},n),{topStore:this.store,body:r.msg,showCloseButton:!0,onClose:r.clearMessage})):null},t.prototype.renderDialog=function(){var e=this.props,t=e.render,n=i(e,["render"]),r=this.store;return t("dialog",p(p({},r.dialogSchema),{type:"dialog"}),p(p({},n),{key:"dialog",topStore:this.store,data:r.dialogData,context:r.context,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:r.dialogOpen,onAction:this.handleAction,dispatchEvent:this.dispatchEvent}))},t.prototype.renderDrawer=function(){var e=this.props,t=e.render,n=i(e,["render"]),r=this.store;return t("drawer",p(p({},r.drawerSchema),{type:"drawer"}),p(p({},n),{key:"drawer",topStore:this.store,data:r.drawerData,context:r.context,onConfirm:this.handleDrawerConfirm,onClose:this.handleDrawerClose,show:r.drawerOpen,onAction:this.handleAction,dispatchEvent:this.dispatchEvent}))},t.prototype.render=function(){var e=this.props,t=e.pathPrefix,n=e.schema,r=e.render;e.globalVars;var o=i(e,["pathPrefix","schema","render","globalVars"]),a=this.store;return a.runtimeError?this.renderRuntimeError():a.ready?Qp.createElement(Qp.Fragment,null,r(t,n,p(p({},o),{topStore:this.store,data:this.store.downStream,context:a.context,onAction:this.handleAction,dispatchEvent:this.dispatchEvent})),this.renderSpinner(),this.renderError(),this.renderDialog(),this.renderDrawer()):Qp.createElement(Mb,{className:"RootLoader"})},t.contextType=Wg,c([Gf,l("design:paramtypes",[Object])],t)}(Qp.Component),bx=/* @__PURE__ */n((e,t)=>{var n=re(),r=A(),o=H(),i=y(),a=oe(),s=X();t.exports=function(e,t,u,l){var c=-1,d=r,p=!0,f=e.length,h=[],v=t.length;if(!f)return h;u&&(t=i(t,a(u))),l?(d=o,p=!1):t.length>=200&&(d=s,p=!1,t=new n(t));e:for(;++c<f;){var m=e[c],y=null==u?m:u(m);if(m=l||0!==m?m:0,p&&y==y){for(var g=v;g--;)if(t[g]===y)continue e;h.push(m)}else d(t,y,l)||h.push(m)}return h}}),wx=/* @__PURE__ */n((e,t)=>{var n=bx(),r=Kp(),o=us(),i=Ha(),a=o(function(e,t){return i(e)?n(e,r(t,1,i,!0)):[]});t.exports=a}),xx=/* @__PURE__ */n(e=>{var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=Symbol.for("react.module.reference");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case i:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case s:case l:case f:case p:case a:return e;default:return h}}case n:return h}}}e.ContextConsumer=s,e.ContextProvider=a,e.Element=t,e.ForwardRef=l,e.Fragment=r,e.Lazy=f,e.Memo=p,e.Portal=n,e.Profiler=i,e.StrictMode=o,e.Suspense=c,e.SuspenseList=d,e.isAsyncMode=function(){return!1},e.isConcurrentMode=function(){return!1},e.isContextConsumer=function(e){return m(e)===s},e.isContextProvider=function(e){return m(e)===a},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},e.isForwardRef=function(e){return m(e)===l},e.isFragment=function(e){return m(e)===r},e.isLazy=function(e){return m(e)===f},e.isMemo=function(e){return m(e)===p},e.isPortal=function(e){return m(e)===n},e.isProfiler=function(e){return m(e)===i},e.isStrictMode=function(e){return m(e)===o},e.isSuspense=function(e){return m(e)===c},e.isSuspenseList=function(e){return m(e)===d},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===i||e===o||e===c||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===l||e.$$typeof===v||void 0!==e.getModuleId)},e.typeOf=m}),Ex=/* @__PURE__ */n(e=>{"production"!==process.env.NODE_ENV&&function(){var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=Symbol.for("react.module.reference");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var v=e.type;switch(v){case r:case i:case o:case c:case d:return v;default:var m=v&&v.$$typeof;switch(m){case u:case s:case l:case f:case p:case a:return m;default:return h}}case n:return h}}}var y=s,g=a,b=t,w=l,x=r,E=f,O=p,S=n,A=i,C=o,_=c,D=d,N=!1,k=!1;e.ContextConsumer=y,e.ContextProvider=g,e.Element=b,e.ForwardRef=w,e.Fragment=x,e.Lazy=E,e.Memo=O,e.Portal=S,e.Profiler=A,e.StrictMode=C,e.Suspense=_,e.SuspenseList=D,e.isAsyncMode=function(e){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},e.isConcurrentMode=function(e){return k||(k=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},e.isContextConsumer=function(e){return m(e)===s},e.isContextProvider=function(e){return m(e)===a},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},e.isForwardRef=function(e){return m(e)===l},e.isFragment=function(e){return m(e)===r},e.isLazy=function(e){return m(e)===f},e.isMemo=function(e){return m(e)===p},e.isPortal=function(e){return m(e)===n},e.isProfiler=function(e){return m(e)===i},e.isStrictMode=function(e){return m(e)===o},e.isSuspense=function(e){return m(e)===c},e.isSuspenseList=function(e){return m(e)===d},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===i||e===o||e===c||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===l||e.$$typeof===v||void 0!==e.getModuleId)},e.typeOf=m}()}),Ox=/* @__PURE__ */n((e,t)=>{"production"===process.env.NODE_ENV?t.exports=xx():t.exports=Ex()});function Sx(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Ax="production"!==process.env.NODE_ENV?aw.default.oneOfType([aw.default.number,aw.default.shape({enter:aw.default.number,exit:aw.default.number,appear:aw.default.number}).isRequired]):null,Cx="production"!==process.env.NODE_ENV?aw.default.oneOfType([aw.default.string,aw.default.shape({enter:aw.default.string,exit:aw.default.string,active:aw.default.string}),aw.default.shape({enter:aw.default.string,enterDone:aw.default.string,enterActive:aw.default.string,exit:aw.default.string,exitDone:aw.default.string,exitActive:aw.default.string})]):null,_x=Qp.createContext(null),Dx="unmounted",Nx="exited",kx="entering",Ix="entered",Tx="exiting",Px=/* @__PURE__ */function(e){function t(t,n){var r,o=e.call(this,t,n)||this,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=Nx,o.appearStatus=kx):r=Ix:r=t.unmountOnExit||t.mountOnEnter?Dx:Nx,o.state={status:r},o.nextCallback=null,o}Hv(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:Nx}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t=kx):"entering"!==n&&"entered"!==n||(t=Tx)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n=this.props.timeout,r=e=t=n;return null!=n&&"number"!=typeof n&&(r=n.exit,e=n.enter,t=void 0!==n.appear?n.appear:e),{exit:r,enter:e,appear:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:Dx})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[ef.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),u=r?s.appear:s.enter;e||n?(this.props.onEnter(i,a),this.safeSetState({status:kx},function(){t.props.onEntering(i,a),t.onTransitionEnd(u,function(){t.safeSetState({status:Ix},function(){t.props.onEntered(i,a)})})})):this.safeSetState({status:Ix},function(){t.props.onEntered(i)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ef.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:Tx},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Nx},function(){e.props.onExited(r)})})})):this.safeSetState({status:Nx},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ef.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Lv(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);/* @__PURE__ */
|
|
3
|
-
return Qp.createElement(_x.Provider,{value:null},"function"==typeof n?n(e,r):Qp.cloneElement(Qp.Children.only(n),r))},t}(Qp.Component);function Fx(){}Px.contextType=_x,Px.propTypes="production"!==process.env.NODE_ENV?{nodeRef:aw.default.shape({current:"undefined"==typeof Element?aw.default.any:function(e,t,n,r,o,i){var a=e[t];return aw.default.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,i)}}),children:aw.default.oneOfType([aw.default.func.isRequired,aw.default.element.isRequired]).isRequired,in:aw.default.bool,mountOnEnter:aw.default.bool,unmountOnExit:aw.default.bool,appear:aw.default.bool,enter:aw.default.bool,exit:aw.default.bool,timeout:function(e){var t=Ax;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.apply(void 0,[e].concat(r))},addEndListener:aw.default.func,onEnter:aw.default.func,onEntering:aw.default.func,onEntered:aw.default.func,onExit:aw.default.func,onExiting:aw.default.func,onExited:aw.default.func}:{},Px.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Fx,onEntering:Fx,onEntered:Fx,onExit:Fx,onExiting:Fx,onExited:Fx},Px.UNMOUNTED=Dx,Px.EXITED=Nx,Px.ENTERING=kx,Px.ENTERED=Ix,Px.EXITING=Tx;var jx=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Sx(n.className,r):n.setAttribute("class",Sx(n.className&&n.className.baseVal||"",r)));var n,r})},Rx=/* @__PURE__ */function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}Hv(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&jx(e,r),o&&jx(e,o),i&&jx(e,i)},n.render=function(){var e=this.props;e.classNames;var t=Lv(e,["classNames"]);/* @__PURE__ */
|
|
4
|
-
return Qp.createElement(Px,Mv({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Qp.Component);function Vx(e){var t=e.schema,n=e.component,r=e.show,o=(t.animations||{}).enter,i=d((0,Qp.useState)(!(null==o?void 0:o.inView)),2),a=i[0],s=i[1],u=d((0,Qp.useState)(!!(null==o?void 0:o.inView)),2),l=u[0],c=u[1],f=(0,Qp.useMemo)(function(){return function(e){return e?(e=(e=(e=e.replace(/[^a-zA-Z0-9-]/g,"-")).replace(/-{2,}/g,"-")).replace(/^-|-$/g,""),/^\d/.test(e)&&(e="amis-"+e),e):Mc()}(t.id)},[]),h=(0,Qp.useMemo)(function(){return new IntersectionObserver(function(e,t){e.forEach(function(e){"animation-placeholder"===e.target.getAttribute("data-role")?e.isIntersecting&&(s(!0),c(!1),t.unobserve(e.target)):e.isIntersecting||(s(!1),t.unobserve(e.target))})},{root:null,rootMargin:"0px",threshold:.1})},[]),v=(0,Qp.useMemo)(function(){var e=null==t?void 0:t.animations,n={appear:"",enter:"",exit:""};return e&&(e.enter&&(n.enter="".concat(e.enter.type,"-").concat(f,"-enter"),n.appear=n.enter),e.exit&&(n.exit="".concat(e.exit.type,"-").concat(f,"-exit"))),n},[]),m=(0,Qp.useMemo)(function(){var e=null==t?void 0:t.animations,n={enter:0,exit:0};return e&&(e.enter&&(n.enter=1e3*((e.enter.duration||1)+(e.enter.delay||0))),e.exit&&(n.exit=1e3*((e.exit.duration||1)+(e.exit.delay||0)))),n},[]);(0,Qp.useEffect)(function(){return function(e,t){var n,r={};Object.keys(t).forEach(function(n){var o=t[n];o&&(r=Object.assign(r,"hover"===n?function(e,t){var n,r,o={};return["hoverFlash","hoverShake"].includes(t.name)&&((n={})["".concat(e,":hover,").concat(e,"-show")]={animation:"".concat(t.name," ").concat(t.duration||1,"s ease ").concat(t.delay||0,"s ").concat(t.repeat||1)},o=n),p(((r={})[e]={transition:"all ".concat(t.duration||1,"s ease ").concat(t.delay||0,"s")},r),o)}(".".concat(o.type,"-").concat(e,"-").concat(n),{name:o.type,duration:o.duration,delay:o.delay,repeat:o.repeat}):function(e,t){var n;return(n={})[e.join(",")]={animationName:t.name,animationDuration:"".concat(t.duration||1,"s"),animationIterationCount:t.iterationCount||1,animationDelay:"".concat(t.delay||0,"s"),animationTimingFunction:t.timingFunction||"ease",animationFillMode:t.fillMode||"none"},n}([".".concat(o.type,"-").concat(e,"-").concat(n)],{name:o.type,duration:o.duration,iterationCount:"attention"===n?"infinite":1,delay:o.delay,fillMode:"attention"===n?"none":"forwards"})))}),tx.updateStyle(((n={})[e]=r,n))}(f,t.animations),function(){t.animations&&tx.removeStyles(f),h.disconnect()}},[]);var y=(0,Qp.useCallback)(function(e){var n=t.animations||{},r=n.attention,o=n.exit,i=n.enter,a=n.hover;r&&e.classList.add("".concat(r.type,"-").concat(f,"-attention")),a&&(e.classList.add("".concat(a.type,"-").concat(f,"-hover")),e.classList.add("amis-".concat(a.type))),((null==o?void 0:o.outView)||(null==i?void 0:i.repeat))&&h.observe(e)},[]),g=(0,Qp.useCallback)(function(e){var n=t.animations||{},r=n.attention,o=n.hover;r&&e.classList.remove("".concat(r.type,"-").concat(f,"-attention")),o&&(e.classList.remove("".concat(o.type,"-").concat(f,"-hover")),e.classList.remove("amis-".concat(o.type)))},[]),b=(0,Qp.useCallback)(function(){c(!0)},[]);return Qp.createElement(Qp.Fragment,null,!a&&r&&l&&Qp.createElement("div",{ref:function(e){e&&h.observe(e)},className:"amis-animation-placeholder","data-role":"animation-placeholder"},n),Qp.createElement(Rx,{in:a&&r,timeout:m,classNames:v,onEntered:y,onExit:g,onExited:b,appear:!0,unmountOnExit:!0},n))}Rx.defaultProps={classNames:""},Rx.propTypes="production"!==process.env.NODE_ENV?Mv({},Px.propTypes,{classNames:Cx,onEnter:aw.default.func,onEntering:aw.default.func,onEntered:aw.default.func,onExit:aw.default.func,onExiting:aw.default.func,onExited:aw.default.func}):{},S();var Mx=/* @__PURE__ */t(wx()),Lx=Ox();S();var $x=["type","name","$ref","className","style","data","originData","children","ref","visible","loading","visibleOn","hidden","hiddenOn","disabled","disabledOn","static","staticOn","component","detectField","defaultValue","defaultData","required","requiredOn","syncSuperStore","mode","body","id","inputOnly","label","renderLabel","trackExpression","editorSetting","updatePristineAfterStoreDataReInit","source"],zx=new xp,Bx=function(e){function t(t){var n=e.call(this,t)||this;n.rendererKey="",n.toDispose=[],n.unbindEvent=void 0,n.unbindGlobalEvent=void 0,n.isStatic=void 0,n.refFn=n.refFn.bind(n),n.renderChild=n.renderChild.bind(n),n.reRender=n.reRender.bind(n),n.resolveRenderer(n.props),n.dispatchEvent=n.dispatchEvent.bind(n),n.storeRef=n.storeRef.bind(n),n.handleGlobalVarChange=n.handleGlobalVarChange.bind(n);var r=t.schema;return n.toDispose.push(Mn(function(){var e,n,o,i=ic(r.id,t.data),a=ic(r.name,t.data);return"".concat(null!==(e=t.statusStore.visibleState[i])&&void 0!==e?e:t.statusStore.visibleState[a]).concat(null!==(n=t.statusStore.disableState[i])&&void 0!==n?n:t.statusStore.disableState[a]).concat(null!==(o=t.statusStore.staticState[i])&&void 0!==o?o:t.statusStore.staticState[a])},function(){return n.forceUpdate()})),n.toDispose.push(function(e,t,n){var r=[];return Object.keys(e).forEach(function(t){var n=e[t];Ky(n)?r.push({key:t,value:n}):(0,$u.default)(n)&&!n.type?Object.keys(n).forEach(function(e){Ky(n[e])&&r.push({key:"".concat(t,".").concat(e),value:n[e]})}):["items","body","buttons","header","columns","tabs","footer","actions","toolbar"].includes(t)&&(Array.isArray(n)?n:[n]).forEach(function(e){Ky(null==e?void 0:e.visibleOn)?r.push({key:"".concat(t,".x.visibleOn"),value:e.visibleOn}):Ky(null==e?void 0:e.hiddenOn)&&r.push({key:"".concat(t,".x.hiddenOn"),value:e.hiddenOn})})}),r.length?Mn(function(){return r.map(function(e){return"".concat(e.key,":").concat(Qs(e.value,t.nextGlobalData,"| json"))}).join(",")},n):function(){}}(r,t.topStore,n.handleGlobalVarChange)),n}return s(t,e),t.prototype.componentWillUnmount=function(){var e,t;this.toDispose.forEach(function(e){return e()}),this.toDispose=[],null===(e=this.unbindEvent)||void 0===e||e.call(this),null===(t=this.unbindGlobalEvent)||void 0===t||t.call(this)},t.prototype.shouldComponentUpdate=function(e){var t=this.props,n=(0,Mx.default)(Object.keys(e),["schema","scope"]);if((0,Mx.default)(Object.keys(t),["schema","scope"]).length!==n.length||$c(n,this.props,e))return!0;var r=Object.keys(e.schema);return!(Object.keys(t.schema).length===r.length&&!$c(r,t.schema,e.schema))},t.prototype.storeRef=function(e){this.subStore=e},t.prototype.handleGlobalVarChange=function(){var e,t,n=this,r=null===(e=this.renderer)||void 0===e?void 0:e.onGlobalVarChanged,o=this.props.topStore,i=Bu(this.props.data).filter(function(e){return!e.hasOwnProperty("__isTempGlobalLayer")}),a=(0,qm.default)(i,function(e){return e.hasOwnProperty("global")||e.hasOwnProperty("globalState")}),s={global:o.nextGlobalData.global,globalState:o.nextGlobalData.globalState,__page:o.nextGlobalData.__page,appVariables:o.nextGlobalData.appVariables,__isTempGlobalLayer:!0};-1!==a&&i.splice(a+1,0,s);var u=Uu(i);!1!==(null==r?void 0:r(this.cRef,this.props.schema,u))&&(this.tmpData=u,null===(t=this.subStore)||void 0===t||t.temporaryUpdateGlobalVars(s),o.addSyncGlobalVarStatePendingTask(function(e){return n.forceUpdate(e)},function(){var e;delete n.tmpData,null===(e=n.subStore)||void 0===e||e.unDoTemporaryUpdateGlobalVars()}))},t.prototype.resolveRenderer=function(e,t){void 0===t&&(t=!1);var n=e.schema,r=e.$path;if(n&&n.$ref&&(n=p(p({},e.resolveDefinitions(n.$ref)),n),r=r.replace(/(?!.*\/).*/,n.type)),!(null==n?void 0:n.type)||!t&&this.renderer&&this.rendererKey==="".concat(n.type,"-").concat(n.$$id)){if(n.children&&!n.component&&n.asFormItem&&(n.component=Ux,n.renderChildren=n.children,delete n.children),n.component&&!n.component.wrapedAsFormItem&&n.asFormItem){var o=zx.get(n.component);if(o)n.component=o;else{var i=Cw(p({strictMode:!1},n.asFormItem))(n.component);zx.set(n.component,i),i.wrapedAsFormItem=!0,n.component=i}}}else this.renderer=(e.env.rendererResolver||bb)(r,n,e),this.rendererKey="".concat(n.type,"-").concat(n.$$id);return{path:r,schema:n}},t.prototype.getWrappedInstance=function(){return this.cRef},t.prototype.refFn=function(e){this.ref=e},t.prototype.childRef=function(e){for(var t,n,r,o=this;null===(t=null==e?void 0:e.getWrappedInstance)||void 0===t?void 0:t.call(e);)e=e.getWrappedInstance();e&&!e.props&&Object.defineProperty(e,"props",{get:function(){return o.props}}),e&&(null===(n=this.unbindEvent)||void 0===n||n.call(this),null===(r=this.unbindGlobalEvent)||void 0===r||r.call(this),this.unbindEvent=rg(e),this.unbindGlobalEvent=function(e){var t,n;if(e){var r=e.props.$schema.onEvent,o=[];if(r){var i=function(t){var n=r[t];if("function"!=typeof BroadcastChannel)return console.error("BroadcastChannel is not supported in your browser"),{value:void 0};var i=new BroadcastChannel(t);o.push({renderer:e,bc:i}),i.onmessage=function(t){var r,o=t.data,i=o.eventName,a=o.data,s=ng(i,{env:null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.env,nativeEvent:i,scoped:null==e?void 0:e.context,data:a});Lm(n.actions.filter(function(e){return!("broadcast"===e.actionType&&e.eventName===i)}),e,s)}};try{for(var s=a(Object.keys(r)),u=s.next();!u.done;u=s.next()){var l=i(u.value);if("object"==typeof l)return l.value}}catch(c){t={error:c}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return function(){o.filter(function(t){return t.renderer===e}).forEach(function(e){return e.bc.close()})}}}}(e)),this.cRef=e},t.prototype.dispatchEvent=function(e,t,n,r){return this.props.dispatchEvent(e,t,n||this.cRef,r||this.context)},t.prototype.renderChild=function(e,t,n){var r,o,a,s;void 0===n&&(n={});var u=this.props,l=u.schema;u.$path;var c=u.env,d=u.render,f=i(u,["schema","$path","env","render"]),h=this.resolveRenderer(this.props).path,v=$x.concat();if(this.renderer){var m=this.renderer.component;null!=m&&m.propsList&&v.push.apply(v,m.propsList)}return d("".concat(h).concat(e?"/".concat(e):""),t||"",p(p(p(p({},(0,yh.default)(f,v)),{defaultStatic:null!==(a=null!==(o=(!(null===(r=this.renderer)||void 0===r?void 0:r.type)||!["drawer","dialog"].includes(this.renderer.type))&&void 0)&&void 0!==o?o:this.isStatic)&&void 0!==a?a:l.staticOn?lc(l.staticOn,f.data):null!==(s=l.static)&&void 0!==s?s:f.defaultStatic}),n),{data:this.tmpData&&n.data===this.props.data?this.tmpData:n.data||f.data,env:c}))},t.prototype.reRender=function(){this.resolveRenderer(this.props,!0),this.forceUpdate()},t.prototype.render=function(){var e,t,n,r,s,l,c,h,v,m=this,y=this.props;y.$path;var g=y.schema,b=y.rootStore,w=y.statusStore,x=y.render,E=i(y,["$path","schema","rootStore","statusStore","render"]);if(null==g)return null;var O=this.resolveRenderer(this.props),S=O.path,A=O.schema,C=this.props.env.theme;if(Array.isArray(A))return x(S,A,E);E.data=this.tmpData||E.data;var _=A&&("&"===A.detectField?E:E[A.detectField||"data"]),D=_?Jg(A,_,void 0,E):{},N=ic(A.id,E.data),k=ic(A.name,E.data),I=fo(w)?null!==(n=w.visibleState[N])&&void 0!==n?n:w.visibleState[k]:void 0,T=fo(w)?null!==(r=w.disableState[N])&&void 0!==r?r:w.disableState[k]:void 0,P=fo(w)?null!==(s=w.staticState[N])&&void 0!==s?s:w.staticState[k]:void 0;if(this.isStatic=P,(!1===I||!0!==I&&D&&(D.hidden||!1===D.visible||A.hidden||!1===A.visible||E.hidden||!1===E.visible))&&(E.invisible=!0),A.children)return E.invisible?null:Qp.isValidElement(A.children)?A.children:"function"!=typeof A.children?null:A.children(p(p(p({},E),D),{$path:S,$schema:A,render:this.renderChild,forwardedRef:this.refFn,rootStore:b,statusStore:w,dispatchEvent:this.dispatchEvent}));if(A.component&&(0,Lx.isValidElementType)(A.component)){var F=!(A.component.prototype instanceof Qp.Component),j=A.data,R=A.value,V=A.activeKey,M=A.key,L=i(A,["data","value","activeKey","key"]);return E.invisible?null:Qp.createElement(A.component,p(p(p(p({},E),L),D),{defaultData:j,defaultValue:R,defaultActiveKey:V,propKey:M,$path:S,$schema:A,ref:F?void 0:this.refFn,forwardedRef:F?this.refFn:void 0,render:this.renderChild,rootStore:b,statusStore:w,dispatchEvent:this.dispatchEvent}))}if(0===Object.keys(A).length)return null;if(!this.renderer)return E.invisible?null:Qp.createElement(Mb,{defaultVisible:!0,getComponent:function(){return u(m,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:return[4,E.env.loadRenderer(A,S,this.reRender)];case 1:return(e=t.sent())&&"function"==typeof e?[2,e]:e&&Qp.isValidElement(e)?[2,function(){return e}]:(this.reRender(),[2,function(){return db(A,S)}])}})})}});if(this.renderer.getComponent&&!this.renderer.component)return E.invisible?null:Qp.createElement(Mb,{defaultVisible:!0,getComponent:function(){return u(m,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,pb(this.renderer)];case 1:return e.sent(),this.reRender(),[2,function(){return null}]}})})}});var $=this.renderer;A=function(e,t,n){return ab.reduce(function(e,r){return r(e,t,n)},e)}(A,$,E);var z=A.data,B=A.value,U=A.activeKey,q=A.key,W=i(A,["data","value","activeKey","key"]),H=$.component,G=!0;if(E.invisible&&(D.hidden||!1===D.visible||!$.isFormItem||!1!==A.visible&&!A.hidden)){if(!A.animations)return null;G=!1}$.storeType&&(D={});var K,Y,J=(null===(l=H.prototype)||void 0===l?void 0:l.isReactComponent)||H.$$typeof===Symbol.for("react.forward_ref"),X=p(p(p(p(p(p({},null===(c=$.defaultProps)||void 0===c?void 0:c.call($,A.type,A)),C.getRendererConfig($.name)),W),function(e,t){var n={};return Object.keys(e).forEach(function(r){var o;"on"===r.substr(0,2)&&"function"==typeof e[r]&&"function"==typeof t[r]&&t[r]!==e[r]?e.formStore&&"onChange"===r?n[r]=e[r]:n[r]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.reduce(function(e,n){return!1!==e&&("function"==typeof n?n.apply(void 0,f([],d(t),!1)):void 0)},void 0)}}(t[r],e[r]):n[r]=null!==(o=e[r])&&void 0!==o?o:t[r]}),n}(E,W)),D),{defaultData:null!==(h=W.defaultData)&&void 0!==h?h:z,defaultValue:null!==(v=W.defaultValue)&&void 0!==v?v:B,defaultActiveKey:U,propKey:q,$path:S,$schema:A,render:this.renderChild,rootStore:b,statusStore:w,dispatchEvent:this.dispatchEvent,mobileUI:!1!==A.useMobileUI&&E.mobileUI});if(A.style&&(X.style=(K=X.style,Y=Ww(A.style,_),K||Y?K?Y?Object.assign({},Hw(K),Hw(Y)):K:Y:{})),void 0!==T&&(X.disabled=T),void 0!==P&&(X.static=P),E.env.enableTestid&&(X.testid||X.id||null==X.testIdBuilder)&&(X.testIdBuilder instanceof dp||(X.testIdBuilder=new dp(X.testid||X.id))),$.autoVar)try{for(var Z=a(Object.keys(A)),Q=Z.next();!Q.done;Q=Z.next()){var ee=Q.value;"string"==typeof X[ee]&&_c(X[ee])&&(X[ee]=Qs(X[ee],X.data,"| raw"))}}catch(ne){e={error:ne}}finally{try{Q&&!Q.done&&(t=Z.return)&&t.call(Z)}finally{if(e)throw e.error}}var te=J?Qp.createElement(H,p({},X,{ref:this.childRef,storeRef:this.storeRef})):Qp.createElement(H,p({},X,{forwardedRef:this.childRef,storeRef:this.storeRef}));return A.animations&&(te=Qp.createElement(Vx,{schema:A,component:te,show:G})),this.props.env.enableAMISDebug?Qp.createElement(ph,{renderer:$},te):te},t.displayName="Renderer",t.contextType=Wg,c([Nd,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"childRef",null),t}(Qp.Component),Ux=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.childRef=Qp.createRef(),t}return s(t,e),t.prototype.getWrappedInstance=function(){return this.childRef.current},t.prototype.render=function(){var e=this.props,t=e.renderChildren,n=i(e,["renderChildren"]);return"function"==typeof t?t(p(p({},n),{ref:this.childRef})):null},t}(Qp.Component),qx=Ta.model("StatusStore",{visibleState:Ta.optional(Ta.frozen(),{}),disableState:Ta.optional(Ta.frozen(),{}),staticState:Ta.optional(Ta.frozen(),{})}).actions(function(e){return{setVisible:function(t,n){var r;e.visibleState=p(p({},e.visibleState),((r={})[t]=n,r))},setDisable:function(t,n){var r;e.disableState=p(p({},e.disableState),((r={})[t]=n,r))},setStatic:function(t,n){var r;e.staticState=p(p({},e.staticState),((r={})[t]=n,r))},resetAll:function(){e.visibleState={},e.disableState={},e.staticState={}}}});function Wx(e){var t=e.children,n=Qp.useMemo(function(){return qx.create({})},[]);return Qp.useEffect(function(){return function(){po(n)}},[]),t({statusStore:n})}var Hx=[];function Gx(e){Hx.push(e)}var Kx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.resolveDefinitions=function(e){var t=this.props.schema.definitions;return!e||id(t)?{}:t&&t[e]},t.prototype.render=function(){var e=this.props,t=e.schema,n=e.rootStore,r=e.env,o=e.pathPrefix,a=e.location,s=e.data,u=e.context,l=e.locale,c=e.translate,d=i(e,["schema","rootStore","env","pathPrefix","location","data","context","locale","translate"]),f=r.theme,h=this.props.theme||"cxd";return"default"===h&&(h="cxd"),Qp.createElement(Xg.Provider,{value:n},Qp.createElement(jb.Provider,{value:h},Qp.createElement(mx.Provider,{value:this.props.locale},Hx.reduce(function(e,t){return p(p({},e),{children:t(e)})},p(p({pathPrefix:o||"",schema:(0,$u.default)(t)?p({type:"page"},t):t},d),{render:Yx,rootStore:n,resolveDefinitions:this.resolveDefinitions,location:a,data:s,env:r,classnames:f.classnames,classPrefix:f.classPrefix,locale:l,translate:c,children:Qp.createElement(gx,p({pathPrefix:o||"",schema:(0,$u.default)(t)?p({type:"page"},t):t},d,{render:Yx,rootStore:n,resolveDefinitions:this.resolveDefinitions,location:a,data:s,context:u,env:r,classnames:f.classnames,classPrefix:f.classPrefix,locale:l,translate:c}))})).children)))},c([Nd,l("design:type",Function),l("design:paramtypes",[String]),l("design:returntype",void 0)],t.prototype,"resolveDefinitions",null),t}(Qp.Component);function Yx(e,t,n){var r;if(Array.isArray(t))return function(e,t,n){if(Array.isArray(t)){var r=n.key||n.propKey||n.id||"";return t.map(function(t,o){return Yx("".concat(e,"/").concat(o),t,p(p({},n),{key:"".concat(r?"".concat(r,"-"):"").concat(o)}))})}return Yx(e,t,n)}(e,t,n);var o=typeof t;if("undefined"===o||null===t)return null;if(Qp.isValidElement(t))return t;var i="string"===o||"number"===o?{type:"tpl",tpl:String(t)}:t,a=n.propsTransform;a&&(delete(n=p({},n)).propsTransform,n=a(n));var s=n.env.SchemaRenderer||Bx;return!["dialog","drawer"].includes(null==i?void 0:i.type)||(null==i?void 0:i.component)||(null==i?void 0:i.children)?Qp.createElement(s,p({render:Yx},n,{key:null!==(r=n.key)&&void 0!==r?r:i.key,schema:i,propKey:i.key,$path:"".concat(e?"".concat(e,"/"):"").concat(i&&i.type||"")})):Qp.createElement(Wx,null,function(t){var r,o=t.statusStore;return Qp.createElement(s,p({render:Yx},n,{key:null!==(r=n.key)&&void 0!==r?r:i.key,schema:i,propKey:i.key,$path:"".concat(e?"".concat(e,"/"):"").concat(i&&i.type||""),statusStore:o}))})}var Jx,Xx=(Jx=Kg(Kx),Qp.forwardRef(function(e,t){return Qp.createElement(Wx,null,function(n){var r=n.statusStore;return Qp.createElement(Jx,p({},e,{statusStore:r,ref:t}))})})),Zx=function(e){function t(t){var n=e.call(this,t)||this;return n.state={hasError:!1},n}return s(t,e),t.prototype.componentDidCatch=function(e,t){var n=this.props.customErrorMsg;n&&console.warn(n),console.warn("错误对象:",e),console.warn("错误信息:",t),this.setState({hasError:!0})},t.prototype.render=function(){var e=this.props.fallback;return this.state.hasError?e?e():Qp.createElement("div",{className:"renderer-error-boundary"},"渲染发生错误,详细错误信息请查看控制台输出。"):this.props.children},t}(Qp.Component);function Qx(e,t,n,r){void 0===t&&(t={});var o=t.key,a=i(t,["key"]);return void 0===n&&(n={}),void 0===r&&(r=""),Qp.createElement(eE,p({},a,{key:o,schema:e,pathPrefix:r,options:n}))}function eE(e){var t=e.schema,n=e.options,r=e.pathPrefix,o=i(e,["schema","options","pathPrefix"]),a=o.locale||vx();a="en"===a?"en-US":"zh"===a||"cn"===a?"zh-CN":a.replace("_","-");var s=Qp.useCallback(function(){return(o.translate||hx(a)).apply(null,arguments)},[a,o.translate]),u=Qp.useMemo(function(){var e=mb[n.session||"global"];if(e){var t=ho(e);Object.assign(t,p(p({},n),{fetcher:n.fetcher?Th(n.fetcher,n.tracker):t.fetcher,confirm:n.confirm?Qc(n.confirm):t.confirm,locale:a,translate:s}))}else n=p(p(p({},vb),n),{fetcher:n.fetcher?Th(n.fetcher,n.tracker):vb.fetcher,confirm:Qc(n.confirm||vb.confirm||window.confirm),locale:a,translate:s}),e=Zy.create({},n),mb[n.session||"global"]=e;return window.amisStore=e,e},Object.keys(n).concat(Object.values(n)).concat(a)),l=ho(u),c=o.theme||n.theme||"cxd";return"default"===c&&(c="cxd"),l.theme=Pb(c),Qp.useEffect(function(){return l.enableAMISDebug?ch():dh(),function(){return l.enableAMISDebug||dh()}},[l.enableAMISDebug]),void 0!==o.locale&&(l.translate=s,l.locale=a),!1!==n.useMobileUI&&(o.mobileUI=l.isMobile()),t=Qp.useMemo(function(){return t=Hm(t=Km(t,a,l.isMobile()?"mobile":"pc"),n.replaceText,l.replaceTextIgnoreKeys)},[t,a,n.replaceText]),Qp.createElement(mw.Provider,{value:l},Qp.createElement(Xx,p({},o,{schema:t,pathPrefix:r,rootStore:u,env:l,theme:c,locale:a,translate:s})))}Pb(Fb).classPrefix,window.amisVersionInfo={version:"6.13.0",buildTime:"2025-08-12T03:18:10.080Z"};export{Tb as $,Ua as $i,Wd as $n,il as $r,ev as $t,Vw as A,uu as Ai,Ld as An,rp as Ar,oy as At,vw as B,Ss as Bi,td as Bn,od as Br,dm as Bt,Yw as C,bu as Ci,_p as Cn,Vd as Cr,Py as Ct,Uw as D,pu as Di,vp as Dn,Kd as Dr,Ay as Dt,Ww as E,xu as Ei,yp as En,Lc as Er,Ny as Et,Dw as F,eu as Fi,kd as Fn,Gd as Fr,Hm as Ft,uw as G,cs as Gi,vd as Gn,_c as Gr,Vv as Gt,dw as H,fs as Hi,cd as Hn,ud as Hr,Wv as Ht,Sw as I,Qs as Ii,Ad as In,yd as Ir,zm as It,Kb as J,Za as Ji,fd as Jn,cc as Jr,uv as Jt,ow as K,ls as Ki,Bd as Kn,ac as Kr,Rv as Kt,xw as L,Zs as Li,zc as Ln,Id as Lr,Lm as Lt,Fw as M,su as Mi,Td as Mn,Fd as Mr,Xm as Mt,Pw as N,tu as Ni,Nd as Nn,Pd as Nr,Ym as Nt,Lw as O,du as Oi,hp as On,nd as Or,Oy as Ot,Iw as P,nu as Pi,ap as Pn,Rc as Pr,Km as Pt,Mb as Q,qa as Qi,_d as Qn,Tl as Qr,rv as Qt,bw as R,Hs as Ri,Qd as Rn,wd as Rr,xm as Rt,Jw as S,Au as Si,Pp as Sn,Rd as Sr,Fy as St,Gw as T,vu as Ti,gp as Tn,ld as Tr,Iy as Tt,pw as U,ps as Ui,sp as Un,Yc as Ur,Lv as Ut,hw as V,hs as Vi,ip as Vn,ad as Vr,em as Vt,fw as W,ds as Wi,md as Wn,Cc as Wr,Mv as Wt,zb as X,Ka as Xi,bd as Xn,ic as Xr,av as Xt,Wb as Y,Ya as Yi,gd as Yn,fc as Yr,fv as Yt,Hb as Z,Ha as Zi,pp as Zn,Fl as Zr,ov as Zt,dx as _,ku as _i,gf as _n,jc as _r,qy as _t,Ix as a,so as aa,Xu as ai,Vh as an,xd as ar,ub as at,Xw as b,_u as bi,Yp as bn,Kc as br,Ry as bt,Tx as c,it as ca,Yu as ci,Mh as cn,Mc as cr,cb as ct,wx as d,Ku as di,Dh as dn,up as dr,Wg as dt,Fa as ea,sl as ei,Yh as en,ep as er,kb as et,bx as f,Lu as fi,Ch as fn,qc as fr,Bg as ft,hx as g,Iu as gi,Gf as gn,id as gr,eg as gt,yx as h,Tu as hi,Kf as hn,Jc as hr,ig as ht,$x as i,_i as ia,Qu as ii,Ah as in,Ed as ir,lb as it,jw as j,lu as ji,$c as jn,Dd as jr,Zm as jt,Mw as k,cu as ki,Xd as kn,np as kr,ay as kt,Px as l,Dt as la,Hu as li,Sh as ln,Xc as lr,Yg as lt,vx as m,Ru as mi,Jf as mn,Yd as mr,ag as mt,Zx as n,co as na,nl as ni,Hh as nn,Ud as nr,_b as nt,kx as o,fo as oa,zu as oi,Rh as on,Od as or,yb as ot,fx as p,Mu as pi,mh as pn,rd as pr,ng as pt,Xb as q,us as qi,pd as qn,lc as qr,Av as qt,Gx as r,po as ra,tl as ri,qh as rn,hd as rr,Db as rt,Nx as s,Ta as sa,Uu as si,Lh as sn,Cd as sr,wb as st,Qx as t,Pa as ta,al as ti,Wh as tn,ed as tr,Rb as tt,Ox as u,Mn as ua,Gu as ui,Bh as un,Jd as ur,Jg as ut,Qw as v,Nu as vi,Zp as vn,tp as vr,Uy as vt,Kw as w,wu as wi,xp as wn,Zc as wr,Ty as wt,Zw as x,Cu as xi,Kp as xn,Gc as xr,Vy as xt,ex as y,Du as yi,Xp as yn,Uc as yr,jy as yt,mw as z,qs as zi,Hd as zn,Sd as zr,hm as zt};
|