"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[2637],{988:(e,o,t)=>{t(46629),t(5388)},26914:(e,o,t)=>{t.d(o,{Z:()=>z});var n=t(57268),l=t(29445),s=t(30361),i=t(40741),a=t(89349),c=t(8578),r=t(89404),d=t(93278);let u=0;var p=t(95216),y=t(76619),g=t(69290);const[f,v]=(0,r.do)("toast"),m=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay"],h={icon:String,show:Boolean,type:(0,d.SQ)("text"),overlay:Boolean,message:d.Or,iconSize:d.Or,duration:(0,d.qM)(2e3),position:(0,d.SQ)("middle"),teleport:[String,Object],className:d.Vg,iconPrefix:String,transition:(0,d.SQ)("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:d.Vg,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean};var b=(0,n.aZ)({name:f,props:h,emits:["update:show"],setup(e,{emit:o}){let t,l=!1;const a=()=>{const o=e.show&&e.forbidClick;l!==o&&(l=o,l?(u||document.body.classList.add("van-toast--unclickable"),u++):u&&(u--,u||document.body.classList.remove("van-toast--unclickable")))},c=e=>o("update:show",e),r=()=>{e.closeOnClick&&c(!1)},d=()=>clearTimeout(t),f=()=>{const{icon:o,type:t,iconSize:l,iconPrefix:s,loadingType:i}=e;return o||"success"===t||"fail"===t?(0,n.Wm)(p.J,{name:o||t,size:l,class:v("icon"),classPrefix:s},null):"loading"===t?(0,n.Wm)(g.g,{class:v("loading"),size:l,type:i},null):void 0},h=()=>{const{type:o,message:t}=e;if((0,i.Xq)(t)&&""!==t)return"html"===o?(0,n.Wm)("div",{key:0,class:v("text"),innerHTML:String(t)},null):(0,n.Wm)("div",{class:v("text")},[t])};return(0,n.YP)((()=>[e.show,e.forbidClick]),a),(0,n.YP)((()=>[e.show,e.type,e.message,e.duration]),(()=>{d(),e.show&&e.duration>0&&(t=setTimeout((()=>{c(!1)}),e.duration))})),(0,n.bv)(a),(0,n.Ah)(a),()=>(0,n.Wm)(y.G,(0,n.dG)({class:[v([e.position,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:r,onClosed:d,"onUpdate:show":c},(0,s.ei)(e,m)),{default:()=>[f(),h()]})}});const k={icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1};let C=[],O=!1,S=(0,s.l7)({},k);const w=new Map;function x(e){return(0,i.Kn)(e)?e:{message:e}}function P(){if(!C.length||O){const e=function(){const{instance:e,unmount:o}=(0,c.H)({setup(){const t=(0,l.iH)(""),{open:s,state:i,close:a,toggle:r}=(0,c.o)(),d=()=>{O&&(C=C.filter((o=>o!==e)),o())};return(0,n.YP)(t,(e=>{i.message=e})),(0,n.FN)().render=()=>{const e={onClosed:d,"onUpdate:show":r};return(0,n.Wm)(b,(0,n.dG)(i,e),null)},{open:s,clear:a,message:t}}});return e}();C.push(e)}return C[C.length-1]}function T(e={}){if(!s._f)return{};const o=P(),t=x(e);return o.open((0,s.l7)({},S,w.get(t.type||S.type),t)),o}const W=e=>o=>T((0,s.l7)({type:e},x(o)));T.loading=W("loading"),T.success=W("success"),T.fail=W("fail"),T.clear=e=>{var o;C.length&&(e?(C.forEach((e=>{e.clear()})),C=[]):O?null==(o=C.shift())||o.clear():C[0].clear())},T.setDefaultOptions=function(e,o){"string"==typeof e?w.set(e,o):(0,s.l7)(S,e)},T.resetDefaultOptions=e=>{"string"==typeof e?w.delete(e):(S=(0,s.l7)({},k),w.clear())},T.allowMultiple=(e=!0)=>{O=e},T.install=e=>{e.use((0,a.n)(b)),e.config.globalProperties.$toast=T};var z=T},36910:(e,o,t)=>{t(46629),t(80114),t(12293),t(5388),t(6799),t(20677)}}]);